Your IP : 216.73.217.68


Current Path : /home/w/u/e/wuectly/www/03cbe/
Upload File :
Current File : /home/w/u/e/wuectly/www/03cbe/editor.tar

delete.png000060400000002177152455705560006535 0ustar00�PNG


IHDRo��tEXtSoftwareAdobe ImageReadyq�e<"iTXtXML:com.adobe.xmp<?xpacket begin="" id="W5M0MpCehiHzreSzNTczkc9d"?> <x:xmpmeta xmlns:x="adobe:ns:meta/" x:xmptk="Adobe XMP Core 5.3-c011 66.145661, 2012/02/06-14:56:27        "> <rdf:RDF xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#"> <rdf:Description rdf:about="" xmlns:xmp="http://ns.adobe.com/xap/1.0/" xmlns:xmpMM="http://ns.adobe.com/xap/1.0/mm/" xmlns:stRef="http://ns.adobe.com/xap/1.0/sType/ResourceRef#" xmp:CreatorTool="Adobe Photoshop CS6 (Windows)" xmpMM:InstanceID="xmp.iid:2DB953D5B06C11E49B42CCAB3AC66869" xmpMM:DocumentID="xmp.did:2DB953D6B06C11E49B42CCAB3AC66869"> <xmpMM:DerivedFrom stRef:instanceID="xmp.iid:2DB953D3B06C11E49B42CCAB3AC66869" stRef:documentID="xmp.did:2DB953D4B06C11E49B42CCAB3AC66869"/> </rdf:Description> </rdf:RDF> </x:xmpmeta> <?xpacket end="r"?>��r�IDATx�ܔ�
�0��S�?u��:D��9z��=F=G�^�keɦ�����}�6�����	ў!�1�}�ޜ���n:�-��yktX�5T*%Ճ	
�gY��)M��wm'3P��QZi��B�*�E���3MoRb�����)���FI�Ek��}��ď�(V�(�c3�(1J��(mlR5ؚ�QM��|��a�j\C���{���l�d
�=����b�8�e�k��A����L/�E��U��IEND�B`�icon-16-initareas.png000060400000002267152455705560010424 0ustar00�PNG


IHDR�atEXtSoftwareAdobe ImageReadyq�e<"iTXtXML:com.adobe.xmp<?xpacket begin="" id="W5M0MpCehiHzreSzNTczkc9d"?> <x:xmpmeta xmlns:x="adobe:ns:meta/" x:xmptk="Adobe XMP Core 5.3-c011 66.145661, 2012/02/06-14:56:27        "> <rdf:RDF xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#"> <rdf:Description rdf:about="" xmlns:xmp="http://ns.adobe.com/xap/1.0/" xmlns:xmpMM="http://ns.adobe.com/xap/1.0/mm/" xmlns:stRef="http://ns.adobe.com/xap/1.0/sType/ResourceRef#" xmp:CreatorTool="Adobe Photoshop CS6 (Windows)" xmpMM:InstanceID="xmp.iid:A2C712F5B11311E4AF56AD73ED75A287" xmpMM:DocumentID="xmp.did:A2C712F6B11311E4AF56AD73ED75A287"> <xmpMM:DerivedFrom stRef:instanceID="xmp.iid:A2C712F3B11311E4AF56AD73ED75A287" stRef:documentID="xmp.did:A2C712F4B11311E4AF56AD73ED75A287"/> </rdf:Description> </rdf:RDF> </x:xmpmeta> <?xpacket end="r"?>�-��+IDATxڌ�AJC1��$�J�"�<���.D�@��3�{��;o�	\�B� <�Gp#�*�iR�BR���̛�?�̼�{oڶ5)�V���^C��#���t�4VN�����d��؅PG�B�(�g* Q7�ϰ�H�;����u<��b:jB۳���^Q��#=�f���%��Ϧ�
$v$�RqxN�o+�i?�x��-���p^/�`���Ob�}�cx��*[�0Ӂ"Ԫ^b�S>B|
�H�9m�3�؜�l}�n��*�o+�AS*V�~��|5A���%i�.��y���&Y;�`0��w�m�IEND�B`�popup_delete_hover.png000060400000002212152455705560011151 0ustar00�PNG


IHDR2=50tEXtSoftwareAdobe ImageReadyq�e<"iTXtXML:com.adobe.xmp<?xpacket begin="" id="W5M0MpCehiHzreSzNTczkc9d"?> <x:xmpmeta xmlns:x="adobe:ns:meta/" x:xmptk="Adobe XMP Core 5.3-c011 66.145661, 2012/02/06-14:56:27        "> <rdf:RDF xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#"> <rdf:Description rdf:about="" xmlns:xmp="http://ns.adobe.com/xap/1.0/" xmlns:xmpMM="http://ns.adobe.com/xap/1.0/mm/" xmlns:stRef="http://ns.adobe.com/xap/1.0/sType/ResourceRef#" xmp:CreatorTool="Adobe Photoshop CS6 (Windows)" xmpMM:InstanceID="xmp.iid:25F50BB44AFB11E5872CC6FFBA9ABBBE" xmpMM:DocumentID="xmp.did:25F50BB54AFB11E5872CC6FFBA9ABBBE"> <xmpMM:DerivedFrom stRef:instanceID="xmp.iid:25F50BB24AFB11E5872CC6FFBA9ABBBE" stRef:documentID="xmp.did:25F50BB34AFB11E5872CC6FFBA9ABBBE"/> </rdf:Description> </rdf:RDF> </x:xmpmeta> <?xpacket end="r"?>�J��IDATxڄ�?O1��<"EO�4��q#�¤�&I�nQYHL`�s@�s^��<J~ɧ-�s��3�9�����o���n�����4cL5x�N��,
����2��w�a
=~ƹ���
�(I�ˈ�;HL�ŶvN�~鬾�q�3�1�Q���"3�u���Uկj����~[�m0^/�0l�����᙮�[��B�8����87�7��o��
w��#|b���6��ُM�}�o��IEND�B`�icon-16-show.png000060400000000503152455705560007414 0ustar00�PNG


IHDR�atEXtSoftwareAdobe ImageReadyq�e<�IDATxڤ��
�0E}�a
z( �2d���ـ�Q�\@�T�t�!�C�IH���߳�>��$����ᗏ�	W��뺫��u͒�4
<�cB�U�0G��/@���f��+����6�uc�� @J��9��m�^Q0�sێY��r�!��M�P��qZt�z�i�Q)4�>�'ܒ�� ��3p�L����$�ʚ�!
�n�`�O-&�}-/�Z_�r5ᣳIEND�B`�index.html000060400000000054152455705560006552 0ustar00<html><body bgcolor="#FFFFFF"></body></html>icon-16-delete.png000060400000002173152455705560007703 0ustar00�PNG


IHDR�atEXtSoftwareAdobe ImageReadyq�e<"iTXtXML:com.adobe.xmp<?xpacket begin="" id="W5M0MpCehiHzreSzNTczkc9d"?> <x:xmpmeta xmlns:x="adobe:ns:meta/" x:xmptk="Adobe XMP Core 5.3-c011 66.145661, 2012/02/06-14:56:27        "> <rdf:RDF xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#"> <rdf:Description rdf:about="" xmlns:xmp="http://ns.adobe.com/xap/1.0/" xmlns:xmpMM="http://ns.adobe.com/xap/1.0/mm/" xmlns:stRef="http://ns.adobe.com/xap/1.0/sType/ResourceRef#" xmp:CreatorTool="Adobe Photoshop CS6 (Windows)" xmpMM:InstanceID="xmp.iid:422C85B4B11311E4A310992F9CB44B06" xmpMM:DocumentID="xmp.did:422C85B5B11311E4A310992F9CB44B06"> <xmpMM:DerivedFrom stRef:instanceID="xmp.iid:422C85B2B11311E4A310992F9CB44B06" stRef:documentID="xmp.did:422C85B3B11311E4A310992F9CB44B06"/> </rdf:Description> </rdf:RDF> </x:xmpmeta> <?xpacket end="r"?>F\A��IDATx�b���?022�iVVV~..�@Z$R��@ Ȁ@�踹�YVSS���544�cSˈ���������"""�~�b����5 W1�y���Ǐ`q�k��eAv
Pp�� ����d.�۷o3�L�
@^(**{
�Gpss3<�� >���e���8��� y��
���G�\PB�?�|���A���^tES�����	� K�%*��kďxIEND�B`�icon-16-edittext.png000060400000002354152455705560010274 0ustar00�PNG


IHDR�atEXtSoftwareAdobe ImageReadyq�e<"iTXtXML:com.adobe.xmp<?xpacket begin="" id="W5M0MpCehiHzreSzNTczkc9d"?> <x:xmpmeta xmlns:x="adobe:ns:meta/" x:xmptk="Adobe XMP Core 5.3-c011 66.145661, 2012/02/06-14:56:27        "> <rdf:RDF xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#"> <rdf:Description rdf:about="" xmlns:xmp="http://ns.adobe.com/xap/1.0/" xmlns:xmpMM="http://ns.adobe.com/xap/1.0/mm/" xmlns:stRef="http://ns.adobe.com/xap/1.0/sType/ResourceRef#" xmp:CreatorTool="Adobe Photoshop CS6 (Windows)" xmpMM:InstanceID="xmp.iid:6197968EB11411E48FC2AC0B24C24080" xmpMM:DocumentID="xmp.did:6197968FB11411E48FC2AC0B24C24080"> <xmpMM:DerivedFrom stRef:instanceID="xmp.iid:6197968CB11411E48FC2AC0B24C24080" stRef:documentID="xmp.did:6197968DB11411E48FC2AC0B24C24080"/> </rdf:Description> </rdf:RDF> </x:xmpmeta> <?xpacket end="r"?>o�&q`IDATx�b���?%�������߿�r���gdd`cc{���w&-�>,$$t	���p!́���_�~Uy��9�w���5�_PP��ٳg����w���U�Ç\ 	F�@��bbb��N�eeee`bb��f�~~��@�G�`͒���"""`nnnŋ/����>&p͢�����RRRmmmw�6�4)b"V���4C{{�e�f[�f\`���2�fl^G�ϟ?U����/��5%v�Ƃ��L90��8p����S$r6L3L#�
8}�
nBf껧�����{�u���J\^����)����֫w��ޑ����g߾����x�^�� ��4�g�}IEND�B`�icon-16-editpicture.png000060400000002353152455705560010762 0ustar00�PNG


IHDR�atEXtSoftwareAdobe ImageReadyq�e<"iTXtXML:com.adobe.xmp<?xpacket begin="" id="W5M0MpCehiHzreSzNTczkc9d"?> <x:xmpmeta xmlns:x="adobe:ns:meta/" x:xmptk="Adobe XMP Core 5.3-c011 66.145661, 2012/02/06-14:56:27        "> <rdf:RDF xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#"> <rdf:Description rdf:about="" xmlns:xmp="http://ns.adobe.com/xap/1.0/" xmlns:xmpMM="http://ns.adobe.com/xap/1.0/mm/" xmlns:stRef="http://ns.adobe.com/xap/1.0/sType/ResourceRef#" xmp:CreatorTool="Adobe Photoshop CS6 (Windows)" xmpMM:InstanceID="xmp.iid:03A2AB7BB11411E4BAB1E423029C47CE" xmpMM:DocumentID="xmp.did:03A2AB7CB11411E4BAB1E423029C47CE"> <xmpMM:DerivedFrom stRef:instanceID="xmp.iid:03A2AB79B11411E4BAB1E423029C47CE" stRef:documentID="xmp.did:03A2AB7AB11411E4BAB1E423029C47CE"/> </rdf:Description> </rdf:RDF> </x:xmpmeta> <?xpacket end="r"?>J��d_IDATx�b���?%���B�c�gcc#Jӯ_�>|���b���õk�fc���V�
����櫨�������ɡc�Z����߿�4�	@�0		��b�\\\�����բxbbb�;����	�,&&vh��?�///njkk� �t	X������� ��ϟy�x��߿�
j*:�P�EEE/FFF]�!@q��?�
�4��AFFF�p''��n:�
(jA�A� 6+++�+��$�6])���a���H��0�f�%0�aH!(�YXX�@�01�O�,g.��3H�d��̌S#\L`�n���{u�^�	�=7��}��w4HIEND�B`�popup_delete.png000060400000002231152455705560007747 0ustar00�PNG


IHDR2=50tEXtSoftwareAdobe ImageReadyq�e<"iTXtXML:com.adobe.xmp<?xpacket begin="" id="W5M0MpCehiHzreSzNTczkc9d"?> <x:xmpmeta xmlns:x="adobe:ns:meta/" x:xmptk="Adobe XMP Core 5.3-c011 66.145661, 2012/02/06-14:56:27        "> <rdf:RDF xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#"> <rdf:Description rdf:about="" xmlns:xmp="http://ns.adobe.com/xap/1.0/" xmlns:xmpMM="http://ns.adobe.com/xap/1.0/mm/" xmlns:stRef="http://ns.adobe.com/xap/1.0/sType/ResourceRef#" xmp:CreatorTool="Adobe Photoshop CS6 (Windows)" xmpMM:InstanceID="xmp.iid:1B686E6A4AFB11E5A199A66C9913D4EE" xmpMM:DocumentID="xmp.did:1B686E6B4AFB11E5A199A66C9913D4EE"> <xmpMM:DerivedFrom stRef:instanceID="xmp.iid:1B686E684AFB11E5A199A66C9913D4EE" stRef:documentID="xmp.did:1B686E694AFB11E5A199A66C9913D4EE"/> </rdf:Description> </rdf:RDF> </x:xmpmeta> <?xpacket end="r"?>��Ol
IDATxڄ�?NBA�q�A""J�J"�;`��W �
��P�yc#�X���ĂF-5�W,��w�݄�I>쾙a��8�}l���K
����~��`Zw��i\�U�`|YC�Z�	�q���mj5{�B���p���zm�Oh��#|c�H��؎��@=5���UM�^��g��+��W9U�G����H�e������9�g���3�s#lv�a�@Wg?�S�5V~�y�)^�r��u�c	Mݿ��pro(b�glii��?�?rF0��IEND�B`�popup_cancel.png000060400000002156152455705560007740 0ustar00�PNG


IHDR��w&tEXtSoftwareAdobe ImageReadyq�e<"iTXtXML:com.adobe.xmp<?xpacket begin="" id="W5M0MpCehiHzreSzNTczkc9d"?> <x:xmpmeta xmlns:x="adobe:ns:meta/" x:xmptk="Adobe XMP Core 5.3-c011 66.145661, 2012/02/06-14:56:27        "> <rdf:RDF xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#"> <rdf:Description rdf:about="" xmlns:xmp="http://ns.adobe.com/xap/1.0/" xmlns:xmpMM="http://ns.adobe.com/xap/1.0/mm/" xmlns:stRef="http://ns.adobe.com/xap/1.0/sType/ResourceRef#" xmp:CreatorTool="Adobe Photoshop CS6 (Windows)" xmpMM:InstanceID="xmp.iid:FE3E210C4AFA11E5BC2FB3422BD422F9" xmpMM:DocumentID="xmp.did:FE3E210D4AFA11E5BC2FB3422BD422F9"> <xmpMM:DerivedFrom stRef:instanceID="xmp.iid:FE3E210A4AFA11E5BC2FB3422BD422F9" stRef:documentID="xmp.did:FE3E210B4AFA11E5BC2FB3422BD422F9"/> </rdf:Description> </rdf:RDF> </x:xmpmeta> <?xpacket end="r"?>��;o�IDATx�bL�ߦ������(�Lc@��R�@�$��
�%&�)�S��{X��z ΄��|ҭ@\
�#�]����	�@N��9 6B�O:��je'�$v$E?�x"Pa9�W�pH�!)�T��0!)����Pq�b��ː�pJ��ePy��Ӏt.�i��H���Ŗw�AA���(�h"R�����w�x6P!r�1@����.�2L� �IEND�B`�sourcedialog.png000060400000001374152455705560007751 0ustar00�PNG


IHDR�abKGD�������	pHYs
�
�B(�xIDAT8ˍ��jTA��3s37{���aI�!,��T���R$�n�Ϡ>��������ws�ź�;�"�Y����)Ι�����(Ȳ�<�YXX`�b����3	!���=c��{�sNEdnYk{+++�Z-�$ADf���6�:��<�����$�Z���c9;;c< "lmm�+��hAU{u]SUu]c�V.//QUb�כNNN
�;��fs_Dz�fk�́�B I��Z�scH���UU��;kmOD�+�����m�<gii���"Ƙre������u}3Dk-Y�M�[��n��lll�>onn&@��)Ƙ`r�,//#"�s�`oo�E]ׯ��z��v����~����.`"�pgg�Q��5>\\\|ɲ�g��y<�����1������1�e�ө�o��}ww�6ƼVU���4�H����
B�9�Ӈ<��VU��#�����5 �uT�@D�I�U�p�܍nKUL�C��$��h4BU�?4��1���eY��#ͫ�,	!��z)�oe@%tEXtdate:create2013-07-04T17:03:03+02:00M��x%tEXtdate:modify2013-07-04T17:03:03+02:00<��tEXtSoftwarewww.inkscape.org��<IEND�B`�icon-16-mediabrowser.png000060400000000753152455705560011126 0ustar00�PNG


IHDR�abKGD�������	pHYs��tIME�8���MxIDAT8�œ?�a�����O��u7���B@ld����~�+r�"�'H�"�s� b%�D�.(
ﻓf�́Db����w�g�y�wH����$IPU�/�1�v��E�ND~���-�,;��z�������A`�f���b��9�N�50���@UoU�IUoOԼ>���n�h4Ω���<��}��sl�����]�W��}M��z0��g ���G<�+��0�G��M�Z��T*�Oi���ֲ����Z��MD�F��ȮV���f�x<�]���|>��j��v1Ơ�8��f�a�^�\.��by�I�Ļݎ<��( �2�<�@᝗V�km��d�*�
#=30�ni�K��7�`��)��8IEND�B`�popup_cancel_hover.png000060400000001762152455705560011145 0ustar00�PNG


IHDR��w&tEXtSoftwareAdobe ImageReadyq�e<"iTXtXML:com.adobe.xmp<?xpacket begin="" id="W5M0MpCehiHzreSzNTczkc9d"?> <x:xmpmeta xmlns:x="adobe:ns:meta/" x:xmptk="Adobe XMP Core 5.3-c011 66.145661, 2012/02/06-14:56:27        "> <rdf:RDF xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#"> <rdf:Description rdf:about="" xmlns:xmp="http://ns.adobe.com/xap/1.0/" xmlns:xmpMM="http://ns.adobe.com/xap/1.0/mm/" xmlns:stRef="http://ns.adobe.com/xap/1.0/sType/ResourceRef#" xmp:CreatorTool="Adobe Photoshop CS6 (Windows)" xmpMM:InstanceID="xmp.iid:090B06934AFB11E5A67AED1359B9D3AA" xmpMM:DocumentID="xmp.did:090B06944AFB11E5A67AED1359B9D3AA"> <xmpMM:DerivedFrom stRef:instanceID="xmp.iid:090B06914AFB11E5A67AED1359B9D3AA" stRef:documentID="xmp.did:090B06924AFB11E5A67AED1359B9D3AA"/> </rdf:Description> </rdf:RDF> </x:xmpmeta> <?xpacket end="r"?>n���fIDATx�b����6��Y@̀ς�k�8�#�4��䞃��G-@�	���4�	�hg� yd+;����Pqt� |M�Edy�L&��$�I�Lt�
��ˇ�}IEND�B`�icon-16-sortable.png000060400000002154152455705560010253 0ustar00�PNG


IHDR�atEXtSoftwareAdobe ImageReadyq�e<"iTXtXML:com.adobe.xmp<?xpacket begin="" id="W5M0MpCehiHzreSzNTczkc9d"?> <x:xmpmeta xmlns:x="adobe:ns:meta/" x:xmptk="Adobe XMP Core 5.3-c011 66.145661, 2012/02/06-14:56:27        "> <rdf:RDF xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#"> <rdf:Description rdf:about="" xmlns:xmp="http://ns.adobe.com/xap/1.0/" xmlns:xmpMM="http://ns.adobe.com/xap/1.0/mm/" xmlns:stRef="http://ns.adobe.com/xap/1.0/sType/ResourceRef#" xmp:CreatorTool="Adobe Photoshop CS6 (Windows)" xmpMM:InstanceID="xmp.iid:548F8F27B11611E4A81DF13E2C8B797C" xmpMM:DocumentID="xmp.did:548F8F28B11611E4A81DF13E2C8B797C"> <xmpMM:DerivedFrom stRef:instanceID="xmp.iid:548F8F25B11611E4A81DF13E2C8B797C" stRef:documentID="xmp.did:548F8F26B11611E4A81DF13E2C8B797C"/> </rdf:Description> </rdf:RDF> </x:xmpmeta> <?xpacket end="r"?>�Rݣ�IDATx�b���?%����ed�|HEBi�\���Ai�x���!�B.`b~(M� ��45Zhjv �	#,��	��ϟ?CmV���
ğ�X����j��'ND�����0��ap
������4��"N5,X
�S�7���w		�h\jX���ƙ�D4�����q����6fYk0MVR>���MX1�&;7���\�cT�XIEND�B`�params/editor.xml000060400000002746152455717120010055 0ustar00<?xml version="1.0" encoding="utf-8"?>
<form>
	<fields name="fieldparams">
		<fieldset name="fieldparams">
			<field
				name="buttons"
				type="list"
				label="PLG_FIELDS_EDITOR_PARAMS_SHOW_BUTTONS_LABEL"
				description="PLG_FIELDS_EDITOR_PARAMS_SHOW_BUTTONS_DESC"
				filter="integer"
				>
				<option value="">COM_FIELDS_FIELD_USE_GLOBAL</option>
				<option value="1">JYES</option>
				<option value="0">JNO</option>
			</field>

			<field
				name="hide"
				type="plugins"
				label="PLG_FIELDS_EDITOR_PARAMS_BUTTONS_HIDE_LABEL"
				description="JGLOBAL_SELECT_SOME_OPTIONS"
				folder="editors-xtd"
				multiple="true"
			/>

			<field
				name="width"
				type="text"
				label="PLG_FIELDS_EDITOR_PARAMS_WIDTH_LABEL"
				description="PLG_FIELDS_EDITOR_PARAMS_WIDTH_DESC"
				size="5"
			/>

			<field
				name="height"
				type="text"
				label="PLG_FIELDS_EDITOR_PARAMS_HEIGHT_LABEL"
				description="PLG_FIELDS_EDITOR_PARAMS_HEIGHT_DESC"
				size="5"
			/>

			<field
				name="filter"
				type="list"
				label="PLG_FIELDS_TEXT_PARAMS_FILTER_LABEL"
				description="PLG_FIELDS_TEXT_PARAMS_FILTER_DESC"
				class="btn-group"
				validate="options"
				>
				<option value="">COM_FIELDS_FIELD_USE_GLOBAL</option>
				<option value="0">JNO</option>
				<option value="raw">JLIB_FILTER_PARAMS_RAW</option>
				<option value="safehtml">JLIB_FILTER_PARAMS_SAFEHTML</option>
				<option value="JComponentHelper::filterText">JLIB_FILTER_PARAMS_TEXT</option>
			</field>
		</fieldset>
	</fields>
</form>
tmpl/editor.php000060400000000546152455717120007531 0ustar00<?php
/**
 * @package     Joomla.Plugin
 * @subpackage  Fields.Editor
 *
 * @copyright   (C) 2017 Open Source Matters, Inc. <https://www.joomla.org>
 * @license     GNU General Public License version 2 or later; see LICENSE.txt
 */
defined('_JEXEC') or die;

$value = $field->value;

if ($value == '')
{
	return;
}

echo JHtml::_('content.prepare', $value);
editor.php000060400000002271152455717120006552 0ustar00<?php
/**
 * @package     Joomla.Plugin
 * @subpackage  Fields.Editor
 *
 * @copyright   (C) 2017 Open Source Matters, Inc. <https://www.joomla.org>
 * @license     GNU General Public License version 2 or later; see LICENSE.txt
 */

defined('_JEXEC') or die;

JLoader::import('components.com_fields.libraries.fieldsplugin', JPATH_ADMINISTRATOR);

/**
 * Fields Editor Plugin
 *
 * @since  3.7.0
 */
class PlgFieldsEditor extends FieldsPlugin
{
	/**
	 * Transforms the field into a DOM XML element and appends it as a child on the given parent.
	 *
	 * @param   stdClass    $field   The field.
	 * @param   DOMElement  $parent  The field node parent.
	 * @param   JForm       $form    The form.
	 *
	 * @return  DOMElement
	 *
	 * @since   3.7.0
	 */
	public function onCustomFieldsPrepareDom($field, DOMElement $parent, JForm $form)
	{
		$fieldNode = parent::onCustomFieldsPrepareDom($field, $parent, $form);

		if (!$fieldNode)
		{
			return $fieldNode;
		}

		$fieldNode->setAttribute('buttons', $field->fieldparams->get('buttons', $this->params->get('buttons', 0)) ? 'true' : 'false');
		$fieldNode->setAttribute('hide', implode(',', $field->fieldparams->get('hide', array())));

		return $fieldNode;
	}
}
editor.xml000060400000004501152455717120006561 0ustar00<?xml version="1.0" encoding="utf-8" ?>
<extension type="plugin" version="3.7.0" group="fields" method="upgrade">
	<name>plg_fields_editor</name>
	<author>Joomla! Project</author>
	<creationDate>March 2016</creationDate>
	<copyright>(C) 2016 Open Source Matters, Inc.</copyright>
	<license>GNU General Public License version 2 or later; see LICENSE.txt</license>
	<authorEmail>admin@joomla.org</authorEmail>
	<authorUrl>www.joomla.org</authorUrl>
	<version>3.7.0</version>
	<description>PLG_FIELDS_EDITOR_XML_DESCRIPTION</description>
	<files>
		<filename plugin="editor">editor.php</filename>
		<folder>params</folder>
		<folder>tmpl</folder>
	</files>
	<languages>
		<language tag="en-GB">en-GB.plg_fields_editor.ini</language>
		<language tag="en-GB">en-GB.plg_fields_editor.sys.ini</language>
	</languages>
	<config>
		<fields name="params">
			<fieldset name="basic">
				<field
					name="buttons"
					type="radio"
					label="PLG_FIELDS_EDITOR_PARAMS_SHOW_BUTTONS_LABEL"
					description="PLG_FIELDS_EDITOR_PARAMS_SHOW_BUTTONS_DESC"
					class="btn-group btn-group-yesno"
					default="0"
					filter="integer"
					>
					<option value="1">JYES</option>
					<option value="0">JNO</option>
				</field>

				<field
					name="hide"
					type="plugins"
					label="PLG_FIELDS_EDITOR_PARAMS_BUTTONS_HIDE_LABEL"
					description="JGLOBAL_SELECT_SOME_OPTIONS"
					folder="editors-xtd"
					multiple="true"
				/>

				<field
					name="width"
					type="text"
					label="PLG_FIELDS_EDITOR_PARAMS_WIDTH_LABEL"
					description="PLG_FIELDS_EDITOR_PARAMS_WIDTH_DESC"
					default="100%"
					size="5"
				/>

				<field
					name="height"
					type="text"
					label="PLG_FIELDS_EDITOR_PARAMS_HEIGHT_LABEL"
					description="PLG_FIELDS_EDITOR_PARAMS_HEIGHT_DESC"
					default="250px"
					size="5"
				/>

				<field
					name="filter"
					type="list"
					label="PLG_FIELDS_EDITOR_PARAMS_FILTER_LABEL"
					description="PLG_FIELDS_EDITOR_PARAMS_FILTER_DESC"
					class="btn-group"
					default="JComponentHelper::filterText"
					validate="options"
					>
					<option value="0">JNO</option>
					<option value="raw">JLIB_FILTER_PARAMS_RAW</option>
					<option value="safehtml">JLIB_FILTER_PARAMS_SAFEHTML</option>
					<option value="JComponentHelper::filterText">JLIB_FILTER_PARAMS_TEXT</option>
				</field>
			</fieldset>
		</fields>
	</config>
</extension>
extensions/popups/jcemediabox.xml000060400000010407152455721620013274 0ustar00<?xml version="1.0" ?>
<extension version="3.4" type="plugin" group="jce" method="upgrade">
    <name>WF_POPUPS_JCEMEDIABOX_TITLE</name>
    <version>2.9.99.2</version>
    <creationDate>22-04-2026</creationDate>
    <author>Ryan Demmer</author>
    <authorEmail>info@joomlacontenteditor.net</authorEmail>
    <authorUrl>https://www.joomlacontenteditor.net/</authorUrl>
    <copyright>Copyright (C) 2006 - 2026 Ryan Demmer. All rights reserved</copyright>
    <license>GNU/GPL Version 2 or later - http://www.gnu.org/licenses/gpl-2.0.html</license>
    <description>WF_POPUPS_JCEMEDIABOX_DESC</description>
    <files>
        <file>jcemediabox.php</file>
        <folder>jcemediabox</folder>
    </files>
    <fields name="jcemediabox">
        <fieldset name="jcemediabox">
            <field name="enable" type="yesno" default="1" label="WF_LABEL_EXTENSION_ENABLE" description="WF_LABEL_EXTENSION_ENABLE_DESC">
                <option value="1">JYES</option>
                <option value="0">JNO</option>
            </field>
            
            <field name="popup_group" type="text" default="" label="WF_POPUPS_JCEMEDIABOX_GROUP" description="WF_POPUPS_JCEMEDIABOX_GROUP_DESC" />

            <field name="popup_icon" type="yesno" default="1" label="WF_POPUPS_JCEMEDIABOX_ICON" description="WF_POPUPS_JCEMEDIABOX_ICON_DESC">
                <option value="1">JYES</option>
                <option value="0">JNO</option>
            </field>

            <field name="popup_icon_position" type="list" default="" label="WF_POPUPS_JCEMEDIABOX_ICON_POSITION" description="WF_POPUPS_JCEMEDIABOX_ICON_POSITION_DESC">
                <option value="">WF_OPTION_NOT_SET</option>
                <option value="icon-left">WF_OPTION_LEFT</option>
                <option value="icon-right">WF_OPTION_RIGHT</option>
                <option value="icon-top-left">WF_OPTION_TOP_LEFT</option>
                <option value="icon-top-right">WF_OPTION_TOP_RIGHT</option>
                <option value="icon-bottom-left">WF_OPTION_BOTTOM_LEFT</option>
                <option value="icon-bottom-right">WF_OPTION_BOTTOM_RIGHT</option>
            </field>

            <field name="popup_autopopup" type="list" default="" label="WF_POPUPS_JCEMEDIABOX_AUTO" description="WF_POPUPS_JCEMEDIABOX_AUTO_DESC">
                <option value="">WF_OPTION_NOT_SET</option>
                <option value="autopopup-single">WF_POPUPS_JCEMEDIABOX_AUTO_SINGLE</option>
                <option value="autopopup-multiple">WF_POPUPS_JCEMEDIABOX_AUTO_MULTIPLE</option>
            </field>

            <field name="popup_hide" type="yesno" default="0" label="WF_POPUPS_JCEMEDIABOX_HIDE" description="WF_POPUPS_JCEMEDIABOX_HIDE_DESC">
                <option value="1">JYES</option>
                <option value="0">JNO</option>
            </field>

            <field name="popup_mediatype" type="list" default="" label="WF_POPUPS_JCEMEDIABOX_MEDIATYPE" description="WF_POPUPS_JCEMEDIABOX_MEDIATYPE_DESC">
                <option value="">WF_OPTION_NOT_SET</option>
                <option value="text/html">WF_POPUPS_JCEMEDIABOX_INTERNAL</option>
                <option value="iframe">WF_POPUPS_JCEMEDIABOX_EXTERNAL</option>
                <option value="image">WF_POPUPS_JCEMEDIABOX_IMAGE</option>
                <option value="application/x-shockwave-flash">WF_POPUPS_JCEMEDIABOX_FLASH</option>
                <option value="video/quicktime">WF_POPUPS_JCEMEDIABOX_QUICKTIME</option>
                <option value="application/x-mplayer2">WF_POPUPS_JCEMEDIABOX_WINDOWSMEDIA</option>
                <option value="video/divx">WF_POPUPS_JCEMEDIABOX_DIVX</option>
                <option value="application/x-director">WF_POPUPS_JCEMEDIABOX_DIRECTOR</option>
                <option value="audio/x-pn-realaudio-plugin">WF_POPUPS_JCEMEDIABOX_REAL</option>
                <option value="video/mp4">WF_POPUPS_JCEMEDIABOX_VIDEO_MP4</option>
                <option value="audio/mp3">WF_POPUPS_JCEMEDIABOX_AUDIO_MP3</option>
                <option value="video/webm">WF_POPUPS_JCEMEDIABOX_VIDEO_WEBM</option>
                <option value="audio/webm">WF_POPUPS_JCEMEDIABOX_AUDIO_WEBM</option>
            </field>

        </fieldset>
    </fields>
    <media></media>
    <plugins>link,imgmanager_ext,mediamanager,filemanager</plugins>
    <languages></languages>
</extension>
 extensions/popups/index.html000060400000000054152455721620012272 0ustar00<html><body bgcolor="#FFFFFF"></body></html>extensions/popups/jcemediabox.php000060400000004114152455721620013261 0ustar00<?php
/**
 * @package     JCE
 * @subpackage  Editor
 *
 * @copyright   Copyright (C) 2005 - 2020 Open Source Matters, Inc. All rights reserved.
 * @copyright   Copyright (c) 2009-2024 Ryan Demmer. All rights reserved
 * @license     GNU General Public License version 2 or later; see LICENSE.txt
 */

\defined('_JEXEC') or die;

use Joomla\CMS\Plugin\PluginHelper;

class WFPopupsExtension_Jcemediabox
{
    /**
     * Constructor activating the default information of the class.
     */
    public function __construct()
    {
        if (self::isEnabled()) {
            $scripts = array();

            $document = WFDocument::getInstance();

            $document->addScript('jcemediabox', 'extensions/popups/jcemediabox/js');
            $document->addStyleSheet('jcemediabox', 'extensions/popups/jcemediabox/css');
        }
    }

    public function getParams()
    {
        $wf = WFEditorPlugin::getInstance();

        return array(
            'width' => 600,
            'album' => '#jcemediabox_popup_group',
            'multiple' => '#jcemediabox_popup_title,#jcemediabox_popup_caption',
            'attribute' => $wf->getParam('popups.jcemediabox.attribute', 'data-mediabox'),
            'popup_group' => $wf->getParam('popups.jcemediabox.popup_group', ''),
            'popup_icon' => $wf->getParam('popups.jcemediabox.popup_icon', 1),
            'popup_icon_position' => $wf->getParam('popups.jcemediabox.popup_icon_position', ''),
            'popup_autopopup' => $wf->getParam('popups.jcemediabox.popup_autopopup', ''),
            'popup_hide' => $wf->getParam('popups.jcemediabox.popup_hide', 0),
            'popup_mediatype' => $wf->getParam('popups.jcemediabox.popup_mediatype', ''),
        );
    }

    public function isEnabled()
    {
        $wf = WFEditorPlugin::getInstance();

        if ((PluginHelper::isEnabled('system', 'jcemediabox') || PluginHelper::isEnabled('system', 'wf_lightcase')) && $wf->getParam('popups.jcemediabox.enable', 1) == 1) {
            return true;
        }

        return false;
    }

    public function checkVersion()
    {
        return true;
    }
}
extensions/popups/jcemediabox/css/jcemediabox.css000060400000000076152455721620016327 0ustar00#jcemediabox_popup_height,#jcemediabox_popup_width{width:65px}extensions/popups/jcemediabox/css/index.html000060400000000054152455721620015334 0ustar00<html><body bgcolor="#FFFFFF"></body></html>extensions/popups/jcemediabox/js/index.html000060400000000054152455721620015160 0ustar00<html><body bgcolor="#FFFFFF"></body></html>extensions/popups/jcemediabox/js/jcemediabox.js000060400000024312152455721620015776 0ustar00/* jce - 2.9.99.2 | 2026-04-22 | https://www.joomlacontenteditor.net | Source: https://github.com/widgetfactory/jce | Copyright (C) 2006 - 2026 Ryan Demmer. All rights reserved | GNU/GPL Version 2 or later - http://www.gnu.org/licenses/gpl-2.0.html */
var JCEMediaBox = {
    Popup: {
        addons: {},
        setAddons: function(n, o) {
            void 0 === this.addons[n] && (this.addons[n] = {}), $.extend(this.addons[n], o);
        },
        getAddons: function(n) {
            return n ? this.addons[n] : this.addons;
        },
        getAddon: function(v, n) {
            var r, cp = !1, n = this.getAddons(n);
            return $.each(n, function(addon, o) {
                o = o[addon] || function() {};
                void 0 !== (r = o.call(this, v)) && (cp = r);
            }), cp;
        }
    },
    trim: function(s) {
        return $.trim(s);
    }
};

WFPopups.addPopup("jcemediabox", {
    params: {
        popup_group: "",
        popup_icon: 1,
        popup_icon_position: "",
        popup_autopopup: "",
        popup_hide: 0,
        popup_mediatype: ""
    },
    setup: function() {
        var self = this;
        $("#jcemediabox_popup_icon").on("change", function() {
            self.setIcon();
        }), $.each(this.params, function(k, v) {
            "popup_icon_position" === k && (v = v.replace("icon-", "zoom-")), $("#jcemediabox_" + k).val(v);
        });
    },
    check: function(n) {
        return /(jce(popup|_popup|lightbox)|wfpopup)/.test(n.className) || n.getAttribute("data-mediabox");
    },
    getMediaType: function(n) {
        var mt, o;
        switch (n.type) {
          case "image/gif":
          case "image/jpeg":
          case "image/png":
          case "image/*":
          case "image":
            mt = "image";
            break;

          case "iframe":
            mt = "iframe";
            break;

          case "director":
          case "application/x-director":
            mt = "application/x-director";
            break;

          case "windowsmedia":
          case "mplayer":
          case "application/x-mplayer2":
            mt = "application/x-mplayer2";
            break;

          case "quicktime":
          case "video/quicktime":
            mt = "video/quicktime";
            break;

          case "real":
          case "realaudio":
          case "audio/x-pn-realaudio-plugin":
            mt = "audio/x-pn-realaudio-plugin";
            break;

          case "divx":
          case "video/divx":
            mt = "video/divx";
            break;

          case "flash":
          case "application/x-shockwave-flash":
            mt = "application/x-shockwave-flash";
            break;

          case "ajax":
          case "text/xml":
          case "text/html":
            mt = "text/html";
        }
        return (mt = !mt && n.href && (JCEMediaBox.options = {
            popup: {
                google_viewer: 0,
                pdfjs: 0
            }
        }, o = JCEMediaBox.Popup.getAddon(n.href)) && o.type ? o.type : mt) || n.type || "";
    },
    getImageType: function(s) {
        s = /\.(jp(eg|g)|png|bmp|gif|tiff)$/.exec(s);
        return s ? ("jpg" === s[1] && (s[1] = "jpeg"), "image/" + s[1]) : "image/jpeg";
    },
    remove: function(n) {
        var ed = tinyMCEPopup.editor;
        $.each([ "jcepopup", "jcelightbox", "jcebox", "icon-left", "icon-right", "icon-top-left", "icon-top-right", "icon-bottom-left", "icon-bottom-right", "zoom-left", "zoom-right", "zoom-top-left", "zoom-top-right", "zoom-bottom-left", "zoom-bottom-right", "noicon", "noshow", "autopopup-single", "autopopup-multiple" ], function(i, v) {
            ed.dom.removeClass(n, v);
        }), ed.dom.setAttrib(n, "data-mediabox", null), ed.dom.setAttrib(n, "data-mediabox-title", null), 
        ed.dom.setAttrib(n, "data-mediabox-caption", null), ed.dom.setAttrib(n, "data-mediabox-group", null);
    },
    convertData: function(s) {
        var data;
        return /^{[\w\W]+}$/.test(s) ? $.parseJSON(function(s) {
            return s.replace(/:"([^"]+)"/, function(a, b) {
                return ':"' + b.replace(/^\s+|\s+$/, "").replace(/\s*::\s*/, "::") + '"';
            });
        }(s)) : /\w+\[[^\]]+\]/.test(s) ? (data = {}, tinymce.each(tinymce.explode(s, ";"), function(p) {
            p = p.match(/([\w-]+)\[(.*)\]$/);
            p && 3 === p.length && (data[p[1]] = p[2]);
        }), data) : {};
    },
    getAttributes: function(n, index, callback) {
        var v, ed = tinyMCEPopup.editor, data = {}, rel = ed.dom.getAttrib(n, "rel"), icon = /noicon/g.test(n.className), hide = /noshow/g.test(n.className), hide = (/(autopopup(.?|-single|-multiple))/.test(n.className) && (v = /autopopup-multiple/.test(n.className) ? "autopopup-multiple" : "autopopup-single", 
        $("#jcemediabox_popup_autopopup").val(v)), $("#jcemediabox_popup_icon").val(icon ? 0 : 1), 
        $("#jcemediabox_popup_icon_position").prop("disabled", icon), $("#jcemediabox_popup_hide").val(hide ? 1 : 0), 
        (icon = /(zoom|icon)-(top-right|top-left|bottom-right|bottom-left|left|right)/.exec(n.className)) && (v = icon[0]) && (v = v.replace("icon-", "zoom-"), 
        $("#jcemediabox_popup_icon_position").val(v)), /(^|\\s+)alternate|stylesheet|start|next|prev|contents|index|glossary|copyright|chapter|section|subsection|appendix|help|bookmark|nofollow|noopener|noreferrer|licence|tag|friend(\\s+|$)/gi), icon = ed.dom.getAttrib(n, "data-json") || ed.dom.getAttrib(n, "data-mediabox"), x = (icon && (data = this.convertData(icon)), 
        rel && /\w+\[.*\]/.test(rel) ? (v = "", (icon = hide.exec(rel)) && (v = icon[1], 
        rel = rel.replace(hide, "")), /^\w+\[/.test(rel) && ((data = this.convertData($.trim(rel)) || {}).rel = v)) : (icon = $.trim(rel.replace(hide, "")), 
        $("#jcemediabox_popup_group").val(icon)), $.isEmptyObject(data) && $.each(ed.dom.getAttribs(n), function(i, at) {
            var k, at = at.name || at.nodeName;
            at && -1 !== at.indexOf("data-mediabox-") && (k = at.substr(14), data[k] = ed.dom.getAttrib(n, at));
        }), data.title && /::/.test(data.title) && (1 < (v = data.title.split("::")).length && (data.caption = v[1]), 
        data.title = v[0]), $.each(data, function(k, v) {
            if ($("#jcemediabox_popup_" + k).get(0) && "" !== v) {
                if ("title" == k || "caption" == k || "group" == k) try {
                    v = decodeURIComponent(v);
                } catch (e) {}
                v = tinymce.DOM.decode(v), $("#jcemediabox_popup_" + k).val(v).trigger("change"), 
                "title" != k && "caption" != k || $('input[name^="jcemediabox_popup_' + k + '"]').eq(index).val(v), 
                delete data[k];
            }
        }), $.each([ "href", "type", "data-mediabox-width", "data-mediabox-height" ], function(i, name) {
            var val = ed.dom.getAttrib(n, name);
            val && (0 === (name = "href" === name ? "src" : name).indexOf("data-mediabox-") && (name = name.substr(14)), 
            data[name] = val);
        }), data = callback(data), 0);
        return $.each(data, function(k, v) {
            if ("src" == k || "width" == k || "height" == k) return !0;
            if ("" !== v) {
                try {
                    v = decodeURIComponent(v);
                } catch (e) {}
                var n = $(".uk-repeatable", "#jcemediabox_popup_params").eq(0), n = (0 < x && $(n).clone(!0).appendTo($(n).parent()), 
                $(".uk-repeatable", "#jcemediabox_popup_params").eq(x).find("input, select"));
                $(n).eq(0).val(k), $(n).eq(1).val(v);
            }
            x++;
        }), $("#jcemediabox_popup_mediatype").val(this.getMediaType(n)), data;
    },
    setAttributes: function(n, args, index) {
        var ed = tinyMCEPopup.editor, auto = (index = index || 0, this.remove(n), 
        index = index || 0, ed.dom.addClass(n, "jcepopup"), ed.dom.setAttrib(n, "data-mediabox", 1), 
        $("#jcemediabox_popup_autopopup").val()), data = (auto && ed.dom.addClass(n, auto), 
        args.data || {}), auto = (args.title && (ed.dom.setAttrib(n, "title", args.title), 
        delete args.title), $.each([ "group", "width", "height", "title", "caption" ], function(i, k) {
            var mv, v = $("#jcemediabox_popup_" + k).val() || args[k] || "";
            "title" != k && "caption" != k || void 0 !== (mv = $('input[name^="jcemediabox_popup_' + k + '"]').eq(index).val()) && (v = mv), 
            data[k] = v;
        }), $(".uk-repeatable", "#jcemediabox_popup_params").each(function() {
            var k = $('input[name^="jcemediabox_popup_params_name"]', this).val(), v = $('input[name^="jcemediabox_popup_params_value"]', this).val();
            "" !== k && "" !== v && (data[k] = v);
        }), $("#jcemediabox_popup_mediatype").val() || n.type || args.type || "");
        "image" == auto && (auto = this.getImageType(n.href)), ed.dom.setAttrib(n, "type", auto), 
        data.type && delete data.type;
        auto = (auto = ed.dom.getAttrib(n, "rel", "")) && auto.replace(/([a-z0-9]+)(\[([^\]]+)\]);?/gi, "");
        $(".uk-repeatable", "#jcemediabox_popup_params").each(function() {
            var elements = $("input, select", this), key = $(elements).eq(0).val(), elements = $(elements).eq(1).val();
            data[key] = elements;
        });
        for (var attrs = n.attributes, i = attrs.length - 1; 0 <= i; i--) {
            var attrName = attrs[i].name;
            attrName && -1 !== attrName.indexOf("data-mediabox-") && n.removeAttribute(attrName);
        }
        $.each(data, function(k, v) {
            if ("src" == k) return !0;
            ed.dom.setAttrib(n, "data-mediabox-" + k, v);
        }), ed.dom.setAttrib(n, "rel", $.trim(auto)), 0 == $("#jcemediabox_popup_icon").val() ? ed.dom.addClass(n, "noicon") : ed.dom.addClass(n, $("#jcemediabox_popup_icon_position").val()), 
        1 == $("#jcemediabox_popup_hide").val() && ed.dom.addClass(n, "noshow");
    },
    setIcon: function() {
        var v = $("#jcemediabox_popup_icon").val();
        parseInt(v, 10) ? $("#jcemediabox_popup_icon_position").prop("disabled", !1).removeAttr("disabled") : $("#jcemediabox_popup_icon_position").attr("disabled", "disabled");
    },
    onSelect: function() {},
    onSelectFile: function(args) {
        $.each(args, function(k, v) {
            $("#jcemediabox_popup_" + k).val(v);
        });
    }
});extensions/popups/jcemediabox/tmpl/default.php000060400000023503152455721620015664 0ustar00<?php
/**
 * @package     JCE
 * @subpackage  Editor
 *
 * @copyright   Copyright (C) 2005 - 2020 Open Source Matters, Inc. All rights reserved.
 * @copyright   Copyright (c) 2009-2024 Ryan Demmer. All rights reserved
 * @license     GNU General Public License version 2 or later; see LICENSE.txt
 */

\defined('_JEXEC') or die;

use Joomla\CMS\Language\Text;

?>
    <div class="uk-form-row uk-grid uk-grid-small">
        <label for="jcemediabox_popup_title" class="uk-form-label uk-width-1-5 hastip" title="<?php echo Text::_('WF_POPUPS_JCEMEDIABOX_OPTION_TITLE_DESC'); ?>"><?php echo Text::_('WF_POPUPS_JCEMEDIABOX_OPTION_TITLE'); ?></label>
        <div class="uk-form-controls uk-width-4-5">
          <input id="jcemediabox_popup_title" class="uk-input-multiple" type="text" class="text" value="" />
        </div>
    </div>

    <div class="uk-form-row uk-grid uk-grid-small">
        <label for="jcemediabox_popup_caption" class="uk-form-label uk-width-1-5 hastip" title="<?php echo Text::_('WF_POPUPS_JCEMEDIABOX_CAPTION_DESC'); ?>"><?php echo Text::_('WF_POPUPS_JCEMEDIABOX_CAPTION'); ?></label>
        <div class="uk-form-controls uk-width-4-5">
          <input id="jcemediabox_popup_caption" class="uk-input-multiple" type="text" class="text" value="" />
        </div>
    </div>

    <div class="uk-form-row uk-grid uk-grid-small">
        <label for="jcemediabox_popup_group" class="uk-form-label uk-width-1-5 hastip" title="<?php echo Text::_('WF_POPUPS_JCEMEDIABOX_GROUP_DESC'); ?>"><?php echo Text::_('WF_POPUPS_JCEMEDIABOX_GROUP'); ?></label>
        <div class="uk-form-controls uk-width-4-5">
          <input id="jcemediabox_popup_group" type="text" class="text" value="" />
        </div>
    </div>

    <div class="uk-form-row uk-grid uk-grid-small">
            <label class="hastip uk-form-label uk-width-1-5" title="<?php echo Text::_('WF_LABEL_DIMENSIONS_DESC'); ?>">
                <?php echo Text::_('WF_LABEL_DIMENSIONS'); ?>
            </label>
            <div class="uk-form-controls uk-grid uk-grid-collapse uk-width-4-5 uk-form-constrain">

                <div class="uk-form-controls">
                    <input type="text" id="jcemediabox_popup_width" value="" class="uk-text-center" />
                </div>

                <div class="uk-form-controls">
                    <strong class="uk-form-label uk-text-center uk-vertical-align-middle">&times;</strong>
                </div>

                <div class="uk-form-controls">
                    <input type="text" id="jcemediabox_popup_height" value="" class="uk-text-center" />
                </div>

                <label class="uk-form-label">
                    <input class="uk-constrain-checkbox" type="checkbox" checked />
                    <?php echo Text::_('WF_LABEL_PROPORTIONAL'); ?>
                </label>
            </div>
        </div>

    <div class="uk-form-row uk-grid uk-grid-small">
        <label for="jcemediabox_popup_icon" class="uk-form-label uk-width-1-5 hastip" title="<?php echo Text::_('WF_POPUPS_JCEMEDIABOX_ICON_DESC'); ?>"><?php echo Text::_('WF_POPUPS_JCEMEDIABOX_ICON'); ?></label>
        <div class="uk-form-controls uk-width-4-5">
            <div class="uk-width-1-5">
              <select id="jcemediabox_popup_icon">
                  <option value="0"><?php echo Text::_('JNO'); ?></option>
                  <option value="1" selected="selected"><?php echo Text::_('JYES'); ?></option>
              </select>
            </div>
            <div class="uk-width-3-5 uk-margin-left">
              <label for="jcemediabox_popup_icon_position" class="uk-form-label uk-width-2-5 hastip" title="<?php echo Text::_('WF_POPUPS_JCEMEDIABOX_ICON_POSITION_DESC'); ?>"><?php echo Text::_('WF_POPUPS_JCEMEDIABOX_ICON_POSITION'); ?></label>
              <div class="uk-form-controls uk-width-3-5">
                <select id="jcemediabox_popup_icon_position">
                    <option value=""><?php echo Text::_('WF_OPTION_NOT_SET'); ?></option>
                    <option value="zoom-left"><?php echo Text::_('WF_OPTION_LEFT'); ?></option>
                    <option value="zoom-right"><?php echo Text::_('WF_OPTION_RIGHT'); ?></option>
                    <option value="zoom-top-left"><?php echo Text::_('WF_OPTION_TOP_LEFT'); ?></option>
                    <option value="zoom-top-right"><?php echo Text::_('WF_OPTION_TOP_RIGHT'); ?></option>
                    <option value="zoom-bottom-left"><?php echo Text::_('WF_OPTION_BOTTOM_LEFT'); ?></option>
                    <option value="zoom-bottom-right"><?php echo Text::_('WF_OPTION_BOTTOM_RIGHT'); ?></option>
                </select>
              </div>
            </div>
        </div>
    </div>

    <div class="uk-form-row uk-grid uk-grid-small">
        <label for="jcemediabox_popup_hide" class="uk-form-label uk-width-1-5 hastip" title="<?php echo Text::_('WF_POPUPS_JCEMEDIABOX_HIDE_DESC'); ?>"><?php echo Text::_('WF_POPUPS_JCEMEDIABOX_HIDE'); ?></label>
        <div class="uk-form-controls uk-width-4-5">
            <div class="uk-width-1-5">
                <select id="jcemediabox_popup_hide">
                      <option value="0"><?php echo Text::_('JNO'); ?></option>
                      <option value="1"><?php echo Text::_('JYES'); ?></option>
                </select>
            </div>
            <div class="uk-width-3-5 uk-margin-left">
                <label for="jcemediabox_popup_autopopup" class="uk-form-label uk-width-2-5 hastip" title="<?php echo Text::_('WF_POPUPS_JCEMEDIABOX_AUTO_DESC'); ?>"><?php echo Text::_('WF_POPUPS_JCEMEDIABOX_AUTO'); ?></label>
                <div class="uk-form-controls uk-width-3-5">
                    <select id="jcemediabox_popup_autopopup">
                        <option value=""><?php echo Text::_('WF_OPTION_NOT_SET'); ?></option>
                        <option value="autopopup-single"><?php echo Text::_('WF_POPUPS_JCEMEDIABOX_AUTO_SINGLE'); ?></option>
                        <option value="autopopup-multiple"><?php echo Text::_('WF_POPUPS_JCEMEDIABOX_AUTO_MULTIPLE'); ?></option>
                    </select>
                </div>
            </div>
        </div>
    </div>

    <div class="uk-form-row uk-grid uk-grid-small">
        <label for="jcemediabox_popup_mediatype" class="uk-form-label uk-width-1-5 hastip" title="<?php echo Text::_('WF_POPUPS_JCEMEDIABOX_MEDIATYPE_DESC'); ?>"><?php echo Text::_('WF_POPUPS_JCEMEDIABOX_MEDIATYPE'); ?></label>
        <div class="uk-form-controls uk-width-2-5">
          <select id="jcemediabox_popup_mediatype">
                <option value=""><?php echo Text::_('WF_OPTION_NOT_SET'); ?></option>
                <option value="text/html"><?php echo Text::_('WF_POPUPS_JCEMEDIABOX_INTERNAL'); ?></option>
                <option value="iframe"><?php echo Text::_('WF_POPUPS_JCEMEDIABOX_EXTERNAL'); ?></option>
                <option value="image"><?php echo Text::_('WF_POPUPS_JCEMEDIABOX_IMAGE'); ?></option>
                <option value="video/youtube"><?php echo Text::_('WF_POPUPS_JCEMEDIABOX_YOUTUBE'); ?></option>
                <option value="video/vimeo"><?php echo Text::_('WF_POPUPS_JCEMEDIABOX_VIMEO'); ?></option>
                <option value="application/x-shockwave-flash"><?php echo Text::_('WF_POPUPS_JCEMEDIABOX_FLASH'); ?></option>
                <option value="video/quicktime"><?php echo Text::_('WF_POPUPS_JCEMEDIABOX_QUICKTIME'); ?></option>
                <option value="application/x-mplayer2"><?php echo Text::_('WF_POPUPS_JCEMEDIABOX_WINDOWSMEDIA'); ?></option>
                <option value="video/divx"><?php echo Text::_('WF_POPUPS_JCEMEDIABOX_DIVX'); ?></option>
                <option value="application/x-director"><?php echo Text::_('WF_POPUPS_JCEMEDIABOX_DIRECTOR'); ?></option>
                <option value="audio/x-pn-realaudio-plugin"><?php echo Text::_('WF_POPUPS_JCEMEDIABOX_REAL'); ?></option>
                <option value="video/mp4"><?php echo Text::_('WF_POPUPS_JCEMEDIABOX_VIDEO_MP4'); ?></option>
                <option value="audio/mp3"><?php echo Text::_('WF_POPUPS_JCEMEDIABOX_AUDIO_MP3'); ?></option>
                <option value="video/webm"><?php echo Text::_('WF_POPUPS_JCEMEDIABOX_VIDEO_WEBM'); ?></option>
                <option value="audio/webm"><?php echo Text::_('WF_POPUPS_JCEMEDIABOX_AUDIO_WEBM'); ?></option>
            </select>
        </div>
    </div>
    <div class="uk-form-row uk-grid uk-grid-small">
        <label for="jcemediabox_popup_params" class="uk-form-label uk-width-1-5 hastip" title="<?php echo Text::_('WF_POPUPS_JCEMEDIABOX_PARAMS_DESC'); ?>"><?php echo Text::_('WF_POPUPS_JCEMEDIABOX_PARAMS'); ?></label>
        <div class="uk-width-4-5" id="jcemediabox_popup_params">
          <div class="uk-form-row uk-repeatable">
                  <div class="uk-form-controls uk-grid uk-grid-small uk-width-9-10">
                      <label class="uk-form-label uk-width-1-6"><?php echo Text::_('WF_LABEL_NAME'); ?></label>
                      <div class="uk-form-controls uk-width-1-3">
                        <input type="text" name="jcemediabox_popup_params_name[]" />
                      </div>
                      <label class="uk-form-label uk-width-1-6"><?php echo Text::_('WF_LABEL_VALUE'); ?></label>
                      <div class="uk-form-controls uk-width-1-3">
                        <input type="text" name="jcemediabox_popup_params_value[]" />
                      </div>
                  </div>
                  <div class="uk-form-controls uk-margin-small-left">
                    <button class="uk-button uk-button-link uk-repeatable-create" aria-label="<?php echo Text::_('WF_LABEL_ADD'); ?>" title="<?php echo Text::_('WF_LABEL_ADD'); ?>"><i class="uk-icon-plus"></i></button>
                    <button class="uk-button uk-button-link uk-repeatable-delete" aria-label="<?php echo Text::_('WF_LABEL_REMOVE'); ?>" title="<?php echo Text::_('WF_LABEL_REMOVE'); ?>"><i class="uk-icon-trash"></i></button>
                  </div>
          </div>
        </div>
    </div>
extensions/popups/jcemediabox/tmpl/index.html000060400000000054152455721620015520 0ustar00<html><body bgcolor="#FFFFFF"></body></html>extensions/popups/jcemediabox/index.html000060400000000054152455721620014544 0ustar00<html><body bgcolor="#FFFFFF"></body></html>extensions/popups/widgetkit2/js/index.html000060400000000054152455721620014763 0ustar00<html><body bgcolor="#FFFFFF"></body></html>extensions/popups/widgetkit2/js/widgetkit.js000060400000005323152455721620015323 0ustar00/* JCE Editor - 2.5.16 | 08 April 2016 | http://www.joomlacontenteditor.net | Copyright (C) 2006 - 2016 Ryan Demmer. All rights reserved | GNU/GPL Version 2 or later - http://www.gnu.org/licenses/gpl-2.0.html */
(function(){WFPopups.addPopup('widgetkit2',{params:{lightbox_keyboard:'',lightbox_duration:'',lightbox_group:''},setup:function(){$.each(this.params,function(k,v){$('#widgetkit_'+k).val(v);});},check:function(n){return n.getAttribute('data-lightbox')||n.getAttribute('data-uk-lightbox');},remove:function(n){tinyMCEPopup.editor.dom.setAttribs(n,{'data-lightbox':null,'data-uk-lightbox':null,'data-lightbox-type':null});},str2json:function(str,notevil){try{if(notevil){return JSON.parse(str.replace(/([\$\w]+)\s*:/g,function(_,$1){return'"'+$1+'":';}).replace(/'([^']+)'/g,function(_,$1){return'"'+$1+'"';}));}else{return(new Function("","var json = "+str+"; return JSON.parse(JSON.stringify(json));"))();}}catch(e){return false;}},convertData:function(s){if(s.indexOf('{')===0){var start=(s?s.indexOf("{"):-1),options={};if(start!=-1){try{options=this.str2json(string.substr(start));}catch(e){}}
return options;}else{var a=[];$.each(s.split(';'),function(i,n){if(n){n=n.replace(/([\w]+):(.*)/,'"$1":"$2"');a.push(n);}});return $.parseJSON('{'+a.join(',')+'}');}},getAttributes:function(n){var ed=tinyMCEPopup.editor,args={};var data=ed.dom.getAttrib(n,'data-lightbox')||ed.dom.getAttrib(n,'data-uk-lightbox');if(data&&data!=="on"){data=this.convertData(data);$.each(data,function(k,v){$('#widgetkit_lightbox_'+k).val(v);});}
$('#widgetkit_lightbox_title').val(ed.dom.getAttrib(n,'title'));var map=WFPopups.config.map||{'href':'src'};$.each(map,function(from,to){var href=ed.dom.getAttrib(n,from);href=href.replace(/(\?|&)tmpl=component/i,'');$('#'+to).val(href);args.src=href;});return args;},setAttributes:function(n,args){var self=this,ed=tinyMCEPopup.editor,data=[];this.remove(n);tinymce.each(['group','keyboard','duration'],function(k){var v=$('#widgetkit_lightbox_'+k).val();if(v==''||v==null){if(args[k]){v=args[k];}else{return;}}
data.push(k+':'+v);});if(args.data){$.each(args.data,function(k,v){data.push(k+':'+v);});}
var src=ed.dom.getAttrib(n,'href');if(/index\.php/.test(src)&&/:\/\//.test(src)===false){if(/\?/.test(src)){src+='&tmpl=component';}else{src+='?tmpl=component';}
ed.dom.setAttrib(n,'href',src);}
var value="on";if(data.length){value=$.map(data,function(s){var v=s.split(':');return"{"+v[0]+":'"+v[1]+"'}";}).join(',');}
var type=$('#widgetkit_lightbox_type').val();if(type){ed.dom.setAttrib(n,'data-lightbox-type',type);}
ed.dom.setAttrib(n,'data-uk-lightbox',value);ed.dom.setAttrib(n,'title',$('#widgetkit_lightbox_title').val());ed.dom.setAttrib(n,'target','_blank');},onSelect:function(){},onSelectFile:function(args){}});})();extensions/popups/widgetkit2/css/widgetkit.css000060400000000575152455721620015657 0ustar00/*JCE Editor - 2.5.16 | 08 April 2016 | http://www.joomlacontenteditor.net | Copyright (C) 2006 - 2016 Ryan Demmer. All rights reserved | GNU/GPL Version 2 or later - http://www.gnu.org/licenses/gpl-2.0.html*/
#popup_extension_widgetkit input[type="text"]{width:250px;}#popup_extension_widgetkit #widgetkit_lightbox_title{width:350px;}#popup_extension_widgetkit select{width:auto;}extensions/popups/widgetkit2/css/index.html000060400000000054152455721620015137 0ustar00<html><body bgcolor="#FFFFFF"></body></html>extensions/popups/widgetkit2/index.html000060400000000054152455721620014347 0ustar00<html><body bgcolor="#FFFFFF"></body></html>extensions/popups/widgetkit2/tmpl/index.html000060400000000054152455721620015323 0ustar00<html><body bgcolor="#FFFFFF"></body></html>extensions/popups/widgetkit2/tmpl/default.php000060400000004133152455721620015465 0ustar00<?php
/**
 * @package   	JCE
 * @copyright 	Copyright (c) 2009-2016 Ryan Demmer. All rights reserved.
 * @license   	GNU/GPL 2 or later - http://www.gnu.org/licenses/old-licenses/gpl-2.0.html
 * JCE is free software. This version may have been modified pursuant
 * to the GNU General Public License, and as distributed it includes or
 * is derivative of works licensed under the GNU General Public License or
 * other free or open source software licenses.
 */
defined('_WF_EXT') or die('RESTRICTED');
?>
<table border="0" cellpadding="3" cellspacing="0">
    <tr>
        <td><label for="widgetkit_lightbox_title" class="hastip" title="<?php echo WFText::_('WF_POPUPS_WIDGETKIT_BOXTITLE_DESC'); ?>"><?php echo WFText::_('WF_POPUPS_WIDGETKIT_BOXTITLE'); ?></label></td>
        <td colspan="3"><input id="widgetkit_lightbox_title" type="text" class="text" value="" /></td>
    </tr>
    <tr>
        <td><label for="widgetkit_lightbox_group" class="hastip" title="<?php echo WFText::_('WF_POPUPS_WIDGETKIT_GROUP_DESC'); ?>"><?php echo WFText::_('WF_POPUPS_WIDGETKIT_GROUP'); ?></label></td>
        <td colspan="3"><input id="widgetkit_lightbox_group" type="text" class="text" value="" /></td>
    </tr>
    <tr>
        <td><label for="widgetkit_lightbox_type" class="hastip" title="<?php echo WFText::_('WF_POPUPS_WIDGETKIT_TYPE_DESC'); ?>"><?php echo WFText::_('WF_POPUPS_WIDGETKIT_TYPE'); ?></label></td>
        <td>
            <select id="widgetkit_lightbox_type">
                <option value=""><?php echo WFText::_('WF_POPUPS_WIDGETKIT_DETECT'); ?></option>
                <option value="image"><?php echo WFText::_('WF_POPUPS_WIDGETKIT_IMAGE'); ?></option>
                <option value="video"><?php echo WFText::_('WF_POPUPS_WIDGETKIT_VIDEO'); ?></option>
                <option value="youtube"><?php echo WFText::_('WF_POPUPS_WIDGETKIT_YOUTUBE'); ?></option>
                <option value="vimeo"><?php echo WFText::_('WF_POPUPS_WIDGETKIT_VIMEO'); ?></option>
                <!--option value="iframe"><?php echo WFText::_('WF_POPUPS_WIDGETKIT_IFRAME'); ?></option-->
            </select>
        </td>
    </tr>
</table>extensions/aggregator/audio.php000060400000004200152455721620012700 0ustar00<?php
/**
 * @package     JCE
 * @subpackage  Editor
 *
 * @copyright   Copyright (C) 2005 - 2020 Open Source Matters, Inc. All rights reserved.
 * @copyright   Copyright (c) 2009-2024 Ryan Demmer. All rights reserved
 * @license     GNU General Public License version 2 or later; see LICENSE.txt
 */

\defined('_JEXEC') or die;

class WFAggregatorExtension_Audio extends WFAggregatorExtension
{
    /**
     * Constructor activating the default information of the class.
     */
    public function __construct()
    {
        parent::__construct(array(
            'format' => 'video',
        ));
    }

    public function display()
    {
        $document = WFDocument::getInstance();
        $document->addScript('audio', 'extensions/aggregator/audio/js');
    }

    public function isEnabled()
    {
        return true;
    }

    public function getParams()
    {
        $plugin = WFEditorPlugin::getInstance();

        $defaults = array(
            'controls' => (int) $plugin->getParam('aggregator.audio.controls', 1),
            'loop' => (int) $plugin->getParam('aggregator.audio.loop', 0),
            'autoplay' => (int) $plugin->getParam('aggregator.audio.autoplay', 0),
            'muted' => (int) $plugin->getParam('aggregator.audio.mute', 0),
        );

        $attributes = $plugin->getParam('aggregator.audio.attributes', '');

        if ($attributes) {            
            $defaults['attributes'] = $this->getCustomDefaultAttributes($attributes);
        }

        return $defaults;
    }

    public function getEmbedData($data, $url)
    {
        $params = $this->getParams();

        $default = array(
            'controls' => 1,
            'loop' => 0,
            'autoplay' => 0,
            'muted' => 0,
        );

        foreach ($params as $name => $value) {
            if ($default[$name] === $value) {
                continue;
            }

            if ($name == 'attributes') {
                $data[$name] = $value;
                continue;
            }

            if ($value !== '') {
                $data[$name] = $value;
            }
        }

        $data['src'] = $url;

        return $data;
    }
}
extensions/aggregator/audio.xml000060400000003376152455721620012726 0ustar00<?xml version="1.0" ?>
<extension version="3.4" type="plugin" group="jce" method="upgrade">
	<name>WF_AGGREGATOR_AUDIO_TITLE</name>
	<version>2.9.99.2</version>
	<creationDate>22-04-2026</creationDate>
	<author>Ryan Demmer</author>
	<authorEmail>info@joomlacontenteditor.net</authorEmail>
	<authorUrl>https://www.joomlacontenteditor.net/</authorUrl>
	<copyright>Copyright (C) 2006 - 2026 Ryan Demmer. All rights reserved</copyright>
	<license>GNU/GPL Version 2 or later - http://www.gnu.org/licenses/gpl-2.0.html</license>
	<description>WF_AGGREGATOR_AUDIO_DESC</description>
	<files>
		<filename>audio.php</filename>
		<folder>audio</folder>
	</files>
	<fields name="audio">
		<fieldset name="aggregator.audio">
			<field name="controls" type="yesno" default="1"  label="WF_AGGREGATOR_AUDIO_CONTROLS" description="WF_AGGREGATOR_AUDIO_CONTROLS_DESC">
				<option value="1">JYES</option>
				<option value="0">JNO</option>
			</field>

			<field name="loop" type="yesno" default="0"  label="WF_AGGREGATOR_AUDIO_LOOP" description="WF_AGGREGATOR_AUDIO_LOOP_DESC">
				<option value="1">JYES</option>
				<option value="0">JNO</option>
			</field>

			<field name="autoplay" type="yesno" default="0"  label="WF_AGGREGATOR_AUDIO_AUTOPLAY" description="WF_AGGREGATOR_AUDIO_AUTOPLAY_DESC">
				<option value="1">JYES</option>
				<option value="0">JNO</option>
			</field>

			<field name="mute" type="yesno" default="0"  label="WF_AGGREGATOR_AUDIO_MUTE" description="WF_AGGREGATOR_AUDIO_MUTE_DESC">
				<option value="1">JYES</option>
				<option value="0">JNO</option>
			</field>

			<field name="attributes" type="keyvalue" default="" label="WF_PARAM_CUSTOM_ATTRIBUTES" description="WF_PARAM_CUSTOM_ATTRIBUTES_DESC" boolean="true" />
		</fieldset>
	</fields>
	<plugins></plugins>
</extension>
extensions/aggregator/index.html000060400000000054152455721620013066 0ustar00<html><body bgcolor="#FFFFFF"></body></html>extensions/aggregator/youtube/index.html000060400000000054152455721620014562 0ustar00<html><body bgcolor="#FFFFFF"></body></html>extensions/aggregator/youtube/js/index.html000060400000000054152455721620015176 0ustar00<html><body bgcolor="#FFFFFF"></body></html>extensions/aggregator/youtube/js/youtube.js000060400000016544152455721620015246 0ustar00/* jce - 2.9.99.2 | 2026-04-22 | https://www.joomlacontenteditor.net | Source: https://github.com/widgetfactory/jce | Copyright (C) 2006 - 2026 Ryan Demmer. All rights reserved | GNU/GPL Version 2 or later - http://www.gnu.org/licenses/gpl-2.0.html */
WFAggregator.add("youtube", {
    params: {
        width: 560,
        height: 315,
        embed: !0
    },
    props: {
        rel: 1,
        autoplay: 0,
        mute: 0,
        controls: 1,
        modestbranding: 0,
        enablejsapi: 0,
        loop: 0,
        playlist: "",
        start: "",
        end: "",
        privacy: 0
    },
    setup: function() {
        $.each(this.params, function(k, v) {
            var x;
            if ("attributes" == k) return x = 0, $.each(v, function(key, value) {
                var $repeatable = $(".uk-repeatable", "#youtube_attributes"), $repeatable = (0 < x && ($repeatable.eq(0).clone(!0).appendTo($repeatable.parent()), 
                $repeatable = $(".uk-repeatable", "#youtube_attributes")), $repeatable.eq(x).find("input, select"));
                $repeatable.eq(0).val(key), $repeatable.eq(1).val(value), x++;
            }), !0;
            $("#youtube_" + k).val(v).filter(":checkbox, :radio").prop("checked", !!v);
        }), $("#youtube_autoplay").on("change", function() {
            this.checked && $("#youtube_mute").prop("checked", !0);
        }).trigger("change");
    },
    getTitle: function() {
        return this.title || this.name;
    },
    getType: function() {
        return $("#youtube_embed:visible").is(":checked") ? "flash" : "iframe";
    },
    isSupported: function(v) {
        return !!v && !!/youtu(\.)?be(.+)?\/(.+)/.test(v) && "youtube";
    },
    getValues: function(data) {
        var id, self = this, args = {}, type = this.getType(), src = data.src, u = this.parseURL(src), u = ($.extend(args, u.query), 
        src = src.replace(/^(http:)?\/\//, "https://"), $(":input", "#youtube_options").not("#youtube_embed, #youtube_https, #youtube_privacy").each(function() {
            var k = $(this).attr("id"), v = $(this).val();
            if (!k) return !0;
            k = k.substr(k.indexOf("_") + 1), $(this).is(":checkbox") && (v = $(this).is(":checked") ? 1 : 0), 
            self.props[k] != v && "" !== v && (args[k] = v);
        }), 1 == args.autoplay && (args.mute = 1), src = src.replace(/youtu(\.)?be([^\/]+)?\/(.+)/, function(a, b, c, d) {
            return d = d.replace(/(watch\?v=|v\/|embed\/|live\/)/, ""), b && !c && (c = ".com"), 
            id = d.replace(/([^\?&#]+)/, function($0, $1) {
                return $1;
            }), "youtube" + c + "/" + ("iframe" == type ? "embed" : "v") + "/" + d;
        }), id && args.loop && !args.playlist && (args.playlist = id), src = $("#youtube_privacy").is(":checked") ? src.replace(/youtube\./, "youtube-nocookie.") : src.replace(/youtube-nocookie\./, "youtube."), 
        "iframe" == type ? $.extend(data, {
            allowfullscreen: "allowfullscreen",
            frameborder: 0
        }) : $.extend(!0, data, {
            param: {
                allowfullscreen: "allowfullscreen",
                wmode: "opaque"
            }
        }), $(".uk-repeatable", "#youtube_params").each(function() {
            var key = $('input[name^="youtube_params_name"]', this).val(), value = $('input[name^="youtube_params_value"]', this).val();
            key && (args[key] = value);
        }), $.param(args));
        return u && (src = src + (/\?/.test(src) ? "&" : "?") + u), data.src = src, 
        $(".uk-repeatable", "#youtube_attributes").each(function() {
            var elements = $("input, select", this), key = $(elements).eq(0).val(), elements = $(elements).eq(1).val();
            key && (data["youtube_" + key] = elements);
        }), data;
    },
    parseURL: function(url) {
        var o = {};
        try {
            var urlObj = new URL(url);
            o.host = urlObj.hostname, o.path = urlObj.pathname, o.query = {}, urlObj.searchParams.forEach(function(value, key) {
                o.query[key] = value;
            }), o.anchor = urlObj.hash ? urlObj.hash.substring(1) : null;
        } catch (e) {
            console.error("Invalid URL:", url);
        }
        return o;
    },
    setValues: function(data) {
        var attribs, params, u, s, x, self = this, id = "", src = data.src || data.data || "";
        return src && (attribs = {}, params = {}, src = "https://" + (u = this.parseURL(src)).host + u.path, 
        $.each(data, function(key, val) {
            0 === key.indexOf("youtube_") && (key = key.substr(key.indexOf("_") + 1), 
            "" !== val && !0 !== val || (val = key), attribs[key] = val, delete data[key]);
        }), -1 !== src.indexOf("youtube-nocookie") ? data.youtube_privacy = 1 : data.youtube_privacy = 0, 
        u.query.v ? id = u.query.v : (s = /\/?(embed|live|shorts|v)?\/([\w-]+)\b/.exec(u.path)) && "array" === $.type(s) && (id = s.pop()), 
        $.each(u.query, function(key, val) {
            if ("v" == key) return !0;
            "t" == key && (key = "start", val = val.replace(/(\D)/g, ""));
            try {
                val = decodeURIComponent(val);
            } catch (e) {}
            return "autoplay" == key && (val = parseInt(val, 10)), "mute" == key && (val = parseInt(val, 10)), 
            "playlist" == key && val == id || "wmode" == key || self.props[key] === val || (void 0 !== self.props[key] ? (data["youtube_" + key] = val, 
            !0) : (params[key] = val, void delete data[key]));
        }), src = src.replace(/youtu(\.)?be([^\/]+)?\/(.+)/, function(a, b, c, d) {
            var args = "youtube";
            return b && (args += ".com"), c && (args += c), args += "/embed/" + id, 
            u.anchor && (args += "#" + u.anchor.replace(/(\?|&)(.+)/, "")), args;
        }).replace(/\/\/youtube/i, "//www.youtube"), $.each(data, function(key, val) {
            /^iframe_(allow|frameborder|allowfullscreen)/.test(key) && delete data[key];
        }), x = 0, $.each(params, function(key, val) {
            var $repeatable = $(".uk-repeatable", "#youtube_params");
            if ("feature" == key && "oembed" == val) return !0;
            0 < x && ($repeatable.eq(0).clone(!0).appendTo($repeatable.parent()), 
            $repeatable = $(".uk-repeatable", "#youtube_params"));
            $repeatable = $repeatable.eq(x).find("input, select");
            $repeatable.eq(0).val(key), $repeatable.eq(1).val(val), x++;
        }), x = 0, $.each(attribs, function(key, val) {
            var $repeatable = $(".uk-repeatable", "#youtube_attributes"), $repeatable = (0 < x && ($repeatable.eq(0).clone(!0).appendTo($repeatable.parent()), 
            $repeatable = $(".uk-repeatable", "#youtube_attributes")), $repeatable.eq(x).find("input, select"));
            $repeatable.eq(0).val(key), $repeatable.eq(1).val(val), x++;
        }), data.src = src), data;
    },
    getAttributes: function(src) {
        var args = {}, data = this.setValues({
            src: src
        }) || {}, width = ($.each(data, function(k, v) {
            "src" !== k && (args[k] = v);
        }), this.params.width), height = this.params.height;
        return -1 !== src.indexOf("/shorts/") && (width = this.params.height, height = this.params.width), 
        args = $.extend(args, {
            src: data.src || src,
            width: width,
            height: height
        });
    },
    setAttributes: function() {},
    onSelectFile: function() {},
    onInsert: function() {}
});extensions/aggregator/youtube/tmpl/default.php000060400000014527152455721620015710 0ustar00<?php

/**
 * @package     JCE
 * @subpackage  Editor
 *
 * @copyright   Copyright (C) 2005 - 2020 Open Source Matters, Inc. All rights reserved.
 * @copyright   Copyright (c) 2009-2024 Ryan Demmer. All rights reserved
 * @license     GNU General Public License version 2 or later; see LICENSE.txt
 */

\defined('_JEXEC') or die;

use Joomla\CMS\Language\Text;

?>
<div class="uk-form-row uk-grid uk-grid-small">
  <div class="uk-width-4-10">
    <input type="checkbox" id="youtube_controls" checked />
    <label for="youtube_controls" title="<?php echo Text::_('WF_AGGREGATOR_YOUTUBE_CONTROLS_DESC') ?>" class="tooltip">
      <?php echo Text::_('WF_AGGREGATOR_YOUTUBE_CONTROLS') ?>
    </label>
  </div>
  <div class="uk-width-6-10">
    <input type="checkbox" id="youtube_loop" />
    <label for="youtube_loop" title="<?php echo Text::_('WF_AGGREGATOR_YOUTUBE_LOOP_DESC') ?>" class="tooltip">
      <?php echo Text::_('WF_AGGREGATOR_YOUTUBE_LOOP') ?>
    </label>
  </div>
</div>
<div class="uk-form-row uk-grid uk-grid-small">
  <div class="uk-width-4-10">
    <input type="checkbox" id="youtube_autoplay" />
    <label for="youtube_autoplay" title="<?php echo Text::_('WF_AGGREGATOR_YOUTUBE_AUTOPLAY_DESC') ?>" class="tooltip">
      <?php echo Text::_('WF_AGGREGATOR_YOUTUBE_AUTOPLAY') ?>
    </label>
  </div>
  <div class="uk-width-6-10">
    <input type="checkbox" id="youtube_mute" />
    <label for="youtube_mute" title="<?php echo Text::_('WF_AGGREGATOR_YOUTUBE_MUTE_DESC') ?>" class="tooltip">
      <?php echo Text::_('WF_AGGREGATOR_YOUTUBE_MUTE') ?>
    </label>
  </div>
</div>
<div class="uk-form-row uk-grid uk-grid-small">
  <div class="uk-width-4-10">
    <input type="checkbox" id="youtube_modestbranding" checked />
    <label for="youtube_modestbranding" title="<?php echo Text::_('WF_AGGREGATOR_YOUTUBE_MODESTBRANDING_DESC') ?>" class="tooltip">
      <?php echo Text::_('WF_AGGREGATOR_YOUTUBE_MODESTBRANDING') ?>
    </label>
  </div>

  <div class="uk-width-6-10">
    <input type="checkbox" id="youtube_privacy" />
    <label for="youtube_privacy" title="<?php echo Text::_('WF_AGGREGATOR_YOUTUBE_PRIVACY_DESC') ?>" class="tooltip">
      <?php echo Text::_('WF_AGGREGATOR_YOUTUBE_PRIVACY') ?>
    </label>
  </div>

</div>

<div class="uk-grid uk-grid-small">
  <label for="youtube_rel" class="uk-form-label uk-width-1-5 tooltip" title="<?php echo Text::_('WF_AGGREGATOR_YOUTUBE_RELATED_DESC') ?>">
    <?php echo Text::_('WF_AGGREGATOR_YOUTUBE_RELATED') ?>
  </label>

  <div class="uk-form-controls uk-width-4-5">

    <select id="youtube_rel">
      <option value="1">
        <?php echo Text::_('WF_AGGREGATOR_YOUTUBE_RELATED_ALL') ?>
      </option>
      <option value="0">
        <?php echo Text::_('WF_AGGREGATOR_YOUTUBE_RELATED_CHANNEL') ?>
      </option>
    </select>

  </div>
</div>

<div class="uk-grid uk-grid-small">
  <label for="youtube_start" title="<?php echo Text::_('WF_AGGREGATOR_YOUTUBE_START_DESC') ?>" class="tooltip uk-form-label uk-width-2-10">
    <?php echo Text::_('WF_AGGREGATOR_YOUTUBE_START') ?>
  </label>

  <div class="uk-form-controls uk-width-2-10">
    <input type="number" id="youtube_start" />
  </div>
  <div class="uk-width-6-10">
    <label for="youtube_end" class="uk-form-label uk-width-2-10" title="<?php echo Text::_('WF_AGGREGATOR_YOUTUBE_END_DESC') ?>" class="tooltip">
      <?php echo Text::_('WF_AGGREGATOR_YOUTUBE_END') ?>
    </label>
    <div class="uk-form-controls uk-width-3-10">
      <input type="number" id="youtube_end" />
    </div>
  </div>
</div>

<div class="uk-grid uk-grid-small">
  <label for="youtube_playlist" class="uk-form-label uk-width-1-5" title="<?php echo Text::_('WF_AGGREGATOR_YOUTUBE_PLAYLIST_DESC') ?>" class="tooltip">
    <?php echo Text::_('WF_AGGREGATOR_YOUTUBE_PLAYLIST') ?>
  </label>
  <div class="uk-form-controls uk-width-4-5">
    <input type="text" id="youtube_playlist" />
  </div>
</div>

<div class="uk-form-row uk-grid uk-grid-small">
  <label for="youtube_params" class="uk-form-label uk-width-1-5 hastip" title="<?php echo Text::_('WF_AGGREGATOR_YOUTUBE_PARAMS_DESC'); ?>"><?php echo Text::_('WF_AGGREGATOR_YOUTUBE_PARAMS'); ?></label>
  <div class="uk-width-4-5" id="youtube_params">
    <div class="uk-form-row uk-repeatable">
      <div class="uk-form-controls uk-grid uk-grid-small uk-width-9-10">
        <label class="uk-form-label uk-width-1-10"><?php echo Text::_('WF_LABEL_NAME'); ?></label>
        <div class="uk-form-controls uk-width-4-10">
          <input type="text" name="youtube_params_name[]" />
        </div>
        <label class="uk-form-label uk-width-1-10"><?php echo Text::_('WF_LABEL_VALUE'); ?></label>
        <div class="uk-form-controls uk-width-4-10">
          <input type="text" name="youtube_params_value[]" />
        </div>
      </div>
      <div class="uk-form-controls uk-margin-small-left">
        <button type="button" class="uk-button uk-button-link uk-repeatable-create"><i class="uk-icon-plus"></i></button>
        <button type="button" class="uk-button uk-button-link uk-repeatable-delete"><i class="uk-icon-trash"></i></button>
      </div>
    </div>
  </div>
</div>

<div class="uk-form-row uk-grid uk-grid-small">
  <label for="youtube_attributes" class="uk-form-label uk-width-1-5"><?php echo Text::_('WF_LABEL_ATTRIBUTES'); ?></label>
  <div class="uk-width-4-5" id="youtube_attributes">
    <div class="uk-form-row uk-repeatable">
      <div class="uk-form-controls uk-grid uk-grid-small uk-width-9-10">
        <label class="uk-form-label uk-width-1-10"><?php echo Text::_('WF_LABEL_NAME'); ?></label>
        <div class="uk-form-controls uk-width-4-10">
          <input type="text" name="youtube_attributes_name[]" />
        </div>
        <label class="uk-form-label uk-width-1-10"><?php echo Text::_('WF_LABEL_VALUE'); ?></label>
        <div class="uk-form-controls uk-width-4-10">
          <input type="text" name="youtube_attributes_value[]" />
        </div>
      </div>
      <div class="uk-form-controls uk-margin-small-left">
        <button class="uk-button uk-button-link uk-repeatable-create" aria-label="<?php echo Text::_('WF_LABEL_ADD'); ?>" title="<?php echo Text::_('WF_LABEL_ADD'); ?>"><i class="uk-icon-plus"></i></button>
        <button class="uk-button uk-button-link uk-repeatable-delete" aria-label="<?php echo Text::_('WF_LABEL_REMOVE'); ?>" title="<?php echo Text::_('WF_LABEL_REMOVE'); ?>"><i class="uk-icon-trash"></i></button>
      </div>
    </div>
  </div>
</div>extensions/aggregator/youtube/tmpl/index.html000060400000000054152455721620015536 0ustar00<html><body bgcolor="#FFFFFF"></body></html>extensions/aggregator/vimeo.php000060400000005720152455721620012726 0ustar00<?php
/**
 * @package     JCE
 * @subpackage  Editor
 *
 * @copyright   Copyright (C) 2005 - 2020 Open Source Matters, Inc. All rights reserved.
 * @copyright   Copyright (c) 2009-2024 Ryan Demmer. All rights reserved
 * @license     GNU General Public License version 2 or later; see LICENSE.txt
 */

\defined('_JEXEC') or die;

class WFAggregatorExtension_Vimeo extends WFAggregatorExtension
{
    /**
     * Constructor activating the default information of the class.
     */
    public function __construct()
    {
        parent::__construct(array(
            'format' => 'video',
        ));
    }

    public function display()
    {
        $document = WFDocument::getInstance();
        $document->addScript('vimeo', 'extensions/aggregator/vimeo/js');
    }

    public function isEnabled()
    {
        $plugin = WFEditorPlugin::getInstance();

        return $plugin->checkAccess('aggregator.vimeo.enable', 1);
    }

    public function getParams()
    {
        $plugin = WFEditorPlugin::getInstance();

        $defaults = array(
            'width' => $plugin->getParam('aggregator.vimeo.width', 400),
            'height' => $plugin->getParam('aggregator.vimeo.height', 225),

            'color' => (string) $plugin->getParam('aggregator.vimeo.color', ''),
            'loop' => (int) $plugin->getParam('aggregator.vimeo.loop', 0),
            'autoplay' => (int) $plugin->getParam('aggregator.vimeo.autoplay', 0),
            'intro' => (int) $plugin->getParam('aggregator.vimeo.intro', 0),
            'title' => (int) $plugin->getParam('aggregator.vimeo.title', 0),
            'byline' => (int) $plugin->getParam('aggregator.vimeo.byline', 0),
            'portrait' => (int) $plugin->getParam('aggregator.vimeo.portrait', 0),
            'fullscreen' => (int) $plugin->getParam('aggregator.vimeo.fullscreen', 1),
            'dnt' => (int) $plugin->getParam('aggregator.vimeo.dnt', 0),
        );

        $attributes = $plugin->getParam('aggregator.vimeo.attributes', '');

        if ($attributes) {            
            $defaults['attributes'] = $this->getCustomDefaultAttributes($attributes);
        }

        return $defaults;
    }

    public function getEmbedData($data, $url)
    {
        $params = $this->getParams();

        $default = array(
            'width' => 560,
            'height' => 315,
            'controls' => 1,
            'loop' => 0,
            'autoplay' => 0,
            'rel' => 1,
            'modestbranding' => 0,
            'privacy' => 0,
        );

        foreach ($params as $name => $value) {
            if (isset($default[$name]) && $value === $default[$name]) {
                continue;
            }

            if ($name == 'width' || $name == 'height' || $name == 'attributes') {
                $data[$name] = $value;
                continue;
            }

            $query[$name] = $value;
        }

        if (!empty($options)) {
            $data['query'] = http_build_query($options);
        }

        return $data;
    }
}
extensions/aggregator/vimeo.xml000060400000006342152455721620012740 0ustar00<?xml version="1.0" ?>
<extension version="3.4" type="plugin" group="jce" method="upgrade">
	<name>WF_AGGREGATOR_VIMEO_TITLE</name>
	<version>2.9.99.2</version>
	<creationDate>22-04-2026</creationDate>
	<author>Ryan Demmer</author>
	<authorEmail>info@joomlacontenteditor.net</authorEmail>
	<authorUrl>https://www.joomlacontenteditor.net/</authorUrl>
	<copyright>Copyright (C) 2006 - 2026 Ryan Demmer. All rights reserved</copyright>
	<license>GNU/GPL Version 2 or later - http://www.gnu.org/licenses/gpl-2.0.html</license>
	<description>WF_AGGREGATOR_VIMEO_DESC</description>
	<files>
		<filename>vimeo.php</filename>
		<folder>vimeo</folder>
	</files>
	<fields name="vimeo">
		<fieldset name="aggregator.vimeo">
			<field name="enable" type="yesno" default="1" label="WF_LABEL_EXTENSION_ENABLE" description="WF_LABEL_EXTENSION_ENABLE_DESC">
				<option value="1">JYES</option>
				<option value="0">JNO</option>
			</field>
			<field name="width" type="number" default="400" class="input-small" label="WF_LABEL_WIDTH" description="WF_AGGREGATOR_VIMEO_WIDTH_DESC" />
			<field name="height" type="number" default="225" class="input-small" label="WF_LABEL_HEIGHT" description="WF_AGGREGATOR_VIMEO_HEIGHT_DESC" />

			<field name="color" type="color" size="10" default="" label="WF_AGGREGATOR_VIMEO_COLOR" description="WF_AGGREGATOR_VIMEO_COLOR_DESC" />

			<field name="intro" type="yesno" default="0" label="WF_AGGREGATOR_VIMEO_INTRO" description="WF_AGGREGATOR_VIMEO_INTRO_DESC">
				<option value="1">JYES</option>
				<option value="0">JNO</option>
			</field>

			<field name="portrait" type="yesno" default="0" label="WF_AGGREGATOR_VIMEO_PORTRAIT" description="WF_AGGREGATOR_VIMEO_PORTRAIT_DESC">
				<option value="1">JYES</option>
				<option value="0">JNO</option>
			</field>

			<field name="title" type="yesno" default="0" label="WF_AGGREGATOR_VIMEO_INTROTITLE" description="WF_AGGREGATOR_VIMEO_INTROTITLE_DESC">
				<option value="1">JYES</option>
				<option value="0">JNO</option>
			</field>

			<field name="byline" type="yesno" default="0" label="WF_AGGREGATOR_VIMEO_BYLINE" description="WF_AGGREGATOR_VIMEO_BYLINE_DESC">
				<option value="1">JYES</option>
				<option value="0">JNO</option>
			</field>

			<field name="autoplay" type="yesno" default="0" label="WF_AGGREGATOR_VIMEO_AUTOPLAY" description="WF_AGGREGATOR_VIMEO_AUTOPLAY_DESC">
				<option value="1">JYES</option>
				<option value="0">JNO</option>
			</field>

			<field name="loop" type="yesno" default="0" label="WF_AGGREGATOR_VIMEO_LOOP" description="WF_AGGREGATOR_VIMEO_LOOP_DESC">
				<option value="1">JYES</option>
				<option value="0">JNO</option>
			</field>

			<field name="fullscreen" type="yesno" default="1" label="WF_AGGREGATOR_VIMEO_FULLSCREEN" description="WF_AGGREGATOR_VIMEO_FULLSCREEN_DESC">
				<option value="1">JYES</option>
				<option value="0">JNO</option>
			</field>

			<field name="dnt" type="yesno" default="0" label="WF_AGGREGATOR_VIMEO_DNT" description="WF_AGGREGATOR_VIMEO_DNT_DESC">
				<option value="1">JYES</option>
				<option value="0">JNO</option>
			</field>

			<field name="attributes" type="keyvalue" default="" label="WF_PARAM_CUSTOM_ATTRIBUTES" description="WF_PARAM_CUSTOM_ATTRIBUTES_DESC" boolean="true" />
		</fieldset>
	</fields>
	<plugins></plugins>
</extension>extensions/aggregator/audio/index.html000060400000000054152455721620014167 0ustar00<html><body bgcolor="#FFFFFF"></body></html>extensions/aggregator/audio/js/index.html000060400000000054152455721620014603 0ustar00<html><body bgcolor="#FFFFFF"></body></html>extensions/aggregator/audio/js/audio.js000060400000005612152455721620014252 0ustar00/* jce - 2.9.99.2 | 2026-04-22 | https://www.joomlacontenteditor.net | Source: https://github.com/widgetfactory/jce | Copyright (C) 2006 - 2026 Ryan Demmer. All rights reserved | GNU/GPL Version 2 or later - http://www.gnu.org/licenses/gpl-2.0.html */
WFAggregator.add("audio", {
    params: {},
    props: {
        autoplay: 0,
        loop: 0,
        controls: 1,
        mute: 0
    },
    setup: function() {
        var x = 0;
        $.each(this.params, function(k, v) {
            "attributes" == k ? $.each(v, function(key, value) {
                var $repeatable = $(".media_option.audio .uk-repeatable"), $repeatable = (0 < x && ($repeatable.eq(0).clone(!0).appendTo($repeatable.parent()), 
                $repeatable = $(".media_option.audio .uk-repeatable")), $repeatable.eq(x).find("input, select"));
                $repeatable.eq(0).val(key), $repeatable.eq(1).val(value), x++;
            }) : $("#audio_" + k).val(v).filter(":checkbox, :radio").prop("checked", !!v);
        });
    },
    getTitle: function() {
        return this.title || this.name;
    },
    getType: function() {
        return "audio";
    },
    isSupported: function(v) {
        return !!v && (v = v.split("?")[0], !!/\.(mp3|oga|webm|wav|m4a|aiff)$/.test(v)) && "audio";
    },
    getValues: function(data) {
        var sources = [], agent = ($("input[id], select[id]", "#video_options").each(function() {
            var key = $(this).attr("id"), val = $(this).val();
            if (!key) return !0;
            "checkbox" === this.type && (val = !!this.checked), data[key] = val;
        }), $('input[name="audio_source[]"]').each(function() {
            var val = $(this).val();
            val !== data.src && sources.push(val);
        }), sources.length && (data.audio_source = sources), delete data.width, 
        delete data.height, navigator.userAgent.match(/(Opera|Chrome|Safari|Gecko)/));
        return agent && (data.classes += " mce-object-agent-" + agent[0].toLowerCase()), 
        $(".uk-repeatable", "#audio_attributes").each(function() {
            var elements = $("input, select", this), key = $(elements).eq(0).val(), elements = $(elements).eq(1).val();
            key && (data["audio_" + key] = elements);
        }), data;
    },
    setValues: function(data) {
        var x = 0;
        return $.each(data, function(key, val) {
            if (-1 === key.indexOf("audio_")) return !0;
            key = key.substr(key.indexOf("_") + 1);
            var $repeatable = $(".uk-repeatable", "#audio_attributes"), $repeatable = (0 < x && ($repeatable.eq(0).clone(!0).appendTo($repeatable.parent()), 
            $repeatable = $(".uk-repeatable", "#audio_attributes")), $repeatable.eq(x).find("input, select"));
            $repeatable.eq(0).val(key), $repeatable.eq(1).val(val), x++;
        }), data;
    },
    getAttributes: function(src) {
        return {
            width: "",
            height: ""
        };
    }
});extensions/aggregator/dailymotion.xml000060400000002526152455721620014151 0ustar00<?xml version="1.0" ?>
<extension version="3.4" type="plugin" group="jce" method="upgrade">
	<name>WF_AGGREGATOR_DAILYMOTION_TITLE</name>
	<version>2.9.99.2</version>
	<creationDate>22-04-2026</creationDate>
	<author>Ryan Demmer</author>
	<authorEmail>info@joomlacontenteditor.net</authorEmail>
	<authorUrl>https://www.joomlacontenteditor.net/</authorUrl>
	<copyright>Copyright (C) 2006 - 2026 Ryan Demmer. All rights reserved</copyright>
	<license>GNU/GPL Version 2 or later - http://www.gnu.org/licenses/gpl-2.0.html</license>
	<description>WF_AGGREGATOR_DAILYMOTION_DESC</description>
	<files>
		<filename>dailymotion</filename>
		<folder>dailymotion</folder>
	</files>
	<fields name="dailymotion">
		<fieldset name="aggregator.dailymotion">
			<field name="enable" type="yesno" default="1" label="WF_LABEL_EXTENSION_ENABLE" description="WF_LABEL_EXTENSION_ENABLE_DESC">
				<option value="1">JYES</option>
				<option value="0">JNO</option>
			</field>
			<field name="width" type="number" default="400" class="input-small" label="WF_LABEL_WIDTH" />
			<field name="height" type="number" default="225" class="input-small" label="WF_LABEL_HEIGHT" />

			<field name="attributes" type="keyvalue" default="" label="WF_PARAM_CUSTOM_ATTRIBUTES" description="WF_PARAM_CUSTOM_ATTRIBUTES_DESC" boolean="true" />
		</fieldset>
	</fields>
	<plugins></plugins>
</extension>extensions/aggregator/dailymotion.php000060400000004125152455721620014135 0ustar00<?php
/**
 * @package     JCE
 * @subpackage  Editor
 *
 * @copyright   Copyright (C) 2005 - 2020 Open Source Matters, Inc. All rights reserved.
 * @copyright   Copyright (c) 2009-2024 Ryan Demmer. All rights reserved
 * @license     GNU General Public License version 2 or later; see LICENSE.txt
 */

\defined('_JEXEC') or die;

class WFAggregatorExtension_Dailymotion extends WFAggregatorExtension
{
    /**
     * Constructor activating the default information of the class.
     */
    public function __construct()
    {
        parent::__construct(array(
            'format' => 'video',
        ));
    }

    public function display()
    {
        $document = WFDocument::getInstance();
        $document->addScript('dailymotion', 'extensions/aggregator/dailymotion/js');
        $document->addStyleSheet('dailymotion', 'extensions/aggregator/dailymotion/css');
    }

    public function isEnabled()
    {
        $plugin = WFEditorPlugin::getInstance();

        return $plugin->checkAccess('aggregator.dailymotion.enable', 1);
    }

    public function getParams()
    {
        $plugin = WFEditorPlugin::getInstance();

        $defaults = array(
            'width' => $plugin->getParam('aggregator.dailymotion.width', 480),
            'height' => $plugin->getParam('aggregator.dailymotion.height', 270),
        );

        $attributes = $plugin->getParam('aggregator.dailymotion.attributes', '');

        if ($attributes) {            
            $defaults['attributes'] = $this->getCustomDefaultAttributes($attributes);
        }

        return $defaults;
    }

    public function getEmbedData($data, $url)
    {
        $params = $this->getParams();

        $default = array(
            'width' => 480,
            'height' => 270,
        );

        foreach ($params as $name => $value) {
            if (isset($default[$name]) && $value === $default[$name]) {
                continue;
            }

            if ($name == 'width' || $name == 'height' || $name == 'attributes') {
                $data[$name] = $value;
                continue;
            }
        }

        return $data;
    }
}
extensions/aggregator/vimeo/index.html000060400000000054152455721620014205 0ustar00<html><body bgcolor="#FFFFFF"></body></html>extensions/aggregator/vimeo/js/index.html000060400000000054152455721620014621 0ustar00<html><body bgcolor="#FFFFFF"></body></html>extensions/aggregator/vimeo/js/vimeo.js000060400000010656152455721620014312 0ustar00/* jce - 2.9.99.2 | 2026-04-22 | https://www.joomlacontenteditor.net | Source: https://github.com/widgetfactory/jce | Copyright (C) 2006 - 2026 Ryan Demmer. All rights reserved | GNU/GPL Version 2 or later - http://www.gnu.org/licenses/gpl-2.0.html */
WFAggregator.add("vimeo", {
    params: {
        width: 480,
        height: 480,
        embed: !0
    },
    props: {
        color: "",
        autoplay: 0,
        loop: 0,
        fullscreen: 1,
        dnt: 0
    },
    setup: function() {
        $("#vimeo_embed").toggle(this.params.embed), $.each(this.params, function(k, v) {
            var x;
            if ("attributes" == k) return x = 0, $.each(v, function(key, value) {
                var $repeatable = $(".media_option.vimeo .uk-repeatable"), $repeatable = (0 < x && ($repeatable.eq(0).clone(!0).appendTo($repeatable.parent()), 
                $repeatable = $(".media_option.vimeo .uk-repeatable")), $repeatable.eq(x).find("input, select"));
                $repeatable.eq(0).val(key), $repeatable.eq(1).val(value), x++;
            }), !0;
            $("#vimeo_" + k).val(v).filter(":checkbox, :radio").prop("checked", !!v);
        });
    },
    getTitle: function() {
        return this.title || this.name;
    },
    getType: function() {
        return "iframe";
    },
    isSupported: function(v) {
        return !!v && !!/vimeo(.+)?\/(.+)/.test(v) && !/\/external\//.test(v) && "vimeo";
    },
    getValues: function(data) {
        var hash, self = this, args = {}, id = "", src = data.src, matches = (-1 !== src.indexOf("=") && $.extend(args, Wf.String.query(src)), 
        $("input, select", "#vimeo_options").not("#vimeo_embed").each(function() {
            var k = $(this).attr("id"), v = $(this).val();
            if (!k) return !0;
            k = k.substr(k.indexOf("_") + 1), $(this).is(":checkbox") && (v = $(this).is(":checked") ? 1 : 0), 
            self.props[k] != v && "" !== v && ("color" === k && "#" === v.charAt(0) && (v = v.substr(1)), 
            args[k] = v);
        }), args.clip_id ? id = args.clip_id : (hash = id = "", (matches = /vimeo\.com\/([0-9]+)\/?([a-z0-9]+)?/.exec(src)) && tinymce.is(matches, "array") && (id = matches[1], 
        2 < matches.length) && (hash = matches[2]), id += hash ? "?h=" + hash : ""), 
        src = "https://player.vimeo.com/video/" + id, $.param(args));
        return matches && (src = src + (/\?/.test(src) ? "&" : "?") + matches), 
        data.src = src, $.extend(data, {
            frameborder: 0
        }), 0 !== args.fullscreen && $.extend(data, {
            allowfullscreen: !0
        }), $(".uk-repeatable", "#vimeo_attributes").each(function() {
            var elements = $("input, select", this), key = $(elements).eq(0).val(), elements = $(elements).eq(1).val();
            key && (data["vimeo_" + key] = elements);
        }), data;
    },
    setValues: function(data) {
        var query, hash, matches, self = this, src = data.src || data.data || "", id = "";
        return src && (query = Wf.String.query(src), src = src.replace(/&amp;/g, "&"), 
        /moogaloop.swf/.test(src) ? (data.vimeo_embed = !0, id = query.clip_id, 
        delete query.clip_id, delete data.clip_id, $.each([ "portrait", "title", "byline" ], function(i, s) {
            delete data["show_" + s];
        })) : (hash = id = "", (matches = /vimeo\.com\/(?:\w+\/){0,3}((?:[0-9]+\b)(?:\/[a-z0-9]+)?)/.exec(src)) && "array" == $.type(matches) && (id = (matches = matches[1].split("/"))[0], 
        id += (hash = 2 == matches.length ? matches[1] : hash) ? "/" + hash : "")), 
        $.each(query, function(key, val) {
            if (self.props[key] === val) return !0;
            "color" == key && "#" !== val.charAt(0) && (val = "#" + val), "autoplay" == key && (val = parseInt(val, 10)), 
            data["vimeo_" + key] = val;
        }), src = "https://vimeo.com/" + id, $.each(data, function(key, val) {
            /^iframe_(allow|frameborder|allowfullscreen)/.test(key) && delete data[key];
        }), data.src = src), data;
    },
    getAttributes: function(src) {
        var args = {}, data = this.setValues({
            src: src
        }) || {};
        return $.each(data, function(k, v) {
            "src" != k && (args["vimeo_" + k] = v);
        }), $.extend(args, {
            src: data.src || src,
            width: this.params.width,
            height: this.params.height
        }), args;
    },
    setAttributes: function() {},
    onSelectFile: function() {},
    onInsert: function() {}
});extensions/aggregator/vimeo/tmpl/default.php000060400000011567152455721620015334 0ustar00<?php

/**
 * @package     JCE
 * @subpackage  Editor
 *
 * @copyright   Copyright (C) 2005 - 2020 Open Source Matters, Inc. All rights reserved.
 * @copyright   Copyright (c) 2009-2024 Ryan Demmer. All rights reserved
 * @license     GNU General Public License version 2 or later; see LICENSE.txt
 */

\defined('_JEXEC') or die;

use Joomla\CMS\Language\Text;

?>
<div class="uk-form-row uk-flex">
       <label for="vimeo_color" title="<?php echo Text::_('WF_AGGREGATOR_VIMEO_COLOR_DESC') ?>"
              class="tooltip uk-form-label uk-width-1-5"><?php echo Text::_('WF_AGGREGATOR_VIMEO_COLOR') ?></label>

       <div class="uk-form-controls uk-width-1-5">
              <input type="text" id="vimeo_color" class="color" />
       </div>
</div>

<div class="uk-form-row uk-flex">

       <label for="vimeo_intro" title="<?php echo Text::_('WF_AGGREGATOR_VIMEO_INTRO_DESC') ?>"
              class="tooltip uk-form-label uk-width-1-5"><?php echo Text::_('WF_AGGREGATOR_VIMEO_INTRO') ?></label>

       <div class="uk-form-controls uk-form-row uk-flex uk-width-4-5">
              <label for="vimeo_portrait" class="uk-checkbox-label tooltip" title="<?php echo Text::_('WF_AGGREGATOR_VIMEO_PORTRAIT_DESC') ?>">
                     <input type="checkbox" id="vimeo_portrait" /><?php echo Text::_('WF_AGGREGATOR_VIMEO_PORTRAIT'); ?>
              </label>

              <label for="vimeo_title" class="uk-checkbox-label tooltip" title="<?php echo Text::_('WF_AGGREGATOR_VIMEO_INTROTITLE_DESC') ?>">
                     <input type="checkbox" id="vimeo_title" /><?php echo Text::_('WF_AGGREGATOR_VIMEO_INTROTITLE'); ?>
              </label>

              <label for="vimeo_byline" class="uk-checkbox-label tooltip" title="<?php echo Text::_('WF_AGGREGATOR_VIMEO_BYLINE_DESC') ?>">
                     <input type="checkbox" id="vimeo_byline" /><?php echo Text::_('WF_AGGREGATOR_VIMEO_BYLINE'); ?>
              </label>
       </div>
</div>

<div class="uk-form-row uk-flex">
       <label for="vimeo_special"
              class="uk-form-label uk-width-1-5"><?php echo Text::_('WF_AGGREGATOR_VIMEO_SPECIAL') ?></label>
       <div class="uk-form-controls uk-form-row uk-flex uk-width-4-5">

              <label for="vimeo_autoplay" class="uk-checkbox-label tooltip" title="<?php echo Text::_('WF_AGGREGATOR_VIMEO_AUTOPLAY_DESC') ?>">
                     <input type="checkbox" id="vimeo_autoplay" /><?php echo Text::_('WF_AGGREGATOR_VIMEO_AUTOPLAY'); ?>
              </label>

              <label for="vimeo_loop" class="uk-checkbox-label tooltip" title="<?php echo Text::_('WF_AGGREGATOR_VIMEO_LOOP_DESC') ?>">
                     <input type="checkbox" id="vimeo_loop" /><?php echo Text::_('WF_AGGREGATOR_VIMEO_LOOP'); ?>
              </label>

              <label for="vimeo_fullscreen" class="uk-checkbox-label tooltip" title="<?php echo Text::_('WF_AGGREGATOR_VIMEO_FULLSCREEN_DESC') ?>">
                     <input type="checkbox" id="vimeo_fullscreen" /><?php echo Text::_('WF_AGGREGATOR_VIMEO_FULLSCREEN'); ?>
              </label>

              <label for="vimeo_dnt" class="uk-checkbox-label tooltip" title="<?php echo Text::_('WF_AGGREGATOR_VIMEO_DNT_DESC') ?>">
                     <input type="checkbox" id="vimeo_dnt" /><?php echo Text::_('WF_AGGREGATOR_VIMEO_DNT'); ?>
              </label>
       </div>
</div>

<div class="uk-form-row uk-flex">
       <label for="vimeo_attributes" class="uk-form-label uk-width-1-5"><?php echo Text::_('WF_LABEL_ATTRIBUTES'); ?></label>
       <div class="uk-width-4-5" id="vimeo_attributes">
              <div class="uk-form-row uk-repeatable">
                     <div class="uk-form-controls uk-grid uk-grid-small uk-width-9-10">
                            <label class="uk-form-label uk-width-1-10"><?php echo Text::_('WF_LABEL_NAME'); ?></label>
                            <div class="uk-form-controls uk-width-4-10">
                                   <input type="text" name="vimeo_attributes_name[]" />
                            </div>
                            <label class="uk-form-label uk-width-1-10"><?php echo Text::_('WF_LABEL_VALUE'); ?></label>
                            <div class="uk-form-controls uk-width-4-10">
                                   <input type="text" name="vimeo_attributes_value[]" />
                            </div>
                     </div>
                     <div class="uk-form-controls uk-width-1-10 uk-margin-small-left">
                            <button class="uk-button uk-button-link uk-repeatable-create" aria-label="<?php echo Text::_('WF_LABEL_ADD'); ?>" title="<?php echo Text::_('WF_LABEL_ADD'); ?>"><i class="uk-icon-plus"></i></button>
                            <button class="uk-button uk-button-link uk-repeatable-delete" aria-label="<?php echo Text::_('WF_LABEL_REMOVE'); ?>" title="<?php echo Text::_('WF_LABEL_REMOVE'); ?>"><i class="uk-icon-trash"></i></button>
                     </div>
              </div>
       </div>
</div>extensions/aggregator/vimeo/tmpl/index.html000060400000000054152455721620015161 0ustar00<html><body bgcolor="#FFFFFF"></body></html>extensions/aggregator/dailymotion/tmpl/default.php000060400000006755152455721620016550 0ustar00<?php

/**
 * @package     JCE
 * @subpackage  Editor
 *
 * @copyright   Copyright (C) 2005 - 2020 Open Source Matters, Inc. All rights reserved.
 * @copyright   Copyright (c) 2009-2024 Ryan Demmer. All rights reserved
 * @license     GNU General Public License version 2 or later; see LICENSE.txt
 */

\defined('_JEXEC') or die;

use Joomla\CMS\Language\Text;

?>
<div class="uk-form-row uk-grid uk-grid-small">
    <label for="dailymotion_autoPlay" title="<?php echo Text::_('WF_AGGREGATOR_DAILYMOTION_AUTOPLAY_DESC') ?>"
        class="tooltip uk-form-label uk-width-1-5"><?php echo Text::_('WF_AGGREGATOR_DAILYMOTION_AUTOPLAY') ?></label>
    <div class="uk-width-4-5">
        <div class="uk-form-controls uk-width-1-5">
            <input type="checkbox" id="dailymotion_autoPlay" />
        </div>

        <label for="dailymotion_start" title="<?php echo Text::_('WF_AGGREGATOR_DAILYMOTION_START_DESC') ?>"
            class="tooltip uk-form-label uk-width-1-5"><?php echo Text::_('WF_AGGREGATOR_DAILYMOTION_START') ?></label>
        <div class="uk-form-controls uk-width-1-5">
            <input id="dailymotion_start" type="number" value="" />
        </div>
    </div>
</div>
<div class="uk-form-row uk-grid uk-grid-small">
    <label class="uk-form-label uk-width-1-5"
        title="<?php echo Text::_('WF_AGGREGATOR_DAILYMOTION_SIZE'); ?>"><?php echo Text::_('WF_AGGREGATOR_DAILYMOTION_SIZE'); ?></label>

    <div class="uk-form-controls uk-width-4-5">
        <select id="dailymotion_player_size">
            <option value="320"><?php echo Text::_('WF_AGGREGATOR_DAILYMOTION_SIZE_SMALL'); ?></option>
            <option value="480"><?php echo Text::_('WF_AGGREGATOR_DAILYMOTION_SIZE_MEDIUM'); ?></option>
            <option value="560"><?php echo Text::_('WF_AGGREGATOR_DAILYMOTION_SIZE_LARGE'); ?></option>
            <option value=""><?php echo Text::_('WF_AGGREGATOR_DAILYMOTION_SIZE_CUSTOM'); ?></option>
        </select>

        <input type="number" id="dailymotion_player_size_custom" class="uk-hidden uk-margin-small-left" />
    </div>
</div>

<div class="uk-form-row uk-grid uk-grid-small">
    <label for="dailymotion_attributes" class="uk-form-label uk-width-1-5"><?php echo Text::_('WF_LABEL_ATTRIBUTES'); ?></label>
    <div class="uk-width-4-5" id="dailymotion_attributes">
        <div class="uk-form-row uk-repeatable">
            <div class="uk-form-controls uk-grid uk-grid-small uk-width-9-10">
                <label class="uk-form-label uk-width-1-10"><?php echo Text::_('WF_LABEL_NAME'); ?></label>
                <div class="uk-form-controls uk-width-4-10">
                    <input type="text" name="dailymotion_attributes_name[]" />
                </div>
                <label class="uk-form-label uk-width-1-10"><?php echo Text::_('WF_LABEL_VALUE'); ?></label>
                <div class="uk-form-controls uk-width-4-10">
                    <input type="text" name="dailymotion_attributes_value[]" />
                </div>
            </div>
            <div class="uk-form-controls uk-width-1-10 uk-margin-small-left">
                <button class="uk-button uk-button-link uk-repeatable-create" aria-label="<?php echo Text::_('WF_LABEL_ADD'); ?>" title="<?php echo Text::_('WF_LABEL_ADD'); ?>"><i class="uk-icon-plus"></i></button>
                <button class="uk-button uk-button-link uk-repeatable-delete" aria-label="<?php echo Text::_('WF_LABEL_REMOVE'); ?>" title="<?php echo Text::_('WF_LABEL_REMOVE'); ?>"><i class="uk-icon-trash"></i></button>
            </div>
        </div>
    </div>
</div>extensions/aggregator/dailymotion/tmpl/index.html000060400000000054152455721620016372 0ustar00<html><body bgcolor="#FFFFFF"></body></html>extensions/aggregator/dailymotion/index.html000060400000000054152455721620015416 0ustar00<html><body bgcolor="#FFFFFF"></body></html>extensions/aggregator/dailymotion/js/dailymotion.js000060400000010152152455721620016723 0ustar00/* jce - 2.9.99.2 | 2026-04-22 | https://www.joomlacontenteditor.net | Source: https://github.com/widgetfactory/jce | Copyright (C) 2006 - 2026 Ryan Demmer. All rights reserved | GNU/GPL Version 2 or later - http://www.gnu.org/licenses/gpl-2.0.html */
WFAggregator.add("dailymotion", {
    params: {
        width: 480,
        height: 270,
        autoPlay: !1
    },
    props: {
        autoPlay: 0,
        start: 0
    },
    setup: function() {
        $("#dailymotion_autoPlay").prop("checked", this.params.autoPlay), $("#dailymotion_player_size").on("change", function() {
            var v = parseInt(this.value, 10);
            $("#dailymotion_player_size_custom").toggleClass("uk-hidden", !!this.value), 
            v && ($("#width").val(v), $("#height").val(Math.round(9 * v / 16)));
        }), $("#dailymotion_player_size_custom").on("change", function() {
            var v = parseInt(this.value, 10);
            v && ($("#width").val(v), $("#height").val(Math.round(16 * v / 9)));
        });
        var attributes = this.params.attributes || {}, x = 0;
        $.each(attributes, function(key, value) {
            var $repeatable = $(".media_option.dailymotion .uk-repeatable"), $repeatable = (0 < x && ($repeatable.eq(0).clone(!0).appendTo($repeatable.parent()), 
            $repeatable = $(".media_option.dailymotion .uk-repeatable")), $repeatable.eq(x).find("input, select"));
            $repeatable.eq(0).val(key), $repeatable.eq(1).val(value), x++;
        });
    },
    getTitle: function() {
        return this.title || this.name;
    },
    getType: function() {
        return "iframe";
    },
    isSupported: function(v) {
        return !!v && !!/dai\.?ly(motion)?(\.com)?/.test(v) && "dailymotion";
    },
    extractSource: function(src) {
        var matches;
        return /\/\/(?:[\w-]+\.)?dailymotion\.com\/embed\/video\/[a-z0-9]+/i.test(src) || /\/\/geo\.dailymotion\.com\/player\.html/i.test(src) || ((matches = src.match(/(?:^|\/\/)(?:[\w-]+\.)?dai\.?ly(?:motion\.com)?\/(?:embed\/)?(?:swf\/|video\/)?([a-z0-9]+)_?/i)) && matches[1] || (matches = src.match(/[?&]video=([a-z0-9]+)/i)) && matches[1]) && (src = "https://www.dailymotion.com/embed/video/" + matches[1]), 
        src;
    },
    getValues: function(data) {
        var query, self = this, args = {}, src = data.src;
        return -1 !== src.indexOf("=") && $.extend(args, Wf.String.query(src)), 
        $("input[id], select[id]", "#dailymotion_options").each(function() {
            var k = $(this).attr("id"), v = $(this).val();
            if (!k) return !0;
            k = k.substr(k.indexOf("_") + 1), $(this).is(":checkbox") && (v = $(this).is(":checked") ? 1 : 0), 
            -1 === k.indexOf("player_size") && self.props[k] !== v && "" !== v && (args[k] = v);
        }), (src = this.extractSource(src)) && ((query = $.param(args)) && (src = src + (/\?/.test(src) ? "&" : "?") + query), 
        data.src = src), $.extend(data, {
            frameborder: 0,
            allowfullscreen: "allowfullscreen"
        }), $(".uk-repeatable", "#dailymotion_attributes").each(function() {
            var elements = $("input, select", this), key = $(elements).eq(0).val(), elements = $(elements).eq(1).val();
            key && (data["dailymotion_" + key] = elements);
        }), data;
    },
    setValues: function(data) {
        var query, self = this, src = data.src || data.data || "";
        return src && (query = Wf.String.query(src), $.each(query, function(key, val) {
            if (self.props[key] == val) return !0;
            data["dailymotion_" + key] = val;
        }), src = src.replace(/&amp;/g, "&"), src = this.extractSource(src)) && (data.src = src), 
        data;
    },
    getAttributes: function(src) {
        var args = {}, data = this.setValues({
            src: src
        }) || {};
        return $.each(data, function(k, v) {
            "src" != k && (args["dailymotion_" + k] = v);
        }), $.extend(args, {
            src: data.src || src,
            width: this.params.width,
            height: this.params.height
        }), args;
    },
    setAttributes: function() {},
    onSelectFile: function() {},
    onInsert: function() {}
});extensions/aggregator/dailymotion/js/index.html000060400000000054152455721620016032 0ustar00<html><body bgcolor="#FFFFFF"></body></html>extensions/aggregator/dailymotion/css/dailymotion.css000060400000000144152455721620017253 0ustar00#dailymotion_player_size{width:150px!important}#dailymotion_player_size_custom{width:65px!important}extensions/aggregator/dailymotion/css/index.html000060400000000054152455721620016206 0ustar00<html><body bgcolor="#FFFFFF"></body></html>extensions/aggregator/youtube.php000060400000005446152455721620013310 0ustar00<?php
/**
 * @package     JCE
 * @subpackage  Editor
 *
 * @copyright   Copyright (C) 2005 - 2020 Open Source Matters, Inc. All rights reserved.
 * @copyright   Copyright (c) 2009-2024 Ryan Demmer. All rights reserved
 * @license     GNU General Public License version 2 or later; see LICENSE.txt
 */

\defined('_JEXEC') or die;

class WFAggregatorExtension_Youtube extends WFAggregatorExtension
{
    /**
     * Constructor activating the default information of the class.
     */
    public function __construct()
    {
        parent::__construct(array(
            'format' => 'video',
        ));
    }

    public function display()
    {
        $document = WFDocument::getInstance();
        $document->addScript('youtube', 'extensions/aggregator/youtube/js');
    }

    public function isEnabled()
    {
        $plugin = WFEditorPlugin::getInstance();

        return $plugin->checkAccess('aggregator.youtube.enable', 1);
    }

    public function getParams()
    {
        $plugin = WFEditorPlugin::getInstance();

        $defaults = array(
            'width' => $plugin->getParam('aggregator.youtube.width', 560),
            'height' => $plugin->getParam('aggregator.youtube.height', 315),

            'controls' => (int) $plugin->getParam('aggregator.youtube.controls', 1),
            'loop' => (int) $plugin->getParam('aggregator.youtube.loop', 0),
            'autoplay' => (int) $plugin->getParam('aggregator.youtube.autoplay', 0),
            'rel' => (int) $plugin->getParam('aggregator.youtube.related', 1),
            'modestbranding' => (int) $plugin->getParam('aggregator.youtube.modestbranding', 0),
            'privacy' => (int) $plugin->getParam('aggregator.youtube.privacy', 0),
        );

        $attributes = $plugin->getParam('aggregator.youtube.attributes', '');

        if ($attributes) {            
            $defaults['attributes'] = $this->getCustomDefaultAttributes($attributes);
        }

        return $defaults;
    }

    public function getEmbedData($data)
    {
        $params = $this->getParams();

        $default = array(
            'width' => 560,
            'height' => 315,
            'controls' => 1,
            'loop' => 0,
            'autoplay' => 0,
            'rel' => 1,
            'modestbranding' => 0,
            'privacy' => 0,
        );

        $options = array();

        foreach ($params as $name => $value) {
            if (isset($default[$name]) && $value === $default[$name]) {
                continue;
            }

            if ($name == 'width' || $name == 'height' || $name == 'attributes') {
                $data[$name] = $value;
                continue;
            }

            $options[$name] = $value;
        }

        if (!empty($options)) {
            $data['query'] = http_build_query($options);
        }

        return $data;
    }
}
extensions/aggregator/video.php000060400000004422152455721620012713 0ustar00<?php
/**
 * @package     JCE
 * @subpackage  Editor
 *
 * @copyright   Copyright (C) 2005 - 2020 Open Source Matters, Inc. All rights reserved.
 * @copyright   Copyright (c) 2009-2024 Ryan Demmer. All rights reserved
 * @license     GNU General Public License version 2 or later; see LICENSE.txt
 */

\defined('_JEXEC') or die;

class WFAggregatorExtension_Video extends WFAggregatorExtension
{
    /**
     * Constructor activating the default information of the class.
     */
    public function __construct()
    {
        parent::__construct(array(
            'format' => 'video',
        ));
    }

    public function display()
    {
        $document = WFDocument::getInstance();
        $document->addScript('video', 'extensions/aggregator/video/js');
    }

    public function isEnabled()
    {
        return true;
    }

    public function getParams()
    {
        $plugin = WFEditorPlugin::getInstance();

        $defaults = array(
            'width' => $plugin->getParam('aggregator.video.width', ''),
            'height' => $plugin->getParam('aggregator.video.height', ''),

            'controls' => (int) $plugin->getParam('aggregator.video.controls', 1),
            'loop' => (int) $plugin->getParam('aggregator.video.loop', 0),
            'autoplay' => (int) $plugin->getParam('aggregator.video.autoplay', 0),
            'muted' => (int) $plugin->getParam('aggregator.video.mute', 0)
        );

        $attributes = $plugin->getParam('aggregator.video.attributes', '');

        if ($attributes) {            
            $defaults['attributes'] = $this->getCustomDefaultAttributes($attributes);
        }

        return $defaults;
    }

    public function getEmbedData($data, $url)
    {
        $params = $this->getParams();

        $default = array(
            'controls' => 1,
            'loop' => 0,
            'autoplay' => 0,
            'muted' => 0,
        );

        foreach ($params as $name => $value) {
            if ($default[$name] === $value) {
                continue;
            }

            if ($name == 'attributes') {
                $data[$name] = $value;
                continue;
            }

            if ($value !== '') {
                $data[$name] = $value;
            }
        }

        $data['src'] = $url;

        return $data;
    }
}
extensions/aggregator/video.xml000060400000004001152455721620012715 0ustar00<?xml version="1.0" ?>
<extension version="3.4" type="plugin" group="jce" method="upgrade">
	<name>WF_AGGREGATOR_VIDEO_TITLE</name>
	<version>2.9.99.2</version>
	<creationDate>22-04-2026</creationDate>
	<author>Ryan Demmer</author>
	<authorEmail>info@joomlacontenteditor.net</authorEmail>
	<authorUrl>https://www.joomlacontenteditor.net/</authorUrl>
	<copyright>Copyright (C) 2006 - 2026 Ryan Demmer. All rights reserved</copyright>
	<license>GNU/GPL Version 2 or later - http://www.gnu.org/licenses/gpl-2.0.html</license>
	<description>WF_AGGREGATOR_VIDEO_DESC</description>
	<files>
		<filename>video.php</filename>
	</files>
	<fields name="video">
		<fieldset name="aggregator.video">

			<field name="width" type="number" default="" class="input-small" label="WF_LABEL_WIDTH" description="WF_AGGREGATOR_VIDEO_WIDTH_DESC" />
			<field name="height" type="number" default="" class="input-small" label="WF_LABEL_HEIGHT" description="WF_AGGREGATOR_VIDEO_HEIGHT_DESC" />

			<field name="controls" type="yesno" default="1"  label="WF_AGGREGATOR_VIDEO_CONTROLS" description="WF_AGGREGATOR_VIDEO_CONTROLS_DESC">
				<option value="1">JYES</option>
				<option value="0">JNO</option>
			</field>

			<field name="loop" type="yesno" default="0"  label="WF_AGGREGATOR_VIDEO_LOOP" description="WF_AGGREGATOR_VIDEO_LOOP_DESC">
				<option value="1">JYES</option>
				<option value="0">JNO</option>
			</field>

			<field name="autoplay" type="yesno" default="0"  label="WF_AGGREGATOR_VIDEO_AUTOPLAY" description="WF_AGGREGATOR_VIDEO_AUTOPLAY_DESC">
				<option value="1">JYES</option>
				<option value="0">JNO</option>
			</field>

			<field name="mute" type="yesno" default="0"  label="WF_AGGREGATOR_VIDEO_MUTE" description="WF_AGGREGATOR_VIDEO_MUTE_DESC">
				<option value="1">JYES</option>
				<option value="0">JNO</option>
			</field>

			<field name="attributes" type="keyvalue" default="" label="WF_PARAM_CUSTOM_ATTRIBUTES" description="WF_PARAM_CUSTOM_ATTRIBUTES_DESC" boolean="true" />

		</fieldset>
	</fields>
	<plugins></plugins>
</extension>
extensions/aggregator/youtube.xml000060400000005356152455721620013321 0ustar00<?xml version="1.0" ?>
<extension version="3.4" type="plugin" group="jce" method="upgrade">
	<name>WF_AGGREGATOR_YOUTUBE_TITLE</name>
	<version>2.9.99.2</version>
	<creationDate>22-04-2026</creationDate>
	<author>Ryan Demmer</author>
	<authorEmail>info@joomlacontenteditor.net</authorEmail>
	<authorUrl>https://www.joomlacontenteditor.net/</authorUrl>
	<copyright>Copyright (C) 2006 - 2026 Ryan Demmer. All rights reserved</copyright>
	<license>GNU/GPL Version 2 or later - http://www.gnu.org/licenses/gpl-2.0.html</license>
	<description>WF_AGGREGATOR_YOUTUBE_DESC</description>
	<files>
		<filename>youtube.php</filename>
		<folder>youtube</folder>
	</files>
	<fields name="youtube">
		<fieldset name="aggregator.youtube">
			<field name="enable" type="yesno" default="1" label="WF_LABEL_EXTENSION_ENABLE" description="WF_LABEL_EXTENSION_ENABLE_DESC">
				<option value="1">JYES</option>
				<option value="0">JNO</option>
			</field>
			<field name="width" type="number" default="560" class="input-small" label="WF_LABEL_WIDTH" description="WF_AGGREGATOR_YOUTUBE_WIDTH_DESC" />
			<field name="height" type="number" default="315" class="input-small" label="WF_LABEL_HEIGHT" description="WF_AGGREGATOR_YOUTUBE_HEIGHT_DESC" />

			<field name="controls" type="yesno" default="1"  label="WF_AGGREGATOR_YOUTUBE_CONTROLS" description="WF_AGGREGATOR_YOUTUBE_CONTROLS_DESC">
				<option value="1">JYES</option>
				<option value="0">JNO</option>
			</field>

			<field name="related" type="yesno" default="1"  label="WF_AGGREGATOR_YOUTUBE_RELATED" description="WF_AGGREGATOR_YOUTUBE_RELATED_DESC">
				<option value="1">JYES</option>
				<option value="0">JNO</option>
			</field>

			<field name="loop" type="yesno" default="1"  label="WF_AGGREGATOR_YOUTUBE_LOOP" description="WF_AGGREGATOR_YOUTUBE_LOOP_DESC">
				<option value="1">JYES</option>
				<option value="0">JNO</option>
			</field>

			<field name="autoplay" type="yesno" default="0"  label="WF_AGGREGATOR_YOUTUBE_AUTOPLAY" description="WF_AGGREGATOR_YOUTUBE_AUTOPLAY_DESC">
				<option value="1">JYES</option>
				<option value="0">JNO</option>
			</field>

			<field name="privacy" type="yesno" default="0"  label="WF_AGGREGATOR_YOUTUBE_PRIVACY" description="WF_AGGREGATOR_YOUTUBE_PRIVACY_DESC">
				<option value="1">JYES</option>
				<option value="0">JNO</option>
			</field>

			<field name="modestbranding" type="yesno" default="0"  label="WF_AGGREGATOR_YOUTUBE_MODESTBRANDING" description="WF_AGGREGATOR_YOUTUBE_MODESTBRANDING_DESC">
				<option value="1">JYES</option>
				<option value="0">JNO</option>
			</field>

			<field name="attributes" type="keyvalue" default="" label="WF_PARAM_CUSTOM_ATTRIBUTES" description="WF_PARAM_CUSTOM_ATTRIBUTES_DESC" boolean="true" />
		</fieldset>
	</fields>
	<plugins></plugins>
</extension>
extensions/aggregator/video/index.html000060400000000054152455721620014174 0ustar00<html><body bgcolor="#FFFFFF"></body></html>extensions/aggregator/video/js/index.html000060400000000054152455721620014610 0ustar00<html><body bgcolor="#FFFFFF"></body></html>extensions/aggregator/video/js/video.js000060400000005547152455721620014273 0ustar00/* jce - 2.9.99.2 | 2026-04-22 | https://www.joomlacontenteditor.net | Source: https://github.com/widgetfactory/jce | Copyright (C) 2006 - 2026 Ryan Demmer. All rights reserved | GNU/GPL Version 2 or later - http://www.gnu.org/licenses/gpl-2.0.html */
WFAggregator.add("video", {
    params: {
        width: "",
        height: ""
    },
    props: {
        autoplay: 0,
        loop: 0,
        controls: 1,
        muted: 0
    },
    setup: function() {
        var x = 0;
        $.each(this.params, function(k, v) {
            "attributes" == k ? $.each(v, function(key, value) {
                var $repeatable = $(".media_option.video .uk-repeatable"), $repeatable = (0 < x && ($repeatable.eq(0).clone(!0).appendTo($repeatable.parent()), 
                $repeatable = $(".media_option.video .uk-repeatable")), $repeatable.eq(x).find("input, select"));
                $repeatable.eq(0).val(key), $repeatable.eq(1).val(value), x++;
            }) : $("#video_" + k).val(v).filter(":checkbox, :radio").prop("checked", !!v);
        });
    },
    getTitle: function() {
        return this.title || this.name;
    },
    getType: function() {
        return "video";
    },
    isSupported: function(v) {
        return !!v && (v = v.split("?")[0], !!/\.(mp4|m4v|ogv|ogg|webm)$/.test(v)) && "video";
    },
    getValues: function(data) {
        var sources = [];
        return $("input[id], select[id]", "#video_options").each(function() {
            var key = $(this).attr("id"), val = $(this).val();
            if (!key) return !0;
            "checkbox" === this.type && (val = !!this.checked), data[key] = val;
        }), $('input[name="video_source[]"]').each(function() {
            var val = $(this).val();
            val !== data.src && sources.push(val);
        }), sources.length && (data.video_source = sources), $(".uk-repeatable", "#video_attributes").each(function() {
            var elements = $("input, select", this), key = $(elements).eq(0).val(), elements = $(elements).eq(1).val();
            key && (data["video_" + key] = elements);
        }), data;
    },
    setValues: function(data) {
        var x = 0, self = this;
        return $.each(data, function(key, val) {
            if (-1 === key.indexOf("video_")) return !0;
            if ((key = key.substr(key.indexOf("_") + 1)) in self.props) return !0;
            "" != val && 1 != val || (val = key);
            var $repeatable = $(".uk-repeatable", "#video_attributes"), $repeatable = (0 < x && ($repeatable.eq(0).clone(!0).appendTo($repeatable.parent()), 
            $repeatable = $(".uk-repeatable", "#video_attributes")), $repeatable.eq(x).find("input, select"));
            $repeatable.eq(0).val(key), $repeatable.eq(1).val(val), x++;
        }), data;
    },
    getAttributes: function(src) {
        return {
            width: this.params.width,
            height: this.params.height
        };
    }
});extensions/links/index.html000060400000000054152455721620012064 0ustar00<html><body bgcolor="#FFFFFF"></body></html>extensions/links/joomlalinks/index.html000060400000000054152455721620014406 0ustar00<html><body bgcolor="#FFFFFF"></body></html>extensions/links/joomlalinks/weblinks.php000060400000021210152455721620014735 0ustar00<?php
/**
 * @package     JCE
 * @subpackage  Editor
 *
 * @copyright   Copyright (C) 2005 - 2020 Open Source Matters, Inc. All rights reserved.
 * @copyright   Copyright (c) 2009-2024 Ryan Demmer. All rights reserved
 * @license     GNU General Public License version 2 or later; see LICENSE.txt
 */

\defined('_JEXEC') or die;

use Joomla\CMS\Factory;
use Joomla\CMS\Language\Text;
use Joomla\CMS\Object\CMSObject;

class JoomlalinksWeblinks extends CMSObject
{
    private $option = 'com_weblinks';

    /**
     * Returns a reference to a editor object.
     * @return JCE The editor object
     *
     * @since    1.5
     */
    public static function getInstance($options = array())
    {
        static $instance;

        if (!is_object($instance)) {
            $instance = new self($options);
        }

        return $instance;
    }

    public function getOption()
    {
        return $this->option;
    }

    public function getList()
    {
        return '<li id="index.php?option=com_weblinks&view=categories" class="folder menu nolink"><div class="uk-tree-row"><a href="#"><span class="uk-tree-icon"></span><span class="uk-tree-text">' . Text::_('WF_LINKS_JOOMLALINKS_WEBLINKS') . '</span></a></div></li>';
    }

    public function getLinks($args)
    {
        $wf = WFEditorPlugin::getInstance();
        $items = array();

        $version = new Joomla\CMS\Version();

        if (!$version->isCompatible('4.0')) {
            require_once JPATH_SITE . '/includes/application.php';
        }

        require_once JPATH_SITE . '/components/com_weblinks/helpers/route.php';

        $language = '';

        switch ($args->view) {
            // Get all WebLink categories
            default:
            case 'categories':
                $categories = WFLinkBrowser::getCategory('com_weblinks', 1, $wf->getParam('links.joomlalinks.category_alias', 1));

                foreach ($categories as $category) {
                    $url = '';

                    if (method_exists('WeblinksHelperRoute', 'getCategoryRoute')) {
                        // language
                        if (isset($category->language)) {
                            $language = $category->language;
                        }

                        $id = WeblinksHelperRoute::getCategoryRoute($category->id, $language);

                        if (strpos($id, 'index.php?Itemid=') !== false) {
                            $url = $id;
                            $id = 'index.php?option=com_weblinks&view=category&id=' . $category->id;
                        }
                    } else {
                        $itemid = WFLinkBrowser::getItemId('com_weblinks', array('categories' => null, 'category' => $category->id));
                        $id = 'index.php?option=com_weblinks&view=category&id=' . $category->id . $itemid;
                    }

                    $items[] = array(
                        'url' => self::route($url),
                        'id' => $id,
                        'name' => $category->title . ' / ' . $category->alias,
                        'class' => 'folder weblink',
                    );
                }
                break;
            // Get all links in the category
            case 'category':
                $categories = WFLinkBrowser::getCategory('com_weblinks', $args->id, $wf->getParam('links.joomlalinks.category_alias', 1));

                if (count($categories)) {
                    foreach ($categories as $category) {
                        $children = WFLinkBrowser::getCategory('com_weblinks', $category->id, $wf->getParam('links.joomlalinks.category_alias', 1));

                        $url = '';

                        if ($children) {
                            $id = 'index.php?option=com_weblinks&view=category&id=' . $category->id;
                        } else {
                            if (method_exists('WeblinksHelperRoute', 'getCategoryRoute')) {
                                // language
                                if (isset($category->language)) {
                                    $language = $category->language;
                                }

                                $id = WeblinksHelperRoute::getCategoryRoute($category->id, $language);

                                if (strpos($id, 'index.php?Itemid=') !== false) {
                                    $url = $id;
                                    $id = 'index.php?option=com_weblinks&view=category&id=' . $category->id;
                                }
                            } else {
                                $itemid = WFLinkBrowser::getItemId('com_weblinks', array('categories' => null, 'category' => $category->id));
                                $id = 'index.php?option=com_weblinks&view=category&id=' . $category->id . $itemid;
                            }
                        }

                        $items[] = array(
                            'url' => self::route($url),
                            'id' => $id,
                            'name' => $category->title . ' / ' . $category->alias,
                            'class' => 'folder weblink',
                        );
                    }
                }

                $weblinks = self::getWeblinks($args->id);

                foreach ($weblinks as $weblink) {
                    // language

                    if (isset($weblink->language)) {
                        $language = $weblink->language;
                    }

                    $id = WeblinksHelperRoute::getWeblinkRoute($weblink->slug, $weblink->catslug, $language);

                    // Joomla 4/5/6
                    if ($version->isCompatible('4.0')) {
                        $id .= '&task=weblink.go';
                    }

                    $items[] = array(
                        'id' => self::route($id),
                        'name' => $weblink->title . ' / ' . $weblink->alias,
                        'class' => 'file',
                    );
                }
                break;
        }

        return $items;
    }

    public static function getWeblinks($id)
    {
        $wf = WFEditorPlugin::getInstance();

        $db = Factory::getDBO();
        $user = Factory::getUser();

        $query = $db->getQuery(true);

        $section = Text::_('Web Links');

        $query = $db->getQuery(true);

        $case = '';

        if ((int) $wf->getParam('links.joomlalinks.weblinks_alias', 0)) {
            //sqlsrv changes
            $case_when1 = ' CASE WHEN ';
            $case_when1 .= $query->charLength('a.alias', '!=', '0');
            $case_when1 .= ' THEN ';

            // Joomla 3 compatibility
            if (method_exists($query, 'castAsChar')) {
                $a_id = $query->castAsChar('a.id');
            } else {
                $a_id = $query->castAs('CHAR', 'a.id');
            }

            $case_when1 .= $query->concatenate(array($a_id, 'a.alias'), ':');
            $case_when1 .= ' ELSE ';
            $case_when1 .= $a_id . ' END as slug';

            $case_when2 = ' CASE WHEN ';
            $case_when2 .= $query->charLength('b.alias', '!=', '0');
            $case_when2 .= ' THEN ';

            // Joomla 3 compatibility
            if (method_exists($query, 'castAsChar')) {
                $c_id = $query->castAsChar('b.id');
            } else {
                $c_id = $query->castAs('CHAR', 'b.id');
            }

            $case_when2 .= $query->concatenate(array($c_id, 'b.alias'), ':');
            $case_when2 .= ' ELSE ';
            $case_when2 .= $c_id . ' END as catslug';

            $case .= ',' . $case_when1 . ',' . $case_when2;
        }

        $query->select('a.id AS slug, b.id AS catslug, a.title AS title, a.description AS text, a.url, a.alias, a.language' . $case);

        $query->from('#__weblinks AS a');
        $query->innerJoin('#__categories AS b ON b.id = ' . (int) $id);
        $query->where('a.catid = ' . (int) $id);

        $query->where('a.state = 1');

        if (!$user->authorise('core.admin')) {
            $query->where('b.access IN (' . implode(',', $user->getAuthorisedViewLevels()) . ')');
        }

        $query->where('b.published = 1');
        $query->order('a.title');

        $db->setQuery($query, 0);

        return $db->loadObjectList();
    }

    private static function route($url)
    {
        $wf = WFEditorPlugin::getInstance();

        if ($wf->getParam('links.joomlalinks.sef_url', 0)) {
            $url = WFLinkHelper::route($url);
        }

        // remove Itemid if "home"
        $url = WFLinkHelper::removeHomeItemId($url);

        // remove Itemid
        if ((bool) $wf->getParam('links.joomlalinks.itemid', 1) === false) {
            $url = WFLinkHelper::removeItemId($url);
        }

        return $url;
    }
}
extensions/links/joomlalinks/content.php000060400000026216152455721620014604 0ustar00<?php
/**
 * @package     JCE
 * @subpackage  Editor
 *
 * @copyright   Copyright (C) 2005 - 2020 Open Source Matters, Inc. All rights reserved.
 * @copyright   Copyright (c) 2009-2024 Ryan Demmer. All rights reserved
 * @license     GNU General Public License version 2 or later; see LICENSE.txt
 */

\defined('_JEXEC') or die;

use Joomla\CMS\Factory;
use Joomla\CMS\Helper\RouteHelper;
use Joomla\CMS\Language\Text;
use Joomla\CMS\Object\CMSObject;
use Joomla\CMS\Table\Table;

class JoomlalinksContent extends CMSObject
{
    private $option = 'com_content';

    /**
     * Returns a reference to a editor object.
     *
     * @return JCE The editor object
     *
     * @since    1.5
     */
    public static function getInstance($options = array())
    {
        static $instance;

        if (!is_object($instance)) {
            $instance = new self($options);
        }

        return $instance;
    }

    public function getOption()
    {
        return $this->option;
    }

    public function getList()
    {
        return '<li id="index.php?option=com_content" class="folder content nolink"><div class="uk-tree-row"><a href="#"><span class="uk-tree-icon"></span><span class="uk-tree-text">' . Text::_('WF_LINKS_JOOMLALINKS_CONTENT') . '</span></a></div></li>';
    }

    public function getLinks($args)
    {
        $items = array();
        $view = isset($args->view) ? $args->view : '';

        $language = '';

        // create a new RouteHelper instance
        $router = new RouteHelper();

        switch ($view) {
            // get top-level categories
            default:
                $articles = array();

                if (!isset($args->id)) {
                    $args->id = 1;
                }

                $categories = WFLinkBrowser::getCategory('com_content', $args->id);

                // get any articles in this category (in Joomla! 1.6+ a category can contain sub-categories and articles)
                $articles = self::getArticles($args->id);

                foreach ($categories as $category) {
                    $url = '';

                    if (isset($category->language)) {
                        $language = $category->language;
                    }

                    $id = RouteHelper::getCategoryRoute($category->id, $language, 'com_content');

                    $url = $id;

                    if (strpos($id, 'index.php?Itemid=') !== false) {
                        $url = self::getMenuLink($id);
                        $id = 'index.php?option=com_content&view=category&id=' . $category->id;
                    }

                    $items[] = array(
                        'url' => self::route($url),
                        'id' => $id,
                        'name' => $category->title . ' / ' . $category->alias,
                        'class' => 'folder content',
                    );
                }

                if (!empty($articles)) {
                    // output article links
                    foreach ($articles as $article) {
                        if (isset($article->language)) {
                            $language = $article->language;
                        }

                        $id = $router->getRoute($article->slug, 'com_content.article', '', $language, $article->catslug);
                        $id = self::route($id);

                        $items[] = array(
                            'id' => $id,
                            'name' => $article->title . ' / ' . $article->alias,
                            'class' => 'file',
                        );

                        $anchors = self::getAnchors($article->content);

                        foreach ($anchors as $anchor) {
                            $items[] = array(
                                'id' => $id . '#' . $anchor,
                                'name' => '#' . $anchor,
                                'class' => 'file anchor',
                            );
                        }
                    }
                }

                break;
            // get articles and / or sub-categories
            case 'category':
                // get any articles in this category (in Joomla! 1.6+ a category can contain sub-categories and articles)
                $articles = self::getArticles($args->id);

                // get sub-categories
                $categories = WFLinkBrowser::getCategory('com_content', $args->id);

                if (count($categories)) {
                    foreach ($categories as $category) {
                        // check for sub-categories
                        $sub = WFLinkBrowser::getCategory('com_content', $category->id);

                        // language
                        if (isset($category->language)) {
                            $language = $category->language;
                        }

                        $id = RouteHelper::getCategoryRoute($category->id, $language, 'com_content');
                        $url = $id;

                        // get sub-categories
                        if (count($sub)) {
                            $url = $id;
                            $id = 'index.php?option=com_content&view=section&id=' . $category->id;
                            // no sub-categories, get articles for category
                        } else {
                            // no com_content, might be link like index.php?ItemId=1
                            if (strpos($id, 'index.php?Itemid=') !== false) {
                                $url = $id;
                                $id = 'index.php?option=com_content&view=category&id=' . $category->id;
                            }
                        }

                        if (strpos($url, 'index.php?Itemid=') !== false) {
                            $url = self::getMenuLink($url);
                        }

                        $items[] = array(
                            'url' => self::route($url),
                            'id' => $id,
                            'name' => $category->title . ' / ' . $category->alias,
                            'class' => 'folder content',
                        );
                    }
                }

                // output article links
                foreach ($articles as $article) {
                    // language
                    if (isset($article->language)) {
                        $language = $article->language;
                    }

                    $id = $router->getRoute($article->slug, 'com_content.article', '', $language, $article->catslug);
                    $id = self::route($id);

                    $items[] = array(
                        'id' => $id,
                        'name' => $article->title . ' / ' . $article->alias,
                        'class' => 'file' . ($article->state ? '' : ' unpublished uk-text-muted'),
                    );

                    $anchors = self::getAnchors($article->content);

                    foreach ($anchors as $anchor) {
                        $items[] = array(
                            'id' => $id . '#' . $anchor,
                            'name' => '#' . $anchor,
                            'class' => 'file anchor',
                        );
                    }
                }

                break;
        }

        return $items;
    }

    private static function getMenuLink($url)
    {
        $wf = WFEditorPlugin::getInstance();

        // resolve the url from the menu link
        if ($wf->getParam('links.joomlalinks.article_resolve_alias', 1)) {
            // get itemid
            preg_match('#Itemid=([\d]+)#', $url, $matches);
            // get link from menu
            if (count($matches) > 1) {
                $menu = Table::getInstance('menu');
                $menu->load($matches[1]);

                if ($menu->link) {
                    return $menu->link . '&Itemid=' . $menu->id;
                }
            }
        }

        return $url;
    }

    private function getArticles($id)
    {
        $db = Factory::getDBO();
        $user = Factory::getUser();

        $wf = WFEditorPlugin::getInstance();

        $query = $db->getQuery(true);

        $case = '';

        if ($wf->getParam('links.joomlalinks.article_alias', 0)) {
            //sqlsrv changes
            $case_when1 = ' CASE WHEN ';
            $case_when1 .= $query->charLength('a.alias', '!=', '0');
            $case_when1 .= ' THEN ';

            // Joomla 3 compatibility
            if (method_exists($query, 'castAsChar')) {
                $a_id = $query->castAsChar('a.id');
            } else {
                $a_id = $query->castAs('CHAR', 'a.id');
            }

            $case_when1 .= $query->concatenate(array($a_id, 'a.alias'), ':');
            $case_when1 .= ' ELSE ';
            $case_when1 .= $a_id . ' END as slug';

            $case_when2 = ' CASE WHEN ';
            $case_when2 .= $query->charLength('b.alias', '!=', '0');
            $case_when2 .= ' THEN ';

            // Joomla 3 compatibility
            if (method_exists($query, 'castAsChar')) {
                $c_id = $query->castAsChar('b.id');
            } else {
                $c_id = $query->castAs('CHAR', 'b.id');
            }

            $case_when2 .= $query->concatenate(array($c_id, 'b.alias'), ':');
            $case_when2 .= ' ELSE ';
            $case_when2 .= $c_id . ' END as catslug';

            $case = ',' . $case_when1 . ',' . $case_when2;
        }

        $groups = implode(',', $user->getAuthorisedViewLevels());

        $query->select('a.id AS slug, b.id AS catslug, a.alias, a.state, a.title AS title, a.access, ' . $query->concatenate(array('a.introtext', 'a.fulltext')) . ' AS content, a.language' . $case);
        $query->from('#__content AS a');
        $query->innerJoin('#__categories AS b ON b.id = ' . (int) $id);

        $query->where('a.catid = ' . (int) $id);

        if ($wf->getParam('links.joomlalinks.article_unpublished', 0) == 1) {
            $query->where('(a.state = 0 OR a.state = 1)');
        } else {
            $query->where('a.state = 1');
        }

        if (!$user->authorise('core.admin')) {
            $query->where('a.access IN (' . $groups . ')');
            $query->where('b.access IN (' . $groups . ')');
        }

        $query->order('a.title');

        $db->setQuery($query, 0);

        return $db->loadObjectList();
    }

    private static function getAnchors($content)
    {
        preg_match_all('#<a([^>]+)(name|id)="([a-z]+[\w\-\:\.]*)"([^>]*)>#i', $content, $matches, PREG_SET_ORDER);

        $anchors = array();

        if (!empty($matches)) {
            foreach ($matches as $match) {
                if (strpos($match[0], 'href') === false) {
                    $anchors[] = $match[3];
                }
            }
        }

        return $anchors;
    }

    private static function route($url)
    {
        $wf = WFEditorPlugin::getInstance();

        if ((bool) $wf->getParam('links.joomlalinks.sef_url', 0)) {
            $url = WFLinkHelper::route($url);
        }

        // remove Itemid if "home"
        $url = WFLinkHelper::removeHomeItemId($url);

        // remove Itemid if set
        if ((bool) $wf->getParam('links.joomlalinks.itemid', 1) === false) {
            $url = WFLinkHelper::removeItemId($url);
        }

        return $url;
    }
}
extensions/links/joomlalinks/contact.php000060400000012325152455721620014561 0ustar00<?php
/**
 * @package     JCE
 * @subpackage  Editor
 *
 * @copyright   Copyright (C) 2005 - 2020 Open Source Matters, Inc. All rights reserved.
 * @copyright   Copyright (c) 2009-2024 Ryan Demmer. All rights reserved
 * @license     GNU General Public License version 2 or later; see LICENSE.txt
 */

\defined('_JEXEC') or die;

use Joomla\CMS\Factory;
use Joomla\CMS\Language\Text;
use Joomla\CMS\Object\CMSObject;
use Joomla\CMS\Helper\RouteHelper;

class JoomlalinksContact extends CMSObject
{
    private $option = 'com_contact';

    /**
     * Returns a reference to a editor object.
     *
     * @return JCE The editor object
     *
     * @since    1.5
     */
    public static function getInstance($options = array())
    {
        static $instance;

        if (!is_object($instance)) {
            $instance = new self($options);
        }

        return $instance;
    }

    public function getOption()
    {
        return $this->option;
    }

    public function getList()
    {
        return '<li id="index.php?option=com_contact" class="folder contact nolink"><div class="uk-tree-row"><a href="#"><span class="uk-tree-icon"></span><span class="uk-tree-text">' . Text::_('WF_LINKS_JOOMLALINKS_CONTACTS') . '</span></a></div></li>';
    }

    public function getLinks($args)
    {
        $items = array();
        $view = isset($args->view) ? $args->view : '';

        $language = '';

        // create a new RouteHelper instance
        $router = new RouteHelper();

        switch ($view) {
            default:
                $categories = WFLinkBrowser::getCategory('com_contact', 1, $this->get('category_alias', 1));

                foreach ($categories as $category) {
                    // language
                    if (isset($category->language)) {
                        $language = $category->language;
                    }

                    $url = RouteHelper::getCategoryRoute($category->id, $language, 'com_contact');

                    // convert to SEF
                    $url = self::route($url);

                    $items[] = array(
                        'id' => 'index.php?option=com_contact&view=category&id=' . $category->id,
                        'url' => $url,
                        'name' => $category->title . ' / ' . $category->alias,
                        'class' => 'folder contact',
                    );
                }
                break;
            case 'category':
                $categories = WFLinkBrowser::getCategory('com_contact', $args->id, $this->get('category_alias', 1));

                foreach ($categories as $category) {
                    $children = WFLinkBrowser::getCategory('com_contact', $category->id, $this->get('category_alias', 1));

                    // language
                    if (isset($category->language)) {
                        $language = $category->language;
                    }

                    if ($children) {
                        $id = RouteHelper::getCategoryRoute($category->id, $language, 'com_contact');
                    } else {
                        $id = RouteHelper::getCategoryRoute($category->slug, $language, 'com_contact');
                    }

                    // convert to SEF
                    $url = self::route($id);

                    $items[] = array(
                        'url' => $url,
                        'id' => $id,
                        'name' => $category->title . ' / ' . $category->alias,
                        'class' => 'folder content',
                    );
                }

                $contacts = self::getContacts($args->id);

                foreach ($contacts as $contact) {
                    // language
                    if (isset($contact->language)) {
                        $language = $contact->language;
                    }

                    $id = $router->getRoute($contact->id, 'com_contact.contact', '', $language, $args->id);
                    $id = self::route($id);

                    $items[] = array(
                        'id' => $id,
                        'name' => $contact->name . ' / ' . $contact->alias,
                        'class' => 'file',
                    );
                }
                break;
        }

        return $items;
    }

    private static function route($url)
    {
        $wf = WFEditorPlugin::getInstance();

        if ((bool) $wf->getParam('links.joomlalinks.sef_url', 0)) {
            $url = WFLinkHelper::route($url);
        }

        // remove Itemid if "home"
        $url = WFLinkHelper::removeHomeItemId($url);

        // remove Itemid
        if ((bool) $wf->getParam('links.joomlalinks.itemid', 1) === false) {
            $url = WFLinkHelper::removeItemId($url);
        }

        return $url;
    }

    private static function getContacts($id)
    {
        $db = Factory::getDBO();
        $user = Factory::getUser();

        $query = $db->getQuery(true);
        $query->select('id, name, alias, language')->from('#__contact_details')->where(array('catid=' . (int) $id, 'published = 1'));

        if (!$user->authorise('core.admin')) {
            $query->where('access IN (' . implode(',', $user->getAuthorisedViewLevels()) . ')');
        }

        $db->setQuery($query);

        return $db->loadObjectList();
    }
}
extensions/links/joomlalinks/css/joomlalinks.css000060400000000056152455721620016237 0ustar00.unpublished .uk-icon::before{content:"\e99d"}extensions/links/joomlalinks/css/index.html000060400000000054152455721620015176 0ustar00<html><body bgcolor="#FFFFFF"></body></html>extensions/links/joomlalinks/menu.php000060400000024121152455721620014067 0ustar00<?php
/**
 * @package     JCE
 * @subpackage  Editor
 *
 * @copyright   Copyright (C) 2005 - 2020 Open Source Matters, Inc. All rights reserved.
 * @copyright   Copyright (c) 2009-2024 Ryan Demmer. All rights reserved
 * @license     GNU General Public License version 2 or later; see LICENSE.txt
 */

\defined('_JEXEC') or die;

use Joomla\CMS\Factory;
use Joomla\CMS\Language\Text;
use Joomla\CMS\Object\CMSObject;
use Joomla\Registry\Registry;
use Joomla\CMS\Uri\Uri;

class JoomlalinksMenu extends CMSObject
{
    private $option = 'com_menu';

    /**
     * Returns a reference to a editor object.
     * @return JCE The editor object
     *
     * @since    1.5
     */
    public static function getInstance($options = array())
    {
        static $instance;

        if (!is_object($instance)) {
            $instance = new self($options);
        }

        return $instance;
    }

    public function getOption()
    {
        return $this->option;
    }

    public function getList()
    {
        return '<li id="index.php?option=com_menu" class="folder menu nolink"><div class="uk-tree-row"><a href="#"><span class="uk-tree-icon"></span><span class="uk-tree-text">' . Text::_('WF_LINKS_JOOMLALINKS_MENU') . '</span></a></div></li>';
    }

    public function getLinks($args)
    {
        $items = array();
        $view = isset($args->view) ? $args->view : '';
        switch ($view) {
            // create top-level (non-linkable) menu types
            default:
                $types = self::getMenuTypes();
                foreach ($types as $type) {
                    $items[] = array(
                        'id' => 'index.php?option=com_menu&view=menu&type=' . $type->id,
                        'name' => $type->title,
                        'class' => 'folder menu nolink',
                    );
                }
                break;
            // get menus and sub-menus
            case 'menu':
                $type = isset($args->type) ? $args->type : 0;
                $id = $type ? 0 : $args->id;

                $menus = self::getMenu($id, $type);

                foreach ($menus as $menu) {
                    $class = array();

                    // bypass errors in menu parameters syntax
                    try {
                        $params = new Registry($menu->params);
                    } catch (Exception $e) {
                        $params = new Registry();
                    }

                    switch ($menu->type) {
                        case 'separator':
                            if (!$menu->link) {
                                $class[] = 'nolink';
                            }

                            $link = '';
                            break;

                        case 'alias':
                            // If this is an alias use the item id stored in the parameters to make the link.
                            $link = 'index.php?Itemid=' . $params->get('aliasoptions');
                            break;

                        default:
                            // resolve link
                            $link = $this->resolveLink($menu);
                            break;
                    }

                    $children = (int) self::getChildren($menu->id);
                    $title = isset($menu->name) ? $menu->name : $menu->title;

                    if ($children) {
                        $class = array_merge($class, array('folder', 'menu'));
                    } else {
                        $class[] = 'file';
                    }

                    if ($params->get('secure')) {
                        $link = self::toSSL($link);
                    }

                    // language
                    if (isset($menu->language)) {
                        $link .= $this->getLangauge($menu->language);
                    }

                    $items[] = array(
                        'id' => $children ? 'index.php?option=com_menu&view=menu&id=' . $menu->id : $link,
                        'url' => self::route($link),
                        'name' => $title . ' / ' . $menu->alias,
                        'class' => implode(' ', $class),
                    );
                }
                break;
            // get menu items
            case 'submenu':
                $menus = self::getMenu($args->id);
                foreach ($menus as $menu) {
                    if ($menu->type == 'menulink') {
                        //$menu = AdvlinkMenu::_alias($menu->id);
                    }

                    $children = (int) self::getChildren($menu->id);

                    $title = isset($menu->name) ? $menu->name : $menu->title;

                    // get params
                    $params = new Registry($menu->params);

                    // resolve link
                    $link = $this->resolveLink($menu);

                    // language
                    if (isset($menu->language)) {
                        $link .= $this->getLangauge($menu->language);
                    }

                    if ($params->get('secure')) {
                        $link = self::toSSL($link);
                    }

                    $items[] = array(
                        'id' => self::route($link),
                        'name' => $title . ' / ' . $menu->alias,
                        'class' => $children ? 'folder menu' : 'file',
                    );
                }
                break;
        }

        return $items;
    }

    /**
     * Convert link to SSL.
     *
     * @param type $link
     *
     * @return string
     */
    private static function toSSL($link)
    {
        if (strcasecmp(substr($link, 0, 4), 'http') && (strpos($link, 'index.php?') !== false)) {
            $uri = Uri::getInstance();

            // Get prefix
            $prefix = $uri->toString(array('host', 'port'));

            // trim slashes
            $link = trim($link, '/');

            // Build the URL.
            $link = 'https://' . $prefix . '/' . $link;
        }

        return $link;
    }

    private function resolveLink($menu)
    {
        $wf = WFEditorPlugin::getInstance();

        // get link from menu object
        $link = $menu->link;

        // internal link
        if ($link && strpos($link, 'index.php') === 0) {
            if ((bool) $wf->getParam('links.joomlalinks.menu_resolve_alias', 0)) {
                // no Itemid
                if (strpos($link, 'Itemid=') === false) {
                    $link .= '&Itemid=' . $menu->id;
                }
                // short link
            } else {
                $link = 'index.php?Itemid=' . $menu->id;
            }
        }

        return $link;
    }

    private static function getMenuTypes()
    {
        $db = Factory::getDBO();

        $query = $db->getQuery(true);

        $query->select('*')->from('#__menu_types')->where('client_id = 0')->order('title');

        $db->setQuery($query, 0);

        return $db->loadObjectList();
    }

    private static function getAlias($id)
    {
        $db = Factory::getDBO();
        $user = Factory::getUser();

        $query = $db->getQuery(true);

        $query->select('params')->from('#__menu')->where('id = ' . (int) $id);

        $db->setQuery($query, 0);
        $params = new Registry($db->loadResult());

        $query->clear();
        $query->select('id, name, link, alias')->from('#__menu')->where(array('published = 1', 'id = ' . (int) $params->get('menu_item')));

        if (!$user->authorise('core.admin')) {
            $query->where('access IN (' . implode(',', $user->getAuthorisedViewLevels()) . ')');
        }

        $query->order('name');

        $db->setQuery($query, 0);

        return $db->loadObject();
    }

    private static function getChildren($id)
    {
        $db = Factory::getDBO();
        $user = Factory::getUser();

        $query = $db->getQuery(true);

        $query->select('COUNT(id)')->from('#__menu')->where(array('published = 1', 'client_id = 0'));

        if (!$user->authorise('core.admin')) {
            $query->where('access IN (' . implode(',', $user->getAuthorisedViewLevels()) . ')');
        }

        if ($id) {
            $query->where('parent_id = ' . (int) $id);
        }

        $db->setQuery($query, 0);

        return $db->loadResult();
    }

    private static function getMenu($parent = 0, $type = 0)
    {
        $db = Factory::getDBO();
        $user = Factory::getUser();

        $query = $db->getQuery(true);

        $query->select('m.*')->from('#__menu AS m');

        if ($type) {
            $query->innerJoin('#__menu_types AS s ON s.id = ' . (int) $type);
            $query->where('m.menutype = s.menutype');
        }

        if ($parent == 0) {
            $parent = 1;
        }

        $query->where(array('m.published = 1', 'm.parent_id = ' . (int) $parent));

        if (!$user->authorise('core.admin')) {
            $query->where('m.access IN (' . implode(',', $user->getAuthorisedViewLevels()) . ')');
        }

        // only site menu items
        $query->where('m.client_id = 0');

        $query->order('m.lft ASC');

        $db->setQuery($query, 0);

        return $db->loadObjectList();
    }

    private function getLangauge($language)
    {
        $db = Factory::getDBO();
        $query = $db->getQuery(true);

        $link = '';

        $query->select('a.sef AS sef');
        $query->select('a.lang_code AS lang_code');
        $query->from('#__languages AS a');
        $db->setQuery($query);
        $langs = $db->loadObjectList();

        foreach ($langs as $lang) {
            if ($language == $lang->lang_code) {
                $language = $lang->sef;
                $link .= '&lang=' . $language;
            }
        }
        return $link;
    }

    private static function route($url)
    {
        $wf = WFEditorPlugin::getInstance();

        if ((bool) $wf->getParam('links.joomlalinks.sef_url', 0)) {
            $url = WFLinkHelper::route($url);
        }

        // remove Itemid if "home"
        $url = WFLinkHelper::removeHomeItemId($url);

        // remove Itemid
        if ((bool) $wf->getParam('links.joomlalinks.itemid', 1) === false) {
            $url = WFLinkHelper::removeItemId($url);
        }

        return $url;
    }
}
extensions/links/joomlalinks/img/icons.png000060400000012330152455721620015006 0ustar00�PNG


IHDR�����iCCPICC Profile(��T�OA-�b�""6�l<hc�,hbD[Z�֦|��l��ve�]g��#o�ƻ�#��������1!�5Fc��b���vQ��dv~��o~�͛��(�J�I3��0>1)4�� �FA�$z$�l����7`�z������1d����!��ԍ�:5�5�wO�:�z�i�� �cl,2��q��d��#>(��"ⶬ�^�a;�5'�F�"�iZ�+*����Zq��ޤ���'���Q�X��\q���Q�L�8�q-��j���ʃ��<Gbq�O��Fu8�r�})���4�FB�C7ӎN�USSC�~���aמW���=���������ay�@�R����$ڨ��.��b��;�!
(�A�@�8&Ъ�G�( CY�.���{*�e+� ���=�zC�W�}ݳ��R����(	�܀�]f;���r����-]_oZ��j��b	�b�>_ym1�)�ɝ�v
�<��V�,n���g�?Ԩ�K�"��̳_�9���g�8
��W�i+��4�E���,���q��Kr�\�%�2���pv�r|�����|��0��?�������۫���E|i��U�)ku����̘�R���Y����%��>KDHjrG� ��`����*�u{��븕�޲@˪g3�\����g���0���la�S�,��+����@�5��?�eϚ��漯ն�~4<ع_�}R��<E�M�W�O�#
�C��	pHYs��~�6iTXtXML:com.adobe.xmp<x:xmpmeta xmlns:x="adobe:ns:meta/" x:xmptk="XMP Core 4.4.0">
   <rdf:RDF xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#">
      <rdf:Description rdf:about=""
            xmlns:dc="http://purl.org/dc/elements/1.1/">
         <dc:subject>
            <rdf:Bag/>
         </dc:subject>
      </rdf:Description>
      <rdf:Description rdf:about=""
            xmlns:xmp="http://ns.adobe.com/xap/1.0/">
         <xmp:CreatorTool>Adobe Fireworks CS5 11.0.0.484 Macintosh</xmp:CreatorTool>
      </rdf:Description>
   </rdf:RDF>
</x:xmpmeta>
Ifn=IDATh��{p\�}�?�ܻ+��I�~�,ٵ���Ȏ)$�L�y�4�LB�G�ԙv �$L���@�3a�6褍)�L3ng�q���1㗂L?�a�ڕ֫ݽ{���.+�ݕ�C�f�읽�|���s����֚3䇊��4'k7lX������)����q���f���7?���i�F���p�7��g��v�bʞ능�糯����\���##���a�x�+��lV��a>1o�vw38<\lx�W���ļy��a�lV�� =����t]y%{f0����q�`"��Ç��J��0���%8���U
���t-X�+r.��<��\<�+ҵ`�p��p�B�n�8)v:-]��]�@M
3g�d�|r�����@MM��0M�t�0���3���d����4���;x�OvvRWW�w���d�$�c���C2~=ۖ�֤-������#�$�йh�H��'���\�k{^��϶��RFֲ8{�<M��H�U
�H�����}�$���8Y��r5�K�]�p�D"�v_mW\A0�/ފ�yE3C��W�=X=o�5��FV��ٳ��^���~�mv/�j�U���k�Y����R2����A�@0}�cC]��ޅ�
u�>��{c��
VcXL�o��
l:� 9���G|�؏>����
�H�/��3�?|rJ�Z��[���G��(���ʑ#Gx|׮�k�Klݼ�Di_ߔ�m����9�e�M�%�J1::�>��v՚���N
�	! � `�MSJ�$	~��S\�x�#���o�k׮]���`D"׽��7�h��rZ$��_�֚H$Ž���}�R3{�G:DWW��1<�g��ť�K��u]iY��bY_��XԒ�,j��h���ms�@�4�uB�y�?�m��q\��q��V�̚E<��6�0�1�ZS`�U"�Ug4N��娩��6`z�4'��<�1h�=���a�6��`�6�\m e.5�R�ض�u���R�h=.�"z&����P8������({��att��{��8��!�@
�!�D��j�
��㠔�k�AJ9�S)Ud(�@��b���Á��^��,���T
˲��;E
�#e�,!�jjjFo����kj��_�~���h@�46⒦&0�N�e�@&��G.�����gO[�n�{�%�0�Ӧi"�$�H�!Z���:;NS����Ќ7�X��b�%!����w��h�E�#�)��*V�G�
�<oƿ��#9��ί�Jk�9–�;��f�z���G'�Bx�+�R(�E�6�e�΋�=��#�����"5�>������;n����D�?��
��Dc1�g��b�?��}'w�x�7�j)���9:f�$�n"������o�TL�Z�_[��_����u�$�!��q���V��%��z�0'O��SԘfQ��##������&R�+i
�R
��9sPJ���P�������6M

X�4�v])���>b��x���F)�R��˗c�66���q�:��bC�:��L&�!H���X�+��R__O<'���"��pyk+�P)%(5&ZWah�Rh��/�F�)*�0
-%H�s�j*:�-E��֚��z2�3c�b��߼��;���׋$,��]k�v9��R���P�LOk���Z�f���O�2�B��K���&��5��)���9 ���'JƆϞ�Z��~
KS_���H]�)c��p�YYx����cݩ��2�%�~����q��WL�����=�F��ۣp�\��uT�)�a�S>1��=�Y6��9�H�iH~��9�ri���>�wR��J�ˮc,i��H�i����璆:��i��/���SJ��Z!x��)ޡ�wϟ�	"��~�y��c���2��c�WneeJK�$��у�h�ϞW{�Y��>e�ʽ�c:Vbì%T%���0L]�;�ק�ʱ�ί\MTgh��avc#�--��4aҬ��R_��X�W]�?�[΂F�Ļ'I�=łK5��������! �r��E%�jf��b�{�'�����)'%��Μ�L
�$���v�\ �1���[[�v��v۶������]�,+_ߺuk���_�r�k��miiY��YXV�q�Zb�!���G~x�F`j�RʨeY{{{q]��kR�p�ΝuSN�4M�jժ�m�}������%㦔Z�s�NT~��Bttt��܌��\.gT�l����ѣ,_��@ @2�T�¸�L&Y�l����Ne�V�\��G?�с|F�2��;nB�}gΜy<9]�~����z�,�c�|?ȸ��r9ö�q�V���0�Lr����+Pu�*1��[�aa܄�ujR�����%K�l���m���"�EM��Q�8Lɣ��>���*�(��S�(��غiӉ���R��Gb՚��;)��(Ǐub����\NJ!x�Сq����)�(�y�2@/�~]�j)lf*�<ʄ�k��G)�j�Z�v~bb��l�E��y_@;��ĭ�Bu��)d��˕�A�m��(}}}E���z�����4�b,֧�&t��y.0,G���_��OgVK�>��99üG)�a"�@)Ed�X�SX�ű����C<��醰�������B���@CC�؆�H�y7��J&I_H|�h���

���Oo�WN��\H5���
|�e��BH�,�H�Ƌ_`&�;nX�tl�6����+2�D���`�[�*��(�[V�̊��K-��y��_��h�M[���O8�4�)"��0D"pⴊ�j�@�&�h�Cͷ���C��d��{�Z�%�4�B��Z�S)!D=0m�f9�u���z�������"�/�{���e鳙�>�J���������wΝ�烕?B�&��Ǿ�a��1AƗ?�z��jŅ��?Ļ{9�ӱ�uܯ��u.7i������<�ٻ�8��R�����7O�)L��'����{�q��|��_}}��	�WS
�W�8ݗc��k�r�B�R̼��hV^{˒�Oo��eX��!DeMIf��z^��ҕ5�p����O�b�c8����YF����U��\M9~F��Ħ(m���ιMD+h���O�5e,.���>�O�Z��d���Z�'������y@J���\ɧ������������ϰ�O��+�_�E���|���/�C�7_0yʕ|�*���AEI��(RB��-�Db�O�r�wrRbH�i���a�򵔼�)cXէ��H���R���ׇ��-[�?#�m�l�~�C;T�)Zk���o۾}���g���۷�ooo��Z�I#�ȷ����i����H$�j�'�T*�Ύ;���~ǎR��;U;L�X�y���X����<8x��G{6�5��0��E���h��Ø��8@[[�7����Z�v]�	�0���r�u�'����=U������^z饾����x�(�2��PJe
�v����c�V�XѶdɒ�|Sv�ضm[߬Y��֭�cK&�9����7�d2�#��ݱe֬Ym۶m�s��t]�hk�h[�z�7��so�F��L)�f4�TG��[7n��7W�^�@[[G���b�M�.�>�D��F|�ug�'LӼw�3��i��vv.{��^ԥ�"�ȺI�����τB���w�ӝ�K�ڱ�U�ٹ�ݻ��P(�����3~��.��P�:��v��,ˡ�6���mBl�f�/�v�y2$Z��a�b���S����0�[�ǗK�(`Te(�0�&ƴ"`�\!D����y��V8j��e�����/v�Q�B�SIEND�B`�extensions/links/joomlalinks/img/index.html000060400000000054152455721620015162 0ustar00<html><body bgcolor="#FFFFFF"></body></html>extensions/links/joomlalinks/tags.php000060400000010754152455721620014070 0ustar00<?php
/**
 * @package     JCE
 * @subpackage  Editor
 *
 * @copyright   Copyright (C) 2005 - 2020 Open Source Matters, Inc. All rights reserved.
 * @copyright   Copyright (c) 2009-2024 Ryan Demmer. All rights reserved
 * @license     GNU General Public License version 2 or later; see LICENSE.txt
 */

\defined('_JEXEC') or die;

use Joomla\CMS\Factory;
use Joomla\CMS\Helper\RouteHelper;
use Joomla\CMS\Language\Multilanguage;
use Joomla\CMS\Language\Text;
use Joomla\CMS\Object\CMSObject;

class JoomlalinksTags extends CMSObject
{
    private $option = 'com_tags';

    /**
     * Returns a reference to a editor object.
     * @return JCE The editor object
     *
     * @since    1.5
     */
    public static function getInstance($options = array())
    {
        static $instance;

        if (!is_object($instance)) {
            $instance = new self($options);
        }

        return $instance;
    }

    public function getOption()
    {
        return $this->option;
    }

    public function getList()
    {
        return '<li id="index.php?option=com_tags" class="folder content nolink"><div class="uk-tree-row"><a href="#"><span class="uk-tree-icon"></span><span class="uk-tree-text">' . Text::_('WF_LINKS_JOOMLALINKS_TAGS') . '</span></a></div></li>';
    }

    public function getLinks($args)
    {
        require_once JPATH_SITE . '/components/com_tags/helpers/route.php';

        $items = array();
        $view = isset($args->view) ? $args->view : '';

        $language = '';

        // create a new RouteHelper instance
        $router = new RouteHelper();

        $tags = array();

        if (!isset($args->id)) {
            $args->id = 1;
        }

        // get any articles in this category (in Joomla! 1.6+ a category can contain sub-categories and articles)
        $tags = self::getTags($args->id);

        if (!empty($tags)) {
            // output article links
            foreach ($tags as $tag) {
                if (isset($tag->language)) {
                    $language = $tag->language;
                }

                $id = $router->getRoute($tag->slug ?? $tag->id, 'com_tags.tag', '', $language);
                $id = $this->route($id);

                $items[] = array(
                    'id' => $id,
                    'name' => $tag->title . ' / ' . $tag->alias,
                    'class' => 'file',
                );
            }
        }

        return $items;
    }

    private static function getTags($id)
    {
        $db = Factory::getDBO();
        $user = Factory::getUser();

        $wf = WFEditorPlugin::getInstance();

        $query = $db->getQuery(true);
        $query->select('a.id, a.title, a.alias');

        if ($wf->getParam('links.joomlalinks.tag_alias', 0)) {
            $case_when_item_alias = ' CASE WHEN ';
            $case_when_item_alias .= $query->charLength('a.alias', '!=', '0');
            $case_when_item_alias .= ' THEN ';

            // Joomla 3 compatibility
            if (method_exists($query, 'castAsChar')) {
                $a_id = $query->castAsChar('a.id');
            } else {
                $a_id = $query->castAs('CHAR', 'a.id');
            }

            $case_when_item_alias .= $query->concatenate(array($a_id, 'a.alias'), ':');
            $case_when_item_alias .= ' ELSE ';
            $case_when_item_alias .= $a_id . ' END as slug';
            $query->select($case_when_item_alias);
        }

        $query->from('#__tags AS a');
        $query->where('a.alias <> ' . $db->quote('root'));
        $query->where($db->qn('a.published') . ' = 1');

        if (!$user->authorise('core.admin')) {
            $groups = implode(',', $user->getAuthorisedViewLevels());
            $query->where('a.access IN (' . $groups . ')');
        }

        if (Multilanguage::isEnabled()) {
            $tag = Factory::getLanguage()->getTag();
            $query->where('a.language in (' . $db->quote($tag) . ',' . $db->quote('*') . ')');
        }

        $query->order('a.title');

        $db->setQuery($query, 0);

        return $db->loadObjectList();
    }

    private static function route($url)
    {
        $wf = WFEditorPlugin::getInstance();

        if ((bool) $wf->getParam('links.joomlalinks.sef_url', 0)) {
            $url = WFLinkHelper::route($url);
        }

        // remove Itemid if "home"
        $url = WFLinkHelper::removeHomeItemId($url);

        // remove Itemid
        if ((bool) $wf->getParam('links.joomlalinks.itemid', 1) === false) {
            $url = WFLinkHelper::removeItemId($url);
        }

        return $url;
    }
}
extensions/links/joomlalinks.php000060400000005603152455721620013127 0ustar00<?php
/**
 * @package     JCE
 * @subpackage  Editor
 *
 * @copyright   Copyright (C) 2005 - 2020 Open Source Matters, Inc. All rights reserved.
 * @copyright   Copyright (c) 2009-2024 Ryan Demmer. All rights reserved
 * @license     GNU General Public License version 2 or later; see LICENSE.txt
 */

\defined('_JEXEC') or die;

use Joomla\CMS\Component\ComponentHelper;
use Joomla\Filesystem\Folder;

class WFLinkBrowser_Joomlalinks
{
    public $_option = array();
    public $_adapters = array();

    /**
     * Constructor activating the default information of the class.
     */
    public function __construct($options = array())
    {
        $wf = WFEditorPlugin::getInstance();

        $path = __DIR__ . '/joomlalinks';

        // Get all files
        $files = Folder::files($path, '\.(php)$');

        if (!empty($files)) {
            foreach ($files as $file) {
                $name = basename($file, '.php');

                if (!$this->checkOptionAccess($name)) {
                    continue;
                }

                // skip weblinks if it doesn't exist!
                if ($name == 'weblinks' && !ComponentHelper::isEnabled('com_weblinks')) {
                    continue;
                }

                require_once $path . '/' . $file;

                $classname = 'Joomlalinks' . ucfirst($name);

                if (class_exists($classname)) {
                    $this->_adapters[] = new $classname();
                }
            }
        }
    }

    protected function checkOptionAccess($option)
    {
        $wf = WFEditorPlugin::getInstance();

        $option = str_replace('com_', '', $option);

        if ($option === "contact") {
            $option = "contacts";
        }

        return (int) $wf->getParam('links.joomlalinks.' . $option, 1) === 1;
    }

    public function display()
    {
        // Load css
        $document = WFDocument::getInstance();
        $document->addStyleSheet(array('joomlalinks'), 'extensions/links/joomlalinks/css');
    }

    public function isEnabled()
    {
        $wf = WFEditorPlugin::getInstance();
        return (bool) $wf->getParam('links.joomlalinks.enable', 1);
    }

    public function getOption()
    {
        foreach ($this->_adapters as $adapter) {
            $this->_option[] = $adapter->getOption();
        }

        return $this->_option;
    }

    public function getList()
    {
        $list = '';

        foreach ($this->_adapters as $adapter) {
            $list .= $adapter->getList();
        }

        return $list;
    }

    public function getLinks($args)
    {
        $wf = WFEditorPlugin::getInstance();

        foreach ($this->_adapters as $adapter) {
            if ($adapter->getOption() == $args->option) {

                if (!$this->checkOptionAccess($args->option)) {
                    continue;
                }

                return $adapter->getLinks($args);
            }
        }
    }
}
extensions/links/joomlalinks.xml000060400000011220152455721620013130 0ustar00<?xml version="1.0" ?>
<extension version="3.4" type="plugin" group="jce" method="upgrade">
    <name>WF_LINKS_JOOMLALINKS_TITLE</name>
    <version>2.9.99.2</version>
    <creationDate>22-04-2026</creationDate>
    <author>Ryan Demmer</author>
    <authorEmail>info@joomlacontenteditor.net</authorEmail>
    <authorUrl>https://www.joomlacontenteditor.net/</authorUrl>
    <copyright>Copyright (C) 2006 - 2026 Ryan Demmer. All rights reserved</copyright>
    <license>GNU/GPL Version 2 or later - http://www.gnu.org/licenses/gpl-2.0.html</license>
    <description>WF_LINKS_JOOMLALINKS_DESC</description>
    <files>
        <filename>joomlalinks.php</filename>
        <folder>joomlalinks</folder>
    </files>
    <!--params group="links">
		<field name="joomlalinks" type="yesno" label="WF_LABEL_EXTENSION_ENABLE" description="WF_LABEL_EXTENSION_ENABLE_DESC">
        	<option value="1">JYES</option>
        	<option value="0">JNO</option>
    	</field>
	</params-->
    <fields name="joomlalinks">
        <fieldset name="links.joomlalinks">
            <field name="content" type="yesno" default="1" label="WF_LINKS_JOOMLALINKS_PARAM_CONTENT" description="WF_LINKS_JOOMLALINKS_PARAM_CONTENT_DESC">
                <option value="1">JYES</option>
                <option value="0">JNO</option>
            </field>
            <field name="article_alias" type="yesno" default="0" label="WF_LINKS_JOOMLALINKS_PARAM_ARTICLE_ALIAS" description="WF_LINKS_JOOMLALINKS_PARAM_ARTICLE_ALIAS_DESC">
                <option value="1">JYES</option>
                <option value="0">JNO</option>
            </field>
            <field name="article_unpublished" type="yesno" default="0" label="WF_LINKS_JOOMLALINKS_PARAM_ARTICLE_UNPUBLISHED" description="WF_LINKS_JOOMLALINKS_PARAM_ARTICLE_UNPUBLISHED_DESC">
                <option value="1">JYES</option>
                <option value="0">JNO</option>
            </field>
            <field name="static" type="yesno" default="1" label="WF_LINKS_JOOMLALINKS_PARAM_UNCATEGORIZED" description="WF_LINKS_JOOMLALINKS_PARAM_UNCATEGORIZED_DESC">
                <option value="1">JYES</option>
                <option value="0">JNO</option>
            </field>
            <field name="contacts" type="yesno" default="1" label="WF_LINKS_JOOMLALINKS_PARAM_CONTACT" description="WF_LINKS_JOOMLALINKS_PARAM_CONTACT_DESC">
                <option value="1">JYES</option>
                <option value="0">JNO</option>
            </field>
            <field name="weblinks" type="yesno" default="1" label="WF_LINKS_JOOMLALINKS_PARAM_WEBLINKS" description="WF_LINKS_JOOMLALINKS_PARAM_WEBLINKS_DESC">
                <option value="1">JYES</option>
                <option value="0">JNO</option>
            </field>
            <field name="weblinks_alias" type="yesno" default="0" label="WF_LINKS_JOOMLALINKS_PARAM_WEBLINKS_ALIAS" description="WF_LINKS_JOOMLALINKS_PARAM_WEBLINKS_ALIAS_DESC">
                <option value="1">JYES</option>
                <option value="0">JNO</option>
            </field>
            <field name="menu" type="yesno" default="1" label="WF_LINKS_JOOMLALINKS_PARAM_MENU" description="WF_LINKS_JOOMLALINKS_PARAM_MENU_DESC">
                <option value="1">JYES</option>
                <option value="0">JNO</option>
            </field>
            <field name="menu_resolve_alias" type="yesno" default="0" label="WF_LINKS_JOOMLALINKS_PARAM_ARTICLE_MENU_LINK" description="WF_LINKS_JOOMLALINKS_PARAM_ARTICLE_MENU_LINK_DESC">
                <option value="1">JYES</option>
                <option value="0">JNO</option>
            </field>
            <field name="tags" type="yesno" default="1" label="WF_LINKS_JOOMLALINKS_PARAM_TAGS" description="WF_LINKS_JOOMLALINKS_PARAM_TAGS_DESC">
                <option value="1">JYES</option>
                <option value="0">JNO</option>
            </field>
            <field name="tags_alias" type="yesno" default="0" label="WF_LINKS_JOOMLALINKS_PARAM_TAGS_ALIAS" description="WF_LINKS_JOOMLALINKS_PARAM_TAGS_ALIAS_DESC">
                <option value="1">JYES</option>
                <option value="0">JNO</option>
            </field>
            <field name="itemid" type="yesno" default="1" label="WF_LINKS_JOOMLALINKS_ITEMID" description="WF_LINKS_JOOMLALINKS_ITEMID_DESC">
                <option value="1">JYES</option>
                <option value="0">JNO</option>
            </field>
            <field name="sef_url" type="yesno" default="0" label="WF_LINKS_JOOMLALINKS_SEF_URL" description="WF_LINKS_JOOMLALINKS_SEF_URL_DESC">
                <option value="1">JYES</option>
                <option value="0">JNO</option>
            </field>
        </fieldset>
    </fields>
    <plugins></plugins>
</extension>
extensions/filesystem/index.html000060400000000054152455721620013130 0ustar00<html><body bgcolor="#FFFFFF"></body></html>extensions/filesystem/joomla.xml000060400000004343152455721620013143 0ustar00<?xml version="1.0" ?>
<extension version="3.8">
    <name>WF_FILESYSTEM_JOOMLA_TITLE</name>
    <version>2.9.99.2</version>
    <creationDate>22-04-2026</creationDate>
    <author>Ryan Demmer</author>
    <authorEmail>info@joomlacontenteditor.net</authorEmail>
    <authorUrl>https://www.joomlacontenteditor.net/</authorUrl>
    <copyright>Copyright (C) 2006 - 2026 Ryan Demmer. All rights reserved</copyright>
    <license>GNU/GPL Version 2 or later - http://www.gnu.org/licenses/gpl-2.0.html</license>
    <description>WF_FILESYSTEM_JOOMLA_DESC</description>
    <files></files>
    <fields>
        <fieldset name="filesystem.joomla">
            <field name="allow_root" type="radio" default="0" label="WF_PARAM_ALLOW_ROOT" description="WF_PARAM_ALLOW_ROOT_DESC" class="btn-group btn-group-yesno">
                <option value="1">JYES</option>
                <option value="0">JNO</option>
            </field>

            <field name="restrict_dir" type="checkboxes" class="flex-row" default="administrator,api,bin,cache,components,cli,includes,language,layouts,libraries,logs,media,modules,plugins,templates,tmp,xmlrpc" multiple="true" label="WF_PARAM_DIRECTORY_RESTRICTED" description="WF_PARAM_DIRECTORY_RESTRICTED_DESC" showon="allow_root:1">
                <option value="administrator">administrator</option>
                <option value="api">api</option>
                <option value="bin">bin</option>
                <option value="cache">cache</option>
                <option value="components">components</option>
                <option value="cli">cli</option>
                <option value="includes">includes</option>
                <option value="language">language</option>
                <option value="layouts">layouts</option>
                <option value="libraries">libraries</option>
                <option value="logs">logs</option>
                <option value="media">media</option>
                <option value="modules">modules</option>
                <option value="plugins">plugins</option>
                <option value="templates">templates</option>
                <option value="tmp">tmp</option>
                <option value="xmlrpc">xmlrpc</option>
            </field>
        </fieldset>
    </fields>
</extension>extensions/filesystem/joomla.php000060400000066106152455721620013137 0ustar00<?php

/**
 * @package     JCE
 * @subpackage  Editor
 *
 * @copyright   Copyright (C) 2005 - 2020 Open Source Matters, Inc. All rights reserved.
 * @copyright   Copyright (c) 2009-2024 Ryan Demmer. All rights reserved
 * @license     GNU General Public License version 2 or later; see LICENSE.txt
 */

\defined('_JEXEC') or die;

use Joomla\CMS\Client\ClientHelper;
use Joomla\CMS\Factory;
use Joomla\Filesystem\File;
use Joomla\Filesystem\Folder;
use Joomla\CMS\Language\Text;
use Joomla\CMS\Uri\Uri;
use Joomla\Registry\Registry;

class WFJoomlaFileSystem extends WFFileSystem
{
    /**
     * A list of restricted directories if allowroot is set to true.
     *
     * @var array
     */
    protected $restricted = array(
        'administrator',
        'api',
        'bin',
        'cache',
        'components',
        'cli',
        'includes',
        'language',
        'layouts',
        'libraries',
        'logs',
        'media',
        'modules',
        'plugins',
        'templates',
        'tmp',
        'xmlrpc',
    );

    /**
     * Allow root access to the filesystem.
     *
     * @var boolean
     */
    protected $allowroot = false;

    /**
     * Constructor activating the default information of the class.
     */
    public function __construct($config = array())
    {
        // normalize allow_root as boolean to "allowroot"
        if (isset($config['allow_root'])) {
            $this->allowroot = (bool) $config['allow_root'];
            
            // remove allow_root from config
            unset($config['allow_root']);
        }

        if (isset($config['restrict_dir'])) {
            $restricted = $config['restrict_dir'];

            // Normalize $restricted to array
            if (is_string($restricted)) {
                $restricted = array_map('trim', explode(',', $restricted));
            }

            // Clean empty values
            $restricted = array_filter($restricted);

            // update class property
            $this->restricted = $restricted;
        }

        // remove root folder restrictions
        if ($this->allowroot === false) {
            $this->restricted = [];
        }

        if (!isset($config['root'])) {
            $config['root'] = 'images';
        }

        if (!isset($config['list_limit'])) {
            $config['list_limit'] = 0; // "all
        }

        // this is a "local" filesystem
        $config['local'] = true;        

        parent::__construct($config);
    }

    /**
     * Get the base directory.
     *
     * @return string base dir
     */
    public function getBaseDir($path = '')
    {
        return JPATH_SITE;
    }

    /**
     * Get the full base url.
     *
     * @return string base url
     */
    public function getBaseURL($path = '')
    {
        return Uri::root(true);
    }

    /**
     * Return the full user directory path. Create if required.
     *
     * @param string    The base path
     *
     * @return Full path to folder
     */
    public function getRootDir()
    {        
        if ($this->get('allowroot')) {
            return ''; // return a blank value for allowroot
        }

        return $this->get('root', 'images');
    }

    public function toAbsolute($path)
    {
        if (empty($path)) {
            $path = $this->getRootDir();
        }
        
        return WFUtility::makePath($this->getBaseDir(), $path);
    }

    public function toRelative($path, $isabsolute = true)
    {
        // path is absolute
        $base = $this->getBaseDir();

        // path is relative to Joomla! root, eg: images/folder
        if ($isabsolute === false) {
            $base = '';
        }

        if (function_exists('mb_substr')) {
            $path = mb_substr($path, mb_strlen($base));
        } else {
            $path = substr($path, strlen($base));
        }

        $path = WFUtility::cleanPath($path);

        return ltrim($path, '/');
    }

    /**
     * Determine whether FTP mode is enabled.
     *
     * @return bool
     */
    public function isFtp()
    {
        // Initialize variables
        $FTPOptions = ClientHelper::getCredentials('ftp');

        return $FTPOptions['enabled'] == 1;
    }

    public function getTotalSize($path, $recurse = true)
    {
        $total = 0;

        if (strpos($path, $this->getBaseDir()) === false) {
            $path = $this->toAbsolute($path);
        }

        if (is_dir($path)) {
            $files = Folder::files($path, '.', $recurse, true, array('.svn', 'CVS', '.DS_Store', '__MACOSX', 'index.html', 'thumbs.db'));

            foreach ($files as $file) {
                $total += filesize($file);
            }
        }

        return $total;
    }

    /**
     * Count the number of files in a folder.
     *
     * @return int File total
     *
     * @param string $path Absolute path to folder
     */
    public function countFiles($path, $recurse = false)
    {
        if (strpos($path, $this->getBaseDir()) === false) {
            $path = $this->toAbsolute($path);
        }

        if (is_dir($path)) {
            $files = Folder::files($path, '.', $recurse, false, array('.svn', 'CVS', '.DS_Store', '__MACOSX', 'index.html', 'thumbs.db'));

            return count($files);
        }

        return 0;
    }

    /**
     * Count the number of folders in a folder.
     *
     * @return int Folder total
     *
     * @param string $path Absolute path to folder
     */
    public function countFolders($path)
    {
        if (strpos($path, $this->getBaseDir()) === false) {
            $path = $this->toAbsolute($path);
        }

        if (is_dir($path)) {
            $folders = Folder::folders($path, '.', false, false, array('.svn', 'CVS', '.DS_Store', '__MACOSX'));

            return count($folders);
        }

        return 0;
    }

    public function getFolders($relative, $filter = '', $sort = '', $limit = 25, $start = 0, $depth = 0)
    {
        // trim to remove leading and trailing slashes
        $relative = trim($relative, '/');

        // resolve to absolute path, defaulting to root directory if empty
        $path = $this->toAbsolute($relative);
        $path = WFUtility::fixPath($path);

        // if the path does not exist, set to root directory
        if (!is_dir($path)) {
            $relative = '';
            $path = $this->toAbsolute($relative);
        }

        $list = Folder::folders($path, $filter, $depth, true);

        $folders = array();

        $restrictedPaths = array_map(function ($val) use ($relative) {
            $absolute = $this->toAbsolute($val);
            $absolute = WFUtility::makePath($absolute, $relative);

            // trim trailing slashes
            $absolute = rtrim($absolute, '/');

            return $absolute;
        }, $this->restricted);

        if (!empty($list)) {
            // Sort alphabetically by default
            natcasesort($list);

            foreach ($list as $item) {
                $item = rawurldecode($item);

                // clean path to remove multiple slashes
                $item = WFUtility::cleanPath($item);

                $name = WFUtility::mb_basename($item);
                $name = WFUtility::convertEncoding($name);

                if (in_array($item, $restrictedPaths, true)) {
                    continue;
                }

                $id = WFUtility::makePath($relative, $name, '/');

                if ($depth) {
                    $id = $this->toRelative($item);
                    $id = WFUtility::convertEncoding($id);
                    $name = $id;
                }

                // trim leading slash
                $id = ltrim($id, '/');

                $data = array(
                    'id' => $id,
                    'name' => $name,
                    'writable' => is_writable($item) || $this->isFtp(),
                    'type' => 'folders',
                    'properties' => $this->getFolderDetails($id),
                );

                $folders[] = $data;
            }
        }

        if ($sort && strpos($sort, 'extension') === false) {
            $folders = self::sortItemsByKey($folders, $sort);
        }

        return $folders;
    }

    public function getFiles($relative, $filter = '', $sort = '', $limit = 25, $start = 0, $depth = 0)
    {
        // trim to remove leading and trailing slashes
        $relative = trim($relative, '/');

        // resolve to absolute path, defaulting to root directory if empty
        $path = $this->toAbsolute($relative);
        $path = WFUtility::fixPath($path);

        // if the path does not exist, set to root directory
        if (!is_dir($path)) {
            $relative = '';
            $path = $this->toAbsolute($relative);
        }

        // excluded files
        $exclude = array('.svn', 'CVS', '.DS_Store', '__MACOSX', 'index.html');

        $list = Folder::files($path, $filter, $depth, true, $exclude);

        $files = array();

        // get the total files in the list
        $count = count($list);

        if (!empty($list)) {
            // Sort alphabetically by default
            natcasesort($list);

            foreach ($list as $item) {
                $item = rawurldecode($item);

                $name = WFUtility::mb_basename($item);
                $name = WFUtility::convertEncoding($name);

                if ($depth) {
                    $relative = $this->toRelative($item);
                    $relative = WFUtility::mb_dirname($relative);
                }

                // create relative file
                $id = WFUtility::makePath($relative, $name, '/');

                // check for file validity - prevent display of files with invalid encoding that have been "cleaned"
                if (!is_file(WFUtility::makePath($this->getBaseDir(), $id, '/'))) {
                    continue;
                }

                // reset name for recursive search
                if ($depth) {
                    $name = trim($id, '/');
                }

                // create url from absolute path
                $url = $this->toRelative($item);

                // remove leading slash
                $url = trim($url, '/');

                $data = array(
                    'id' => $id,
                    'url' => $url,
                    'name' => $name,
                    'writable' => is_writable($item) || $this->isFtp(),
                    'type' => 'files',
                    'extension' => WFUtility::getExtension($name),
                    'properties' => $this->getFileDetails($id, $count),
                );

                $files[] = $data;
            }
        }

        if ($sort) {
            $files = self::sortItemsByKey($files, $sort);
        }

        return $files;
    }

    public function searchItems($relative, $query = '', $filetypes = array(), $sort = '', $depth = 3)
    {
        $result = array(
            'folders' => array(),
            'files' => array(),
        );

        if ($query) {
            // get folder list
            $result['folders'] = $this->getFolders($relative, $query, 0, 0, $sort, $depth);
        }
        
        $filter = $query;

        // create filter for filetypes
        if (!empty($filetypes)) {
            $filter .= '\.(?i)(' . implode('|', $filetypes) . ')$';
        }

        // get file list
        $result['files'] = $this->getFiles($relative, $filter, 0, 0, $sort, $depth);

        return $result;
    }

    /**
     * Get a folders properties.
     *
     * @return array Array of properties
     *
     * @param string $dir   Folder relative path
     * @param string $types File Types
     */
    public function getFolderDetails($dir)
    {
        clearstatcache();

        if (is_array($dir)) {
            $dir = isset($dir['path']) ? $dir['path'] : '';
        }

        if (empty($dir)) {
            return array();
        }

        $path = $this->toAbsolute(rawurldecode($dir));
        $date = @filemtime($path);

        return array('modified' => $date, 'size' => '');
    }

    /**
     * Get the source directory of a file path.
     */
    public function getSourceDir($path)
    {
        // return nothing if absolute $path
        if (preg_match('#^(file|http(s)?):\/\/#', $path)) {
            return '';
        }

        // directory path relative base directory
        if ($this->is_dir($path)) {
            return $path;
        }

        // file url relative to site root
        if ($this->is_file($path)) {
            return dirname($path);
        }

        return '';
    }

    public function isMatch($needle, $haystack)
    {
        return $needle == $haystack;
    }

    /**
     * Return constituent parts of a file path eg: base directory, file name.
     *
     * @param $path Relative or absolute path
     */
    public function pathinfo($path)
    {
        return pathinfo($path);
    }

    /**
     * Get a files properties.
     *
     * @return array Array of properties
     *
     * @param string $file File relative path
     */
    public function getFileDetails($file, $count = 1)
    {
        clearstatcache();

        if (is_array($file)) {
            $file = isset($file['path']) ? $file['path'] : '';
        }

        if (empty($file)) {
            return array();
        }

        $path = $this->toAbsolute(rawurldecode($file));
        $url = WFUtility::makePath($this->getBaseUrl(), rawurldecode($file));

        $date = @filemtime($path);
        $size = @filesize($path);

        $data = array(
            'size' => $size,
            'modified' => $date,
        );

        $data['preview'] = WFUtility::cleanPath($url, '/');

        if (preg_match('#\.(jpg|jpeg|bmp|gif|tiff|png|apng|webp|svg)#i', $file)) {
            $image = array();

            if ($count <= 100) {
                if (preg_match('#\.svg$#i', $file)) {
                    $svg = @simplexml_load_file($path);

                    if ($svg && isset($svg['viewBox'])) {
                        list($start_x, $start_y, $end_x, $end_y) = explode(' ', $svg['viewBox']);

                        $width = (int) $end_x;
                        $height = (int) $end_y;

                        if ($width && $height) {
                            $image['width'] = $width;
                            $image['height'] = $height;
                        }
                    }
                } else {
                    list($image['width'], $image['height']) = @getimagesize($path);
                }
            }

            $data['preview'] .= '?' . $date;

            return array_merge_recursive($data, $image);
        }

        return $data;
    }

    private function checkRestrictedDirectory($path)
    {
        if ($this->allowroot) {
            foreach ($this->restricted as $name) {
                $restricted = $this->toAbsolute($name);

                $match = false;

                if (function_exists('mb_substr')) {
                    $match = (mb_substr($path, 0, mb_strlen($restricted)) === $restricted);
                } else {
                    $match = (substr($path, 0, strlen($restricted)) === $restricted);
                }

                if ($match === true) {
                    throw new Exception('Access to the target directory is restricted');
                }
            }
        }

        return true;
    }

    /**
     * Delete the relative file(s).
     *
     * @param $files the relative path to the file name or comma seperated list of multiple paths
     *
     * @return string $error on failure
     */
    public function delete($src)
    {
        $path = $this->toAbsolute($src);

        // get error class
        $result = new WFFileSystemResult();

        // check path does not fall within a restricted folder
        $this->checkRestrictedDirectory($path);

        Factory::getApplication()->triggerEvent('onWfFileSystemBeforeDelete', array(&$path));

        if (is_file($path)) {
            $result->type = 'files';
            $result->state = File::delete($path);
        } elseif (is_dir($path)) {
            $result->type = 'folders';

            if ($this->countFiles($path) > 0 || $this->countFolders($path) > 0) {
                $result->message = Text::sprintf('WF_MANAGER_FOLDER_NOT_EMPTY', WFUtility::mb_basename($path));
            } else {
                $result->state = Folder::delete($path);
            }
        }

        Factory::getApplication()->triggerEvent('onWfFileSystemAfterDelete', array($path, $result->state));

        return $result;
    }

    /**
     * Rename a file.
     *
     * @param string $src  The relative path of the source file
     * @param string $dest The name of the new file
     *
     * @return string $error
     */
    public function rename($src, $dest)
    {
        $src = $this->toAbsolute(rawurldecode($src));
        $dir = WFUtility::mb_dirname($src);

        Factory::getApplication()->triggerEvent('onWfFileSystemBeforeRename', array(&$src, &$dest));

        $result = new WFFileSystemResult();

        if (is_file($src)) {
            $ext = WFUtility::getExtension($src);
            $file = $dest . '.' . $ext;
            $path = WFUtility::makePath($dir, $file);

            // check path does not fall within a restricted folder
            $this->checkRestrictedDirectory($path);

            $result->type = 'files';
            $result->state = File::move($src, $path);
            $result->path = $path;
            // include original source path
            $result->source = $src;
        } elseif (is_dir($src)) {
            $path = WFUtility::makePath($dir, $dest);

            $result->type = 'folders';
            $result->state = Folder::move($src, $path);
            $result->path = $path;
            // include original source path
            $result->source = $src;
        }

        Factory::getApplication()->triggerEvent('onWfFileSystemAfterRename', array(&$result));

        return $result;
    }

    /**
     * Copy a file.
     *
     * @param string $files The relative file or comma seperated list of files
     * @param string $dest  The relative path of the destination dir
     *
     * @return string $error on failure
     */
    public function copy($file, $destination, $conflict = 'replace')
    {
        $result = new WFFileSystemResult();

        // trim to remove leading slash
        $file = trim($file, '/');

        $src = $this->toAbsolute($file);
        // destination relative path
        $dest = WFUtility::makePath($destination, WFUtility::mb_basename($file));
        // destination full path
        $dest = $this->toAbsolute($dest);

        // check destination path does not fall within a restricted folder
        $this->checkRestrictedDirectory($dest);

        Factory::getApplication()->triggerEvent('onWfFileSystemBeforeCopy', array(&$src, &$dest));

        // src is a file
        if (is_file($src)) {
            // resolve filename conflict by creating a copy if required
            if ($conflict == 'copy') {
                $name = WFUtility::mb_basename($file);
                $dest = $this->resolveFilenameConflict($dest, $name, true);
            }

            $result->type = 'files';
            $result->state = File::copy($src, $dest);
            $result->path = $dest;
            // include original source path
            $result->source = $src;
        } elseif (is_dir($src)) {
            // Folders cannot be copied into themselves as this creates an infinite copy / paste loop
            if ($file === $destination) {
                $result->message = Text::_('WF_MANAGER_COPY_INTO_ERROR');
                return $result;
            }

            $result->type = 'folders';
            $result->state = Folder::copy($src, $dest);
            $result->path = $dest;
            // include original source path
            $result->source = $src;
        }

        Factory::getApplication()->triggerEvent('onWfFileSystemAfterCopy', array(&$result));

        return $result;
    }

    /**
     * Copy a file.
     *
     * @param string $files The relative file or comma seperated list of files
     * @param string $dest  The relative path of the destination dir
     *
     * @return string $error on failure
     */
    public function move($file, $destination)
    {
        $result = new WFFileSystemResult();

        // trim to remove leading slash
        $file = trim($file, '/');

        $src = $this->toAbsolute($file);
        // destination relative path
        $dest = WFUtility::makePath($destination, WFUtility::mb_basename($file));
        // destination full path
        $dest = $this->toAbsolute($dest);

        // check destination path does not fall within a restricted folder
        $this->checkRestrictedDirectory($dest);

        Factory::getApplication()->triggerEvent('onWfFileSystemBeforeMove', array(&$src, &$dest));

        if ($src != $dest) {
            // src is a file
            if (is_file($src)) {
                $result->type = 'files';
                $result->state = File::move($src, $dest);
                $result->path = $dest;
                // include original source path
                $result->source = $src;
            } elseif (is_dir($src)) {
                // Folders cannot be copied into themselves as this creates an infinite copy / paste loop
                if ($file === $destination) {
                    $result->message = Text::_('WF_MANAGER_COPY_INTO_ERROR');
                    return $result;
                }

                $result->type = 'folders';
                $result->state = Folder::move($src, $dest);
                $result->path = $dest;
                // include original source path
                $result->source = $src;
            }
        }

        Factory::getApplication()->triggerEvent('onWfFileSystemAfterMove', array(&$result));

        return $result;
    }

    /**
     * New folder base function. A wrapper for the Folder::create function.
     *
     * @param string $folder The folder to create
     *
     * @return bool true on success
     */
    public function folderCreate($folder)
    {
        if (is_dir($folder)) {
            return false;
        }

        if (@Folder::create($folder)) {
            $buffer = '<html><body bgcolor="#FFFFFF"></body></html>';
            File::write($folder . '/index.html', $buffer);
        } else {
            return false;
        }

        return true;
    }

    /**
     * New folder.
     *
     * @param string $dir     The base dir
     * @param string $new_dir The folder to be created
     *
     * @return string $error on failure
     */
    public function createFolder($dir, $new)
    {
        // relative new folder path
        $dir = WFUtility::makePath(rawurldecode($dir), $new);
        // full folder path
        $path = $this->toAbsolute($dir);

        // check path does not fall within a restricted folder
        $this->checkRestrictedDirectory($path);

        $result = new WFFileSystemResult();

        $result->state = $this->folderCreate($path);
        $result->path = $path;
        $result->type = 'folders';

        Factory::getApplication()->triggerEvent('onWfFileSystemCreateFolder', array($path, $result->state));

        return $result;
    }

    public function getDimensions($file)
    {
        $path = $this->toAbsolute(utf8_decode(rawurldecode($file)));

        $data = array(
            'width' => '',
            'height' => '',
        );

        if (file_exists($path)) {
            $dim = @getimagesize($path);
            $data = array(
                'width' => $dim[0],
                'height' => $dim[1],
            );
        }

        return $data;
    }

    protected function resolveFilenameConflict($destination, $name, $createCopy = false)
    {
        // get overwrite state
        $conflict = $this->get('upload_conflict', 'overwrite');

        // get suffix
        $suffix = $this->get('upload_suffix', '_copy');

        $path = WFUtility::mb_dirname($destination);

        if ($conflict == 'unique' || $createCopy) {
            // get extension
            $extension = WFUtility::getExtension($name);
            // get name without extension
            $name = WFUtility::stripExtension($name);
            // create tmp copy
            $tmpname = $name;

            $x = 1;

            while (is_file($destination)) {
                if (strpos($suffix, '$') !== false) {
                    $tmpname = $name . str_replace('$', $x, $suffix);
                } else {
                    $tmpname .= $suffix;
                }

                $destination = WFUtility::makePath($path, $tmpname . '.' . $extension);

                ++$x;
            }
        }

        return $destination;
    }

    public function upload($method, $src, $dir, $name, $chunks = 1, $chunk = 0)
    {
        $app = Factory::getApplication();

        // full destination directory path
        $path = $this->toAbsolute(rawurldecode($dir));
        // full file path
        $dest = WFUtility::makePath($path, $name);

        // check destination path does not fall within a restricted folder
        $this->checkRestrictedDirectory($dest);

        // check for safe mode
        $safe_mode = false;

        if (function_exists('ini_get')) {
            $safe_mode = ini_get('safe_mode');
        } else {
            $safe_mode = true;
        }

        $result = new WFFileSystemResult();

        // resolve filename conflict by creating a copy if required
        $dest = $this->resolveFilenameConflict($dest, $name);

        $app->triggerEvent('onWfFileSystemBeforeUpload', array(&$src, &$dest));

        // create object to pass to joomla event
        $object_file = new StdClass;
        $object_file->name = WFUtility::mb_basename($dest);
        $object_file->tmp_name = $src;
        $object_file->filepath = $dest;

        // vars for Joomla events
        $vars = array('com_jce.file', &$object_file, true, array());

        // trigger Joomla event before upload
        $app->triggerEvent('onContentBeforeSave', $vars);

        if (File::upload($src, $dest, false, true)) {
            $result->state = true;
            $result->path = $dest;
        }

        $app->triggerEvent('onWfFileSystemAfterUpload', array(&$result));

        // update $object_file
        $object_file->name = WFUtility::mb_basename($result->path);
        $object_file->filepath = $result->path;

        // trigger Joomla event after upload
        $app->triggerEvent('onContentAfterSave', $vars);

        return $result;
    }

    public function exists($path)
    {
        return $this->is_dir($path) || $this->is_file($path);
    }

    public function read($file)
    {
        $file = rawurldecode($file);

        $path = $this->toAbsolute($file);

        return file_get_contents($path);
    }

    public function write($file, $content)
    {
        $file = rawurldecode($file);

        $path = $this->toAbsolute($file);

        // check path does not fall within a restricted folder
        $this->checkRestrictedDirectory($path);

        Factory::getApplication()->triggerEvent('onWfFileSystemBeforeWrite', array(&$path, &$content));

        $result = File::write($path, $content);

        Factory::getApplication()->triggerEvent('onWfFileSystemAfterWrite', array($path, $result));

        return $result;
    }

    public function is_file($path)
    {
        $path = $this->toAbsolute($path);
        return is_file($path);
    }

    public function is_dir($path)
    {
        $path = $this->toAbsolute($path);
        return is_dir($path);
    }
}
extensions/search/link.php000060400000033423152455721620011670 0ustar00<?php
/**
 * @package     JCE
 * @subpackage  Editor
 *
 * @copyright   Copyright (C) 2005 - 2020 Open Source Matters, Inc. All rights reserved.
 * @copyright   Copyright (c) 2009-2024 Ryan Demmer. All rights reserved
 * @license     GNU General Public License version 2 or later; see LICENSE.txt
 */

\defined('_JEXEC') or die;

use Joomla\CMS\Component\ComponentHelper;
use Joomla\CMS\Factory;
use Joomla\CMS\Filter\InputFilter;
use Joomla\CMS\HTML\HTMLHelper;
use Joomla\CMS\Language\Text;
use Joomla\CMS\Plugin\PluginHelper;
use Joomla\CMS\Uri\Uri;
use Joomla\String\StringHelper;

class WFLinkSearchExtension extends WFSearchExtension
{
    private $enabled = array();

    protected function loadDefaultAdapter($plugin)
    {
        $app = Factory::getApplication();

        // create component name from plugin - special case for "contacts"
        $component = ($plugin == 'contacts') ? 'com_contact' : 'com_' . $plugin;

        // check for associated component
        if (!ComponentHelper::isEnabled($component)) {
            return;
        }

        $adapter = __DIR__ . '/adapter/' . $plugin . '/' . $plugin . '.php';

        if (!is_file($adapter)) {
            return;
        }

        require_once $adapter;

        // create classname, eg: PlgSearchContent
        $className = 'PlgWfSearch' . ucfirst($plugin);

        if (!class_exists($className)) {
            return;
        }

        // simple plugin config
        $config = array(
            'name' => $plugin,
            'type' => 'search',
            'params' => array(
                'search_limit' => 10,
            ),
        );

        // Joomla 4+
        if (method_exists($app, 'getDispatcher')) {
            $dispatcher = $app->getDispatcher();
            $instance = new $className($dispatcher, (array) $config);
            $instance->registerListeners();
        } else {
            $dispatcher = JEventDispatcher::getInstance();
            $instance = new $className($dispatcher, (array) $config);
        }

        $this->enabled[] = $plugin;
    }

    /**
     * Constructor activating the default information of the class.
     */
    public function __construct()
    {
        parent::__construct();

        $request = WFRequest::getInstance();

        $request->setRequest(array($this, 'doSearch'));
        $request->setRequest(array($this, 'getAreas'));

        $wf = WFEditorPlugin::getInstance();

        // get plugins
        $plugins = $wf->getParam('search.link.plugins', array());

        // set defaults if empty
        if (empty($plugins)) {
            $plugins = array('categories', 'contacts', 'content', 'tags');
        }

        // list core adapters
        $adapters = array('categories', 'contacts', 'content', 'tags', 'weblinks');

        // check and load external search plugins
        foreach ($plugins as $plugin) {
            // process core search plugins
            if (in_array($plugin, $adapters)) {
                $this->loadDefaultAdapter($plugin);
                continue;
            }

            // plugin must be enabled
            if (!PluginHelper::isEnabled('search', $plugin)) {
                continue;
            }

            // check plugin imports correctly - plugin may have a db entry, but is missing files
            if (PluginHelper::importPlugin('search', $plugin)) {
                $this->enabled[] = $plugin;
            }
        }

        PluginHelper::importPlugin('jce');
    }

    public function display()
    {
        parent::display();

        $document = WFDocument::getInstance();
        $document->addScript(array('link'), 'extensions.search.js');
        $document->addStylesheet(array('link'), 'extensions.search.css');
    }

    public function isEnabled()
    {
        $wf = WFEditorPlugin::getInstance();
        return (bool) $wf->getParam('search.link.enable', 1) && !empty($this->enabled);
    }

    /**
     * Method to get the search areas.
     */
    public function getAreas()
    {
        $app = Factory::getApplication('site');

        $areas = array();
        $results = array();

        $searchareas = $app->triggerEvent('onContentSearchAreas');

        foreach ($searchareas as $area) {
            if (is_array($area)) {
                $areas = array_merge($areas, $area);
            }
        }

        foreach ($areas as $k => $v) {
            $results[$k] = Text::_($v);
        }

        return $results;
    }

    /*
     * Truncate search text
     * This method uses portions of components/com_finder/views/search/tmpl/default_result.php
     * @copyright Copyright (C) 2005 - 2020 Open Source Matters, Inc. All rights reserved.
     */
    private function truncateText($text, $searchword)
    {
        // Calculate number of characters to display around the result
        $term_length = StringHelper::strlen($searchword);

        $lang = Factory::getLanguage();
        $desc_length = $lang->getSearchDisplayedCharactersNumber();

        $pad_length = $term_length < $desc_length ? (int) floor(($desc_length - $term_length) / 2) : 0;

        // Find the position of the search term
        $pos = $term_length ? StringHelper::strpos(StringHelper::strtolower($text), StringHelper::strtolower($searchword)) : false;

        // Find a potential start point
        $start = ($pos && $pos > $pad_length) ? $pos - $pad_length : 0;

        // Find a space between $start and $pos, start right after it.
        $space = StringHelper::strpos($text, ' ', $start > 0 ? $start - 1 : 0);
        $start = ($space && $space < $pos) ? $space + 1 : $start;

        $text = HTMLHelper::_('string.truncate', StringHelper::substr($text, $start), $desc_length, false);

        return $text;
    }

    /*
     * Prepare search content by clean and truncating
     * This method uses portions of SearchHelper::prepareSearchContent from administrator/components/com_search/helpers/search.php
     * @copyright Copyright (C) 2005 - 2020 Open Source Matters, Inc. All rights reserved.
     */
    public function prepareSearchContent($text, $searchword)
    {
        // Replace line breaking tags with whitespace.
        $text = preg_replace("'<(br[^/>]*?/|hr[^/>]*?/|/(div|h[1-6]|li|p|td))>'si", ' ', $text);

        // clean text
        $text = htmlspecialchars(strip_tags($text));

        // remove shortcode
        $text = preg_replace('#{.+?}#', '', $text);

        // truncate text based around searchword
        $text = $this->truncateText($text, $searchword);

        // highlight searchword
        $text = preg_replace('#\b(' . preg_quote($searchword, '#') . ')\b#i', '<mark>$1</mark>', $text);

        return $text;
    }

    /*
     * Render Search fields
     * This method uses portions of SearchViewSearch::display from components/com_search/views/search/view.html.php
     * @copyright Copyright (C) 2005 - 2012 Open Source Matters, Inc. All rights reserved.
     */

    public function render()
    {
        if (!$this->isEnabled()) {
            return '';
        }

        // built select lists
        $orders = array();
        $orders[] = HTMLHelper::_('select.option', 'newest', Text::_('WF_SEARCH_NEWEST_FIRST'));
        $orders[] = HTMLHelper::_('select.option', 'oldest', Text::_('WF_SEARCH_OLDEST_FIRST'));
        $orders[] = HTMLHelper::_('select.option', 'popular', Text::_('WF_SEARCH_MOST_POPULAR'));
        $orders[] = HTMLHelper::_('select.option', 'alpha', Text::_('WF_SEARCH_ALPHABETICAL'));
        $orders[] = HTMLHelper::_('select.option', 'category', Text::_('WF_CATEGORY'));

        $lists = array();
        $lists['ordering'] = HTMLHelper::_('select.genericlist', $orders, 'ordering', 'class="inputbox"', 'value', 'text');

        $searchphrases = array();
        $searchphrases[] = HTMLHelper::_('select.option', 'all', Text::_('WF_SEARCH_ALL_WORDS'));
        $searchphrases[] = HTMLHelper::_('select.option', 'any', Text::_('WF_SEARCH_ANY_WORDS'));
        $searchphrases[] = HTMLHelper::_('select.option', 'exact', Text::_('WF_SEARCH_EXACT_PHRASE'));
        $lists['searchphrase'] = HTMLHelper::_('select.radiolist', $searchphrases, 'searchphrase', '', 'value', 'text', 'all');

        $view = $this->getView(array('name' => 'search', 'layout' => 'search'));

        $view->searchareas = self::getAreas();
        $view->lists = $lists;

        $view->display();
    }

    private static function getSearchAreaFromUrl($url)
    {
        $query = parse_url($url, PHP_URL_QUERY);

        if (empty($query)) {
            return "";
        }

        parse_str($query, $values);

        if (!array_key_exists('option', $values)) {
            return "";
        }

        $language = Factory::getLanguage();

        $option = $values['option'];

        // load system language file
        $language->load($option . '.sys', JPATH_ADMINISTRATOR);
        $language->load($option, JPATH_ADMINISTRATOR);

        return Text::_($option);
    }

    /**
     * Process search.
     *
     * @param type $query Search query
     * @return array Search Results
     *
     * This method uses portions of SearchController::search from components/com_search/controller.php
     *
     * @copyright Copyright (C) 2005 - 2012 Open Source Matters, Inc. All rights reserved
     */
    public function doSearch($query)
    {
        $wf = WFEditorPlugin::getInstance();

        $results = array();

        if (empty($query)) {
            return $results;
        }

        // search area
        $area = null;

        // available search areas
        $areas = $this->getAreas();

        // query using a specific plugin
        if (strpos($query, ':') !== false) {
            preg_match('#^(' . implode('|', $areas) . ')\:(.+)#', $query, $matches);

            if ($matches) {
                $area = array($matches[1]);
                $query = $matches[2];
            }
        }

        $app = Factory::getApplication('site');
        $filter = InputFilter::getInstance();

        $limit = (int) $wf->getParam('search.link.limit', 50);

        // slashes cause errors, <> get stripped anyway later on. # causes problems.
        $searchword = trim(str_replace(array('#', '>', '<', '\\'), '', $filter->clean($query)));

        $ordering = null;
        $searchphrase = 'all';

        // if searchword enclosed in double quotes, strip quotes and do exact match
        if (substr($searchword, 0, 1) == '"' && substr($searchword, -1) == '"') {
            $searchword = substr($searchword, 1, -1);
            $searchphrase = 'exact';
        }

        $searchphrase = $app->input->post->getWord('searchphrase', $searchphrase);

        // get passed through ordering
        $ordering = $app->input->post->getWord('ordering', $ordering);

        // get passed through area
        $area = $app->input->post->getCmd('areas', (array) $area);

        if (empty($area)) {
            $area = null;
        }

        // trigger search on loaded plugins
        $searches = $app->triggerEvent('onContentSearch', array(
            $searchword,
            $searchphrase,
            $ordering,
            $area,
        ));

        $rows = array();

        foreach ($searches as $search) {
            $rows = array_merge((array) $rows, (array) $search);
        }

        // get first 10
        $rows = array_slice($rows, 0, $limit);

        $areas = array();

        for ($i = 0, $count = count($rows); $i < $count; ++$i) {
            $row = &$rows[$i];

            if (empty($row->href) || empty($row->title)) {
                continue;
            }

            $area = isset($row->section) ? $row->section : self::getSearchAreaFromUrl($row->href);

            if (!isset($areas[$area])) {
                $areas[$area] = array();
            }

            $result = new StdClass;

            if ($searchphrase == 'exact') {
                $searchwords = array($searchword);
                $needle = $searchword;
            } else {
                $searchworda = preg_replace('#\xE3\x80\x80#s', ' ', $searchword);
                $searchwords = preg_split("/\s+/u", $searchworda);
                $needle = $searchwords[0];
            }

            // get anchors if any...
            $row->anchors = self::getAnchors($row->text);

            // prepare and truncate search text
            $row->text = $this->prepareSearchContent($row->text, $needle);

            // remove base url
            if (Uri::base(true) && strpos($row->href, Uri::base(true)) !== false) {
                $row->href = substr_replace($row->href, '', 0, strlen(Uri::base(true)) + 1);
            }

            // remove the alias or ItemId from a link
            $row->href = self::route($row->href);

            $result->title = $row->title;
            $result->text = $row->text;
            $result->link = $row->href;

            if (!empty($row->anchors)) {
                $result->anchors = $row->anchors;
            }

            $areas[$area][] = $result;
        }

        if (!empty($areas)) {
            $results[] = $areas;
        }

        return $results;
    }

    private static function route($url)
    {
        $wf = WFEditorPlugin::getInstance();

        // remove link alias
        if ((bool) $wf->getParam('search.link.remove_alias', 0)) {
            $url = WFLinkHelper::removeAlias($url);
        }

        // remove Itemid if "home"
        $url = WFLinkHelper::removeHomeItemId($url);

        // remove Itemid if set
        if ((bool) $wf->getParam('search.link.itemid', 1) === false) {
            $url = WFLinkHelper::removeItemId($url);
        }

        return $url;
    }

    private static function getAnchors($content)
    {
        preg_match_all('#<a([^>]+)(name|id)="([a-z]+[\w\-\:\.]*)"([^>]*)>#i', $content, $matches, PREG_SET_ORDER);

        $anchors = array();

        if (!empty($matches)) {
            foreach ($matches as $match) {
                if (strpos($match[0], 'href') === false) {
                    $anchors[] = $match[3];
                }
            }
        }

        return $anchors;
    }
}
extensions/search/index.html000060400000000054152455721620012211 0ustar00<html><body bgcolor="#FFFFFF"></body></html>extensions/search/link.xml000060400000003535152455721620011702 0ustar00<?xml version="1.0" ?>
<extension version="3.4" type="plugin" group="jce" method="upgrade">
    <name>WF_LINK_SEARCH_TITLE</name>
    <version>2.9.99.2</version>
    <creationDate>22-04-2026</creationDate>
    <author>Ryan Demmer</author>
    <authorEmail>info@joomlacontenteditor.net</authorEmail>
    <authorUrl>https://www.joomlacontenteditor.net/</authorUrl>
    <copyright>Copyright (C) 2006 - 2026 Ryan Demmer. All rights reserved</copyright>
    <license>GNU/GPL Version 2 or later - http://www.gnu.org/licenses/gpl-2.0.html</license>
    <description>WF_LINK_SEARCH_DESC</description>
    <files>
        <filename>link.php</filename>
        <folder>link</folder>
    </files>
    <fields name="link">
        <fieldset name="link">
            <field name="enable" type="yesno" default="1" label="WF_LABEL_EXTENSION_ENABLE" description="WF_LABEL_EXTENSION_ENABLE_DESC">
                <option value="1">JYES</option>
                <option value="0">JNO</option>
            </field>
            <field name="plugins" type="searchplugins" multiple="true" label="WF_PARAM_LINK_SEARCH_PLUGINS" description="WF_PARAM_LINK_SEARCH_PLUGINS_DESC" default="categories,contacts,content,weblinks,tags" layout="joomla.form.field.list-fancy-select" />
            <field name="remove_alias" type="yesno" default="0" label="WF_LINK_SEARCH_REMOVE_ALIAS" description="WF_LINK_SEARCH_REMOVE_ALIAS_DESC">
                <option value="1">JYES</option>
                <option value="0">JNO</option>
            </field>
            <field name="itemid" type="yesno" default="1" label="WF_LINK_SEARCH_ITEMID" description="WF_LINK_SEARCH_ITEMID_DESC">
                <option value="1">JYES</option>
                <option value="0">JNO</option>
            </field>
        </fieldset>
    </fields>
    <plugins>link</plugins>
    <media></media>
    <languages></languages>
</extension>
extensions/search/css/link.css000060400000003062152455721620012455 0ustar00#search-browser,#searchbox{position:relative}#search-browser button{padding:0 .5em}#search-browser button .uk-icon{margin:auto}#searchbox{z-index:1}div#search-browser input[type=checkbox],div#search-browser input[type=radio]{vertical-align:middle}.phrases-box input[type=radio]{margin:-3px 5px 0 0}#searchbox input{border-top-right-radius:0;border-bottom-right-radius:0;margin:0}#searchbox+div{margin-left:-1px;padding:0}#search-button{border-top-left-radius:0;border-bottom-left-radius:0}#search-clear{display:none}#search-clear.uk-active{display:block}#search-browser .uk-icon-spinner{display:none;right:0}#search-browser.loading .uk-icon-spinner{display:flex;opacity:1}#search-result{width:100%;height:100%;position:absolute;display:none;overflow:auto;overflow-x:hidden;margin:2px 0}#search-result dl{margin:5px 0;padding:10px}#search-result dl dt{cursor:pointer;font-weight:700;text-overflow:ellipsis;overflow:hidden;white-space:pre;text-decoration:underline}div#search-browser div#search-result dl.odd{background-color:#F5F5F5}div#search-browser div#search-result dl dd.anchor{line-height:32px;cursor:pointer}div#search-browser #search-options{width:100%;padding:5px;margin:2px 0 0}div#search-browser #search-options fieldset{margin:0;padding:0}div#search-browser #search-options fieldset>div{margin:5px 0}div#search-browser #search-options label{min-width:40px}#search-options-button{line-height:1}#search-options .search_only ul{list-style:none;padding:0;margin:0}#search-options .search_only ul li{display:inline-block}@media (max-width:375px){#search-button span{display:none}}extensions/search/css/index.html000060400000000054152455721620013001 0ustar00<html><body bgcolor="#FFFFFF"></body></html>extensions/search/js/index.html000060400000000054152455721620012625 0ustar00<html><body bgcolor="#FFFFFF"></body></html>extensions/search/js/link.js000060400000007553152455721620012136 0ustar00/* jce - 2.9.99.2 | 2026-04-22 | https://www.joomlacontenteditor.net | Source: https://github.com/widgetfactory/jce | Copyright (C) 2006 - 2026 Ryan Demmer. All rights reserved | GNU/GPL Version 2 or later - http://www.gnu.org/licenses/gpl-2.0.html */
WFExtensions.add("LinkSearch", {
    options: {
        element: "#search-input",
        button: "#search-button",
        clear: "#search-clear",
        empty: "No Results",
        onClick: $.noop
    },
    init: function(options) {
        $.extend(this.options, options);
        var self = this, el = this.options.element, options = this.options.button;
        $(options).on("click", function(e) {
            self.search(), e.preventDefault();
        }).button({
            icons: {
                primary: "uk-icon-search"
            }
        }), $("#search-clear").on("click", function(e) {
            $(this).hasClass("uk-active") && ($(this).removeClass("uk-active"), 
            $(el).val(""), $("#search-result").empty().hide());
        }), $("#search-options-button").on("click", function(e) {
            e.preventDefault(), $(this).addClass("uk-active");
            e = $("#search-options").parent();
            $("#search-options").height(e.parent().height() - e.outerHeight() - 15).toggle();
        }).on("close", function() {
            $(this).removeClass("uk-active"), $("#search-options").hide();
        }), $(el).on("change keyup", function() {
            "" === this.value && ($("#search-result").empty().hide(), $("#search-clear").removeClass("uk-active"));
        });
    },
    search: function() {
        var self = this, s = this.options, el = s.element, $p = $("#search-result").parent(), query = $(el).val();
        query && !$(el).hasClass("placeholder") && ($("#search-clear").removeClass("uk-active"), 
        $("#search-browser").addClass("loading"), query = $.trim(query.replace(/[\///<>#]/g, "")), 
        Wf.JSON.request("doSearch", {
            json: [ query ]
        }, function(results) {
            if (results) {
                if (results.error) return void Wf.Dialog.alert(results.error, {
                    title: Wf.translate("link.search_error", "Search Error")
                });
                $("#search-result").empty(), results.length ? ($.each(results, function(i, values) {
                    $.each(values, function(name, items) {
                        $("<h3>" + name + "</h3>").appendTo("#search-result"), $.each(items, function(i, item) {
                            var $dl = $('<dl class="uk-margin-small" />').appendTo("#search-result");
                            $('<dt class="link uk-margin-small" />').text(item.title).on("click", function() {
                                $.isFunction(self.options.onClick) && self.options.onClick.call(this, Wf.String.decode(item.link));
                            }).prepend('<i class="uk-icon uk-icon-file-text-o uk-margin-small-right" />').appendTo($dl), 
                            $('<dd class="text">' + item.text + "</dd>").appendTo($dl), 
                            item.anchors && $.each(item.anchors, function(i, a) {
                                $('<dd class="anchor"><i role="presentation" class="uk-icon uk-icon-anchor uk-margin-small-right"></i>#' + a + "</dd>").on("click", function() {
                                    self.options.onClick.call(this, Wf.String.decode(item.link) + "#" + a);
                                }).appendTo($dl);
                            });
                        });
                    });
                }), $("dl:odd", "#search-result").addClass("odd")) : $("#search-result").append("<p>" + s.empty + "</p>"), 
                $("#search-options-button").trigger("close"), $("#search-result").height($p.parent().height() - $p.outerHeight() - 5).show();
            }
            $("#search-browser").removeClass("loading"), $("#search-clear").addClass("uk-active");
        }, self));
    }
});extensions/search/adapter/categories/index.html000060400000000054152455721620015756 0ustar00<html><body bgcolor="#FFFFFF"></body></html>extensions/search/adapter/categories/categories.php000060400000010361152455721620016621 0ustar00<?php
/**
 * @package     JCE
 * @subpackage  Editor
 *
 * @copyright   Copyright (C) 2005 - 2020 Open Source Matters, Inc. All rights reserved.
 * @copyright   Copyright (c) 2009-2024 Ryan Demmer. All rights reserved
 * @license     GNU General Public License version 2 or later; see LICENSE.txt
 */

\defined('_JEXEC') or die;

use Joomla\CMS\Factory;
use Joomla\CMS\Helper\RouteHelper;
use Joomla\CMS\Language\Text;
use Joomla\CMS\Plugin\CMSPlugin;

/**
 * Categories search plugin.
 *
 * @since  1.6
 */
class PlgWfSearchCategories extends CMSPlugin
{
    /**
     * Load the language file on instantiation.
     *
     * @var    boolean
     * @since  3.1
     */
    protected $autoloadLanguage = true;

    /**
     * Determine areas searchable by this plugin.
     *
     * @return  array  An array of search areas.
     *
     * @since   1.6
     */
    public function onContentSearchAreas()
    {
        static $areas = array(
            'categories' => 'PLG_SEARCH_CATEGORIES_CATEGORIES',
        );

        return $areas;
    }

    /**
     * Search content (categories).
     *
     * The SQL must return the following fields that are used in a common display
     * routine: href, title, section, created, text, browsernav.
     *
     * @param   string  $text      Target search string.
     * @param   string  $phrase    Matching option (possible values: exact|any|all).  Default is "any".
     * @param   string  $ordering  Ordering option (possible values: newest|oldest|popular|alpha|category).  Default is "newest".
     * @param   mixed   $areas     An array if the search is to be restricted to areas or null to search all areas.
     *
     * @return  array  Search results.
     *
     * @since   1.6
     */
    public function onContentSearch($text, $phrase = '', $ordering = '', $areas = null)
    {
        $db = Factory::getDbo();
        $user = Factory::getUser();
        $app = Factory::getApplication();
        $groups = implode(',', $user->getAuthorisedViewLevels());
        $searchText = $text;

        if (is_array($areas) && !array_intersect($areas, array_keys($this->onContentSearchAreas()))) {
            return array();
        }

        $limit = $this->params->def('search_limit', 50);
        $text = trim($text);

        if ($text === '') {
            return array();
        }

        switch ($ordering) {
            case 'alpha':
                $order = 'a.title ASC';
                break;

            case 'category':
            case 'popular':
            case 'newest':
            case 'oldest':
            default:
                $order = 'a.title DESC';
        }

        $text = $db->quote('%' . $db->escape($text, true) . '%', false);
        $query = $db->getQuery(true);

        // SQLSRV changes.
        $case_when = ' CASE WHEN ';
        $case_when .= $query->charLength('a.alias', '!=', '0');
        $case_when .= ' THEN ';

        // Joomla 3 compatibility
        if (method_exists($query, 'castAsChar')) {
            $a_id = $query->castAsChar('a.id');
        } else {
            $a_id = $query->castAs('CHAR', 'a.id');
        }
        
        $case_when .= $query->concatenate(array($a_id, 'a.alias'), ':');
        $case_when .= ' ELSE ';
        $case_when .= $a_id . ' END as slug';

        $query->select('a.title, a.description AS text, a.id AS catid, a.created_time, a.language, ' . $case_when);
        $query->from('#__categories AS a');
        $query->where(
            '(a.title LIKE ' . $text . ' OR a.description LIKE ' . $text . ') AND a.published = 1 AND a.extension = '
            . $db->quote('com_content') . 'AND a.access IN (' . $groups . ')'
        );

        $query->group('a.id, a.title, a.description, a.alias, a.created_time');
        $query->order($order);

        $db->setQuery($query, 0, $limit);

        try
        {
            $rows = $db->loadObjectList();
        } catch (RuntimeException $e) {
            Factory::getApplication()->enqueueMessage(Text::_('JERROR_AN_ERROR_HAS_OCCURRED'), 'error');
        }

        if ($rows) {
            foreach ($rows as $i => $row) {
                $rows[$i]->href = RouteHelper::getCategoryRoute($row->slug, $row->language, 'com_content');
                $rows[$i]->section = Text::_('JCATEGORY');
            }
        }

        return $rows;
    }
}
extensions/search/adapter/contacts/index.html000060400000000054152455721620015447 0ustar00<html><body bgcolor="#FFFFFF"></body></html>extensions/search/adapter/contacts/contacts.php000060400000013007152455721620016003 0ustar00<?php
/**
 * @package     JCE
 * @subpackage  Editor
 *
 * @copyright   Copyright (C) 2005 - 2020 Open Source Matters, Inc. All rights reserved.
 * @copyright   Copyright (c) 2009-2024 Ryan Demmer. All rights reserved
 * @license     GNU General Public License version 2 or later; see LICENSE.txt
 */

\defined('_JEXEC') or die;

use Joomla\CMS\Factory;
use Joomla\CMS\Helper\RouteHelper;
use Joomla\CMS\Language\Text;
use Joomla\CMS\Plugin\CMSPlugin;

/**
 * Contacts search plugin.
 */
class PlgWfSearchContacts extends CMSPlugin
{
    /**
     * Load the language file on instantiation.
     *
     * @var    boolean
     */
    protected $autoloadLanguage = true;

    /**
     * Determine areas searchable by this plugin.
     *
     * @return  array  An array of search areas.
     */
    public function onContentSearchAreas()
    {
        static $areas = array(
            'contacts' => 'PLG_SEARCH_CONTACTS_CONTACTS',
        );

        return $areas;
    }

    /**
     * Search content (contacts).
     *
     * The SQL must return the following fields that are used in a common display
     * routine: href, title, section, created, text, browsernav.
     *
     * @param   string  $text      Target search string.
     * @param   string  $phrase    Matching option (possible values: exact|any|all).  Default is "any".
     * @param   string  $ordering  Ordering option (possible values: newest|oldest|popular|alpha|category).  Default is "newest".
     * @param   string  $areas     An array if the search is to be restricted to areas or null to search all areas.
     *
     * @return  array  Search results.
     */
    public function onContentSearch($text, $phrase = '', $ordering = '', $areas = null)
    {
        $db = Factory::getDbo();
        $app = Factory::getApplication();
        $user = Factory::getUser();
        $groups = implode(',', $user->getAuthorisedViewLevels());

        // create a new RouteHelper instance
        $router = new RouteHelper();

        if (is_array($areas) && !array_intersect($areas, array_keys($this->onContentSearchAreas()))) {
            return array();
        }

        $limit = $this->params->def('search_limit', 50);

        $text = trim($text);

        if ($text === '') {
            return array();
        }

        $section = Text::_('PLG_SEARCH_CONTACTS_CONTACTS');

        switch ($ordering) {
            case 'alpha':
                $order = 'a.name ASC';
                break;

            case 'category':
                $order = 'c.title ASC, a.name ASC';
                break;

            case 'popular':
            case 'newest':
            case 'oldest':
            default:
                $order = 'a.name DESC';
        }

        $text = $db->quote('%' . $db->escape($text, true) . '%', false);

        $query = $db->getQuery(true);

        // SQLSRV changes.
        $case_when = ' CASE WHEN ';
        $case_when .= $query->charLength('a.alias', '!=', '0');
        $case_when .= ' THEN ';

        if (method_exists($query, 'castAsChar')) {
            $a_id = $query->castAsChar('a.id');
        } else {
            $a_id = $query->castAs('CHAR', 'a.id');
        }

        $case_when .= $query->concatenate(array($a_id, 'a.alias'), ':');
        $case_when .= ' ELSE ';
        $case_when .= $a_id . ' END as slug';

        $case_when1 = ' CASE WHEN ';
        $case_when1 .= $query->charLength('c.alias', '!=', '0');
        $case_when1 .= ' THEN ';

        if (method_exists($query, 'castAsChar')) {
            $c_id = $query->castAsChar('c.id');
        } else {
            $c_id = $query->castAs('CHAR', 'c.id');
        }

        $case_when1 .= $query->concatenate(array($c_id, 'c.alias'), ':');
        $case_when1 .= ' ELSE ';
        $case_when1 .= $c_id . ' END as catslug';

        $query->select(
            'a.name AS title, a.con_position, a.misc, a.language, '
            . $case_when . ',' . $case_when1 . ', '
            . $query->concatenate(array('a.name', 'a.con_position', 'a.misc'), ',') . ' AS text'
        );
        $query->from('#__contact_details AS a')
            ->join('INNER', '#__categories AS c ON c.id = a.catid')
            ->where(
                '(a.name LIKE ' . $text . ' OR a.misc LIKE ' . $text . ' OR a.con_position LIKE ' . $text
                . ' OR a.address LIKE ' . $text . ' OR a.suburb LIKE ' . $text . ' OR a.state LIKE ' . $text
                . ' OR a.country LIKE ' . $text . ' OR a.postcode LIKE ' . $text . ' OR a.telephone LIKE ' . $text
                . ' OR a.fax LIKE ' . $text . ') AND a.published = 1 AND c.published = 1 '
                . ' AND a.access IN (' . $groups . ') AND c.access IN (' . $groups . ')'
            )
            ->order($order);

        $db->setQuery($query, 0, $limit);

        try
        {
            $rows = $db->loadObjectList();
        } catch (RuntimeException $e) {
            $rows = array();
            Factory::getApplication()->enqueueMessage(Text::_('JERROR_AN_ERROR_HAS_OCCURRED'), 'error');
        }

        if ($rows) {
            // create a new RouteHelper instance
            $router = new RouteHelper();

            foreach ($rows as $key => $row) {
                $rows[$key]->href = $router->getRoute($row->slug, 'com_contact.contact', '', $row->language, $row->catslug);
                $rows[$key]->text = $row->title;
                $rows[$key]->text .= $row->con_position ? ', ' . $row->con_position : '';
                $rows[$key]->text .= $row->misc ? ', ' . $row->misc : '';

                $rows[$key]->section = $section;
            }
        }

        return $rows;
    }
}
extensions/search/adapter/index.html000060400000000054152455721620013631 0ustar00<html><body bgcolor="#FFFFFF"></body></html>extensions/search/adapter/tags/tags.php000060400000011416152455721620014245 0ustar00<?php

/**
 * @package     JCE
 * @subpackage  Editor
 *
 * @copyright   Copyright (C) 2005 - 2020 Open Source Matters, Inc. All rights reserved.
 * @copyright   Copyright (c) 2009-2024 Ryan Demmer. All rights reserved
 * @license     GNU General Public License version 2 or later; see LICENSE.txt
 */

\defined('_JEXEC') or die;

use Joomla\CMS\Factory;
use Joomla\CMS\Helper\RouteHelper;
use Joomla\CMS\Language\Text;
use Joomla\CMS\Plugin\CMSPlugin;

/**
 * Tags search plugin.
 *
 */
class PlgWfSearchTags extends CMSPlugin
{
    /**
     * Load the language file on instantiation.
     *
     * @var    boolean
     */
    protected $autoloadLanguage = true;

    /**
     * Determine areas searchable by this plugin.
     *
     * @return  array  An array of search areas.
     *
     */
    public function onContentSearchAreas()
    {
        static $areas = array(
            'tags' => 'PLG_SEARCH_TAGS_TAGS',
        );

        return $areas;
    }

    /**
     * Search content (tags).
     *
     * The SQL must return the following fields that are used in a common display
     * routine: href, title, section, created, text, browsernav.
     *
     * @param   string  $text      Target search string.
     * @param   string  $phrase    Matching option (possible values: exact|any|all).  Default is "any".
     * @param   string  $ordering  Ordering option (possible values: newest|oldest|popular|alpha|category).  Default is "newest".
     * @param   string  $areas     An array if the search is to be restricted to areas or null to search all areas.
     *
     * @return  array  Search results.
     *
     * @since   3.3
     */
    public function onContentSearch($text, $phrase = '', $ordering = '', $areas = null)
    {
        $db = Factory::getDbo();
        $query = $db->getQuery(true);
        $app = Factory::getApplication();
        $user = Factory::getUser();
        $lang = Factory::getLanguage();

        $section = Text::_('PLG_SEARCH_TAGS_TAGS');
        $limit = $this->params->def('search_limit', 50);

        if (is_array($areas) && !array_intersect($areas, array_keys($this->onContentSearchAreas()))) {
            return array();
        }

        $text = trim($text);

        if ($text === '') {
            return array();
        }

        $text = $db->quote('%' . $db->escape($text, true) . '%', false);

        switch ($ordering) {
            case 'alpha':
                $order = 'a.title ASC';
                break;

            case 'newest':
                $order = 'a.created_time DESC';
                break;

            case 'oldest':
                $order = 'a.created_time ASC';
                break;

            case 'popular':
            default:
                $order = 'a.title DESC';
        }

        $query->select('a.id, a.title, a.alias, a.note, a.published, a.access'
            . ', a.checked_out, a.checked_out_time, a.created_user_id'
            . ', a.path, a.parent_id, a.level, a.lft, a.rgt'
            . ', a.language, a.created_time AS created, a.description');

        $case_when_item_alias = ' CASE WHEN ';
        $case_when_item_alias .= $query->charLength('a.alias', '!=', '0');
        $case_when_item_alias .= ' THEN ';

        // Joomla 3 compatibility
        if (method_exists($query, 'castAsChar')) {
            $a_id = $query->castAsChar('a.id');
        } else {
            $a_id = $query->castAs('CHAR', 'a.id');
        }

        $case_when_item_alias .= $query->concatenate(array($a_id, 'a.alias'), ':');
        $case_when_item_alias .= ' ELSE ';
        $case_when_item_alias .= $a_id . ' END as slug';
        $query->select($case_when_item_alias);

        $query->from('#__tags AS a');
        $query->where('a.alias <> ' . $db->quote('root'));

        $query->where('(a.title LIKE ' . $text . ' OR a.alias LIKE ' . $text . ')');

        $query->where($db->qn('a.published') . ' = 1');

        if (!$user->authorise('core.admin')) {
            $groups = implode(',', $user->getAuthorisedViewLevels());
            $query->where('a.access IN (' . $groups . ')');
        }

        $query->order($order);

        $db->setQuery($query, 0, $limit);

        try {
            $rows = $db->loadObjectList();
        } catch (RuntimeException $e) {
            $rows = array();
            Factory::getApplication()->enqueueMessage(Text::_('JERROR_AN_ERROR_HAS_OCCURRED'), 'error');
        }

        if ($rows) {
            // create a new RouteHelper instance
            $router = new RouteHelper();

            foreach ($rows as $key => $row) {
                $rows[$key]->href = $router->getRoute($row->slug, 'com_tags.tag', '', $row->language);
                $rows[$key]->text = ($row->description !== '' ? $row->description : $row->title);
                $rows[$key]->text .= $row->note;
            }
        }

        return $rows;
    }
}
extensions/search/adapter/tags/index.html000060400000000054152455721620014567 0ustar00<html><body bgcolor="#FFFFFF"></body></html>extensions/search/adapter/content/content.php000060400000015646152455721620015506 0ustar00<?php
/**
 * @package     JCE
 * @subpackage  Editor
 *
 * @copyright   Copyright (C) 2005 - 2020 Open Source Matters, Inc. All rights reserved.
 * @copyright   Copyright (c) 2009-2024 Ryan Demmer. All rights reserved
 * @license     GNU General Public License version 2 or later; see LICENSE.txt
 */

\defined('_JEXEC') or die;

use Joomla\CMS\Factory;
use Joomla\CMS\Helper\RouteHelper;
use Joomla\CMS\Language\Text;
use Joomla\CMS\Plugin\CMSPlugin;

/**
 * Content search plugin.
 *
 */
class PlgWfSearchContent extends CMSPlugin
{
    /**
     * Determine areas searchable by this plugin.
     *
     * @return  array  An array of search areas.
     *
     */
    public function onContentSearchAreas()
    {
        static $areas = array(
            'content' => 'JGLOBAL_ARTICLES',
        );

        return $areas;
    }

    /**
     * Search content (articles).
     * The SQL must return the following fields that are used in a common display
     * routine: href, title, section, created, text, browsernav.
     *
     * @param   string  $text      Target search string.
     * @param   string  $phrase    Matching option (possible values: exact|any|all).  Default is "any".
     * @param   string  $ordering  Ordering option (possible values: newest|oldest|popular|alpha|category).  Default is "newest".
     * @param   mixed   $areas     An array if the search it to be restricted to areas or null to search all areas.
     *
     * @return  array  Search results.
     *
     */
    public function onContentSearch($text, $phrase = '', $ordering = '', $areas = null)
    {
        $db = Factory::getDbo();
        $serverType = $db->getServerType();
        $app = Factory::getApplication();
        $user = Factory::getUser();
        $groups = implode(',', $user->getAuthorisedViewLevels());
        $tag = Factory::getLanguage()->getTag();

        $searchText = $text;

        if (is_array($areas) && !array_intersect($areas, array_keys($this->onContentSearchAreas()))) {
            return array();
        }

        $limit = $this->params->def('search_limit', 50);

        $nullDate = $db->getNullDate();
        $date = Factory::getDate();
        $now = $date->toSql();

        $text = trim($text);

        if ($text === '') {
            return array();
        }

        $relevance = array();

        switch ($phrase) {
            case 'exact':
                $text = $db->quote('%' . $db->escape($text, true) . '%', false);
                $wheres2 = array();
                $wheres2[] = 'a.title LIKE ' . $text;
                $wheres2[] = 'a.introtext LIKE ' . $text;
                $wheres2[] = 'a.fulltext LIKE ' . $text;

                $relevance[] = ' CASE WHEN ' . $wheres2[0] . ' THEN 5 ELSE 0 END ';

                $where = '(' . implode(') OR (', $wheres2) . ')';
                break;

            case 'all':
            case 'any':
            default:
                $words = explode(' ', $text);
                $wheres = array();

                foreach ($words as $word) {
                    $word = $db->quote('%' . $db->escape($word, true) . '%', false);
                    $wheres2 = array();
                    $wheres2[] = 'LOWER(a.title) LIKE LOWER(' . $word . ')';
                    $wheres2[] = 'LOWER(a.introtext) LIKE LOWER(' . $word . ')';
                    $wheres2[] = 'LOWER(a.fulltext) LIKE LOWER(' . $word . ')';

                    $relevance[] = ' CASE WHEN ' . $wheres2[0] . ' THEN 5 ELSE 0 END ';

                    $wheres[] = implode(' OR ', $wheres2);
                }

                $where = '(' . implode(($phrase === 'all' ? ') AND (' : ') OR ('), $wheres) . ')';
                break;
        }

        switch ($ordering) {
            case 'oldest':
                $order = 'a.created ASC';
                break;

            case 'popular':
                $order = 'a.hits DESC';
                break;

            case 'alpha':
                $order = 'a.title ASC';
                break;

            case 'category':
                $order = 'c.title ASC, a.title ASC';
                break;

            case 'newest':
            default:
                $order = 'a.created DESC';
                break;
        }

        $rows = array();
        $query = $db->getQuery(true);

        // Search articles.
        if ($limit > 0) {
            //sqlsrv changes
            $case_when1 = ' CASE WHEN ';
            $case_when1 .= $query->charLength('a.alias', '!=', '0');
            $case_when1 .= ' THEN ';

            // Joomla 3 compatibility
            if (method_exists($query, 'castAsChar')) {
                $a_id = $query->castAsChar('a.id');
            } else {
                $a_id = $query->castAs('CHAR', 'a.id');
            }

            $case_when1 .= $query->concatenate(array($a_id, 'a.alias'), ':');
            $case_when1 .= ' ELSE ';
            $case_when1 .= $a_id . ' END as slug';

            $case_when2 = ' CASE WHEN ';
            $case_when2 .= $query->charLength('b.alias', '!=', '0');
            $case_when2 .= ' THEN ';
            
            // Joomla 3 compatibility
            if (method_exists($query, 'castAsChar')) {
                $c_id = $query->castAsChar('b.id');
            } else {
                $c_id = $query->castAs('CHAR', 'b.id');
            }

            $case_when2 .= $query->concatenate(array($c_id, 'b.alias'), ':');
            $case_when2 .= ' ELSE ';
            $case_when2 .= $c_id . ' END as catslug';

            $case = ',' . $case_when1 . ',' . $case_when2;

            if (!empty($relevance)) {
                $query->select(implode(' + ', $relevance) . ' AS relevance');
                $order = ' relevance DESC, ' . $order;
            }

            $query->select('a.id AS slug, b.id AS catslug, a.alias, a.state, a.title AS title, a.access, ' . $query->concatenate(array('a.introtext', 'a.fulltext')) . ' AS text, a.language' . $case);
            $query->from('#__content AS a');
            $query->innerJoin('#__categories AS b ON b.id = a.catid');
            $query->where('(' . $where . ') AND a.state = 1 AND b.published = 1');

            if (!$user->authorise('core.admin')) {
                $query->where('a.access IN (' . $groups . ')');
                $query->where('b.access IN (' . $groups . ')');
            }

            $query->order($order);

            $db->setQuery($query, 0, $limit);

            try
            {
                $rows = $db->loadObjectList();
            } catch (RuntimeException $e) {
                $rows = array();
                Factory::getApplication()->enqueueMessage(Text::_('JERROR_AN_ERROR_HAS_OCCURRED'), 'error');
            }

            if ($rows) {
                // create a new RouteHelper instance
                $router = new RouteHelper();

                foreach ($rows as $key => $row) {
                    $rows[$key]->href = $router->getRoute($row->slug, 'com_content.article', '', $row->language, $row->catslug);
                }
            }
        }

        return $rows;
    }
}
extensions/search/adapter/content/index.html000060400000000054152455721620015303 0ustar00<html><body bgcolor="#FFFFFF"></body></html>extensions/search/adapter/weblinks/weblinks.php000060400000013142152455721620016003 0ustar00<?php

/**
 * @package     JCE
 * @subpackage  Editor
 *
 * @copyright   Copyright (C) 2005 - 2020 Open Source Matters, Inc. All rights reserved.
 * @copyright   Copyright (c) 2009-2024 Ryan Demmer. All rights reserved
 * @license     GNU General Public License version 2 or later; see LICENSE.txt
 */

\defined('_JEXEC') or die;

use Joomla\CMS\Factory;
use Joomla\CMS\Language\Text;
use Joomla\CMS\Plugin\CMSPlugin;

require_once JPATH_SITE . '/components/com_weblinks/helpers/route.php';

/**
 * Weblinks search plugin.
 *
 */
class PlgWfSearchWeblinks extends CMSPlugin
{
    /**
     * Load the language file on instantiation.
     *
     * @var    boolean
     */
    protected $autoloadLanguage = true;

    /**
     * Determine areas searchable by this plugin.
     *
     * @return  array  An array of search areas.
     *
     */
    public function onContentSearchAreas()
    {
        static $areas = array(
            'weblinks' => 'PLG_SEARCH_WEBLINKS_WEBLINKS',
        );

        return $areas;
    }

    /**
     * Search content (weblinks).
     *
     * The SQL must return the following fields that are used in a common display
     * routine: href, title, section, created, text, browsernav
     *
     * @param   string  $text      Target search string.
     * @param   string  $phrase    Matching option (possible values: exact|any|all).  Default is "any".
     * @param   string  $ordering  Ordering option (possible values: newest|oldest|popular|alpha|category).  Default is "newest".
     * @param   mixed   $areas     An array if the search it to be restricted to areas or null to search all areas.
     *
     * @return  array  Search results.
     *
     * @since   1.6
     */
    public function onContentSearch($text, $phrase = '', $ordering = '', $areas = null)
    {
        $db = Factory::getDbo();
        $groups = implode(',', Factory::getUser()->getAuthorisedViewLevels());

        $searchText = $text;

        if (is_array($areas)) {
            if (!array_intersect($areas, array_keys($this->onContentSearchAreas()))) {
                return array();
            }
        }

        $limit = $this->params->def('search_limit', 50);
        $state = array();

        $text = trim($text);

        if ($text == '') {
            return array();
        }

        switch ($phrase) {
            case 'exact':
                $text = $db->quote('%' . $db->escape($text, true) . '%', false);
                $wheres2 = array();
                $wheres2[] = 'a.url LIKE ' . $text;
                $wheres2[] = 'a.description LIKE ' . $text;
                $wheres2[] = 'a.title LIKE ' . $text;
                $where = '(' . implode(') OR (', $wheres2) . ')';
                break;

            case 'all':
            case 'any':
            default:
                $words = explode(' ', $text);
                $wheres = array();

                foreach ($words as $word) {
                    $word = $db->quote('%' . $db->escape($word, true) . '%', false);
                    $wheres2 = array();
                    $wheres2[] = 'a.url LIKE ' . $word;
                    $wheres2[] = 'a.description LIKE ' . $word;
                    $wheres2[] = 'a.title LIKE ' . $word;
                    $wheres[] = implode(' OR ', $wheres2);
                }

                $where = '(' . implode(($phrase == 'all' ? ') AND (' : ') OR ('), $wheres) . ')';
                break;
        }

        switch ($ordering) {
            case 'oldest':
                $order = 'a.created ASC';
                break;

            case 'popular':
                $order = 'a.hits DESC';
                break;

            case 'alpha':
                $order = 'a.title ASC';
                break;

            case 'category':
                $order = 'c.title ASC, a.title ASC';
                break;

            case 'newest':
            default:
                $order = 'a.created DESC';
        }

        $query = $db->getQuery(true);

        // SQLSRV changes.
        $case_when = ' CASE WHEN ';
        $case_when .= $query->charLength('a.alias', '!=', '0');
        $case_when .= ' THEN ';

        // Joomla 3 compatibility
        if (method_exists($query, 'castAsChar')) {
            $a_id = $query->castAsChar('a.id');
        } else {
            $a_id = $query->castAs('CHAR', 'a.id');
        }

        $case_when .= $query->concatenate(array($a_id, 'a.alias'), ':');
        $case_when .= ' ELSE ';
        $case_when .= $a_id . ' END as slug';

        $case_when1 = ' CASE WHEN ';
        $case_when1 .= $query->charLength('c.alias', '!=', '0');
        $case_when1 .= ' THEN ';

        // Joomla 3 compatibility
        if (method_exists($query, 'castAsChar')) {
            $c_id = $query->castAsChar('c.id');
        } else {
            $c_id = $query->castAs('CHAR', 'c.id');
        }

        $case_when1 .= $query->concatenate(array($c_id, 'c.alias'), ':');
        $case_when1 .= ' ELSE ';
        $case_when1 .= $c_id . ' END as catslug';

        $query->select('a.title AS title, a.created AS created, a.url, a.description AS text, a.language, ' . $case_when . "," . $case_when1)
            ->from('#__weblinks AS a')
            ->join('INNER', '#__categories as c ON c.id = a.catid')
            ->where('(' . $where . ') AND a.state = 1 AND c.published = 1 AND c.access IN (' . $groups . ')')
            ->order($order);

        $db->setQuery($query, 0, $limit);
        $rows = $db->loadObjectList();

        if ($rows) {
            foreach ($rows as $key => $row) {
                $rows[$key]->href = WeblinksHelperRoute::getWeblinkRoute($row->slug, $row->catslug, $row->language);
            }
        }

        return $rows;
    }
}
extensions/search/adapter/weblinks/index.html000060400000000054152455721620015447 0ustar00<html><body bgcolor="#FFFFFF"></body></html>extensions/index.html000060400000000054152455721620010744 0ustar00<html><body bgcolor="#FFFFFF"></body></html>plugins/advlist/config.php000060400000003241152455721620011656 0ustar00<?php
/**
 * @package     JCE
 * @subpackage  Editor
 *
 * @copyright   Copyright (c) 2009-2024 Ryan Demmer. All rights reserved
 * @license     GNU General Public License version 2 or later; see LICENSE.txt
 */

\defined('_JEXEC') or die;

class WFAdvlistPluginConfig
{
    public static function getConfig(&$settings)
    {
        $wf = WFApplication::getInstance();
        
        $bullet = self::getBulletList();
        $settings['advlist_bullist_styles'] = $bullet !== false ? implode(',', $bullet) : false;

        $number = self::getNumberList();
        $settings['advlist_number_styles'] = $number !== false ? implode(',', $number) : false;

        $settings['advlist_bullist_classes'] = $wf->getParam('lists.bullet_classes', '');
        $settings['advlist_numlist_classes'] = $wf->getParam('lists.numlist_classes', '');

        $settings['advlist_bullist_custom_classes'] = $wf->getParam('lists.bullet_custom_classes', []);
        $settings['advlist_numlist_custom_classes'] = $wf->getParam('lists.numlist_custom_classes', []);
    }

    private static function getNumberList()
    {
        $wf = WFApplication::getInstance();
        $number = (array) $wf->getParam('lists.number_styles');

        if (empty($number) || (count($number) === 1 && array_shift($number) === 'default')) {
            return false;
        }

        return $number;
    }

    private static function getBulletList()
    {
        $wf = WFApplication::getInstance();
        $bullet = (array) $wf->getParam('lists.bullet_styles');

        if (empty($bullet) || (count($bullet) === 1 && array_shift($bullet) === 'default')) {
            return false;
        }

        return $bullet;
    }
}
plugins/advlist/index.html000060400000000054152455721620011674 0ustar00<html><body bgcolor="#FFFFFF"></body></html>plugins/cleanup/index.html000060400000000054152455721620011655 0ustar00<html><body bgcolor="#FFFFFF"></body></html>plugins/cleanup/cleanup.xml000060400000001150152455721620012027 0ustar00<?xml version="1.0" ?>
<extension version="3.4" type="plugin" group="jce" method="upgrade">
	<name>WF_CLEANUP_TITLE</name>
	<version>2.9.99.2</version>
	<creationDate>22-04-2026</creationDate>
	<author>Moxiecode / Ryan Demmer</author>
	<authorEmail>info@joomlacontenteditor.net</authorEmail>
	<authorUrl>https://www.joomlacontenteditor.net/</authorUrl>
	<copyright>Ryan Demmer</copyright>
	<license>GNU/GPL Version 2 or later - http://www.gnu.org/licenses/gpl-2.0.html</license>
	<description>WF_CLEANUP_DESC</description>
	<icon>cleanup</icon>
	<files></files>
	<languages></languages>
	<help></help>
</extension>
 plugins/cleanup/config.php000060400000014273152455721620011646 0ustar00<?php

/**
 * @package     JCE
 * @subpackage  Editor
 *
 * @copyright   Copyright (c) 2009-2024 Ryan Demmer. All rights reserved
 * @license     GNU General Public License version 2 or later; see LICENSE.txt
 */

\defined('_JEXEC') or die;

class WFCleanupPluginConfig
{
    private static $invalid_elements = array('iframe', 'object', 'param', 'embed', 'audio', 'video', 'source', 'script', 'style', 'applet', 'body', 'bgsound', 'base', 'basefont', 'frame', 'frameset', 'head', 'html', 'id', 'ilayer', 'layer', 'link', 'meta', 'name', 'title', 'xml');

    public static function getConfig(&$settings)
    {
        $wf = WFApplication::getInstance();

        // Encoding
        $settings['entity_encoding'] = $wf->getParam('editor.entity_encoding');

        // keep &nbsp;
        $nbsp = (bool) $wf->getParam('editor.keep_nbsp', 1);

        $settings['keep_nbsp'] = $nbsp;

        // use named encoding with limited entities set if raw/utf-8 and keep_nbsp === true
        if ($settings['entity_encoding'] === 'raw' && $nbsp) {
            $settings['entity_encoding'] = 'named';
            $settings['entities'] = '160,nbsp,173,shy';
        }

        // set "plugin mode"
        $settings['cleanup_pluginmode'] = $wf->getParam('editor.cleanup_pluginmode', 0, 0);

        // get verify html (default is true)
        $settings['verify_html'] = $wf->getParam('editor.verify_html', 1, 1, 'boolean', false);

        // get sanitize html (default is true)
        $settings['sanitize_html'] = $wf->getParam('editor.sanitize_html', 1, 1, 'boolean', false);

        $settings['pad_empty_tags'] = $wf->getParam('editor.pad_empty_tags', 1, 1, 'boolean');

        // set schema
        $settings['schema'] = $wf->getParam('editor.schema', 'mixed', 'mixed');

        if ($settings['schema'] === 'html5') {
            $settings['schema'] = 'html5-strict';
        }

        $settings['validate_styles'] = $wf->getParam('editor.validate_styles', 1, 1, 'boolean', false);

        // Get Extended elements
        $settings['extended_valid_elements'] = self::processValue($wf->getParam('editor.extended_elements', ''));

        // Configuration list of invalid elements as array
        $settings['invalid_elements'] = self::processValue($wf->getParam('editor.invalid_elements', ''));

        // Add elements to invalid list (removed by plugin)
        $settings['invalid_elements'] = self::normalizeList(
            array_merge($settings['invalid_elements'], self::$invalid_elements)
        );

        // process extended_valid_elements
        if ($settings['extended_valid_elements']) {
            $extended_elements = $settings['extended_valid_elements'];

            $elements = array();

            // add wildcard attributes if none specified
            for ($i = 0; $i < count($extended_elements); ++$i) {
                $value = $extended_elements[$i];

                // clean up value
                $value = preg_replace('#[^a-zA-Z0-9_\-\[\]\*@\|\/!=\:\?+\#]#', '', $value);

                $pos = strpos($value, '[');

                if ($pos === false) {
                    $elements[] = $value;
                    $value .= '[*]';
                } else {
                    $elements[] = substr($value, 0, $pos);
                }

                $extended_elements[$i] = $value;
            }

            // restore settings to array
            $settings['extended_valid_elements'] = $extended_elements;

            if (!empty($elements)) {
                $settings['invalid_elements'] = array_diff($settings['invalid_elements'], $elements);
            }
        }

        // Final cleanup + reindex
        $settings['invalid_elements'] = self::normalizeList($settings['invalid_elements']);

        $settings['invalid_attributes'] = self::processValue($wf->getParam('editor.invalid_attributes', 'dynsrc,lowsrc'));
        $settings['invalid_attribute_values'] = self::processValue($wf->getParam('editor.invalid_attribute_values'));

        $allow_script = $wf->getParam('editor.allow_javascript', 0, 0, 'boolean');

        // if scripts are allowed, then allow event attributes
        if ($allow_script || (bool) $wf->getParam('editor.allow_event_attributes')) {
            $settings['allow_event_attributes'] = true;
        }
    }

    private static function normalizeList($values)
    {
        $values = array_map('trim', (array) $values);
        $values = array_filter($values, 'strlen');      // removes '' and whitespace-only
        $values = array_values(array_unique($values));  // reindex + unique
        // optional, but helps stable comparisons:
        // sort($values, SORT_STRING);

        return $values;
    }

    /**
     * Normalise a value or set of values into a flat array.
     *
     * Accepts a string, an array, or a mixed array containing delimited strings,
     * and converts the input into a single, flattened array of trimmed values.
     *
     * Examples:
     * - "one,two"               -> ["one", "two"]
     * - ["one", "two"]          -> ["one", "two"]
     * - ["one", "two,three"]    -> ["one", "two", "three"]
     *
     * Empty values are removed and all values are trimmed.
     *
     * @param  string|array  $values     A delimited string, an array of values,
     *                                   or an array containing delimited strings.
     * @param  string        $seperator  The value separator to split on.
     *
     * @return array                    A flat array of normalised values.
     */
    public static function processValue($values, $seperator = ',')
    {
        if (is_array($values)) {
            $values = array_filter($values, 'trim');

            foreach ($values as $key => $value) {
                $value = trim($value);

                if (is_string($value) && strpos($value, $seperator) !== false) {
                    $values = array_merge($values, explode($seperator, $value));
                    unset($values[$key]);
                }
            }
        } elseif (is_string($values)) {
            $values = explode($seperator, $values);
        } else {
            $values = [];
        }

        $values = array_values(
            array_filter(
                array_map('trim', $values),
                'strlen'
            )
        );

        return $values;
    }
}
plugins/index.html000060400000000054152455721620010226 0ustar00<html><body bgcolor="#FFFFFF"></body></html>plugins/code/index.html000060400000000054152455721620011140 0ustar00<html><body bgcolor="#FFFFFF"></body></html>plugins/code/config.php000060400000002645152455721620011131 0ustar00<?php
/**
 * @package     JCE
 * @subpackage  Editor
 *
 * @copyright   Copyright (c) 2009-2024 Ryan Demmer. All rights reserved
 * @license     GNU General Public License version 2 or later; see LICENSE.txt
 */

\defined('_JEXEC') or die;

class WFCodePluginConfig
{
    public static function getConfig(&$settings)
    {
        $wf = WFApplication::getInstance();

        if (!in_array('code', $settings['plugins'])) {
            $settings['plugins'][] = 'code';
        }

        $settings['code_use_blocks'] = $wf->getParam('editor.code_blocks', 1, 1, 'boolean');

        $settings['code_allow_php'] = $wf->getParam('editor.allow_php', 0, 0, 'boolean');
        $settings['code_allow_script'] = $wf->getParam('editor.allow_javascript', 0, 0, 'boolean');
        $settings['code_allow_style'] = $wf->getParam('editor.allow_css', 0, 0, 'boolean');

        $settings['code_protect_shortcode'] = $wf->getParam('editor.protect_shortcode', 0, 0, 'boolean');
        $settings['code_allow_custom_xml'] = $wf->getParam('editor.allow_custom_xml', 0, 0, 'boolean');

        $remove = array();

        // remove as Invalid Elements
        if ($settings['code_allow_script']) {
            $remove[] = 'script';
        }

        if ($settings['code_allow_style']) {
            $remove[] = 'style';
            $remove[] = 'link';
        }

        $settings['invalid_elements'] = array_diff($settings['invalid_elements'], $remove);
    }
}
plugins/wordcount/index.html000060400000000054152455721620012252 0ustar00<html><body bgcolor="#FFFFFF"></body></html>plugins/wordcount/config.php000060400000001050152455721620012230 0ustar00<?php
/**
 * @package     JCE
 * @subpackage  Editor
 *
 * @copyright   Copyright (c) 2009-2024 Ryan Demmer. All rights reserved
 * @license     GNU General Public License version 2 or later; see LICENSE.txt
 */

\defined('_JEXEC') or die;

class WFWordcountPluginConfig
{
    public static function getConfig(&$settings)
    {
        $wf = WFApplication::getInstance();
        $settings['wordcount_limit'] = $wf->getParam('editor.wordcount_limit', 0, 0);
        $settings['wordcount_alert'] = $wf->getParam('editor.wordcount_alert', 0, 0);
    }
}
plugins/wordcount/wordcount.xml000060400000001131152455721620013020 0ustar00<?xml version="1.0" ?>
<extension version="3.4" type="plugin" group="jce" method="upgrade">
	<name>WF_WORDCOUNT_TITLE</name>
	<version>2.9.99.2</version>
	<creationDate>22-04-2026</creationDate>
	<author>Ryan Demmer</author>
	<authorEmail>info@joomlacontenteditor.net</authorEmail>
	<authorUrl>https://www.joomlacontenteditor.net/</authorUrl>
	<copyright>Ryan Demmer</copyright>
	<license>GNU/GPL Version 2 or later - http://www.gnu.org/licenses/gpl-2.0.html</license>
	<description>WF_WORDCOUNT_DESC</description>
	<icon></icon>
	<fields></fields>
	<help></help>
	<languages></languages>
</extension>plugins/textcase/index.html000060400000000054152455721620012046 0ustar00<html><body bgcolor="#FFFFFF"></body></html>plugins/textcase/textcase.xml000060400000001216152455721620012414 0ustar00<?xml version="1.0" ?>
<extension version="3.4" type="plugin" group="jce" method="upgrade">
	<name>WF_TEXTCASE_TITLE</name>
	<version>2.9.99.2</version>
	<creationDate>22-04-2026</creationDate>
	<author>Ryan Demmer</author>
	<authorEmail>info@joomlacontenteditor.net</authorEmail>
	<authorUrl>https://www.joomlacontenteditor.net/</authorUrl>
	<copyright>Ryan Demmer</copyright>
	<license>GNU/GPL Version 2 or later - http://www.gnu.org/licenses/gpl-2.0.html</license>
	<description>WF_TEXTCASE_DESC</description>
	<icon>textcase</icon>
	<help>
		<topic key="textcase.about" title="WF_TEXTCASE_HELP_ABOUT" />
	</help>
	<languages></languages>
</extension>plugins/media/index.html000060400000000054152455721620011305 0ustar00<html><body bgcolor="#FFFFFF"></body></html>plugins/media/media.xml000060400000011346152455721620011117 0ustar00<?xml version="1.0" ?>
<extension version="3.4" type="plugin" group="jce" method="upgrade">
    <name>WF_MEDIA_TITLE</name>
    <version>2.9.99.2</version>
    <creationDate>22-04-2026</creationDate>
    <author>Ryan Demmer</author>
    <authorEmail>info@joomlacontenteditor.net</authorEmail>
    <authorUrl>https://www.joomlacontenteditor.net</authorUrl>
    <copyright>Copyright (C) 2006 - 2026 Ryan Demmer. All rights reserved</copyright>
    <license>GNU/GPL Version 2 or later - http://www.gnu.org/licenses/gpl-2.0.html</license>
    <description>WF_MEDIA_DESC</description>
    <icon></icon>
    <fields name="media">
        <fieldset name="config">
            <field name="iframes" type="list" default="0" label="WF_MEDIA_PARAM_IFRAMES" description="WF_MEDIA_PARAM_IFRAMES_DESC">
                <option value="1">JYES</option>
                <option value="0">JNO</option>
                <option value="2">WF_MEDIA_PARAM_LOCAL_ONLY</option>
                <option value="3">WF_MEDIA_PARAM_IFRAMES_SUPPORTED_MEDIA</option>
            </field>

            <field type="container" label="WF_MEDIA_IFRAMES_SUPPORTED_MEDIA" class="well well-small p-3 bg-light" description="WF_MEDIA_IFRAMES_SUPPORTED_MEDIA_DESC" showon="iframes:3">

                <field name="iframes_supported_media" type="checkboxes" class="flex-row" default="youtube,vimeo,dailymotion,scribd,slideshare,soundcloud,spotify,ted,twitch,calendly" layout="form.field.checkboxes" hiddenLabel="true" labelclass="hide">
                    <option value="youtube">youtube</option>
                    <option value="vimeo">vimeo</option>
                    <option value="dailymotion">dailymotion</option>
                    <option value="scribd">scribd</option>
                    <option value="slideshare">slideshare</option>
                    <option value="soundcloud">soundcloud</option>
                    <option value="spotify">spotify</option>
                    <option value="ted">ted</option>
                    <option value="twitch">twitch</option>
                    <option value="calendly">calendly</option>
                </field>

                <field type="repeatable" name="iframes_supported_media_custom" default="" label="Custom URL" description="">
                    <field type="text" hiddenLabel="true" size="50" />
                </field>

            </field>

            <field name="iframes_sandbox" type="list" default="1" label="WF_MEDIA_IFRAMES_SANDBOX" description="WF_MEDIA_IFRAMES_SANDBOX_DESC" showon="iframes:1">
                <option value="1">JYES</option>
                <option value="0">JNO</option>
            </field>

            <field type="repeatable" name="iframes_sandbox_exclusions" default="" label="WF_MEDIA_IFRAMES_SANDBOX_EXCLUSIONS" description="WF_MEDIA_IFRAMES_SANDBOX_EXCLUSIONS_DESC" showon="iframes:1[AND]iframes_sandbox:1">
                <field type="text" hiddenLabel="true" size="100" />
            </field>

            <field name="audio" type="list" default="1" label="WF_MEDIA_PARAM_AUDIO" description="WF_MEDIA_PARAM_AUDIO_DESC">
                <option value="1">JYES</option>
                <option value="0">JNO</option>
                <option value="2">WF_MEDIA_PARAM_LOCAL_ONLY</option>
            </field>

            <field name="video" type="list" default="1" label="WF_MEDIA_PARAM_VIDEO" description="WF_MEDIA_PARAM_VIDEO_DESC">
                <option value="1">JYES</option>
                <option value="0">JNO</option>
                <option value="2">WF_MEDIA_PARAM_LOCAL_ONLY</option>
            </field>

            <field name="object" type="list" default="0" label="WF_MEDIA_PARAM_OBJECT" description="WF_MEDIA_PARAM_OBJECT_DESC">
                <option value="1">JYES</option>
                <option value="0">JNO</option>
                <option value="2">WF_MEDIA_PARAM_LOCAL_ONLY</option>
            </field>

            <field name="embed" type="list" default="0" label="WF_MEDIA_PARAM_EMBED" description="WF_MEDIA_PARAM_EMBED_DESC">
                <option value="1">JYES</option>
                <option value="0">JNO</option>
                <option value="2">WF_MEDIA_PARAM_LOCAL_ONLY</option>
            </field>

            <field name="live_embed" type="yesno" default="1" label="WF_MEDIA_PARAM_MEDIA_PREVIEW" description="WF_MEDIA_PARAM_MEDIA_PREVIEW_DESC">
                <option value="1">JYES</option>
                <option value="0">JNO</option>
            </field>

            <field name="strict_media_embeds" type="yesno" default="1" label="WF_MEDIA_STRICT_MEDIA_EMBEDS" description="WF_MEDIA_STRICT_MEDIA_EMBEDS_DESC">
                <option value="1">JYES</option>
                <option value="0">JNO</option>
            </field>
        </fieldset>
    </fields>
    <languages></languages>
</extension>
plugins/media/config.php000060400000007077152455721620011302 0ustar00<?php

/**
 * @package     JCE
 * @subpackage  Editor
 *
 * @copyright   Copyright (c) 2009-2024 Ryan Demmer. All rights reserved
 * @license     GNU General Public License version 2 or later; see LICENSE.txt
 */

\defined('_JEXEC') or die;

class WFMediaPluginConfig
{
    public static function getConfig(&$settings)
    {
        $wf = WFApplication::getInstance();

        $tags = array();

        $elements = array(
            'audio' => array('audio', 'source'),
            'video' => array('video', 'source'),
            'embed' => array('embed'),
            'object' => array('object', 'param'),
        );

        $allow_iframes = (int) $wf->getParam('media.iframes', 0);

        $iframes_supported_media_custom = array();

        if ($allow_iframes) {
            $tags[] = 'iframe';

            // may be overwritten by mediamanager config - ../mediamanager/config.php
            if ($allow_iframes == 2) {
                $settings['media_iframes_allow_local'] = true;
            }

            if ($allow_iframes == 3) {
                $settings['media_iframes_supported_media'] = array();

                $settings['media_iframes_allow_supported'] = true;

                $iframes_supported_media = $wf->getParam('media.iframes_supported_media', array('youtube', 'vimeo', 'dailymotion', 'scribd', 'slideshare', 'soundcloud', 'spotify', 'ted', 'twitch', 'bandcamp', 'calendly'));

                // get values only
                $iframes_supported_media = array_values($iframes_supported_media);

                $iframes_supported_media_custom = $wf->getParam('media.iframes_supported_media_custom', array());

                // get values only
                if (!empty($iframes_supported_media_custom)) {
                    $iframes_supported_media_custom = array_values($iframes_supported_media_custom);
                }

                $settings['media_iframes_supported_media'] = array_merge($iframes_supported_media, $iframes_supported_media_custom);
            }
        }

        foreach ($elements as $name => $items) {
            $default = 1;

            if ($name == 'object' || $name == 'embed') {
                $default = 0;
            }

            $allowed = (int) $wf->getParam('media.' . $name, $default);

            if ($allowed) {
                $tags = array_merge($tags, $items);

                if ($allowed == 2) {
                    $settings['media_' . $name . '_allow_local'] = true;
                }
            }
        }

        $tags = array_unique(array_values($tags));

        $settings['media_valid_elements'] = array_values($tags);
        $settings['media_live_embed'] = $wf->getParam('media.live_embed', 1);

        $sandbox = (bool) $wf->getParam('media.iframes_sandbox', 1);

        if ($sandbox == false) {
            $settings['media_iframes_sandbox'] = false;
        } else {
            $sandbox_exclusions = $wf->getParam('media.iframes_sandbox_exclusions', []);

            // add custom urls to sandbox exclusions
            if (!empty($iframes_supported_media_custom)) {
                $sandbox_exclusions = array_merge($sandbox_exclusions, $iframes_supported_media_custom);
            }

            if (!empty($sandbox_exclusions)) {
                $settings['media_iframes_sandbox_exclusions'] = $sandbox_exclusions;
            }
        }

        $settings['strict_media_embeds'] = (bool) $wf->getParam('media.strict_media_embeds', 1);

        // allow all elements
        $settings['invalid_elements'] = array_diff($settings['invalid_elements'], array('audio', 'video', 'source', 'embed', 'object', 'param', 'iframe'));
    }
}
plugins/clipboard/config.php000060400000004035152455721620012151 0ustar00<?php
/**
 * @package     JCE
 * @subpackage  Editor
 *
 * @copyright   Copyright (c) 2009-2024 Ryan Demmer. All rights reserved
 * @license     GNU General Public License version 2 or later; see LICENSE.txt
 */

\defined('_JEXEC') or die;

class WFClipboardPluginConfig
{
    public static function getConfig(&$settings)
    {
        $wf = WFApplication::getInstance();

        $mode = $wf->getParam('clipboard.paste_cleanup_mode', 0);

        $settings['paste_force_cleanup'] = true;
        $settings['paste_strip_class_attributes'] = 1;
        $settings['paste_remove_styles'] = true;
        $settings['paste_remove_spans'] = true;
        $settings['paste_remove_styles_if_webkit'] = true;
        $settings['paste_remove_empty_paragraphs'] = true;

        // any cleanup mode will keep the following
        if ($mode) {
            $settings['paste_force_cleanup'] = false; // set to detect so only Word classes are removed
            $settings['paste_strip_class_attributes'] = 2; // Only remove Word classes
        }

        // mode 2 = keep styles (only in Word content)
        if ($mode == 2) {
            $settings['paste_remove_styles'] = false;
            $settings['paste_remove_spans'] = false; // styles are usually applied to spans
        }

        $settings['clipboard_paste_text'] = $wf->getParam('clipboard.paste_text', 1, 1, 'boolean');
        $settings['clipboard_paste_html'] = $wf->getParam('clipboard.paste_html', 1, 1, 'boolean');

        // if paste HTML is disabled, then default to plain text paste
        if ($settings['clipboard_paste_html'] === false) {
            $settings['paste_plain_text'] = true;
            $settings['clipboard_paste_text'] = true;
        }
    }

    private static function cleanStringList($value)
    {
        $value = trim($value);
        $values = explode(',', $value);
        // remove whitespace
        $values = array_map('trim', $values);
        // remove duplicates and emtpy values
        $values = array_unique(array_filter($values));

        return implode(',', $values);
    }
}
plugins/clipboard/clipboard.xml000060400000004303152455721620012652 0ustar00<?xml version="1.0" ?>
<extension version="3.4" type="plugin" group="jce" method="upgrade">
    <name>WF_CLIPBOARD_TITLE</name>
    <version>2.9.99.2</version>
    <creationDate>22-04-2026</creationDate>
    <author>Ryan Demmer</author>
    <authorEmail>info@joomlacontenteditor.net</authorEmail>
    <authorUrl>https://www.joomlacontenteditor.net/</authorUrl>
    <copyright>Ryan Demmer</copyright>
    <license>GNU/GPL Version 2 or later - http://www.gnu.org/licenses/gpl-2.0.html</license>
    <description>WF_CLIPBOARD_DESC</description>
    <icon>cut,copy,paste,pastetext</icon>
    <fields name="clipboard">
        <fieldset name="config">
            <field name="paste_cleanup_mode" type="list" default="0" label="WF_PASTE_CLEANUP_MODE" description="WF_PASTE_CLEANUP_MODE_DESC">
                <option value="0">WF_PASTE_CLEANUP_MODE_CLEAN_HTML</option>
                <option value="1">WF_PASTE_CLEANUP_MODE_KEEP_CLASSES</option>
                <option value="2">WF_PASTE_CLEANUP_MODE_KEEP_STYLES</option>
            </field>

            <field name="paste_html" type="yesno" default="1" label="WF_PASTE_PARAM_PASTE_HTML" description="WF_PASTE_PARAM_PASTE_HTML_DESC">
                <option value="1">JYES</option>
                <option value="0">JNO</option>
            </field>

            <field name="paste_text" type="yesno" default="1" label="WF_PASTE_PARAM_PASTE_TEXT" description="WF_PASTE_PARAM_PASTE_TEXT_DESC">
                <option value="1">JYES</option>
                <option value="0">JNO</option>
            </field>

            <field type="heading" label="WF_PROFILES_PLUGINS_BUTTONS" />

            <field name="buttons" type="buttons" multiple="multiple" default="cut,copy,paste,pastetext" label="WF_PARAM_BUTTONS" description="WF_PARAM_BUTTONS_DESC">
                <option value="cut">WF_OPTION_CUT</option>
                <option value="copy">WF_OPTION_COPY</option>
                <option value="paste">WF_OPTION_PASTE</option>
                <option value="pastetext">WF_OPTION_PASTETEXT</option>
            </field>
        </fieldset>
    </fields>
    <help>
        <topic key="clipboard.about" title="WF_CLIPBOARD_HELP_ABOUT" />
    </help>
    <languages></languages>
</extension>plugins/clipboard/index.html000060400000000054152455721620012165 0ustar00<html><body bgcolor="#FFFFFF"></body></html>plugins/fontsizeselect/fontsizeselect.xml000060400000001663152455721620015064 0ustar00<?xml version="1.0" ?>
<extension version="3.4" type="plugin" group="jce" method="upgrade">
    <name>WF_FONTSIZESELECT_TITLE</name>
    <version>2.9.99.2</version>
    <creationDate>22-04-2026</creationDate>
    <author>Ryan Demmer</author>
    <authorEmail>info@joomlacontenteditor.net</authorEmail>
    <authorUrl>https://www.joomlacontenteditor.net/</authorUrl>
    <copyright>Ryan Demmer</copyright>
    <license>GNU/GPL Version 2 or later - http://www.gnu.org/licenses/gpl-2.0.html</license>
    <description>WF_FONTSIZESELECT_DESC</description>
    <icon>fontselect</icon>
    <fields name="fontsizeselect">
        <fieldset name="config">
            <field name="font_sizes" type="text" size="100" class="input-xlarge" default="" hint="eg: 8pt,10pt,12pt,14pt,18pt,24pt,36pt" label="WF_PARAM_FONT_SIZES" description="WF_PARAM_FONT_SIZES_DESC" />
        </fieldset>
    </fields>
    <help></help>
    <languages></languages>
</extension>plugins/fontsizeselect/index.html000060400000000054152455721620013267 0ustar00<html><body bgcolor="#FFFFFF"></body></html>plugins/fontsizeselect/config.php000060400000001051152455721620013246 0ustar00<?php
/**
 * @package     JCE
 * @subpackage  Editor
 *
 * @copyright   Copyright (c) 2009-2024 Ryan Demmer. All rights reserved
 * @license     GNU General Public License version 2 or later; see LICENSE.txt
 */

\defined('_JEXEC') or die;

class WFFontsizeselectPluginConfig
{
    public static function getConfig(&$settings)
    {
        $wf = WFApplication::getInstance();

        $settings['fontsizeselect_font_sizes'] = $wf->getParam('fontsizeselect.font_sizes', '8pt,10pt,12pt,14pt,18pt,24pt,36pt', '8pt,10pt,12pt,14pt,18pt,24pt,36pt');
    }
}
plugins/reference/reference.xml000060400000003023152455721620012646 0ustar00<?xml version="1.0" ?>
<extension version="3.4" type="plugin" group="jce" method="upgrade">
    <name>WF_REFERENCE_TITLE</name>
    <version>2.9.99.2</version>
    <creationDate>22-04-2026</creationDate>
    <author>Ryan Demmer</author>
    <authorEmail>info@joomlacontenteditor.net</authorEmail>
    <authorUrl>https://www.joomlacontenteditor.net/</authorUrl>
    <copyright>Ryan Demmer</copyright>
    <license>GNU/GPL Version 2 or later - http://www.gnu.org/licenses/gpl-2.0.html</license>
    <description>WF_REFERENCE_DESC</description>
    <icon>cite,q,abbr,acronym,del,ins</icon>
    <fields name="reference">
        <fieldset name="config">
            <field name="buttons" type="buttons" multiple="multiple" default="cite,q,abbr,acronym,del,ins" label="WF_PARAM_BUTTONS" description="WF_PARAM_BUTTONS_DESC">
                <option value="cite">WF_CITE_TITLE</option>
                <option value="q">WF_Q_TITLE</option>
                <option value="abbr">WF_ABBR_TITLE</option>
                <option value="acronym">WF_ACRONYM_TITLE</option>
                <option value="del">WF_DEL_TITLE</option>
                <option value="ins">WF_INS_TITLE</option>
            </field>

            <field name="datetime_format" type="text" size="100" default="" hint="%Y-%m-%dT%H:%M:%S" label="WF_REFERENCE_DATETIME_FORMAT" description="WF_REFERENCE_DATETIME_FORMAT_DESC" />
        </fieldset>
    </fields>
    <help>
        <topic key="reference.about" title="WF_REFERENCE_HELP_ABOUT" />
    </help>
    <languages></languages>
</extension>plugins/reference/index.html000060400000000054152455721620012164 0ustar00<html><body bgcolor="#FFFFFF"></body></html>plugins/reference/config.php000060400000000727152455721620012154 0ustar00<?php
/**
 * @package     JCE
 * @subpackage  Editor
 *
 * @copyright   Copyright (c) 2009-2024 Ryan Demmer. All rights reserved
 * @license     GNU General Public License version 2 or later; see LICENSE.txt
 */

\defined('_JEXEC') or die;

class WFReferencePluginConfig
{
    public static function getConfig(&$settings)
    {
        $wf = WFApplication::getInstance();

        $settings['reference_datetime'] = $wf->getParam('reference.datetime_format', '');
    }
}
plugins/anchor/index.html000060400000000054152455721620011500 0ustar00<html><body bgcolor="#FFFFFF"></body></html>plugins/anchor/anchor.xml000060400000001160152455721620011476 0ustar00<?xml version="1.0" ?>
<extension version="3.4" type="plugin" group="jce" method="upgrade">
	<name>WF_ANCHOR_TITLE</name>
	<version>2.9.99.2</version>
	<creationDate>22-04-2026</creationDate>
	<author>Ryan Demmer</author>
	<authorEmail>info@joomlacontenteditor.net</authorEmail>
	<authorUrl>https://www.joomlacontenteditor.net/</authorUrl>
	<copyright>Ryan Demmer</copyright>
	<license>GNU/GPL Version 2 or later - http://www.gnu.org/licenses/gpl-2.0.html</license>
	<description>WF_ANCHOR_DESC</description>
	<icon>anchor</icon>
	<layout>anchor</layout>
	<files></files>
	<languages></languages>
	<help></help>
</extension>plugins/charmap/charmap.xml000060400000001734152455721620012007 0ustar00<?xml version="1.0" ?>
<extension version="3.4" type="plugin" group="jce" method="upgrade">
	<name>WF_CHARMAP_TITLE</name>
	<version>2.9.99.2</version>
	<creationDate>22-04-2026</creationDate>
	<author>Moxiecode / Ryan Demmer</author>
	<authorEmail>info@joomlacontenteditor.net</authorEmail>
	<authorUrl>https://www.joomlacontenteditor.net/</authorUrl>
	<copyright>Ryan Demmer</copyright>
	<license>GNU/GPL Version 2 or later - http://www.gnu.org/licenses/gpl-2.0.html</license>
	<description>WF_CHARMAP_DESC</description>
	<icon>charmap</icon>
	<files></files>
	<fields name="charmap">
		<fieldset name="config">

			<field name="charmap_append" type="keyvalue" default="" label="WF_CHARMAP_APPEND" description="WF_CHARMAP_APPEND_DESC">
				<field type="text" name="name" label="WF_CHARMAP_APPEND_CODE" data-decode="true" />
				<field type="text" name="value" label="WF_CHARMAP_APPEND_TEXT" />
			</field>

		</fieldset>
	</fields>
	<languages></languages>
	<help></help>
</extension>
 plugins/charmap/config.php000060400000001645152455721620011631 0ustar00<?php
/**
 * @package     JCE
 * @subpackage  Editor
 *
 * @copyright   Copyright (c) 2009-2024 Ryan Demmer. All rights reserved
 * @license     GNU General Public License version 2 or later; see LICENSE.txt
 */

\defined('_JEXEC') or die;

class WFCharmapPluginConfig
{
    public static function getConfig(&$settings)
    {
        $wf = WFApplication::getInstance();

        $append = $wf->getParam('charmap.charmap_append', array());

        if (!empty($append)) {
            $values = array();

            foreach ($append as $item) {
                $item = (object) $item;

                // invalid values
                if (empty($item->name) || empty($item->value)) {
                    continue;
                }

                $item->name = html_entity_decode($item->name);
                $values[$item->name] = $item->value;
            }

            $settings['charmap_append'] = $values;
        }
    }
}
plugins/charmap/index.html000060400000000054152455721620011641 0ustar00<html><body bgcolor="#FFFFFF"></body></html>plugins/fontselect/fontselect.xml000060400000001514152455721620013271 0ustar00<?xml version="1.0" ?>
<extension version="3.4" type="plugin" group="jce" method="upgrade">
    <name>WF_FONTSELECT_TITLE</name>
    <version>2.9.99.2</version>
    <creationDate>22-04-2026</creationDate>
    <author>Ryan Demmer</author>
    <authorEmail>info@joomlacontenteditor.net</authorEmail>
    <authorUrl>https://www.joomlacontenteditor.net/</authorUrl>
    <copyright>Ryan Demmer</copyright>
    <license>GNU/GPL Version 2 or later - http://www.gnu.org/licenses/gpl-2.0.html</license>
    <description>WF_FONTSELECT_DESC</description>
    <icon>fontselect</icon>
    <fields name="fontselect">
        <fieldset name="config">
            <field name="fonts" type="fonts" default="" label="WF_PARAM_FONTS" description="WF_PARAM_FONTS_DESC" />
        </fieldset>
    </fields>
    <help></help>
    <languages></languages>
</extension>plugins/fontselect/index.html000060400000000054152455721620012374 0ustar00<html><body bgcolor="#FFFFFF"></body></html>plugins/fontselect/config.php000060400000006422152455721620012362 0ustar00<?php
/**
 * @package     JCE
 * @subpackage  Editor
 *
 * @copyright   Copyright (c) 2009-2024 Ryan Demmer. All rights reserved
 * @license     GNU General Public License version 2 or later; see LICENSE.txt
 */

\defined('_JEXEC') or die;

class WFFontselectPluginConfig
{
    protected static $fonts = array('Andale Mono=andale mono,times', 'Arial=arial,helvetica,sans-serif', 'Arial Black=arial black,avant garde', 'Book Antiqua=book antiqua,palatino', 'Comic Sans MS=comic sans ms,sans-serif', 'Courier New=courier new,courier', 'Georgia=georgia,palatino', 'Helvetica=helvetica', 'Impact=impact,chicago', 'Symbol=symbol', 'Tahoma=tahoma,arial,helvetica,sans-serif', 'Terminal=terminal,monaco', 'Times New Roman=times new roman,times', 'Trebuchet MS=trebuchet ms,geneva', 'Verdana=verdana,geneva', 'Webdings=webdings', 'Wingdings=wingdings,zapf dingbats');

    public static function getConfig(&$settings)
    {
        $wf = WFApplication::getInstance();

        $settings['fontselect_fonts'] = self::getFonts();
    }

    /**
     * Get a list of editor font families.
     *
     * @return string font family list
     *
     * @param string $add    Font family to add
     * @param string $remove Font family to remove
     */
    protected static function getFonts()
    {
        $wf = WFApplication::getInstance();

        $fonts = $wf->getParam('fontselect.fonts');

        // decode string
        if (is_string($fonts)) {
            $fonts = htmlspecialchars_decode($fonts);
        }

        // map for new format, where fonts are saved as an array of an associative array, eg: [['Andale Mono' => 'andale mono,times', 'Arial' => 'arial,helvetica,sans-serif']]
        if (is_array($fonts)) {
            $values = $fonts;

            // reset array
            $fonts = array();

            // map associative array to array of key value pairs
            foreach ($values as $key => $value) {
                if (is_numeric($key) && is_array($value)) {
                    $fonts = array_merge($fonts, $value);
                } else {
                    $fonts = array_merge($fonts, array($key => $value));
                }
            }
        }

        // get fonts using legacy parameters
        if (empty($fonts)) {
            $fonts = self::$fonts;

            $add = $wf->getParam('editor.theme_advanced_fonts_add');
            $remove = $wf->getParam('editor.theme_advanced_fonts_remove');

            if (empty($remove) && empty($add)) {
                return '';
            }

            $remove = preg_split('/[;,]+/', $remove);

            if (count($remove)) {
                foreach ($fonts as $key => $value) {
                    foreach ($remove as $gone) {
                        if ($gone && preg_match('/^' . $gone . '=/i', $value)) {
                            // Remove family
                            unset($fonts[$key]);
                        }
                    }
                }
            }

            foreach (explode(';', $add) as $new) {
                // Add new font family
                if (preg_match('/([^\=]+)(\=)([^\=]+)/', trim($new)) && !in_array($new, $fonts)) {
                    $fonts[] = $new;
                }
            }

            natcasesort($fonts);
            $fonts = implode(';', $fonts);
        }

        return $fonts;
    }
}
plugins/core/index.html000060400000000054152455721620011156 0ustar00<html><body bgcolor="#FFFFFF"></body></html>plugins/core/config.php000060400000002663152455721620011147 0ustar00<?php
/**
 * @package     JCE
 * @subpackage  Editor
 *
 * @copyright   Copyright (c) 2009-2024 Ryan Demmer. All rights reserved
 * @license     GNU General Public License version 2 or later; see LICENSE.txt
 */

\defined('_JEXEC') or die;

class WFCorePluginConfig
{
    private static function extractContent($content)
    {
        $content = htmlspecialchars_decode($content);

        // Remove body etc.
        if (preg_match('/<body[^>]*>([\s\S]+?)<\/body>/', $content, $matches)) {
            $content = trim($matches[1]);
        }

        return $content;
    }

    public static function getConfig(&$settings)
    {
        $wf = WFApplication::getInstance();

        $startup_content_url = $wf->getParam('editor.startup_content_url', '');
        $startup_content_html = $wf->getParam('editor.startup_content_html', '');

        if ($startup_content_url) {
            if (preg_match("#\.(htm|html|txt|md)$#", $startup_content_url) && strpos('://', $startup_content_url) === false) {
                $startup_content_url = trim($startup_content_url, '/');

                $file = JPATH_SITE . '/' . $startup_content_url;

                if (is_file($file)) {
                    $startup_content_html = @file_get_contents($file);
                }
            }
        }

        if ($startup_content_html) {
            $settings['startup_content_html'] = htmlspecialchars(self::extractContent($startup_content_html));
        }
    }
}
plugins/tabfocus/index.html000060400000000054152455721620012034 0ustar00<html><body bgcolor="#FFFFFF"></body></html>plugins/tabfocus/config.php000060400000000576152455721620012026 0ustar00<?php
/**
 * @package     JCE
 * @subpackage  Editor
 *
 * @copyright   Copyright (c) 2009-2024 Ryan Demmer. All rights reserved
 * @license     GNU General Public License version 2 or later; see LICENSE.txt
 */

\defined('_JEXEC') or die;

class WFPluginTabfocusConfig
{
    public static function getConfig(&$vars)
    {
        $vars['tabfocus_elements'] = ':prev,:next';
    }
}plugins/autosave/index.html000060400000000054152455721620012055 0ustar00<html><body bgcolor="#FFFFFF"></body></html>plugins/autosave/config.php000060400000002615152455721620012043 0ustar00<?php
/**
 * @package     JCE
 * @subpackage  Editor
 *
 * @copyright   Copyright (c) 2009-2024 Ryan Demmer. All rights reserved
 * @license     GNU General Public License version 2 or later; see LICENSE.txt
 */

\defined('_JEXEC') or die;

class WFAutosavePluginConfig
{
    public static function getConfig(&$settings)
    {
        $wf = WFApplication::getInstance();    
    
        $ask_before_unload = $wf->getParam('autosave.ask_before_unload');
        $retention = $wf->getParam('autosave.retention');
        $interval = $wf->getParam('autosave.interval');

        // add "m" to the retention value if it is not empty
        if ($retention) {
            $retention = (int) $retention;

            if ($retention > 0) {
                $retention .= 'm';
            } else {
                $retention = '';
            }
        }

        // add "s" to the interval value if it is not empty
        if ($interval) {
            $interval = (int) $interval;
            if ($interval > 0) {
                $interval .= 's';
            } else {
                $interval = '';
            }   
        }

        if ($ask_before_unload) {
            $settings['autosave_ask_before_unload'] = true;
        }

        if ($retention) {
            $settings['autosave_retention'] = $retention;
        }

        if ($interval) {
            $settings['autosave_interval'] = $interval;
        }
    }
}
plugins/autosave/autosave.xml000060400000002252152455721620012433 0ustar00<?xml version="1.0" ?>
<extension version="3.4" type="plugin" group="jce" method="upgrade">
	<name>WF_AUTOSAVE_TITLE</name>
	<version>2.9.99.2</version>
	<creationDate>22-04-2026</creationDate>
	<author>Moxiecode / Ryan Demmer</author>
	<authorEmail>info@joomlacontenteditor.net</authorEmail>
	<authorUrl>https://www.joomlacontenteditor.net/</authorUrl>
	<copyright>Ryan Demmer</copyright>
	<license>GNU/GPL Version 2 or later - http://www.gnu.org/licenses/gpl-2.0.html</license>
	<description>WF_AUTOSAVE_DESC</description>
	<icon>autosave</icon>
	<files></files>
	<languages></languages>

	<fields name="autosave">
        <fieldset name="config">
            <field name="ask_before_unload" type="yesno" default="0" label="WF_AUTOSAVE_ASK_BEFORE_UNLOAD" description="WF_AUTOSAVE_ASK_BEFORE_UNLOAD_DESC">
				<option value="0">JNO</option>
				<option value="1">JYES</option>
			</field>
			<field name="retention" type="text" default="20" label="WF_AUTOSAVE_RETENTION" description="WF_AUTOSAVE_RETENTION_DESC" />
			<field name="interval" type="text" default="30" label="WF_AUTOSAVE_INTERVAL" description="WF_AUTOSAVE_INTERVAL_DESC" />
		</fieldset>
	</fields>

	<help></help>
</extension>
 plugins/fullscreen/fullscreen.xml000060400000001230152455721620013254 0ustar00<?xml version="1.0" ?>
<extension version="3.4" type="plugin" group="jce" method="upgrade">
	<name>WF_FULLSCREEN_TITLE</name>
	<version>2.9.99.2</version>
	<creationDate>22-04-2026</creationDate>
	<author>Ryan Demmer</author>
	<authorEmail>info@joomlacontenteditor.net</authorEmail>
	<authorUrl>https://www.joomlacontenteditor.net/</authorUrl>
	<copyright>Ryan Demmer</copyright>
	<license>GNU/GPL Version 2 or later - http://www.gnu.org/licenses/gpl-2.0.html</license>
	<description>WF_FULLSCREEN_DESC</description>
	<icon>fullscreen</icon>
	<help>
		<topic key="fullscreen.about" title="WF_FULLSCREEN_HELP_ABOUT" />
	</help>
	<languages></languages>
</extension>plugins/fullscreen/index.html000060400000000054152455721620012370 0ustar00<html><body bgcolor="#FFFFFF"></body></html>plugins/contextmenu/index.html000060400000000054152455721620012577 0ustar00<html><body bgcolor="#FFFFFF"></body></html>plugins/contextmenu/contextmenu.xml000060400000001146152455721620013700 0ustar00<?xml version="1.0" encoding="UTF-8"?>
<extension version="3.4" type="plugin" group="jce" method="upgrade">
  <name>WF_CONTEXTMENU_TITLE</name>
  <version>2.9.99.2</version>
  <creationDate>22-04-2026</creationDate>
  <author>Ryan Demmer</author>
  <authorEmail>info@joomlacontenteditor.net</authorEmail>
  <authorUrl>https://www.joomlacontenteditor.net/</authorUrl>
  <copyright>Ryan Demmer</copyright>
  <license>GNU/GPL Version 2 or later - http://www.gnu.org/licenses/gpl-2.0.html</license>
  <description>WF_CONTEXTMENU_DESC</description>
  <icon></icon>
  <help></help>
  <languages></languages>
</extension>plugins/print/print.xml000060400000001177152455721620011252 0ustar00<?xml version="1.0" ?>
<extension version="3.4" type="plugin" group="jce" method="upgrade">
	<name>WF_PRINT_TITLE</name>
	<version>2.9.99.2</version>
	<creationDate>22-04-2026</creationDate>
	<author>Ryan Demmer</author>
	<authorEmail>info@joomlacontenteditor.net</authorEmail>
	<authorUrl>https://www.joomlacontenteditor.net/</authorUrl>
	<copyright>Ryan Demmer</copyright>
	<license>GNU/GPL Version 2 or later - http://www.gnu.org/licenses/gpl-2.0.html</license>
	<description>WF_PRINT_DESC</description>
	<icon>print</icon>
	<help>
		<topic key="print.about" title="WF_PRINT_HELP_ABOUT" />
	</help>
	<languages></languages>
</extension>plugins/print/index.html000060400000000054152455721620011362 0ustar00<html><body bgcolor="#FFFFFF"></body></html>plugins/joomla/index.html000060400000000054152455721620011507 0ustar00<html><body bgcolor="#FFFFFF"></body></html>plugins/joomla/config.php000060400000003423152455721620011473 0ustar00<?php
/**
 * @package     JCE
 * @subpackage  Editor
 *
 * @copyright   Copyright (c) 2009-2024 Ryan Demmer. All rights reserved
 * @license     GNU General Public License version 2 or later; see LICENSE.txt
 */

\defined('_JEXEC') or die;

use Joomla\CMS\Editor\Editor;
use Joomla\CMS\Factory;
use Joomla\CMS\Uri\Uri;

class WFJoomlaPluginConfig
{
    public static function getConfig(&$settings)
    {
        if (empty($settings['joomla_xtd_buttons'])) {
            $settings['joomla_xtd_buttons'] = array();
        }
        
        $list = array();

        $editor = Editor::getInstance('jce');

        $excluded = array('readmore', 'pagebreak', 'image');

        $i = 0;

        $buttons = $editor->getButtons('__jce__');

        foreach ($buttons as $button) {
            // skip buttons better implemented by editor
            if (in_array($button->name, $excluded)) {
                continue;
            }

            // create icon class
            $icon = 'none icon-' . $button->get('icon', $button->get('name'));

            // set href value
            if ($button->get('link') !== '#') {
                $href = Uri::base() . $button->get('link');
            } else {
                $href = '';
            }

            $id = $button->get('name');

            $options = array(
                'name' => $button->get('text'),
                'id' => $id,
                'title' => $button->get('text'),
                'icon' => $icon,
                'href' => $href,
                'onclick' => $button->get('onclick', ''),
                'svg' => $button->get('iconSVG'),
                'options' => $button->get('options', array()),
            );

            $list[] = $options;
        }
        
        $settings['joomla_xtd_buttons']['__jce__'] = $list;
    }
}plugins/emotions/emotions.xml000060400000002533152455721620012451 0ustar00<?xml version="1.0" ?>
<extension version="3.4" type="plugin" group="jce" method="upgrade">
	<name>WF_EMOTIONS_TITLE</name>
	<version>2.9.99.2</version>
	<creationDate>22-04-2026</creationDate>
	<author>Moxiecode / Ryan Demmer</author>
	<authorEmail>info@joomlacontenteditor.net</authorEmail>
	<authorUrl>https://www.joomlacontenteditor.net/</authorUrl>
	<copyright>Copyright (C) 2006 - 2026 Ryan Demmer. All rights reserved</copyright>
	<license>GNU/GPL Version 2 or later - http://www.gnu.org/licenses/gpl-2.0.html</license>
	<description>WF_EMOTIONS_DESC</description>
	<icon>emotions</icon>
	<files>
		<file>plugin.js</file>
		<file>emotions.php</file>
		<folder>classes</folder>
		<folder>css</folder>
		<folder>img</folder>
		<folder>js</folder>
		<folder>tmpl</folder>
	</files>
	<fields name="emotions">
		<fieldset name="config">
			<field name="url" type="text" placeholder="components/com_jce/editor/tiny_mce/plugins/emotions/img" default="" size="100" label="WF_EMOTIONS_PARAM_URL" description="WF_EMOTIONS_PARAM_URL_DESC" />
			<field name="smilies" type="text" placeholder="eg: smiley-confused.gif,smiley-cool.gif" default="" size="100" label="WF_EMOTIONS_PARAM_SMILIES" description="WF_EMOTIONS_PARAM_SMILIES_DESC" />
		</fieldset>
	</fields>
	<languages>
		<language tag="en-GB">en-GB.WF_emotions.ini</language>
	</languages>
	<help></help>
</extension>
 plugins/emotions/config.php000060400000001012152455721620012037 0ustar00<?php
/**
 * @package     JCE
 * @subpackage  Editor
 *
 * @copyright   Copyright (c) 2009-2024 Ryan Demmer. All rights reserved
 * @license     GNU General Public License version 2 or later; see LICENSE.txt
 */

\defined('_JEXEC') or die;

class WFEmotionsPluginConfig
{
    public static function getConfig(&$settings)
    {
        $wf = WFApplication::getInstance();

        $settings['emotions_smilies'] = $wf->getParam('emotions.smilies');
        $settings['emotions_url'] = $wf->getParam('emotions.url');
    }
}
plugins/emotions/index.html000060400000000054152455721620012063 0ustar00<html><body bgcolor="#FFFFFF"></body></html>plugins/help/tmpl/index.html000060400000000054152455721620012132 0ustar00<html><body bgcolor="#FFFFFF"></body></html>plugins/help/tmpl/default.php000060400000001417152455721620012276 0ustar00<?php
/**
 * @package     JCE
 * @subpackage  Editor
 *
 * @copyright   Copyright (c) 2009-2024 Ryan Demmer. All rights reserved
 * @license     GNU General Public License version 2 or later; see LICENSE.txt
 */

\defined('_JEXEC') or die;

?>
<div class="ui-jce uk-flex">
    <nav class="uk-panel uk-panel-box uk-height-1-1">
        <?php echo $this->plugin->renderTopics(); ?>
    </nav>
    <main class="uk-panel uk-panel-box uk-height-1-1">
        <header>
            <a class="uk-button uk-button-link" data-toggle="collapse">
                <span class="uk-icon uk-icon-list"></span>
            </a>
        </header>
        <section>
            <iframe id="help-iframe" src="javascript:;" scrolling="auto" frameborder="0"></iframe>
        </section>
    </main>
</div>plugins/help/index.html000060400000000054152455721620011156 0ustar00<html><body bgcolor="#FFFFFF"></body></html>plugins/help/help.xml000060400000001076152455721620010640 0ustar00<?xml version="1.0" ?>
<extension version="3.4" type="plugin" group="jce" method="upgrade">
	<name>WF_HELP_TITLE</name>
	<version>2.9.99.2</version>
	<creationDate>22-04-2026</creationDate>
	<author>Ryan Demmer</author>
	<authorEmail>info@joomlacontenteditor.net</authorEmail>
	<authorUrl>https://www.joomlacontenteditor.net/</authorUrl>
	<copyright>Ryan Demmer</copyright>
	<license>GNU/GPL Version 2 or later - http://www.gnu.org/licenses/gpl-2.0.html</license>
	<description>WF_HELP_DESC</description>
	<icon>hr</icon>
	<help></help>
	<languages></languages>
</extension>plugins/help/help.php000060400000017660152455721620010635 0ustar00<?php
/**
 * @package     JCE
 * @subpackage  Editor
 *
 * @copyright   Copyright (c) 2009-2024 Ryan Demmer. All rights reserved
 * @license     GNU General Public License version 2 or later; see LICENSE.txt
 */

\defined('_JEXEC') or die;

use Joomla\CMS\Component\ComponentHelper;
use Joomla\CMS\Factory;
use Joomla\Filesystem\File;
use Joomla\Filesystem\Path;
use Joomla\CMS\Language\Text;
use Joomla\CMS\Plugin\PluginHelper;

class WFHelpPlugin extends WFEditorPlugin
{
    protected $name = 'help';

    public function __construct($config = array())
    {
        parent::__construct($config);
    }

    /**
     * Display the plugin.
     */
    public function display()
    {
        parent::display();

        $app = Factory::getApplication();

        $section = $app->input->getWord('section');
        $category = $app->input->getWord('category');
        $article = $app->input->getWord('article');
        $language = $app->input->getWord('lang');

        $params = ComponentHelper::getParams('com_jce');

        $url = $params->get('help_url', 'https://www.joomlacontenteditor.net');
        $method = $params->get('help_method', 'reference');
        $pattern = $params->get('help_pattern', '/$1/$2/$3');

        // trim url of trailing slash
        $url = trim($url, '/');

        switch ($method) {
            default:
            case 'reference':
                $url .= '/index.php?option=com_content&view=article&tmpl=component&print=1&mode=inline&task=findkey&lang=' . $language . '&keyref=';
                break;
            case 'xml':
                break;
            case 'sef':
                break;
        }

        $key = array();

        if ($section) {
            $key[] = $section;
            if ($category) {
                $key[] = $category;
                if ($article) {
                    $key[] = $article;
                }
            }
        }

        $options = array(
            'url' => $url,
            'key' => $key,
            'pattern' => $method === "sef" ? $pattern : '',
        );

        $tabs = WFTabs::getInstance(array(
            'base_path' => WF_EDITOR_PLUGIN,
        ));

        // Add tabs
        $tabs->addTab('help', 1, array('plugin' => $this));

        $document = WFDocument::getInstance();

        if ($document->get('standalone') == 1) {
            $document->addScript(array('window.min'));
        }

        $document->addScript(array('help.min'), 'plugins');
        $document->addStyleSheet(array('help.min'), 'plugins');

        $document->addScriptDeclaration('jQuery(document).ready(function($){Wf.Help.init(' . json_encode($options) . ');});');
    }

    public function getLanguage()
    {
        $language = Factory::getLanguage();
        $tag = $language->getTag();

        return substr($tag, 0, strpos($tag, '-'));
    }

    public function getTopics($file)
    {
        $result = '';

        if (is_file($file)) {
            // load xml
            $xml = simplexml_load_file($file);

            if ($xml) {
                foreach ($xml->help->children() as $topic) {
                    $subtopics = $topic->subtopic;
                    $class = count($subtopics) ? 'subtopics uk-parent' : '';

                    $key = (string) $topic->attributes()->key;
                    $title = (string) $topic->attributes()->title;
                    $file = (string) $topic->attributes()->file;

                    // if file attribute load file
                    if ($file) {
                        $result .= $this->getTopics(WF_EDITOR . '/' . $file);
                    } else {
                        $result .= '<li id="' . $key . '" class="' . $class . '"><a href="#"><span class="uk-icon uk-icon-copy uk-margin-small-right"></span>&nbsp;' . trim(Text::_($title)) . '</a>';
                    }

                    if (count($subtopics)) {
                        $result .= '<ul class="uk-nav uk-nav-side uk-list-space hidden">';
                        foreach ($subtopics as $subtopic) {
                            $sub_subtopics = $subtopic->subtopic;

                            // if a file is set load it as sub-subtopics
                            if ($file = (string) $subtopic->attributes()->file) {
                                $result .= '<li class="subtopics uk-parent"><a href="#"><span class="uk-icon uk-icon-file uk-margin-small-right"></span>&nbsp;' . trim(Text::_((string) $subtopic->attributes()->title)) . '</a>';
                                $result .= '<ul class="uk-nav uk-nav-side uk-list-space hidden">';
                                $result .= $this->getTopics(WF_EDITOR . '/' . $file);
                                $result .= '</ul>';
                                $result .= '</li>';
                            } else {
                                $id = $subtopic->attributes()->key ? ' id="' . (string) $subtopic->attributes()->key . '"' : '';

                                $class = count($sub_subtopics) ? ' class="subtopics uk-parent"' : '';
                                $icon = count($sub_subtopics) ? 'uk-icon-copy' : 'uk-icon-file';
                                $result .= '<li' . $class . $id . '><a href="#"><span class="uk-icon ' . $icon . ' uk-margin-small-right"></span>&nbsp;' . trim(Text::_((string) $subtopic->attributes()->title)) . '</a>';

                                if (count($sub_subtopics)) {
                                    $result .= '<ul class="uk-nav uk-nav-side hidden">';
                                    foreach ($sub_subtopics as $sub_subtopic) {
                                        $result .= '<li id="' . (string) $sub_subtopic->attributes()->key . '"><a href="#"><span class="uk-icon uk-icon-file uk-margin-small-right"></span>&nbsp;' . trim(Text::_((string) $sub_subtopic->attributes()->title)) . '</a></li>';
                                    }
                                    $result .= '</ul>';
                                }

                                $result .= '</li>';
                            }
                        }
                        $result .= '</ul>';
                    }
                }
            }
        }

        return $result;
    }

    /**
     * Returns a formatted list of help topics.
     *
     * @return string
     *
     * @since 1.5
     */
    public function renderTopics()
    {
        $app = Factory::getApplication();

        $section = $app->input->getWord('section', 'admin');
        $category = $app->input->getWord('category', 'cpanel');

        $document = Factory::getDocument();
        $language = Factory::getLanguage();

        $language->load('com_jce', JPATH_SITE);
        $language->load('com_jce_pro', JPATH_SITE);

        $document->setTitle(Text::_('WF_HELP') . ' : ' . Text::_('WF_' . strtoupper($category) . '_TITLE'));

        switch ($section) {
            case 'admin':
                $file = WF_ADMINISTRATOR . '/models/' . $category . '.xml';
                break;
            case 'editor':
                $file = Path::find([
                    WF_EDITOR_PLUGINS . '/' . $category,
                    JPATH_PLUGINS . '/system/jcepro/editor/plugins/' . $category,
                    JPATH_PLUGINS . '/jce/editor-' . $category,
                    JPATH_PLUGINS . '/jce/editor_' . $category
                ], $category . '.xml');

                if (!$file) {
                    $file = WF_EDITOR_LIBRARIES . '/xml/help/editor.xml';
                } else {
                    $path = dirname($file);

                    // installed plugin
                    if (preg_match('/\/editor[_-]/', $path)) {
                        $language->load('plg_jce_editor_' . $category,$path);
                    }                    
                }

                break;
        }

        $result = '';

        $result .= '<ul class="uk-nav" id="help-menu"><li class="uk-nav-header">' . Text::_('WF_' . strtoupper($category) . '_TITLE') . '</li>';
        $result .= $this->getTopics($file);
        $result .= '</ul>';

        return $result;
    }
}
plugins/style/tmpl/background.php000060400000005753152455721620013210 0ustar00<?php
/**
 * @package     JCE
 * @subpackage  Editor
 *
 * @copyright   Copyright (c) 2009-2024 Ryan Demmer. All rights reserved
 * @license     GNU General Public License version 2 or later; see LICENSE.txt
 */

\defined('_JEXEC') or die;

use Joomla\CMS\Language\Text;
?>
      <div class="uk-form-row uk-grid uk-grid-small">
        <label for="background_color" class="uk-form-label uk-width-2-10"><?php echo Text::_('WF_STYLES_BACKGROUND_COLOR'); ?></label>
            <div class="uk-form-controls uk-width-2-10">
              <input id="background_color" class="color" type="text" value="" />
            </div>
      </div>
      <div class="uk-form-row uk-grid uk-grid-small">
        <label for="background_image" class="uk-form-label uk-width-2-10"><?php echo Text::_('WF_STYLES_BACKGROUND_IMAGE'); ?></label>
          <div class="uk-form-controls uk-width-8-10">
            <input id="background_image" class="browser image" type="text" />
          </div>
      </div>

      <div class="uk-form-row uk-grid uk-grid-small">
        <label for="background_repeat" class="uk-form-label uk-width-2-10"><?php echo Text::_('WF_STYLES_BACKGROUND_REPEAT'); ?></label>
        <div class="uk-form-controls uk-width-4-10">
          <input type="text" id="background_repeat" class="uk-datalist" list="background_repeat_datalist" /><datalist id="background_repeat_datalist"></datalist>
        </div>
      </div>

      <div class="uk-form-row uk-grid uk-grid-small">
        <label for="background_attachment" class="uk-form-label uk-width-2-10"><?php echo Text::_('WF_STYLES_BACKGROUND_ATTACHMENT'); ?></label>
        <div class="uk-form-controls uk-width-4-10">
          <input type="text" id="background_attachment" class="uk-datalist" list="background_attachment_datalist" /><datalist id="background_attachment_datalist"></datalist>
        </div>
      </div>

      <div class="uk-form-row uk-grid uk-grid-small">
        <label for="background_hpos" class="uk-form-label uk-width-2-10"><?php echo Text::_('WF_STYLES_BACKGROUND_HPOS'); ?></label>

          <div class="uk-form-controls uk-width-4-10 uk-margin-right">
              <input type="text" id="background_hpos" class="uk-datalist" list="background_hpos_datalist" /><datalist id="background_hpos_datalist"></datalist>
          </div>
          <div class="uk-form-controls uk-width-2-10">
              <select id="background_hpos_measurement"></select>
          </div>
      </div>

      <div class="uk-form-row uk-grid uk-grid-small">
        <label for="background_vpos" class="uk-form-label uk-width-2-10"><?php echo Text::_('WF_STYLES_BACKGROUND_VPOS'); ?></label>

          <div class="uk-form-controls uk-width-4-10 uk-margin-right">
              <input type="text" id="background_vpos" class="uk-datalist" list="background_vpos_datalist" /><datalist id="background_vpos_datalist"></datalist>
            </div>
          <div class="uk-form-controls uk-width-2-10">
              <select id="background_vpos_measurement"></select>
          </div>
      </div>
plugins/style/tmpl/positioning.php000060400000016416152455721620013431 0ustar00<?php
/**
 * @package     JCE
 * @subpackage  Editor
 *
 * @copyright   Copyright (c) 2009-2024 Ryan Demmer. All rights reserved
 * @license     GNU General Public License version 2 or later; see LICENSE.txt
 */

\defined('_JEXEC') or die;

use Joomla\CMS\Language\Text;
?>

<div class="uk-form-row uk-grid uk-grid-small">
  <label for="positioning_type" class="uk-form-label uk-width-2-10"><?php echo Text::_('WF_STYLES_POSITIONING_TYPE'); ?></label>
  <div class="uk-form-controls uk-width-3-10">
    <input type="text" id="positioning_type" class="uk-datalist" list="positioning_type_datalist" /><datalist id="positioning_type_datalist"></datalist>
  </div>
  <label for="positioning_visibility" class="uk-form-label uk-width-2-10"><?php echo Text::_('WF_STYLES_VISIBILITY'); ?></label>
  <div class="uk-form-controls uk-width-3-10">
    <input type="text" id="positioning_visibility" class="uk-datalist" list="positioning_visibility_datalist" /><datalist id="positioning_visibility_datalist"></datalist>
  </div>
</div>

<div class="uk-form-row uk-grid uk-grid-small">
  <label for="positioning_width" class="uk-form-label uk-width-2-10"><?php echo Text::_('WF_STYLES_WIDTH'); ?></label>
  <div class="uk-form-controls uk-width-2-10">
    <input type="number" id="positioning_width" onchange="StyleDialog.synch('positioning_width','box_width');" />
  </div>
  <div class="uk-form-controls uk-width-2-10">
    <select id="positioning_width_measurement"></select>
  </div>
  <label for="positioning_zindex" class="uk-form-label uk-width-2-10"><?php echo Text::_('WF_STYLES_ZINDEX'); ?></label>
  <div class="uk-form-controls uk-width-2-10">
    <input type="number" id="positioning_zindex" />
  </div>
</div>

<div class="uk-form-row uk-grid uk-grid-small">
  <label for="positioning_height" class="uk-form-label uk-width-2-10"><?php echo Text::_('WF_STYLES_HEIGHT'); ?></label>
  <div class="uk-form-controls uk-width-2-10">
    <input type="number" id="positioning_height" onchange="StyleDialog.synch('positioning_height','box_height');" />
  </div>
  <div class="uk-form-controls uk-width-2-10">
    <select id="positioning_height_measurement"></select>
  </div>
  <label for="positioning_overflow" class="uk-form-label uk-width-2-10"><?php echo Text::_('WF_STYLES_OVERFLOW'); ?></label>
  <div class="uk-form-controls uk-width-2-10">
    <input type="text" id="positioning_overflow" class="uk-datalist" list="positioning_overflow_datalist" /><datalist id="positioning_overflow_datalist"></datalist>
  </div>
</div>

<div class="uk-form-row uk-grid uk-grid-small">
  <div class="uk-width-5-10">
    <fieldset>
      <legend><?php echo Text::_('WF_STYLES_PLACEMENT'); ?></legend>


      <div class="uk-form-row">
        <input type="checkbox" id="positioning_placement_same" checked="checked" onclick="StyleDialog.toggleSame(this,'positioning_placement');" />
        <label for="positioning_placement_same"><?php echo Text::_('WF_STYLES_SAME'); ?></label>
      </div>
      <div class="uk-form-row uk-grid uk-grid-small">
        <label for="positioning_placement_left" class="uk-form-label uk-width-2-10"><?php echo Text::_('WF_STYLES_TOP'); ?></label>


        <div class="uk-form-controls uk-width-4-10">
          <input type="number" id="positioning_placement_top" />
        </div>
        <div class="uk-form-controls uk-width-4-10">
          <select id="positioning_placement_top_measurement"></select>
        </div>


      </div>
      <div class="uk-form-row uk-grid uk-grid-small">
        <label for="positioning_placement_left" class="uk-form-label uk-width-2-10"><?php echo Text::_('WF_STYLES_RIGHT'); ?></label>


        <div class="uk-form-controls uk-width-4-10">
          <input type="number" id="positioning_placement_right" disabled="disabled" />
        </div>
        <div class="uk-form-controls uk-width-4-10">
          <select id="positioning_placement_right_measurement" disabled="disabled"></select>
        </div>


      </div>
      <div class="uk-form-row uk-grid uk-grid-small">
        <label for="positioning_placement_left" class="uk-form-label uk-width-2-10"><?php echo Text::_('WF_STYLES_BOTTOM'); ?></label>


        <div class="uk-form-controls uk-width-4-10">
          <input type="number" id="positioning_placement_bottom" disabled="disabled" />
        </div>
        <div class="uk-form-controls uk-width-4-10">
          <select id="positioning_placement_bottom_measurement" disabled="disabled"></select>
        </div>


      </div>
      <div class="uk-form-row uk-grid uk-grid-small">
        <label for="positioning_placement_left" class="uk-form-label uk-width-2-10"><?php echo Text::_('WF_STYLES_LEFT'); ?></label>


        <div class="uk-form-controls uk-width-4-10">
          <input type="number" id="positioning_placement_left" disabled="disabled" />
        </div>
        <div class="uk-form-controls uk-width-4-10">
          <select id="positioning_placement_left_measurement" disabled="disabled"></select>
        </div>


      </div>

    </fieldset>
  </div>

  <div class="uk-width-5-10">
    <fieldset>
      <legend><?php echo Text::_('WF_STYLES_CLIP'); ?></legend>


      <div class="uk-form-row">
        <input type="checkbox" id="positioning_clip_same" checked="checked" onclick="StyleDialog.toggleSame(this,'positioning_clip');" />
        <label for="positioning_clip_same"><?php echo Text::_('WF_STYLES_SAME'); ?></label>
      </div>
      <div class="uk-form-row uk-grid uk-grid-small">
        <label for="positioning_clip_top" class="uk-form-label uk-width-2-10"><?php echo Text::_('WF_STYLES_TOP'); ?></label>


        <div class="uk-form-controls uk-width-4-10">
          <input type="number" id="positioning_clip_top" />
        </div>
        <div class="uk-form-controls uk-width-4-10">
          <select id="positioning_clip_top_measurement"></select>
        </div>


      </div>
      <div class="uk-form-row uk-grid uk-grid-small">
        <label for="positioning_clip_right" class="uk-form-label uk-width-2-10"><?php echo Text::_('WF_STYLES_RIGHT'); ?></label>


        <div class="uk-form-controls uk-width-4-10">
          <input type="number" id="positioning_clip_right" disabled="disabled" />
        </div>
        <div class="uk-form-controls uk-width-4-10">
          <select id="positioning_clip_right_measurement" disabled="disabled"></select>
        </div>


      </div>
      <div class="uk-form-row uk-grid uk-grid-small">
        <label for="positioning_clip_bottom" class="uk-form-label uk-width-2-10"><?php echo Text::_('WF_STYLES_BOTTOM'); ?></label>


        <div class="uk-form-controls uk-width-4-10">
          <input type="number" id="positioning_clip_bottom" disabled="disabled" />
        </div>
        <div class="uk-form-controls uk-width-4-10">
          <select id="positioning_clip_bottom_measurement" disabled="disabled"></select>
        </div>


      </div>
      <div class="uk-form-row uk-grid uk-grid-small">
        <label for="positioning_clip_left" class="uk-form-label uk-width-2-10"><?php echo Text::_('WF_STYLES_LEFT'); ?></label>

        <div class="uk-form-controls uk-width-4-10">
          <input type="number" id="positioning_clip_left" disabled="disabled" />
        </div>
        <div class="uk-form-controls uk-width-4-10">
          <select id="positioning_clip_left_measurement" disabled="disabled"></select>
        </div>


      </div>

    </fieldset>
  </div>
</div>plugins/style/tmpl/box.php000060400000015412152455721620011652 0ustar00<?php
/**
 * @package     JCE
 * @subpackage  Editor
 *
 * @copyright   Copyright (c) 2009-2024 Ryan Demmer. All rights reserved
 * @license     GNU General Public License version 2 or later; see LICENSE.txt
 */

\defined('_JEXEC') or die;

use Joomla\CMS\Language\Text;
?>

    <div class="uk-form-row uk-grid uk-grid-small">
      <label for="box_width" class="uk-form-label uk-width-2-10"><?php echo Text::_('WF_STYLES_BOX_WIDTH'); ?></label>

            <div class="uk-form-controls uk-width-2-10">
              <input type="number" id="box_width" onchange="StyleDialog.synch('box_width','positioning_width');" />
            </div>
            <div class="uk-form-controls uk-width-2-10">
              <select id="box_width_measurement"></select>
            </div>

      <label for="box_float" class="uk-form-label uk-width-2-10"><?php echo Text::_('WF_STYLES_BOX_FLOAT'); ?></label>
      <div class="uk-form-controls uk-width-2-10">
        <input type="text" id="box_float" class="uk-datalist" list="box_float_datalist" /><datalist id="box_float_datalist"></datalist>
      </div>
    </div>

    <div class="uk-form-row uk-grid uk-grid-small">
      <label for="box_height" class="uk-form-label uk-width-2-10"><?php echo Text::_('WF_STYLES_BOX_HEIGHT'); ?></label>

        <div class="uk-form-controls uk-width-2-10">
          <input type="number" id="box_height" onchange="StyleDialog.synch('box_height','positioning_height');" />
        </div>
        <div class="uk-form-controls uk-width-2-10">
          <select id="box_height_measurement"></select>
        </div>

      <label for="box_clear" class="uk-form-label uk-width-2-10"><?php echo Text::_('WF_STYLES_BOX_CLEAR'); ?></label>
      <div class="uk-form-controls uk-width-2-10">
        <input type="text" id="box_clear" class="uk-datalist" list="box_clear_datalist" /><datalist id="box_clear_datalist"></datalist>
      </div>
    </div>

    <div class="uk-form-row uk-grid uk-grid-small">
  <div class="uk-width-5-10">
    <fieldset>
      <legend><?php echo Text::_('WF_STYLES_PADDING'); ?></legend>
        <div class="uk-form-row">
          <input type="checkbox" id="box_padding_same" checked="checked" onclick="StyleDialog.toggleSame(this,'box_padding');" />
          <label for="box_padding_same"><?php echo Text::_('WF_STYLES_SAME'); ?></label>
        </div>
        <div class="uk-form-row uk-grid uk-grid-small">
          <label for="box_padding_top" class="uk-form-label uk-width-2-10"><?php echo Text::_('WF_STYLES_TOP'); ?></label>
              <div class="uk-form-controls uk-width-4-10">
                <input type="number" id="box_padding_top" />
              </div>
              <div class="uk-form-controls uk-width-4-10">
                <select id="box_padding_top_measurement"></select>
              </div>
        </div>
        <div class="uk-form-row uk-grid uk-grid-small">
          <label for="box_padding_right" class="uk-form-label uk-width-2-10"><?php echo Text::_('WF_STYLES_RIGHT'); ?></label>
              <div class="uk-form-controls uk-width-4-10">
                <input type="number" id="box_padding_right" disabled="disabled" />
              </div>
              <div class="uk-form-controls uk-width-4-10">
                <select id="box_padding_right_measurement" disabled="disabled"></select>
              </div>
        </div>
        <div class="uk-form-row uk-grid uk-grid-small">
          <label for="box_padding_bottom" class="uk-form-label uk-width-2-10"><?php echo Text::_('WF_STYLES_BOTTOM'); ?></label>
              <div class="uk-form-controls uk-width-4-10">
                <input type="number" id="box_padding_bottom" disabled="disabled" />
              </div>
              <div class="uk-form-controls uk-width-4-10">
                <select id="box_padding_bottom_measurement" disabled="disabled"></select>
              </div>
        </div>
        <div class="uk-form-row uk-grid uk-grid-small">
          <label for="box_padding_left" class="uk-form-label uk-width-2-10"><?php echo Text::_('WF_STYLES_LEFT'); ?></label>
              <div class="uk-form-controls uk-width-4-10">
                <input type="number" id="box_padding_left" disabled="disabled" />
              </div>
              <div class="uk-form-controls uk-width-4-10">
                <select id="box_padding_left_measurement" disabled="disabled"></select>
              </div>
        </div>

    </fieldset>
   </div>
   <div class="uk-width-5-10">
    <fieldset>
      <legend><?php echo Text::_('WF_STYLES_MARGIN'); ?></legend>
        <div class="uk-form-row">
          <input type="checkbox" id="box_margin_same" checked="checked" onclick="StyleDialog.toggleSame(this,'box_margin');" />
          <label for="box_margin_same"><?php echo Text::_('WF_STYLES_SAME'); ?></label>
        </div>
        <div class="uk-form-row uk-grid uk-grid-small">
          <label for="box_margin_top" class="uk-form-label uk-width-2-10"><?php echo Text::_('WF_STYLES_TOP'); ?></label>
              <div class="uk-form-controls uk-width-4-10">
                <input type="number" id="box_margin_top" />
              </div>
              <div class="uk-form-controls uk-width-4-10">
                <select id="box_margin_top_measurement" ></select>
              </div>
        </div>
        <div class="uk-form-row uk-grid uk-grid-small">
          <label for="box_margin_right" class="uk-form-label uk-width-2-10"><?php echo Text::_('WF_STYLES_RIGHT'); ?></label>
              <div class="uk-form-controls uk-width-4-10">
                <input type="number" id="box_margin_right" disabled="disabled" />
              </div>
              <div class="uk-form-controls uk-width-4-10">
                <select id="box_margin_right_measurement" disabled="disabled"></select>
              </div>
        </div>
        <div class="uk-form-row uk-grid uk-grid-small">
          <label for="box_margin_bottom" class="uk-form-label uk-width-2-10"><?php echo Text::_('WF_STYLES_BOTTOM'); ?></label>
              <div class="uk-form-controls uk-width-4-10">
                <input type="number" id="box_margin_bottom" disabled="disabled" />
                </div>
              <div class="uk-form-controls uk-width-4-10">
                <select id="box_margin_bottom_measurement" disabled="disabled"></select>
              </div>
        </div>
        <div class="uk-form-row uk-grid uk-grid-small">
          <label for="box_margin_left" class="uk-form-label uk-width-2-10"><?php echo Text::_('WF_STYLES_LEFT'); ?></label>
              <div class="uk-form-controls uk-width-4-10">
                <input type="number" id="box_margin_left" disabled="disabled" />
              </div>
              <div class="uk-form-controls uk-width-4-10">
                <select id="box_margin_left_measurement" disabled="disabled"></select>
              </div>
        </div>
    </fieldset>
  </div>
</div>
plugins/style/tmpl/list.php000060400000002233152455721620012032 0ustar00<?php
/**
 * @package     JCE
 * @subpackage  Editor
 *
 * @copyright   Copyright (c) 2009-2024 Ryan Demmer. All rights reserved
 * @license     GNU General Public License version 2 or later; see LICENSE.txt
 */

\defined('_JEXEC') or die;

use Joomla\CMS\Language\Text;
?>

<div class="uk-form-row uk-grid uk-grid-small">
  <label class="uk-form-label uk-width-2-10" for="list_type"><?php echo Text::_('WF_STYLES_LIST_TYPE'); ?></label>
  <div class="uk-form-controls uk-width-4-10">
    <select id="list_type" name="list_type"></select>
  </div>
</div>
<div class="uk-form-row uk-grid uk-grid-small">
  <label class="uk-form-label uk-width-2-10" for="list_position"><?php echo Text::_('WF_STYLES_POSITION'); ?></label>
  <div class="uk-form-controls uk-width-4-10">
    <select id="list_position" name="list_position"></select>
  </div>
</div>
<div class="uk-form-row uk-grid uk-grid-small">
  <label class="uk-form-label uk-width-2-10" for="list_bullet_image"><?php echo Text::_('WF_STYLES_BULLET_IMAGE'); ?></label>
  <div class="uk-form-controls uk-width-8-10">
    <input id="list_bullet_image" name="list_bullet_image" type="text" class="browser image" />
  </div>
</div>
plugins/style/tmpl/border.php000060400000013136152455721620012340 0ustar00<?php
/**
 * @package     JCE
 * @subpackage  Editor
 *
 * @copyright   Copyright (c) 2009-2024 Ryan Demmer. All rights reserved
 * @license     GNU General Public License version 2 or later; see LICENSE.txt
 */

\defined('_JEXEC') or die;

use Joomla\CMS\Language\Text;
?>
<div class="uk-grid">
  <div class="uk-width-3-10">
    <fieldset>
      <legend><?php echo Text::_('WF_STYLES_STYLE'); ?></legend>
      <div class="uk-form-row">
        <input type="checkbox" id="border_style_same" checked="checked" onclick="StyleDialog.toggleSame(this,'border_style');" />
        <label for="border_style_same"><?php echo Text::_('WF_STYLES_SAME'); ?></label>
      </div>
    <div class="uk-form-row uk-grid uk-grid-small">
      <label for="border_style_top" class="uk-form-label uk-width-3-10"><?php echo Text::_('WF_STYLES_TOP'); ?></label>
      <div class="uk-form-controls uk-width-7-10">
        <input type="text" id="border_style_top" class="uk-datalist" list="border_style_top_datalist" /><datalist id="border_style_top_datalist"></datalist>
      </div>
    </div>

    <div class="uk-form-row uk-grid uk-grid-small">
      <label for="border_style_right" class="uk-form-label uk-width-3-10"><?php echo Text::_('WF_STYLES_RIGHT'); ?></label>
      <div class="uk-form-controls uk-width-7-10">
        <input type="text" id="border_style_right" class="uk-datalist" list="border_style_right_datalist" /><datalist id="border_style_right_datalist"></datalist>
      </div>
    </div>

    <div class="uk-form-row uk-grid uk-grid-small">
      <label for="border_style_bottom" class="uk-form-label uk-width-3-10"><?php echo Text::_('WF_STYLES_BOTTOM'); ?></label>
      <div class="uk-form-controls uk-width-7-10">
        <input type="text" id="border_style_bottom" class="uk-datalist" list="border_style_bottom_datalist" /><datalist id="border_style_bottom_datalist"></datalist>
      </div>
    </div>

    <div class="uk-form-row uk-grid uk-grid-small">
      <label for="border_style_left" class="uk-form-label uk-width-3-10"><?php echo Text::_('WF_STYLES_LEFT'); ?></label>
      <div class="uk-form-controls uk-width-7-10">
        <input type="text" id="border_style_left" class="uk-datalist" list="border_style_left_datalist" /><datalist id="border_style_left_datalist"></datalist>
      </div>
    </div>
  </fieldset>
  </div>
  <div class="uk-width-4-10">
    <fieldset>
      <legend><?php echo Text::_('WF_STYLES_WIDTH'); ?></legend>
      <div class="uk-form-row">
        <input type="checkbox" id="border_width_same" checked="checked" onclick="StyleDialog.toggleSame(this,'border_width');" />
        <label for="border_width_same"><?php echo Text::_('WF_STYLES_SAME'); ?></label>
      </div>

      <div class="uk-form-row uk-grid uk-grid-small">
        <div class="uk-form-controls uk-width-5-10">
          <input type="text" id="border_width_top" class="uk-datalist" list="border_width_top_datalist" /><datalist id="border_width_top_datalist"></datalist>
        </div>
        <div class="uk-form-controls uk-width-5-10">
          <select id="border_width_top_measurement" ></select>
        </div>
      </div>

      <div class="uk-form-row uk-grid uk-grid-small">
        <div class="uk-form-controls uk-width-5-10">
          <input type="text" id="border_width_right" class="uk-datalist" list="border_width_right_datalist" /><datalist id="border_width_right_datalist"></datalist>
        </div>
        <div class="uk-form-controls uk-width-5-10">
          <select id="border_width_right_measurement" ></select>
        </div>
      </div>

      <div class="uk-form-row uk-grid uk-grid-small">
        <div class="uk-form-controls uk-width-5-10">
          <input type="text" id="border_width_bottom" class="uk-datalist" list="border_width_bottom_datalist" /><datalist id="border_width_bottom_datalist"></datalist>
        </div>
        <div class="uk-form-controls uk-width-5-10">
          <select id="border_width_bottom_measurement" ></select>
        </div>
      </div>

      <div class="uk-form-row uk-grid uk-grid-small">
        <div class="uk-form-controls uk-width-5-10">
          <input type="text" id="border_width_left" class="uk-datalist" list="border_width_left_datalist" /><datalist id="border_width_left_datalist"></datalist>
        </div>
        <div class="uk-form-controls uk-width-5-10">
          <select id="border_width_left_measurement" ></select>
        </div>
      </div>
    </fieldset>
  </div>
  <div class="uk-width-3-10">
    <fieldset>
      <legend><?php echo Text::_('WF_STYLES_COLOR'); ?></legend>
      <div class="uk-form-row">
        <input type="checkbox" id="border_color_same" checked="checked" onclick="StyleDialog.toggleSame(this,'border_color');" />
        <label for="border_color_same"><?php echo Text::_('WF_STYLES_SAME'); ?></label>
      </div>

      <div class="uk-form-row uk-grid uk-grid-small">
        <div class="uk-form-controls uk-width-2-3">
          <input id="border_color_top" class="color" type="text" value="" />
        </div>
      </div>

      <div class="uk-form-row uk-grid uk-grid-small">
        <div class="uk-form-controls uk-width-2-3">
          <input id="border_color_right" class="color" type="text" value="" />
        </div>
      </div>

      <div class="uk-form-row uk-grid uk-grid-small">
        <div class="uk-form-controls uk-width-2-3">
          <input id="border_color_bottom" class="color" type="text" value="" />
        </div>
      </div>

      <div class="uk-form-row uk-grid uk-grid-small">
        <div class="uk-form-controls uk-width-2-3">
          <input id="border_color_left" class="color" type="text" value="" />
        </div>
      </div>
    </fieldset>
  </div>
</div>
plugins/style/tmpl/block.php000060400000007160152455721620012155 0ustar00<?php
/**
 * @package     JCE
 * @subpackage  Editor
 *
 * @copyright   Copyright (c) 2009-2024 Ryan Demmer. All rights reserved
 * @license     GNU General Public License version 2 or later; see LICENSE.txt
 */

\defined('_JEXEC') or die;

use Joomla\CMS\Language\Text;
?>
      <div class="uk-form-row uk-grid uk-grid-small">
        <label for="block_wordspacing" class="uk-form-label uk-width-2-10"><?php echo Text::_('WF_STYLES_BLOCK_WORDSPACING'); ?></label>
            <div class="uk-form-controls uk-width-5-10">
              <input type="text" id="block_wordspacing" class="uk-datalist" list="block_wordspacing_datalist" /><datalist id="block_wordspacing_datalist"></datalist>
            </div>
            <div class="uk-form-controls uk-width-3-10">
              <select id="block_wordspacing_measurement" ></select>
            </div>
      </div>

      <div class="uk-form-row uk-grid uk-grid-small">
        <label for="block_letterspacing" class="uk-form-label uk-width-2-10"><?php echo Text::_('WF_STYLES_BLOCK_LETTERSPACING'); ?></label>
            <div class="uk-form-controls uk-width-5-10">
              <input type="text" id="block_letterspacing" class="uk-datalist" list="block_letterspacing_datalist" /><datalist id="block_letterspacing_datalist"></datalist>
            </div>
            <div class="uk-form-controls uk-width-3-10">
              <select id="block_letterspacing_measurement"></select>
            </div>
      </div>

      <div class="uk-form-row uk-grid uk-grid-small">
        <label for="block_vertical_alignment" class="uk-form-label uk-width-2-10"><?php echo Text::_('WF_STYLES_BLOCK_VERTICAL_ALIGNMENT'); ?></label>
        <div class="uk-form-controls uk-width-5-10">
          <input type="text" id="block_vertical_alignment" class="uk-datalist" list="block_vertical_alignment_datalist" /><datalist id="block_vertical_alignment_datalist"></datalist>
        </div>
      </div>

      <div class="uk-form-row uk-grid uk-grid-small">
        <label for="block_text_align" class="uk-form-label uk-width-2-10"><?php echo Text::_('WF_STYLES_BLOCK_TEXT_ALIGN'); ?></label>
        <div class="uk-form-controls uk-width-5-10">
          <input type="text" id="block_text_align" class="uk-datalist" list="block_text_align_datalist" /><datalist id="block_text_align_datalist"></datalist>
        </div>
      </div>

      <div class="uk-form-row uk-grid uk-grid-small">
        <label for="block_text_indent" class="uk-form-label uk-width-2-10"><?php echo Text::_('WF_STYLES_BLOCK_TEXT_INDENT'); ?></label>
            <div class="uk-form-controls uk-width-2-10">
              <input type="number" id="block_text_indent" />
            </div>
            <div class="uk-form-controls uk-width-2-10">
              <select id="block_text_indent_measurement"></select>
            </div>
      </div>

      <div class="uk-form-row uk-grid uk-grid-small">
        <label for="block_whitespace" class="uk-form-label uk-width-2-10"><?php echo Text::_('WF_STYLES_BLOCK_WHITESPACE'); ?></label>
        <div class="uk-form-controls uk-width-5-10">
          <input type="text" id="block_whitespace" class="uk-datalist" list="block_whitespace_datalist" /><datalist id="block_whitespace_datalist"></datalist>
        </div>
      </div>

      <div class="uk-form-row uk-grid uk-grid-small">
        <label for="block_display" class="uk-form-label uk-width-2-10"><?php echo Text::_('WF_STYLES_BLOCK_DISPLAY'); ?></label>
        <div class="uk-form-controls uk-width-5-10">
          <input type="text" id="block_display" class="uk-datalist" list="block_display_datalist" /><datalist id="block_display_datalist"></datalist>
        </div>
      </div>
plugins/style/tmpl/index.html000060400000000054152455721620012342 0ustar00<html><body bgcolor="#FFFFFF"></body></html>plugins/style/tmpl/default.php000060400000001776152455721620012516 0ustar00<?php
/**
 * @package     JCE
 * @subpackage  Editor
 *
 * @copyright   Copyright (c) 2009-2024 Ryan Demmer. All rights reserved
 * @license     GNU General Public License version 2 or later; see LICENSE.txt
 */

\defined('_JEXEC') or die;

use Joomla\CMS\Language\Text;

$tabs = WFTabs::getInstance();
?>
<form>
    <?php $tabs->render();?>
    <div class="mceActionPanel">
        <div class="uk-form-row uk-float-left">
            <label for="toggle_insert_span" class="uk-form-label"><input type="checkbox" id="toggle_insert_span" onclick="StyleDialog.toggleApplyAction();" /> <?php echo Text::_('WF_STYLES_TOGGLE_INSERT_SPAN'); ?></label>
        </div>
        <button type="button" id="cancel"><?php echo Text::_('WF_LABEL_CANCEL'); ?></button>
        <button type="button" id="apply"><?php echo Text::_('WF_STYLES_APPLY'); ?></button>
        <button type="submit" id="insert"><?php echo Text::_('WF_LABEL_UPDATE'); ?></button>
    </div>
</form>
<div style="display:none;">
    <div id="container"></div>
</div>plugins/style/tmpl/text.php000060400000010647152455721620012053 0ustar00<?php
/**
 * @package     JCE
 * @subpackage  Editor
 *
 * @copyright   Copyright (c) 2009-2024 Ryan Demmer. All rights reserved
 * @license     GNU General Public License version 2 or later; see LICENSE.txt
 */

\defined('_JEXEC') or die;

use Joomla\CMS\Language\Text;
?>
<div class="uk-form-row uk-grid uk-grid-small">
  <label for="text_font" class="uk-form-label uk-width-2-10"><?php echo Text::_('WF_STYLES_TEXT_FONT'); ?></label>
    <div class="uk-form-controls uk-width-8-10"><input type="text" id="text_font" class="uk-datalist" list="text_font_datalist" /><datalist id="text_font_datalist"></datalist></div>
</div>
<div class="uk-form-row uk-grid uk-grid-small">
    <label for="text_size" class="uk-form-label uk-width-2-10"><?php echo Text::_('WF_STYLES_TEXT_SIZE'); ?></label>

      <div class="uk-form-controls uk-width-2-10">
        <input type="text" id="text_size" class="uk-datalist" list="text_size_datalist" /><datalist id="text_size_datalist"></datalist>
      </div>
      <div class="uk-form-controls uk-width-2-10">
        <select id="text_size_measurement"></select>
      </div>

    <div class="uk-width-4-10">
      <label for="text_weight" class="uk-form-label uk-width-3-10"><?php echo Text::_('WF_STYLES_TEXT_WEIGHT'); ?></label>
           <div class="uk-form-controls uk-width-7-10"><select id="text_weight"></select></div>
  </div>
</div>
      <div class="uk-form-row uk-grid uk-grid-small">
        <label class="uk-form-label uk-width-2-10" for="text_style"><?php echo Text::_('WF_STYLES_TEXT_STYLE'); ?></label>
            <div class="uk-form-controls uk-width-4-10">
              <input type="text" id="text_style" class="uk-datalist" list="text_style_datalist" /><datalist id="text_style_datalist"></datalist>
            </div>
          <div class="uk-width-4-10">
            <label class="uk-form-label uk-width-3-10" for="text_variant"><?php echo Text::_('WF_STYLES_TEXT_VARIANT'); ?></label>
              <div class="uk-form-controls uk-width-7-10">
                <select id="text_variant"></select>
              </div>
          </div>
      </div>
      <div class="uk-form-row uk-grid uk-grid-small">
        <label class="uk-form-label uk-width-2-10" for="text_lineheight"><?php echo Text::_('WF_STYLES_TEXT_LINEHEIGHT'); ?></label>
            <div class="uk-form-row uk-width-2-10">
                <input type="text" id="text_lineheight" class="uk-datalist" list="text_lineheight_datalist" /><datalist id="text_lineheight_datalist"></datalist>
            </div>
            <div class="uk-form-controls uk-width-2-10">
              <select id="text_lineheight_measurement" ></select>
            </div>
            <div class="uk-width-4-10">
              <label class="uk-form-label uk-width-3-10" for="text_case"><?php echo Text::_('WF_STYLES_TEXT_CASE'); ?></label>
              <div class="uk-form-controls uk-width-7-10">
                <select id="text_case" ></select>
              </div>
            </div>
      </div>
      <div class="uk-form-row uk-grid uk-grid-small">
        <label class="uk-form-label uk-width-2-10" for="text_color"><?php echo Text::_('WF_STYLES_TEXT_COLOR'); ?></label>
            <div class="uk-form-controls uk-width-2-10">
              <input id="text_color" class="color" type="text" value="" />
            </div>
      </div>
      <div class="uk-form-row uk-grid uk-grid-small">
          <label class="uk-form-label uk-width-2-10"><?php echo Text::_('WF_STYLES_TEXT_DECORATION'); ?></label>
          <div class="uk-form-controls uk-width-8-10">
              <input id="text_underline" type="checkbox" />
              <label for="text_underline" class="uk-margin-right"><?php echo Text::_('WF_STYLES_TEXT_UNDERLINE'); ?></label>

              <input id="text_overline" type="checkbox" />
              <label for="text_overline" class="uk-margin-right"><?php echo Text::_('WF_STYLES_TEXT_OVERLINE'); ?></label>

              <input id="text_linethrough" type="checkbox" />
              <label for="text_linethrough" class="uk-margin-right"><?php echo Text::_('WF_STYLES_TEXT_STRIKETROUGH'); ?></label>

              <input id="text_blink" type="checkbox" />
              <label for="text_blink" class="uk-margin-right"><?php echo Text::_('WF_STYLES_TEXT_BLINK'); ?></label>

              <input id="text_none" type="checkbox" onclick="StyleDialog.updateTextDecorations();" />
              <label for="text_none"><?php echo Text::_('WF_STYLES_TEXT_NONE'); ?></label>
          </div>
      </div>
plugins/style/index.html000060400000000054152455721620011366 0ustar00<html><body bgcolor="#FFFFFF"></body></html>plugins/style/style.php000060400000002713152455721620011246 0ustar00<?php
/**
 * @package     JCE
 * @subpackage  Editor
 *
 * @copyright   Copyright (c) 2009-2024 Ryan Demmer. All rights reserved
 * @license     GNU General Public License version 2 or later; see LICENSE.txt
 */

\defined('_JEXEC') or die;

class WFStylePlugin extends WFEditorPlugin
{
    public function __construct()
    {
        parent::__construct(array('colorpicker' => true));
    }

    /**
     * Display the plugin.
     */
    public function display()
    {
        parent::display();

        $document = WFDocument::getInstance();

        $document->addScript(array('style'), 'plugins');
        $document->addStyleSheet(array('style'), 'plugins');

        $settings = $this->getSettings();

        $document->addScriptDeclaration('StyleDialog.settings=' . json_encode($settings) . ';');

        $tabs = WFTabs::getInstance(array(
            'base_path' => WF_EDITOR_PLUGIN,
        ));

        // Add tabs
        $tabs->addTab('text');
        $tabs->addTab('background');
        $tabs->addTab('block');
        $tabs->addTab('box');
        $tabs->addTab('border');
        $tabs->addTab('list');
        $tabs->addTab('positioning');
    }

    public function getSettings($settings = array())
    {
        $profile = $this->getProfile();

        $settings = array(
            'file_browser' => $this->getParam('file_browser', 1) && in_array('browser', explode(',', $profile->plugins)),
        );

        return parent::getSettings($settings);
    }
}
plugins/style/style.xml000060400000001177152455721620011262 0ustar00<?xml version="1.0" ?>
<extension version="3.4" type="plugin" group="jce" method="upgrade">
	<name>WF_STYLE_TITLE</name>
	<version>2.9.99.2</version>
	<creationDate>22-04-2026</creationDate>
	<author>Ryan Demmer</author>
	<authorEmail>info@joomlacontenteditor.net</authorEmail>
	<authorUrl>https://www.joomlacontenteditor.net/</authorUrl>
	<copyright>Ryan Demmer</copyright>
	<license>GNU/GPL Version 2 or later - http://www.gnu.org/licenses/gpl-2.0.html</license>
	<description>WF_STYLE_DESC</description>
	<icon>style</icon>
	<help>
		<topic key="style.about" title="WF_STYLE_HELP_ABOUT" />
	</help>
	<languages></languages>
</extension>plugins/article/article.xml000060400000002260152455721620012022 0ustar00<?xml version="1.0" ?>
<extension version="3.4" type="plugin" group="jce" method="upgrade">
    <name>WF_ARTICLE_TITLE</name>
    <version>2.9.99.2</version>
    <creationDate>22-04-2026</creationDate>
    <author>Ryan Demmer</author>
    <authorEmail>info@joomlacontenteditor.net</authorEmail>
    <authorUrl>https://www.joomlacontenteditor.net/</authorUrl>
    <copyright>Ryan Demmer</copyright>
    <license>GNU/GPL Version 2 or later - http://www.gnu.org/licenses/gpl-2.0.html</license>
    <description>WF_ARTICLE_DESC</description>
    <icon>readmore,pagebreak</icon>

    <fields name="article">
        <fieldset name="config">

            <field type="heading" label="WF_PROFILES_PLUGINS_BUTTONS" />

            <field name="buttons" type="buttons" multiple="multiple" default="readmore,pagebreak" label="WF_PARAM_BUTTONS" description="WF_PARAM_BUTTONS_DESC">
                <option value="readmore">WF_ARTICLE_READMORE</option>
                <option value="pagebreak">WF_ARTICLE_PAGEBREAK</option>
            </field>
        </fieldset>
    </fields>

    <help>
        <topic key="article.about" title="WF_ARTICLE_HELP_ABOUT" />
    </help>
    <languages></languages>
</extension>plugins/article/config.php000060400000001224152455721620011632 0ustar00<?php
/**
 * @package     JCE
 * @subpackage  Editor
 *
 * @copyright   Copyright (c) 2009-2024 Ryan Demmer. All rights reserved
 * @license     GNU General Public License version 2 or later; see LICENSE.txt
 */

\defined('_JEXEC') or die;

class WFArticlePluginConfig
{
    public static function getConfig(&$settings)
    {
        $wf = WFApplication::getInstance();

        //$settings['article_hide_xtd_btns']     = $wf->getParam('article.hide_xtd_btns', 0, 0);
        $settings['article_show_readmore'] = $wf->getParam('article.show_readmore', 1, 1);
        $settings['article_show_pagebreak'] = $wf->getParam('article.show_pagebreak', 1, 1);
    }
}
plugins/article/index.html000060400000000054152455721620011651 0ustar00<html><body bgcolor="#FFFFFF"></body></html>plugins/langcode/index.html000060400000000054152455721620012002 0ustar00<html><body bgcolor="#FFFFFF"></body></html>plugins/langcode/langcode.xml000060400000001170152455721620012303 0ustar00<?xml version="1.0" ?>
<extension version="3.4" type="plugin" group="jce" method="upgrade">
	<name>WF_LANGCODE_TITLE</name>
	<version>2.9.99.2</version>
	<creationDate>22-04-2026</creationDate>
	<author>Ryan Demmer</author>
	<authorEmail>info@joomlacontenteditor.net</authorEmail>
	<authorUrl>https://www.joomlacontenteditor.net/</authorUrl>
	<copyright>Ryan Demmer</copyright>
	<license>GNU/GPL Version 2 or later - http://www.gnu.org/licenses/gpl-2.0.html</license>
	<description>WF_LANGCODE_DESC</description>
	<icon>langcode</icon>
	<layout>langcode</layout>
	<files></files>
	<languages></languages>
	<help></help>
</extension>plugins/noneditable/noneditable.xml000060400000002056152455721620013527 0ustar00<?xml version="1.0" ?>
<extension version="3.6" type="plugin" group="jce" method="upgrade">
	<name>JCE - Noneditable</name>
	<version>1.0.0</version>
	<creationDate>July 2019</creationDate>
	<author>Ryan Demmer</author>
	<authorEmail>info@joomlacontenteditor.net</authorEmail>
	<authorUrl>https://www.joomlacontenteditor.net/</authorUrl>
	<copyright>Copyright (C) 2006 - 2020 Ryan Demmer. All rights reserved</copyright>
	<license>GNU/GPL Version 2 - http://www.gnu.org/licenses/gpl-2.0.html</license>
	<description>Noneditable elements for JCE</description>
	<icon></icon>
	<files></files>
	<!--fields name="noneditable">
		<fieldset name="config">
			<field name="noneditable_class" type="text" default="" hint="mceNonEditable" label="WF_NONEDITABLE_NONEDITABLE_CLASS" description="WF_NONEDITABLE_NONEDITABLE_CLASS_DESC" />
			<field name="editable_class" type="text" default="" hint="mceEditable" label="WF_NONEDITABLE_EDITABLE_CLASS" description="WF_NONEDITABLE_EDITABLE_CLASS_DESC" />
		</fieldset>
	</fields-->
	<languages></languages>
	<help></help>
</extension>
plugins/noneditable/index.html000060400000000054152455721620012512 0ustar00<html><body bgcolor="#FFFFFF"></body></html>plugins/visualchars/visualchars.xml000060400000001653152455721620013631 0ustar00<?xml version="1.0" ?>
<extension version="3.4" type="plugin" group="jce" method="upgrade">
	<name>WF_VISUALCHARS_TITLE</name>
	<version>2.9.99.2</version>
	<creationDate>22-04-2026</creationDate>
	<author>Ryan Demmer</author>
	<authorEmail>info@joomlacontenteditor.net</authorEmail>
	<authorUrl>https://www.joomlacontenteditor.net/</authorUrl>
	<copyright>Ryan Demmer</copyright>
	<license>GNU/GPL Version 2 or later - http://www.gnu.org/licenses/gpl-2.0.html</license>
	<description>WF_VISUALCHARS_DESC</description>
	<icon>visualchars</icon>
	<fields name="visualchars">
		<fieldset name="config">
			<field name="state" type="yesno" default="1" label="WF_LABEL_STATE" description="WF_LABEL_STATE_DESC">
				<option value="1">JON</option>
				<option value="0">JOFF</option>
			</field>
		</fieldset>
	</fields>
	<help>
		<topic key="visualchars.about" title="WF_VISUALCHARS_HELP_ABOUT" />
	</help>
	<languages></languages>
</extension>plugins/visualchars/index.html000060400000000054152455721620012552 0ustar00<html><body bgcolor="#FFFFFF"></body></html>plugins/visualchars/config.php000060400000001075152455721620012537 0ustar00<?php
/**
 * @package     JCE
 * @subpackage  Editor
 *
 * @copyright   Copyright (c) 2009-2024 Ryan Demmer. All rights reserved
 * @license     GNU General Public License version 2 or later; see LICENSE.txt
 */

\defined('_JEXEC') or die;

class WFVisualcharsPluginConfig
{
    public static function getConfig(&$settings)
    {
        $wf = WFApplication::getInstance();

        // legacy
        $state = $wf->getParam('editor.visualchars', 0);

        $settings['visualchars_default_state'] = $wf->getParam('editor.visualchars_state', $state, 0, 'boolean');
    }
}
plugins/kitchensink/index.html000060400000000054152455721620012540 0ustar00<html><body bgcolor="#FFFFFF"></body></html>plugins/kitchensink/kitchensink.xml000060400000001236152455721620013602 0ustar00<?xml version="1.0" ?>
<extension version="3.4" type="plugin" group="jce" method="upgrade">
	<name>WF_KITCHENSINK_TITLE</name>
	<version>2.9.99.2</version>
	<creationDate>22-04-2026</creationDate>
	<author>Ryan Demmer</author>
	<authorEmail>info@joomlacontenteditor.net</authorEmail>
	<authorUrl>https://www.joomlacontenteditor.net/</authorUrl>
	<copyright>Ryan Demmer</copyright>
	<license>GNU/GPL Version 2 or later - http://www.gnu.org/licenses/gpl-2.0.html</license>
	<description>WF_KITCHENSINK_DESC</description>
	<icon>kitchensink</icon>
	<help>
		<topic key="visualblocks.about" title="WF_KITCHENSINK_HELP_ABOUT" />
	</help>
	<languages></languages>
</extension>plugins/lists/lists.xml000060400000006047152455721620011257 0ustar00<?xml version="1.0" ?>
<extension version="3.4" type="plugin" group="jce" method="upgrade">
    <name>WF_LISTS_TITLE</name>
    <version>2.9.99.2</version>
    <creationDate>22-04-2026</creationDate>
    <author>Ryan Demmer</author>
    <authorEmail>info@joomlacontenteditor.net</authorEmail>
    <authorUrl>https://www.joomlacontenteditor.net/</authorUrl>
    <copyright>Ryan Demmer</copyright>
    <license>GNU/GPL Version 2 or later - http://www.gnu.org/licenses/gpl-2.0.html</license>
    <description>WF_LISTS_DESC</description>
    <icon>numlist,bullist</icon>
    <fields name="lists">
        <fieldset name="config">
            <field type="heading" label="WF_NUMLIST_TITLE" description="" />

            <field name="number_styles" type="sortablecheckboxes" default="default,lower-alpha,lower-greek,lower-roman,upper-alpha,upper-roman" label="WF_LISTS_STYLES" description="WF_LISTS_STYLES_DESC">
                <option value="default">WF_OPTION_DEFAULT</option>
                <option value="lower-alpha">WF_LISTS_LOWER_ALPHA</option>
                <option value="lower-greek">WF_LISTS_LOWER_GREEK</option>
                <option value="lower-roman">WF_LISTS_LOWER_ROMAN</option>
                <option value="upper-alpha">WF_LISTS_UPPER_ALPHA</option>
                <option value="upper-roman">WF_LISTS_UPPER_ROMAN</option>
            </field>

            <field name="numlist_classes" type="text" default="" size="50" label="WF_LABEL_CLASSES" description="WF_LABEL_CLASSES_DESC" />

			<field name="numlist_custom_classes" type="repeatable" default="" label="WF_LABEL_CUSTOM_CLASSES" description="WF_LABEL_CUSTOM_CLASSES_DESC">
                <field type="text" size="50" hiddenLabel="true" />
            </field>

            <field type="heading" label="WF_BULLIST_TITLE" description="" />

            <field name="bullet_styles" type="sortablecheckboxes" default="default,circle,disc,square" label="WF_LISTS_STYLES" description="WF_LISTS_STYLES_DESC">
                <option value="default">WF_OPTION_DEFAULT</option>
                <option value="circle">WF_LISTS_CIRCLE</option>
                <option value="disc">WF_LISTS_DISC</option>
                <option value="square">WF_LISTS_SQUARE</option>
            </field>

            <field name="bullet_classes" type="text" default="" size="50" label="WF_LABEL_CLASSES" description="WF_LABEL_CLASSES_DESC" />

			<field name="bullet_custom_classes" type="repeatable" default="" label="WF_LABEL_CUSTOM_CLASSES" description="WF_LABEL_CUSTOM_CLASSES_DESC">
                <field type="text" size="50" hiddenLabel="true" />
            </field>

            <field type="heading" label="WF_PARAM_BUTTONS" description="" />

            <field name="buttons" type="buttons" multiple="multiple" default="numlist,bullist" label="WF_PARAM_BUTTONS" description="WF_PARAM_BUTTONS_DESC">
                <option value="numlist">WF_NUMLIST_TITLE</option>
                <option value="bullist">WF_BULLIST_TITLE</option>
            </field>
        </fieldset>
    </fields>
    <help></help>
    <languages></languages>
</extension>plugins/lists/index.html000060400000000054152455721620011364 0ustar00<html><body bgcolor="#FFFFFF"></body></html>plugins/table/tmpl/general_table.php000060400000006073152455721620013600 0ustar00<?php

/**
 * @copyright    Copyright (c) 2009-2022 Ryan Demmer. All rights reserved
 * @license    GNU/GPL 2 or later - http://www.gnu.org/licenses/old-licenses/gpl-2.0.html
 * JCE is free software. This version may have been modified pursuant
 * to the GNU General Public License, and as distributed it includes or
 * is derivative of works licensed under the GNU General Public License or
 * other free or open source software licenses
 */
\defined('_JEXEC') or die;

use Joomla\CMS\Language\Text;

?>
    <div class="uk-form-row uk-grid">
        <label class="uk-form-label uk-width-2-10" for="cols">
            <?php echo Text::_('WF_TABLE_COLS'); ?></label>
        <div class="uk-form-controls uk-width-3-10">
            <input id="cols" type="number" min="1" value="" required />
        </div>

        <label class="uk-form-label uk-width-2-10" for="rows">
            <?php echo Text::_('WF_TABLE_ROWS'); ?></label>
        <div class="uk-form-controls uk-width-3-10">
            <input id="rows" type="number" value="" required />
        </div>
    </div>

<div class="uk-form-row uk-grid">
    <label class="uk-form-label uk-width-2-10" for="cellpadding">
        <?php echo Text::_('WF_TABLE_CELLPADDING'); ?></label>
    <div class="uk-form-controls uk-width-3-10">
        <input id="cellpadding" type="number" value="" />
    </div>

    <label class="uk-form-label uk-width-2-10" for="cellspacing">
        <?php echo Text::_('WF_TABLE_CELLSPACING'); ?></label>
    <div class="uk-form-controls uk-width-3-10">
        <input id="cellspacing" type="number" value="" />
    </div>
</div>
<div class="uk-form-row uk-grid">
    <label class="uk-form-label uk-width-2-10" for="align">
        <?php echo Text::_('WF_TABLE_ALIGN'); ?></label>
    <div class="uk-form-controls uk-width-3-10">
        <select id="align">
            <option value=""><?php echo Text::_('WF_OPTION_NOT_SET'); ?></option>
            <option value="center"><?php echo Text::_('WF_TABLE_ALIGN_MIDDLE'); ?></option>
            <option value="left"><?php echo Text::_('WF_TABLE_ALIGN_LEFT'); ?></option>
            <option value="right"><?php echo Text::_('WF_TABLE_ALIGN_RIGHT'); ?></option>
        </select>
    </div>

    <label class="uk-form-label uk-width-2-10" for="table_border">
        <?php echo Text::_('WF_TABLE_BORDER'); ?></label>
    <div class="uk-form-controls uk-width-3-10">
        <input id="table_border" type="number" value="" />
    </div>
</div>
<div class="uk-form-row uk-grid">
    <label class="uk-form-label uk-width-2-10" for="width">
        <?php echo Text::_('WF_TABLE_WIDTH'); ?></label>
    <div class="uk-form-controls uk-width-3-10">
        <input type="text" id="width" value="" />
    </div>

    <label class="uk-form-label uk-width-2-10" for="height">
        <?php echo Text::_('WF_TABLE_HEIGHT'); ?></label>
    <div class="uk-form-controls uk-width-3-10">
        <input type="text" id="height" value="" />
    </div>
</div>
<div class="uk-form-row">
    <input id="caption" type="checkbox" />
    <label for="caption">
        <?php echo Text::_('WF_TABLE_CAPTION'); ?></label>
</div>
plugins/table/tmpl/merge.php000060400000001742152455721620012111 0ustar00<?php

/**
 * @copyright    Copyright (c) 2009-2022 Ryan Demmer. All rights reserved
 * @license    GNU/GPL 2 or later - http://www.gnu.org/licenses/old-licenses/gpl-2.0.html
 * JCE is free software. This version may have been modified pursuant
 * to the GNU General Public License, and as distributed it includes or
 * is derivative of works licensed under the GNU General Public License or
 * other free or open source software licenses
 */
\defined('_JEXEC') or die;

use Joomla\CMS\Language\Text;

?>
<div class="uk-grid uk-grid-small uk-form-row">
    <label class="uk-form-label uk-width-7-10"><?php echo Text::_('WF_TABLE_COLS'); ?>:</label>
    <div class="uk-form-controls uk-width-3-10">
        <input type="number" min="1" id="numcols" value=""/>
    </div>
    <label class="uk-form-label uk-width-7-10"><?php echo Text::_('WF_TABLE_ROWS'); ?>:</label>
    <div class="uk-form-controls uk-width-3-10">
        <input type="number" min="1" id="numrows" value=""/>
    </div>
</div>
plugins/table/tmpl/general_row.php000060400000005022152455721620013311 0ustar00<?php

/**
 * @copyright    Copyright (c) 2009-2022 Ryan Demmer. All rights reserved
 * @license    GNU/GPL 2 or later - http://www.gnu.org/licenses/old-licenses/gpl-2.0.html
 * JCE is free software. This version may have been modified pursuant
 * to the GNU General Public License, and as distributed it includes or
 * is derivative of works licensed under the GNU General Public License or
 * other free or open source software licenses
 */
\defined('_JEXEC') or die;

use Joomla\CMS\Language\Text;

?>
<div class="uk-form-row uk-grid uk-grid-small">
    <label class="uk-form-label uk-width-3-10" for="rowtype">
        <?php echo Text::_('WF_TABLE_ROWTYPE'); ?></label>
    <div class="uk-form-controls uk-width-7-10">
        <select id="rowtype">
            <option value="thead"><?php echo Text::_('WF_TABLE_THEAD'); ?></option>
            <option value="tbody"><?php echo Text::_('WF_TABLE_TBODY'); ?></option>
            <option value="tfoot"><?php echo Text::_('WF_TABLE_TFOOT'); ?></option>
        </select></div>
</div>
<div class="uk-form-row uk-grid uk-grid-small">
    <label class="uk-form-label uk-width-3-10" for="align">
        <?php echo Text::_('WF_TABLE_ALIGN'); ?></label>
    <div class="uk-form-controls uk-width-7-10">
        <select id="align">
            <option value=""><?php echo Text::_('WF_OPTION_NOT_SET'); ?></option>
            <option value="center"><?php echo Text::_('WF_TABLE_ALIGN_MIDDLE'); ?></option>
            <option value="left"><?php echo Text::_('WF_TABLE_ALIGN_LEFT'); ?></option>
            <option value="right"><?php echo Text::_('WF_TABLE_ALIGN_RIGHT'); ?></option>
        </select></div>
</div>
<!--div class="uk-form-row uk-grid uk-grid-small">
    <label class="uk-form-label uk-width-3-10" for="valign">
        <?php echo Text::_('WF_TABLE_VALIGN'); ?></label>
    <div class="uk-form-controls uk-width-7-10">
        <select id="valign">
            <option value=""><?php echo Text::_('WF_OPTION_NOT_SET'); ?></option>
            <option value="top"><?php echo Text::_('WF_TABLE_ALIGN_TOP'); ?></option>
            <option value="middle"><?php echo Text::_('WF_TABLE_ALIGN_MIDDLE'); ?></option>
            <option value="bottom"><?php echo Text::_('WF_TABLE_ALIGN_BOTTOM'); ?></option>
        </select></div>
</div-->
<div class="uk-form-row uk-grid uk-grid-small">
    <label class="uk-form-label uk-width-3-10" for="height">
        <?php echo Text::_('WF_TABLE_HEIGHT'); ?></label>
    <div class="uk-form-controls uk-width-7-10">
        <input type="text" id="height" value="" />
    </div>
</div>plugins/table/tmpl/general_cell.php000060400000006705152455721620013432 0ustar00<?php

/**
 * @copyright 	Copyright (c) 2009-2022 Ryan Demmer. All rights reserved
 * @license   	GNU/GPL 2 or later - http://www.gnu.org/licenses/old-licenses/gpl-2.0.html
 * JCE is free software. This version may have been modified pursuant
 * to the GNU General Public License, and as distributed it includes or
 * is derivative of works licensed under the GNU General Public License or
 * other free or open source software licenses
 */
\defined('_JEXEC') or die;

use Joomla\CMS\Language\Text;

?>
    <div class="uk-form-row uk-grid">
        <label class="uk-form-label uk-width-2-10" for="align">
                <?php echo Text::_('WF_TABLE_ALIGN'); ?></label>
        <div class="uk-form-controls uk-width-3-10">
            <select id="align">
                <option value=""><?php echo Text::_('WF_OPTION_NOT_SET'); ?></option>
                <option value="center"><?php echo Text::_('WF_TABLE_ALIGN_MIDDLE'); ?></option>
                <option value="left"><?php echo Text::_('WF_TABLE_ALIGN_LEFT'); ?></option>
                <option value="right"><?php echo Text::_('WF_TABLE_ALIGN_RIGHT'); ?></option>
            </select>
        </div>

        <label class="uk-form-label uk-width-2-10" for="celltype">
                <?php echo Text::_('WF_TABLE_CELL_TYPE'); ?></label>
        <div class="uk-form-controls uk-width-3-10">
            <select id="celltype" >
                <option value="td"><?php echo Text::_('WF_TABLE_TD'); ?></option>
                <option value="th"><?php echo Text::_('WF_TABLE_TH'); ?></option>
            </select>
        </div>
    </div>
    
    <div class="uk-form-row uk-grid">
        <label class="uk-form-label uk-width-2-10" for="valign">
                <?php echo Text::_('WF_TABLE_VALIGN'); ?></label>
        <div class="uk-form-controls uk-width-3-10">
            <select id="valign" >
                <option value=""><?php echo Text::_('WF_OPTION_NOT_SET'); ?></option>
                <option value="top"><?php echo Text::_('WF_TABLE_ALIGN_TOP'); ?></option>
                <option value="middle"><?php echo Text::_('WF_TABLE_ALIGN_MIDDLE'); ?></option>
                <option value="bottom"><?php echo Text::_('WF_TABLE_ALIGN_BOTTOM'); ?></option>
            </select>
        </div>

        <label class="uk-form-label uk-width-2-10" for="scope">
                <?php echo Text::_('WF_TABLE_SCOPE'); ?></label>
        <div class="uk-form-controls uk-width-3-10">
            <select id="scope" >
                <option value=""><?php echo Text::_('WF_OPTION_NOT_SET'); ?></option>
                <option value="col"><?php echo Text::_('WF_TABEL_COL'); ?></option>
                <option value="row"><?php echo Text::_('WF_TABEL_ROW'); ?></option>
                <option value="rowgroup"><?php echo Text::_('WF_TABLE_ROWGROUP'); ?></option>
                <option value="colgroup"><?php echo Text::_('WF_TABLE_COLGROUP'); ?></option>
            </select>
        </div>
    </div>

    <div class="uk-form-row uk-grid">
        <label class="uk-form-label uk-width-2-10" for="width">
                <?php echo Text::_('WF_TABLE_WIDTH'); ?></label>
        <div class="uk-form-controls uk-width-3-10">
            <input id="width" type="text" value="" />
        </div>

        <label class="uk-form-label uk-width-2-10" for="height">
                <?php echo Text::_('WF_TABLE_HEIGHT'); ?></label>
        <div class="uk-form-controls uk-width-3-10">
            <input id="height" type="text" value="" />
        </div>
    </div>plugins/table/tmpl/general.php000060400000001027152455721620012423 0ustar00<?php

/**
 * @copyright 	Copyright (c) 2009-2022 Ryan Demmer. All rights reserved
 * @license   	GNU/GPL 2 or later - http://www.gnu.org/licenses/old-licenses/gpl-2.0.html
 * JCE is free software. This version may have been modified pursuant
 * to the GNU General Public License, and as distributed it includes or
 * is derivative of works licensed under the GNU General Public License or
 * other free or open source software licenses
 */
\defined('_JEXEC') or die;

?>
<?php echo $this->loadTemplate($this->plugin->getLayout()); ?>
plugins/table/tmpl/default.php000060400000003431152455721620012433 0ustar00<?php

/**
 * @copyright 	Copyright (c) 2009-2022 Ryan Demmer. All rights reserved
 * @license   	GNU/GPL 2 or later - http://www.gnu.org/licenses/old-licenses/gpl-2.0.html
 * JCE is free software. This version may have been modified pursuant
 * to the GNU General Public License, and as distributed it includes or
 * is derivative of works licensed under the GNU General Public License or
 * other free or open source software licenses
 */
\defined('_JEXEC') or die;

use Joomla\CMS\Language\Text;

$tabs = WFTabs::getInstance();
?>
<form onsubmit="return false;" class="uk-form uk-form-horizontal" data-layout="<?php echo $this->plugin->getLayout(); ?>">
	<?php echo $tabs->render(); ?>
	<div class="mceActionPanel">
	<?php if ($this->plugin->getLayout() == 'cell') : ?>
		<div class="uk-form-row uk-float-left">
			<select id="action" name="action">
				<option value="cell"><?php echo Text::_('WF_TABLE_CELL_CELL'); ?></option>
				<option value="row"><?php echo Text::_('WF_TABLE_CELL_ROW'); ?></option>
				<option value="all"><?php echo Text::_('WF_TABLE_CELL_ALL'); ?></option>
			</select>
		</div>
	<?php endif;
    if ($this->plugin->getLayout() == 'row') : ?>
		<div class="uk-form-row uk-float-left">
			<select id="action" name="action">
				<option value="row"><?php echo Text::_('WF_TABLE_ROW_ROW'); ?></option>
				<option value="odd"><?php echo Text::_('WF_TABLE_ROW_ODD'); ?></option>
				<option value="even"><?php echo Text::_('WF_TABLE_ROW_EVEN'); ?></option>
				<option value="all"><?php echo Text::_('WF_TABLE_ROW_ALL'); ?></option>
			</select>
		</div>
	<?php endif; ?>
	<button type="button" id="cancel"><?php echo Text::_('WF_LABEL_CANCEL'); ?></button>
	<button type="submit" id="insert" onclick="TableDialog.insert();"><?php echo Text::_('WF_LABEL_INSERT'); ?></button>
	</div>
</form>
plugins/table/tmpl/advanced.php000060400000020701152455721620012553 0ustar00<?php

/**
 * @copyright    Copyright (c) 2009-2022 Ryan Demmer. All rights reserved
 * @license    GNU/GPL 2 or later - http://www.gnu.org/licenses/old-licenses/gpl-2.0.html
 * JCE is free software. This version may have been modified pursuant
 * to the GNU General Public License, and as distributed it includes or
 * is derivative of works licensed under the GNU General Public License or
 * other free or open source software licenses
 */
\defined('_JEXEC') or die;

use Joomla\CMS\Language\Text;

?>
<div class="uk-form-row uk-grid uk-grid-small">
    <label for="classlist" class="uk-form-label uk-width-1-5 hastip" title="<?php echo Text::_('WF_LABEL_CLASSES_DESC'); ?>"><?php echo Text::_('WF_LABEL_CLASSES'); ?></label>
    <div class="uk-form-controls uk-width-4-5">
        <input type="text" id="classes" class="uk-datalist" multiple="multiple" list="classes_datalist" />
        <datalist id="classes_datalist"></datalist>
    </div>
</div>

<div class="uk-form-row uk-grid uk-grid-small">
    <label class="uk-form-label uk-width-1-5" for="id">
        <?php echo Text::_('WF_TABLE_ID'); ?></label>
    <div class="uk-form-controls uk-width-4-5">
        <input id="id" type="text" value="" />
    </div>
</div>
<div class="uk-form-row uk-grid uk-grid-small">
    <label class="uk-form-label uk-width-1-5" for="summary">
        <?php echo Text::_('WF_TABLE_SUMMARY'); ?></label>
    <div class="uk-form-controls uk-width-4-5">
        <input id="summary" type="text" value="" />
    </div>
</div>
<div class="uk-form-row uk-grid uk-grid-small">
    <label class="uk-form-label uk-width-1-5" for="style">
        <?php echo Text::_('WF_TABLE_STYLE'); ?></label>
    <div class="uk-form-controls uk-width-4-5">
        <input type="text" id="style" value="" />
    </div>
</div>
<div class="uk-form-row uk-grid uk-grid-small">
    <label class="uk-form-label uk-width-1-5" id="langlabel" for="lang">
        <?php echo Text::_('WF_TABLE_LANGCODE'); ?></label>
    <div class="uk-form-controls uk-width-4-5">
        <input id="lang" type="text" value="" class="uk-form-width-small" />
    </div>
</div>
<div class="uk-form-row uk-grid uk-grid-small">
    <label class="uk-form-label uk-width-1-5" for="backgroundimage">
        <?php echo Text::_('WF_TABLE_BGIMAGE'); ?></label>
    <div class="uk-form-controls uk-width-4-5">
        <input id="backgroundimage" type="text" value="" class="browser images" />
    </div>
</div>
<?php if ($this->plugin->getLayout() == 'table'):
?>
<div class="uk-form-row uk-grid uk-grid-small">
    <label class="uk-form-label uk-width-1-5" for="tframe">
        <?php echo Text::_('WF_TABLE_FRAME'); ?></label>
    <div class="uk-form-controls uk-width-4-5">
        <select id="frame">
            <option value=""><?php echo Text::_('WF_OPTION_NOT_SET'); ?></option>
            <option value="void"><?php echo Text::_('WF_TABLE_RULES_VOID'); ?></option>
            <option value="above"><?php echo Text::_('WF_TABLE_RULES_ABOVE'); ?></option>
            <option value="below"><?php echo Text::_('WF_TABLE_RULES_BELOW'); ?></option>
            <option value="hsides"><?php echo Text::_('WF_TABLE_RULES_HSIDES'); ?></option>
            <option value="lhs"><?php echo Text::_('WF_TABLE_RULES_LHS'); ?></option>
            <option value="rhs"><?php echo Text::_('WF_TABLE_RULES_RHS'); ?></option>
            <option value="vsides"><?php echo Text::_('WF_TABLE_RULES_VSIDES'); ?></option>
            <option value="box"><?php echo Text::_('WF_TABLE_RULES_BOX'); ?></option>
            <option value="border"><?php echo Text::_('WF_TABLE_RULES_BORDER'); ?></option>
        </select></div>
</div>
<div class="uk-form-row uk-grid uk-grid-small">
    <label class="uk-form-label uk-width-1-5" for="rules">
        <?php echo Text::_('WF_TABLE_RULES'); ?></label>
    <div class="uk-form-controls uk-width-4-5">
        <select id="rules">
            <option value=""><?php echo Text::_('WF_OPTION_NOT_SET'); ?></option>
            <option value="none"><?php echo Text::_('WF_TABLE_FRAME_NONE'); ?></option>
            <option value="groups"><?php echo Text::_('WF_TABLE_FRAME_GROUPS'); ?></option>
            <option value="rows"><?php echo Text::_('WF_TABLE_FRAME_ROWS'); ?></option>
            <option value="cols"><?php echo Text::_('WF_TABLE_FRAME_COLS'); ?></option>
            <option value="all"><?php echo Text::_('WF_TABLE_FRAME_ALL'); ?></option>
        </select></div>
</div>
<?php endif; ?>
<div class="uk-form-row uk-grid uk-grid-small">
    <label class="uk-form-label uk-width-1-5" for="dir">
        <?php echo Text::_('WF_TABLE_LANGDIR'); ?></label>
    <div class="uk-form-controls uk-width-4-5">
        <select id="dir">
            <option value=""><?php echo Text::_('WF_OPTION_NOT_SET'); ?></option>
            <option value="ltr"><?php echo Text::_('WF_TABLE_LTR'); ?></option>
            <option value="rtl"><?php echo Text::_('WF_TABLE_RTL'); ?></option>
        </select></div>
</div>

<div class="uk-form-row uk-grid uk-grid-small">
    <label for="border" class="hastip uk-form-label uk-width-1-5" title="<?php echo Text::_('WF_LABEL_BORDER_DESC'); ?>">
        <?php echo Text::_('WF_LABEL_BORDER'); ?>
    </label>

    <div class="uk-form-controls uk-grid uk-grid-small uk-width-4-5">
        <div class="uk-form-controls uk-width-0-3 uk-margin-small-top">
            <input type="checkbox" id="border" />
        </div>

        <label for="border_width" class="hastip uk-form-label uk-width-1-10 uk-margin-small-left" title="<?php echo Text::_('WF_LABEL_BORDER_WIDTH_DESC'); ?>"><?php echo Text::_('WF_LABEL_WIDTH'); ?></label>
        <div class="uk-form-controls uk-width-2-10">
            <input type="text" pattern="[0-9]+" id="border_width" class="uk-datalist" list="border_width_datalist" />
            <datalist id="border_width_datalist">
                <option value="inherit">--</option>
                <option value="0">0</option>
                <option value="1">1</option>
                <option value="2">2</option>
                <option value="3">3</option>
                <option value="4">4</option>
                <option value="5">5</option>
                <option value="6">6</option>
                <option value="7">7</option>
                <option value="8">8</option>
                <option value="9">9</option>
                <option value="thin"><?php echo Text::_('WF_OPTION_BORDER_THIN'); ?></option>
                <option value="medium"><?php echo Text::_('WF_OPTION_BORDER_MEDIUM'); ?></option>
                <option value="thick"><?php echo Text::_('WF_OPTION_BORDER_THICK'); ?></option>
            </datalist>
        </div>

        <label for="border_style" class="hastip uk-form-label uk-width-1-10 uk-margin-small-left" title="<?php echo Text::_('WF_LABEL_BORDER_STYLE_DESC'); ?>"><?php echo Text::_('WF_LABEL_STYLE'); ?></label>
        <div class="uk-form-controls uk-width-2-10">
            <select id="border_style">
                <option value="inherit">--</option>
                <option value="none"><?php echo Text::_('WF_OPTION_BORDER_NONE'); ?></option>
                <option value="solid"><?php echo Text::_('WF_OPTION_BORDER_SOLID'); ?></option>
                <option value="dashed"><?php echo Text::_('WF_OPTION_BORDER_DASHED'); ?></option>
                <option value="dotted"><?php echo Text::_('WF_OPTION_BORDER_DOTTED'); ?></option>
                <option value="double"><?php echo Text::_('WF_OPTION_BORDER_DOUBLE'); ?></option>
                <option value="groove"><?php echo Text::_('WF_OPTION_BORDER_GROOVE'); ?></option>
                <option value="inset"><?php echo Text::_('WF_OPTION_BORDER_INSET'); ?></option>
                <option value="outset"><?php echo Text::_('WF_OPTION_BORDER_OUTSET'); ?></option>
                <option value="ridge"><?php echo Text::_('WF_OPTION_BORDER_RIDGE'); ?></option>
            </select>
        </div>

        <label for="border_color" class="hastip uk-form-label uk-width-1-10 uk-margin-small-left" title="<?php echo Text::_('WF_LABEL_BORDER_COLOR_DESC'); ?>"><?php echo Text::_('WF_LABEL_COLOR'); ?></label>
        <div class="uk-form-controls uk-width-2-10">
            <input id="border_color" class="color" type="text" value="#000000" />
        </div>
    </div>
</div>

<div class="uk-form-row uk-grid uk-grid-small">
    <label class="uk-form-label uk-width-1-5" for="bgcolor">
        <?php echo Text::_('WF_TABLE_BGCOLOR'); ?></label>
    <div class="uk-form-controls uk-width-1-5">
        <input id="bgcolor" type="text" value="" size="9" class="color uk-form-width-small" />
    </div>
</div>plugins/table/tmpl/index.html000060400000000054152455721620012271 0ustar00<html><body bgcolor="#FFFFFF"></body></html>plugins/table/index.html000060400000000054152455721620011315 0ustar00<html><body bgcolor="#FFFFFF"></body></html>plugins/table/config.php000060400000003625152455721620011305 0ustar00<?php
/**
 * @package     JCE
 * @subpackage  Editor
 *
 * @copyright   Copyright (c) 2009-2024 Ryan Demmer. All rights reserved
 * @license     GNU General Public License version 2 or later; see LICENSE.txt
 */

\defined('_JEXEC') or die;

class WFTablePluginConfig
{
    public static function getConfig(&$settings)
    {
        $wf = WFApplication::getInstance();

        $width = $wf->getParam('table.width');
        $height = $wf->getParam('table.height');

        if ($width && preg_match('#^[0-9\.]$#', $width)) {
            $width .= 'px';
        }

        if ($height && preg_match('#^[0-9\.]$#', $height)) {
            $height .= 'px';
        }

        $settings['table_default_width'] = $width;
        $settings['table_default_height'] = $height;
        $settings['table_default_border'] = $wf->getParam('table.border', 0, 0);
        $settings['table_default_align'] = $wf->getParam('table.align', '', '');
        $settings['table_default_cellpadding'] = $wf->getParam('table.cellpadding', 0, 0);
        $settings['table_default_cellspacing'] = $wf->getParam('table.cellspacing', 0, 0);
        $settings['table_default_rows'] = $wf->getParam('table.rows', 2, 2);
        $settings['table_default_cols'] = $wf->getParam('table.cols', 2, 2);
        $settings['table_cell_limit'] = $wf->getParam('table.cell_limit', 0, 0);
        $settings['table_row_limit'] = $wf->getParam('table.row_limit', 0, 0);
        $settings['table_col_limit'] = $wf->getParam('table.col_limit', 0, 0);
        $settings['table_pad_empty_cells'] = $wf->getParam('table.pad_empty_cells', 1, 1);

        $settings['table_classes'] = $wf->getParam('table.classes', '', '');
        $settings['table_classes_custom'] = $wf->getParam('table.custom_classes', [], []);

        $settings['table_buttons'] = $wf->getParam('table.show_buttons', 1, 1);

        $settings['table_basic_dialog'] = $wf->getParam('table.basic_dialog', 0, 0);
    }
}
plugins/table/table.xml000060400000012016152455721620011132 0ustar00<?xml version="1.0" encoding="UTF-8"?>
<extension version="3.4" type="plugin" group="jce" method="upgrade">
    <name>WF_TABLE_TITLE</name>
    <version>2.9.99.2</version>
    <creationDate>22-04-2026</creationDate>
    <author>Ryan Demmer</author>
    <authorEmail>info@joomlacontenteditor.net</authorEmail>
    <authorUrl>https://www.joomlacontenteditor.net/</authorUrl>
    <copyright>Copyright (C) 2006 - 2026 Ryan Demmer. All rights reserved</copyright>
    <license>GNU/GPL Version 2 or later - http://www.gnu.org/licenses/gpl-2.0.html</license>
    <description>WF_TABLE_DESC</description>
    <icon>table_insert,delete_table,row_props,cell_props,row_before,row_after,delete_row,col_before,col_after,delete_col,split_cells,merge_cells</icon>
    <fields name="table">
        <fieldset name="config">

            <fieldset name="defaults">
                <field name="width" type="text" size="6" default="" label="WF_TABLES_PARAM_WIDTH" description="WF_TABLES_PARAM_WIDTH_DESC" />
                <field name="height" type="text" size="6" default="" label="WF_TABLES_PARAM_HEIGHT" description="WF_TABLES_PARAM_HEIGHT_DESC" />
                <field name="border" type="text" size="5" default="0" label="WF_TABLES_PARAM_BORDER" description="WF_TABLES_PARAM_BORDER_DESC" />
                <field name="cols" type="number" size="5" class="input-small" step="1" default="2" label="WF_TABLES_PARAM_COLS" description="WF_TABLES_PARAM_COLS_DESC" />
                <field name="rows" type="number" size="5" class="input-small" step="1" default="2" label="WF_TABLES_PARAM_ROWS" description="WF_TABLES_PARAM_ROWS_DESC" />
                <field name="cellpadding" type="number" class="input-small" step="1" size="5" default="" label="WF_TABLES_PARAM_CELLPADDING" description="WF_TABLES_PARAM_CELLPADDING_DESC" />
                <field name="cellspacing" type="number" class="input-small" step="1" size="5" default="" label="WF_TABLES_PARAM_CELLSPACING" description="WF_TABLES_PARAM_CELLSPACING_DESC" />
                <field name="align" type="list" default="" label="WF_TABLE_ALIGN" description="WF_TABLE_ALIGN_DESC">
                    <option value="">WF_OPTION_NOT_SET</option>
                    <option value="left">WF_TABLE_ALIGN_LEFT</option>
                    <option value="center">WF_TABLE_ALIGN_MIDDLE</option>
                    <option value="right">WF_TABLE_ALIGN_RIGHT</option>
                </field>
                <field name="classes" type="text" size="50" default="" label="WF_LABEL_CLASSES" description="WF_LABEL_CLASSES_DESC" />

            </fieldset>

            <field name="pad_empty_cells" type="list" default="1" label="WF_TABLE_PAD_EMPTY_CELLS" description="WF_TABLE_PAD_EMPTY_CELLS_DESC">
                <option value="1">JYES</option>
                <option value="0">JNO</option>
            </field>

            <field name="custom_classes" type="repeatable" default="" label="WF_LABEL_CUSTOM_CLASSES" description="WF_LABEL_CUSTOM_CLASSES_DESC">
                <field type="text" size="50" hiddenLabel="true" />
            </field>

            <field name="basic_dialog" type="yesno" default="0" label="WF_PARAM_BASIC_DIALOG" description="WF_PARAM_BASIC_DIALOG_DESC" class="btn-group btn-group-yesno">
                <option value="1">JYES</option>
                <option value="0">JNO</option>
            </field>

            <field name="show_buttons" type="list" default="1" label="WF_TABLE_SHOW_BUTTONS" description="WF_TABLE_SHOW_BUTTONS_DESC">
                <option value="1">JYES</option>
                <option value="0">JNO</option>
            </field>

            <field type="heading" label="WF_PROFILES_PLUGINS_BUTTONS" />

            <field name="buttons" type="buttons" multiple="multiple" default="table_insert,delete_table,row_props,cell_props,row_before,row_after,delete_row,col_before,col_after,delete_col,split_cells,merge_cells" label="WF_PARAM_BUTTONS" description="WF_PARAM_BUTTONS_DESC">
                <option value="table_insert">WF_TABLE_INSERT</option>
                <option value="delete_table">WF_TABLE_DELETE</option>
                <option value="row_props">WF_TABLE_ROW_PROPS</option>
                <option value="cell_props">WF_TABLE_CELL_PROPS</option>
                <option value="row_before">WF_TABLE_ROW_BEFORE</option>
                <option value="row_after">WF_TABLE_ROW_AFTER</option>
                <option value="delete_row">WF_TABLE_ROW_DELETE</option>
                <option value="col_before">WF_TABLE_COL_BEFORE</option>
                <option value="col_after">WF_TABLE_COL_AFTER</option>
                <option value="delete_col">WF_TABLE_COL_DELETE</option>
                <option value="split_cells">WF_TABLE_SPLIT</option>
                <option value="merge_cells">WF_TABLE_MERGE</option>
            </field>
        </fieldset>
    </fields>
    <help>
        <topic key="tables.edit" title="WF_TABLES_HELP_EDIT" />
        <topic key="tables.delete" title="WF_TABLES_HELP_DELETE" />
        <topic key="tables.rows" title="WF_TABLES_HELP_ROWS" />
    </help>
    <languages></languages>
</extension>
plugins/table/table.php000060400000003412152455721620011121 0ustar00<?php
/**
 * @package     JCE
 * @subpackage  Editor
 *
 * @copyright   Copyright (c) 2009-2024 Ryan Demmer. All rights reserved
 * @license     GNU General Public License version 2 or later; see LICENSE.txt
 */

\defined('_JEXEC') or die;

use Joomla\CMS\Factory;
use Joomla\CMS\Language\Text;

class WFTablePlugin extends WFEditorPlugin
{
    public function __construct()
    {
        parent::__construct(array('colorpicker' => true));
    }

    public function getLayout()
    {
        return Factory::getApplication()->input->getCmd('slot', 'table');
    }

    /**
     * Display the plugin.
     */
    public function display()
    {
        parent::display();

        $layout = $this->getLayout();
        $document = WFDocument::getInstance();

        $document->addScript(array('table'), 'plugins');
        $document->addStyleSheet(array('table'), 'plugins');

        // update title
        if ($layout !== 'table') {
            $document->setTitle(Text::_('WF_TABLE_' . strtoupper($layout) . '_TITLE'));
        }

        $settings = $this->getSettings();

        $document->addScriptDeclaration('TableDialog.settings=' . json_encode($settings) . ';');

        $tabs = WFTabs::getInstance(array('base_path' => WF_EDITOR_PLUGIN));

        if ($layout == 'merge') {
            // Add tabs
            $tabs->addTab('merge');
        } else {
            $tabs->addTab('general', 1, array('plugin' => $this));
            $tabs->addTab('advanced', 1, array('plugin' => $this));
        }
    }

    public function getSettings($settings = array())
    {
        $profile = $this->getProfile();

        $settings['file_browser'] = $this->getParam('file_browser', 1) && in_array('browser', explode(',', $profile->plugins));

        return parent::getSettings($settings);
    }
}
plugins/format/index.html000060400000000054152455721620011516 0ustar00<html><body bgcolor="#FFFFFF"></body></html>plugins/format/config.php000060400000010203152455721620011474 0ustar00<?php
/**
 * @package     JCE
 * @subpackage  Editor
 *
 * @copyright   Copyright (c) 2009-2024 Ryan Demmer. All rights reserved
 * @copyright   Copyright (C) 2005 - 2021 Open Source Matters, Inc. All rights reserved.
 * @license     GNU General Public License version 2 or later; see LICENSE.txt
 */

\defined('_JEXEC') or die;

class WFFormatPluginConfig
{
    public static function getConfig(&$settings)
    {
        $wf = WFApplication::getInstance();

        $settings['inline_styles'] = $wf->getParam('editor.inline_styles', 1, 1);

        // Root block handling
        $forced_root_block = $wf->getParam('editor.forced_root_block', 'p');

        // set as boolean if disabled
        if (is_numeric($forced_root_block)) {
            $settings['forced_root_block'] = (bool) intval($forced_root_block);

            if ($settings['forced_root_block'] === false) {
                $settings['force_block_newlines'] = false;
            }

            // legacy value
            if ($wf->getParam('editor.force_br_newlines', 0, 0, 'boolean') === false) {
                $settings['force_block_newlines'] = $wf->getParam('editor.force_p_newlines', 1, 0, 'boolean');
            }
        } else {
            if (strpos($forced_root_block, '|') !== false) {
                // multiple values
                foreach (explode('|', $forced_root_block) as $option) {
                    list($key, $value) = explode(':', $option);

                    // update legacy key
                    if ($key === 'force_p_newlines') {
                        $key = 'force_block_newlines';
                    }

                    $settings[$key] = is_numeric($value) ? (bool) $value : $value;
                }
            } else {
                $settings['forced_root_block'] = $forced_root_block;
            }
        }

        $convert_urls = $wf->getParam('editor.convert_urls');

        // Relative urls - legacy
        $relative_urls = $wf->getParam('editor.relative_urls');

        // if a legacy value is set as a numeric value, and convert_urls is not, then process legacy value
        if (is_numeric($relative_urls) && empty($convert_urls)) {
            $relative_urls = intval($relative_urls);

            if ($relative_urls === 1) {
                $convert_urls = 'relative';
            }

            if ($relative_urls === 0) {
                $convert_urls = 'absolute';
            }
        }

        switch ($convert_urls) {
            default:
            case 'relative':
                $settings['relative_urls'] = true;
                break;
            case 'absolute':
                $settings['relative_urls'] = false;
                $settings['remove_script_host'] = false;
                break;
            case 'none':
                $settings['mixed_urls'] = true;
                $settings['remove_script_host'] = false;
                break;
        }

        $custom_css = $wf->getParam('editor.custom_css', []);

        if (!empty($custom_css)) {
            // trim
            $custom_css = array_map('trim', $custom_css);

            array_walk($custom_css, function (&$value) {
                $value = htmlspecialchars($value, ENT_QUOTES);
                $value = self::stripCssExpressions($value);
            });
            
            $settings['custom_css'] = implode(';', $custom_css);
        }
    }

    /**
	 * Remove CSS Expressions in the form of <property>:expression(...)
     * From libraries/vendor/joomla/filter/src/InputFilter.php
	 *
	 * @param   string  $source  The source string.
	 *
	 * @return  string  Filtered string
	 */
	protected static function stripCssExpressions($source)
	{
		// Strip any comments out (in the form of /*...*/)
		$test = preg_replace('#\/\*.*\*\/#U', '', $source);

		// Test for :expression
		if (!stripos($test, ':expression'))
		{
			// Not found, so we are done
			return $source;
		}

		// At this point, we have stripped out the comments and have found :expression
		// Test stripped string for :expression followed by a '('
		if (preg_match_all('#:expression\s*\(#', $test, $matches))
		{
			// If found, remove :expression
			return str_ireplace(':expression', '', $test);
		}

		return $source;
	}
}
plugins/searchreplace/searchreplace.xml000060400000001156152455721620014361 0ustar00<?xml version="1.0" ?>
<extension version="3.0" type="plugin" plugin="searchreplace" core="1" editable="0">
	<name>WF_SEARCHREPLACE_TITLE</name>
	<version>2.9.99.2</version>
	<creationDate>22-04-2026</creationDate>
	<author>Ryan Demmer</author>
	<authorEmail>info@joomlacontenteditor.net</authorEmail>
	<authorUrl>https://www.joomlacontenteditor.net/</authorUrl>
	<copyright>Ryan Demmer</copyright>
	<license>GNU/GPL Version 2 or later - http://www.gnu.org/licenses/gpl-2.0.html</license>
	<description>WF_SEARCHREPLACE_DESC</description>
	<icon>search,replace</icon>
	
	<help></help>
	<languages></languages>
</extension>plugins/searchreplace/index.html000060400000000054152455721620013027 0ustar00<html><body bgcolor="#FFFFFF"></body></html>plugins/source/source.xml000060400000001122152455721620011550 0ustar00<?xml version="1.0" ?>
<extension version="3.4" type="plugin" group="jce" method="upgrade">
	<name>WF_SOURCE_TITLE</name>
	<version>2.9.99.2</version>
	<creationDate>22-04-2026</creationDate>
	<author>Ryan Demmer</author>
	<authorEmail>info@joomlacontenteditor.net</authorEmail>
	<authorUrl>https://www.joomlacontenteditor.net/</authorUrl>
	<copyright>Copyright (C) 2006 - 2026 Ryan Demmer. All rights reserved</copyright>
	<license>GNU/GPL Version 2 or later - http://www.gnu.org/licenses/gpl-2.0.html</license>
	<description>WF_SOURCE_DESC</description>
	<languages></languages>
</extension>
plugins/source/index.html000060400000000054152455721620011526 0ustar00<html><body bgcolor="#FFFFFF"></body></html>plugins/imgmanager/imgmanager.php000060400000005702152455721620013165 0ustar00<?php
/**
 * @package     JCE
 * @subpackage  Editor
 *
 * @copyright   Copyright (c) 2009-2024 Ryan Demmer. All rights reserved
 * @license     GNU General Public License version 2 or later; see LICENSE.txt
 */

\defined('_JEXEC') or die;

use Joomla\CMS\Factory;

class WFImgManagerPlugin extends WFMediaManager
{
    public $_filetypes = 'jpg,jpeg,png,apng,gif,webp,avif';

    protected $name = 'imgmanager';

    public function __construct($config = array())
    {
        $config['colorpicker'] = true;

        parent::__construct($config);

        $this->addFileBrowserEvent('onUpload', array($this, 'onUpload'));
    }

    /**
     * Display the plugin.
     */
    public function display()
    {
        parent::display();

        $document = WFDocument::getInstance();

        // create new tabs instance
        $tabs = WFTabs::getInstance(array(
            'base_path' => WF_EDITOR_PLUGINS . '/imgmanager',
        ));

        // Add tabs
        $tabs->addTab('image', 1, array('plugin' => $this));

        if ($this->allowEvents()) {
            $tabs->addTab('rollover', $this->getParam('tabs_rollover', 1));
        }

        $tabs->addTab('advanced', $this->getParam('tabs_advanced', 1));

        $document->addScript(array('imgmanager'), 'plugins');
        $document->addStyleSheet(array('imgmanager'), 'plugins');

        $document->addScriptDeclaration('ImageManagerDialog.settings=' . json_encode($this->getSettings()) . ';');
    }

    public function getDefaultAttributes()
    {
        return parent::getDefaultAttributes();
    }

    public function onUpload($file, $relative = '')
    {
        parent::onUpload($file, $relative);
        
        $app = Factory::getApplication();

        // inline upload
        if ($app->input->getInt('inline', 0) === 1) {
            $result = array(
                'file' => $relative,
                'name' => WFUtility::mb_basename($relative),
            );

            if ($this->getParam('always_include_dimensions', 1)) {
                $dim = @getimagesize($file);

                if ($dim) {
                    $result['width'] = $dim[0];
                    $result['height'] = $dim[1];
                }
            }

            $result = array_merge($result, array('attributes' => $this->getDefaultAttributes()));

            return $result;
        }

        return array();
    }

    public function getSettings($settings = array())
    {        
        $settings = array(
            'always_include_dimensions' => (bool) $this->getParam('always_include_dimensions', 1),
        );

        $params = $this->getParams()->get('imgmanager', []);

        $attributes = array();

        foreach($params as $name => $value) {
            if (strpos($name, 'attributes_') === 0) {
                $attr = substr($name, 11);
                $attributes[$attr] = (bool) $value;
            }
        }

        $settings['attributes'] = $attributes;

        return parent::getSettings($settings);
    }
}
plugins/imgmanager/imgmanager.xml000060400000037425152455721620013205 0ustar00<?xml version="1.0" encoding="utf-8"?>
<extension version="3.4" type="plugin" group="jce" method="upgrade">
    <name>WF_IMGMANAGER_TITLE</name>
    <version>2.9.99.2</version>
    <creationDate>22-04-2026</creationDate>
    <author>Ryan Demmer</author>
    <authorEmail>info@joomlacontenteditor.net</authorEmail>
    <authorUrl>https://www.joomlacontenteditor.net/</authorUrl>
    <copyright>Ryan Demmer</copyright>
    <license>GNU/GPL Version 2 or later - http://www.gnu.org/licenses/gpl-2.0.html</license>
    <description>WF_IMGMANAGER_DESC</description>
    <icon>imgmanager</icon>
    <files></files>

    <fields name="imgmanager">
        <fieldset name="config">

            <field name="dir" type="filesystempath" default="" size="50" label="WF_PARAM_DIRECTORY" description="WF_PARAM_DIRECTORY_DESC"/>
            <field name="max_size" class="input-small" hint="1024" max="" type="uploadmaxsize" step="128" label="WF_PARAM_UPLOAD_SIZE" description="WF_PARAM_UPLOAD_SIZE_DESC" />
            <field name="extensions" type="filetype" class="extensions" default="jpeg,jpg,png,apng,gif,webp,avif" label="WF_PARAM_EXTENSIONS" description="WF_PARAM_EXTENSIONS_DESC">
                <option value="jpeg">jpeg</option>
                <option value="jpg">jpg</option>
                <option value="png">png</option>
                <option value="apng">apng</option>
                <option value="gif">gif</option>
                <option value="webp">webp</option>
                <option value="avif">avif</option>
            </field>
            <field name="filesystem" type="filesystem" default="" label="WF_PARAM_FILESYSTEM" description="WF_PARAM_FILESYSTEM_DESC">
                <option value="">WF_OPTION_INHERIT</option>
            </field>

            <field name="always_include_dimensions" type="yesno" default="1" label="WF_IMGMANAGER_PARAM_ALWAYS_INCLUDE_DIMENSIONS" description="WF_IMGMANAGER_PARAM_ALWAYS_INCLUDE_DIMENSIONS_DESC">
                <option value="1">JYES</option>
                <option value="0">JNO</option>
            </field>

            <field name="custom_classes" type="repeatable" default="" label="WF_LABEL_CUSTOM_CLASSES" description="WF_LABEL_CUSTOM_CLASSES_DESC">
                <field type="text" size="50" hiddenLabel="true" />
            </field>

            <field name="basic_dialog" type="yesno" default="0" label="WF_PARAM_BASIC_DIALOG" description="WF_PARAM_BASIC_DIALOG_DESC" class="btn-group btn-group-yesno">
                <option value="1">JYES</option>
                <option value="0">JNO</option>
            </field>

            <field type="container" showon="basic_dialog:1">
                <field name="basic_dialog_filebrowser" type="yesno" default="1" label="WF_URL_FILE_BROWSER" description="WF_URL_FILE_BROWSER_DESC" class="btn-group btn-group-yesno">
                    <option value="1">JYES</option>
                    <option value="0">JNO</option>
                </field>
            </field>

            <fieldset name="defaults">
                <field type="heading" label="WF_PROFILES_PLUGINS_DEFAULTS" />

                <field name="margin_top" type="list" default="" class="editable" label="WF_PARAM_MARGIN_TOP" description="WF_PARAM_MARGIN_TOP_DESC">
                    <option value="">WF_OPTION_NOT_SET</option>
                    <option value="0">0</option>
                    <option value="1">1</option>
                    <option value="2">2</option>
                    <option value="3">3</option>
                    <option value="4">4</option>
                    <option value="5">5</option>
                    <option value="6">6</option>
                    <option value="7">7</option>
                    <option value="8">8</option>
                    <option value="9">9</option>
                    <option value="10">10</option>
                </field>

                <field name="margin_right" type="list" default="" class="editable" label="WF_PARAM_MARGIN_RIGHT" description="WF_PARAM_MARGIN_RIGHT_DESC">
                    <option value="">WF_OPTION_NOT_SET</option>
                    <option value="0">0</option>
                    <option value="1">1</option>
                    <option value="2">2</option>
                    <option value="3">3</option>
                    <option value="4">4</option>
                    <option value="5">5</option>
                    <option value="6">6</option>
                    <option value="7">7</option>
                    <option value="8">8</option>
                    <option value="9">9</option>
                    <option value="10">10</option>
                </field>

                <field name="margin_bottom" type="list" default="" class="editable" label="WF_PARAM_MARGIN_BOTTOM" description="WF_PARAM_MARGIN_BOTTOM_DESC">
                    <option value="">WF_OPTION_NOT_SET</option>
                    <option value="0">0</option>
                    <option value="1">1</option>
                    <option value="2">2</option>
                    <option value="3">3</option>
                    <option value="4">4</option>
                    <option value="5">5</option>
                    <option value="6">6</option>
                    <option value="7">7</option>
                    <option value="8">8</option>
                    <option value="9">9</option>
                    <option value="10">10</option>
                </field>

                <field name="margin_left" type="list" default="" class="editable" label="WF_PARAM_MARGIN_LEFT" description="WF_PARAM_MARGIN_LEFT_DESC">
                    <option value="">WF_OPTION_NOT_SET</option>
                    <option value="0">0</option>
                    <option value="1">1</option>
                    <option value="2">2</option>
                    <option value="3">3</option>
                    <option value="4">4</option>
                    <option value="5">5</option>
                    <option value="6">6</option>
                    <option value="7">7</option>
                    <option value="8">8</option>
                    <option value="9">9</option>
                    <option value="10">10</option>
                </field>

                <field name="border" type="yesno" default="0" label="WF_PARAM_BORDER_ENABLE" description="WF_PARAM_BORDER_ENABLE_DESC">
                    <option value="1">JYES</option>
                    <option value="0">JNO</option>
                </field>

                <field name="border_width" type="list" default="1" class="editable" label="WF_PARAM_BORDER_WIDTH" description="WF_PARAM_BORDER_WIDTH_DESC">
                    <option value="inherit">WF_OPTION_NOT_SET</option>
                    <option value="0">0</option>
                    <option value="1">1</option>
                    <option value="2">2</option>
                    <option value="3">3</option>
                    <option value="4">4</option>
                    <option value="5">5</option>
                    <option value="6">6</option>
                    <option value="7">7</option>
                    <option value="8">8</option>
                    <option value="9">9</option>
                    <option value="thin">WF_OPTION_BORDER_THIN</option>
                    <option value="medium">WF_OPTION_BORDER_MEDIUM</option>
                    <option value="thick">WF_OPTION_BORDER_THICK</option>
                </field>

                <field name="border_style" type="list" default="solid" label="WF_PARAM_BORDER_STYLE" description="WF_PARAM_BORDER_STYLE_DESC">
                    <option value="inherit">WF_OPTION_NOT_SET</option>
                    <option value="none">JNONE</option>
                    <option value="solid">WF_OPTION_BORDER_SOLID</option>
                    <option value="dashed">WF_OPTION_BORDER_DASHED</option>
                    <option value="dotted">WF_OPTION_BORDER_DOTTED</option>
                    <option value="double">WF_OPTION_BORDER_DOUBLE</option>
                    <option value="groove">WF_OPTION_BORDER_GROOVE</option>
                    <option value="inset">WF_OPTION_BORDER_INSET</option>
                    <option value="outset">WF_OPTION_BORDER_OUTSET</option>
                    <option value="ridge">WF_OPTION_BORDER_RIDGE</option>
                </field>

                <field name="border_color" type="color" class="color" size="10" default="#000000" label="WF_PARAM_BORDER_COLOR" description="WF_PARAM_BORDER_COLOR_DESC"/>

                <field name="align" type="list" default="" label="WF_PARAM_ALIGN_DEFAULT" description="WF_PARAM_ALIGN_DEFAULT_DESC">
                    <option value="">WF_OPTION_NOT_SET</option>
                    <option value="left">WF_OPTION_ALIGN_LEFT</option>
                    <option value="center">WF_OPTION_ALIGN_CENTER</option>
                    <option value="right">WF_OPTION_ALIGN_RIGHT</option>
                    <option value="top">WF_OPTION_ALIGN_TOP</option>
                    <option value="middle">WF_OPTION_ALIGN_MIDDLE</option>
                    <option value="bottom">WF_OPTION_ALIGN_BOTTOM</option>
                </field>

                <field name="style" type="text" default="" size="50" label="WF_LABEL_STYLE" description="WF_LABEL_STYLE_DESC" />
                <field name="classes" type="text" default="" size="50" label="WF_LABEL_CLASSES" description="WF_LABEL_CLASSES_DESC" />
                <field name="title" type="text" default="" size="50" label="WF_LABEL_TITLE" description="WF_LABEL_TITLE_DESC" />
                <field name="id" type="text" default="" size="50" label="WF_LABEL_ID" description="WF_LABEL_ID_DESC" />
                <field name="direction" type="list" default="" label="WF_LABEL_DIR" description="WF_LABEL_DIR_DESC">
                    <option value="">WF_OPTION_NOT_SET</option>
                    <option value="ltr">WF_OPTION_LTR</option>
                    <option value="rtl">WF_OPTION_RTL</option>
                </field>
                <field name="usemap" type="text" default="" size="50" label="WF_LABEL_USEMAP" description="WF_LABEL_USEMAP_DESC" />
                <field name="longdesc" type="browser" default="" size="50" class="browser" label="WF_LABEL_LONGDESC" description="WF_LABEL_LONGDESC_DESC" />

                <field name="loading" type="list" default="" label="WF_LABEL_LOADING" description="WF_LABEL_LOADING_DESC">
                    <option value="">WF_OPTION_NOT_SET</option>
                    <option value="lazy">WF_OPTION_LOADING_LAZY</option>
                    <option value="eager">WF_OPTION_LOADING_EAGER</option>
                </field>

                <field name="attributes" type="keyvalue" default="" label="WF_PARAM_CUSTOM_ATTRIBUTES" description="WF_PARAM_CUSTOM_ATTRIBUTES_DESC" boolean="true" />

            </fieldset>

            <field type="heading" label="WF_PROFILES_PLUGINS_ACCESS" />

            <field type="container" showon="basic_dialog:0">
                <field name="tabs_rollover" type="yesno" default="1" label="WF_IMGMANAGER_PARAM_TAB_ROLLOVER" description="WF_IMGMANAGER_PARAM_TAB_ROLLOVER_DESC">
                    <option value="1">JYES</option>
                    <option value="0">JNO</option>
                </field>
                <field name="tabs_advanced" type="yesno" default="1" label="WF_IMGMANAGER_PARAM_TAB_ADVANCED" description="WF_IMGMANAGER_PARAM_TAB_ADVANCED_DESC">
                    <option value="1">JYES</option>
                    <option value="0">JNO</option>
                </field>
                <field name="attributes_dimensions" type="yesno" default="1" label="WF_IMGMANAGER_SHOW_DIMENSIONS" description="WF_IMGMANAGER_SHOW_DIMENSIONS_DESC">
                    <option value="1">JYES</option>
                    <option value="0">JNO</option>
                </field>
                <field name="attributes_align" type="yesno" default="1" label="WF_IMGMANAGER_SHOW_ALIGN" description="WF_IMGMANAGER_SHOW_ALIGN_DESC">
                    <option value="1">JYES</option>
                    <option value="0">JNO</option>
                </field>
                <field name="attributes_margin" type="yesno" default="1" label="WF_IMGMANAGER_SHOW_MARGIN" description="WF_IMGMANAGER_SHOW_MARGIN_DESC">
                    <option value="1">JYES</option>
                    <option value="0">JNO</option>
                </field>
                <field name="attributes_border" type="yesno" default="1" label="WF_IMGMANAGER_SHOW_BORDER" description="WF_IMGMANAGER_SHOW_BORDER_DESC">
                    <option value="1">JYES</option>
                    <option value="0">JNO</option>
                </field>
            </field>

            <field name="attributes_classes" type="yesno" default="1" label="WF_IMGMANAGER_SHOW_CLASSES" description="WF_IMGMANAGER_SHOW_CLASSES_DESC">
                <option value="1">JYES</option>
                <option value="0">JNO</option>
            </field>

            <field name="help_button" type="yesno" default="1" label="WF_PARAM_HELP_BUTTON" description="WF_PARAM_HELP_BUTTON_DESC">
                <option value="1">JYES</option>
                <option value="0">JNO</option>
            </field>

            <field name="upload" type="yesno" default="1" label="WF_PARAM_UPLOAD" description="WF_PARAM_UPLOAD_DESC">
                <option value="1">JYES</option>
                <option value="0">JNO</option>
            </field>
            <field name="folder_new" type="yesno" default="1" label="WF_PARAM_FOLDER_CREATE" description="WF_PARAM_FOLDER_CREATE_DESC">
                <option value="1">JYES</option>
                <option value="0">JNO</option>
            </field>
            <field name="folder_delete" type="yesno" default="1" label="WF_PARAM_FOLDER_DELETE" description="WF_PARAM_FOLDER_DELETE_DESC">
                <option value="1">JYES</option>
                <option value="0">JNO</option>
            </field>
            <field name="folder_rename" type="yesno" default="1" label="WF_PARAM_FOLDER_RENAME" description="WF_PARAM_FOLDER_RENAME_DESC">
                <option value="1">JYES</option>
                <option value="0">JNO</option>
            </field>
            <field name="folder_move" type="yesno" default="1" label="WF_PARAM_FOLDER_PASTE" description="WF_PARAM_FOLDER_PASTE_DESC">
                <option value="1">JYES</option>
                <option value="0">JNO</option>
            </field>
            <field name="file_delete" type="yesno" default="1" label="WF_PARAM_FILE_DELETE" description="WF_PARAM_FILE_DELETE_DESC">
                <option value="1">JYES</option>
                <option value="0">JNO</option>
            </field>
            <field name="file_rename" type="yesno" default="1" label="WF_PARAM_FILE_RENAME" description="WF_PARAM_FILE_RENAME_DESC">
                <option value="1">JYES</option>
                <option value="0">JNO</option>
            </field>
            <field name="file_move" type="yesno" default="1" label="WF_PARAM_FILE_PASTE" description="WF_PARAM_FILE_PASTE_DESC">
                <option value="1">JYES</option>
                <option value="0">JNO</option>
            </field>

            <field name="inline_upload" type="yesno" default="1" label="WF_PARAM_INLINE_UPLOAD" description="WF_PARAM_INLINE_UPLOAD_DESC">
                <option value="1">JYES</option>
                <option value="0">JNO</option>
            </field>
        </fieldset>
    </fields>
    <languages>
        <language tag="en-GB">en-GB.WF_imgmanager.ini</language>
    </languages>
    <help>
        <topic key="imgmanager.about" title="WF_IMGMANAGER_HELP_ABOUT" />
        <topic key="imgmanager.interface" title="WF_IMGMANAGER_HELP_INTERFACE" />
        <topic key="imgmanager.rollover" title="WF_IMGMANAGER_HELP_ROLLOVER" />
        <topic key="imgmanager.advanced" title="WF_IMGMANAGER_HELP_ADVANCED" />
        <topic key="imgmanager.insert" title="WF_IMGMANAGER_HELP_INSERT" />
        <topic file="libraries/xml/help/manager.xml" />
    </help>
</extension>
plugins/imgmanager/index.html000060400000000054152455721620012335 0ustar00<html><body bgcolor="#FFFFFF"></body></html>plugins/imgmanager/config.php000060400000003037152455721620012322 0ustar00<?php
/**
 * @package     JCE
 * @subpackage  Editor
 *
 * @copyright   Copyright (c) 2009-2024 Ryan Demmer. All rights reserved
 * @license     GNU General Public License version 2 or later; see LICENSE.txt
 */

\defined('_JEXEC') or die;

class WFImgmanagerPluginConfig
{
    public static function getConfig(&$settings)
    {
        require_once __DIR__ . '/imgmanager.php';

        $plugin = new WFImgmanagerPlugin();

        $config = array();

        $filetypes = $plugin->getFileTypes();

        if ($plugin->getParam('upload', 1)) {
            $config['upload'] = array(
                'max_size' => $plugin->getParam('max_size', 1024),
                'filetypes' => $filetypes,
                'inline' => $plugin->getParam('inline_upload', 1),
            );
        }

        if ($plugin->getParam('basic_dialog', 0) == 1) {
            $config['basic_dialog'] = true;

            if ($plugin->getParam('basic_dialog_filebrowser', 1) == 1) {
                $config['basic_dialog_filebrowser'] = true;
                $config['filetypes'] = $filetypes;
            }

            $config['basic_dialog_classes'] = (bool) $plugin->getParam('attributes_classes', 1);

            $config['always_include_dimensions'] = (bool) $plugin->getParam('always_include_dimensions', 1);
        }

        $config['attributes'] = $plugin->getDefaultAttributes();

        $custom_classes = (array) $plugin->getParam('custom_classes', []);
        $config['custom_classes'] = array_filter($custom_classes);

        $settings['imgmanager'] = $config;
    }
}
plugins/imgmanager/tmpl/advanced.php000060400000013331152455721620013574 0ustar00<?php
/**
 * @package     JCE
 * @subpackage  Editor
 *
 * @copyright   Copyright (c) 2009-2024 Ryan Demmer. All rights reserved
 * @license     GNU General Public License version 2 or later; see LICENSE.txt
 */

\defined('_JEXEC') or die;

use Joomla\CMS\Language\Text;

?>
<div class="uk-form-row uk-grid uk-grid-small">
    <label for="style" class="hastip uk-form-label uk-width-1-1 uk-width-small-3-10" title="<?php echo Text::_('WF_LABEL_STYLE_DESC'); ?>"><?php echo Text::_('WF_LABEL_STYLE'); ?></label>
    <div class="uk-form-controls uk-width-1-1 uk-width-small-7-10"><input id="style" type="text" value="" /></div>
</div>
<div class="uk-form-row uk-grid uk-grid-small" id="attributes-classes">
    <label for="classlist" class="hastip uk-form-label uk-width-1-1 uk-width-small-3-10" title="<?php echo Text::_('WF_LABEL_CLASSES_DESC'); ?>"><?php echo Text::_('WF_LABEL_CLASSES'); ?></label>
    <div class="uk-form-controls uk-width-1-1 uk-width-small-7-10">
        <input type="text" id="classes" class="uk-datalist" multiple="multiple" list="classes_datalist" />
        <datalist id="classes_datalist"></datalist>
    </div>
</div>
<div class="uk-form-row uk-grid uk-grid-small">
    <label for="title" class="hastip uk-form-label uk-width-1-1 uk-width-small-3-10" title="<?php echo Text::_('WF_LABEL_TITLE_DESC'); ?>"><?php echo Text::_('WF_LABEL_TITLE'); ?></label>
    <div class="uk-form-controls uk-width-1-1 uk-width-small-7-10"><input id="title" type="text" value="" /></div>
</div>
<div class="uk-form-row uk-grid uk-grid-small">
    <label for="id" class="hastip uk-form-label uk-width-1-1 uk-width-small-3-10" title="<?php echo Text::_('WF_LABEL_ID_DESC'); ?>"><?php echo Text::_('WF_LABEL_ID'); ?></label>
    <div class="uk-form-controls uk-width-1-1 uk-width-small-7-10"><input id="id" type="text" value="" /></div>
</div>

<div class="uk-form-row uk-grid uk-grid-small">
    <label for="dir" class="hastip uk-form-label uk-width-1-1 uk-width-small-3-10" title="<?php echo Text::_('WF_LABEL_DIR_DESC'); ?>"><?php echo Text::_('WF_LABEL_DIR'); ?></label>
    <div class="uk-form-controls uk-width-1-1 uk-width-small-7-10">
        <select id="dir">
            <option value=""><?php echo Text::_('WF_OPTION_NOT_SET'); ?></option>
            <option value="ltr"><?php echo Text::_('WF_OPTION_LTR'); ?></option>
            <option value="rtl"><?php echo Text::_('WF_OPTION_RTL'); ?></option>
        </select>
    </div>
</div>

<div class="uk-form-row uk-grid uk-grid-small">
    <label for="lang" class="hastip uk-form-label uk-width-1-1 uk-width-small-3-10" title="<?php echo Text::_('WF_LABEL_LANG_DESC'); ?>"><?php echo Text::_('WF_LABEL_LANG'); ?></label>
    <div class="uk-form-controls uk-width-1-1 uk-width-small-7-10"><input id="lang" type="text" value="" /></div>
</div>

<div class="uk-form-row uk-grid uk-grid-small">
    <label for="usemap" class="hastip uk-form-label uk-width-1-1 uk-width-small-3-10" title="<?php echo Text::_('WF_LABEL_USEMAP_DESC'); ?>"><?php echo Text::_('WF_LABEL_USEMAP'); ?></label>
    <div class="uk-form-controls uk-width-1-1 uk-width-small-7-10"><input id="usemap" type="text" value="" /></div>
</div>

<div class="uk-form-row uk-grid uk-grid-small html4">
    <label for="longdesc" class="hastip uk-form-label uk-width-1-1 uk-width-small-3-10" title="<?php echo Text::_('WF_LABEL_LONGDESC_DESC'); ?>"><?php echo Text::_('WF_LABEL_LONGDESC'); ?></label>
    <div class="uk-form-controls uk-width-1-1 uk-width-small-7-10"><input id="longdesc" type="text" value="" class="browser html" /></div>
</div>

<div class="uk-form-row uk-grid uk-grid-small">
    <label for="loading" class="hastip uk-form-label uk-width-1-1 uk-width-small-3-10" title="<?php echo Text::_('WF_LABEL_LOADING_DESC'); ?>"><?php echo Text::_('WF_LABEL_LOADING'); ?></label>
    <div class="uk-form-controls uk-width-1-1 uk-width-small-7-10">
        <select id="loading">
            <option value=""><?php echo Text::_('WF_OPTION_NOT_SET'); ?></option>
            <option value="lazy"><?php echo Text::_('WF_OPTION_LOADING_LAZY'); ?></option>
            <option value="eager"><?php echo Text::_('WF_OPTION_LOADING_EAGER'); ?></option>
        </select>
    </div>
</div>

<div class="uk-form-row uk-grid uk-grid-small">
    <label for="custom_attributes" class="uk-form-label uk-width-1-1 uk-width-small-3-10"><?php echo Text::_('WF_LABEL_ATTRIBUTES'); ?></label>
    
    <div class="uk-form-controls uk-width-1-1 uk-width-small-7-10 uk-flex-wrap" id="custom_attributes">
        <div class="uk-form-row uk-repeatable uk-width-1-1">
            <div class="uk-form-controls uk-grid uk-grid-small uk-width-9-10">
                <label class="uk-form-label uk-width-1-1 uk-width-small-1-10"><?php echo Text::_('WF_LABEL_NAME'); ?></label>
                <div class="uk-form-controls uk-width-1-1 uk-width-small-4-10">
                    <input type="text" name="custom_attributes_name[]" />
                </div>
                <label class="uk-form-label uk-width-1-1 uk-width-small-1-10"><?php echo Text::_('WF_LABEL_VALUE'); ?></label>
                <div class="uk-form-controls uk-width-1-1 uk-width-small-4-10">
                    <input type="text" name="custom_attributes_value[]" />
                </div>
            </div>
            <div class="uk-form-controls uk-width-1-10 uk-margin-small-left">
                <button class="uk-button uk-button-link uk-repeatable-create" aria-label="<?php echo Text::_('WF_LABEL_ADD'); ?>" title="<?php echo Text::_('WF_LABEL_ADD'); ?>"><i class="uk-icon-plus"></i></button>
                <button class="uk-button uk-button-link uk-repeatable-delete" aria-label="<?php echo Text::_('WF_LABEL_REMOVE'); ?>" title="<?php echo Text::_('WF_LABEL_REMOVE'); ?>"><i class="uk-icon-trash"></i></button>
            </div>
        </div>
    </div>
</div>plugins/imgmanager/tmpl/index.html000060400000000054152455721620013311 0ustar00<html><body bgcolor="#FFFFFF"></body></html>plugins/imgmanager/tmpl/image.php000060400000026013152455721620013112 0ustar00<?php
/**
 * @package     JCE
 * @subpackage  Editor
 *
 * @copyright   Copyright (c) 2009-2024 Ryan Demmer. All rights reserved
 * @license     GNU General Public License version 2 or later; see LICENSE.txt
 */

\defined('_JEXEC') or die;

use Joomla\CMS\Language\Text;

?>
<div class="uk-grid uk-grid-small">
    <div class="uk-width-1-1 uk-width-medium-4-5 uk-flex-item-auto">
        <div class="uk-form-row uk-grid uk-grid-small">
            <label for="src" class="hastip uk-form-label uk-width-1-1 uk-width-small-1-5" title="<?php echo Text::_('WF_LABEL_URL_DESC'); ?>">
                <?php echo Text::_('WF_LABEL_URL'); ?>
            </label>
            <div class="uk-form-controls uk-width-1-1 uk-width-small-4-5">
                <input type="text" id="src" value="" class="filebrowser" data-filebrowser required />
            </div>
        </div>
        <div class="uk-form-row uk-grid uk-grid-small">
            <label for="alt" class="hastip uk-form-label uk-width-1-1 uk-width-small-1-5" title="<?php echo Text::_('WF_LABEL_ALT_DESC'); ?>">
                <?php echo Text::_('WF_LABEL_ALT'); ?>
            </label>
            <div class="uk-form-controls uk-width-1-1 uk-width-small-4-5">
                <input type="text" id="alt" value="" />
            </div>
        </div>

        <div class="uk-form-row uk-grid uk-grid-small" id="attributes-dimensions">
            <label class="hastip uk-form-label uk-width-1-1 uk-width-small-1-5" title="<?php echo Text::_('WF_LABEL_DIMENSIONS_DESC'); ?>">
                <?php echo Text::_('WF_LABEL_DIMENSIONS'); ?>
            </label>
            <div class="uk-form-control uk-width-1-1 uk-width-small-4-5 uk-form-constrain uk-flex">

                <div class="uk-form-controls">
                    <input type="text" id="width" value="" class="uk-text-muted" aria-label="<?php echo Text::_('WF_LABEL_WIDTH'); ?>" />
                </div>

                <div class="uk-form-controls">
                    <strong class="uk-form-label uk-text-center uk-vertical-align-middle" role="presentation">&times;</strong>
                </div>

                <div class="uk-form-controls">
                    <input type="text" id="height" value="" class="uk-text-muted" aria-label="<?php echo Text::_('WF_LABEL_HEIGHT'); ?>" />
                </div>

                <label class="uk-form-label">
                    <input class="uk-constrain-checkbox" type="checkbox" checked aria-label="<?php echo Text::_('WF_LABEL_PROPORTIONAL'); ?>" />
                    <?php echo Text::_('WF_LABEL_PROPORTIONAL'); ?>
                </label>
            </div>
        </div>

        <div class="uk-hidden-mini uk-grid uk-grid-small uk-form-row" id="attributes-align">
            <label for="align" class="hastip uk-form-label uk-width-1-5" title="<?php echo Text::_('WF_LABEL_ALIGN_DESC'); ?>">
                <?php echo Text::_('WF_LABEL_ALIGN'); ?>
            </label>
            <div class="uk-grid uk-grid-small uk-form-row uk-width-4-5">
                <div class="uk-width-1-2">
                    <div class="uk-form-controls uk-width-9-10">
                        <select id="align">
                            <option value=""><?php echo Text::_('WF_OPTION_NOT_SET'); ?></option>
                            <optgroup label="------------">
                                <option value="left"><?php echo Text::_('WF_OPTION_ALIGN_LEFT'); ?></option>
                                <option value="center"><?php echo Text::_('WF_OPTION_ALIGN_CENTER'); ?></option>
                                <option value="right"><?php echo Text::_('WF_OPTION_ALIGN_RIGHT'); ?></option>
                            </optgroup>
                            <optgroup label="------------">
                                <option value="top"><?php echo Text::_('WF_OPTION_ALIGN_TOP'); ?></option>
                                <option value="middle"><?php echo Text::_('WF_OPTION_ALIGN_MIDDLE'); ?></option>
                                <option value="bottom"><?php echo Text::_('WF_OPTION_ALIGN_BOTTOM'); ?></option>
                            </optgroup>
                        </select>
                    </div>
                </div>
                <div class="uk-width-1-2 uk-hidden-mini">
                    <label for="clear" class="hastip uk-form-label uk-width-3-10" title="<?php echo Text::_('WF_LABEL_CLEAR_DESC'); ?>" aria-label="<?php echo Text::_('WF_LABEL_CLEAR_DESC'); ?>">
                        <?php echo Text::_('WF_LABEL_CLEAR'); ?>
                    </label>
                    <div class="uk-form-controls uk-width-7-10">
                        <select id="clear" disabled>
                            <option value=""><?php echo Text::_('WF_OPTION_NOT_SET'); ?></option>
                            <option value="none"><?php echo Text::_('WF_OPTION_CLEAR_NONE'); ?></option>
                            <option value="both"><?php echo Text::_('WF_OPTION_CLEAR_BOTH'); ?></option>
                            <option value="left"><?php echo Text::_('WF_OPTION_CLEAR_LEFT'); ?></option>
                            <option value="right"><?php echo Text::_('WF_OPTION_CLEAR_RIGHT'); ?></option>
                        </select>
                    </div>
                </div>
            </div>
        </div>

        <div class="uk-hidden-mini uk-grid uk-grid-small uk-form-row" id="attributes-margin">
            <label for="margin" class="hastip uk-form-label uk-width-1-5" title="<?php echo Text::_('WF_LABEL_MARGIN_DESC'); ?>">
                <?php echo Text::_('WF_LABEL_MARGIN'); ?>
            </label>
            <div class="uk-form-controls uk-width-4-5 uk-grid uk-grid-small uk-form-equalize">

                <label for="margin_top" class="uk-form-label">
                    <?php echo Text::_('WF_OPTION_TOP'); ?>
                </label>
                <div class="uk-form-controls">
                    <input type="text" id="margin_top" value="" />
                </div>

                <label for="margin_right" class="uk-form-label">
                    <?php echo Text::_('WF_OPTION_RIGHT'); ?>
                </label>
                <div class="uk-form-controls">
                    <input type="text" id="margin_right" value="" />
                </div>

                <label for="margin_bottom" class="uk-form-label">
                    <?php echo Text::_('WF_OPTION_BOTTOM'); ?>
                </label>
                <div class="uk-form-controls">
                    <input type="text" id="margin_bottom" value="" />
                </div>

                <label for="margin_left" class="uk-form-label">
                    <?php echo Text::_('WF_OPTION_LEFT'); ?>
                </label>
                <div class="uk-form-controls">
                    <input type="text" id="margin_left" value="" />
                </div>
                <label class="uk-form-label">
                    <input type="checkbox" class="uk-equalize-checkbox" aria-label="<?php echo Text::_('WF_LABEL_EQUAL'); ?>" />
                    <?php echo Text::_('WF_LABEL_EQUAL'); ?>
                </label>
            </div>
        </div>

        <div class="uk-hidden-mini uk-grid uk-grid-small uk-form-row" id="attributes-border">
            <label for="border" class="hastip uk-form-label uk-width-1-5" title="<?php echo Text::_('WF_LABEL_BORDER_DESC'); ?>">
                <?php echo Text::_('WF_LABEL_BORDER'); ?>
            </label>

            <div class="uk-form-controls uk-grid uk-grid-small uk-width-4-5">
                <div class="uk-form-controls uk-width-0-3">
                    <input type="checkbox" id="border" aria-label="<?php echo Text::_('WF_LABEL_BORDER_ENABLE'); ?>" />
                </div>

                <label for="border_width" class="hastip uk-form-label uk-width-1-10 uk-margin-small-left" title="<?php echo Text::_('WF_LABEL_BORDER_WIDTH_DESC'); ?>"><?php echo Text::_('WF_LABEL_WIDTH'); ?></label>
                <div class="uk-form-controls uk-width-2-10">
                    <input type="text" pattern="[0-9]+" id="border_width" class="uk-datalist" list="border_width_datalist" />
                    <datalist id="border_width_datalist">
                        <option value="">--</option>
                        <option value="0">0</option>
                        <option value="1">1</option>
                        <option value="2">2</option>
                        <option value="3">3</option>
                        <option value="4">4</option>
                        <option value="5">5</option>
                        <option value="6">6</option>
                        <option value="7">7</option>
                        <option value="8">8</option>
                        <option value="9">9</option>
                        <option value="thin"><?php echo Text::_('WF_OPTION_BORDER_THIN'); ?></option>
                        <option value="medium"><?php echo Text::_('WF_OPTION_BORDER_MEDIUM'); ?></option>
                        <option value="thick"><?php echo Text::_('WF_OPTION_BORDER_THICK'); ?></option>
                    </datalist>
                </div>

                <label for="border_style" class="hastip uk-form-label uk-width-1-10 uk-margin-small-left" title="<?php echo Text::_('WF_LABEL_BORDER_STYLE_DESC'); ?>"><?php echo Text::_('WF_LABEL_STYLE'); ?></label>
                <div class="uk-form-controls uk-width-2-10">
                    <select id="border_style">
                        <option value="inherit">--</option>
                        <option value="none"><?php echo Text::_('WF_OPTION_BORDER_NONE'); ?></option>
                        <option value="solid"><?php echo Text::_('WF_OPTION_BORDER_SOLID'); ?></option>
                        <option value="dashed"><?php echo Text::_('WF_OPTION_BORDER_DASHED'); ?></option>
                        <option value="dotted"><?php echo Text::_('WF_OPTION_BORDER_DOTTED'); ?></option>
                        <option value="double"><?php echo Text::_('WF_OPTION_BORDER_DOUBLE'); ?></option>
                        <option value="groove"><?php echo Text::_('WF_OPTION_BORDER_GROOVE'); ?></option>
                        <option value="inset"><?php echo Text::_('WF_OPTION_BORDER_INSET'); ?></option>
                        <option value="outset"><?php echo Text::_('WF_OPTION_BORDER_OUTSET'); ?></option>
                        <option value="ridge"><?php echo Text::_('WF_OPTION_BORDER_RIDGE'); ?></option>
                    </select>
                </div>

                <label for="border_color" class="hastip uk-form-label uk-width-1-10 uk-margin-small-left" title="<?php echo Text::_('WF_LABEL_BORDER_COLOR_DESC'); ?>"><?php echo Text::_('WF_LABEL_COLOR'); ?></label>
                <div class="uk-form-controls uk-width-2-10">
                    <input id="border_color" class="color" type="text" value="#000000" />
                </div>
            </div>
        </div>
    </div>
    <div class="uk-width-1-5 uk-hidden-small">
        <div class="preview">
            <img id="sample" src="<?php echo $this->plugin->image('sample.jpg', 'media'); ?>" alt="sample.jpg" />
            <?php echo Text::_('WF_LOREM_IPSUM'); ?>
        </div>
    </div>
</div>plugins/imgmanager/tmpl/rollover.php000060400000002100152455721620013663 0ustar00<?php
/**
 * @package     JCE
 * @subpackage  Editor
 *
 * @copyright   Copyright (c) 2009-2024 Ryan Demmer. All rights reserved
 * @license     GNU General Public License version 2 or later; see LICENSE.txt
 */

\defined('_JEXEC') or die;

use Joomla\CMS\Language\Text;

?>
<div class="uk-form-row uk-grid uk-grid-small">
	<label for="onmouseover" class="hastip uk-form-label uk-width-1-1 uk-width-small-3-10" title="<?php echo Text::_('WF_LABEL_MOUSEOVER_DESC'); ?>">
		<?php echo Text::_('WF_LABEL_MOUSEOVER'); ?>
	</label>
	<div class="uk-form-controls uk-width-1-1 uk-width-small-7-10 uk-input-clear">
		<input id="onmouseover" type="text" value="" class="focus" />
	</div>
</div>
<div class="uk-form-row uk-grid uk-grid-small">
	<label for="onmouseout" class="hastip uk-form-label uk-width-1-1 uk-width-small-3-10" title="<?php echo Text::_('WF_LABEL_MOUSEOUT_DESC'); ?>">
		<?php echo Text::_('WF_LABEL_MOUSEOUT'); ?>
	</label>
	<div class="uk-form-controls uk-width-1-1 uk-width-small-7-10 uk-input-clear">
		<input id="onmouseout" type="text" value="" autofocus />
	</div>
</div>plugins/styleselect/index.html000060400000000054152455721620012566 0ustar00<html><body bgcolor="#FFFFFF"></body></html>plugins/styleselect/styleselect.xml000060400000002351152455721620013655 0ustar00<?xml version="1.0" ?>
<extension type="plugin" group="jce" method="upgrade">
    <name>WF_STYLESELECT_TITLE</name>
    <version>2.9.99.2</version>
    <creationDate>22-04-2026</creationDate>
    <author>Ryan Demmer</author>
    <authorEmail>info@joomlacontenteditor.net</authorEmail>
    <authorUrl>https://www.joomlacontenteditor.net/</authorUrl>
    <copyright>Ryan Demmer</copyright>
    <license>GNU/GPL Version 2 or later - http://www.gnu.org/licenses/gpl-2.0.html</license>
    <description>WF_STYLESELECT_DESC</description>
    <icon>styleselect</icon>
    <fields name="styleselect">
        <fieldset name="config">
            <field name="sort" type="yesno" default="1" label="WF_STYLESELECT_STYLES_SORT" description="WF_STYLESELECT_STYLES_SORT_DESC">
                <option value="1">JYES</option>
                <option value="0">JNO</option>
            </field>

            <field name="preview_styles" type="yesno" default="1" label="WF_STYLESELECT_STYLES_PREVIEW_STYLES" description="WF_STYLESELECT_STYLES_PREVIEW_STYLES_DESC">
                <option value="1">JYES</option>
                <option value="0">JNO</option>
            </field>
        </fieldset>
    </fields>
    <help></help>
    <languages></languages>
</extension>plugins/styleselect/config.php000060400000001146152455721620012552 0ustar00<?php
/**
 * @package     JCE
 * @subpackage  Editor
 *
 * @copyright   Copyright (c) 2009-2024 Ryan Demmer. All rights reserved
 * @license     GNU General Public License version 2 or later; see LICENSE.txt
 */

\defined('_JEXEC') or die;

use Joomla\CMS\Factory;
use Joomla\CMS\Uri\Uri;

class WFStyleselectPluginConfig
{
    public static function getConfig(&$settings)
    {
        $wf = WFApplication::getInstance();

        $settings['styleselect_sort'] = $wf->getParam('styleselect.sort', 1, 1);
        $settings['styleselect_preview_styles'] = $wf->getParam('styleselect.preview_styles', 1, 1);
    }
}
plugins/ui/config.php000060400000001175152455721620010631 0ustar00<?php
/**
 * @package     JCE
 * @subpackage  Editor
 *
 * @copyright   Copyright (c) 2009-2024 Ryan Demmer. All rights reserved
 * @license     GNU General Public License version 2 or later; see LICENSE.txt
 */

\defined('_JEXEC') or die;

class WFUiPluginConfig
{
    public static function getConfig(&$settings)
    {
        $wf = WFApplication::getInstance();
        $settings['object_resizing'] = $wf->getParam('editor.object_resizing', 1);

        if ((int) $settings['object_resizing'] === 0) {
            $settings['object_resizing'] = false;
        } else {
            $settings['object_resizing'] = '';
        }
    }
}
plugins/ui/index.html000060400000000054152455721620010643 0ustar00<html><body bgcolor="#FFFFFF"></body></html>plugins/spellchecker/index.html000060400000000054152455721620012672 0ustar00<html><body bgcolor="#FFFFFF"></body></html>plugins/spellchecker/classes/spellchecker.php000060400000003225152455721620015512 0ustar00<?php
/**
 * @author Moxiecode
 * @copyright Copyright (c) 2004-2007, Moxiecode Systems AB, All rights reserved
 */
class SpellChecker
{
    public function __construct()
    {
    }

    /**
     * Constructor.
     *
     * @param $config Configuration name/value array
     */
    public function SpellChecker(&$config)
    {
        $this->_config = $config;
    }

    /**
     * Simple loopback function everything that gets in will be send back.
     *
     * @param $args.. Arguments
     *
     * @return {Array} Array of all input arguments
     */
    protected function loopback( /* args.. */)
    {
        return func_get_args();
    }

    /**
     * Spellchecks an array of words.
     *
     * @param {String} $lang  Language code like sv or en
     * @param {Array}  $words Array of words to spellcheck
     *
     * @return {Array} Array of misspelled words
     */
    public function checkWords($lang, $words)
    {
        return $words;
    }

    /**
     * Returns suggestions of for a specific word.
     *
     * @param {String} $lang Language code like sv or en
     * @param {String} $word Specific word to get suggestions for
     *
     * @return {Array} Array of suggestions for the specified word
     */
    public function getSuggestions($lang, $word)
    {
        return array();
    }

    /**
     * Throws an error message back to the user. This will stop all execution.
     *
     * @param {String} $str Message to send back to user
     */
    protected function throwError($str)
    {
        die('{"result":null,"id":null,"error":{"errstr":"' . addslashes($str) . '","errfile":"","errline":null,"errcontext":"","level":"FATAL"}}');
    }
}
plugins/spellchecker/classes/enchantspell.php000060400000004361152455721620015530 0ustar00<?php

/**
 * @copyright     Copyright (c) 2009-2022 Ryan Demmer. All rights reserved
 * @license       GNU/GPL 2 or later - http://www.gnu.org/licenses/old-licenses/gpl-2.0.html
 * JCE is free software. This version may have been modified pursuant
 * to the GNU General Public License, and as distributed it includes or
 * is derivative of works licensed under the GNU General Public License or
 * other free or open source software licenses
 */

require_once __DIR__ . '/spellchecker.php';

class Enchantspell extends SpellChecker
{
    /**
     * Spellchecks an array of words.
     *
     * @param string $lang  Selected language code (like en_US or de_DE). Shortcodes like "en" and "de" work with enchant >= 1.4.1
     * @param array  $words Array of words to check
     *
     * @return array of misspelled words
     */
    public function checkWords($lang, $words)
    {
        $r = enchant_broker_init();

        if (enchant_broker_dict_exists($r, $lang)) {
            $d = enchant_broker_request_dict($r, $lang);

            $returnData = array();
            foreach ($words as $key => $value) {
                $correct = enchant_dict_check($d, $value);
                if (!$correct) {
                    $returnData[] = trim($value);
                }
            }

            return $returnData;
            enchant_broker_free_dict($d);
        } else {
            $this->throwError('Language not installed');
        }
        enchant_broker_free($r);
    }

    /**
     * Returns suggestions for a specific word.
     *
     * @param string $lang Selected language code (like en_US or de_DE). Shortcodes like "en" and "de" work with enchant >= 1.4.1
     * @param string $word Specific word to get suggestions for
     *
     * @return array of suggestions for the specified word
     */
    public function getSuggestions($lang, $word)
    {
        $r = enchant_broker_init();
        $suggs = array();

        if (enchant_broker_dict_exists($r, $lang)) {
            $d = enchant_broker_request_dict($r, $lang);
            $suggs = enchant_dict_suggest($d, $word);

            enchant_broker_free_dict($d);
        } else {
            $this->throwError('Language not installed');
        }
        enchant_broker_free($r);

        return $suggs;
    }
}
plugins/spellchecker/classes/index.html000060400000000054152455721620014327 0ustar00<html><body bgcolor="#FFFFFF"></body></html>plugins/spellchecker/classes/pspell.php000060400000004645152455721620014354 0ustar00<?php

require_once __DIR__ . '/spellchecker.php';

/**
 * @author Moxiecode
 * @copyright Copyright (c) 2004-2007, Moxiecode Systems AB, All rights reserved
 */
class Pspell extends SpellChecker
{
    /**
     * Spellchecks an array of words.
     *
     * @param {String} $lang  Language code like sv or en
     * @param {Array}  $words Array of words to spellcheck
     *
     * @return {Array} Array of misspelled words
     */
    public function checkWords($lang, $words)
    {
        $plink = $this->getPLink($lang);

        $outWords = array();
        foreach ($words as $word) {
            if (!pspell_check($plink, trim($word))) {
                $outWords[] = utf8_encode($word);
            }
        }

        return $outWords;
    }

    /**
     * Returns suggestions of for a specific word.
     *
     * @param {String} $lang Language code like sv or en
     * @param {String} $word Specific word to get suggestions for
     *
     * @return {Array} Array of suggestions for the specified word
     */
    public function getSuggestions($lang, $word)
    {
        $words = pspell_suggest($this->getPLink($lang), $word);

        for ($i = 0; $i < count($words); ++$i) {
            $words[$i] = utf8_encode($words[$i]);
        }

        return $words;
    }

    /**
     * Opens a link for pspell.
     */
    private function getPLink($lang)
    {
        // Check for native PSpell support
        if (!function_exists('pspell_new')) {
            $this->throwError('PSpell support not found in PHP installation.');
        }

        $pspell_config = pspell_config_create(
            $lang,
            $this->_config['PSpell.spelling'],
            $this->_config['PSpell.jargon'],
            $this->_config['PSpell.encoding']
        );

        pspell_config_personal($pspell_config, $this->_config['PSpell.dictionary']);
        $plink = pspell_new_config($pspell_config);

        if (!$plink) {
            $this->throwError('No PSpell link found opened.');
        }

        return $plink;
    }
    /**
     * Add a word to the PSPell personal dictionary
     * From http://slack5.com/blog/2008/12/tinymce-add-to-dictionary/.
     *
     * @param object $lang
     * @param object $word
     *
     * @return
     */
    public function addToDictionary($lang, $word)
    {
        $plink = $this->getPLink($lang);
        pspell_add_to_personal($plink, $word);
        pspell_save_wordlist($plink);

        return true;
    }
}
plugins/spellchecker/config.php000060400000003464152455721620012663 0ustar00<?php
/**
 * @package     JCE
 * @subpackage  Editor
 *
 * @copyright   Copyright (c) 2009-2024 Ryan Demmer. All rights reserved
 * @license     GNU General Public License version 2 or later; see LICENSE.txt
 */

\defined('_JEXEC') or die;

class WFSpellcheckerPluginConfig
{
    public static function getConfig(&$settings)
    {
        $wf = WFApplication::getInstance();
        $engine = $wf->getParam('spellchecker.engine', 'browser', 'browser');

        switch ($engine) {
            default:
            case 'browser':
            case 'googlespell':
                $languages = '';

                $settings['spellchecker_browser_state'] = $wf->getParam('spellchecker.browser_state', 0, 0);

                $engine = 'browser';

                break;

            case 'pspell':
            case 'pspellshell':
                $languages = (array) $wf->getParam('spellchecker.languages', 'English=en', '');

                if ($engine === 'pspellshell') {
                    $engine = 'pspell';
                }

                if (!function_exists('pspell_new')) {
                    $engine = 'browser';
                }

                break;
            case 'enchantspell':
                $languages = (array) $wf->getParam('spellchecker.languages', 'English=en', '');

                if (!function_exists('enchant_broker_init')) {
                    $engine = 'browser';
                }
                break;
        }

        if (!empty($languages)) {
            $settings['spellchecker_languages'] = '+' . implode(',', $languages);
        }

        // only needs to be set if not "browser"
        if ($engine !== "browser") {
            $settings['spellchecker_engine'] = $engine;

            $settings['spellchecker_suggestions'] = $wf->getParam('spellchecker.suggestions', 1, 1);
        }
    }
}
plugins/spellchecker/spellchecker.php000060400000005373152455721620014063 0ustar00<?php
/**
 * @package     JCE
 * @subpackage  Editor
 *
 * @copyright   Copyright (c) 2009-2024 Ryan Demmer. All rights reserved
 * @license     GNU General Public License version 2 or later; see LICENSE.txt
 */

\defined('_JEXEC') or die;

class WFSpellCheckerPlugin extends WFEditorPlugin
{
    /**
     * Constructor activating the default information of the class.
     */
    public function __construct()
    {
        parent::__construct();

        $engine = $this->getEngine();

        if (!$engine) {
            self::error('No Spellchecker Engine available');
        }

        $request = WFRequest::getInstance();

        // Setup plugin XHR callback functions
        $request->setRequest(array($engine, 'checkWords'));
        $request->setRequest(array($engine, 'getSuggestions'));
        $request->setRequest(array($engine, 'ignoreWord'));
        $request->setRequest(array($engine, 'ignoreWords'));
        $request->setRequest(array($engine, 'learnWord'));
    }

    private function getConfig()
    {
        static $config;

        if (empty($config)) {

            $config = array(
                // PSpell settings
                'PSpell.mode' => $this->getParam('spellchecker.pspell_mode', 'PSPELL_FAST'),
                'PSpell.spelling' => $this->getParam('spellchecker.pspell_spelling', ''),
                'PSpell.jargon' => $this->getParam('spellchecker.pspell_jargon', ''),
                'PSpell.encoding' => $this->getParam('spellchecker.pspell_encoding', ''),
                'PSpell.dictionary' => JPATH_BASE . '/' . $this->getParam('spellchecker.pspell_dictionary', ''),
            );
        }

        return $config;
    }

    private function getEngine()
    {
        static $instance;

        if (!is_object($instance)) {
            $classname = '';
            $config = array();

            $engine = $this->getParam('spellchecker.engine', 'browser', 'browser');

            if (($engine === 'pspell' || $engine === 'pspellshell') && function_exists('pspell_new')) {
                $classname = 'PSpell';

                $config = $this->getConfig();
            }

            if ($engine === 'enchantspell' && function_exists('enchant_broker_init')) {
                $classname = 'Enchantspell';
            }

            if (!empty($classname)) {
                $file = __DIR__ . '/classes/' . strtolower($classname) . '.php';

                if (is_file($file)) {
                    require_once $file;
                    $instance = new $classname($config);
                }
            }
        }

        return $instance;
    }

    private static function error($str)
    {
        die('{"result":null,"id":null,"error":{"errstr":"' . addslashes($str) . '","errfile":"","errline":null,"errcontext":"","level":"FATAL"}}');
    }
}
plugins/spellchecker/spellchecker.xml000060400000010257152455721620014071 0ustar00<?xml version="1.0" ?>
<extension version="3.4" type="plugin" group="jce" method="upgrade">
    <name>WF_SPELLCHECKER_TITLE</name>
    <version>2.9.99.2</version>
    <creationDate>22-04-2026</creationDate>
    <author>Ryan Demmer</author>
    <authorEmail>info@joomlacontenteditor.net</authorEmail>
    <authorUrl>https://www.joomlacontenteditor.net/</authorUrl>
    <copyright>Copyright (C) 2006 - 2026 Ryan Demmer. All rights reserved</copyright>
    <license>GNU/GPL Version 2 or later - http://www.gnu.org/licenses/gpl-2.0.html</license>
    <description>WF_SPELLCHECKER_DESC</description>
    <icon>spellchecker</icon>
    <fields name="spellchecker">
        <fieldset name="config">
            <field name="engine" type="list" default="browser" label="WF_SPELLCHECKER_PARAM_ENGINE" description="WF_SPELLCHECKER_PARAM_ENGINE_DESC">
                <option value="browser">WF_SPELLCHECKER_PARAM_BROWSER</option>
                <option value="pspell">WF_SPELLCHECKER_PARAM_PSPELL_PHP</option>
                <option value="enchantspell">WF_SPELLCHECKER_PARAM_ENCHANT</option>
            </field>

            <field name="browser_state" type="yesno" default="0" label="WF_OPTION_STATE" description="WF_SPELLCHECKER_BROWSER_STATE_DESC" showon="engine:browser">
                <option value="0">JOFF</option>
                <option value="1">JON</option>
            </field>

            <field name="suggestions" type="yesno" default="1" label="WF_SPELLCHECKER_SUGGESTIONS" description="WF_SPELLCHECKER_SUGGESTIONS_DESC" showon="engine!:browser">
                <option value="1">JYES</option>
                <option value="0">JNO</option>
            </field>

            <!--param name="googlespell_languages" type="list" class="checklist sortable" multiple="multiple" default="English=en" label="WF_SPELLCHECKER_PARAM_LANGUAGES" description="WF_SPELLCHECKER_PARAM_GOOGLESPELL_LANGUAGES_DESC" parent="engine[googlespell]">
            <option value="English=en">English</option>
            <option value="Danish=da">Danish</option>
            <option value="Dutch=nl">Dutch</option>
            <option value="Finnish=fi">Finnish</option>
            <option value="French=fr">French</option>
            <option value="German=de">German</option>
            <option value="Italian=it">Italian</option>
            <option value="Polish=pl">Polish</option>
            <option value="Portuguese=pt">Portuguese(BR)</option>
            <option value="Spanish=es">Spanish</option>
            <option value="Swedish=sv">Swedish</option>
        </param-->

            <field name="languages" type="text" size="100" default="English=en" label="WF_SPELLCHECKER_PARAM_LANGUAGES" description="WF_SPELLCHECKER_PARAM_LANGUAGES_DESC" showon="engine!:browser" />
            <field name="pspell_mode" type="text" default="PSPELL_FAST" label="WF_SPELLCHECKER_PARAM_PSPELL_MODE" description="WF_SPELLCHECKER_PARAM_PSPELL_MODE_DESC" showon="engine:pspell" />
            <field name="pspell_spelling" type="text" default="" label="WF_SPELLCHECKER_PARAM_PSPELL_SPELLING" description="WF_SPELLCHECKER_PARAM_PSPELL_SPELLING_DESC" showon="engine:pspell" />
            <field name="pspell_jargon" type="text" default="" label="WF_SPELLCHECKER_PARAM_PSPELL_JARGON" description="WF_SPELLCHECKER_PARAM_PSPELL_JARGON_DESC" showon="engine:pspell" />
            <field name="pspell_encoding" type="text" default="" label="WF_SPELLCHECKER_PARAM_PSPELL_ENCODING" description="WF_SPELLCHECKER_PARAM_PSPELL_ENCODING_DESC" showon="engine:pspell" />
            <field name="pspell_dictionary" type="text" size="100" default="components/com_jce/editor/tiny_mce/plugins/spellchecker/dictionary.pws" label="WF_SPELLCHECKER_PARAM_PSPELL_DICTIONARY" description="WF_SPELLCHECKER_PARAM_PSPELL_DICTIONARY_DESC" showon="engine:pspell" />
            <field name="pspellshell_aspell" type="text" default="/usr/bin/aspell" label="WF_SPELLCHECKER_PARAM_PSPELLSHELL" description="WF_SPELLCHECKER_PARAM_PSPELLSHELL_DESC" showon="engine:pspell" />
            <field name="pspellshell_tmp" type="text" default="/tmp" label="WF_SPELLCHECKER_PARAM_PSPELLSHELL_TMP" description="WF_SPELLCHECKER_PARAM_PSPELLSHELL_TMP_DESC" showon="engine:pspell" />
        </fieldset>
    </fields>
</extension>
plugins/browser/index.html000060400000000054152455721620011711 0ustar00<html><body bgcolor="#FFFFFF"></body></html>plugins/browser/config.php000060400000000577152455721620011704 0ustar00<?php
/**
 * @package     JCE
 * @subpackage  Editor
 *
 * @copyright   Copyright (c) 2009-2024 Ryan Demmer. All rights reserved
 * @license     GNU General Public License version 2 or later; see LICENSE.txt
 */

\defined('_JEXEC') or die;

class WFBrowserPluginConfig
{
    public static function getConfig(&$settings)
    {
        $settings['file_browser_callback'] = '';
    }
}
plugins/browser/browser.php000060400000034564152455721620012125 0ustar00<?php

/**
 * @package     JCE
 * @subpackage  Editor
 *
 * @copyright   Copyright (c) 2009-2024 Ryan Demmer. All rights reserved
 * @license     GNU General Public License version 2 or later; see LICENSE.txt
 */

\defined('_JEXEC') or die;

use Joomla\CMS\Factory;
use Joomla\CMS\Language\Text;
use Joomla\CMS\Session\Session;
use Joomla\CMS\Uri\Uri;

class WFBrowserPlugin extends WFMediaManager
{
    /*
     * @var string
     */
    protected $_filetypes = 'doc,docx,dot,dotx,ppt,pps,pptx,ppsx,xls,xlsx,gif,jpeg,jpg,png,webp,apng,avif,pdf,zip,tar,gz,swf,rar,mov,mp4,m4a,flv,mkv,webm,ogg,ogv,qt,wmv,asx,asf,avi,wav,mp3,aiff,oga,odt,odg,odp,ods,odf,rtf,txt,csv';

    private function isMediaField()
    {
        $app = Factory::getApplication();
        return $app->input->getInt('standalone') && $app->input->getString('mediatype') && $app->input->getCmd('fieldid', $app->input->getCmd('element', ''));
    }

    /**
     * Get a parameter by key.
     *
     * @param string $key        Parameter key eg: editor.width
     * @param mixed  $fallback   Fallback value
     * @param mixed  $default    Default value
     * @param string $type       Variable type eg: string, boolean, integer, array
     *
     * @return mixed
     */
    public function getParam($key, $fallback = '', $default = '', $type = 'string')
    {
        $wf = WFApplication::getInstance();

        $value = parent::getParam($key, $fallback, $default, $type);

        // get all keys
        $keys = explode('.', $key);

        // get caller if any
        $caller = $this->get('caller');

        // create new namespaced key
        if ($caller && ($keys[0] === $caller || count($keys) == 1)) {
            // create new key
            $key = $caller . '.' . 'browser' . '.' . array_pop($keys);
            // get namespaced value, fallback to base parameter
            $value = $wf->getParam($key, $value, $default, $type);
        }

        return $value;
    }

    public function __construct($config = array())
    {
        $app = Factory::getApplication();

        $config = array(
            'layout' => 'browser',
            'can_edit_images' => 1,
            'show_view_mode' => 1,
        );

        parent::__construct($config);

        $browser = $this->getFileBrowser();

        // get mediatype from xml
        $mediatypes = $app->input->getString('mediatype', $app->input->getString('filter', 'files'));

        if ($mediatypes) {
            // add upload event
            $browser->addEvent('onUpload', array($this, 'onUpload'));

            // clean and lowercase filter value
            $mediatypes = (string) preg_replace('/[^\w_,]/i', '', strtolower($mediatypes));

            // get filetypes from params
            $filetypes = $this->getParam('extensions', $this->get('_filetypes'));

            // map to comma seperated list
            $filetypes = $browser->getFileTypes('list', $filetypes);

            $accept = explode(',', $filetypes);

            $map = array(
                'images' => array('jpg', 'jpeg', 'png', 'apng', 'gif', 'webp', 'avif'),
                'media' => array('avi', 'wmv', 'wm', 'asf', 'asx', 'wmx', 'wvx', 'mov', 'qt', 'mpg', 'mpeg', 'm4a', 'm4v', 'swf', 'dcr', 'rm', 'ra', 'ram', 'divx', 'mp4', 'ogv', 'ogg', 'webm', 'flv', 'f4v', 'mp3', 'ogg', 'wav', 'xap'),
                'documents' => array('doc', 'docx', 'odg', 'odp', 'ods', 'odt', 'pdf', 'ppt', 'pptx', 'txt', 'xcf', 'xls', 'xlsx', 'csv'),
                'html' => array('html', 'htm', 'txt', 'md'),
                'files' => $accept, // “files” == everything allowed
            );

            // add svg support to images if it is allowed in filetypes
            if (in_array('svg', $accept)) {
                $map['images'][] = 'svg';
            }

            // explode the mediatypes
            $mediatypes = explode(',', $mediatypes);

            // selected filetypes
            $selected = array();

            foreach ($mediatypes as $mediatype) {
                // trim the value
                $mediatype = trim($mediatype);

                // strtolower the value
                $mediatype = strtolower($mediatype);
                
                // mediaypes contains a mapped type
                if (array_key_exists($mediatype, $map)) {
                    // process the map to filter permitted extensions
                    /*array_walk($map, function (&$items, $key) use ($accept) {
                        $values = array_intersect($items, $accept);
                        $items = empty($values) ? [] : $values;
                    });*/

                    //$selected = $map[$mediatype];

                    $selected = array_values(array_intersect($map[$mediatype], $accept));
                } else {
                    if (in_array($mediatype, $accept, true)) {
                        // add the mediatype to the selected filetypes
                        $selected[] = $mediatype;
                    }
                }
            }

            // remove duplicates
            $selected = array_values(array_unique($selected));

            // set updated filetypes
            $this->setFileTypes(implode(',', $selected));
        }

        $folder = $this->getMediaFolder();

        if ($folder) {
            // process any variables in the path
            $path = $browser->getFileSystem()->toRelative($folder, false);

            if ($browser->checkPathAccess($path)) {
                // set new path for browser
                $browser->set('source', $folder);
            }
        }
    }

    private function getMediaFolder()
    {
        $app = Factory::getApplication();

        $folder = $app->input->getString('mediafolder', '');

        if ($folder) {
            // trim the path of leading : if any
            $folder = trim($folder, ':');

            // trim the path of leading and trailing /
            $folder = trim($folder, '/');
        
            // clean
            $folder = WFUtility::cleanPath($folder);

            // split by / and each part "safe"
            $parts = explode('/', $folder);

            foreach ($parts as $key => $part) {
                $parts[$key] = WFUtility::makeSafe($part);
            }

            // rejoin parts
            $folder = implode('/', $parts);

            // clean path again
            $folder = WFUtility::cleanPath($folder);

            // still intact after clean?
            if ($folder) {
                $browser = $this->getFileBrowser();

                // check this path is within an existing store
                $store = $browser->getDirectoryStoreFromPath($folder);

                if (!empty($store)) {
                    // check path exists
                    if ($browser->getFileSystem()->is_dir($folder)) {
                        return $folder;
                    }
                }
            }
        }

        return '';
    }

    /**
     * Normalize a Joomla Media Field path
     *
     * @param  string   $folder
     *
     * @return string
     */
    private function normalizeLocalJoomlaFolder($folder)
    {
        if (empty($folder)) {
            return '';
        }

        $folder = rawurldecode($folder);

        // shouldn't be an absoute URL so return empty string
        if (strpos($folder, '://') !== false) {
            return '';
        }

        // default scheme and path
        $scheme = 'local-images';
        $path = $folder;

        $pos = strpos($folder, ':');

        if ($pos !== false) {
            $scheme = substr($folder, 0, $pos);
            $path = trim(substr($folder, $pos + 1), " \t\n\r\0\x0B/");
        }

        $map = array(
            'local-images' => 'images',
            'local-files' => 'files',
        );

        // map the scheme to a root folder
        $root = isset($map[$scheme]) ? $map[$scheme] : 'images';

        // trim to remove slashes
        $path = trim($path, '/');

        // concatenate the path with the mapped folder
        $folder = $root . '/' . $path;

        // trim to remove slashes
        $folder = trim($folder, '/');

        return $folder;
    }

    /**
     * Update the File Browser configuration with the current media folder.
     *
     * @param array $config Configuration array to update.
     * @return array $config Updated configuration array.
     */
    protected function getFileBrowserConfig($config = array())
    {
        $app = Factory::getApplication();

        $config = parent::getFileBrowserConfig($config);

        // update folder path if a value is passed from a mediafield url
        if ($this->isMediaField()) {
            // get the mediafolder value from a JCE Media Field if any
            $folder = $app->input->getString('mediafolder', '');

            $folder = trim(rawurldecode($folder));

            $prefix = '';

            // check if this is a root folder by looking for a : character at the start of the path value
            $isRootFolder = strpos($folder, ':') === 0;

            // trim the path of leading : if any
            $folder = trim($folder, ':');

            // trim the path of leading and trailing /
            $folder = trim($folder, '/');

            if (empty($config['dir'])) {
                $root = array('path' => '');
            } else {
                if ($isRootFolder) {
                    if (!empty($folder)) {
                        $tmpPath = $folder . '/';

                        foreach ($config['dir'] as $key => $store) {
                            $base = trim($store['path'], '/');

                            // strip any variable segments (eg: $usergroup) to get the comparable literal prefix
                            $literalBase = trim(preg_replace('/\/?\$.*$/', '', $base), '/');

                            // check if the folder is within this directory store path
                            if (!empty($literalBase) && ($folder === $literalBase || strpos($tmpPath, $literalBase . '/') === 0)) {
                                $hash = md5($folder);

                                $config['dir'] = array(
                                    $hash => array(
                                        'label' => '',
                                        'path'  => $folder,
                                    ),
                                );

                                return $config;
                            }
                        }
                    }

                    // no match found - fall through and treat as relative to dir value
                }

                // get the first directory store prefix
                $prefix = key($config['dir']);
                // get the first directory store
                $root = reset($config['dir']);
            }

            if ($app->input->getInt('converted', 0) === 1) {
                // get the path from a converted media field
                $folder = $app->input->getString('path', $app->input->getString('folder', '')); // include "folder" for Joomla 3

                // normalize the folder path of Joomla Media Field, creating a local path, eg: local-images:/folder/subfolder => images/folder/subfolder
                $folder = $this->normalizeLocalJoomlaFolder($folder);

                if ($folder) {
                    $tmpPath = $folder . '/';

                    foreach ($config['dir'] as $key => $store) {
                        $base = trim($store['path'], '/');

                        // check if the folder is within any directory store path
                        if ($tmpPath === $base || strpos($tmpPath, $base . '/') === 0) {
                            $root['path'] = $tmpPath;
                            break;
                        }
                    }

                    // reset folder
                    $folder = '';
                }
            }

            $path = WFUtility::makePath($root['path'], $folder);
            $path = trim($path, '/');

            if (empty($prefix)) {
                $hash = md5($path);
            } else {
                $hash = $prefix;
            }

            $config['dir'] = array(
                $hash => array(
                    'label' => '',
                    'path' => $path,
                ),
            );
        }

        return $config;
    }

    public function setFileTypes($filetypes = '')
    {
        // get file browser reference
        $browser = $this->getFileBrowser();

        // set updated filetypes
        $browser->setFileTypes($filetypes);
    }

    /**
     * Display the plugin.
     */
    public function display()
    {
        parent::display();

        $app = Factory::getApplication();

        $document = WFDocument::getInstance();
        $slot = $app->input->getCmd('slot', 'plugin');

        // update some document variables
        $document->setName('browser');
        $document->setTitle(Text::_('WF_BROWSER_TITLE'));

        if ($document->get('standalone') == 1) {
            if ($slot === 'plugin') {
                $document->addScript(array('window.min'));

                $callback = $app->input->getCmd('callback', '');
                $element = $app->input->getCmd('fieldid', 'field-media-id');

                // Joomla 4 field variable not converted
                if ($element == 'field-media-id') {
                    $element = $app->input->getCmd('element', '');
                }

                $settings = array(
                    'site_url' => Uri::base(true) . '/',
                    'document_base_url' => Uri::root(),
                    'language' => WFLanguage::getCode(),
                    'element' => $element,
                    'token' => Session::getFormToken(),
                );

                if ($callback) {
                    $settings['callback'] = $callback;
                }

                $document->addScriptDeclaration('tinymce.settings=' . json_encode($settings) . ';');
            }

            $document->addScript(array('popup.min'), 'plugins');
            $document->addStyleSheet(array('browser.min'), 'plugins');
        }

        if ($slot === 'plugin') {
            $document->addScript(array('browser'), 'plugins');
        }
    }

    public function onUpload($file, $relative = '')
    {
        $app = Factory::getApplication();

        parent::onUpload($file, $relative);

        // inline upload
        if ($app->input->getInt('inline', 0) === 1) {
            $result = array(
                'file' => $relative,
                'name' => basename($file),
            );

            return $result;
        }

        return array();
    }
}
plugins/browser/browser.xml000060400000015104152455721620012123 0ustar00<?xml version="1.0" encoding="utf-8" ?>
<extension version="3.4" type="plugin" group="jce" method="upgrade">
    <name>WF_BROWSER_TITLE</name>
    <version>2.9.99.2</version>
    <creationDate>22-04-2026</creationDate>
    <author>Ryan Demmer</author>
    <authorEmail>info@joomlacontenteditor.net</authorEmail>
    <authorUrl>https://www.joomlacontenteditor.net/</authorUrl>
    <copyright>Ryan Demmer</copyright>
    <license>GNU/GPL Version 2 or later - http://www.gnu.org/licenses/gpl-2.0.html</license>
    <description>WF_BROWSER_DESC</description>
    <icon></icon>
    <files></files>
    <fields name="browser">
        <fieldset name="config">
            <field name="dir" type="filesystempath" default="" size="50" label="WF_PARAM_DIRECTORY" description="WF_PARAM_DIRECTORY_DESC"/>
            <field name="max_size" class="input-small" hint="1024" max="" type="uploadmaxsize" step="128" label="WF_PARAM_UPLOAD_SIZE" description="WF_PARAM_UPLOAD_SIZE_DESC" placeholder="" />
            <field name="extensions" type="filetype" default="doc,docx,dot,dotx,ppt,pps,pptx,ppsx,xls,xlsx,gif,jpeg,jpg,png,apng,webp,avif,pdf,zip,tar,gz,swf,rar,mov,mp4,m4a,flv,mkv,webm,ogg,ogv,qt,wmv,asx,asf,avi,wav,mp3,aiff,oga,odt,odg,odp,ods,odf,rtf,txt,csv" label="WF_PARAM_EXTENSIONS" description="WF_PARAM_EXTENSIONS_DESC">
                <option value="doc">doc</option>
                <option value="docx">docx</option>
                <option value="dot">dot</option>
                <option value="dotx">dotx</option>
                <option value="ppt">ppt</option>
                <option value="pps">pps</option>
                <option value="pptx">pptx</option>
                <option value="ppsx">ppsx</option>
                <option value="xls">xls</option>
                <option value="xlsx">xlsx</option>
                <option value="gif">gif</option>
                <option value="jpeg">jpeg</option>
                <option value="jpg">jpg</option>
                <option value="png">png</option>
                <option value="apng">apng</option>
                <option value="webp">webp</option>
                <option value="avif">avif</option>
                <option value="pdf">pdf</option>
                <option value="zip">zip</option>
                <option value="tar">tar</option>
                <option value="gz">gz</option>
                <option value="swf">swf</option>
                <option value="rar">rar</option>
                <option value="mov">mov</option>
                <option value="mp4">mp4</option>
                <option value="m4a">m4a</option>
                <option value="flv">flv</option>
                <option value="mkv">mkv</option>
                <option value="webm">webm</option>
                <option value="ogg">ogg</option>
                <option value="ogv">ogv</option>
                <option value="qt">qt</option>
                <option value="wmv">wmv</option>
                <option value="asx">asx</option>
                <option value="asf">asf</option>
                <option value="avi">avi</option>
                <option value="wav">wav</option>
                <option value="mp3">mp3</option>
                <option value="aiff">aiff</option>
                <option value="oga">oga</option>
                <option value="odt">odt</option>
                <option value="odg">odg</option>
                <option value="odp">odp</option>
                <option value="ods">ods</option>
                <option value="odf">odf</option>
                <option value="rtf">rtf</option>
                <option value="txt">txt</option>
                <option value="csv">csv</option>
            </field>
            <field name="filesystem" type="filesystem" default="" label="WF_PARAM_FILESYSTEM" description="WF_PARAM_FILESYSTEM_DESC">
                <option value="">WF_OPTION_INHERIT</option>
            </field>

            <field type="heading" label="WF_PROFILES_PLUGINS_ACCESS" />

            <field name="help_button" type="yesno" default="1" label="WF_PARAM_HELP_BUTTON" description="WF_PARAM_HELP_BUTTON_DESC">
                <option value="1">JYES</option>
                <option value="0">JNO</option>
            </field>

            <field name="upload" type="yesno" default="1" label="WF_PARAM_UPLOAD" description="WF_PARAM_UPLOAD_DESC">
                <option value="1">JYES</option>
                <option value="0">JNO</option>
            </field>
            <field name="folder_new" type="yesno" default="1" label="WF_PARAM_FOLDER_CREATE" description="WF_PARAM_FOLDER_CREATE_DESC">
                <option value="1">JYES</option>
                <option value="0">JNO</option>
            </field>
            <field name="folder_delete" type="yesno" default="1" label="WF_PARAM_FOLDER_DELETE" description="WF_PARAM_FOLDER_DELETE_DESC">
                <option value="1">JYES</option>
                <option value="0">JNO</option>
            </field>
            <field name="folder_rename" type="yesno" default="1" label="WF_PARAM_FOLDER_RENAME" description="WF_PARAM_FOLDER_RENAME_DESC">
                <option value="1">JYES</option>
                <option value="0">JNO</option>
            </field>
            <field name="folder_move" type="yesno" default="1" label="WF_PARAM_FOLDER_PASTE" description="WF_PARAM_FOLDER_PASTE_DESC">
                <option value="1">JYES</option>
                <option value="0">JNO</option>
            </field>
            <field name="file_delete" type="yesno" default="1" label="WF_PARAM_FILE_DELETE" description="WF_PARAM_FILE_DELETE_DESC">
                <option value="1">JYES</option>
                <option value="0">JNO</option>
            </field>
            <field name="file_rename" type="yesno" default="1" label="WF_PARAM_FILE_RENAME" description="WF_PARAM_FILE_RENAME_DESC">
                <option value="1">JYES</option>
                <option value="0">JNO</option>
            </field>
            <field name="file_move" type="yesno" default="1" label="WF_PARAM_FILE_PASTE" description="WF_PARAM_FILE_PASTE_DESC">
                <option value="1">JYES</option>
                <option value="0">JNO</option>
            </field>

            <field name="allow_download" type="yesno" default="0" label="WF_BROWSER_ALLOW_DOWNLOAD" description="WF_BROWSER_ALLOW_DOWNLOAD_DESC">
                <option value="1">JYES</option>
                <option value="0">JNO</option>
            </field>
        </fieldset>
    </fields>
    <languages></languages>
    <help>
        <topic key="browser.about" title="WF_BROWSER_HELP_ABOUT" />
        <topic file="libraries/xml/help/manager.xml" />
    </help>
</extension>
plugins/formatselect/config.php000060400000005764152455721620012714 0ustar00<?php
/**
 * @package     JCE
 * @subpackage  Editor
 *
 * @copyright   Copyright (c) 2009-2024 Ryan Demmer. All rights reserved
 * @license     GNU General Public License version 2 or later; see LICENSE.txt
 */

\defined('_JEXEC') or die;

class WFFormatselectPluginConfig
{
    protected static $formats = array(
        'p' => 'advanced.paragraph',
        'address' => 'advanced.address',
        'pre' => 'advanced.pre',
        'h1' => 'advanced.h1',
        'h2' => 'advanced.h2',
        'h3' => 'advanced.h3',
        'h4' => 'advanced.h4',
        'h5' => 'advanced.h5',
        'h6' => 'advanced.h6',
        'div' => 'advanced.div',
        'div_container' => 'advanced.div_container',
        'blockquote' => 'advanced.blockquote',
        'code' => 'advanced.code',
        'samp' => 'advanced.samp',
        'span' => 'advanced.span',
        'section' => 'advanced.section',
        'article' => 'advanced.article',
        'aside' => 'advanced.aside',
        'header' => 'advanced.header',
        'footer' => 'advanced.footer',
        'nav' => 'advanced.nav',
        'figure' => 'advanced.figure',
        //'figcaption' => 'advanced.figcaption',
        'dl' => 'advanced.dl',
        'dt' => 'advanced.dt',
        'dd' => 'advanced.dd',
    );

    public static function getConfig(&$settings)
    {
        $wf = WFApplication::getInstance();

        // html5 block elements
        $html5 = array('section', 'article', 'aside', 'figure');
        // get current schema
        $schema = $wf->getParam('editor.schema', 'html4');
        $verify = (bool) $wf->getParam('editor.verify_html', 0);

        $legacy = $wf->getParam('editor.theme_advanced_blockformats');
        $default = 'p,div,address,pre,h1,h2,h3,h4,h5,h6,code,samp,span,section,article,aside,header,footer,nav,figure,dl,dt,dd';

        // get blockformats from parameter
        $blockformats = $wf->getParam('formatselect.blockformats');

        $settings['formatselect_preview_styles'] = $wf->getParam('formatselect.preview_styles', 1, 1);

        // handle empty list
        if (empty($blockformats)) {
            if (!empty($legacy)) {
                $blockformats = $legacy;
            } else {
                return '';
            }
        }

        $list = array();
        $blocks = array();

        // make an array
        if (is_string($blockformats)) {
            $blockformats = explode(',', $blockformats);
        }

        // create label / value list using default
        foreach ($blockformats as $key) {
            if (array_key_exists($key, self::$formats)) {
                $label = self::$formats[$key];
            }

            // skip html5 blocks for html4 schema
            if ($verify && $schema == 'html4' && in_array($key, $html5)) {
                continue;
            }

            if (isset($label)) {
                $list[$key] = $label;
            }

            $blocks[] = $key;
        }

        // Format list / Remove Format
        $settings['formatselect_blockformats'] = json_encode($list);
    }
}
plugins/formatselect/index.html000060400000000054152455721620012716 0ustar00<html><body bgcolor="#FFFFFF"></body></html>plugins/formatselect/formatselect.xml000060400000002201152455721620014127 0ustar00<?xml version="1.0" ?>
<extension version="3.4" type="plugin" group="jce" method="upgrade">
    <name>WF_FORMATSELECT_TITLE</name>
    <version>2.9.99.2</version>
    <creationDate>22-04-2026</creationDate>
    <author>Ryan Demmer</author>
    <authorEmail>info@joomlacontenteditor.net</authorEmail>
    <authorUrl>https://www.joomlacontenteditor.net/</authorUrl>
    <copyright>Ryan Demmer</copyright>
    <license>GNU/GPL Version 2 or later - http://www.gnu.org/licenses/gpl-2.0.html</license>
    <description>WF_FORMATSELECT_DESC</description>
    <icon>formatselect</icon>
    <fields name="formatselect">
        <fieldset name="config">
            <field name="blockformats" type="blockformats" default="" label="WF_PARAM_BLOCK_FORMAT" description="WF_PARAM_BLOCK_FORMAT_DESC" />

            <field name="preview_styles" type="yesno" default="1" label="WF_BLOCK_FORMAT_PREVIEW_STYLES" description="WF_BLOCK_FORMAT_PREVIEW_STYLES_DESC">
                <option value="1">JYES</option>
                <option value="0">JNO</option>
            </field>
        </fieldset>
    </fields>
    <help></help>
    <languages></languages>
</extension>plugins/attributes/attributes.xml000060400000001200152455721620013321 0ustar00<?xml version="1.0" ?>
<extension version="3.4" type="plugin" group="jce" method="upgrade">
	<name>WF_ATTRIBUTES_TITLE</name>
	<version>2.9.99.2</version>
	<creationDate>22-04-2026</creationDate>
	<author>Ryan Demmer</author>
	<authorEmail>info@joomlacontenteditor.net</authorEmail>
	<authorUrl>https://www.joomlacontenteditor.net/</authorUrl>
	<copyright>Ryan Demmer</copyright>
	<license>GNU/GPL Version 2 or later - http://www.gnu.org/licenses/gpl-2.0.html</license>
	<description>WF_ATTRIBUTES_DESC</description>
	<icon>attributes</icon>
	<layout>attributes</layout>
	<files></files>
	<languages></languages>
	<help></help>
</extension>plugins/attributes/index.html000060400000000054152455721620012414 0ustar00<html><body bgcolor="#FFFFFF"></body></html>plugins/hr/hr.xml000060400000001072152455721620007776 0ustar00<?xml version="1.0" ?>
<extension version="3.4" type="plugin" group="jce" method="upgrade">
	<name>WF_HR_TITLE</name>
	<version>2.9.99.2</version>
	<creationDate>22-04-2026</creationDate>
	<author>Ryan Demmer</author>
	<authorEmail>info@joomlacontenteditor.net</authorEmail>
	<authorUrl>https://www.joomlacontenteditor.net/</authorUrl>
	<copyright>Ryan Demmer</copyright>
	<license>GNU/GPL Version 2 or later - http://www.gnu.org/licenses/gpl-2.0.html</license>
	<description>WF_HR_DESC</description>
	<icon>hr</icon>
	<help></help>
	<languages></languages>
</extension>plugins/hr/index.html000060400000000054152455721620010637 0ustar00<html><body bgcolor="#FFFFFF"></body></html>plugins/fontcolor/index.html000060400000000054152455721620012233 0ustar00<html><body bgcolor="#FFFFFF"></body></html>plugins/fontcolor/config.php000060400000001416152455721620012217 0ustar00<?php
/**
 * @package     JCE
 * @subpackage  Editor
 *
 * @copyright   Copyright (c) 2009-2024 Ryan Demmer. All rights reserved
 * @license     GNU General Public License version 2 or later; see LICENSE.txt
 */

\defined('_JEXEC') or die;

class WFFontcolorPluginConfig
{
    public static function getConfig(&$settings)
    {
        $wf = WFApplication::getInstance();

        $settings['fontcolor_foreground_color'] = $wf->getParam('fontcolor.foreground_color', '');
        $settings['fontcolor_background_color'] = $wf->getParam('fontcolor.background_color', '');

        $settings['fontcolor_foreground_colors'] = $wf->getParam('fontcolor.foreground_colors', '');
        $settings['fontcolor_background_colors'] = $wf->getParam('fontcolor.background_colors', '');
    }
}
plugins/fontcolor/fontcolor.xml000060400000003364152455721620012774 0ustar00<?xml version="1.0" ?>
<extension version="3.4" type="plugin" group="jce" method="upgrade">
    <name>WF_FONTCOLOR_TITLE</name>
    <version>2.9.99.2</version>
    <creationDate>22-04-2026</creationDate>
    <author>Ryan Demmer</author>
    <authorEmail>info@joomlacontenteditor.net</authorEmail>
    <authorUrl>https://www.joomlacontenteditor.net/</authorUrl>
    <copyright>Ryan Demmer</copyright>
    <license>GNU/GPL Version 2 or later - http://www.gnu.org/licenses/gpl-2.0.html</license>
    <description>WF_FONTCOLOR_DESC</description>
    <icon>forecolor,backcolor</icon>
    <fields name="fontcolor">
        <fieldset name="config">
            <field name="foreground_color" type="color" size="10" default="#000000" label="WF_FORECOLOR_TITLE" description="WF_FONTCOLOR_DESC"/>
            <field name="background_color" type="color" size="10" default="#000000" label="WF_BACKCOLOR_TITLE" description="WF_BACKCOLOR_DESC"/>

            <field name="foreground_colors" type="text" default="" hint="eg: #000000,#cc0000,#cccccc" label="WF_FORECOLOR_LIST_TITLE" description="WF_FORECOLOR_LIST_DESC"/>
            <field name="background_colors" type="text" default="" hint="eg: #cccccc,#dddddd,#eeeeee" label="WF_BACKCOLOR_LIST_TITLE" description="WF_BACKCOLOR_LIST_DESC"/>

            <field type="heading" label="WF_PROFILES_PLUGINS_BUTTONS" />
            
            <field name="buttons" type="buttons" multiple="multiple" default="forecolor,backcolor" label="WF_PARAM_BUTTONS" description="WF_PARAM_BUTTONS_DESC">
                <option value="forecolor">WF_FORECOLOR_TITLE</option>
                <option value="backcolor">WF_BACKCOLOR_TITLE</option>
            </field>
        </fieldset>
    </fields>
    <help></help>
    <languages></languages>
</extension>plugins/colorpicker/colorpicker.php000060400000001303152455721620013570 0ustar00<?php
/**
 * @package     JCE
 * @subpackage  Editor
 *
 * @copyright   Copyright (c) 2009-2024 Ryan Demmer. All rights reserved
 * @license     GNU General Public License version 2 or later; see LICENSE.txt
 */

\defined('_JEXEC') or die;

require_once WF_EDITOR_LIBRARIES . '/classes/plugin.php';

class WFColorpickerPlugin extends WFEditorPlugin
{
    public function __construct()
    {
        parent::__construct(array('colorpicker' => true));
    }

    public function display()
    {
        parent::display();

        $document = WFDocument::getInstance();

        $document->addScript(array('colorpicker'), 'plugins');
        $document->addStyleSheet(array('colorpicker'), 'plugins');
    }
}
plugins/colorpicker/index.html000060400000000054152455721620012542 0ustar00<html><body bgcolor="#FFFFFF"></body></html>plugins/colorpicker/config.php000060400000001251152455721620012523 0ustar00<?php
/**
 * @package     JCE
 * @subpackage  Editor
 *
 * @copyright   Copyright (c) 2009-2024 Ryan Demmer. All rights reserved
 * @license     GNU General Public License version 2 or later; see LICENSE.txt
 */

\defined('_JEXEC') or die;

class WFColorpickerPluginConfig
{
    public static function getConfig(&$settings)
    {
        $wf = WFApplication::getInstance();

        $colours = $wf->getParam('colorpicker.custom_colors', '');

        if (empty($colours)) {
            $colours = $wf->getParam('editor.custom_colors', '');
        }

        $colours = array_map('trim', explode(',', $colours));

        $settings['colorpicker_custom_colors'] = $colours;
    }
}
plugins/colorpicker/tmpl/index.html000060400000000054152455721620013516 0ustar00<html><body bgcolor="#FFFFFF"></body></html>plugins/colorpicker/tmpl/default.php000060400000006127152455721620013665 0ustar00<?php

/**
 * @copyright     Copyright (c) 2009-2022 Ryan Demmer. All rights reserved
 * @license       GNU/GPL 2 or later - http://www.gnu.org/licenses/old-licenses/gpl-2.0.html
 * JCE is free software. This version may have been modified pursuant
 * to the GNU General Public License, and as distributed it includes or
 * is derivative of works licensed under the GNU General Public License or
 * other free or open source software licenses
 */
\defined('_JEXEC') or die;

use Joomla\CMS\Language\Text;

?>
<div id="colorpicker">
    <div id="colorpicker_tabs">
        <ul class="uk-tab" role="tablist">
            <li role="presentation" aria-selected="true" class="uk-active"><button type="button" class="uk-button uk-button-link" aria-controls="colorpicker_picker" tabindex="-1"><?php echo Text::_('WF_COLORPICKER_PICKER'); ?></button></li>
            <li role="presentation" aria-selected="false" ><button type="button" class="uk-button uk-button-link" aria-controls="colorpicker_web" tabindex="-1"><?php echo Text::_('WF_COLORPICKER_PALETTE'); ?></button></li>
            <li role="presentation" aria-selected="false" ><button type="button" class="uk-button uk-button-link" aria-controls="colorpicker_named" tabindex="-1"><?php echo Text::_('WF_COLORPICKER_NAMED'); ?></button></li>
            <li role="presentation" aria-selected="false" ><button type="button" class="uk-button uk-button-link" aria-controls="colorpicker_template" tabindex="-1"><?php echo Text::_('WF_COLORPICKER_TEMPLATE'); ?></button></li>
        </ul>
        <div id="tab-content" class="uk-switcher">
            <div id="colorpicker_picker" title="<?php echo Text::_('WF_COLORPICKER_PICKER'); ?>" data-type="picker" class="uk-active" role="tabpanel" aria-hidden="false"><!-- Will be filled with color wheel --></div>
            <div id="colorpicker_web" title="<?php echo Text::_('WF_COLORPICKER_PALETTE'); ?>" data-type="web" role="tabpanel" aria-hidden="true"><!-- Gets filled with web safe colors--></div>
            <div id="colorpicker_named" title="<?php echo Text::_('WF_COLORPICKER_NAMED'); ?>" data-type="named" role="tabpanel" aria-hidden="true"><!-- Gets filled with named colors--></div>
            <div id="colorpicker_template" title="<?php echo Text::_('WF_COLORPICKER_TEMPLATE'); ?>" data-type="template" role="tabpanel" aria-hidden="true"><!-- Gets filled with template colors--></div>
        </div>
    </div>
<input type="hidden" id="tmp_color" />
</div>
<div class="mceActionPanel uk-modal-footer">
  <div id="colorpicker_preview">
      <div id="colorpicker_preview_text" class="uk-form-icon uk-form-icon-both">
          <i class="uk-icon-hashtag"></i>
          <input type="text" id="colorpicker_color" size="8" maxlength="8" value="000000" aria-required="true" />
          <span class="uk-icon-none" id="colorpicker_preview_color" style="background-color: rgb(0, 0, 0);"></span>
      </div>
  </div>

    <button type="button" class="uk-button uk-button-primary" id="colorpicker_insert" onclick="ColorPicker.insert();"><i class="uk-icon-check"></i><span class="uk-button-text"><?php echo Text::_('WF_LABEL_APPLY'); ?></span></button>
</div>plugins/visualblocks/visualblocks.xml000060400000001653152455721620014163 0ustar00<?xml version="1.0" ?>
<extension version="3.4" type="plugin" group="jce" method="upgrade">
	<name>WF_VISUALBLOCKS_TITLE</name>
	<version>2.9.99.2</version>
	<creationDate>22-04-2026</creationDate>
	<author>Ryan Demmer</author>
	<authorEmail>info@joomlacontenteditor.net</authorEmail>
	<authorUrl>https://www.joomlacontenteditor.net/</authorUrl>
	<copyright>Ryan Demmer</copyright>
	<license>GNU/GPL Version 2 or later - http://www.gnu.org/licenses/gpl-2.0.html</license>
	<description>WF_VISUALBLOCKS_DESC</description>
	<icon>visualblocks</icon>
	<fields name="visualblocks">
		<fieldset name="config">
			<field name="state" type="yesno" default="0" label="WF_LABEL_STATE" description="WF_STATE_DESC">
				<option value="1">JON</option>
				<option value="0">JOFF</option>
			</field>
		</fieldset>
	</fields>
	<help>
		<topic key="visualblocks.about" title="WF_VISUALBLOCKS_HELP_ABOUT" />
	</help>
	<languages></languages>
</extension>plugins/visualblocks/config.php000060400000000750152455721620012713 0ustar00<?php
/**
 * @package     JCE
 * @subpackage  Editor
 *
 * @copyright   Copyright (c) 2009-2024 Ryan Demmer. All rights reserved
 * @license     GNU General Public License version 2 or later; see LICENSE.txt
 */

\defined('_JEXEC') or die;

class WFVisualblocksPluginConfig
{
    public static function getConfig(&$settings)
    {
        $wf = WFApplication::getInstance();

        $settings['visualblocks_default_state'] = $wf->getParam('visualblocks.state', 0, 0, 'boolean');
    }
}
plugins/visualblocks/index.html000060400000000054152455721620012727 0ustar00<html><body bgcolor="#FFFFFF"></body></html>plugins/preview/config.php000060400000000661152455721620011674 0ustar00<?php
/**
 * @package     JCE
 * @subpackage  Editor
 *
 * @copyright   Copyright (c) 2009-2024 Ryan Demmer. All rights reserved
 * @license     GNU General Public License version 2 or later; see LICENSE.txt
 */

\defined('_JEXEC') or die;

class WFPreviewPluginConfig
{
    public static function getConfig(&$settings)
    {
        $wf = WFApplication::getInstance();
        $settings['extension_id'] = $wf->getContext();
    }
}
plugins/preview/index.html000060400000000054152455721620011707 0ustar00<html><body bgcolor="#FFFFFF"></body></html>plugins/preview/preview.php000060400000012500152455721620012103 0ustar00<?php
/**
 * @package     JCE
 * @subpackage  Editor
 *
 * @copyright   Copyright (c) 2009-2024 Ryan Demmer. All rights reserved
 * @license     GNU General Public License version 2 or later; see LICENSE.txt
 */

\defined('_JEXEC') or die;

use Joomla\CMS\Factory;
use Joomla\CMS\Language\Text;
use Joomla\CMS\Plugin\PluginHelper;
use Joomla\CMS\Table\Table;
use Joomla\CMS\Uri\Uri;
use Joomla\Registry\Registry;

class WFPreviewPlugin extends WFEditorPlugin
{
    /**
     * Constructor activating the default information of the class.
     */
    public function __construct()
    {
        parent::__construct();

        $request = WFRequest::getInstance();
        // Setup plugin XHR callback functions
        $request->setRequest(array($this, 'showPreview'));
    }

    /**
     * Display Preview content.
     */
    public function showPreview()
    {
        $app = Factory::getApplication();
        $user = Factory::getUser();

        // reset document type
        $document = Factory::getDocument();
        $document->setType('html');

        // register autoload for ContentHelperRoute
        JLoader::register('ContentHelperRoute', JPATH_SITE . '/components/com_content/helpers/route.php');

        // get post data
        $data = $app->input->post->get('data', '', 'RAW');

        // cleanup data
        $data = preg_replace(array('#<!DOCTYPE([^>]+)>#i', '#<(head|title|meta)([^>]*)>([\w\W]+)<\/1>#i', '#<\/?(html|body)([^>]*)>#i'), '', rawurldecode($data));

        // prevent processing by responsify
        $data = '{responsive=off}' . $data;

        // create params registry object
        $params = new Registry();
        $params->loadString("");

        // create context
        $context = "";

        $extension_id = $app->input->getInt('extension_id');
        $extension = Table::getInstance('extension');

        if ($extension->load($extension_id)) {
            $option = $extension->element;

            // set a default value
            if (empty($extension->params)) {
                $extension->params = '{}';
            }

            // process attribs (com_content etc.)
            $params->loadString($extension->params);
            // create context
            $context = $option . '.article';
        }

        $article = Table::getInstance('content');

        $article->id = 0;
        $article->created_by = $user->get('id');
        $article->parameters = new Registry();
        $article->text = $data;

        // load system plugins
        PluginHelper::importPlugin('system');

        // allow this to be skipped as some plugins can cause FATAL errors.
        if ((bool) $this->getParam('process_content', 1)) {
            $page = 0;

            // load content plugins
            PluginHelper::importPlugin('content');

            // set error reporting off to produce empty string on Fatal error
            error_reporting(0);

            // set params flag for responsify
            $params->set('wf_responsify', 0);

            $app->triggerEvent('onContentPrepare', array($context, &$article, &$params, $page));
        }

        $this->processURLS($article);

        // remove {responsive=off} from the beginning of the text
        $article->text = preg_replace('#^\{responsive=off\}#', '', $article->text);

        $app->triggerEvent('onWfContentPreview', array($context, &$article, &$params, 0));

        return $article->text;
    }

    /**
     * Convert URLs.
     *
     * @param object $article Article object
     */
    private function processURLS(&$article)
    {
        $base = Uri::root(true) . '/';
        $buffer = $article->text;

        $protocols = '[a-zA-Z0-9]+:'; //To check for all unknown protocals (a protocol must contain at least one alpahnumeric fillowed by :
        $regex = '#(src|href|poster)="(?!/|' . $protocols . '|\#|\')([^"]*)"#m';
        $buffer = preg_replace($regex, "$1=\"$base\$2\"", $buffer);
        $regex = '#(onclick="window.open\(\')(?!/|' . $protocols . '|\#)([^/]+[^\']*?\')#m';
        $buffer = preg_replace($regex, '$1' . $base . '$2', $buffer);

        // ONMOUSEOVER / ONMOUSEOUT
        $regex = '#(onmouseover|onmouseout)="this.src=([\']+)(?!/|' . $protocols . '|\#|\')([^"]+)"#m';
        $buffer = preg_replace($regex, '$1="this.src=$2' . $base . '$3$4"', $buffer);

        // Background image
        $regex = '#style\s*=\s*[\'\"](.*):\s*url\s*\([\'\"]?(?!/|' . $protocols . '|\#)([^\)\'\"]+)[\'\"]?\)#m';
        $buffer = preg_replace($regex, 'style="$1: url(\'' . $base . '$2$3\')', $buffer);

        // OBJECT <field name="xx", value="yy"> -- fix it only inside the <param> tag
        $regex = '#(<param\s+)name\s*=\s*"(movie|src|url)"[^>]\s*value\s*=\s*"(?!/|' . $protocols . '|\#|\')([^"]*)"#m';
        $buffer = preg_replace($regex, '$1name="$2" value="' . $base . '$3"', $buffer);

        // OBJECT <field value="xx", name="yy"> -- fix it only inside the <param> tag
        $regex = '#(<param\s+[^>]*)value\s*=\s*"(?!/|' . $protocols . '|\#|\')([^"]*)"\s*name\s*=\s*"(movie|src|url)"#m';
        $buffer = preg_replace($regex, '<field value="' . $base . '$2" name="$3"', $buffer);

        // OBJECT data="xx" attribute -- fix it only in the object tag
        $regex = '#(<object\s+[^>]*)data\s*=\s*"(?!/|' . $protocols . '|\#|\')([^"]*)"#m';
        $buffer = preg_replace($regex, '$1data="' . $base . '$2"$3', $buffer);

        $article->text = $buffer;
    }
}
plugins/preview/preview.xml000060400000001673152455721620012125 0ustar00<?xml version="1.0" ?>
<extension version="3.4" type="plugin" group="jce" method="upgrade">
	<name>WF_PREVIEW_TITLE</name>
	<version>2.9.99.2</version>
	<creationDate>22-04-2026</creationDate>
	<author>Ryan Demmer</author>
	<authorEmail>info@joomlacontenteditor.net</authorEmail>
	<authorUrl>https://www.joomlacontenteditor.net/</authorUrl>
	<copyright>Ryan Demmer</copyright>
	<license>GNU/GPL Version 2 or later - http://www.gnu.org/licenses/gpl-2.0.html</license>
	<description>WF_PREVIEW_DESC</description>
	<icon></icon>
	<fields name="preview">
		<fieldset name="config">
			<field name="process_content" type="yesno" default="1" label="WF_PREVIEW_PARAM_PROCESS_CONTENT" description="WF_PREVIEW_PARAM_PROCESS_CONTENT_DESC">
				<option value="1">JYES</option>
				<option value="0">JNO</option>
			</field>
		</fieldset>
	</fields>
	<help>
		<topic key="preview.about" title="WF_PREVIEW_HELP_ABOUT" />
	</help>
	<languages></languages>
</extension>
plugins/directionality/index.html000060400000000054152455721620013251 0ustar00<html><body bgcolor="#FFFFFF"></body></html>plugins/directionality/directionality.xml000060400000001245152455721620015024 0ustar00<?xml version="1.0" ?>
<extension version="3.4" type="plugin" group="jce" method="upgrade">
	<name>WF_DIRECTIONALITY_TITLE</name>
	<version>2.9.99.2</version>
	<creationDate>22-04-2026</creationDate>
	<author>Ryan Demmer</author>
	<authorEmail>info@joomlacontenteditor.net</authorEmail>
	<authorUrl>https://www.joomlacontenteditor.net/</authorUrl>
	<copyright>Ryan Demmer</copyright>
	<license>GNU/GPL Version 2 or later - http://www.gnu.org/licenses/gpl-2.0.html</license>
	<description>WF_DIRECTIONALITY_DESC</description>
	<icon>ltr,rtl</icon>
	<help>
		<topic key="directionality.about" title="WF_DIRECTIONALITY_HELP_ABOUT" />
	</help>
	<languages></languages>
</extension>plugins/link/config.php000060400000003340152455721620011145 0ustar00<?php
/**
 * @package     JCE
 * @subpackage  Editor
 *
 * @copyright   Copyright (c) 2009-2024 Ryan Demmer. All rights reserved
 * @license     GNU General Public License version 2 or later; see LICENSE.txt
 */

\defined('_JEXEC') or die;

class WFLinkPluginConfig
{
    public static function getConfig(&$settings)
    {
        require_once __DIR__ . '/link.php';

        $plugin = new WFLinkPlugin();
        $attributes = $plugin->getDefaults();

        $custom_classes = (array) $plugin->getParam('custom_classes', []);
        $custom_classes = array_filter($custom_classes);

        $config = array(
            'attributes' => $plugin->getDefaults(),
            'custom_classes' => $custom_classes,
        );

        // expose globally for use by Autolink and Clipboard
        $settings['default_link_target'] = $plugin->getParam('target', '');

        // expose globally for use by Autolink and Clipboard (must be boolean)
        $settings['autolink_email'] = $plugin->getParam('autolink_email', 1, 1, 'boolean');
        $settings['autolink_url'] = $plugin->getParam('autolink_url', 1, 1, 'boolean');

        if ($plugin->getParam('link.quicklink', 1) == 0) {
            $config['quicklink'] = false;
        }

        if ($plugin->getParam('link.basic_dialog', 0) == 1) {
            $config['basic_dialog'] = true;
            $config['file_browser'] = $plugin->getParam('file_browser', 1);

            $config['target_ctrl']  = $plugin->getParam('attributes_target', 1, 1, 'boolean');
            $config['title_ctrl']   = $plugin->getParam('attributes_title', 1, 1, 'boolean');
            $config['classes_ctrl']   = $plugin->getParam('attributes_classes', 1, 1, 'boolean');
        }

        $settings['link'] = $config;
    }
}
plugins/link/tmpl/index.html000060400000000054152455721620012137 0ustar00<html><body bgcolor="#FFFFFF"></body></html>plugins/link/tmpl/default.php000060400000001643152455721620012304 0ustar00<?php
/**
 * @package     JCE
 * @subpackage  Editor
 *
 * @copyright   Copyright (c) 2009-2024 Ryan Demmer. All rights reserved
 * @license     GNU General Public License version 2 or later; see LICENSE.txt
 */

 \defined('_JEXEC') or die;

 use Joomla\CMS\Factory;
 use Joomla\CMS\Language\Text;
 use Joomla\CMS\Session\Session;

$tabs = WFTabs::getInstance();

?>
<form action="#" class="uk-form uk-form-horizontal">
	<!-- Render Tabs -->
	<?php $tabs->render(); ?>
	<!-- Token -->	
	<input type="hidden" id="token" name="<?php echo Session::getFormToken(); ?>" value="1" />
</form>
<div class="actionPanel">
	<button class="button" id="cancel"><?php echo Text::_('WF_LABEL_CANCEL')?></button>

	<?php if ($this->plugin->showHelp()): ?>
		<button class="button" id="help"><?php echo Text::_('WF_LABEL_HELP')?></button>
	<?php endif; ?>

	<button class="button" id="insert"><?php echo Text::_('WF_LABEL_INSERT')?></button>
</div>plugins/link/tmpl/advanced.php000060400000020772152455721620012431 0ustar00<?php
/**
 * @package     JCE
 * @subpackage  Editor
 *
 * @copyright   Copyright (c) 2009-2024 Ryan Demmer. All rights reserved
 * @license     GNU General Public License version 2 or later; see LICENSE.txt
 */

\defined('_JEXEC') or die;

use Joomla\CMS\Language\Text;
?>
<div class="uk-form-row uk-grid uk-grid-small">
    <label class="uk-form-label uk-width-1-1  uk-width-small-3-10" for="id" class="hastip" title="<?php echo Text::_('WF_LABEL_ID_DESC'); ?>"><?php echo Text::_('WF_LABEL_ID'); ?></label>
    <div class="uk-form-controls uk-width-1-1  uk-width-small-7-10"><input id="id" type="text" value="" /></div>
</div>
<div class="uk-form-row uk-grid uk-grid-small">
    <label class="uk-form-label uk-width-1-1  uk-width-small-3-10" for="style" class="hastip" title="<?php echo Text::_('WF_LABEL_STYLE_DESC'); ?>"><?php echo Text::_('WF_LABEL_STYLE'); ?></label>
    <div class="uk-form-controls uk-width-1-1  uk-width-small-7-10"><input type="text" id="style" value="" /></div>
</div>
<div class="uk-form-row uk-grid uk-grid-small">
    <label class="uk-form-label uk-width-1-1  uk-width-small-3-10" for="classes" class="hastip" title="<?php echo Text::_('WF_LABEL_CLASSES_DESC'); ?>"><?php echo Text::_('WF_LABEL_CLASSES'); ?></label>
    <div class="uk-form-controls uk-width-1-1  uk-width-small-7-10">
        <input type="text" id="classes" class="uk-datalist" list="classes_datalist" multiple />
        <datalist id="classes_datalist"></datalist>
    </div>
</div>

<div class="uk-form-row uk-grid uk-grid-small">
    <label class="uk-form-label uk-width-1-1  uk-width-small-3-10" for="dir" class="hastip" title="<?php echo Text::_('WF_LABEL_DIR_DESC'); ?>"><?php echo Text::_('WF_LABEL_DIR'); ?></label>
    <div class="uk-form-controls uk-width-1-1  uk-width-small-7-10">
        <select id="dir">
            <option value=""><?php echo Text::_('WF_OPTION_NOT_SET'); ?></option>
            <option value="ltr"><?php echo Text::_('WF_OPTION_LTR'); ?></option>
            <option value="rtl"><?php echo Text::_('WF_OPTION_RTL'); ?></option>
        </select>
    </div>
</div>
<div class="uk-form-row uk-grid uk-grid-small">
    <label class="uk-form-label uk-width-1-1  uk-width-small-3-10" for="hreflang" class="hastip" title="<?php echo Text::_('WF_LABEL_HREFLANG_DESC'); ?>"><?php echo Text::_('WF_LABEL_HREFLANG'); ?></label>
    <div class="uk-form-controls uk-width-1-1  uk-width-small-7-10"><input type="text" id="hreflang" value="" /></div>
</div>
<div class="uk-form-row uk-grid uk-grid-small">
    <label class="uk-form-label uk-width-1-1  uk-width-small-3-10" for="lang" class="hastip" title="<?php echo Text::_('WF_LABEL_LANG_DESC'); ?>"><?php echo Text::_('WF_LABEL_LANG'); ?></label>
    <div class="uk-form-controls uk-width-1-1  uk-width-small-7-10"><input id="lang" type="text" value="" /></div>
</div>
<div class="uk-form-row uk-grid uk-grid-small">
    <label class="uk-form-label uk-width-1-1  uk-width-small-3-10" for="charset" class="hastip" title="<?php echo Text::_('WF_LABEL_CHARSET_DESC'); ?>"><?php echo Text::_('WF_LABEL_CHARSET'); ?></label>
    <div class="uk-form-controls uk-width-1-1  uk-width-small-7-10"><input type="text" id="charset" value="" /></div>
</div>
<div class="uk-form-row uk-grid uk-grid-small">
    <label class="uk-form-label uk-width-1-1  uk-width-small-3-10" for="type" class="hastip" title="<?php echo Text::_('WF_LABEL_MIME_TYPE_DESC'); ?>"><?php echo Text::_('WF_LABEL_MIME_TYPE'); ?></label>
    <div class="uk-form-controls uk-width-1-1  uk-width-small-7-10"><input type="text" id="type" value="" /></div>
</div>
<div class="uk-form-row uk-grid uk-grid-small">
    <label class="uk-form-label uk-width-1-1  uk-width-small-3-10" for="rel" class="hastip" title="<?php echo Text::_('WF_LABEL_REL_DESC'); ?>"><?php echo Text::_('WF_LABEL_REL'); ?></label>
    <div class="uk-form-controls uk-width-1-1  uk-width-small-7-10">
        <input type="text" id="rel" class="uk-datalist" list="rel_datalist" multiple />
        <datalist id="rel_datalist">
            <option value="nofollow">No Follow</option>
            <option value="alternate">Alternate</option>
            <option value="designates">Designates</option>
            <option value="stylesheet">Stylesheet</option>
            <option value="start">Start</option>
            <option value="next">Next</option>
            <option value="prev">Prev</option>
            <option value="contents">Contents</option>
            <option value="index">Index</option>
            <option value="glossary">Glossary</option>
            <option value="copyright">Copyright</option>
            <option value="chapter">Chapter</option>
            <option value="subsection">Subsection</option>
            <option value="appendix">Appendix</option>
            <option value="help">Help</option>
            <option value="bookmark">Bookmark</option>
            <option value="sponsored">Sponsored</option>
            <option value="ugc">User Generated Content</option>
        </datalist>
    </div>
</div>
<div class="uk-form-row uk-grid uk-grid-small">
    <label class="uk-form-label uk-width-1-1  uk-width-small-3-10" for="rev" class="hastip" title="<?php echo Text::_('WF_LABEL_REV_DESC'); ?>"><?php echo Text::_('WF_LABEL_REV'); ?></label>
    <div class="uk-form-controls uk-width-1-1  uk-width-small-7-10">
        <select id="rev">
            <option value=""><?php echo Text::_('WF_OPTION_NOT_SET'); ?></option>
            <option value="alternate">Alternate</option>
            <option value="designates">Designates</option>
            <option value="stylesheet">Stylesheet</option>
            <option value="start">Start</option>
            <option value="next">Next</option>
            <option value="prev">Prev</option>
            <option value="contents">Contents</option>
            <option value="index">Index</option>
            <option value="glossary">Glossary</option>
            <option value="copyright">Copyright</option>
            <option value="chapter">Chapter</option>
            <option value="subsection">Subsection</option>
            <option value="appendix">Appendix</option>
            <option value="help">Help</option>
            <option value="bookmark">Bookmark</option>
        </select>
    </div>
</div>
<div class="uk-form-row uk-grid uk-grid-small">
    <label class="uk-form-label uk-width-1-1  uk-width-small-3-10" for="tabindex" class="hastip" title="<?php echo Text::_('WF_LABEL_TABINDEX_DESC'); ?>"><?php echo Text::_('WF_LABEL_TABINDEX'); ?></label>
    <div class="uk-form-controls uk-width-1-1  uk-width-small-7-10"><input type="text" id="tabindex" value="" /></div>
</div>
<div class="uk-form-row uk-grid uk-grid-small">
    <label class="uk-form-label uk-width-1-1  uk-width-small-3-10" for="accesskey" class="hastip" title="<?php echo Text::_('WF_LABEL_ACCESSKEY_DESC'); ?>"><?php echo Text::_('WF_LABEL_ACCESSKEY'); ?></label>
    <div class="uk-form-controls uk-width-1-1  uk-width-small-7-10"><input type="text" id="accesskey" value="" /></div>
</div>

<div class="uk-form-row uk-grid uk-grid-small">
    <label for="custom_attributes" class="uk-form-label uk-width-1-1 uk-width-small-3-10"><?php echo Text::_('WF_LABEL_ATTRIBUTES'); ?></label>
    
    <div class="uk-form-controls uk-width-1-1 uk-width-small-7-10 uk-flex-wrap" id="custom_attributes">
        <div class="uk-form-row uk-repeatable uk-width-1-1">
            <div class="uk-form-controls uk-grid uk-grid-small uk-width-9-10">
                <label class="uk-form-label uk-width-1-1 uk-width-small-1-10"><?php echo Text::_('WF_LABEL_NAME'); ?></label>
                <div class="uk-form-controls uk-width-1-1 uk-width-small-3-10">
                    <input type="text" name="custom_attributes_name[]" />
                </div>
                <label class="uk-form-label uk-width-1-1 uk-width-small-1-10"><?php echo Text::_('WF_LABEL_VALUE'); ?></label>
                <div class="uk-form-controls uk-width-1-1 uk-width-small-5-10">
                    <input type="text" name="custom_attributes_value[]" />
                </div>
            </div>
            <div class="uk-form-controls uk-width-1-10 uk-margin-small-left">
                <button class="uk-button uk-button-link uk-repeatable-create" aria-label="<?php echo Text::_('WF_LABEL_ADD'); ?>" title="<?php echo Text::_('WF_LABEL_ADD'); ?>"><i class="uk-icon-plus"></i></button>
                <button class="uk-button uk-button-link uk-repeatable-delete" aria-label="<?php echo Text::_('WF_LABEL_REMOVE'); ?>" title="<?php echo Text::_('WF_LABEL_REMOVE'); ?>"><i class="uk-icon-trash"></i></button>
            </div>
        </div>
    </div>
</div>plugins/link/tmpl/link.php000060400000006472152455721620011622 0ustar00<?php
/**
 * @package     JCE
 * @subpackage  Editor
 *
 * @copyright   Copyright (c) 2009-2024 Ryan Demmer. All rights reserved
 * @license     GNU General Public License version 2 or later; see LICENSE.txt
 */

 \defined('_JEXEC') or die;

 use Joomla\CMS\Factory;
 use Joomla\CMS\Language\Text;
 use Joomla\CMS\Session\Session;

$search = $this->plugin->getSearch('link');
$links = $this->plugin->getLinks();

?>
<div class="uk-form-row uk-grid uk-grid-small">
    <label class="uk-form-label uk-width-1-1  uk-width-small-1-5" for="href" class="hastip" title="<?php echo Text::_('WF_LABEL_URL_DESC'); ?>"><?php echo Text::_('WF_LABEL_URL'); ?></label>
    <div class="uk-form-controls uk-form-icon uk-form-icon-flip uk-width-1-1  uk-width-small-4-5">
        <input id="href" type="text" value="" required class="browser" />
        <button class="email uk-icon uk-icon-email uk-button uk-button-link" aria-haspopup="true" aria-label="<?php echo Text::_('WF_LABEL_EMAIL'); ?>" title="<?php echo Text::_('WF_LABEL_EMAIL'); ?>"></button>
    </div>
</div>
<div class="uk-form-row uk-grid uk-grid-small">
    <label for="text" class="uk-form-label uk-width-1-1  uk-width-small-1-5 hastip" title="<?php echo Text::_('WF_LINK_LINK_TEXT_DESC'); ?>"><?php echo Text::_('WF_LINK_LINK_TEXT'); ?></label>
    <div class="uk-form-controls uk-width-1-1  uk-width-small-4-5">
        <input id="text" type="text" value="" required placeholder="<?php echo Text::_('WF_ELEMENT_SELECTION'); ?>" />
    </div>
</div>
<?php if ($search->isEnabled() || count($links->getLists())) : ?>
    <div id="link-options" class="uk-placeholder">
        <?php echo $search->render(); ?>
        <?php echo $links->render(); ?>
    </div>
<?php endif; ?>
<div class="uk-form-row uk-hidden-mini uk-form-row uk-grid uk-grid-small" id="attributes-anchor">
    <label for="anchor" class="uk-form-label uk-width-1-1  uk-width-small-1-5 hastip" title="<?php echo Text::_('WF_LABEL_ANCHORS_DESC'); ?>"><?php echo Text::_('WF_LABEL_ANCHORS'); ?></label>
    <div class="uk-form-controls uk-width-1-1  uk-width-small-4-5" id="anchor_container"></div>
</div>

<div class="uk-form-row uk-grid uk-grid-small" id="attributes-target">
    <label for="target" class="uk-form-label uk-width-1-1  uk-width-small-1-5 hastip" title="<?php echo Text::_('WF_LABEL_TARGET_DESC'); ?>"><?php echo Text::_('WF_LABEL_TARGET'); ?></label>
    <div class="uk-form-controls uk-width-1-1  uk-width-small-4-5">
        <select id="target">
            <option value=""><?php echo Text::_('WF_OPTION_NOT_SET'); ?></option>
            <option value="_self"><?php echo Text::_('WF_OPTION_TARGET_SELF'); ?></option>
            <option value="_blank"><?php echo Text::_('WF_OPTION_TARGET_BLANK'); ?></option>
            <option value="_parent"><?php echo Text::_('WF_OPTION_TARGET_PARENT'); ?></option>
            <option value="_top"><?php echo Text::_('WF_OPTION_TARGET_TOP'); ?></option>
        </select>
    </div>
</div>

<div class="uk-form-row uk-grid uk-grid-small uk-hidden-mini" id="attributes-title">
    <label class="uk-form-label uk-width-1-1  uk-width-small-1-5" for="title" class="hastip" title="<?php echo Text::_('WF_LABEL_TITLE_DESC'); ?>"><?php echo Text::_('WF_LABEL_TITLE'); ?></label>
    <div class="uk-form-controls uk-width-1-1  uk-width-small-4-5">
        <input id="title" type="text" value="" />
    </div>
</div>
plugins/link/index.html000060400000000054152455721620011163 0ustar00<html><body bgcolor="#FFFFFF"></body></html>plugins/link/link.php000060400000005723152455721620010644 0ustar00<?php
/**
 * @package     JCE
 * @subpackage  Editor
 *
 * @copyright   Copyright (c) 2009-2024 Ryan Demmer. All rights reserved
 * @license     GNU General Public License version 2 or later; see LICENSE.txt
 */

\defined('_JEXEC') or die;

// Link Plugin Controller
class WFLinkPlugin extends WFEditorPlugin
{
    protected $name = 'link';

    public $extensions = array();
    public $popups = array();
    public $tabs = array();

    /**
     * Constructor activating the default information of the class.
     */
    public function __construct()
    {
        parent::__construct();

        $this->getLinks();
        $this->getSearch('link');
    }

    public function display()
    {
        parent::display();

        $document = WFDocument::getInstance();
        $settings = $this->getSettings();

        $document->addScriptDeclaration('LinkDialog.settings=' . json_encode($settings) . ';');

        $tabs = WFTabs::getInstance(array(
            'base_path' => WF_EDITOR_PLUGIN,
        ));

        // Add tabs
        $tabs->addTab('link', 1, array('plugin' => $this));
        $tabs->addTab('advanced', $this->getParam('tabs_advanced', 1));

        // get and display links
        $links = $this->getLinks();
        $links->display();

        // get and display search
        $search = $this->getSearch('link');
        $search->display();

        // Load Popups instance
        $popups = WFPopupsExtension::getInstance(array(
            'text' => false,
            'default' => $this->getParam('link.popups.default', ''),
        ));

        $popups->display();

        // add link stylesheet
        $document->addStyleSheet(array('link'), 'plugins');
        // add link scripts last
        $document->addScript(array('link'), 'plugins');
    }

    public function showHelp()
    {
        return (bool) $this->getParam('help_button', 1);
    }

    public function getLinks()
    {
        static $links;

        if (!isset($links)) {
            $links = WFLinkExtension::getInstance();
        }

        return $links;
    }

    public function getSearch($type = 'link')
    {
        static $search;

        if (!isset($search)) {
            $search = array();
        }

        if (empty($search[$type])) {
            $search[$type] = WFSearchExtension::getInstance($type);
        }

        return $search[$type];
    }

    public function getSettings($settings = array())
    {
        $profile = $this->getProfile();

        $settings = array(
            'file_browser' => $this->getParam('file_browser', 1) && in_array('browser', explode(',', $profile->plugins)),
            'attributes' => array(
                'target'    => $this->getParam('attributes_target', 1),
                'anchor'    => $this->getParam('attributes_anchor', 1),
                'classes'   => $this->getParam('attributes_classes', 1),
                'title'     => $this->getParam('attributes_title', 1),
            ),
        );

        return parent::getSettings($settings);
    }
}
plugins/link/link.xml000060400000022167152455721620010656 0ustar00<?xml version="1.0" ?>
<extension version="3.4" type="plugin" group="jce" method="upgrade">
    <name>WF_LINK_TITLE</name>
    <version>2.9.99.2</version>
    <creationDate>22-04-2026</creationDate>
    <author>Ryan Demmer</author>
    <authorEmail>info@joomlacontenteditor.net</authorEmail>
    <authorUrl>https://www.joomlacontenteditor.net/</authorUrl>
    <copyright>Ryan Demmer</copyright>
    <license>GNU/GPL Version 2 or later - http://www.gnu.org/licenses/gpl-2.0.html</license>
    <description>WF_LINK_DESC</description>
    <icon>link</icon>
    <layout>link</layout>
    <files></files>
    <fields name="link">
        <fieldset name="config">

            <field name="autolink_email" type="yesno" default="1" label="WF_LINK_AUTOLINK_EMAIL" description="WF_LINK_AUTOLINK_EMAIL_DESC">
                <option value="1">JYES</option>
                <option value="0">JNO</option>
            </field>

            <field name="autolink_url" type="yesno" default="1" label="WF_LINK_AUTOLINK_URL" description="WF_LINK_AUTOLINK_URL_DESC">
                <option value="1">JYES</option>
                <option value="0">JNO</option>
            </field>

            <field name="attributes_target" type="yesno" default="1" label="WF_LINK_SHOW_TARGET" description="WF_LINK_SHOW_TARGET_DESC">
                <option value="1">JYES</option>
                <option value="0">JNO</option>
            </field>

            <field name="attributes_title" type="yesno" default="1" label="WF_LINK_SHOW_TITLE" description="WF_LINK_SHOW_TITLE_DESC">
                <option value="1">JYES</option>
                <option value="0">JNO</option>
            </field>

            <field name="attributes_classes" type="yesno" default="1" label="WF_LINK_SHOW_CLASSES" description="WF_LINK_SHOW_CLASSES_DESC">
                <option value="1">JYES</option>
                <option value="0">JNO</option>
            </field>

            <field name="help_button" type="yesno" default="1" label="WF_LINK_HELP_BUTTON" description="WF_LINK_HELP_BUTTON_DESC">
                <option value="1">JYES</option>
                <option value="0">JNO</option>
            </field>

            <field name="custom_classes" type="repeatable" default="" label="WF_LABEL_CUSTOM_CLASSES" description="WF_LABEL_CUSTOM_CLASSES_DESC">
                <field type="text" size="50" hiddenLabel="true" />
            </field>

            <field name="quicklink" type="yesno" default="1" label="WF_LINK_QUICKLINK" description="WF_LINK_QUICKLINK_DESC">
                <option value="1">JYES</option>
                <option value="0">JNO</option>
            </field>
            
            <field name="file_browser" type="yesno" default="1" label="WF_URL_FILE_BROWSER" description="WF_URL_FILE_BROWSER_DESC" class="btn-group btn-group-yesno">
                <option value="1">JYES</option>
                <option value="0">JNO</option>
            </field>

            <field type="container" name="browser" showon="file_browser:1"></field>

            <field name="basic_dialog" type="yesno" default="0" label="WF_PARAM_BASIC_DIALOG" description="WF_PARAM_BASIC_DIALOG_DESC" class="btn-group btn-group-yesno">
                <option value="1">JYES</option>
                <option value="0">JNO</option>
            </field>

            <field type="container" label="" showon="basic_dialog:0">
                <field name="tabs_advanced" type="yesno" default="1" label="WF_LINK_PARAM_TAB_ADVANCED" description="WF_LINK_PARAM_TAB_ADVANCED_DESC">
                    <option value="1">JYES</option>
                    <option value="0">JNO</option>
                </field>

                <field name="attributes_anchor" type="yesno" default="1" label="WF_LINK_SHOW_ANCHOR" description="WF_LINK_SHOW_ANCHOR_DESC">
                    <option value="1">JYES</option>
                    <option value="0">JNO</option>
                </field>
            </field>

            <fieldset name="defaults">
                <field type="heading" label="WF_PROFILES_PLUGINS_DEFAULTS" />
                
                <field name="target" type="list" default="" label="WF_LABEL_TARGET" description="WF_LINK_PARAM_DEFAULT_TARGET_DESC">
                    <option value="">WF_OPTION_NOT_SET</option>
                    <option value="_self">WF_OPTION_TARGET_SELF</option>
                    <option value="_blank">WF_OPTION_TARGET_BLANK</option>
                    <option value="_parent">WF_OPTION_TARGET_PARENT</option>
                    <option value="_top">WF_OPTION_TARGET_TOP</option>
                </field>

                <field type="text" name="id" default="" size="50" label="WF_LABEL_ID" description="WF_LABEL_ID_DESC" />
                <field type="text" name="style" default="" size="50" label="WF_LABEL_STYLE" description="WF_LABEL_STYLE_DESC" />
                <field type="text" name="classes" default="" size="50" label="WF_LABEL_CLASSES" description="WF_LABEL_CLASSES_DESC" />

                <field type="list" name="direction" default="" label="WF_LABEL_DIR" description="WF_LABEL_DIR_DESC">
                    <option value="">WF_OPTION_NOT_SET</option>
                    <option value="ltr">WF_OPTION_LTR</option>
                    <option value="rtl">WF_OPTION_RTL</option>
                </field>

                <field type="text" name="hreflang" default="" size="50" label="WF_LABEL_HREFLANG" description="WF_LABEL_HREFLANG_DESC" />
                <field type="text" name="lang" default="" size="50" label="WF_LABEL_LANG" description="WF_LABEL_LANG_DESC" />
                <field type="text" name="charset" default="" size="50" label="WF_LABEL_CHARSET" description="WF_LABEL_CHARSET_DESC" />
                <field type="text" name="type" default="" size="50" label="WF_LABEL_MIME_TYPE" description="WF_LABEL_MIME_TYPE_DESC" />
                <field type="list" name="rel" default="" class="editable" label="WF_LABEL_REL" description="WF_LABEL_REL_DESC">
                    <option value="">WF_OPTION_NOT_SET</option>
                    <option value="nofollow">No Follow</option>
                    <option value="alternate">Alternate</option>
                    <option value="designates">Designates</option>
                    <option value="stylesheet">Stylesheet</option>
                    <option value="start">Start</option>
                    <option value="next">Next</option>
                    <option value="prev">Prev</option>
                    <option value="contents">Contents</option>
                    <option value="index">Index</option>
                    <option value="glossary">Glossary</option>
                    <option value="copyright">Copyright</option>
                    <option value="chapter">Chapter</option>
                    <option value="subsection">Subsection</option>
                    <option value="appendix">Appendix</option>
                    <option value="help">Help</option>
                    <option value="bookmark">Bookmark</option>
                </field>
                <field type="list" name="rev" default="" label="WF_LABEL_REV" description="WF_LABEL_REV_DESC">
                    <option value="">WF_OPTION_NOT_SET</option>
                    <option value="alternate">Alternate</option>
                    <option value="designates">Designates</option>
                    <option value="stylesheet">Stylesheet</option>
                    <option value="start">Start</option>
                    <option value="next">Next</option>
                    <option value="prev">Prev</option>
                    <option value="contents">Contents</option>
                    <option value="index">Index</option>
                    <option value="glossary">Glossary</option>
                    <option value="copyright">Copyright</option>
                    <option value="chapter">Chapter</option>
                    <option value="subsection">Subsection</option>
                    <option value="appendix">Appendix</option>
                    <option value="help">Help</option>
                    <option value="bookmark">Bookmark</option>
                </field>
                <field type="text" name="tabindex" default="" size="50" label="WF_LABEL_TABINDEX" description="WF_LABEL_TABINDEX_DESC" />
                <field type="text" name="accesskey" default="" size="50" label="WF_LABEL_ACCESSKEY" description="WF_LABEL_ACCESSKEY_DESC" />

                <field name="attributes" type="keyvalue" default="" label="WF_PARAM_CUSTOM_ATTRIBUTES" description="WF_PARAM_CUSTOM_ATTRIBUTES_DESC" boolean="true" />

            </fieldset>
        </fieldset>

        <fieldset name="plugin.links" />
        <fieldset name="plugin.search" />
        <fieldset name="plugin.popups" />

    </fields>
    <extensions>links,search,popups</extensions>
    <languages></languages>
    <help>
        <topic key="link.about" title="WF_LINK_HELP_ABOUT" />
        <topic key="link.interface" title="WF_LINK_HELP_INTERFACE" />
        <!--topic key="link.content" title="WF_LINK_HELP_LINKS" /-->
        <topic key="link.advanced" title="WF_LINK_HELP_ADVANCED" />
        <topic key="link.insert" title="WF_LINK_HELP_INSERT" />
        <topic key="link.email" title="WF_LINK_HELP_EMAIL" />
    </help>
</extension>plugins/nonbreaking/nonbreaking.xml000060400000001235152455721620013547 0ustar00<?xml version="1.0" ?>
<extension version="3.4" type="plugin" group="jce" method="upgrade">
	<name>WF_NONBREAKING_TITLE</name>
	<version>2.9.99.2</version>
	<creationDate>22-04-2026</creationDate>
	<author>Ryan Demmer</author>
	<authorEmail>info@joomlacontenteditor.net</authorEmail>
	<authorUrl>https://www.joomlacontenteditor.net/</authorUrl>
	<copyright>Ryan Demmer</copyright>
	<license>GNU/GPL Version 2 or later - http://www.gnu.org/licenses/gpl-2.0.html</license>
	<description>WF_NONBREAKING_DESC</description>
	<icon>nonbreaking</icon>
	<help>
		<topic key="nonbreaking.about" title="WF_NONBREAKING_HELP_ABOUT" />
	</help>
	<languages></languages>
</extension>plugins/nonbreaking/index.html000060400000000054152455721620012523 0ustar00<html><body bgcolor="#FFFFFF"></body></html>libraries/classes/manager.php000060400000000575152455721620012314 0ustar00<?php
/**
 * @package     JCE
 * @subpackage  Editor
 *
 * @copyright   Copyright (C) 2005 - 2020 Open Source Matters, Inc. All rights reserved.
 * @copyright   Copyright (c) 2009-2024 Ryan Demmer. All rights reserved
 * @license     GNU General Public License version 2 or later; see LICENSE.txt
 */

\defined('_JEXEC') or die;

class WFMediaManager extends WFMediaManagerBase
{
}libraries/classes/packer.php000060400000026536152455721620012154 0ustar00<?php
/**
 * @package     JCE
 * @subpackage  Editor
 *
 * @copyright   Copyright (C) 2005 - 2020 Open Source Matters, Inc. All rights reserved.
 * @copyright   Copyright (c) 2009-2024 Ryan Demmer. All rights reserved
 * @license     GNU General Public License version 2 or later; see LICENSE.txt
 */

\defined('_JEXEC') or die;

use Joomla\CMS\Object\CMSObject;
use Joomla\CMS\Uri\Uri;

class WFPacker extends CMSObject
{
    const IMPORT_RX = '#@import.*?(?:\(([^\)]+)\);|(?:[\'"]([^\'"]+)[\'"]);)#i'; // match @import url('...'); or @import '...'; or @import "...";

    protected $files = array();
    protected $type = 'javascript';
    protected $text = '';
    protected $start = '';
    protected $end = '';
    protected static $imports = array();

    /**
     * Constructor activating the default information of the class.
     */
    public function __construct($config = array())
    {
        $this->setProperties($config);
    }

    public function setFiles($files = array())
    {
        $this->files = $files;
    }

    public function getFiles()
    {
        return $this->files;
    }

    public function setText($text = '')
    {
        $this->text = $text;
    }

    public function setContentStart($start = '')
    {
        $this->start = $start;
    }

    public function getContentStart()
    {
        return $this->start;
    }

    public function setContentEnd($end = '')
    {
        $this->end = $end;
    }

    public function getContentEnd()
    {
        return $this->end;
    }

    public function setType($type)
    {
        $this->type = $type;
    }

    public function getType()
    {
        return $this->type;
    }

    /**
     * Get encoding.
     *
     * @copyright Copyright (C) 2005 - 2010 Open Source Matters. All rights reserved
     */
    private static function getEncoding()
    {
        if (!isset($_SERVER['HTTP_ACCEPT_ENCODING'])) {
            return false;
        }

        $encoding = false;

        if (false !== strpos($_SERVER['HTTP_ACCEPT_ENCODING'], 'gzip')) {
            $encoding = 'gzip';
        }

        if (false !== strpos($_SERVER['HTTP_ACCEPT_ENCODING'], 'x-gzip')) {
            $encoding = 'x-gzip';
        }

        return $encoding;
    }

    private function getEtag($hash)
    {
        if (strpos($hash, '"') !== 0) {
            $hash = '"' . $hash . '"';
        }

        return $hash;
    }

    /**
     * Pack and output content based on type.
     *
     * @param bool|true  $minify
     * @param bool|true $cache
     * @param bool|false $gzip
     * Contains some code from libraries/joomla/cache/controller/page.php - Copyright (C) 2005 - 2015 Open Source Matters, Inc. All rights reserved
     */
    public function pack($minify = true, $cache_validation = true, $gzip = false)
    {
        $type = $this->getType();

        ob_start();

        // Headers
        if ($type == 'javascript') {
            header('Content-type: application/javascript; charset: UTF-8');
        }

        if ($type == 'css') {
            header('Content-type: text/css; charset: UTF-8');
        }

        // encoding
        header('Vary: Accept-Encoding');

        // cache control
        header('Cache-Control: max-age=0,no-cache');

        $files = $this->getFiles();

        $content = $this->getContentStart();

        if (empty($files)) {
            $content .= $this->getText();
        } else {
            foreach ($files as $file) {
                $content .= $this->getText($file, $minify);
            }
        }

        if ($this->getType() == 'css') {
            // move external import rules to top
            foreach (array_unique(self::$imports) as $import) {
                if (strpos($import, '//') !== false) {
                    $content = '@import url("' . $import . '");' . $content;
                }
            }
        }

        $content .= $this->getContentEnd();

        // trim content
        $content = trim($content);

        // force browser caching using an E-tag
        if ($cache_validation) {
            // get content hash
            $hash = md5(implode(' ', array_map('basename', $files)) . $content);
            // create E-tag
            $etag = $this->getEtag($hash);
            // set etag header
            header('ETag: ' . $etag);

            // check for sent etag against hash
            if (!headers_sent() && isset($_SERVER['HTTP_IF_NONE_MATCH'])) {
                $_etag = stripslashes($_SERVER['HTTP_IF_NONE_MATCH']);

                if ($_etag && $_etag === $etag) {
                    header('HTTP/1.x 304 Not Modified', true);
                    exit(ob_get_clean());
                }
            }
        }

        // Generate GZIP'd content
        if ($gzip) {
            $encoding = self::getEncoding();

            $zlib = function_exists('ini_get') && extension_loaded('zlib') && ini_get('zlib.output_compression');

            if (!empty($encoding) && !$zlib && function_exists('gzencode')) {
                header('Content-Encoding: ' . $encoding);
                $content = gzencode($content, 4, FORCE_GZIP);
            }
        }

        // stream to client
        echo $content;

        exit(ob_get_clean());
    }

    protected function jsmin($data)
    {
        // remove header comments
        return preg_replace('#^\/\*[\s\S]+?\*\/#', '', $data);
    }

    /**
     * Simple CSS Minifier
     * https://github.com/GaryJones/Simple-PHP-CSS-Minification.
     *
     * @param $data Data string to minify
     */
    protected function cssmin($css)
    {
        // Normalize whitespace
        //$css = preg_replace('/\s+/', ' ', $css);
        // Remove comment blocks, everything between /* and */, unless
        // preserved with /*! ... */
        //$css = preg_replace('/\/\*[^\!](.*?)\*\//', '', $css);
        // Remove space after , : ; { }
        //$css = preg_replace('/(,|:|;|\{|}) /', '$1', $css);
        // Remove space before , ; { }
        //$css = preg_replace('/ (,|;|\{|})/', '$1', $css);
        // Strips leading 0 on decimal values (converts 0.5px into .5px)
        //$css = preg_replace('/(:| )0\.([0-9]+)(%|em|ex|px|in|cm|mm|pt|pc)/i', '${1}.${2}${3}', $css);
        // Strips units if value is 0 (converts 0px to 0)
        //$css = preg_replace('/(:| )(\.?)0(%|em|ex|px|in|cm|mm|pt|pc)/i', '${1}0', $css);
        // Converts all zeros value into short-hand
        //$css = preg_replace('/0 0 0 0/', '0', $css);
        // Shortern 6-character hex color codes to 3-character where possible
        //$css = preg_replace('/#([a-f0-9])\\1([a-f0-9])\\2([a-f0-9])\\3/i', '#\1\2\3', $css);

        require_once __DIR__ . '/vendor/cssmin/cssmin.php';

        try {
            $css = CssMin::minify($css);
        } catch (Exception $e) {
        }

        return trim($css);
    }

    /**
     * Import CSS from a file.
     *
     * @param file File path where data comes from
     * @param $data Data from file
     */
    protected function importCss($data, $file)
    {
        if (preg_match_all(self::IMPORT_RX, $data, $matches)) {
            $data = '';

            foreach ($matches[1] as $match) {
                // clean up url
                $match = str_replace(array('url', '"', "'", '(', ')'), '', $match);
                // trim
                $match = trim($match);

                if ($match) {
                    // external url, skip it
                    if (strpos($match, '//') !== false) {
                        // add to imports list
                        self::$imports[] = $match;
                        continue;
                    }

                    // url has a query, remove
                    if (strpos($match, '?') !== false) {
                        $match = substr($match, 0, strpos($match, '?'));
                    }

                    if (strpos($match, '&') !== false) {
                        $match = substr($match, 0, strpos($match, '&'));
                    }

                    // get full path
                    $path = realpath($this->get('_cssbase') . '/' . $match);

                    // already import, don't repeat!
                    if (in_array($path, self::$imports)) {
                        continue;
                    }

                    // get data
                    $data .= $this->getText($path);
                }
            }

            return $data;
        }

        return '';
    }

    protected function compileLess($string, $path)
    {
        $less = new lessc();
        // add file directory
        $less->addImportDir($path);
        // add joomla media folder
        $less->addImportDir(JPATH_SITE . '/media');

        try {
            return $less->compile($string);
        } catch (Exception $e) {
            return '/* LESS file could not be compiled due to error - ' . $e->getMessage() . ' */';
        }
    }

    protected function getText($file = null, $minify = true)
    {
        if ($file && is_file($file)) {
            $text = file_get_contents($file);

            if ($text) {
                // process css files
                if ($this->getType() == 'css') {
                    // compile less files
                    if (preg_match('#\.less$#', $file)) {
                        $text = $this->compileLess($text, dirname($file));
                    }

                    if ($minify) {
                        // minify
                        $text = $this->cssmin($text, $file);
                    }

                    // add to imports list
                    self::$imports[] = $file;

                    if (strpos($text, '@import') !== false) {
                        // store the base path of the current file
                        $this->set('_cssbase', dirname($file));

                        // process import rules
                        $text = $this->importCss($text, $file) . preg_replace(self::IMPORT_RX, '', $text);
                    }

                    // store the base path of the current file
                    $this->set('_imgbase', dirname($file));

                    // process urls
                    $text = preg_replace_callback('#url\s?\([\'"]?([^\'"\))]+)[\'"]?\)#', array('WFPacker', 'processPaths'), $text);
                }
                // make sure text ends in a semi-colon;
                if ($this->getType() == 'javascript') {
                    $text = rtrim(trim($text), ';') . ';';

                    if ($minify) {
                        $text = $this->jsmin($text);
                    }
                }

                return $text;
            }
        }

        return $this->text;
    }

    protected function processPaths($data)
    {
        if (isset($data[1])) {
            if (strpos($data[1], '//') === false) {
                $path = parse_url($data[1], PHP_URL_PATH);

                if (empty($path)) {
                    $path = $data[1];
                }

                // get query, if any, eg: ?v=273
                $query = parse_url($data[1], PHP_URL_QUERY);

                if (empty($query)) {
                    $query = "";
                } else {
                    $query = "?" . $query;
                }

                $path = str_replace(JPATH_SITE, '', realpath($this->get('_imgbase') . '/' . $path));

                if ($path) {
                    return "url('" . Uri::root(true) . str_replace('\\', '/', $path) . $query . "')";
                }

                return "url('" . $data[1] . "')";
            }

            return $data[1];
        }

        return '';
    }
}
libraries/classes/languageparser.php000060400000032060152455721620013674 0ustar00<?php
/**
 * @package     JCE
 * @subpackage  Editor
 *
 * @copyright   Copyright (C) 2005 - 2020 Open Source Matters, Inc. All rights reserved.
 * @copyright   Copyright (c) 2009-2024 Ryan Demmer. All rights reserved
 * @license     GNU General Public License version 2 or later; see LICENSE.txt
 */

\defined('_JEXEC') or die;

use Joomla\CMS\Factory;
use Joomla\Filesystem\Path;
use Joomla\CMS\Object\CMSObject;

class WFLanguageParser extends CMSObject
{
    protected $mode = 'editor';
    protected $plugins = array();
    protected $sections = array();

    protected $language = 'en-GB';

    /**
     * Cache of processed data.
     *
     * @var array
     *
     * @since  11.1
     */
    protected static $cache = array();

    public function __construct($config = array())
    {
        if (array_key_exists('plugins', $config)) {
            $config['plugins'] = (array) $config['plugins'];
        }

        if (array_key_exists('sections', $config)) {
            $config['sections'] = (array) $config['sections'];
        }

        if (array_key_exists('language', $config)) {
            $config['language'] = $config['language'];
        }

        $this->setProperties($config);
    }

    /**
     * Parse an INI formatted string and convert it into an array.
     *
     * @param string $data             INI formatted string to convert
     * @param bool   $process_sections A boolean setting to process sections
     * @param array  $sections         An array of sections to include
     * @param mixed  $filter           A regular expression to filter sections by
     *
     * @return array Data array
     *
     * @since   2.4
     *
     * Based on JRegistryFormatINI::stringToObject
     *
     * @copyright   Copyright (C) 2005 - 2013 Open Source Matters, Inc. All rights reserved
     * @license     GNU General Public License version 2 or later; see LICENSE
     */
    protected static function ini_to_array($data, $process_sections = false, $sections = array(), $filter = '')
    {
        // Check the memory cache for already processed strings.
        $hash = md5($data . ':' . (int) $process_sections . ':' . serialize($sections) . ':' . $filter);

        if (isset(self::$cache[$hash])) {
            return self::$cache[$hash];
        }

        // If no lines present just return the array.
        if (empty($data)) {
            return array();
        }

        $array = array();
        $section = false;
        $lines = explode("\n", $data);

        // Process the lines.
        foreach ($lines as $line) {
            // Trim any unnecessary whitespace.
            $line = trim($line);

            // Ignore empty lines and comments.
            if (empty($line) || ($line[0] == ';')) {
                continue;
            }

            if ($process_sections) {
                $length = strlen($line);

                // If we are processing sections and the line is a section add the object and continue.
                if (($line[0] == '[') && ($line[$length - 1] == ']')) {
                    $section = substr($line, 1, $length - 2);

                    // filter section by regular expression
                    if ($filter) {
                        if (preg_match('#' . $filter . '#', $section)) {
                            continue;
                        }
                    }

                    // allow all sections
                    if (empty($sections)) {
                        $array[$section] = array();
                    } else {
                        if (in_array($section, $sections)) {
                            $array[$section] = array();
                        }
                    }

                    continue;
                }
            } elseif ($line[0] == '[') {
                continue;
            }

            // Check that an equal sign exists and is not the first character of the line.
            if (!strpos($line, '=')) {
                // Maybe throw exception?
                continue;
            }

            // Get the key and value for the line.
            list($key, $value) = explode('=', $line, 2);

            // Validate the key.
            if (preg_match('/[^A-Z0-9_]/i', $key)) {
                // Maybe throw exception?
                continue;
            }

            // If the value is quoted then we assume it is a string.
            $length = strlen($value);

            if ($length && ($value[0] == '"') && ($value[$length - 1] == '"')) {
                // Strip the quotes and Convert the new line characters.
                $value = stripcslashes(substr($value, 1, ($length - 2)));
                $value = str_replace(array("\n", "\r"), array('\n', '\r'), $value);
            } else {
                // If the value is not quoted, we assume it is not a string.
                // If the value is 'false' assume boolean false.
                if ($value == 'false') {
                    $value = false;
                }
                // If the value is 'true' assume boolean true.
                elseif ($value == 'true') {
                    $value = true;
                }
                // If the value is numeric than it is either a float or int.
                elseif (is_numeric($value)) {
                    // If there is a period then we assume a float.
                    if (strpos($value, '.') !== false) {
                        $value = (float) $value;
                    } else {
                        $value = (int) $value;
                    }
                }
            }

            // If a section is set add the key/value to the section, otherwise top level.
            if ($section) {
                $array[$section][$key] = $value;
            } else {
                $array[$key] = $value;
            }
        }

        // Cache the string
        self::$cache[$hash] = $array;

        return $array;
    }

    protected static function getOverrides()
    {
        // get the language file
        $language = Factory::getLanguage();
        // get language tag
        $tag = $language->getTag();

        $file = JPATH_SITE . '/language/overrides/' . $tag . '.override.ini';

        $ini = array();

        if (is_file($file)) {
            $content = @file_get_contents($file);

            if ($content && is_string($content)) {
                $ini = @parse_ini_string($content, true);
            }
        }

        return $ini;
    }

    protected static function filterSections($ini, $sections = array(), $filter = '')
    {
        if ($ini && is_array($ini)) {
            if (!empty($sections)) {
                $ini = array_intersect_key($ini, array_flip($sections));
            }

            // filter keys by regular expression
            if ($filter) {
                foreach (array_keys($ini) as $key) {
                    if (preg_match('#' . $filter . '#', $key)) {
                        unset($ini[$key]);
                    }
                }
            }
        }

        return $ini;
    }

    protected static function processLanguageINI($files, $sections = array(), $filter = '')
    {
        $data = array();

        foreach ((array) $files as $file) {
            if (!is_file($file)) {
                continue;
            }

            $ini = false;

            $content = @file_get_contents($file);

            if ($content && is_string($content)) {
                if (function_exists('parse_ini_string')) {
                    $ini = @parse_ini_string($content, true);
                    // filter
                    $ini = self::filterSections($ini, $sections, $filter);
                } else {
                    $ini = self::ini_to_array($content, true, $sections, $filter);
                }
            }

            // merge with data array
            if ($ini && is_array($ini)) {
                $data = array_merge($data, $ini);
            }
        }

        $output = '';

        // get overrides
        $overrides = self::getOverrides();

        if (!empty($data)) {
            $x = 0;

            foreach ($data as $key => $strings) {
                if (is_array($strings)) {
                    $output .= '"' . strtolower($key) . '":{';

                    $i = 0;

                    foreach ($strings as $k => $v) {
                        if (!empty($overrides) && array_key_exists(strtoupper($k), $overrides)) {
                            $v = $overrides[$k];
                        }

                        // remove "
                        $v = str_replace('"', '', $v);

                        if (is_numeric($v)) {
                            $v = (float) $v;
                        } else {
                            $v = '"' . $v . '"';
                        }

                        // key to lowercase
                        $k = strtolower($k);

                        // remove WF_
                        $k = str_replace('wf_', '', $k);

                        // remove "_dlg"
                        $key = preg_replace('#_dlg$#', '', $key);

                        // remove the section name
                        $k = preg_replace('#^' . $key . '(_dlg)?_#', '', $k);

                        // hex colours to uppercase and remove marker
                        if (strpos($k, 'hex_') !== false) {
                            $k = strtoupper(str_replace('hex_', '', $k));
                        }

                        // create key/value pair as JSON string
                        $output .= '"' . $k . '":' . $v . ',';

                        ++$i;
                    }
                    // remove last comma
                    $output = rtrim(trim($output), ',');

                    $output .= '},';

                    ++$x;
                }
            }
            // remove last comma
            $output = rtrim(trim($output), ',');
        }

        return $output;
    }

    private function getFilter()
    {
        return '';
    }

    public function load($files = array())
    {
        // get language tag
        $tag = $this->language;

        // base language path
        $path = JPATH_SITE . '/language/' . $tag;

        // if no file set
        if (empty($files)) {
            // Add English language
            $files[] = JPATH_SITE . '/language/en-GB/en-GB.com_jce.ini';

            // add pro language file
            $files[] = JPATH_SITE . '/language/en-GB/en-GB.com_jce_pro.ini';

            // non-english language
            if ($tag != 'en-GB') {
                if (is_dir($path)) {
                    $core = $path . '/' . $tag . '.com_jce.ini';
                    $pro = $path . '/' . $tag . '.com_jce_pro.ini';

                    if (is_file($core)) {
                        $files[] = $core;

                        if (is_file($pro)) {
                            $files[] = $pro;
                        }
                    } else {
                        $tag = 'en-GB';
                    }
                } else {
                    $tag = 'en-GB';
                }
            }

            $plugins = $this->get('plugins');

            if (!empty($plugins)) {
                foreach ($plugins['external'] as $name => $plugin) {
                    // rewrite name from plugin url
                    $name = basename(dirname($plugin));
                    $name = str_replace('plg_jce_', '', $name);

                    $filename = 'en-GB.plg_jce_' . $name . '.ini';

                    // add English file
                    $ini = Path::find(array(
                        JPATH_ADMINISTRATOR . '/language/en-GB',
                        JPATH_PLUGINS . '/jce/' . $name . '/language/en-GB'
                    ), $filename);

                    if ($ini) {
                        $files[] = $ini;
                    }

                    // non-english language
                    if ($tag != 'en-GB') {

                        $filename = $tag . '.plg_jce_' . $name . '.ini';

                        $ini = Path::find(array(
                            JPATH_ADMINISTRATOR . '/language/' . $tag,
                            JPATH_PLUGINS . '/jce/' . $name . '/language/' . $tag
                        ), $filename);

                        if ($ini) {
                            $files[] = $ini;
                        }
                    }
                }
            }
        }

        // shorten the tag, eg: en-GB -> en
        $tag = substr($tag, 0, strpos($tag, '-'));

        $sections = $this->get('sections');
        $filter = $this->getFilter();

        $data = self::processLanguageINI($files, $sections, $filter);

        // clean data
        $data = rtrim(trim($data), ',');

        return 'tinyMCE.addI18n({"' . $tag . '":{' . $data . '}});';
    }

    public function output($data)
    {
        if ($data) {
            ob_start();

            header('Content-type: application/javascript; charset: UTF-8');
            header('Vary: Accept-Encoding');

            // cache control
            header('Cache-Control: max-age=0,no-cache');

            // get content hash
            $hash = md5($data);

            // set etag header
            header('ETag: "' . $hash . '"');

            echo $data;

            exit(ob_get_clean());
        }
        exit();
    }
}
libraries/classes/view.php000060400000007575152455721620011663 0ustar00<?php
/**
 * @package     JCE
 * @subpackage  Editor
 *
 * @copyright   Copyright (C) 2005 - 2020 Open Source Matters, Inc. All rights reserved.
 * @copyright   Copyright (c) 2009-2024 Ryan Demmer. All rights reserved
 * @license     GNU General Public License version 2 or later; see LICENSE.txt
 */

\defined('_JEXEC') or die;

use Joomla\Filesystem\Path;
use Joomla\CMS\Object\CMSObject;

final class WFView extends CMSObject
{
    private $path = array();

    public function __construct($config = array())
    {
        if (!array_key_exists('base_path', $config)) {
            $config['base_path'] = WF_EDITOR_LIBRARIES;
        }

        if (!array_key_exists('layout', $config)) {
            $config['layout'] = 'default';
        }

        if (!array_key_exists('name', $config)) {
            $config['name'] = '';
        }

        $this->setProperties($config);

        if (array_key_exists('template_path', $config)) {
            $this->addTemplatePath($config['template_path']);
        } else {
            $this->addTemplatePath($this->get('base_path') . '/views/' . $this->getName() . '/tmpl');
        }
    }

    /**
     * Execute and display a template script.
     *
     * @param string $tpl The name of the template file to parse;
     *                    automatically searches through the template paths
     *
     * @copyright Copyright Copyright (C) 2005 - 2010 Open Source Matters. All rights reserved
     * @license GNU/GPL, see LICENSE.php
     */
    public function display($tpl = null)
    {
        $result = $this->loadTemplate($tpl);

        if ($result instanceof Exception) {
            return $result;
        }

        echo $result;
    }

    public function getName()
    {
        return $this->get('name');
    }

    public function setLayout($layout)
    {
        $this->set('layout', $layout);
    }

    public function getLayout()
    {
        return $this->get('layout');
    }

    public function addTemplatePath($path)
    {
        $this->path[] = $path;
    }

    public function getTemplatePath()
    {
        return $this->path;
    }

    /**
     * Load a template file.
     *
     * @param string $tpl The name of the template source file ...
     *                    automatically searches the template paths and compiles as needed
     *
     * @return string The output of the the template script.
     *
     * @copyright Copyright Copyright (C) 2005 - 2010 Open Source Matters. All rights reserved
     * @license GNU/GPL, see LICENSE.php
     */
    public function loadTemplate($tpl = null)
    {
        // clear prior output
        $output = null;
        $template = null;

        //create the template file name based on the layout
        $file = isset($tpl) ? $this->getLayout() . '_' . $tpl : $this->getLayout();

        // clean the file name
        $file = preg_replace('/[^A-Z0-9_\.-]/i', '', $file);

        if (isset($tpl)) {
            $tpl = preg_replace('/[^A-Z0-9_\.-]/i', '', $tpl);
        }

        $path = $this->getTemplatePath();

        $template = Path::find($path, $file . '.php');

        if ($template != false) {
            // unset so as not to introduce into template scope
            unset($tpl);
            unset($file);

            // never allow a 'this' property
            if (isset($this->this)) {
                unset($this->this);
            }

            // start capturing output into a buffer
            ob_start();
            // include the requested template filename in the local scope
            // (this will execute the view logic).
            include $template;

            // done with the requested template; get the buffer and
            // clear it.
            $output = ob_get_contents();
            ob_end_clean();

            return $output;
        } else {
            throw new InvalidArgumentException('Layout "' . $file . '" not found in Paths ' . implode(', ', $path));
        }
    }
}
libraries/classes/editor.php000060400000132410152455721620012162 0ustar00<?php

/**
 * @package     JCE
 * @subpackage  Editor
 *
 * @copyright   Copyright (C) 2005 - 2020 Open Source Matters, Inc. All rights reserved.
 * @copyright   Copyright (c) 2009-2024 Ryan Demmer. All rights reserved
 * @license     GNU General Public License version 2 or later; see LICENSE.txt
 */

\defined('_JEXEC') or die;

use Joomla\CMS\Component\ComponentHelper;
use Joomla\CMS\Factory;
use Joomla\Filesystem\File;
use Joomla\Filesystem\Folder;
use Joomla\Filesystem\Path;
use Joomla\CMS\Language\Language;
use Joomla\CMS\Language\Text;
use Joomla\CMS\Session\Session;
use Joomla\CMS\Uri\Uri;

class WFEditor
{
    // Editor instance
    protected static $instances;

    /**
     * Profile object.
     *
     * @var object
     */
    private $profile = null;

    /**
     * Context hash.
     *
     * @var string
     */
    protected $context = '';

    /**
     * Array of linked scripts.
     *
     * @var array
     */
    private $scripts = array();

    /**
     * Array of linked style sheets.
     *
     * @var array
     */
    private $stylesheets = array();

    /**
     * Array of included style declarations.
     *
     * @var array
     */
    private $styles = array();

    /**
     * Array of scripts placed in the header.
     *
     * @var array
     */
    private $javascript = array();

    /**
     * Array of script options.
     *
     * @var array
     */
    private $scriptOptions = array();

    /**
     * Array of core plugins
     *
     * @var array
     */
    private static $plugins = array('core', 'help', 'autolink', 'effects', 'cleanup', 'code', 'format', 'importcss', 'colorpicker', 'blobupload', 'upload', 'figure', 'ui', 'noneditable', 'branding');

    /**
     * Initialization state
     *
     * @var boolean
     */
    public $initialized = false;

    private function addScript($url, $type = 'text/javascript')
    {
        $url = $this->addAssetVersion($url);
        $this->scripts[$url] = $type;
    }

    private function addStyleSheet($url)
    {
        $url = $this->addAssetVersion($url);
        $this->stylesheets[] = $url;
    }

    private function addScriptDeclaration($text)
    {
        $this->javascript[] = $text;
    }

    private function addScriptOptions($text)
    {
        $this->scriptOptions[] = $text;
    }

    private function addStyleDeclaration($text)
    {
        $this->styles[] = $text;
    }

    public function getScripts()
    {
        return $this->scripts;
    }

    public function getStyleSheets()
    {
        return $this->stylesheets;
    }

    public function getScriptDeclaration()
    {
        return $this->javascript;
    }

    public function getScriptOptions()
    {
        return $this->scriptOptions;
    }

    public function __construct($config = array())
    {
        $app = Factory::getApplication();
        $wf = WFApplication::getInstance();

        if (!isset($config['plugin'])) {
            $config['plugin'] = '';
        }

        if (!isset($config['profile_id'])) {
            $config['profile_id'] = 0;
        }

        // trigger event
        $app->triggerEvent('onBeforeWfEditorLoad', array(&$config));

        // set profile from "default"
        $this->profile = $wf->getActiveProfile($config);

        // set context
        $this->context = $wf->getContext();
    }

    /**
     * Returns a reference to a editor object.
     *
     * This method must be invoked as:
     *         <pre>  $editor =WFEditor::getInstance();</pre>
     *
     * @return JCE The editor object
     */
    public static function getInstance($config = array())
    {
        $signature = md5(serialize($config));

        if (empty(self::$instances[$signature])) {
            self::$instances[$signature] = new self($config);
        }

        return self::$instances[$signature];
    }

    private function addAssetVersion($url)
    {
        $version = md5(self::getVersion());

        if (strpos($url, '?') === false) {
            $url .= '?' . $version;
        } else {
            $url .= '&' . $version;
        }

        return $url;
    }

    /**
     * Setup the editor
     * This will create the settings array and render the editor
     *
     * @param boolean $autoInit Automatically initialize the editor
     * @return WFEditor
     */
    public function setup($autoInit = true)
    {
        if ($this->initialized) {
            return $this;
        }

        $this->initialized = true;

        $settings = $this->getSettings();

        Factory::getApplication()->triggerEvent('onBeforeWfEditorRender', array(&$settings));

        $this->render($settings, $autoInit);

        return $this;
    }

    /**
     * Legacy function to build the editor
     *
     * @return String
     */
    public function buildEditor()
    {
        $this->setup()->getOutput();
    }

    /**
     * Legacy function to get the editor settings
     *
     * @return array
     */
    public function getEditorSettings()
    {
        return $this->getSettings();
    }

    private function getCompressionOptions()
    {
        $wf = WFApplication::getInstance();

        // check for joomla debug mode
        $debug = Factory::getConfig()->get('debug');

        // default compression states
        $options = array(
            'javascript' => 0,
            'css' => 0,
        );

        // set compression states, only if debug mode is off
        if ((int) $debug === 0) {
            $options = array(
                'javascript' => (int) $wf->getParam('editor.compress_javascript', 0, 0),
                'css' => (int) $wf->getParam('editor.compress_css', 0, 0),
            );
        }

        return $options;
    }

    private function assignEditorSkin(&$settings)
    {
        // get an editor instance
        $wf = WFApplication::getInstance();

        // assign skin - new default is "modern"
        $settings['skin'] = $wf->getParam('editor.toolbar_theme', 'modern');

        if (empty($settings['skin'])) {
            $settings['skin'] = 'modern';
        }

        if (strpos($settings['skin'], '.') !== false) {
            list($settings['skin'], $settings['skin_variant']) = explode('.', $settings['skin']);
        }

        // classic has been removed
        if ($settings['skin'] == 'classic') {
            $settings['skin'] = 'default';
        }

        if ($settings['skin'] == 'mobile') {
            $settings['skin'] = 'modern';
            $settings['skin_variant'] = 'touch';
        }
    }

    /**
     * Porcess and assign custom configuration variables
     *
     * @param [Array] $settings
     * @return void
     */
    private function getCustomConfig(&$settings)
    {
        // get an editor instance
        $wf = WFApplication::getInstance();

        // Other - user specified
        $userParams = $wf->getParam('editor.custom_config', '');

        if ($userParams) {
            // legacy format, eg: key:value;key:value
            if (!WFUtility::isJson($userParams)) {
                $userParams = explode(';', $userParams);
            } else {
                $userParams = json_decode($userParams, true);
            }

            // Remove values with invalid key, must be indexed array
            $userParams = array_filter($userParams, function ($value, $key) {
                return is_numeric($key) && $value != "";
            }, ARRAY_FILTER_USE_BOTH);

            foreach ($userParams as $userParam) {
                if (empty($userParam)) {
                    continue;
                }

                $name = '';
                $value = '';

                // legacy string
                if (is_string($userParam)) {
                    list($name, $value) = explode(':', $userParam);
                }

                // json associative array
                if (is_array($userParam) && array_key_exists('name', $userParam)) {
                    extract($userParam);
                }

                if ($name && $value !== '') {
                    $value = trim($value, " \t\n\r\0\x0B'\"");

                    // convert to boolean
                    if (is_bool($value)) {
                        $value = (bool) $value;
                    }

                    $settings[$name] = $value;
                }
            }
        }
    }

    private function isSkinRtl()
    {
        $language = Factory::getLanguage();

        if ($language->getTag() === WFLanguage::getTag()) {
            return $language->isRTL();
        }

        return false;
    }

    private function getLanguageDirection()
    {
        $user = Factory::getUser();
        $params = ComponentHelper::getParams('com_languages');
        $locale = $user->getParam('language', $params->get('site', 'en-GB'));

        $language = Language::getInstance($locale);

        return $language->isRTL() ? 'rtl' : 'ltr';
    }

    protected function getLanguageCode()
    {
        return WFLanguage::getCode();
    }

    protected function getLanguageTag()
    {
        return WFLanguage::getTag();
    }

    public function getSettings()
    {
        $app = Factory::getApplication();

        // get an editor instance
        $wf = WFApplication::getInstance();

        // create token
        $token = Session::getFormToken();

        // get editor version
        $version = self::getVersion();

        $settings = array(
            'token' => $token,
            'base_url' => Uri::root(),
            'language' => $this->getLanguageCode(),
            'directionality' => $this->getLanguageDirection(),
            'theme' => 'none',
            'plugins' => '',
            'skin' => 'default',
            'query' => array(
                $token => 1,
                'context' => $this->context,
            ),
        );

        // if a profile is set
        if (is_object($this->profile)) {
            $settings['query']['profile_id'] = $this->profile->id;

            $settings = array_merge($settings, array('theme' => 'advanced'), $this->getToolbar());

            // add plugins
            $plugins = $this->getPlugins();

            // add core plugins
            if (!empty($plugins['core'])) {
                $settings['plugins'] = array_values($plugins['core']);
            }

            // add external plugins
            if (!empty($plugins['external'])) {
                $settings['external_plugins'] = $plugins['external'];
            }

            // Theme and skins
            $theme = array(
                'toolbar_location' => array('top', 'top', 'string'),
                'toolbar_align' => array('left', 'left', 'string'),
                'statusbar_location' => array('bottom', 'bottom', 'string'),
                'path' => array(1, 1, 'boolean'),
                'resizing' => array(1, 0, 'boolean'),
                'resize_horizontal' => array(1, 1, 'boolean'),
            );

            // set rows key to pass to plugin config
            $settings['rows'] = $this->profile->rows;

            foreach ($theme as $k => $v) {
                $settings['theme_' . $k] = $wf->getParam('editor.' . $k, $v[0], $v[1], $v[2]);
            }

            $settings['width'] = $wf->getParam('editor.width');
            $settings['height'] = $wf->getParam('editor.height');

            // process and assign the editor skin
            $this->assignEditorSkin($settings);

            // get body class if any
            $body_class = $wf->getParam('editor.body_class', '');

            // check for editor reset - options are 1, 0, auto
            $settings['content_style_reset'] = $wf->getParam('editor.content_style_reset', 'auto');

            // if enabled, add the "mceContentReset" class to the body
            $content_reset = $settings['content_style_reset'] == 1 ? 'mceContentReset' : '';

            // combine body class and reset
            $settings['body_class'] = trim($body_class . ' ' . $content_reset);

            // set body id
            $settings['body_id'] = $wf->getParam('editor.body_id', '');

            // get stylesheets
            $stylesheets = (array) self::getTemplateStyleSheets();

            // set stylesheets as string
            $settings['content_css'] = implode(',', $stylesheets);

            // use cookies to store state
            $settings['use_state_cookies'] = (bool) $wf->getParam('editor.use_cookies', 1);

            // Set active tab
            $settings['active_tab'] = 'wf-editor-' . $wf->getParam('editor.active_tab', 'wysiwyg');

            $settings['invalid_elements'] = array();

            // Get all optional plugin configuration options
            $this->getPluginConfig($settings);

            // clean up invalid_elements
            if (!empty($settings['invalid_elements'])) {
                $settings['invalid_elements'] = array_values($settings['invalid_elements']);
            }
        } else {
            $settings['readonly'] = true;
        }

        // get compression options stylesheet
        $settings['compress'] = $this->getCompressionOptions();

        // set css compression
        if ($settings['compress']['css']) {
            $this->addStyleSheet(Uri::base(true) . '/index.php?option=com_jce&task=editor.pack&type=css&' . http_build_query((array) $settings['query']));
        } else {
            // CSS
            $this->addStyleSheet($this->getURL(true) . '/css/editor.min.css');

            // load default skin
            $this->addStyleSheet($this->getURL(true) . '/tinymce/themes/advanced/skins/default/ui.css');

            // load other skin
            if ($settings['skin'] != 'default') {
                $this->addStyleSheet($this->getURL(true) . '/tinymce/themes/advanced/skins/' . $settings['skin'] . '/ui.css');
            }

            // load variant
            if (isset($settings['skin_variant'])) {
                $this->addStyleSheet($this->getURL(true) . '/tinymce/themes/advanced/skins/' . $settings['skin'] . '/ui_' . $settings['skin_variant'] . '.css');
            }
        }

        if ($this->isSkinRtl()) {
            $settings['skin_directionality'] = 'rtl';
        }

        $app->triggerEvent('onBeforeWfEditorSettings', array(&$settings));

        // add module in Joomla 5
        if (version_compare(JVERSION, '5', 'ge')) {
            $this->addScript($this->getURL(true) . '/js/editor.module.js', 'module');
        }

        // set javascript compression script
        if ($settings['compress']['javascript']) {
            $this->addScript(Uri::base(true) . '/index.php?option=com_jce&task=editor.pack&' . http_build_query((array) $settings['query']));
        } else {
            // Tinymce
            $this->addScript($this->getURL(true) . '/tinymce/tinymce.js');

            // Editor
            $this->addScript($this->getURL(true) . '/js/editor.min.js');
        }

        // language
        $this->addScript(Uri::base(true) . '/index.php?option=com_jce&task=editor.loadlanguages&lang=' . $settings['language'] . '&' . http_build_query((array) $settings['query']));

        $this->getCustomConfig($settings);

        // process settings
        array_walk($settings, function (&$value, $key) {
            // remove 'rows' key from $settings
            if ($key == "rows") {
                $value = '';
            }

            // implode standard arrays
            if (is_array($value) && $value === array_values($value)) {
                $value = implode(',', $value);
            }

            // convert json strings to objects to prevent encoding
            if (is_string($value)) {
                // decode string
                $val = json_decode($value);

                // valid json
                if ($val) {
                    $value = $val;
                }
            }

            // convert stringified booleans to booleans
            if (is_string($value) && $value == 'true') {
                $value = true;
            }

            if (is_string($value) && $value == 'false') {
                $value = false;
            }
        });

        // Remove empty values
        $settings = array_filter($settings, function ($value) {
            return $value !== '';
        });

        return $settings;
    }

    public function render($settings, $autoInit = true)
    {
        // get an editor instance
        $wf = WFApplication::getInstance();

        if ($autoInit) {
            // encode as json string
            $tinymce = json_encode($settings, JSON_NUMERIC_CHECK | JSON_UNESCAPED_SLASHES);

            $this->addScriptDeclaration("try{WfEditor.init(" . $tinymce . ");}catch(e){console.debug(e);}");
        } else {
            $this->addScriptOptions($settings);
        }

        if (is_object($this->profile)) {
            if ($wf->getParam('editor.callback_file')) {
                $this->addScript(Uri::root(true) . '/' . $wf->getParam('editor.callback_file'));
            }
            // add callback file if exists
            if (is_file(JPATH_SITE . '/media/jce/js/editor.js')) {
                $this->addScript(Uri::root(true) . '/media/jce/js/editor.js');
            }

            // add custom editor.css if exists
            if (is_file(JPATH_SITE . '/media/jce/css/editor.css')) {
                $this->addStyleSheet(Uri::root(true) . '/media/jce/css/editor.css');
            }
        }
    }

    private function getOutput()
    {
        $document = Factory::getDocument();

        $end = $document->_getLineEnd();
        $tab = $document->_getTab();

        $version = self::getVersion();

        $output = '';

        foreach ($this->stylesheets as $stylesheet) {

            // don't add hash to dynamic php url
            if (strpos($stylesheet, 'index.php') === false) {
                $version = md5(basename($stylesheet) . $version);

                if (strpos($stylesheet, '?') === false) {
                    $stylesheet .= '?' . $version;
                } else {
                    $stylesheet .= '&' . $version;
                }
            }

            $output .= $tab . '<link rel="stylesheet" href="' . $stylesheet . '" type="text/css" />' . $end;
        }

        foreach ($this->scripts as $script) {

            // don't add hash to dynamic php url
            if (strpos($script, 'index.php') === false) {
                $version = md5(basename($script) . $version);

                if (strpos($script, '?') === false) {
                    $script .= '?' . $version;
                } else {
                    $script .= '&' . $version;
                }
            }
            $output .= $tab . '<script data-cfasync="false" type="text/javascript" src="' . $script . '" defer></script>' . $end;
        }

        foreach ($this->javascript as $script) {
            $output .= $tab . '<script data-cfasync="false" type="text/javascript">' . $script . '</script>' . $end;
        }

        foreach ($this->styles as $style) {
            $output .= $tab . '<style type="text/css">' . $style . '</style>' . $end;
        }

        return $output;
    }

    /**
     * Get the current version from the editor manifest.
     *
     * @return Version
     */
    private static function getVersion()
    {
        return WF_VERSION;
    }

    /**
     * Check if an icon already exists in a toolbar row
     *
     * @param [Array] $rows
     * @param [Mixed] $icon
     * @return Boolean
     */
    private function rowHasIcon($rows, $icon)
    {
        $found = false;

        foreach ($rows as $key => $row) {
            if (in_array($icon, $row)) {
                $found = true;
                break;
            }
        }

        return $found;
    }

    /**
     * Return a list of icons for each JCE editor row.
     *
     * @param string  The number of rows
     *
     * @return The row array
     */
    private function getToolbar()
    {
        $wf = WFApplication::getInstance();
        $rows = array('theme_buttons1' => array(), 'theme_buttons2' => array(), 'theme_buttons3' => array());

        // we need a profile object and some defined rows
        if (!is_object($this->profile) || empty($this->profile->rows)) {
            return $rows;
        }

        // get plugins
        $plugins = JcePluginsHelper::getPlugins();

        // get core commands
        $commands = JcePluginsHelper::getCommands();

        // merge plugins and commands
        $icons = array_merge($commands, $plugins);

        // create an array of rows
        $lists = explode(';', $this->profile->rows);

        // backwards compatability map
        $map = array(
            'paste' => 'clipboard',
            'spacer' => '|',
            'forecolor' => 'fontcolor',
            'backcolor' => 'backcolor',
        );

        $x = 0;

        for ($i = 1; $i <= count($lists); ++$i) {
            $buttons = array();
            $items = explode(',', $lists[$x]);

            // map legacy values etc.
            array_walk($items, function (&$item) use ($map) {
                if (array_key_exists($item, $map)) {
                    $item = $map[$item];
                }
            });

            // remove duplicates
            $items = array_unique($items);

            foreach ($items as $item) {
                // set the plugin/command name
                $name = $item;

                // check if button should be in toolbar
                if ($item !== '|') {
                    if (array_key_exists($item, $icons) === false) {
                        continue;
                    }

                    // assign icon
                    $item = $icons[$item]->icon;
                }

                // check for custom plugin buttons
                if (array_key_exists($name, $plugins)) {
                    $custom = $wf->getParam($name . '.buttons');

                    if (!empty($custom)) {
                        $custom = array_filter((array) $custom);

                        if (empty($custom)) {
                            $item = '';
                        } else {
                            $a = array();

                            foreach (explode(',', $item) as $s) {
                                if (in_array($s, $custom) || $s == '|') {
                                    $a[] = $s;
                                }
                            }

                            $item = implode(',', $a);

                            // remove leading or trailing |
                            $item = trim($item, '|');
                        }
                    }
                }

                if (!empty($item)) {
                    // remove double spacer
                    $item = preg_replace('#(\|,)+#', '|,', $item);

                    if ($this->rowHasIcon($rows, $item)) {
                        continue;
                    }

                    $buttons[] = $item;
                }
            }

            if (!empty($buttons)) {
                $rows['theme_buttons' . $i] = $buttons;
            }

            ++$x;
        }

        return $rows;
    }

    /**
     * Determine whether the editor has a profile assigned
     *
     * @return boolean
     */
    public function hasProfile()
    {
        return is_object($this->profile);
    }

    /**
     * Determine whether a plugin is loaded
     *
     * @param [string] $name
     * @return boolean
     */
    public function hasPlugin($name)
    {
        $plugins = $this->getPlugins();

        if (in_array($name, $plugins['core'])) {
            return true;
        }

        if (!empty($plugins['external'])) {
            if (array_key_exists($name, $plugins['external'])) {
                return true;
            }
        }

        return false;
    }

    /**
     * Return a list of published JCE plugins.
     *
     * @return string list
     */
    public function getPlugins()
    {
        static $plugins;

        $wf = WFApplication::getInstance();

        if (is_object($this->profile)) {
            if (!is_array($plugins)) {
                // get plugin items from profile
                $profile_plugins = explode(',', $this->profile->plugins);

                $items = array();

                // get core and installed plugins list
                $list = JcePluginsHelper::getPlugins();

                // check that the plugin is available
                $items = array_filter(array_keys($list), function ($item) use ($profile_plugins) {
                    return in_array($item, $profile_plugins);
                });

                // add advlists plugin if lists are loaded
                if (in_array('lists', $items)) {
                    $items[] = 'advlist';
                }

                // Load wordcount if enabled
                if ($wf->getParam('editor.wordcount', 1)) {
                    $items[] = 'wordcount';
                }

                // reset index
                $items = array_values($items);

                // add core plugins
                $items = array_merge(self::$plugins, $items);

                // remove duplicates and empty values
                $items = array_unique(array_filter($items));

                // create plugins array
                $plugins = array('core' => array(), 'external' => array());

                // check installed plugins are valid
                foreach ($list as $name => $attribs) {
                    // skip core plugins
                    if ($attribs->core) {
                        continue;
                    }

                    // find plugin key in plugins list
                    $pos = array_search($name, $items);

                    // check it is in profile plugin list
                    if ($pos === false) {
                        continue;
                    }

                    // remove from items array
                    unset($items[$pos]);

                    // reset index
                    $items = array_values($items);

                    // legacy file name
                    if (is_file($attribs->path . '/editor_plugin.js')) {
                        $plugins['external'][$name] = Uri::root(true) . '/' . $attribs->url . '/editor_plugin.js';
                    } else {
                        $plugins['external'][$name] = Uri::root(true) . '/' . $attribs->url . '/plugin.js';
                    }
                }

                // remove missing plugins
                $items = array_filter($items, function ($item) {
                    return is_file(WF_EDITOR_MEDIA . '/tinymce/plugins/' . $item . '/plugin.js');
                });

                // update core plugins
                $plugins['core'] = $items;
            }
        }

        return $plugins;
    }

    /**
     * Get all loaded plugins config options.
     *
     * @param array $settings passed by reference
     */
    private function getPluginConfig(&$settings)
    {
        $app = Factory::getApplication();

        $core = (array) $settings['plugins'];
        $items = array();

        // Core plugins
        foreach ($core as $plugin) {
            $file = WF_EDITOR_PLUGINS . '/' . $plugin . '/config.php';

            $file = Path::clean($file);

            if (is_file($file)) {
                // add plugin name to array
                $items[$plugin] = $file;
            }
        }

        // Installed plugins
        if (array_key_exists('external_plugins', $settings)) {
            $installed = (array) $settings['external_plugins'];

            foreach ($installed as $plugin => $path) {
                $file = Path::find(array(
                    // new path
                    JPATH_PLUGINS . '/jce/editor_' . $plugin,
                    // old path
                    JPATH_PLUGINS . '/jce/editor-' . $plugin,
                    // legacy path
                    JPATH_PLUGINS . '/jce/editor-' . $plugin . '/classes'
                ), 'config.php');

                if ($file) {
                    // add plugin name to array
                    $items[$plugin] = $file;
                }
            }
        }

        $app->triggerEvent('onBeforeWfEditorPluginConfig', array($settings, &$items));

        $delim = array('-', '_');

        // loop through list and create/call method
        foreach ($items as $plugin => $file) {
            $name = str_replace($delim, ' ', $plugin);

            // Create class name
            $classname = 'WF' . ucwords($name) . 'PluginConfig';

            // remove space
            $classname = str_replace(' ', '', $classname);

            require_once $file;

            // Check class and method are callable, and call
            if (class_exists($classname) && method_exists($classname, 'getConfig')) {
                call_user_func_array(array($classname, 'getConfig'), array(&$settings));
            }
        }
    }

    /**
     * Remove keys from an array.
     */
    public function removeKeys(&$array, $keys)
    {
        if (!is_array($keys)) {
            $keys = array($keys);
        }

        $array = array_diff($array, $keys);
    }

    /**
     * Add keys to an array.
     *
     * @return The string list with added key or the key
     *
     * @param string  The array
     * @param string  The keys to add
     */
    public function addKeys(&$array, $keys)
    {
        if (!is_array($keys)) {
            $keys = array($keys);
        }
        $array = array_unique(array_merge($array, $keys));
    }

    /**
     * Get a list of editor font families.
     *
     * @return string font family list
     *
     * @param string $add    Font family to add
     * @param string $remove Font family to remove
     *
     * Deprecated in 2.3.4
     */
    public function getEditorFonts()
    {
        return '';
    }

    /**
     * Return the current site template name.
     */
    private static function getSiteTemplates()
    {
        $db = Factory::getDBO();
        $app = Factory::getApplication();
        $id = 0;

        // only process when front-end editing
        if ($app->getClientId() == 0) {
            $menus = $app->getMenu();
            $menu = $menus->getActive();

            if ($menu) {
                $id = isset($menu->template_style_id) ? $menu->template_style_id : $menu->id;
            }
        }

        $query = $db->getQuery(true);
        $query->select('*, template AS name')->from('#__template_styles')->where(array('client_id = 0'));

        $db->setQuery($query);
        $templates = $db->loadObjectList();

        $assigned = array();

        foreach ($templates as $template) {
            // default template
            if ((string) $template->home == '1') {
                $assigned[] = $template;
                continue;
            }

            // assigned template
            if ($id == $template->id) {
                array_unshift($assigned, $template);
            }
        }

        // return templates
        return $assigned;
    }

    private static function hasEditorStylesheet($name)
    {
        // editor.css file is not suitable
        if ($name == 'cassiopeia') {
            return false;
        }

        // search for editor.css file using Path
        $file = Path::find(array(
            JPATH_SITE . '/templates/' . $name . '/css',
            JPATH_SITE . '/media/templates/site/' . $name . '/css',
        ), 'editor.css');

        if ($file && filesize($file) > 0) {
            // make relative
            $file = str_replace(JPATH_SITE, '', $file);

            // remove leading slash
            $file = trim($file, '/');

            return $file;
        }

        return false;
    }

    private static function getTemplateStyleSheetsList($absolute = false)
    {
        // set default url as empty value
        $url = '';
        // set default template as empty value
        $template = (object) array('name' => '');
        // use editor default styles
        $styles = '';
        // stylesheets
        $stylesheets = array();
        // files
        $files = array();

        // get templates
        $templates = self::getSiteTemplates();

        foreach ($templates as $item) {
            // Template CSS
            $path = JPATH_SITE . '/templates/' . $item->name;

            // get the first path that exists
            if (is_dir($path)) {
                // assign template
                $template = $item;
                break;
            }
        }

        $wf = WFApplication::getInstance();

        $global = intval($wf->getParam('editor.content_css', 1));
        $profile = intval($wf->getParam('editor.profile_content_css', 2));

        switch ($global) {
            // Custom template css files
            case 0:
                // use getParam so result is cleaned
                $global_custom = $wf->getParam('editor.content_css_custom', '');

                if (is_string($global_custom)) {
                    $global_custom = explode(',', $global_custom);
                }

                foreach ($global_custom as $tmp) {
                    $tmp = trim($tmp);

                    if (empty($tmp)) {
                        continue;
                    }

                    // external url
                    if (strpos($tmp, '://') !== false) {
                        $files[] = $tmp;
                        continue;
                    }

                    // clean slashes
                    $tmp = preg_replace('#[/\\\\]+#', '/', $tmp);

                    // Replace $template variable with site template name
                    $tmp = str_replace('$template', $template->name, $tmp);

                    $file = JPATH_SITE . '/' . $tmp;
                    $list = array();

                    $file = Path::clean($file);

                    // check if path is a file
                    if (is_file($file)) {
                        $list[] = $file;
                    // find files using pattern
                    } else {
                        $list = glob($file);
                    }

                    if (!empty($list)) {
                        foreach ($list as $item) {
                            if (is_file($item) && preg_match('#\.(css|less)$#', $item)) {
                                $files[] = substr($item, strlen(JPATH_SITE) + 1);
                            }
                        }
                    }
                }

                break;
            // Template css (template.css or template_css.css)
            case 1:
                $files = array();

                // check editor.css file first
                $file = self::hasEditorStylesheet($template->name);

                if ($file) {
                    $files[] = $file;
                } else {
                    Factory::getApplication()->triggerEvent('onWfGetTemplateStylesheets', array(&$files, $template));
                }

                break;
            // Nothing, use editor default
            case 2:
                break;
        }

        switch ($profile) {
            // add to global config value
            case 0:
            case 1:
                $profile_custom = $wf->getParam('editor.profile_content_css_custom', '');

                if (is_string($profile_custom)) {
                    $profile_custom = explode(',', $profile_custom);
                }

                $custom = array();

                foreach ($profile_custom as $tmp) {
                    $tmp = trim($tmp);

                    if (empty($tmp)) {
                        continue;
                    }

                    // external url
                    if (strpos($tmp, '://') !== false) {
                        $custom[] = $tmp;
                        continue;
                    }

                    // clean slashes
                    $tmp = preg_replace('#[/\\\\]+#', '/', $tmp);

                    // Replace $template variable with site template name (defaults to 'system')
                    $tmp = str_replace('$template', $template->name, $tmp);

                    $list = array();

                    $file = JPATH_SITE . '/' . $tmp;

                    // check if path is a file
                    if (is_file($file)) {
                        $list[] = $file;
                        // find files using pattern
                    } else {
                        $list = glob($file);
                    }

                    if (!empty($list)) {
                        foreach ($list as $item) {
                            if (is_file($item) && preg_match('#\.(css|less)$#', $item)) {
                                $custom[] = substr($item, strlen(JPATH_SITE) + 1);
                            }
                        }
                    }
                }

                // add to existing list
                if ($profile === 0) {
                    $files = array_merge($files, $custom);
                    // overwrite global config value
                } else {
                    $files = (array) $custom;
                }
                break;
            // inherit global config value
            case 2:
                break;
        }

        // remove duplicates
        $files = array_unique(array_filter($files));

        // get the root directory
        $root = $absolute ? JPATH_SITE : Uri::root(true);

        // check for existence of each file and make array of stylesheets
        foreach ($files as $file) {
            if (empty($file)) {
                continue;
            }

            // full path
            if (strpos($file, '://') !== false) {
                $stylesheets[] = $file;
                continue;
            }

            // remove leading slash
            $file = ltrim($file, '/');

            $fullpath = JPATH_SITE . '/' . $file;

            if (is_file($fullpath)) {
                // less
                if (pathinfo($file, PATHINFO_EXTENSION) == 'less') {
                    $stylesheets[] = $fullpath;
                    continue;
                }

                $stylesheets[] = $root . '/' . $file;
            }
        }

        // remove duplicates
        $stylesheets = array_unique(array_filter($stylesheets));

        return $stylesheets;
    }

    /**
     * Get an array of stylesheets used by the editor.
     * References the WFEditor class.
     * If the list contains any LESS stylesheets, the list is returned as a URL to compile.
     *
     * @return string
     */
    public static function getTemplateStyleSheets()
    {
        $stylesheets = self::getTemplateStyleSheetsList();

        // check for less files in the array
        $less = preg_grep('#\.less$#', $stylesheets);

        // process less files etc.
        if (!empty($less)) {
            // create token
            $token = Session::getFormToken();
            $version = self::getVersion();

            return Uri::base(true) . '/index.php?option=com_jce&task=editor.compileless&' . $token . '=1';
        }

        return $stylesheets;
    }

    /**
     * Get the URL of the editor.
     *
     * @param bool $relative
     *
     * @return string
     */
    private function getURL($relative = false)
    {
        if ($relative) {
            return Uri::root(true) . '/media/com_jce/editor';
        }

        return Uri::root() . 'media/com_jce/editor';
    }

    /**
     * Pack / compress editor files.
     */
    public function pack()
    {
        $wf = WFApplication::getInstance();
        $type = $wf->input->getWord('type', 'javascript');

        // javascript
        $packer = new WFPacker(array('type' => $type));

        $themes = 'none';
        $plugins = array();

        $suffix = $wf->input->getWord('suffix', '');

        // if a profile is set
        if ($this->profile) {
            $themes = 'advanced';
            $plugins = $this->getPlugins();
        }

        $themes = explode(',', $themes);

        // toolbar theme
        $toolbar = explode('.', $wf->getParam('editor.toolbar_theme', 'default'));

        // base skin value
        $skin = $toolbar[0];

        switch ($type) {
            case 'language':
                $files = array();

                $data = $this->loadLanguages(array(), array(), '(^dlg$|_dlg$)', true);
                $packer->setText($data);

                break;
            case 'javascript':
                $files = array();

                // add core file
                $files[] = WF_EDITOR_MEDIA . '/tinymce/tinymce' . $suffix . '.js';

                // Add themes in dev mode
                foreach ($themes as $theme) {
                    $files[] = WF_EDITOR_MEDIA . '/tinymce/themes/' . $theme . '/theme' . $suffix . '.js';
                }

                // Add core plugins
                foreach ($plugins['core'] as $plugin) {
                    if (in_array($plugin, self::$plugins)) {
                        continue;
                    }

                    $files[] = WF_EDITOR_MEDIA . '/tinymce/plugins/' . $plugin . '/plugin' . $suffix . '.js';
                }

                // add external and pro plugins
                foreach ($plugins['external'] as $plugin => $path) {
                    // get base path from plugin path
                    $basepath = dirname($path);

                    $basepath = WFUtility::uriToAbsolutePath($basepath);

                    $file = Path::find(
                        array(
                            JPATH_SITE . '/' . $basepath
                        ),
                        'plugin' . $suffix . '.js'
                    );

                    if ($file) {
                        $files[] = $file;
                    }
                }

                // add Editor file
                $files[] = WF_EDITOR_MEDIA . '/js/editor.min.js';

                break;
            case 'css':
                $slot = $wf->input->getCmd('slot', 'editor');

                if ($slot == 'content') {
                    $files = array();

                    $files[] = WF_EDITOR_THEMES . '/' . $themes[0] . '/skins/' . $skin . '/content.css';

                    // get template stylesheets
                    $styles = self::getTemplateStyleSheetsList(true);

                    foreach ($styles as $style) {
                        $style = Path::clean($style);
                        
                        if (is_file($style)) {
                            $files[] = $style;
                        }
                    }

                    // Add core plugins
                    foreach ($plugins['core'] as $plugin) {
                        $content = WF_EDITOR_MEDIA . '/tinymce/plugins/' . $plugin . '/css/content.css';

                        if (is_file($content)) {
                            $files[] = $content;
                        }
                    }

                    // add external and pro plugins
                    foreach ($plugins['external'] as $plugin => $path) {
                        // get base path from plugin path
                        $basepath = dirname($path);

                        $basepath = WFUtility::uriToAbsolutePath($basepath);

                        $content = Path::find(
                            array(
                                $basepath . '/css'
                            ),
                            'content.css'
                        );

                        if ($content) {
                            $files[] = $content;
                        }
                    }
                } elseif ($slot == 'preview') {
                    $files = array();
                    $files[] = WF_EDITOR_MEDIA . '/tinymce/plugins/preview/css/preview.css';

                    // get template stylesheets
                    $styles = self::getTemplateStyleSheetsList(true);

                    foreach ($styles as $style) {
                        $style = Path::clean($style);
                        
                        if (is_file($style)) {
                            $files[] = $style;
                        }
                    }
                } else {
                    $files = array();

                    $files[] = WF_EDITOR_MEDIA . '/css/editor.min.css';

                    $variant = '';

                    if (count($toolbar) > 1) {
                        $variant = $toolbar[1];
                    }

                    // load 'default'
                    $files[] = WF_EDITOR_THEMES . '/' . $themes[0] . '/skins/default/ui.css';

                    if ($skin !== 'default') {
                        $files[] = WF_EDITOR_THEMES . '/' . $themes[0] . '/skins/' . $skin . '/ui.css';
                    }

                    if (isset($variant)) {
                        $files[] = WF_EDITOR_THEMES . '/' . $themes[0] . '/skins/' . $skin . '/ui_' . $variant . '.css';
                    }
                }

                break;
        }

        $cache_validation = (bool) $this->getParam('editor.compress_cache_validation', true);

        $packer->setFiles($files);
        $packer->pack(true, $cache_validation);
    }

    public function loadlanguages()
    {
        $parser = new WFLanguageParser(array('language' => $this->getLanguageTag(), 'plugins' => $this->getPlugins()));
        $data = $parser->load();
        $parser->output($data);
    }

    public function compileless()
    {
        $files = self::getTemplateStyleSheetsList(true);

        if (!empty($files)) {
            $packer = new WFPacker(array('files' => $files, 'type' => 'css'));
            $packer->pack(false);
        }
    }

    public function getToken($id)
    {
        return '<input type="hidden" name="' . Session::getFormToken() . '" value="1" />';
    }

    /**
     * Proxy function for legacy compatablity with 3rd party extensions that access the API directly
     *
     * @param string $key
     * @param string $fallback
     * @param string $default
     * @param string $type
     * @param boolean $allowempty
     * @return void
     */
    public function getParam($key, $fallback = '', $default = '', $type = 'string', $allowempty = true)
    {
        $wf = WFApplication::getInstance();
        return $wf->getParam($key, $fallback, $default, $type, $allowempty);
    }
}
libraries/classes/index.html000060400000000054152455721620012156 0ustar00<html><body bgcolor="#FFFFFF"></body></html>libraries/classes/manager/manager.php000060400000001020152455721620013710 0ustar00<?php

/**
 * @copyright 	Copyright (c) 2009-2021 Ryan Demmer. All rights reserved
 * @license   	GNU/GPL 2 or later - http://www.gnu.org/licenses/old-licenses/gpl-2.0.html
 * JCE is free software. This version may have been modified pursuant
 * to the GNU General Public License, and as distributed it includes or
 * is derivative of works licensed under the GNU General Public License or
 * other free or open source software licenses
 */
defined('JPATH_PLATFORM') or die;

class WFMediaManager extends WFMediaManagerBase
{
}
libraries/classes/manager/base.php000060400000036043152455721620013225 0ustar00<?php

/**
 * @package     JCE
 * @subpackage  Editor
 *
 * @copyright   Copyright (C) 2005 - 2020 Open Source Matters, Inc. All rights reserved.
 * @copyright   Copyright (c) 2009-2024 Ryan Demmer. All rights reserved
 * @license     GNU General Public License version 2 or later; see LICENSE.txt
 */

use Joomla\Registry\Registry;

\defined('_JEXEC') or die;

class WFMediaManagerBase extends WFEditorPlugin
{
    protected $_filetypes = 'jpg,jpeg,png,gif';

    private static $browser = array();

    public function __construct($config = array())
    {
        // use the full "manager" layout by default
        if (!array_key_exists('layout', $config)) {
            $config['layout'] = 'manager';
        }

        if (!array_key_exists('view_path', $config)) {
            $config['view_path'] = WF_EDITOR_LIBRARIES . '/views/plugin';
        }

        if (!array_key_exists('template_path', $config)) {
            $config['template_path'] = WF_EDITOR_LIBRARIES . '/views/plugin/tmpl';
        }

        // Call parent
        parent::__construct($config);

        // initialize the browser
        $browser = $this->getFileBrowser();
        $request = WFRequest::getInstance();

        // Setup plugin XHR callback functions
        $request->setRequest(array($this, 'getDimensions'));
    }

    /**
     * Get the File Browser instance.
     *
     * @return object WFBrowserExtension
     */
    public function getFileBrowser()
    {
        $name = $this->getName();
        $caller = $this->get('caller');

        // add caller if set
        if ($caller) {
            $name .= '.' . $caller;
        }

        if (!isset(self::$browser[$name])) {
            self::$browser[$name] = new WFFileBrowser($this->getFileBrowserConfig());
        }

        return self::$browser[$name];
    }

    protected function addFileBrowserAction($name, $options = array())
    {
        $this->getFileBrowser()->addAction($name, $options);
    }

    protected function addFileBrowserButton($type, $name, $options = array())
    {
        $this->getFileBrowser()->addButton($type, $name, $options);
    }

    protected function addFileBrowserEvent($name, $function = array())
    {
        $this->getFileBrowser()->addEvent($name, $function);
    }

    public function getBrowser()
    {
        return $this->getFileBrowser();
    }

    /**
     * Display the plugin.
     */
    public function display()
    {
        parent::display();

        $document = WFDocument::getInstance();

        $view = $this->getView();
        $browser = $this->getFileBrowser();

        $browser->display();
        $view->filebrowser = $browser;

        $options = $browser->getProperties();

        // set global options
        $document->addScriptDeclaration('FileBrowser.options=' . json_encode($options) . ';');
    }

    public function getFileTypes($format = 'array', $list = '')
    {
        return $this->getFileBrowser()->getFileTypes($format, $list);
    }

    protected function setFileTypes($filetypes)
    {
        return $this->getFileBrowser()->setFileTypes($filetypes);
    }

    public function onBeforeUpload(&$file, &$dir, &$name) {}

    public function onUpload($file, $relative = '') {}

    public function getDimensions($file)
    {
        $browser = $this->getFileBrowser();

        $data = array();

        $extension = WFUtility::getExtension($file, true);

        // images and flash
        if (in_array($extension, array('jpg', 'jpeg', 'png', 'apng', 'gif', 'bmp', 'wbmp', 'tif', 'tiff', 'psd', 'ico', 'webp', 'swf'))) {
            list($data['width'], $data['height']) = $browser->getDimensions($file);
            return $data;
        }

        $path = $browser->toAbsolute($file);

        // svg
        if ($extension == 'svg') {
            $svg = @simplexml_load_file($path);

            if ($svg && isset($svg['viewBox'])) {
                list($start_x, $start_y, $end_x, $end_y) = explode(' ', $svg['viewBox']);

                $width = (int) $end_x;
                $height = (int) $end_y;

                if ($width && $height) {
                    $data['width'] = $width;
                    $data['height'] = $height;

                    return $data;
                }
            }
        }

        return $data;
    }

    /**
     * Get the filesystem definition from parameters (with static caching).
     *
     * Reads the `filesystem` parameter to determine the active filesystem name
     * (defaults to "joomla") and returns an object with:
     *  - name (string): The active filesystem name.
     *  - properties (Registry): Configuration for that filesystem.
     *
     * If a section matching the active name exists in the `filesystem` parameter,
     * its values are loaded into the Registry; otherwise an empty Registry is used.
     *
     * The result is cached in a static variable for the lifetime of the request.
     *
     * @return \stdClass Object with `name` (string) and `properties` (Registry).
     */
    private function getFileSystemConfig()
    {
        static $filesystem = null;

        if ($filesystem !== null) {
            return $filesystem;
        }

        // get local (plugin) filesystem config
        $config = (array) $this->getParam('filesystem', array());

        // if no local filesystem name is set, use global config. This is to avoid using the local config values, eg: allow_root, if it has actually been reset to "inherit"
        if (empty($config['name'])) {
            // get global filesystem config
            $config = (array) $this->getParam('editor.filesystem', array());
        }

        // Determine active filesystem name (defaults to "joomla")
        $name = empty($config['name']) ? 'joomla' : $config['name'];

        $item = array(
            'name' => $name,
            'properties' => new Registry(),
        );

        if (isset($config[$name])) {
            $item = array(
                'name' => $name,
                'properties' => new Registry($config[$name]),
            );
        }

        $filesystem = (object) $item;

        return $filesystem;
    }

    private function getFilesystem($config = array())
    {
        static $instances = array();

        $fs = $this->getFileSystemConfig();

        // merge config with filesystem properties
        if (isset($fs->properties)) {
            $config = array_merge($fs->properties->toArray(), $config);
        }

        $signature = md5($fs->name . serialize($config));

        if (!isset($instances[$signature])) {
            $instances[$signature] = WFFileSystem::getInstance($fs->name, $config);
        }

        return $instances[$signature];
    }

    /**
     * Build the Directory Store from parameters with correct defaults.
     *
     * Behavior:
     * - Read editor base dir and plugin dir (with optional caller override).
     * - If $dir is empty or an array with no non-blank paths, fall back to $baseDir.
     * - Normalize string $dir to array format.
     * - Only add a default "images" entry when there are no usable (non-blank) paths,
     *   and only if allow_root is false. Otherwise, ignore blank rows.
     * 
     * @param  WFFileSystem $filesystem The filesystem instance to use.
     *
     * @return array        Associative array keyed by md5(path) => ['path' => ..., 'label' => ...]
     */
    protected function buildDirectoryStoreFromParams($filesystem): array
    {
        // default global filesystem configuration
        $baseFs = (array) $this->getParam('editor.filesystem', array('name' => 'joomla'));

        if (empty($baseFs['name'])) {
            $baseFs['name'] = 'joomla'; // default to joomla filesystem
        }

        // get the global base directory value
        $baseDir = $this->getParam('editor.dir', '', '', false);

        // get directory from plugin parameter, fallback to base directory as it cannot itself be empty
        $dir = $this->getParam($this->getName() . '.dir');

        // check for directory set by caller, eg: Image Manager in Basic Dialog
        if ($this->get('caller')) {
            $dir = $this->getParam($this->get('caller') . '.dir', $dir);
        }

        // allow root: accept both spellings just in case
        $allowRoot = (bool) ($filesystem->get('allowroot', $filesystem->get('allow_root', 0)));

        // if the filesystem name matches the base filesystem name, use the base directory if no directory is set and allowRoot is false
        if ($baseFs['name'] === $filesystem->get('name') && $allowRoot === false) {
            // if no directory is set, or it is an empty array, use the base directory
            if (empty($dir)) {
                $dir = $baseDir;

                // otherwise, if it is an array, check if it has a path value, if not use the base directory    
            } else if (is_array($dir) && count(array_filter(array_column($dir, 'path'))) === 0) {
                $dir = $baseDir;
            }
        }

        // Normalize $dir into an array of directories if it is a string (legacy value)
        if (!is_array($dir)) {
            $dir = [
                [
                    'path' => $dir,
                    'label' => '',
                ],
            ];
        }

        // Collect non-blank entries (trimmed)
        $nonBlank = [];

        foreach ($dir as $values) {
            $path = trim($values['path'] ?? '');
            $label = $values['label'] ?? '';

            if ($path !== '') {
                $nonBlank[] = ['path' => $path, 'label' => $label];
            }
        }

        $dirStore = [];

        // If no usable entries exist (all blank or effectively empty after normalization)
        if (count($nonBlank) === 0) {
            if ($allowRoot === false) {
                $root = $filesystem->get('root', 'images'); // get the default root for the filesystem

                if (empty($root)) {
                    $root = 'images';
                }

                // Default ONLY here to "images"
                $hash = md5($root);

                $dirStore[$hash] = [
                    'path'  => $root,
                    'label' => '' // no label required for a single path
                ];
            } else {
                // Root allowed: a single blank/root entry
                $hash = md5('');

                $dirStore[$hash] = [
                    'path' => '',
                    'label' => '',
                ];
            }

            return $dirStore;
        }

        // Otherwise, at least one non-blank path exists — ignore blank rows
        foreach ($nonBlank as $item) {
            $hash = md5($item['path']);

            $dirStore[$hash] = [
                'path' => $item['path'],
                'label' => $item['label'],
            ];
        }

        return $dirStore;
    }

    private function getFeatures($filesystem)
    {
        $isReadOnly = $filesystem->get('readonly', false);

        $allow = function ($param, $default = 1) use ($isReadOnly) {
            return $isReadOnly ? false : $this->getParam($param, $default);
        };

        $features = array(
            'help' => $allow('help_button', 1),
            'upload' => $allow('upload'),
            'folder' => array(
                'create' => $allow('folder_new'),
                'delete' => $allow('folder_delete'),
                'rename' => $allow('folder_rename'),
                'move'   => $allow('folder_move'),
            ),
            'file' => array(
                'delete' => $allow('file_delete'),
                'rename' => $allow('file_rename'),
                'move'   => $allow('file_move'),
            ),
        );

        return $features;
    }

    /**
     * Get the Media Manager configuration.
     *
     * @return array
     */
    protected function getFileBrowserConfig($config = array())
    {
        $filetypes = $this->getParam('extensions', $this->get('_filetypes'));
        $textcase = $this->getParam('editor.websafe_textcase', '');

        // flatten filetypes
        $filetypes = WFUtility::formatFileTypesList('list', $filetypes);

        $filesystem = $this->getFilesystem(array(
            'upload_conflict'   => $this->getParam('editor.upload_conflict', 'overwrite'),
            'upload_suffix'     => $this->getParam('editor.upload_suffix', '_copy'),
            'filetypes'         => $filetypes
        ));

        // implode textcase array to create string
        if (is_array($textcase)) {
            $textcase = array_filter($textcase, 'strlen');
            $textcase = implode(',', $textcase);
        }

        $filter = $this->getParam('editor.dir_filter', array());

        // explode to array if string - 2.7.x...2.7.11
        if (!is_array($filter)) {
            $filter = explode(',', $filter);
        }

        // remove empty values
        $filter = array_filter((array) $filter);

        $dirStore = $this->buildDirectoryStoreFromParams($filesystem);

        // get websafe spaces parameter and convert legacy values
        $websafe_spaces = $this->getParam('editor.websafe_allow_spaces', '_');

        if (is_numeric($websafe_spaces)) {
            // legacy replacement
            if ($websafe_spaces == 0) {
                $websafe_spaces = '_';
            }
            // convert to space
            if ($websafe_spaces == 1) {
                $websafe_spaces = ' ';
            }
        }

        // fix legacy list limit value
        $list_limit = $this->getParam('editor.list_limit', 0);

        // convert "all" to 0
        if (!is_numeric($list_limit)) {
            $list_limit = 0;
        }

        $features = $this->getFeatures($filesystem);

        $base = array(
            'dir' => $dirStore,
            'filesystem' => $filesystem,
            'filetypes' => $filetypes,
            'filter' => $filter,
            'upload' => array(
                'max_size' => $this->getParam('max_size', 1024),
                'validate_mimetype' => (int) $this->getParam('editor.validate_mimetype', 1),
                'add_random' => (int) $this->getParam('editor.upload_add_random', 0),
                'total_files' => (float) $this->getParam('editor.total_files', 0),
                'total_size' => (float) $this->getParam('editor.total_size', 0),
                'remove_exif' => (int) $this->getParam('editor.upload_remove_exif', 0),
            ),
            'folder_tree' => $this->getParam('editor.folder_tree', 1),
            'list_limit' => $list_limit,
            'features' => $features,
            'websafe_mode' => $this->getParam('editor.websafe_mode', 'utf-8'),
            'websafe_spaces' => $websafe_spaces,
            'websafe_textcase' => $textcase,
            'date_format' => $this->getParam('editor.date_format', '%d/%m/%Y, %H:%M'),
            'position' => $this->getParam('editor.filebrowser_position', $this->getParam('editor.browser_position', 'bottom')),
            'use_state_cookies' => $this->getParam('editor.use_cookies', true),
            'search_depth' => $this->getParam('editor.filebrowser_search_depth', 3),
            'allow_download' => $this->getParam('allow_download', 0),
            'list_limit_options' => $filesystem->get('list_limit_options', array(10, 25, 50, 100, 0))
        );

        return WFUtility::array_merge_recursive_distinct($base, $config);
    }
}
libraries/classes/manager/index.html000060400000000054152455721620013570 0ustar00<html><body bgcolor="#FFFFFF"></body></html>libraries/classes/mobile.php000060400000235320152455721620012147 0ustar00<?php
/**
 * Mobile Detect Library
 * Motto: "Every business should have a mobile detection script to detect mobile readers"
 *
 * Mobile_Detect is a lightweight PHP class for detecting mobile devices (including tablets).
 * It uses the User-Agent string combined with specific HTTP headers to detect the mobile environment.
 *
 * Homepage: http://mobiledetect.net
 * GitHub: https://github.com/serbanghita/Mobile-Detect
 * README: https://github.com/serbanghita/Mobile-Detect/blob/master/README.md
 * CONTRIBUTING: https://github.com/serbanghita/Mobile-Detect/blob/master/docs/CONTRIBUTING.md
 * KNOWN LIMITATIONS: https://github.com/serbanghita/Mobile-Detect/blob/master/docs/KNOWN_LIMITATIONS.md
 * EXAMPLES: https://github.com/serbanghita/Mobile-Detect/wiki/Code-examples
 *
 * @license https://github.com/serbanghita/Mobile-Detect/blob/master/LICENSE.txt MIT License
 * @author  Serban Ghita <serbanghita@gmail.com>
 * @author  Nick Ilyin <nick.ilyin@gmail.com>
 * Original author: Victor Stanciu <vic.stanciu@gmail.com>
 *
 * @version 2.8.33
 */
class Wf_Mobile_Detect
{
    /**
     * Mobile detection type.
     *
     * @deprecated since version 2.6.9
     */
    const DETECTION_TYPE_MOBILE = 'mobile';

    /**
     * Extended detection type.
     *
     * @deprecated since version 2.6.9
     */
    const DETECTION_TYPE_EXTENDED = 'extended';

    /**
     * A frequently used regular expression to extract version #s.
     *
     * @deprecated since version 2.6.9
     */
    const VER = '([\w._\+]+)';

    /**
     * Top-level device.
     */
    const MOBILE_GRADE_A = 'A';

    /**
     * Mid-level device.
     */
    const MOBILE_GRADE_B = 'B';

    /**
     * Low-level device.
     */
    const MOBILE_GRADE_C = 'C';

    /**
     * Stores the version number of the current release.
     */
    const VERSION = '2.8.33';

    /**
     * A type for the version() method indicating a string return value.
     */
    const VERSION_TYPE_STRING = 'text';

    /**
     * A type for the version() method indicating a float return value.
     */
    const VERSION_TYPE_FLOAT = 'float';

    /**
     * A cache for resolved matches
     * @var array
     */
    protected $cache = array();

    /**
     * The User-Agent HTTP header is stored in here.
     * @var string
     */
    protected $userAgent = null;

    /**
     * HTTP headers in the PHP-flavor. So HTTP_USER_AGENT and SERVER_SOFTWARE.
     * @var array
     */
    protected $httpHeaders = array();

    /**
     * CloudFront headers. E.g. CloudFront-Is-Desktop-Viewer, CloudFront-Is-Mobile-Viewer & CloudFront-Is-Tablet-Viewer.
     * @var array
     */
    protected $cloudfrontHeaders = array();

    /**
     * The matching Regex.
     * This is good for debug.
     * @var string
     */
    protected $matchingRegex = null;

    /**
     * The matches extracted from the regex expression.
     * This is good for debug.
     *
     * @var string
     */
    protected $matchesArray = null;

    /**
     * The detection type, using self::DETECTION_TYPE_MOBILE or self::DETECTION_TYPE_EXTENDED.
     *
     * @deprecated since version 2.6.9
     *
     * @var string
     */
    protected $detectionType = self::DETECTION_TYPE_MOBILE;

    /**
     * HTTP headers that trigger the 'isMobile' detection
     * to be true.
     *
     * @var array
     */
    protected static $mobileHeaders = array(

        'HTTP_ACCEPT' => array('matches' => array(
            // Opera Mini; @reference: http://dev.opera.com/articles/view/opera-binary-markup-language/
            'application/x-obml2d',
            // BlackBerry devices.
            'application/vnd.rim.html',
            'text/vnd.wap.wml',
            'application/vnd.wap.xhtml+xml',
        )),
        'HTTP_X_WAP_PROFILE' => null,
        'HTTP_X_WAP_CLIENTID' => null,
        'HTTP_WAP_CONNECTION' => null,
        'HTTP_PROFILE' => null,
        // Reported by Opera on Nokia devices (eg. C3).
        'HTTP_X_OPERAMINI_PHONE_UA' => null,
        'HTTP_X_NOKIA_GATEWAY_ID' => null,
        'HTTP_X_ORANGE_ID' => null,
        'HTTP_X_VODAFONE_3GPDPCONTEXT' => null,
        'HTTP_X_HUAWEI_USERID' => null,
        // Reported by Windows Smartphones.
        'HTTP_UA_OS' => null,
        // Reported by Verizon, Vodafone proxy system.
        'HTTP_X_MOBILE_GATEWAY' => null,
        // Seen this on HTC Sensation. SensationXE_Beats_Z715e.
        'HTTP_X_ATT_DEVICEID' => null,
        // Seen this on a HTC.
        'HTTP_UA_CPU' => array('matches' => array('ARM')),
    );

    /**
     * List of mobile devices (phones).
     *
     * @var array
     */
    protected static $phoneDevices = array(
        'iPhone' => '\biPhone\b|\biPod\b', // |\biTunes
        'BlackBerry' => 'BlackBerry|\bBB10\b|rim[0-9]+',
        'HTC' => 'HTC|HTC.*(Sensation|Evo|Vision|Explorer|6800|8100|8900|A7272|S510e|C110e|Legend|Desire|T8282)|APX515CKT|Qtek9090|APA9292KT|HD_mini|Sensation.*Z710e|PG86100|Z715e|Desire.*(A8181|HD)|ADR6200|ADR6400L|ADR6425|001HT|Inspire 4G|Android.*\bEVO\b|T-Mobile G1|Z520m|Android [0-9.]+; Pixel',
        'Nexus' => 'Nexus One|Nexus S|Galaxy.*Nexus|Android.*Nexus.*Mobile|Nexus 4|Nexus 5|Nexus 6',
        // @todo: Is 'Dell Streak' a tablet or a phone? ;)
        'Dell' => 'Dell[;]? (Streak|Aero|Venue|Venue Pro|Flash|Smoke|Mini 3iX)|XCD28|XCD35|\b001DL\b|\b101DL\b|\bGS01\b',
        'Motorola' => 'Motorola|DROIDX|DROID BIONIC|\bDroid\b.*Build|Android.*Xoom|HRI39|MOT-|A1260|A1680|A555|A853|A855|A953|A955|A956|Motorola.*ELECTRIFY|Motorola.*i1|i867|i940|MB200|MB300|MB501|MB502|MB508|MB511|MB520|MB525|MB526|MB611|MB612|MB632|MB810|MB855|MB860|MB861|MB865|MB870|ME501|ME502|ME511|ME525|ME600|ME632|ME722|ME811|ME860|ME863|ME865|MT620|MT710|MT716|MT720|MT810|MT870|MT917|Motorola.*TITANIUM|WX435|WX445|XT300|XT301|XT311|XT316|XT317|XT319|XT320|XT390|XT502|XT530|XT531|XT532|XT535|XT603|XT610|XT611|XT615|XT681|XT701|XT702|XT711|XT720|XT800|XT806|XT860|XT862|XT875|XT882|XT883|XT894|XT901|XT907|XT909|XT910|XT912|XT928|XT926|XT915|XT919|XT925|XT1021|\bMoto E\b|XT1068|XT1092|XT1052',
        'Samsung' => '\bSamsung\b|SM-G950F|SM-G955F|SM-G9250|GT-19300|SGH-I337|BGT-S5230|GT-B2100|GT-B2700|GT-B2710|GT-B3210|GT-B3310|GT-B3410|GT-B3730|GT-B3740|GT-B5510|GT-B5512|GT-B5722|GT-B6520|GT-B7300|GT-B7320|GT-B7330|GT-B7350|GT-B7510|GT-B7722|GT-B7800|GT-C3010|GT-C3011|GT-C3060|GT-C3200|GT-C3212|GT-C3212I|GT-C3262|GT-C3222|GT-C3300|GT-C3300K|GT-C3303|GT-C3303K|GT-C3310|GT-C3322|GT-C3330|GT-C3350|GT-C3500|GT-C3510|GT-C3530|GT-C3630|GT-C3780|GT-C5010|GT-C5212|GT-C6620|GT-C6625|GT-C6712|GT-E1050|GT-E1070|GT-E1075|GT-E1080|GT-E1081|GT-E1085|GT-E1087|GT-E1100|GT-E1107|GT-E1110|GT-E1120|GT-E1125|GT-E1130|GT-E1160|GT-E1170|GT-E1175|GT-E1180|GT-E1182|GT-E1200|GT-E1210|GT-E1225|GT-E1230|GT-E1390|GT-E2100|GT-E2120|GT-E2121|GT-E2152|GT-E2220|GT-E2222|GT-E2230|GT-E2232|GT-E2250|GT-E2370|GT-E2550|GT-E2652|GT-E3210|GT-E3213|GT-I5500|GT-I5503|GT-I5700|GT-I5800|GT-I5801|GT-I6410|GT-I6420|GT-I7110|GT-I7410|GT-I7500|GT-I8000|GT-I8150|GT-I8160|GT-I8190|GT-I8320|GT-I8330|GT-I8350|GT-I8530|GT-I8700|GT-I8703|GT-I8910|GT-I9000|GT-I9001|GT-I9003|GT-I9010|GT-I9020|GT-I9023|GT-I9070|GT-I9082|GT-I9100|GT-I9103|GT-I9220|GT-I9250|GT-I9300|GT-I9305|GT-I9500|GT-I9505|GT-M3510|GT-M5650|GT-M7500|GT-M7600|GT-M7603|GT-M8800|GT-M8910|GT-N7000|GT-S3110|GT-S3310|GT-S3350|GT-S3353|GT-S3370|GT-S3650|GT-S3653|GT-S3770|GT-S3850|GT-S5210|GT-S5220|GT-S5229|GT-S5230|GT-S5233|GT-S5250|GT-S5253|GT-S5260|GT-S5263|GT-S5270|GT-S5300|GT-S5330|GT-S5350|GT-S5360|GT-S5363|GT-S5369|GT-S5380|GT-S5380D|GT-S5560|GT-S5570|GT-S5600|GT-S5603|GT-S5610|GT-S5620|GT-S5660|GT-S5670|GT-S5690|GT-S5750|GT-S5780|GT-S5830|GT-S5839|GT-S6102|GT-S6500|GT-S7070|GT-S7200|GT-S7220|GT-S7230|GT-S7233|GT-S7250|GT-S7500|GT-S7530|GT-S7550|GT-S7562|GT-S7710|GT-S8000|GT-S8003|GT-S8500|GT-S8530|GT-S8600|SCH-A310|SCH-A530|SCH-A570|SCH-A610|SCH-A630|SCH-A650|SCH-A790|SCH-A795|SCH-A850|SCH-A870|SCH-A890|SCH-A930|SCH-A950|SCH-A970|SCH-A990|SCH-I100|SCH-I110|SCH-I400|SCH-I405|SCH-I500|SCH-I510|SCH-I515|SCH-I600|SCH-I730|SCH-I760|SCH-I770|SCH-I830|SCH-I910|SCH-I920|SCH-I959|SCH-LC11|SCH-N150|SCH-N300|SCH-R100|SCH-R300|SCH-R351|SCH-R400|SCH-R410|SCH-T300|SCH-U310|SCH-U320|SCH-U350|SCH-U360|SCH-U365|SCH-U370|SCH-U380|SCH-U410|SCH-U430|SCH-U450|SCH-U460|SCH-U470|SCH-U490|SCH-U540|SCH-U550|SCH-U620|SCH-U640|SCH-U650|SCH-U660|SCH-U700|SCH-U740|SCH-U750|SCH-U810|SCH-U820|SCH-U900|SCH-U940|SCH-U960|SCS-26UC|SGH-A107|SGH-A117|SGH-A127|SGH-A137|SGH-A157|SGH-A167|SGH-A177|SGH-A187|SGH-A197|SGH-A227|SGH-A237|SGH-A257|SGH-A437|SGH-A517|SGH-A597|SGH-A637|SGH-A657|SGH-A667|SGH-A687|SGH-A697|SGH-A707|SGH-A717|SGH-A727|SGH-A737|SGH-A747|SGH-A767|SGH-A777|SGH-A797|SGH-A817|SGH-A827|SGH-A837|SGH-A847|SGH-A867|SGH-A877|SGH-A887|SGH-A897|SGH-A927|SGH-B100|SGH-B130|SGH-B200|SGH-B220|SGH-C100|SGH-C110|SGH-C120|SGH-C130|SGH-C140|SGH-C160|SGH-C170|SGH-C180|SGH-C200|SGH-C207|SGH-C210|SGH-C225|SGH-C230|SGH-C417|SGH-C450|SGH-D307|SGH-D347|SGH-D357|SGH-D407|SGH-D415|SGH-D780|SGH-D807|SGH-D980|SGH-E105|SGH-E200|SGH-E315|SGH-E316|SGH-E317|SGH-E335|SGH-E590|SGH-E635|SGH-E715|SGH-E890|SGH-F300|SGH-F480|SGH-I200|SGH-I300|SGH-I320|SGH-I550|SGH-I577|SGH-I600|SGH-I607|SGH-I617|SGH-I627|SGH-I637|SGH-I677|SGH-I700|SGH-I717|SGH-I727|SGH-i747M|SGH-I777|SGH-I780|SGH-I827|SGH-I847|SGH-I857|SGH-I896|SGH-I897|SGH-I900|SGH-I907|SGH-I917|SGH-I927|SGH-I937|SGH-I997|SGH-J150|SGH-J200|SGH-L170|SGH-L700|SGH-M110|SGH-M150|SGH-M200|SGH-N105|SGH-N500|SGH-N600|SGH-N620|SGH-N625|SGH-N700|SGH-N710|SGH-P107|SGH-P207|SGH-P300|SGH-P310|SGH-P520|SGH-P735|SGH-P777|SGH-Q105|SGH-R210|SGH-R220|SGH-R225|SGH-S105|SGH-S307|SGH-T109|SGH-T119|SGH-T139|SGH-T209|SGH-T219|SGH-T229|SGH-T239|SGH-T249|SGH-T259|SGH-T309|SGH-T319|SGH-T329|SGH-T339|SGH-T349|SGH-T359|SGH-T369|SGH-T379|SGH-T409|SGH-T429|SGH-T439|SGH-T459|SGH-T469|SGH-T479|SGH-T499|SGH-T509|SGH-T519|SGH-T539|SGH-T559|SGH-T589|SGH-T609|SGH-T619|SGH-T629|SGH-T639|SGH-T659|SGH-T669|SGH-T679|SGH-T709|SGH-T719|SGH-T729|SGH-T739|SGH-T746|SGH-T749|SGH-T759|SGH-T769|SGH-T809|SGH-T819|SGH-T839|SGH-T919|SGH-T929|SGH-T939|SGH-T959|SGH-T989|SGH-U100|SGH-U200|SGH-U800|SGH-V205|SGH-V206|SGH-X100|SGH-X105|SGH-X120|SGH-X140|SGH-X426|SGH-X427|SGH-X475|SGH-X495|SGH-X497|SGH-X507|SGH-X600|SGH-X610|SGH-X620|SGH-X630|SGH-X700|SGH-X820|SGH-X890|SGH-Z130|SGH-Z150|SGH-Z170|SGH-ZX10|SGH-ZX20|SHW-M110|SPH-A120|SPH-A400|SPH-A420|SPH-A460|SPH-A500|SPH-A560|SPH-A600|SPH-A620|SPH-A660|SPH-A700|SPH-A740|SPH-A760|SPH-A790|SPH-A800|SPH-A820|SPH-A840|SPH-A880|SPH-A900|SPH-A940|SPH-A960|SPH-D600|SPH-D700|SPH-D710|SPH-D720|SPH-I300|SPH-I325|SPH-I330|SPH-I350|SPH-I500|SPH-I600|SPH-I700|SPH-L700|SPH-M100|SPH-M220|SPH-M240|SPH-M300|SPH-M305|SPH-M320|SPH-M330|SPH-M350|SPH-M360|SPH-M370|SPH-M380|SPH-M510|SPH-M540|SPH-M550|SPH-M560|SPH-M570|SPH-M580|SPH-M610|SPH-M620|SPH-M630|SPH-M800|SPH-M810|SPH-M850|SPH-M900|SPH-M910|SPH-M920|SPH-M930|SPH-N100|SPH-N200|SPH-N240|SPH-N300|SPH-N400|SPH-Z400|SWC-E100|SCH-i909|GT-N7100|GT-N7105|SCH-I535|SM-N900A|SGH-I317|SGH-T999L|GT-S5360B|GT-I8262|GT-S6802|GT-S6312|GT-S6310|GT-S5312|GT-S5310|GT-I9105|GT-I8510|GT-S6790N|SM-G7105|SM-N9005|GT-S5301|GT-I9295|GT-I9195|SM-C101|GT-S7392|GT-S7560|GT-B7610|GT-I5510|GT-S7582|GT-S7530E|GT-I8750|SM-G9006V|SM-G9008V|SM-G9009D|SM-G900A|SM-G900D|SM-G900F|SM-G900H|SM-G900I|SM-G900J|SM-G900K|SM-G900L|SM-G900M|SM-G900P|SM-G900R4|SM-G900S|SM-G900T|SM-G900V|SM-G900W8|SHV-E160K|SCH-P709|SCH-P729|SM-T2558|GT-I9205|SM-G9350|SM-J120F|SM-G920F|SM-G920V|SM-G930F|SM-N910C|SM-A310F|GT-I9190|SM-J500FN|SM-G903F|SM-J330F',
        'LG' => '\bLG\b;|LG[- ]?(C800|C900|E400|E610|E900|E-900|F160|F180K|F180L|F180S|730|855|L160|LS740|LS840|LS970|LU6200|MS690|MS695|MS770|MS840|MS870|MS910|P500|P700|P705|VM696|AS680|AS695|AX840|C729|E970|GS505|272|C395|E739BK|E960|L55C|L75C|LS696|LS860|P769BK|P350|P500|P509|P870|UN272|US730|VS840|VS950|LN272|LN510|LS670|LS855|LW690|MN270|MN510|P509|P769|P930|UN200|UN270|UN510|UN610|US670|US740|US760|UX265|UX840|VN271|VN530|VS660|VS700|VS740|VS750|VS910|VS920|VS930|VX9200|VX11000|AX840A|LW770|P506|P925|P999|E612|D955|D802|MS323|M257)',
        'Sony' => 'SonyST|SonyLT|SonyEricsson|SonyEricssonLT15iv|LT18i|E10i|LT28h|LT26w|SonyEricssonMT27i|C5303|C6902|C6903|C6906|C6943|D2533',
        'Asus' => 'Asus.*Galaxy|PadFone.*Mobile',
        'NokiaLumia' => 'Lumia [0-9]{3,4}',
        // http://www.micromaxinfo.com/mobiles/smartphones
        // Added because the codes might conflict with Acer Tablets.
        'Micromax' => 'Micromax.*\b(A210|A92|A88|A72|A111|A110Q|A115|A116|A110|A90S|A26|A51|A35|A54|A25|A27|A89|A68|A65|A57|A90)\b',
        // @todo Complete the regex.
        'Palm' => 'PalmSource|Palm', // avantgo|blazer|elaine|hiptop|plucker|xiino ;
        'Vertu' => 'Vertu|Vertu.*Ltd|Vertu.*Ascent|Vertu.*Ayxta|Vertu.*Constellation(F|Quest)?|Vertu.*Monika|Vertu.*Signature', // Just for fun ;)
        // http://www.pantech.co.kr/en/prod/prodList.do?gbrand=VEGA (PANTECH)
        // Most of the VEGA devices are legacy. PANTECH seem to be newer devices based on Android.
        'Pantech' => 'PANTECH|IM-A850S|IM-A840S|IM-A830L|IM-A830K|IM-A830S|IM-A820L|IM-A810K|IM-A810S|IM-A800S|IM-T100K|IM-A725L|IM-A780L|IM-A775C|IM-A770K|IM-A760S|IM-A750K|IM-A740S|IM-A730S|IM-A720L|IM-A710K|IM-A690L|IM-A690S|IM-A650S|IM-A630K|IM-A600S|VEGA PTL21|PT003|P8010|ADR910L|P6030|P6020|P9070|P4100|P9060|P5000|CDM8992|TXT8045|ADR8995|IS11PT|P2030|P6010|P8000|PT002|IS06|CDM8999|P9050|PT001|TXT8040|P2020|P9020|P2000|P7040|P7000|C790',
        // http://www.fly-phone.com/devices/smartphones/ ; Included only smartphones.
        'Fly' => 'IQ230|IQ444|IQ450|IQ440|IQ442|IQ441|IQ245|IQ256|IQ236|IQ255|IQ235|IQ245|IQ275|IQ240|IQ285|IQ280|IQ270|IQ260|IQ250',
        // http://fr.wikomobile.com
        'Wiko' => 'KITE 4G|HIGHWAY|GETAWAY|STAIRWAY|DARKSIDE|DARKFULL|DARKNIGHT|DARKMOON|SLIDE|WAX 4G|RAINBOW|BLOOM|SUNSET|GOA(?!nna)|LENNY|BARRY|IGGY|OZZY|CINK FIVE|CINK PEAX|CINK PEAX 2|CINK SLIM|CINK SLIM 2|CINK +|CINK KING|CINK PEAX|CINK SLIM|SUBLIM',
        'iMobile' => 'i-mobile (IQ|i-STYLE|idea|ZAA|Hitz)',
        // Added simvalley mobile just for fun. They have some interesting devices.
        // http://www.simvalley.fr/telephonie---gps-_22_telephonie-mobile_telephones_.html
        'SimValley' => '\b(SP-80|XT-930|SX-340|XT-930|SX-310|SP-360|SP60|SPT-800|SP-120|SPT-800|SP-140|SPX-5|SPX-8|SP-100|SPX-8|SPX-12)\b',
        // Wolfgang - a brand that is sold by Aldi supermarkets.
        // http://www.wolfgangmobile.com/
        'Wolfgang' => 'AT-B24D|AT-AS50HD|AT-AS40W|AT-AS55HD|AT-AS45q2|AT-B26D|AT-AS50Q',
        'Alcatel' => 'Alcatel',
        'Nintendo' => 'Nintendo (3DS|Switch)',
        // http://en.wikipedia.org/wiki/Amoi
        'Amoi' => 'Amoi',
        // http://en.wikipedia.org/wiki/INQ
        'INQ' => 'INQ',
        'OnePlus' => 'ONEPLUS',
        // @Tapatalk is a mobile app; http://support.tapatalk.com/threads/smf-2-0-2-os-and-browser-detection-plugin-and-tapatalk.15565/#post-79039
        'GenericPhone' => 'Tapatalk|PDA;|SAGEM|\bmmp\b|pocket|\bpsp\b|symbian|Smartphone|smartfon|treo|up.browser|up.link|vodafone|\bwap\b|nokia|Series40|Series60|S60|SonyEricsson|N900|MAUI.*WAP.*Browser',
    );

    /**
     * List of tablet devices.
     *
     * @var array
     */
    protected static $tabletDevices = array(
        // @todo: check for mobile friendly emails topic.
        'iPad' => 'iPad|iPad.*Mobile',
        // Removed |^.*Android.*Nexus(?!(?:Mobile).)*$
        // @see #442
        // @todo Merge NexusTablet into GoogleTablet.
        'NexusTablet' => 'Android.*Nexus[\s]+(7|9|10)',
        // https://en.wikipedia.org/wiki/Pixel_C
        'GoogleTablet' => 'Android.*Pixel C',
        'SamsungTablet' => 'SAMSUNG.*Tablet|Galaxy.*Tab|SC-01C|GT-P1000|GT-P1003|GT-P1010|GT-P3105|GT-P6210|GT-P6800|GT-P6810|GT-P7100|GT-P7300|GT-P7310|GT-P7500|GT-P7510|SCH-I800|SCH-I815|SCH-I905|SGH-I957|SGH-I987|SGH-T849|SGH-T859|SGH-T869|SPH-P100|GT-P3100|GT-P3108|GT-P3110|GT-P5100|GT-P5110|GT-P6200|GT-P7320|GT-P7511|GT-N8000|GT-P8510|SGH-I497|SPH-P500|SGH-T779|SCH-I705|SCH-I915|GT-N8013|GT-P3113|GT-P5113|GT-P8110|GT-N8010|GT-N8005|GT-N8020|GT-P1013|GT-P6201|GT-P7501|GT-N5100|GT-N5105|GT-N5110|SHV-E140K|SHV-E140L|SHV-E140S|SHV-E150S|SHV-E230K|SHV-E230L|SHV-E230S|SHW-M180K|SHW-M180L|SHW-M180S|SHW-M180W|SHW-M300W|SHW-M305W|SHW-M380K|SHW-M380S|SHW-M380W|SHW-M430W|SHW-M480K|SHW-M480S|SHW-M480W|SHW-M485W|SHW-M486W|SHW-M500W|GT-I9228|SCH-P739|SCH-I925|GT-I9200|GT-P5200|GT-P5210|GT-P5210X|SM-T311|SM-T310|SM-T310X|SM-T210|SM-T210R|SM-T211|SM-P600|SM-P601|SM-P605|SM-P900|SM-P901|SM-T217|SM-T217A|SM-T217S|SM-P6000|SM-T3100|SGH-I467|XE500|SM-T110|GT-P5220|GT-I9200X|GT-N5110X|GT-N5120|SM-P905|SM-T111|SM-T2105|SM-T315|SM-T320|SM-T320X|SM-T321|SM-T520|SM-T525|SM-T530NU|SM-T230NU|SM-T330NU|SM-T900|XE500T1C|SM-P605V|SM-P905V|SM-T337V|SM-T537V|SM-T707V|SM-T807V|SM-P600X|SM-P900X|SM-T210X|SM-T230|SM-T230X|SM-T325|GT-P7503|SM-T531|SM-T330|SM-T530|SM-T705|SM-T705C|SM-T535|SM-T331|SM-T800|SM-T700|SM-T537|SM-T807|SM-P907A|SM-T337A|SM-T537A|SM-T707A|SM-T807A|SM-T237|SM-T807P|SM-P607T|SM-T217T|SM-T337T|SM-T807T|SM-T116NQ|SM-T116BU|SM-P550|SM-T350|SM-T550|SM-T9000|SM-P9000|SM-T705Y|SM-T805|GT-P3113|SM-T710|SM-T810|SM-T815|SM-T360|SM-T533|SM-T113|SM-T335|SM-T715|SM-T560|SM-T670|SM-T677|SM-T377|SM-T567|SM-T357T|SM-T555|SM-T561|SM-T713|SM-T719|SM-T813|SM-T819|SM-T580|SM-T355Y?|SM-T280|SM-T817A|SM-T820|SM-W700|SM-P580|SM-T587|SM-P350|SM-P555M|SM-P355M|SM-T113NU|SM-T815Y|SM-T585|SM-T285|SM-T825|SM-W708|SM-T835', // SCH-P709|SCH-P729|SM-T2558|GT-I9205 - Samsung Mega - treat them like a regular phone.
        // http://docs.aws.amazon.com/silk/latest/developerguide/user-agent.html
        'Kindle' => 'Kindle|Silk.*Accelerated|Android.*\b(KFOT|KFTT|KFJWI|KFJWA|KFOTE|KFSOWI|KFTHWI|KFTHWA|KFAPWI|KFAPWA|WFJWAE|KFSAWA|KFSAWI|KFASWI|KFARWI|KFFOWI|KFGIWI|KFMEWI)\b|Android.*Silk/[0-9.]+ like Chrome/[0-9.]+ (?!Mobile)',
        // Only the Surface tablets with Windows RT are considered mobile.
        // http://msdn.microsoft.com/en-us/library/ie/hh920767(v=vs.85).aspx
        'SurfaceTablet' => 'Windows NT [0-9.]+; ARM;.*(Tablet|ARMBJS)',
        // http://shopping1.hp.com/is-bin/INTERSHOP.enfinity/WFS/WW-USSMBPublicStore-Site/en_US/-/USD/ViewStandardCatalog-Browse?CatalogCategoryID=JfIQ7EN5lqMAAAEyDcJUDwMT
        'HPTablet' => 'HP Slate (7|8|10)|HP ElitePad 900|hp-tablet|EliteBook.*Touch|HP 8|Slate 21|HP SlateBook 10',
        // Watch out for PadFone, see #132.
        // http://www.asus.com/de/Tablets_Mobile/Memo_Pad_Products/
        'AsusTablet' => '^.*PadFone((?!Mobile).)*$|Transformer|TF101|TF101G|TF300T|TF300TG|TF300TL|TF700T|TF700KL|TF701T|TF810C|ME171|ME301T|ME302C|ME371MG|ME370T|ME372MG|ME172V|ME173X|ME400C|Slider SL101|\bK00F\b|\bK00C\b|\bK00E\b|\bK00L\b|TX201LA|ME176C|ME102A|\bM80TA\b|ME372CL|ME560CG|ME372CG|ME302KL| K010 | K011 | K017 | K01E |ME572C|ME103K|ME170C|ME171C|\bME70C\b|ME581C|ME581CL|ME8510C|ME181C|P01Y|PO1MA|P01Z|\bP027\b|\bP024\b|\bP00C\b',
        'BlackBerryTablet' => 'PlayBook|RIM Tablet',
        'HTCtablet' => 'HTC_Flyer_P512|HTC Flyer|HTC Jetstream|HTC-P715a|HTC EVO View 4G|PG41200|PG09410',
        'MotorolaTablet' => 'xoom|sholest|MZ615|MZ605|MZ505|MZ601|MZ602|MZ603|MZ604|MZ606|MZ607|MZ608|MZ609|MZ615|MZ616|MZ617',
        'NookTablet' => 'Android.*Nook|NookColor|nook browser|BNRV200|BNRV200A|BNTV250|BNTV250A|BNTV400|BNTV600|LogicPD Zoom2',
        // http://www.acer.ro/ac/ro/RO/content/drivers
        // http://www.packardbell.co.uk/pb/en/GB/content/download (Packard Bell is part of Acer)
        // http://us.acer.com/ac/en/US/content/group/tablets
        // http://www.acer.de/ac/de/DE/content/models/tablets/
        // Can conflict with Micromax and Motorola phones codes.
        'AcerTablet' => 'Android.*; \b(A100|A101|A110|A200|A210|A211|A500|A501|A510|A511|A700|A701|W500|W500P|W501|W501P|W510|W511|W700|G100|G100W|B1-A71|B1-710|B1-711|A1-810|A1-811|A1-830)\b|W3-810|\bA3-A10\b|\bA3-A11\b|\bA3-A20\b|\bA3-A30',
        // http://eu.computers.toshiba-europe.com/innovation/family/Tablets/1098744/banner_id/tablet_footerlink/
        // http://us.toshiba.com/tablets/tablet-finder
        // http://www.toshiba.co.jp/regza/tablet/
        'ToshibaTablet' => 'Android.*(AT100|AT105|AT200|AT205|AT270|AT275|AT300|AT305|AT1S5|AT500|AT570|AT700|AT830)|TOSHIBA.*FOLIO',
        // http://www.nttdocomo.co.jp/english/service/developer/smart_phone/technical_info/spec/index.html
        // http://www.lg.com/us/tablets
        'LGTablet' => '\bL-06C|LG-V909|LG-V900|LG-V700|LG-V510|LG-V500|LG-V410|LG-V400|LG-VK810\b',
        'FujitsuTablet' => 'Android.*\b(F-01D|F-02F|F-05E|F-10D|M532|Q572)\b',
        // Prestigio Tablets http://www.prestigio.com/support
        'PrestigioTablet' => 'PMP3170B|PMP3270B|PMP3470B|PMP7170B|PMP3370B|PMP3570C|PMP5870C|PMP3670B|PMP5570C|PMP5770D|PMP3970B|PMP3870C|PMP5580C|PMP5880D|PMP5780D|PMP5588C|PMP7280C|PMP7280C3G|PMP7280|PMP7880D|PMP5597D|PMP5597|PMP7100D|PER3464|PER3274|PER3574|PER3884|PER5274|PER5474|PMP5097CPRO|PMP5097|PMP7380D|PMP5297C|PMP5297C_QUAD|PMP812E|PMP812E3G|PMP812F|PMP810E|PMP880TD|PMT3017|PMT3037|PMT3047|PMT3057|PMT7008|PMT5887|PMT5001|PMT5002',
        // http://support.lenovo.com/en_GB/downloads/default.page?#
        'LenovoTablet' => 'Lenovo TAB|Idea(Tab|Pad)( A1|A10| K1|)|ThinkPad([ ]+)?Tablet|YT3-850M|YT3-X90L|YT3-X90F|YT3-X90X|Lenovo.*(S2109|S2110|S5000|S6000|K3011|A3000|A3500|A1000|A2107|A2109|A1107|A5500|A7600|B6000|B8000|B8080)(-|)(FL|F|HV|H|)|TB-X103F|TB-X304F|TB-X304L|TB-8703F|Tab2A7-10F|TB2-X30L',
        // http://www.dell.com/support/home/us/en/04/Products/tab_mob/tablets
        'DellTablet' => 'Venue 11|Venue 8|Venue 7|Dell Streak 10|Dell Streak 7',
        // http://www.yarvik.com/en/matrix/tablets/
        'YarvikTablet' => 'Android.*\b(TAB210|TAB211|TAB224|TAB250|TAB260|TAB264|TAB310|TAB360|TAB364|TAB410|TAB411|TAB420|TAB424|TAB450|TAB460|TAB461|TAB464|TAB465|TAB467|TAB468|TAB07-100|TAB07-101|TAB07-150|TAB07-151|TAB07-152|TAB07-200|TAB07-201-3G|TAB07-210|TAB07-211|TAB07-212|TAB07-214|TAB07-220|TAB07-400|TAB07-485|TAB08-150|TAB08-200|TAB08-201-3G|TAB08-201-30|TAB09-100|TAB09-211|TAB09-410|TAB10-150|TAB10-201|TAB10-211|TAB10-400|TAB10-410|TAB13-201|TAB274EUK|TAB275EUK|TAB374EUK|TAB462EUK|TAB474EUK|TAB9-200)\b',
        'MedionTablet' => 'Android.*\bOYO\b|LIFE.*(P9212|P9514|P9516|S9512)|LIFETAB',
        'ArnovaTablet' => '97G4|AN10G2|AN7bG3|AN7fG3|AN8G3|AN8cG3|AN7G3|AN9G3|AN7dG3|AN7dG3ST|AN7dG3ChildPad|AN10bG3|AN10bG3DT|AN9G2',
        // http://www.intenso.de/kategorie_en.php?kategorie=33
        // @todo: http://www.nbhkdz.com/read/b8e64202f92a2df129126bff.html - investigate
        'IntensoTablet' => 'INM8002KP|INM1010FP|INM805ND|Intenso Tab|TAB1004',
        // IRU.ru Tablets http://www.iru.ru/catalog/soho/planetable/
        'IRUTablet' => 'M702pro',
        'MegafonTablet' => 'MegaFon V9|\bZTE V9\b|Android.*\bMT7A\b',
        // http://www.e-boda.ro/tablete-pc.html
        'EbodaTablet' => 'E-Boda (Supreme|Impresspeed|Izzycomm|Essential)',
        // http://www.allview.ro/produse/droseries/lista-tablete-pc/
        'AllViewTablet' => 'Allview.*(Viva|Alldro|City|Speed|All TV|Frenzy|Quasar|Shine|TX1|AX1|AX2)',
        // http://wiki.archosfans.com/index.php?title=Main_Page
        // @note Rewrite the regex format after we add more UAs.
        'ArchosTablet' => '\b(101G9|80G9|A101IT)\b|Qilive 97R|Archos5|\bARCHOS (70|79|80|90|97|101|FAMILYPAD|)(b|c|)(G10| Cobalt| TITANIUM(HD|)| Xenon| Neon|XSK| 2| XS 2| PLATINUM| CARBON|GAMEPAD)\b',
        // http://www.ainol.com/plugin.php?identifier=ainol&module=product
        'AinolTablet' => 'NOVO7|NOVO8|NOVO10|Novo7Aurora|Novo7Basic|NOVO7PALADIN|novo9-Spark',
        'NokiaLumiaTablet' => 'Lumia 2520',
        // @todo: inspect http://esupport.sony.com/US/p/select-system.pl?DIRECTOR=DRIVER
        // Readers http://www.atsuhiro-me.net/ebook/sony-reader/sony-reader-web-browser
        // http://www.sony.jp/support/tablet/
        'SonyTablet' => 'Sony.*Tablet|Xperia Tablet|Sony Tablet S|SO-03E|SGPT12|SGPT13|SGPT114|SGPT121|SGPT122|SGPT123|SGPT111|SGPT112|SGPT113|SGPT131|SGPT132|SGPT133|SGPT211|SGPT212|SGPT213|SGP311|SGP312|SGP321|EBRD1101|EBRD1102|EBRD1201|SGP351|SGP341|SGP511|SGP512|SGP521|SGP541|SGP551|SGP621|SGP641|SGP612|SOT31|SGP771|SGP611|SGP612|SGP712',
        // http://www.support.philips.com/support/catalog/worldproducts.jsp?userLanguage=en&userCountry=cn&categoryid=3G_LTE_TABLET_SU_CN_CARE&title=3G%20tablets%20/%20LTE%20range&_dyncharset=UTF-8
        'PhilipsTablet' => '\b(PI2010|PI3000|PI3100|PI3105|PI3110|PI3205|PI3210|PI3900|PI4010|PI7000|PI7100)\b',
        // db + http://www.cube-tablet.com/buy-products.html
        'CubeTablet' => 'Android.*(K8GT|U9GT|U10GT|U16GT|U17GT|U18GT|U19GT|U20GT|U23GT|U30GT)|CUBE U8GT',
        // http://www.cobyusa.com/?p=pcat&pcat_id=3001
        'CobyTablet' => 'MID1042|MID1045|MID1125|MID1126|MID7012|MID7014|MID7015|MID7034|MID7035|MID7036|MID7042|MID7048|MID7127|MID8042|MID8048|MID8127|MID9042|MID9740|MID9742|MID7022|MID7010',
        // http://www.match.net.cn/products.asp
        'MIDTablet' => 'M9701|M9000|M9100|M806|M1052|M806|T703|MID701|MID713|MID710|MID727|MID760|MID830|MID728|MID933|MID125|MID810|MID732|MID120|MID930|MID800|MID731|MID900|MID100|MID820|MID735|MID980|MID130|MID833|MID737|MID960|MID135|MID860|MID736|MID140|MID930|MID835|MID733|MID4X10',
        // http://www.msi.com/support
        // @todo Research the Windows Tablets.
        'MSITablet' => 'MSI \b(Primo 73K|Primo 73L|Primo 81L|Primo 77|Primo 93|Primo 75|Primo 76|Primo 73|Primo 81|Primo 91|Primo 90|Enjoy 71|Enjoy 7|Enjoy 10)\b',
        // @todo http://www.kyoceramobile.com/support/drivers/
        //    'KyoceraTablet' => null,
        // @todo http://intexuae.com/index.php/category/mobile-devices/tablets-products/
        //    'IntextTablet' => null,
        // http://pdadb.net/index.php?m=pdalist&list=SMiT (NoName Chinese Tablets)
        // http://www.imp3.net/14/show.php?itemid=20454
        'SMiTTablet' => 'Android.*(\bMID\b|MID-560|MTV-T1200|MTV-PND531|MTV-P1101|MTV-PND530)',
        // http://www.rock-chips.com/index.php?do=prod&pid=2
        'RockChipTablet' => 'Android.*(RK2818|RK2808A|RK2918|RK3066)|RK2738|RK2808A',
        // http://www.fly-phone.com/devices/tablets/ ; http://www.fly-phone.com/service/
        'FlyTablet' => 'IQ310|Fly Vision',
        // http://www.bqreaders.com/gb/tablets-prices-sale.html
        'bqTablet' => 'Android.*(bq)?.*(Elcano|Curie|Edison|Maxwell|Kepler|Pascal|Tesla|Hypatia|Platon|Newton|Livingstone|Cervantes|Avant|Aquaris ([E|M]10|M8))|Maxwell.*Lite|Maxwell.*Plus',
        // http://www.huaweidevice.com/worldwide/productFamily.do?method=index&directoryId=5011&treeId=3290
        // http://www.huaweidevice.com/worldwide/downloadCenter.do?method=index&directoryId=3372&treeId=0&tb=1&type=software (including legacy tablets)
        'HuaweiTablet' => 'MediaPad|MediaPad 7 Youth|IDEOS S7|S7-201c|S7-202u|S7-101|S7-103|S7-104|S7-105|S7-106|S7-201|S7-Slim|M2-A01L|BAH-L09|BAH-W09',
        // Nec or Medias Tab
        'NecTablet' => '\bN-06D|\bN-08D',
        // Pantech Tablets: http://www.pantechusa.com/phones/
        'PantechTablet' => 'Pantech.*P4100',
        // Broncho Tablets: http://www.broncho.cn/ (hard to find)
        'BronchoTablet' => 'Broncho.*(N701|N708|N802|a710)',
        // http://versusuk.com/support.html
        'VersusTablet' => 'TOUCHPAD.*[78910]|\bTOUCHTAB\b',
        // http://www.zync.in/index.php/our-products/tablet-phablets
        'ZyncTablet' => 'z1000|Z99 2G|z99|z930|z999|z990|z909|Z919|z900',
        // http://www.positivoinformatica.com.br/www/pessoal/tablet-ypy/
        'PositivoTablet' => 'TB07STA|TB10STA|TB07FTA|TB10FTA',
        // https://www.nabitablet.com/
        'NabiTablet' => 'Android.*\bNabi',
        'KoboTablet' => 'Kobo Touch|\bK080\b|\bVox\b Build|\bArc\b Build',
        // French Danew Tablets http://www.danew.com/produits-tablette.php
        'DanewTablet' => 'DSlide.*\b(700|701R|702|703R|704|802|970|971|972|973|974|1010|1012)\b',
        // Texet Tablets and Readers http://www.texet.ru/tablet/
        'TexetTablet' => 'NaviPad|TB-772A|TM-7045|TM-7055|TM-9750|TM-7016|TM-7024|TM-7026|TM-7041|TM-7043|TM-7047|TM-8041|TM-9741|TM-9747|TM-9748|TM-9751|TM-7022|TM-7021|TM-7020|TM-7011|TM-7010|TM-7023|TM-7025|TM-7037W|TM-7038W|TM-7027W|TM-9720|TM-9725|TM-9737W|TM-1020|TM-9738W|TM-9740|TM-9743W|TB-807A|TB-771A|TB-727A|TB-725A|TB-719A|TB-823A|TB-805A|TB-723A|TB-715A|TB-707A|TB-705A|TB-709A|TB-711A|TB-890HD|TB-880HD|TB-790HD|TB-780HD|TB-770HD|TB-721HD|TB-710HD|TB-434HD|TB-860HD|TB-840HD|TB-760HD|TB-750HD|TB-740HD|TB-730HD|TB-722HD|TB-720HD|TB-700HD|TB-500HD|TB-470HD|TB-431HD|TB-430HD|TB-506|TB-504|TB-446|TB-436|TB-416|TB-146SE|TB-126SE',
        // Avoid detecting 'PLAYSTATION 3' as mobile.
        'PlaystationTablet' => 'Playstation.*(Portable|Vita)',
        // http://www.trekstor.de/surftabs.html
        'TrekstorTablet' => 'ST10416-1|VT10416-1|ST70408-1|ST702xx-1|ST702xx-2|ST80208|ST97216|ST70104-2|VT10416-2|ST10216-2A|SurfTab',
        // http://www.pyleaudio.com/Products.aspx?%2fproducts%2fPersonal-Electronics%2fTablets
        'PyleAudioTablet' => '\b(PTBL10CEU|PTBL10C|PTBL72BC|PTBL72BCEU|PTBL7CEU|PTBL7C|PTBL92BC|PTBL92BCEU|PTBL9CEU|PTBL9CUK|PTBL9C)\b',
        // http://www.advandigital.com/index.php?link=content-product&jns=JP001
        // because of the short codenames we have to include whitespaces to reduce the possible conflicts.
        'AdvanTablet' => 'Android.* \b(E3A|T3X|T5C|T5B|T3E|T3C|T3B|T1J|T1F|T2A|T1H|T1i|E1C|T1-E|T5-A|T4|E1-B|T2Ci|T1-B|T1-D|O1-A|E1-A|T1-A|T3A|T4i)\b ',
        // http://www.danytech.com/category/tablet-pc
        'DanyTechTablet' => 'Genius Tab G3|Genius Tab S2|Genius Tab Q3|Genius Tab G4|Genius Tab Q4|Genius Tab G-II|Genius TAB GII|Genius TAB GIII|Genius Tab S1',
        // http://www.galapad.net/product.html
        'GalapadTablet' => 'Android.*\bG1\b(?!\))',
        // http://www.micromaxinfo.com/tablet/funbook
        'MicromaxTablet' => 'Funbook|Micromax.*\b(P250|P560|P360|P362|P600|P300|P350|P500|P275)\b',
        // http://www.karbonnmobiles.com/products_tablet.php
        'KarbonnTablet' => 'Android.*\b(A39|A37|A34|ST8|ST10|ST7|Smart Tab3|Smart Tab2)\b',
        // http://www.myallfine.com/Products.asp
        'AllFineTablet' => 'Fine7 Genius|Fine7 Shine|Fine7 Air|Fine8 Style|Fine9 More|Fine10 Joy|Fine11 Wide',
        // http://www.proscanvideo.com/products-search.asp?itemClass=TABLET&itemnmbr=
        'PROSCANTablet' => '\b(PEM63|PLT1023G|PLT1041|PLT1044|PLT1044G|PLT1091|PLT4311|PLT4311PL|PLT4315|PLT7030|PLT7033|PLT7033D|PLT7035|PLT7035D|PLT7044K|PLT7045K|PLT7045KB|PLT7071KG|PLT7072|PLT7223G|PLT7225G|PLT7777G|PLT7810K|PLT7849G|PLT7851G|PLT7852G|PLT8015|PLT8031|PLT8034|PLT8036|PLT8080K|PLT8082|PLT8088|PLT8223G|PLT8234G|PLT8235G|PLT8816K|PLT9011|PLT9045K|PLT9233G|PLT9735|PLT9760G|PLT9770G)\b',
        // http://www.yonesnav.com/products/products.php
        'YONESTablet' => 'BQ1078|BC1003|BC1077|RK9702|BC9730|BC9001|IT9001|BC7008|BC7010|BC708|BC728|BC7012|BC7030|BC7027|BC7026',
        // http://www.cjshowroom.com/eproducts.aspx?classcode=004001001
        // China manufacturer makes tablets for different small brands (eg. http://www.zeepad.net/index.html)
        'ChangJiaTablet' => 'TPC7102|TPC7103|TPC7105|TPC7106|TPC7107|TPC7201|TPC7203|TPC7205|TPC7210|TPC7708|TPC7709|TPC7712|TPC7110|TPC8101|TPC8103|TPC8105|TPC8106|TPC8203|TPC8205|TPC8503|TPC9106|TPC9701|TPC97101|TPC97103|TPC97105|TPC97106|TPC97111|TPC97113|TPC97203|TPC97603|TPC97809|TPC97205|TPC10101|TPC10103|TPC10106|TPC10111|TPC10203|TPC10205|TPC10503',
        // http://www.gloryunion.cn/products.asp
        // http://www.allwinnertech.com/en/apply/mobile.html
        // http://www.ptcl.com.pk/pd_content.php?pd_id=284 (EVOTAB)
        // @todo: Softwiner tablets?
        // aka. Cute or Cool tablets. Not sure yet, must research to avoid collisions.
        'GUTablet' => 'TX-A1301|TX-M9002|Q702|kf026', // A12R|D75A|D77|D79|R83|A95|A106C|R15|A75|A76|D71|D72|R71|R73|R77|D82|R85|D92|A97|D92|R91|A10F|A77F|W71F|A78F|W78F|W81F|A97F|W91F|W97F|R16G|C72|C73E|K72|K73|R96G
        // http://www.pointofview-online.com/showroom.php?shop_mode=product_listing&category_id=118
        'PointOfViewTablet' => 'TAB-P506|TAB-navi-7-3G-M|TAB-P517|TAB-P-527|TAB-P701|TAB-P703|TAB-P721|TAB-P731N|TAB-P741|TAB-P825|TAB-P905|TAB-P925|TAB-PR945|TAB-PL1015|TAB-P1025|TAB-PI1045|TAB-P1325|TAB-PROTAB[0-9]+|TAB-PROTAB25|TAB-PROTAB26|TAB-PROTAB27|TAB-PROTAB26XL|TAB-PROTAB2-IPS9|TAB-PROTAB30-IPS9|TAB-PROTAB25XXL|TAB-PROTAB26-IPS10|TAB-PROTAB30-IPS10',
        // http://www.overmax.pl/pl/katalog-produktow,p8/tablety,c14/
        // @todo: add more tests.
        'OvermaxTablet' => 'OV-(SteelCore|NewBase|Basecore|Baseone|Exellen|Quattor|EduTab|Solution|ACTION|BasicTab|TeddyTab|MagicTab|Stream|TB-08|TB-09)|Qualcore 1027',
        // http://hclmetablet.com/India/index.php
        'HCLTablet' => 'HCL.*Tablet|Connect-3G-2.0|Connect-2G-2.0|ME Tablet U1|ME Tablet U2|ME Tablet G1|ME Tablet X1|ME Tablet Y2|ME Tablet Sync',
        // http://www.edigital.hu/Tablet_es_e-book_olvaso/Tablet-c18385.html
        'DPSTablet' => 'DPS Dream 9|DPS Dual 7',
        // http://www.visture.com/index.asp
        'VistureTablet' => 'V97 HD|i75 3G|Visture V4( HD)?|Visture V5( HD)?|Visture V10',
        // http://www.mijncresta.nl/tablet
        'CrestaTablet' => 'CTP(-)?810|CTP(-)?818|CTP(-)?828|CTP(-)?838|CTP(-)?888|CTP(-)?978|CTP(-)?980|CTP(-)?987|CTP(-)?988|CTP(-)?989',
        // MediaTek - http://www.mediatek.com/_en/01_products/02_proSys.php?cata_sn=1&cata1_sn=1&cata2_sn=309
        'MediatekTablet' => '\bMT8125|MT8389|MT8135|MT8377\b',
        // Concorde tab
        'ConcordeTablet' => 'Concorde([ ]+)?Tab|ConCorde ReadMan',
        // GoClever Tablets - http://www.goclever.com/uk/products,c1/tablet,c5/
        'GoCleverTablet' => 'GOCLEVER TAB|A7GOCLEVER|M1042|M7841|M742|R1042BK|R1041|TAB A975|TAB A7842|TAB A741|TAB A741L|TAB M723G|TAB M721|TAB A1021|TAB I921|TAB R721|TAB I720|TAB T76|TAB R70|TAB R76.2|TAB R106|TAB R83.2|TAB M813G|TAB I721|GCTA722|TAB I70|TAB I71|TAB S73|TAB R73|TAB R74|TAB R93|TAB R75|TAB R76.1|TAB A73|TAB A93|TAB A93.2|TAB T72|TAB R83|TAB R974|TAB R973|TAB A101|TAB A103|TAB A104|TAB A104.2|R105BK|M713G|A972BK|TAB A971|TAB R974.2|TAB R104|TAB R83.3|TAB A1042',
        // Modecom Tablets - http://www.modecom.eu/tablets/portal/
        'ModecomTablet' => 'FreeTAB 9000|FreeTAB 7.4|FreeTAB 7004|FreeTAB 7800|FreeTAB 2096|FreeTAB 7.5|FreeTAB 1014|FreeTAB 1001 |FreeTAB 8001|FreeTAB 9706|FreeTAB 9702|FreeTAB 7003|FreeTAB 7002|FreeTAB 1002|FreeTAB 7801|FreeTAB 1331|FreeTAB 1004|FreeTAB 8002|FreeTAB 8014|FreeTAB 9704|FreeTAB 1003',
        // Vonino Tablets - http://www.vonino.eu/tablets
        'VoninoTablet' => '\b(Argus[ _]?S|Diamond[ _]?79HD|Emerald[ _]?78E|Luna[ _]?70C|Onyx[ _]?S|Onyx[ _]?Z|Orin[ _]?HD|Orin[ _]?S|Otis[ _]?S|SpeedStar[ _]?S|Magnet[ _]?M9|Primus[ _]?94[ _]?3G|Primus[ _]?94HD|Primus[ _]?QS|Android.*\bQ8\b|Sirius[ _]?EVO[ _]?QS|Sirius[ _]?QS|Spirit[ _]?S)\b',
        // ECS Tablets - http://www.ecs.com.tw/ECSWebSite/Product/Product_Tablet_List.aspx?CategoryID=14&MenuID=107&childid=M_107&LanID=0
        'ECSTablet' => 'V07OT2|TM105A|S10OT1|TR10CS1',
        // Storex Tablets - http://storex.fr/espace_client/support.html
        // @note: no need to add all the tablet codes since they are guided by the first regex.
        'StorexTablet' => 'eZee[_\']?(Tab|Go)[0-9]+|TabLC7|Looney Tunes Tab',
        // Generic Vodafone tablets.
        'VodafoneTablet' => 'SmartTab([ ]+)?[0-9]+|SmartTabII10|SmartTabII7|VF-1497',
        // French tablets - Essentiel B http://www.boulanger.fr/tablette_tactile_e-book/tablette_tactile_essentiel_b/cl_68908.htm?multiChoiceToDelete=brand&mc_brand=essentielb
        // Aka: http://www.essentielb.fr/
        'EssentielBTablet' => 'Smart[ \']?TAB[ ]+?[0-9]+|Family[ \']?TAB2',
        // Ross & Moor - http://ross-moor.ru/
        'RossMoorTablet' => 'RM-790|RM-997|RMD-878G|RMD-974R|RMT-705A|RMT-701|RME-601|RMT-501|RMT-711',
        // i-mobile http://product.i-mobilephone.com/Mobile_Device
        'iMobileTablet' => 'i-mobile i-note',
        // http://www.tolino.de/de/vergleichen/
        'TolinoTablet' => 'tolino tab [0-9.]+|tolino shine',
        // AudioSonic - a Kmart brand
        // http://www.kmart.com.au/webapp/wcs/stores/servlet/Search?langId=-1&storeId=10701&catalogId=10001&categoryId=193001&pageSize=72&currentPage=1&searchCategory=193001%2b4294965664&sortBy=p_MaxPrice%7c1
        'AudioSonicTablet' => '\bC-22Q|T7-QC|T-17B|T-17P\b',
        // AMPE Tablets - http://www.ampe.com.my/product-category/tablets/
        // @todo: add them gradually to avoid conflicts.
        'AMPETablet' => 'Android.* A78 ',
        // Skk Mobile - http://skkmobile.com.ph/product_tablets.php
        'SkkTablet' => 'Android.* (SKYPAD|PHOENIX|CYCLOPS)',
        // Tecno Mobile (only tablet) - http://www.tecno-mobile.com/index.php/product?filterby=smart&list_order=all&page=1
        'TecnoTablet' => 'TECNO P9|TECNO DP8D',
        // JXD (consoles & tablets) - http://jxd.hk/products.asp?selectclassid=009008&clsid=3
        'JXDTablet' => 'Android.* \b(F3000|A3300|JXD5000|JXD3000|JXD2000|JXD300B|JXD300|S5800|S7800|S602b|S5110b|S7300|S5300|S602|S603|S5100|S5110|S601|S7100a|P3000F|P3000s|P101|P200s|P1000m|P200m|P9100|P1000s|S6600b|S908|P1000|P300|S18|S6600|S9100)\b',
        // i-Joy tablets - http://www.i-joy.es/en/cat/products/tablets/
        'iJoyTablet' => 'Tablet (Spirit 7|Essentia|Galatea|Fusion|Onix 7|Landa|Titan|Scooby|Deox|Stella|Themis|Argon|Unique 7|Sygnus|Hexen|Finity 7|Cream|Cream X2|Jade|Neon 7|Neron 7|Kandy|Scape|Saphyr 7|Rebel|Biox|Rebel|Rebel 8GB|Myst|Draco 7|Myst|Tab7-004|Myst|Tadeo Jones|Tablet Boing|Arrow|Draco Dual Cam|Aurix|Mint|Amity|Revolution|Finity 9|Neon 9|T9w|Amity 4GB Dual Cam|Stone 4GB|Stone 8GB|Andromeda|Silken|X2|Andromeda II|Halley|Flame|Saphyr 9,7|Touch 8|Planet|Triton|Unique 10|Hexen 10|Memphis 4GB|Memphis 8GB|Onix 10)',
        // http://www.intracon.eu/tablet
        'FX2Tablet' => 'FX2 PAD7|FX2 PAD10',
        // http://www.xoro.de/produkte/
        // @note: Might be the same brand with 'Simply tablets'
        'XoroTablet' => 'KidsPAD 701|PAD[ ]?712|PAD[ ]?714|PAD[ ]?716|PAD[ ]?717|PAD[ ]?718|PAD[ ]?720|PAD[ ]?721|PAD[ ]?722|PAD[ ]?790|PAD[ ]?792|PAD[ ]?900|PAD[ ]?9715D|PAD[ ]?9716DR|PAD[ ]?9718DR|PAD[ ]?9719QR|PAD[ ]?9720QR|TelePAD1030|Telepad1032|TelePAD730|TelePAD731|TelePAD732|TelePAD735Q|TelePAD830|TelePAD9730|TelePAD795|MegaPAD 1331|MegaPAD 1851|MegaPAD 2151',
        // http://www1.viewsonic.com/products/computing/tablets/
        'ViewsonicTablet' => 'ViewPad 10pi|ViewPad 10e|ViewPad 10s|ViewPad E72|ViewPad7|ViewPad E100|ViewPad 7e|ViewSonic VB733|VB100a',
        // https://www.verizonwireless.com/tablets/verizon/
        'VerizonTablet' => 'QTAQZ3|QTAIR7|QTAQTZ3|QTASUN1|QTASUN2|QTAXIA1',
        // http://www.odys.de/web/internet-tablet_en.html
        'OdysTablet' => 'LOOX|XENO10|ODYS[ -](Space|EVO|Xpress|NOON)|\bXELIO\b|Xelio10Pro|XELIO7PHONETAB|XELIO10EXTREME|XELIOPT2|NEO_QUAD10',
        // http://www.captiva-power.de/products.html#tablets-en
        'CaptivaTablet' => 'CAPTIVA PAD',
        // IconBIT - http://www.iconbit.com/products/tablets/
        'IconbitTablet' => 'NetTAB|NT-3702|NT-3702S|NT-3702S|NT-3603P|NT-3603P|NT-0704S|NT-0704S|NT-3805C|NT-3805C|NT-0806C|NT-0806C|NT-0909T|NT-0909T|NT-0907S|NT-0907S|NT-0902S|NT-0902S',
        // http://www.teclast.com/topic.php?channelID=70&topicID=140&pid=63
        'TeclastTablet' => 'T98 4G|\bP80\b|\bX90HD\b|X98 Air|X98 Air 3G|\bX89\b|P80 3G|\bX80h\b|P98 Air|\bX89HD\b|P98 3G|\bP90HD\b|P89 3G|X98 3G|\bP70h\b|P79HD 3G|G18d 3G|\bP79HD\b|\bP89s\b|\bA88\b|\bP10HD\b|\bP19HD\b|G18 3G|\bP78HD\b|\bA78\b|\bP75\b|G17s 3G|G17h 3G|\bP85t\b|\bP90\b|\bP11\b|\bP98t\b|\bP98HD\b|\bG18d\b|\bP85s\b|\bP11HD\b|\bP88s\b|\bA80HD\b|\bA80se\b|\bA10h\b|\bP89\b|\bP78s\b|\bG18\b|\bP85\b|\bA70h\b|\bA70\b|\bG17\b|\bP18\b|\bA80s\b|\bA11s\b|\bP88HD\b|\bA80h\b|\bP76s\b|\bP76h\b|\bP98\b|\bA10HD\b|\bP78\b|\bP88\b|\bA11\b|\bA10t\b|\bP76a\b|\bP76t\b|\bP76e\b|\bP85HD\b|\bP85a\b|\bP86\b|\bP75HD\b|\bP76v\b|\bA12\b|\bP75a\b|\bA15\b|\bP76Ti\b|\bP81HD\b|\bA10\b|\bT760VE\b|\bT720HD\b|\bP76\b|\bP73\b|\bP71\b|\bP72\b|\bT720SE\b|\bC520Ti\b|\bT760\b|\bT720VE\b|T720-3GE|T720-WiFi',
        // Onda - http://www.onda-tablet.com/buy-android-onda.html?dir=desc&limit=all&order=price
        'OndaTablet' => '\b(V975i|Vi30|VX530|V701|Vi60|V701s|Vi50|V801s|V719|Vx610w|VX610W|V819i|Vi10|VX580W|Vi10|V711s|V813|V811|V820w|V820|Vi20|V711|VI30W|V712|V891w|V972|V819w|V820w|Vi60|V820w|V711|V813s|V801|V819|V975s|V801|V819|V819|V818|V811|V712|V975m|V101w|V961w|V812|V818|V971|V971s|V919|V989|V116w|V102w|V973|Vi40)\b[\s]+|V10 \b4G\b',
        'JaytechTablet' => 'TPC-PA762',
        'BlaupunktTablet' => 'Endeavour 800NG|Endeavour 1010',
        // http://www.digma.ru/support/download/
        // @todo: Ebooks also (if requested)
        'DigmaTablet' => '\b(iDx10|iDx9|iDx8|iDx7|iDxD7|iDxD8|iDsQ8|iDsQ7|iDsQ8|iDsD10|iDnD7|3TS804H|iDsQ11|iDj7|iDs10)\b',
        // http://www.evolioshop.com/ro/tablete-pc.html
        // http://www.evolio.ro/support/downloads_static.html?cat=2
        // @todo: Research some more
        'EvolioTablet' => 'ARIA_Mini_wifi|Aria[ _]Mini|Evolio X10|Evolio X7|Evolio X8|\bEvotab\b|\bNeura\b',
        // @todo http://www.lavamobiles.com/tablets-data-cards
        'LavaTablet' => 'QPAD E704|\bIvoryS\b|E-TAB IVORY|\bE-TAB\b',
        // http://www.breezetablet.com/
        'AocTablet' => 'MW0811|MW0812|MW0922|MTK8382|MW1031|MW0831|MW0821|MW0931|MW0712',
        // http://www.mpmaneurope.com/en/products/internet-tablets-14/android-tablets-14/
        'MpmanTablet' => 'MP11 OCTA|MP10 OCTA|MPQC1114|MPQC1004|MPQC994|MPQC974|MPQC973|MPQC804|MPQC784|MPQC780|\bMPG7\b|MPDCG75|MPDCG71|MPDC1006|MP101DC|MPDC9000|MPDC905|MPDC706HD|MPDC706|MPDC705|MPDC110|MPDC100|MPDC99|MPDC97|MPDC88|MPDC8|MPDC77|MP709|MID701|MID711|MID170|MPDC703|MPQC1010',
        // https://www.celkonmobiles.com/?_a=categoryphones&sid=2
        'CelkonTablet' => 'CT695|CT888|CT[\s]?910|CT7 Tab|CT9 Tab|CT3 Tab|CT2 Tab|CT1 Tab|C820|C720|\bCT-1\b',
        // http://www.wolderelectronics.com/productos/manuales-y-guias-rapidas/categoria-2-miTab
        'WolderTablet' => 'miTab \b(DIAMOND|SPACE|BROOKLYN|NEO|FLY|MANHATTAN|FUNK|EVOLUTION|SKY|GOCAR|IRON|GENIUS|POP|MINT|EPSILON|BROADWAY|JUMP|HOP|LEGEND|NEW AGE|LINE|ADVANCE|FEEL|FOLLOW|LIKE|LINK|LIVE|THINK|FREEDOM|CHICAGO|CLEVELAND|BALTIMORE-GH|IOWA|BOSTON|SEATTLE|PHOENIX|DALLAS|IN 101|MasterChef)\b',
        'MediacomTablet' => 'M-MPI10C3G|M-SP10EG|M-SP10EGP|M-SP10HXAH|M-SP7HXAH|M-SP10HXBH|M-SP8HXAH|M-SP8MXA',
        // http://www.mi.com/en
        'MiTablet' => '\bMI PAD\b|\bHM NOTE 1W\b',
        // http://www.nbru.cn/index.html
        'NibiruTablet' => 'Nibiru M1|Nibiru Jupiter One',
        // http://navroad.com/products/produkty/tablety/
        // http://navroad.com/products/produkty/tablety/
        'NexoTablet' => 'NEXO NOVA|NEXO 10|NEXO AVIO|NEXO FREE|NEXO GO|NEXO EVO|NEXO 3G|NEXO SMART|NEXO KIDDO|NEXO MOBI',
        // http://leader-online.com/new_site/product-category/tablets/
        // http://www.leader-online.net.au/List/Tablet
        'LeaderTablet' => 'TBLT10Q|TBLT10I|TBL-10WDKB|TBL-10WDKBO2013|TBL-W230V2|TBL-W450|TBL-W500|SV572|TBLT7I|TBA-AC7-8G|TBLT79|TBL-8W16|TBL-10W32|TBL-10WKB|TBL-W100',
        // http://www.datawind.com/ubislate/
        'UbislateTablet' => 'UbiSlate[\s]?7C',
        // http://www.pocketbook-int.com/ru/support
        'PocketBookTablet' => 'Pocketbook',
        // http://www.kocaso.com/product_tablet.html
        'KocasoTablet' => '\b(TB-1207)\b',
        // http://global.hisense.com/product/asia/tablet/Sero7/201412/t20141215_91832.htm
        'HisenseTablet' => '\b(F5281|E2371)\b',
        // http://www.tesco.com/direct/hudl/
        'Hudl' => 'Hudl HT7S3|Hudl 2',
        // http://www.telstra.com.au/home-phone/thub-2/
        'TelstraTablet' => 'T-Hub2',
        'GenericTablet' => 'Android.*\b97D\b|Tablet(?!.*PC)|BNTV250A|MID-WCDMA|LogicPD Zoom2|\bA7EB\b|CatNova8|A1_07|CT704|CT1002|\bM721\b|rk30sdk|\bEVOTAB\b|M758A|ET904|ALUMIUM10|Smartfren Tab|Endeavour 1010|Tablet-PC-4|Tagi Tab|\bM6pro\b|CT1020W|arc 10HD|\bTP750\b|\bQTAQZ3\b|WVT101|TM1088|KT107',
    );

    /**
     * List of mobile Operating Systems.
     *
     * @var array
     */
    protected static $operatingSystems = array(
        'AndroidOS' => 'Android',
        'BlackBerryOS' => 'blackberry|\bBB10\b|rim tablet os',
        'PalmOS' => 'PalmOS|avantgo|blazer|elaine|hiptop|palm|plucker|xiino',
        'SymbianOS' => 'Symbian|SymbOS|Series60|Series40|SYB-[0-9]+|\bS60\b',
        // @reference: http://en.wikipedia.org/wiki/Windows_Mobile
        'WindowsMobileOS' => 'Windows CE.*(PPC|Smartphone|Mobile|[0-9]{3}x[0-9]{3})|Window Mobile|Windows Phone [0-9.]+|WCE;',
        // @reference: http://en.wikipedia.org/wiki/Windows_Phone
        // http://wifeng.cn/?r=blog&a=view&id=106
        // http://nicksnettravels.builttoroam.com/post/2011/01/10/Bogus-Windows-Phone-7-User-Agent-String.aspx
        // http://msdn.microsoft.com/library/ms537503.aspx
        // https://msdn.microsoft.com/en-us/library/hh869301(v=vs.85).aspx
        'WindowsPhoneOS' => 'Windows Phone 10.0|Windows Phone 8.1|Windows Phone 8.0|Windows Phone OS|XBLWP7|ZuneWP7|Windows NT 6.[23]; ARM;',
        'iOS' => '\biPhone.*Mobile|\biPod|\biPad|AppleCoreMedia',
        // http://en.wikipedia.org/wiki/MeeGo
        // @todo: research MeeGo in UAs
        'MeeGoOS' => 'MeeGo',
        // http://en.wikipedia.org/wiki/Maemo
        // @todo: research Maemo in UAs
        'MaemoOS' => 'Maemo',
        'JavaOS' => 'J2ME/|\bMIDP\b|\bCLDC\b', // '|Java/' produces bug #135
        'webOS' => 'webOS|hpwOS',
        'badaOS' => '\bBada\b',
        'BREWOS' => 'BREW',
    );

    /**
     * List of mobile User Agents.
     *
     * IMPORTANT: This is a list of only mobile browsers.
     * Mobile Detect 2.x supports only mobile browsers,
     * it was never designed to detect all browsers.
     * The change will come in 2017 in the 3.x release for PHP7.
     *
     * @var array
     */
    protected static $browsers = array(
        //'Vivaldi'         => 'Vivaldi',
        // @reference: https://developers.google.com/chrome/mobile/docs/user-agent
        'Chrome' => '\bCrMo\b|CriOS|Android.*Chrome/[.0-9]* (Mobile)?',
        'Dolfin' => '\bDolfin\b',
        'Opera' => 'Opera.*Mini|Opera.*Mobi|Android.*Opera|Mobile.*OPR/[0-9.]+$|Coast/[0-9.]+',
        'Skyfire' => 'Skyfire',
        'Edge' => 'Mobile Safari/[.0-9]* Edge',
        'IE' => 'IEMobile|MSIEMobile', // |Trident/[.0-9]+
        'Firefox' => 'fennec|firefox.*maemo|(Mobile|Tablet).*Firefox|Firefox.*Mobile|FxiOS',
        'Bolt' => 'bolt',
        'TeaShark' => 'teashark',
        'Blazer' => 'Blazer',
        // @reference: http://developer.apple.com/library/safari/#documentation/AppleApplications/Reference/SafariWebContent/OptimizingforSafarioniPhone/OptimizingforSafarioniPhone.html#//apple_ref/doc/uid/TP40006517-SW3
        'Safari' => 'Version.*Mobile.*Safari|Safari.*Mobile|MobileSafari',
        // http://en.wikipedia.org/wiki/Midori_(web_browser)
        //'Midori'          => 'midori',
        //'Tizen'           => 'Tizen',
        'WeChat' => '\bMicroMessenger\b',
        'UCBrowser' => 'UC.*Browser|UCWEB',
        'baiduboxapp' => 'baiduboxapp',
        'baidubrowser' => 'baidubrowser',
        // https://github.com/serbanghita/Mobile-Detect/issues/7
        'DiigoBrowser' => 'DiigoBrowser',
        // http://www.puffinbrowser.com/index.php
        'Puffin' => 'Puffin',
        // http://mercury-browser.com/index.html
        'Mercury' => '\bMercury\b',
        // http://en.wikipedia.org/wiki/Obigo_Browser
        'ObigoBrowser' => 'Obigo',
        // http://en.wikipedia.org/wiki/NetFront
        'NetFront' => 'NF-Browser',
        // @reference: http://en.wikipedia.org/wiki/Minimo
        // http://en.wikipedia.org/wiki/Vision_Mobile_Browser
        'GenericBrowser' => 'NokiaBrowser|OviBrowser|OneBrowser|TwonkyBeamBrowser|SEMC.*Browser|FlyFlow|Minimo|NetFront|Novarra-Vision|MQQBrowser|MicroMessenger',
        // @reference: https://en.wikipedia.org/wiki/Pale_Moon_(web_browser)
        'PaleMoon' => 'Android.*PaleMoon|Mobile.*PaleMoon',
    );

    /**
     * Utilities.
     *
     * @var array
     */
    protected static $utilities = array(
        // Experimental. When a mobile device wants to switch to 'Desktop Mode'.
        // http://scottcate.com/technology/windows-phone-8-ie10-desktop-or-mobile/
        // https://github.com/serbanghita/Mobile-Detect/issues/57#issuecomment-15024011
        // https://developers.facebook.com/docs/sharing/best-practices
        'Bot' => 'Googlebot|facebookexternalhit|AdsBot-Google|Google Keyword Suggestion|Facebot|YandexBot|YandexMobileBot|bingbot|ia_archiver|AhrefsBot|Ezooms|GSLFbot|WBSearchBot|Twitterbot|TweetmemeBot|Twikle|PaperLiBot|Wotbox|UnwindFetchor|Exabot|MJ12bot|YandexImages|TurnitinBot|Pingdom',
        'MobileBot' => 'Googlebot-Mobile|AdsBot-Google-Mobile|YahooSeeker/M1A1-R2D2',
        'DesktopMode' => 'WPDesktop',
        'TV' => 'SonyDTV|HbbTV', // experimental
        'WebKit' => '(webkit)[ /]([\w.]+)',
        // @todo: Include JXD consoles.
        'Console' => '\b(Nintendo|Nintendo WiiU|Nintendo 3DS|Nintendo Switch|PLAYSTATION|Xbox)\b',
        'Watch' => 'SM-V700',
    );

    /**
     * All possible HTTP headers that represent the
     * User-Agent string.
     *
     * @var array
     */
    protected static $uaHttpHeaders = array(
        // The default User-Agent string.
        'HTTP_USER_AGENT',
        // Header can occur on devices using Opera Mini.
        'HTTP_X_OPERAMINI_PHONE_UA',
        // Vodafone specific header: http://www.seoprinciple.com/mobile-web-community-still-angry-at-vodafone/24/
        'HTTP_X_DEVICE_USER_AGENT',
        'HTTP_X_ORIGINAL_USER_AGENT',
        'HTTP_X_SKYFIRE_PHONE',
        'HTTP_X_BOLT_PHONE_UA',
        'HTTP_DEVICE_STOCK_UA',
        'HTTP_X_UCBROWSER_DEVICE_UA',
    );

    /**
     * The individual segments that could exist in a User-Agent string. VER refers to the regular
     * expression defined in the constant self::VER.
     *
     * @var array
     */
    protected static $properties = array(

        // Build
        'Mobile' => 'Mobile/[VER]',
        'Build' => 'Build/[VER]',
        'Version' => 'Version/[VER]',
        'VendorID' => 'VendorID/[VER]',

        // Devices
        'iPad' => 'iPad.*CPU[a-z ]+[VER]',
        'iPhone' => 'iPhone.*CPU[a-z ]+[VER]',
        'iPod' => 'iPod.*CPU[a-z ]+[VER]',
        //'BlackBerry'    => array('BlackBerry[VER]', 'BlackBerry [VER];'),
        'Kindle' => 'Kindle/[VER]',

        // Browser
        'Chrome' => array('Chrome/[VER]', 'CriOS/[VER]', 'CrMo/[VER]'),
        'Coast' => array('Coast/[VER]'),
        'Dolfin' => 'Dolfin/[VER]',
        // @reference: https://developer.mozilla.org/en-US/docs/Web/HTTP/Headers/User-Agent/Firefox
        'Firefox' => array('Firefox/[VER]', 'FxiOS/[VER]'),
        'Fennec' => 'Fennec/[VER]',
        // http://msdn.microsoft.com/en-us/library/ms537503(v=vs.85).aspx
        // https://msdn.microsoft.com/en-us/library/ie/hh869301(v=vs.85).aspx
        'Edge' => 'Edge/[VER]',
        'IE' => array('IEMobile/[VER];', 'IEMobile [VER]', 'MSIE [VER];', 'Trident/[0-9.]+;.*rv:[VER]'),
        // http://en.wikipedia.org/wiki/NetFront
        'NetFront' => 'NetFront/[VER]',
        'NokiaBrowser' => 'NokiaBrowser/[VER]',
        'Opera' => array(' OPR/[VER]', 'Opera Mini/[VER]', 'Version/[VER]'),
        'Opera Mini' => 'Opera Mini/[VER]',
        'Opera Mobi' => 'Version/[VER]',
        'UCBrowser' => array('UCWEB[VER]', 'UC.*Browser/[VER]'),
        'MQQBrowser' => 'MQQBrowser/[VER]',
        'MicroMessenger' => 'MicroMessenger/[VER]',
        'baiduboxapp' => 'baiduboxapp/[VER]',
        'baidubrowser' => 'baidubrowser/[VER]',
        'SamsungBrowser' => 'SamsungBrowser/[VER]',
        'Iron' => 'Iron/[VER]',
        // @note: Safari 7534.48.3 is actually Version 5.1.
        // @note: On BlackBerry the Version is overwriten by the OS.
        'Safari' => array('Version/[VER]', 'Safari/[VER]'),
        'Skyfire' => 'Skyfire/[VER]',
        'Tizen' => 'Tizen/[VER]',
        'Webkit' => 'webkit[ /][VER]',
        'PaleMoon' => 'PaleMoon/[VER]',

        // Engine
        'Gecko' => 'Gecko/[VER]',
        'Trident' => 'Trident/[VER]',
        'Presto' => 'Presto/[VER]',
        'Goanna' => 'Goanna/[VER]',

        // OS
        'iOS' => ' \bi?OS\b [VER][ ;]{1}',
        'Android' => 'Android [VER]',
        'BlackBerry' => array('BlackBerry[\w]+/[VER]', 'BlackBerry.*Version/[VER]', 'Version/[VER]'),
        'BREW' => 'BREW [VER]',
        'Java' => 'Java/[VER]',
        // @reference: http://windowsteamblog.com/windows_phone/b/wpdev/archive/2011/08/29/introducing-the-ie9-on-windows-phone-mango-user-agent-string.aspx
        // @reference: http://en.wikipedia.org/wiki/Windows_NT#Releases
        'Windows Phone OS' => array('Windows Phone OS [VER]', 'Windows Phone [VER]'),
        'Windows Phone' => 'Windows Phone [VER]',
        'Windows CE' => 'Windows CE/[VER]',
        // http://social.msdn.microsoft.com/Forums/en-US/windowsdeveloperpreviewgeneral/thread/6be392da-4d2f-41b4-8354-8dcee20c85cd
        'Windows NT' => 'Windows NT [VER]',
        'Symbian' => array('SymbianOS/[VER]', 'Symbian/[VER]'),
        'webOS' => array('webOS/[VER]', 'hpwOS/[VER];'),
    );

    /**
     * Construct an instance of this class.
     *
     * @param array  $headers   Specify the headers as injection. Should be PHP _SERVER flavored.
     *                          If left empty, will use the global _SERVER['HTTP_*'] vars instead.
     * @param string $userAgent Inject the User-Agent header. If null, will use HTTP_USER_AGENT
     *                          from the $headers array instead.
     */
    public function __construct(
        array $headers = null,
        $userAgent = null
    ) {
        $this->setHttpHeaders($headers);
        $this->setUserAgent($userAgent);
    }

    /**
     * Get the current script version.
     * This is useful for the demo.php file,
     * so people can check on what version they are testing
     * for mobile devices.
     *
     * @return string The version number in semantic version format.
     */
    public static function getScriptVersion()
    {
        return self::VERSION;
    }

    /**
     * Set the HTTP Headers. Must be PHP-flavored. This method will reset existing headers.
     *
     * @param array $httpHeaders The headers to set. If null, then using PHP's _SERVER to extract
     *                           the headers. The default null is left for backwards compatibility.
     */
    public function setHttpHeaders($httpHeaders = null)
    {
        // use global _SERVER if $httpHeaders aren't defined
        if (!is_array($httpHeaders) || !count($httpHeaders)) {
            $httpHeaders = $_SERVER;
        }

        // clear existing headers
        $this->httpHeaders = array();

        // Only save HTTP headers. In PHP land, that means only _SERVER vars that
        // start with HTTP_.
        foreach ($httpHeaders as $key => $value) {
            if (substr($key, 0, 5) === 'HTTP_') {
                $this->httpHeaders[$key] = $value;
            }
        }

        // In case we're dealing with CloudFront, we need to know.
        $this->setCfHeaders($httpHeaders);
    }

    /**
     * Retrieves the HTTP headers.
     *
     * @return array
     */
    public function getHttpHeaders()
    {
        return $this->httpHeaders;
    }

    /**
     * Retrieves a particular header. If it doesn't exist, no exception/error is caused.
     * Simply null is returned.
     *
     * @param string $header The name of the header to retrieve. Can be HTTP compliant such as
     *                       "User-Agent" or "X-Device-User-Agent" or can be php-esque with the
     *                       all-caps, HTTP_ prefixed, underscore seperated awesomeness.
     *
     * @return string|null The value of the header.
     */
    public function getHttpHeader($header)
    {
        // are we using PHP-flavored headers?
        if (strpos($header, '_') === false) {
            $header = str_replace('-', '_', $header);
            $header = strtoupper($header);
        }

        // test the alternate, too
        $altHeader = 'HTTP_' . $header;

        //Test both the regular and the HTTP_ prefix
        if (isset($this->httpHeaders[$header])) {
            return $this->httpHeaders[$header];
        } elseif (isset($this->httpHeaders[$altHeader])) {
            return $this->httpHeaders[$altHeader];
        }

        return null;
    }

    public function getMobileHeaders()
    {
        return self::$mobileHeaders;
    }

    /**
     * Get all possible HTTP headers that
     * can contain the User-Agent string.
     *
     * @return array List of HTTP headers.
     */
    public function getUaHttpHeaders()
    {
        return self::$uaHttpHeaders;
    }

    /**
     * Set CloudFront headers
     * http://docs.aws.amazon.com/AmazonCloudFront/latest/DeveloperGuide/header-caching.html#header-caching-web-device
     *
     * @param array $cfHeaders List of HTTP headers
     *
     * @return  boolean If there were CloudFront headers to be set
     */
    public function setCfHeaders($cfHeaders = null)
    {
        // use global _SERVER if $cfHeaders aren't defined
        if (!is_array($cfHeaders) || !count($cfHeaders)) {
            $cfHeaders = $_SERVER;
        }

        // clear existing headers
        $this->cloudfrontHeaders = array();

        // Only save CLOUDFRONT headers. In PHP land, that means only _SERVER vars that
        // start with cloudfront-.
        $response = false;
        foreach ($cfHeaders as $key => $value) {
            if (substr(strtolower($key), 0, 16) === 'http_cloudfront_') {
                $this->cloudfrontHeaders[strtoupper($key)] = $value;
                $response = true;
            }
        }

        return $response;
    }

    /**
     * Retrieves the cloudfront headers.
     *
     * @return array
     */
    public function getCfHeaders()
    {
        return $this->cloudfrontHeaders;
    }

    /**
     * @param string $userAgent
     * @return string
     */
    private function prepareUserAgent($userAgent)
    {
        $userAgent = trim($userAgent);
        $userAgent = substr($userAgent, 0, 500);
        return $userAgent;
    }

    /**
     * Set the User-Agent to be used.
     *
     * @param string $userAgent The user agent string to set.
     *
     * @return string|null
     */
    public function setUserAgent($userAgent = null)
    {
        // Invalidate cache due to #375
        $this->cache = array();

        if (false === empty($userAgent)) {
            return $this->userAgent = $this->prepareUserAgent($userAgent);
        } else {
            $this->userAgent = null;
            foreach ($this->getUaHttpHeaders() as $altHeader) {
                if (false === empty($this->httpHeaders[$altHeader])) { // @todo: should use getHttpHeader(), but it would be slow. (Serban)
                    $this->userAgent .= $this->httpHeaders[$altHeader] . " ";
                }
            }

            if (!empty($this->userAgent)) {
                return $this->userAgent = $this->prepareUserAgent($this->userAgent);
            }
        }

        if (count($this->getCfHeaders()) > 0) {
            return $this->userAgent = 'Amazon CloudFront';
        }
        return $this->userAgent = null;
    }

    /**
     * Retrieve the User-Agent.
     *
     * @return string|null The user agent if it's set.
     */
    public function getUserAgent()
    {
        return $this->userAgent;
    }

    /**
     * Set the detection type. Must be one of self::DETECTION_TYPE_MOBILE or
     * self::DETECTION_TYPE_EXTENDED. Otherwise, nothing is set.
     *
     * @deprecated since version 2.6.9
     *
     * @param string $type The type. Must be a self::DETECTION_TYPE_* constant. The default
     *                     parameter is null which will default to self::DETECTION_TYPE_MOBILE.
     */
    public function setDetectionType($type = null)
    {
        if ($type === null) {
            $type = self::DETECTION_TYPE_MOBILE;
        }

        if ($type !== self::DETECTION_TYPE_MOBILE && $type !== self::DETECTION_TYPE_EXTENDED) {
            return;
        }

        $this->detectionType = $type;
    }

    public function getMatchingRegex()
    {
        return $this->matchingRegex;
    }

    public function getMatchesArray()
    {
        return $this->matchesArray;
    }

    /**
     * Retrieve the list of known phone devices.
     *
     * @return array List of phone devices.
     */
    public static function getPhoneDevices()
    {
        return self::$phoneDevices;
    }

    /**
     * Retrieve the list of known tablet devices.
     *
     * @return array List of tablet devices.
     */
    public static function getTabletDevices()
    {
        return self::$tabletDevices;
    }

    /**
     * Alias for getBrowsers() method.
     *
     * @return array List of user agents.
     */
    public static function getUserAgents()
    {
        return self::getBrowsers();
    }

    /**
     * Retrieve the list of known browsers. Specifically, the user agents.
     *
     * @return array List of browsers / user agents.
     */
    public static function getBrowsers()
    {
        return self::$browsers;
    }

    /**
     * Retrieve the list of known utilities.
     *
     * @return array List of utilities.
     */
    public static function getUtilities()
    {
        return self::$utilities;
    }

    /**
     * Method gets the mobile detection rules. This method is used for the magic methods $detect->is*().
     *
     * @deprecated since version 2.6.9
     *
     * @return array All the rules (but not extended).
     */
    public static function getMobileDetectionRules()
    {
        static $rules;

        if (!$rules) {
            $rules = array_merge(
                self::$phoneDevices,
                self::$tabletDevices,
                self::$operatingSystems,
                self::$browsers
            );
        }

        return $rules;

    }

    /**
     * Method gets the mobile detection rules + utilities.
     * The reason this is separate is because utilities rules
     * don't necessary imply mobile. This method is used inside
     * the new $detect->is('stuff') method.
     *
     * @deprecated since version 2.6.9
     *
     * @return array All the rules + extended.
     */
    public function getMobileDetectionRulesExtended()
    {
        static $rules;

        if (!$rules) {
            // Merge all rules together.
            $rules = array_merge(
                self::$phoneDevices,
                self::$tabletDevices,
                self::$operatingSystems,
                self::$browsers,
                self::$utilities
            );
        }

        return $rules;
    }

    /**
     * Retrieve the current set of rules.
     *
     * @deprecated since version 2.6.9
     *
     * @return array
     */
    public function getRules()
    {
        if ($this->detectionType == self::DETECTION_TYPE_EXTENDED) {
            return self::getMobileDetectionRulesExtended();
        } else {
            return self::getMobileDetectionRules();
        }
    }

    /**
     * Retrieve the list of mobile operating systems.
     *
     * @return array The list of mobile operating systems.
     */
    public static function getOperatingSystems()
    {
        return self::$operatingSystems;
    }

    /**
     * Check the HTTP headers for signs of mobile.
     * This is the fastest mobile check possible; it's used
     * inside isMobile() method.
     *
     * @return bool
     */
    public function checkHttpHeadersForMobile()
    {

        foreach ($this->getMobileHeaders() as $mobileHeader => $matchType) {
            if (isset($this->httpHeaders[$mobileHeader])) {
                if (is_array($matchType['matches'])) {
                    foreach ($matchType['matches'] as $_match) {
                        if (strpos($this->httpHeaders[$mobileHeader], $_match) !== false) {
                            return true;
                        }
                    }

                    return false;
                } else {
                    return true;
                }
            }
        }

        return false;

    }

    /**
     * Magic overloading method.
     *
     * @method boolean is[...]()
     * @param  string                 $name
     * @param  array                  $arguments
     * @return mixed
     * @throws BadMethodCallException when the method doesn't exist and doesn't start with 'is'
     */
    public function __call($name, $arguments)
    {
        // make sure the name starts with 'is', otherwise
        if (substr($name, 0, 2) !== 'is') {
            throw new BadMethodCallException("No such method exists: $name");
        }

        $this->setDetectionType(self::DETECTION_TYPE_MOBILE);

        $key = substr($name, 2);

        return $this->matchUAAgainstKey($key);
    }

    /**
     * Find a detection rule that matches the current User-agent.
     *
     * @param  null    $userAgent deprecated
     * @return boolean
     */
    protected function matchDetectionRulesAgainstUA($userAgent = null)
    {
        // Begin general search.
        foreach ($this->getRules() as $_regex) {
            if (empty($_regex)) {
                continue;
            }

            if ($this->match($_regex, $userAgent)) {
                return true;
            }
        }

        return false;
    }

    /**
     * Search for a certain key in the rules array.
     * If the key is found then try to match the corresponding
     * regex against the User-Agent.
     *
     * @param string $key
     *
     * @return boolean
     */
    protected function matchUAAgainstKey($key)
    {
        // Make the keys lowercase so we can match: isIphone(), isiPhone(), isiphone(), etc.
        $key = strtolower($key);
        if (false === isset($this->cache[$key])) {

            // change the keys to lower case
            $_rules = array_change_key_case($this->getRules());

            if (false === empty($_rules[$key])) {
                $this->cache[$key] = $this->match($_rules[$key]);
            }

            if (false === isset($this->cache[$key])) {
                $this->cache[$key] = false;
            }
        }

        return $this->cache[$key];
    }

    /**
     * Check if the device is mobile.
     * Returns true if any type of mobile device detected, including special ones
     * @param  null $userAgent   deprecated
     * @param  null $httpHeaders deprecated
     * @return bool
     */
    public function isMobile($userAgent = null, $httpHeaders = null)
    {

        if ($httpHeaders) {
            $this->setHttpHeaders($httpHeaders);
        }

        if ($userAgent) {
            $this->setUserAgent($userAgent);
        }

        // Check specifically for cloudfront headers if the useragent === 'Amazon CloudFront'
        if ($this->getUserAgent() === 'Amazon CloudFront') {
            $cfHeaders = $this->getCfHeaders();
            if (array_key_exists('HTTP_CLOUDFRONT_IS_MOBILE_VIEWER', $cfHeaders) && $cfHeaders['HTTP_CLOUDFRONT_IS_MOBILE_VIEWER'] === 'true') {
                return true;
            }
        }

        $this->setDetectionType(self::DETECTION_TYPE_MOBILE);

        if ($this->checkHttpHeadersForMobile()) {
            return true;
        } else {
            return $this->matchDetectionRulesAgainstUA();
        }

    }

    /**
     * Check if the device is a tablet.
     * Return true if any type of tablet device is detected.
     *
     * @param  string $userAgent   deprecated
     * @param  array  $httpHeaders deprecated
     * @return bool
     */
    public function isTablet($userAgent = null, $httpHeaders = null)
    {
        // Check specifically for cloudfront headers if the useragent === 'Amazon CloudFront'
        if ($this->getUserAgent() === 'Amazon CloudFront') {
            $cfHeaders = $this->getCfHeaders();
            if (array_key_exists('HTTP_CLOUDFRONT_IS_TABLET_VIEWER', $cfHeaders) && $cfHeaders['HTTP_CLOUDFRONT_IS_TABLET_VIEWER'] === 'true') {
                return true;
            }
        }

        $this->setDetectionType(self::DETECTION_TYPE_MOBILE);

        foreach (self::$tabletDevices as $_regex) {
            if ($this->match($_regex, $userAgent)) {
                return true;
            }
        }

        return false;
    }

    /**
     * This method checks for a certain property in the
     * userAgent.
     * @todo: The httpHeaders part is not yet used.
     *
     * @param  string        $key
     * @param  string        $userAgent   deprecated
     * @param  string        $httpHeaders deprecated
     * @return bool|int|null
     */
    public function is($key, $userAgent = null, $httpHeaders = null)
    {
        // Set the UA and HTTP headers only if needed (eg. batch mode).
        if ($httpHeaders) {
            $this->setHttpHeaders($httpHeaders);
        }

        if ($userAgent) {
            $this->setUserAgent($userAgent);
        }

        $this->setDetectionType(self::DETECTION_TYPE_EXTENDED);

        return $this->matchUAAgainstKey($key);
    }

    /**
     * Some detection rules are relative (not standard),
     * because of the diversity of devices, vendors and
     * their conventions in representing the User-Agent or
     * the HTTP headers.
     *
     * This method will be used to check custom regexes against
     * the User-Agent string.
     *
     * @param $regex
     * @param  string $userAgent
     * @return bool
     *
     * @todo: search in the HTTP headers too.
     */
    public function match($regex, $userAgent = null)
    {
        $match = (bool) preg_match(sprintf('#%s#is', $regex), (false === empty($userAgent) ? $userAgent : $this->userAgent), $matches);
        // If positive match is found, store the results for debug.
        if ($match) {
            $this->matchingRegex = $regex;
            $this->matchesArray = $matches;
        }

        return $match;
    }

    /**
     * Get the properties array.
     *
     * @return array
     */
    public static function getProperties()
    {
        return self::$properties;
    }

    /**
     * Prepare the version number.
     *
     * @todo Remove the error supression from str_replace() call.
     *
     * @param string $ver The string version, like "2.6.21.2152";
     *
     * @return float
     */
    public function prepareVersionNo($ver)
    {
        $ver = str_replace(array('_', ' ', '/'), '.', $ver);
        $arrVer = explode('.', $ver, 2);

        if (isset($arrVer[1])) {
            $arrVer[1] = @str_replace('.', '', $arrVer[1]); // @todo: treat strings versions.
        }

        return (float) implode('.', $arrVer);
    }

    /**
     * Check the version of the given property in the User-Agent.
     * Will return a float number. (eg. 2_0 will return 2.0, 4.3.1 will return 4.31)
     *
     * @param string $propertyName The name of the property. See self::getProperties() array
     *                             keys for all possible properties.
     * @param string $type         Either self::VERSION_TYPE_STRING to get a string value or
     *                             self::VERSION_TYPE_FLOAT indicating a float value. This parameter
     *                             is optional and defaults to self::VERSION_TYPE_STRING. Passing an
     *                             invalid parameter will default to the this type as well.
     *
     * @return string|float The version of the property we are trying to extract.
     */
    public function version($propertyName, $type = self::VERSION_TYPE_STRING)
    {
        if (empty($propertyName)) {
            return false;
        }

        // set the $type to the default if we don't recognize the type
        if ($type !== self::VERSION_TYPE_STRING && $type !== self::VERSION_TYPE_FLOAT) {
            $type = self::VERSION_TYPE_STRING;
        }

        $properties = self::getProperties();

        // Check if the property exists in the properties array.
        if (true === isset($properties[$propertyName])) {

            // Prepare the pattern to be matched.
            // Make sure we always deal with an array (string is converted).
            $properties[$propertyName] = (array) $properties[$propertyName];

            foreach ($properties[$propertyName] as $propertyMatchString) {

                $propertyPattern = str_replace('[VER]', self::VER, $propertyMatchString);

                // Identify and extract the version.
                preg_match(sprintf('#%s#is', $propertyPattern), $this->userAgent, $match);

                if (false === empty($match[1])) {
                    $version = ($type == self::VERSION_TYPE_FLOAT ? $this->prepareVersionNo($match[1]) : $match[1]);

                    return $version;
                }

            }

        }

        return false;
    }

    /**
     * Retrieve the mobile grading, using self::MOBILE_GRADE_* constants.
     *
     * @return string One of the self::MOBILE_GRADE_* constants.
     */
    public function mobileGrade()
    {
        $isMobile = $this->isMobile();

        if (
            // Apple iOS 4-7.0 – Tested on the original iPad (4.3 / 5.0), iPad 2 (4.3 / 5.1 / 6.1), iPad 3 (5.1 / 6.0), iPad Mini (6.1), iPad Retina (7.0), iPhone 3GS (4.3), iPhone 4 (4.3 / 5.1), iPhone 4S (5.1 / 6.0), iPhone 5 (6.0), and iPhone 5S (7.0)
            $this->is('iOS') && $this->version('iPad', self::VERSION_TYPE_FLOAT) >= 4.3 ||
            $this->is('iOS') && $this->version('iPhone', self::VERSION_TYPE_FLOAT) >= 4.3 ||
            $this->is('iOS') && $this->version('iPod', self::VERSION_TYPE_FLOAT) >= 4.3 ||

            // Android 2.1-2.3 - Tested on the HTC Incredible (2.2), original Droid (2.2), HTC Aria (2.1), Google Nexus S (2.3). Functional on 1.5 & 1.6 but performance may be sluggish, tested on Google G1 (1.5)
            // Android 3.1 (Honeycomb)  - Tested on the Samsung Galaxy Tab 10.1 and Motorola XOOM
            // Android 4.0 (ICS)  - Tested on a Galaxy Nexus. Note: transition performance can be poor on upgraded devices
            // Android 4.1 (Jelly Bean)  - Tested on a Galaxy Nexus and Galaxy 7
            ($this->version('Android', self::VERSION_TYPE_FLOAT) > 2.1 && $this->is('Webkit')) ||

            // Windows Phone 7.5-8 - Tested on the HTC Surround (7.5), HTC Trophy (7.5), LG-E900 (7.5), Nokia 800 (7.8), HTC Mazaa (7.8), Nokia Lumia 520 (8), Nokia Lumia 920 (8), HTC 8x (8)
            $this->version('Windows Phone OS', self::VERSION_TYPE_FLOAT) >= 7.5 ||

            // Tested on the Torch 9800 (6) and Style 9670 (6), BlackBerry® Torch 9810 (7), BlackBerry Z10 (10)
            $this->is('BlackBerry') && $this->version('BlackBerry', self::VERSION_TYPE_FLOAT) >= 6.0 ||
            // Blackberry Playbook (1.0-2.0) - Tested on PlayBook
            $this->match('Playbook.*Tablet') ||

            // Palm WebOS (1.4-3.0) - Tested on the Palm Pixi (1.4), Pre (1.4), Pre 2 (2.0), HP TouchPad (3.0)
            ($this->version('webOS', self::VERSION_TYPE_FLOAT) >= 1.4 && $this->match('Palm|Pre|Pixi')) ||
            // Palm WebOS 3.0  - Tested on HP TouchPad
            $this->match('hp.*TouchPad') ||

            // Firefox Mobile 18 - Tested on Android 2.3 and 4.1 devices
            ($this->is('Firefox') && $this->version('Firefox', self::VERSION_TYPE_FLOAT) >= 18) ||

            // Chrome for Android - Tested on Android 4.0, 4.1 device
            ($this->is('Chrome') && $this->is('AndroidOS') && $this->version('Android', self::VERSION_TYPE_FLOAT) >= 4.0) ||

            // Skyfire 4.1 - Tested on Android 2.3 device
            ($this->is('Skyfire') && $this->version('Skyfire', self::VERSION_TYPE_FLOAT) >= 4.1 && $this->is('AndroidOS') && $this->version('Android', self::VERSION_TYPE_FLOAT) >= 2.3) ||

            // Opera Mobile 11.5-12: Tested on Android 2.3
            ($this->is('Opera') && $this->version('Opera Mobi', self::VERSION_TYPE_FLOAT) >= 11.5 && $this->is('AndroidOS')) ||

            // Meego 1.2 - Tested on Nokia 950 and N9
            $this->is('MeeGoOS') ||

            // Tizen (pre-release) - Tested on early hardware
            $this->is('Tizen') ||

            // Samsung Bada 2.0 - Tested on a Samsung Wave 3, Dolphin browser
            // @todo: more tests here!
            $this->is('Dolfin') && $this->version('Bada', self::VERSION_TYPE_FLOAT) >= 2.0 ||

            // UC Browser - Tested on Android 2.3 device
            (($this->is('UC Browser') || $this->is('Dolfin')) && $this->version('Android', self::VERSION_TYPE_FLOAT) >= 2.3) ||

            // Kindle 3 and Fire  - Tested on the built-in WebKit browser for each
            ($this->match('Kindle Fire') ||
                $this->is('Kindle') && $this->version('Kindle', self::VERSION_TYPE_FLOAT) >= 3.0) ||

            // Nook Color 1.4.1 - Tested on original Nook Color, not Nook Tablet
            $this->is('AndroidOS') && $this->is('NookTablet') ||

            // Chrome Desktop 16-24 - Tested on OS X 10.7 and Windows 7
            $this->version('Chrome', self::VERSION_TYPE_FLOAT) >= 16 && !$isMobile ||

            // Safari Desktop 5-6 - Tested on OS X 10.7 and Windows 7
            $this->version('Safari', self::VERSION_TYPE_FLOAT) >= 5.0 && !$isMobile ||

            // Firefox Desktop 10-18 - Tested on OS X 10.7 and Windows 7
            $this->version('Firefox', self::VERSION_TYPE_FLOAT) >= 10.0 && !$isMobile ||

            // Internet Explorer 7-9 - Tested on Windows XP, Vista and 7
            $this->version('IE', self::VERSION_TYPE_FLOAT) >= 7.0 && !$isMobile ||

            // Opera Desktop 10-12 - Tested on OS X 10.7 and Windows 7
            $this->version('Opera', self::VERSION_TYPE_FLOAT) >= 10 && !$isMobile
        ) {
            return self::MOBILE_GRADE_A;
        }

        if (
            $this->is('iOS') && $this->version('iPad', self::VERSION_TYPE_FLOAT) < 4.3 ||
            $this->is('iOS') && $this->version('iPhone', self::VERSION_TYPE_FLOAT) < 4.3 ||
            $this->is('iOS') && $this->version('iPod', self::VERSION_TYPE_FLOAT) < 4.3 ||

            // Blackberry 5.0: Tested on the Storm 2 9550, Bold 9770
            $this->is('Blackberry') && $this->version('BlackBerry', self::VERSION_TYPE_FLOAT) >= 5 && $this->version('BlackBerry', self::VERSION_TYPE_FLOAT) < 6 ||

            //Opera Mini (5.0-6.5) - Tested on iOS 3.2/4.3 and Android 2.3
            ($this->version('Opera Mini', self::VERSION_TYPE_FLOAT) >= 5.0 && $this->version('Opera Mini', self::VERSION_TYPE_FLOAT) <= 7.0 &&
                ($this->version('Android', self::VERSION_TYPE_FLOAT) >= 2.3 || $this->is('iOS'))) ||

            // Nokia Symbian^3 - Tested on Nokia N8 (Symbian^3), C7 (Symbian^3), also works on N97 (Symbian^1)
            $this->match('NokiaN8|NokiaC7|N97.*Series60|Symbian/3') ||

            // @todo: report this (tested on Nokia N71)
            $this->version('Opera Mobi', self::VERSION_TYPE_FLOAT) >= 11 && $this->is('SymbianOS')
        ) {
            return self::MOBILE_GRADE_B;
        }

        if (
            // Blackberry 4.x - Tested on the Curve 8330
            $this->version('BlackBerry', self::VERSION_TYPE_FLOAT) <= 5.0 ||
            // Windows Mobile - Tested on the HTC Leo (WinMo 5.2)
            $this->match('MSIEMobile|Windows CE.*Mobile') || $this->version('Windows Mobile', self::VERSION_TYPE_FLOAT) <= 5.2 ||

            // Tested on original iPhone (3.1), iPhone 3 (3.2)
            $this->is('iOS') && $this->version('iPad', self::VERSION_TYPE_FLOAT) <= 3.2 ||
            $this->is('iOS') && $this->version('iPhone', self::VERSION_TYPE_FLOAT) <= 3.2 ||
            $this->is('iOS') && $this->version('iPod', self::VERSION_TYPE_FLOAT) <= 3.2 ||

            // Internet Explorer 7 and older - Tested on Windows XP
            $this->version('IE', self::VERSION_TYPE_FLOAT) <= 7.0 && !$isMobile
        ) {
            return self::MOBILE_GRADE_C;
        }

        // All older smartphone platforms and featurephones - Any device that doesn't support media queries
        // will receive the basic, C grade experience.
        return self::MOBILE_GRADE_C;
    }
}
libraries/classes/browser.php000060400000243043152455721620012364 0ustar00<?php

/**
 * @package     JCE
 * @subpackage  Editor
 *
 * @copyright   Copyright (C) 2005 - 2020 Open Source Matters, Inc. All rights reserved.
 * @copyright   Copyright (c) 2009-2024 Ryan Demmer. All rights reserved
 * @license     GNU General Public License version 2 or later; see LICENSE.txt
 */

\defined('_JEXEC') or die;

use Joomla\CMS\Factory;
use Joomla\Filesystem\File;
use Joomla\Filesystem\Path;
use Joomla\CMS\Language\Text;
use Joomla\CMS\Object\CMSObject;
use Joomla\CMS\Session\Session;
use Joomla\CMS\Uri\Uri;
use Joomla\CMS\Component\ComponentHelper;
use Joomla\CMS\Table\Table;
use Joomla\CMS\User\UserHelper;

class WFFileBrowser extends CMSObject
{
    /* @var array */
    private $_buttons = array();

    /* @var array */
    private $_actions = array();

    /* @var array */
    private $_events = array();

    /* @var array */
    private $_result = array('error' => array(), 'files' => array(), 'folders' => array());

    /* @var array */
    public $dir = array();

    /* @var WFFileSystem */
    public $filesystem = null;

    /* @var string */
    public $filetypes = 'jpg,jpeg,png,gif,webp';

    /* @var array */
    public $upload = array(
        'max_size' => 1024,
        'validate_mimetype' => 1,
        'add_random' => 0,
        'total_files' => 0,
        'total_size' => 0,
        'remove_exif' => 0,
    );

    /* @var int */
    public $folder_tree = 1;

    /* @var string */
    public $list_limit = 'all';

    /* @var array */
    public $features = array(
        'help' => 1,
        'upload' => 1,
        'folder' => array(
            'create' => 1,
            'delete' => 1,
            'rename' => 1,
            'move' => 1,
        ),
        'file' => array(
            'rename' => 1,
            'delete' => 1,
            'move' => 1,
        ),
    );
    /* @var string */
    public $date_format = '%d/%m/%Y, %H:%M';

    /* @var string */
    public $websafe_mode = 'utf-8';

    /* @var int */
    public $websafe_spaces = 0;

    /* @var string */
    public $websafe_textcase = '';

    public function __construct($config = array())
    {
        // set file browser config
        $this->setConfig($config);

        // add actions
        $this->addDefaultActions();
        // add buttons
        $this->addDefaultButtons();

        // Setup XHR callback funtions
        $this->setRequest(array($this, 'getItems'));
        $this->setRequest(array($this, 'getFileDetails'));
        $this->setRequest(array($this, 'getFolderDetails'));
        $this->setRequest(array($this, 'getTree'));
        $this->setRequest(array($this, 'getTreeItem'));

        $this->setRequest(array($this, 'searchItems'));

        $this->setRequest(array($this, 'upload'));
    }

    protected function getProfile()
    {
        return WFApplication::getInstance()->getActiveProfile();
    }

    /**
     * Display the browser.
     */
    public function display()
    {
        $filesystem = $this->getFileSystem();
        $buttons    = $filesystem->get('buttons', []);

        if (!empty($buttons)) {
            foreach ($buttons as $type => $items) {
                foreach ($items as $name => $options) {
                    $this->addButton($type, $name, $options);
                }
            }
        }

        $this->setProperties(array(
            'actions' => $this->getActions(),
            'buttons' => $this->getButtons(),
        ));

        // Get the Document instance
        $document = WFDocument::getInstance();

        $document->addScript(array('filebrowser.min'), 'media');
        $document->addStyleSheet(array('filebrowser.min'), 'media');
    }

    /**
     * Render the browser view.
     */
    public function render()
    {
        $session = Factory::getSession();

        $view = new WFView(array(
            'name' => 'filebrowser',
            'layout' => 'default',
        ));

        // assign session data
        $view->session = $session;

        // assign form action
        $view->action = $this->getFormAction();

        $view->list_limit_options = $this->get('list_limit_options', array());
        $view->list_limit = $this->get('list_limit', 25);

        // return view output
        $view->display();
    }

    /**
     * Set a WFRequest item.
     *
     * @param array $request
     */
    public function setRequest($request)
    {
        $xhr = WFRequest::getInstance();
        $xhr->setRequest($request);
    }

    /**
     * Upload form action url.
     *
     * @return string URL
     *
     * @since    1.5
     */
    protected function getFormAction()
    {
        $wf = WFEditorPlugin::getInstance();

        $context = Factory::getApplication()->input->getInt('context');

        $query = '';

        $args = array(
            'plugin' => $wf->getName(),
            'context' => $context,
        );

        foreach ($args as $k => $v) {
            $query .= '&' . $k . '=' . $v;
        }

        return Uri::base(true) . '/index.php?option=com_jce&task=plugin.rpc' . $query;
    }

    public function getFileSystem()
    {
        return $this->filesystem; // filesystem is now passed in from the "manager" class
    }

    private function getViewable()
    {
        return 'jpeg,jpg,gif,png,webp,apng,svg,avi,wmv,wm,asf,asx,wmx,wvx,mov,qt,mpg,mp3,mp4,m4v,mpeg,ogg,ogv,webm,swf,flv,f4v,xml,dcr,rm,ra,ram,divx,html,htm,txt,rtf,pdf,doc,docx,xls,xlsx,ppt,pptx';
    }

    /**
     * Return a list of allowed file extensions in a specific format.
     *
     * @param string $format The desired format of the output ('map', 'array', 'list', 'json').
     * @param string $list Optional string of file types to use instead of the default.
     * @return mixed Formatted extension list.
     */
    public function getFileTypes($format = 'map', $list = '')
    {
        // If $list is empty, use the default filetypes from the object's property
        if (empty($list)) {
            $list = $this->get('filetypes');
        }

        return WFUtility::formatFileTypesList($format, $list);
    }


    /**
     * Converts the extensions map to a list.
     *
     * @param string $list The extensions map eg: images=jpg,jpeg,gif,png
     *
     * @return string jpg,jpeg,gif,png
     */
    private function listFileTypes($list = '')
    {
        return $this->getFileTypes('list', $list);
    }

    /**
     * Set filetypes and update upload properties
     */
    public function setFileTypes($list = 'jpg,jpeg,png,gif')
    {
        if ($list && $list[0] === '=') {
            $list = substr($list, 1);
        }

        // get existing upload values
        $upload = $this->get('upload', array());

        // set updated filetypes
        $upload['filetypes'] = $list;

        // update filetypes
        $this->setProperties(array(
            'upload' => $upload,
        ));

        $this->set('filetypes', $list);
    }

    /**
     * Returns the result variable.
     *
     * @return var $_result
     */
    public function getResult()
    {
        return $this->_result;
    }

    public function setResult($value, $key = null)
    {
        if ($key) {
            $this->_result[$key][] = $value;
        } else {
            $this->_result = $value;
        }
    }

    public function checkFeature($action, $type = null)
    {
        $features = $this->get('features');

        if ($type) {
            if (isset($features[$type])) {
                $type = $features[$type];

                if (isset($type[$action])) {
                    return (bool) $type[$action];
                }
            }
        } else {
            if (isset($features[$action])) {
                return (bool) $features[$action];
            }
        }

        return false;
    }

    /**
     * Get the source directory of a file path.
     */
    public function getSourceDir($path)
    {
        $path = $this->get('source', $path);

        if (empty($path)) {
            return '';
        }

        // return nothing if absolute $path
        if (preg_match('#^(file|http(s)?):\/\/#', $path)) {
            return '';
        }

        $filesystem = $this->getFileSystem();

        $path = $this->extractPath($path);

        // directory path relative base directory, eg: images/2025
        if ($filesystem->is_dir($path)) {
            return $path;
        }

        // file url relative to site root
        if ($filesystem->is_file($path)) {
            return dirname($path);
        }

        return '';
    }

    /**
     * Determine whether a path is in complex "id:relative" form.
     *
     * A complex path begins with a 32-character hexadecimal MD5 prefix,
     * followed by a colon, and an optional relative path.
     *
     * @param   string  $path  The path string to test.
     *
     * @return  bool  True if the path has a valid MD5 prefix, false otherwise.
     */
    private function isComplexPath($path)
    {
        // Fast fail: no colon at all
        $pos = strpos($path, ':');

        // No colon found, so not a complex path
        if ($pos === false) {
            return false;
        }

        // Ignore protocols like "http://", "ftp://", "file://"
        if (strpos($path, '://') !== false) {
            return false;
        }

        // Candidate prefix before the colon
        $candidate = substr($path, 0, $pos);

        // Must be exactly 32 hex characters (MD5 hex)
        if (strlen($candidate) !== 32 || !ctype_xdigit($candidate)) {
            return false;
        }

        return true;
    }

    /**
     * Split a complex path "id:relative" into prefix and relative components.
     *
     * Returns true if split occurred, false otherwise. When false, $id will be empty
     * and $relative will contain the original $path value.
     *
     * Examples:
     *   abcdef...1234:images/foo.jpg → $id="abcdef...1234", $relative="images/foo.jpg"
     *   abcdef...1234:               → $id="abcdef...1234", $relative=""
     *   images/foo.jpg               → no split (false)
     *
     * @param   string  $path       The full path to parse.
     * @param   string  &$id        Output parameter for the 32-character prefix.
     * @param   string  &$relative  Output parameter for the relative path.
     *
     * @return  bool  True if the path was successfully split, false otherwise.
     */
    private function splitComplexPath($path, &$id, &$relative)
    {
        $id         = '';
        $relative   = $path;

        if (!$this->isComplexPath($path)) {
            // Not a complex path, so return false
            return false;
        }

        $pos = strpos($path, ':');

        // Candidate prefix before the colon
        $candidate = substr($path, 0, $pos);

        $id = strtolower($candidate);
        $relative = substr($path, $pos + 1);

        return true;
    }

    /**
     * Extract the simple relative path from a possibly complex "id:relative" value.
     * Returns the portion after the colon, or the original path if not complex.
     *
     * @param   string  $path  The path value to process.
     *
     * @return  string  The extracted relative path, or the original value.
     */
    private function extractPath($path)
    {
        if ($this->splitComplexPath($path, $id, $relative)) {
            return $relative;
        }

        return $path;
    }

    /**
     * Parse a path value to extract its prefix.
     *
     * Updates the input $path by reference to remove the prefix,
     * leaving only the relative portion (or empty string for root).
     *
     * @param   string  &$path  The path value to modify.
     *
     * @return  string  The extracted prefix, or an empty string if not complex.
     */
    private function parsePath(&$path)
    {
        $id = '';

        if ($this->splitComplexPath($path, $id, $relative)) {
            $path = $relative;
            return $id;
        }

        return '';
    }

    /**
     * Get the prefix from a complex path without modifying it.
     *
     * @param   string  $path  The path value to parse.
     *
     * @return  string  The prefix if complex, or an empty string otherwise.
     */
    private function getPathPrefix($path)
    {
        if ($this->splitComplexPath($path, $id, $relative)) {
            return $id;
        }

        return '';
    }

    /**
     * Resolve a path into its absolute filesystem location.
     *
     * If the path is in "id:relative" form, it resolves the prefix to its
     * corresponding directory store root and appends the relative portion.
     * If the path is simple, it is returned unchanged.
     *
     * Examples:
     *   abcdef...1234:foo/bar → images/foo/bar
     *   abcdef...1234:        → images
     *   foo/bar               → foo/bar (no change)
     *
     * @param   string  $path  The path to resolve.
     *
     * @return  string  The resolved absolute path or the input if simple.
     */
    public function resolvePath($path)
    {
        if (empty($path)) {
            return '';
        }

        // check for complex path
        if ($this->isComplexPath($path) === false) {
            // no prefix so return the path as is
            return $path;
        }

        // get the store array from the complex source path, eg: prefix:path
        $store = $this->getDirectoryStoreFromPath($path);

        if ($store) {
            // extract the path from the complex source path, eg: prefix:path
            $path = $this->extractPath($path);

            // make the source relative to the store path, eg: stories => images/stories
            $path = WFUtility::makePath($store['path'], $path);
        }

        return $path;
    }

    public function getDefaultPath()
    {
        $store = $this->getDirectoryStore();
        $values = reset($store); // get the first element

        return $values['prefix'] . ':';
    }

    private function getDirectoryStore()
    {
        $filesystem = $this->getFileSystem();

        // If Allow Root is enabled, return a single blank/root entry
        if (empty($filesystem->getRootDir())) {
            $hash = md5('__allow_root_access__');

            return array(
                $hash => array(
                    'path'   => '',
                    'label'  => '',
                    'prefix' => $hash,
                )
            );
        }

        $dir = (array) $this->get('dir');

        // Fallback to a single default directory if none set
        if (empty($dir)) {
            $path  = 'images';
            $label = '';

            Factory::getApplication()->triggerEvent('onWfFileSystemGetRootDir', array(&$path, &$label));

            $hash = md5($path);

            return array(
                $hash => array(
                    'path'   => $path,
                    'label'  => '',
                    'prefix' => $hash,
                )
            );
        }

        $newDir = array();

        foreach ($dir as $origKey => $item) {
            $item['path'] = isset($item['path']) ? trim($item['path']) : '';

            if ($item['path'] === '') {
                $item['path'] = 'images';
            }

            $processedPath = $this->processPath($item['path']);
            $label         = isset($item['label']) ? $item['label'] : '';

            if (count($dir) > 1 && $label === '') {
                $label = basename($processedPath);
            }

            // Process both path and label via the event
            Factory::getApplication()->triggerEvent('onWfFileSystemGetRootDir', array(&$processedPath, &$label));

            // Ensure the folder exists (create if missing)
            if ($filesystem->is_dir($processedPath) === false) {
                $name    = WFUtility::mb_basename($processedPath);
                $pathDir = WFUtility::mb_dirname($processedPath);

                if ($filesystem->createFolder($pathDir, $name) === false) {
                    // Skip this entry if it can't be created
                    continue;
                }
            }

            // New associative key from the (possibly changed) path
            $newKey = md5($processedPath);

            // Finalize fields
            $item['path']   = $processedPath;
            $item['label']  = htmlspecialchars((string) $label, ENT_QUOTES, 'UTF-8');
            $item['prefix'] = $newKey;

            // Write into rebuilt array (last one wins on key collision)
            $newDir[$newKey] = $item;
        }

        return $newDir;
    }

    public function getDirectoryStoreFromPath($path, $withKey = false)
    {
        $prefix = $this->parsePath($path); // get the prefix and remove it from the path value

        $store = $this->getDirectoryStore();

        if (empty($prefix)) {
            // no prefix, so return the default store
            foreach ($store as $key => $value) {
                // is this path with the default store?
                if (WFUtility::safe_strpos($path, $value['path']) === 0) {
                    // set the prefix to the store key
                    $prefix = $key;
                    break;
                }
            }
        }

        if (isset($store[$prefix])) {
            if ($withKey) {
                return $store;
            }

            // return the store entry for the prefix
            return $store[$prefix];
        }

        return array();
    }

    private function getPathFromDirectoryStore($path)
    {
        $path = trim($path, '/');

        // find the correct entry in the directory store
        $store = $this->getDirectoryStore();

        if (empty($path)) {
            return array_values($store);
        }

        // get the path prefix
        $prefix = $this->getPathPrefix($path);

        // no prefix?
        if (empty($prefix)) {
            $values  = array_values($store);
            $default = array_shift($values);
            return $default;
        }

        if (isset($store[$prefix])) {
            return $store[$prefix];
        }

        // no prefix found, return the path
        return $path;
    }

    private function getPathVariables()
    {
        static $variables;

        if (!isset($variables)) {
            $app = Factory::getApplication();
            $user = Factory::getUser();
            $wf = WFApplication::getInstance();
            $profile = $this->getProfile();

            $groups = UserHelper::getUserGroups($user->id);

            // get keys only
            $groups = array_keys($groups);

            // get the first group
            $group_id = array_shift($groups);

            if (is_int($group_id)) {
                // usergroup table
                $group = Table::getInstance('Usergroup');
                $group->load($group_id);
                // usertype
                $usertype = $group->title;
            } else {
                $usertype = $group_id;
            }

            $context = $app->input->getInt('context', null);

            $contextName = '';

            if (is_int($context)) {
                foreach (ComponentHelper::getComponents() as $component) {
                    if ($context == $component->id) {
                        $contextName = $component->option;
                        break;
                    }
                }
            }

            // Replace any path variables
            $path_pattern = array(
                '/\$id/',
                '/\$username/',
                '/\$name/',
                '/\$user(group|type)/',
                '/\$(group|profile)/',
                '/\$context/',
                '/\$hour/',
                '/\$day/',
                '/\$month/',
                '/\$year/',
            );

            $path_replacement = array(
                'id' => $user->id,
                'username' => $user->username,
                'name' => $user->name,
                'usertype' => $usertype,
                'profile' => $profile->name,
                'context' => $contextName,
                'hour' => date('H'),
                'day' => date('d'),
                'month' => date('m'),
                'year' => date('Y')
            );

            // expose variables
            $variables = compact('path_pattern', 'path_replacement');

            Factory::getApplication()->triggerEvent('onWfFileSystemBeforeGetPathVariables', array(&$variables));

            // convert to array values
            $path_replacement = array_values($variables['path_replacement']);
            $path_pattern = array_values($variables['path_pattern']);

            // get websafe options
            $websafe_textcase = $wf->getParam('editor.websafe_textcase', '');
            $websafe_mode = $wf->getParam('editor.websafe_mode', 'utf-8');
            $websafe_allow_spaces = $wf->getParam('editor.websafe_allow_spaces', '_');

            // implode textcase array to create string
            if (is_array($websafe_textcase)) {
                $websafe_textcase = implode(',', $websafe_textcase);
            }

            // expose variables
            $variables = compact('path_pattern', 'path_replacement', 'websafe_textcase', 'websafe_mode', 'websafe_allow_spaces');
        }

        Factory::getApplication()->triggerEvent('onWfFileSystemGetPathVariables', array(&$variables));

        return $variables;
    }

    public function processPath(&$path)
    {
        $path = preg_replace($this->get('path_pattern', array()), $this->get('path_replacement', array()), $path);

        // split into path parts to preserve /
        $parts = explode('/', $path);

        // clean path parts
        $parts = WFUtility::makeSafe($parts, $this->get('websafe_mode', 'utf-8'), $this->get('websafe_allow_spaces', '_'), $this->get('websafe_textcase', ''));

        // join path parts
        $path = implode('/', $parts);

        $path = trim($path, '/');

        return $path;
    }

    /**
     * Resolve a filter path relative to the store's base path.
     *
     * @param array  $store  The store array containing 'path' and 'prefix'.
     * @param string $filter The filter path to resolve.
     *
     * @return string The resolved filter path.
     */
    private function resolveFilterPath($store, $filter) {
        // remove leading and trailing slash
        $filter = trim($filter, '/');

        // make the source relative to the store path, eg: stories => images/stories
        $filterPath = WFUtility::makePath($store['path'], $filter);

        // trim leading and trailing slash
        return trim($filterPath, '/');
    }
    
    /**
     * Check if a path is accessible based on the defined filters.
     *
     * @param string $path The path to check.
     *
     * @return bool True if access is allowed, false otherwise.
     */
    public function checkPathAccess($path)
    {
        $path = trim($path, '/');

        $filters = $this->get('filter');

        // no filters set, allow all
        if (empty($filters)) {
            return true;
        }

        $allowFilters = [];
        $denyFilters = [];

        $store = $this->getPathFromDirectoryStore($path);

        // Categorize filters into allow and deny lists
        foreach ($filters as $filter) {
            // remove leading and trailing slash    
            $filter = trim($filter, '/');

            if (strpos($filter, '+') === 0) {
                $filter = substr($filterPath, 1);
            
                $filterPath = $this->resolveFilterPath($store, $filter);
            
                $allowFilters[] = $filterPath;
            } else if (strpos($filter, '-') === 0) {
                $filter = ltrim($filter, '-');

                $filterPath = $this->resolveFilterPath($store, $filter);

                $denyFilters[] = $filterPath;
            } else {
                $filterPath = $this->resolveFilterPath($store, $filter);
            
                $denyFilters[] = $filterPath;
            }
        }

        $access = true; // Default deny policy

        // explode path to array
        $path_parts = explode('/', $path);

        // Check allow filters
        foreach ($allowFilters as $filter) {
            $access = false;

            // process path for variables, text case etc.
            $this->processPath($filter);

            // explode to array
            $filter_parts = explode('/', $filter);

            // filter match
            if (false === empty(array_intersect_assoc($filter_parts, $path_parts))) {
                $access = true;
                break;
            }
        }

        if ($access === false) {
            return false;
        }

        // path is empty so no deny filters applied
        if (empty($path)) {
            return true;
        }

        // Check deny filters
        foreach ($denyFilters as $filter) {
            if (strpos($filter, '*') === 0) {
                $filter = substr($filter, 1);

                // process path for variables, text case etc.
                $this->processPath($filter);

                // explode to array
                $filter_parts = explode('/', $filter);

                // filter match
                if (false === empty(array_intersect($filter_parts, $path_parts))) {
                    $access = false;
                    break;
                }
            } else {
                // process path for variables, text case etc.
                $this->processPath($filter);

                if ($path === $filter) {
                    $access = false;
                    break;
                }
            }
        }

        return $access;
    }

    public function getBaseDir()
    {
        $filesystem = $this->getFileSystem();

        return $filesystem->getBaseDir();
    }

    /**
     * Get the list of files in a given folder.
     *
     * @param string $relative The relative path of the folder
     * @param string $filter   A regex filter option
     *
     * @return array list array
     */
    private function getFiles($relative, $filter = '.', $sort = '', $limit = 0, $start = 0)
    {
        $filesystem = $this->getFileSystem();
        $list = $filesystem->getFiles($relative, $filter, $sort, $limit, $start);

        $list = array_filter($list, function ($item) {
            // must have an id set
            if (empty($item['id'])) {
                return true;
            }

            $path = dirname($item['id']);

            return $this->checkPathAccess($path);
        });

        return $list;
    }

    /**
     * Get the list of folder in a given folder.
     *
     * @param string $relative The relative path of the folder
     *
     * @return array list array
     */
    private function getFolders($relative, $filter = '', $sort = '', $limit = 0, $start = 0)
    {
        $filesystem = $this->getFileSystem();
        $list = $filesystem->getFolders($relative, $filter, $sort, $limit, $start);

        $list = array_filter($list, function ($item) {
            if (empty($item['id'])) {
                return true;
            }

            return $this->checkPathAccess($item['id']);
        });

        return $list;
    }

    private static function sanitizeSearchTerm($term)
    {
        try {
            $query = preg_replace('#[^a-zA-Z0-9_\.\-\:~\pL\pM\pN\s\* ]#u', '', $term);
        } catch (\Exception $e) {
            $query = preg_replace('#[^a-zA-Z0-9_\.\-\:~\s\* ]#', '', $term);
        }

        if (is_null($query) || $query === false) {
            $query = preg_replace('#[^a-zA-Z0-9_\.\-\:~\s\* ]#', '', $term);
        }

        $query = trim($query);

        // quote first
        $query = preg_quote($query, '/');

        // then restore wildcards (escaped \* becomes real regex .*)
        $query = str_replace('\*', '.*', $query);

        return $query;
    }

    public function searchItems($path, $limit = 25, $start = 0, $query = '', $sort = '')
    {
        $result = array(
            'folders' => array(),
            'files' => array(),
            'total' => array(
                'folders' => 0,
                'files' => 0,
            ),
            'path' => '',
            'search' => true
        );

        // no query value? bail...
        if ($query == '') {
            return $result;
        }

        $filesystem = $this->getFileSystem();

        if (method_exists($filesystem, 'searchItems') === false) {
            return $this->getItems($path, $limit, $start, $query, $sort);
        }

        // define and configure seach parameters
        $filetypes = (array) $this->getFileTypes('array');

        // Split query by "OR" or "|" operators
        $terms = array_map('trim', preg_split('/\s*(?:\bOR\b|\|)\s*/i', $query, -1, PREG_SPLIT_NO_EMPTY));

        $extensions = [];
        $keywords = [];

        foreach ($terms as $term) {
            if (
                strpos($term, '.') === 0 ||                            // ".jpg"
                (strpos($term, '*.') === 0 && strlen($term) > 2)       // "*.jpg"
            ) {
                // It's an extension
                $extensions[] = WFUtility::makeSafe($term);
            } elseif ($term !== '') {
                // It's a keyword, clean and convert wildcards
                foreach (preg_split('/\s+/', $term, -1, PREG_SPLIT_NO_EMPTY) as $subterm) {
                    $keywords[] = self::sanitizeSearchTerm($subterm);
                }
            }
        }

        // Filter filetypes
        if (!empty($extensions)) {
            $filetypes = array_filter($filetypes, function ($value) use ($extensions) {
                return in_array($value, $extensions, true);
            });
        }

        // Build keyword regex (match any of the keywords, case-insensitive)
        $filter = '';

        if (!empty($keywords)) {
            $filter = '^(?i).*(' . implode('|', $keywords) . ').*';
        }

        // query filter
        /*$keyword = '^(?i).*' . $keyword . '.*';

        if ($query[0] === '.') {
            // clean query removing leading .
            $extension = WFUtility::makeSafe($query);

            $filetypes = array_filter($filetypes, function ($value) use ($extension) {
                return $value === $extension;
            });

            $filter = '';
        }*/

        // get search depth
        $depth = $this->get('search_depth', 3);

        // trim the passed in path if any
        $path = trim($path, '/');

        // no path value or root folder so get the default directories
        if (empty($path)) {
            $store = $this->getDirectoryStore();

            if (!empty($store)) {
                // case to array values as we don't need the keys
                $storeArray = array_values($store);
            }
        } else {
            // get the store array from the complex source path, eg: prefix:path
            $store = $this->getPathFromDirectoryStore($path);

            // extract the path from the complex source path, eg: prefix:path
            $path = $this->extractPath($path);

            $storeArray = array($store);
        }

        // search each store item
        foreach ($storeArray as $storeItem) {
            // define the prefix from the store array
            $prefix = $storeItem['prefix'];

            // make the source relative to the store path, eg: stories => images/stories
            $source = WFUtility::makePath($storeItem['path'], $path);

            // trim leading and trailing slash
            $source = trim($source, '/');

            $list = $filesystem->searchItems($source, $filter, $filetypes, $sort, $depth);

            $items = array_merge($list['folders'], $list['files']);

            // get properties for found items by type
            foreach ($items as $item) {
                $type = $item['type'];

                // remove the $store['path'] value from the beginning of the id, must be multibyte safe
                if (WFUtility::safe_strpos($item['id'], $storeItem['path']) === 0) {
                    $item['id'] = WFUtility::safe_substr($item['id'], WFUtility::safe_strlen($storeItem['path']));

                    // trim leading and trailing slash
                    $item['id'] = trim($item['id'], '/');
                }

                if ($type === 'files') {
                    $item['classes'] = '';

                    $item['path'] = WFUtility::makePath($storeItem['path'], $item['id']);

                    if (empty($item['properties'])) {
                        $item['properties'] = $filesystem->getFileDetails($item);
                    }
                }

                if ($type === 'folders') {
                    $item['path'] = WFUtility::makePath($storeItem['path'], $item['id']);

                    if (empty($item['properties'])) {
                        $item['properties'] = $filesystem->getFolderDetails($item);
                    }
                }

                $item['id'] = $prefix . ':' . $item['id'];

                $item['name'] = WFUtility::mb_basename($item['name']);
                $item['name'] = htmlspecialchars($item['name'], ENT_QUOTES, 'UTF-8');

                $result[$type][] = $item;
            }
        }

        // walk through the folders and files, reducing the result by the limit value if > 0
        if ($limit > 0) {
            $result['folders']  = array_slice($result['folders'], $start, $limit);
            $result['files']    = array_slice($result['files'], $start, $limit);
        }

        $result['total']['folder'] = count($result['folders']);
        $result['total']['files'] = count($result['files']);

        // Fire Event passing result as reference
        $this->fireEvent('onSearchItems', array(&$result));

        return $result;
    }

    public function getRootDir($source)
    {
        return $source;
    }

    /**
     * Get file and folder lists.
     *
     * @return array Array of file and folder list objects
     *
     * @param string $source   Relative or absolute path based either on source url or current directory
     * @param int    $limit    List limit
     * @param int    $start    list start point
     */
    public function getItems($source, $limit = 25, $start = 0, $filter = '', $sort = '')
    {
        $filesystem = $this->getFileSystem();

        $files = array();
        $folders = array();

        clearstatcache();

        // decode path
        $source = rawurldecode($source);

        // check if source is a valid path
        WFUtility::checkPath($source);

        // trim source to path variable
        $path = trim($source, '/');

        // if a value is set process as possible return file, ie: check for prefix
        if ($path) {
            $prefix = $this->getPathPrefix($path);

            // may be a passed in value, eg: images/stories/fruit.jpg
            if (!$prefix) {
                // get source dir from path eg: images/stories/fruit.jpg = images/stories
                $path = $this->getSourceDir($path);
            }
        }

        // get the store array from the complex path path, eg: prefix:path
        $store = $this->getDirectoryStoreFromPath($path);

        // no path so get the default directories
        if (empty($path) || empty($store)) {
            $store = $this->getDirectoryStore();

            if (!empty($store)) {
                $storeArray = array_values($store);

                // defined list of directories
                if (count($storeArray) > 1) {
                    $folders = [];

                    foreach ($storeArray as $items) {
                        $folders[] = array(
                            'id'            => $items['prefix'] . ':',
                            'name'          => $items['label'],
                            'type'          => 'folders',
                            'properties'    => array(),
                        );
                    }

                    // return an array of root folder items
                    return array(
                        'folders' => $folders,
                        'files' => array(),
                        'total' => array(
                            'folders' => count($folders),
                            'files' => 0,
                        ),
                    );
                }

                // no defined directories, so use the first one for backward compatibility
                $store = $storeArray[0];
            }
        } else {
            // get the store array from the complex path path, eg: prefix:path
            if (!$prefix) {
                // make relative to the store path, eg: images/stories => stories
                if (WFUtility::safe_strpos($path, $store['path']) === 0) {
                    $path = WFUtility::safe_substr($path, WFUtility::safe_strlen($store['path']));
                    // trim
                    $path = trim($path, '/');
                }
            } else {
                // extract the path from the complex source path, eg: prefix:path
                $path = $this->extractPath($path);
            }
        }

        // define the prefix from the store array
        $prefix = $store['prefix'];

        // make the source relative to the store path, eg: stories => images/stories
        $fullpath = WFUtility::makePath($store['path'], $path);

        // revert to store path if the path is not a directory
        if (!$filesystem->is_dir($fullpath)) {
            $fullpath = $store['path'];
            $path = ''; // reset path to empty
        }

        // trim leading and trailing slash
        $fullpath = trim($fullpath, '/');

        $filetypes = (array) $this->getFileTypes('array');

        $name = '';

        if ($filter) {
            if ($filter[0] == '.') {
                $ext = WFUtility::makeSafe($filter);

                for ($i = 0; $i < count($filetypes); ++$i) {
                    if (preg_match('#^' . $ext . '#', $filetypes[$i]) === false) {
                        unset($filetypes[$i]);
                    }
                }
            } else {
                $name = '^(?i).*' . WFUtility::makeSafe($filter) . '.*';
            }
        }

        // get file list by filter
        $files = $this->getFiles($fullpath, $name . '\.(?i)(' . implode('|', $filetypes) . ')$', $sort, $limit, $start);

        if (empty($filter) || $filter[0] != '.') {
            // get folder list
            $folders = $this->getFolders($fullpath, '^(?i).*' . WFUtility::makeSafe($filter) . '.*', $sort, $limit, $start);
        }

        $folderArray = array();
        $fileArray = array();

        $items = array_merge($folders, $files);

        if (count($items)) {
            if (intval($limit) > 0) {
                $items = array_slice($items, $start, $limit);
            }

            foreach ($items as $item) {
                $item['classes'] = '';

                // remove the $store['path'] value from the beginning of the id, must be multibyte safe
                if (WFUtility::safe_strpos($item['id'], $store['path']) === 0) {
                    $item['id'] = WFUtility::safe_substr($item['id'], WFUtility::safe_strlen($store['path']));
                }

                // trim $id removing leading and trailing slashes
                $item['id'] = trim($item['id'], '/');
                // encode id for html
                $item['id'] = htmlspecialchars($item['id'], ENT_QUOTES, 'UTF-8');

                // ensure name is relative
                $item['name'] = WFUtility::mb_basename($item['name']);

                // encode name for html
                $item['name'] = htmlspecialchars($item['name'], ENT_QUOTES, 'UTF-8');

                // create path
                $item['path'] = WFUtility::makePath($store['path'], $item['id']);

                // add the path prefix to the id
                $item['id'] = $prefix . ':' . $item['id'];

                if ($item['type'] == 'folders') {
                    if (empty($item['properties'])) {
                        $item['properties'] = $filesystem->getFolderDetails($item);
                    }

                    $folderArray[] = $item;
                } else {
                    // check for selected item
                    $item['selected'] = $filesystem->isMatch($item['url'], $source);

                    if (empty($item['properties'])) {
                        $item['properties'] = $filesystem->getFileDetails($item);
                    }

                    $fileArray[] = $item;
                }
            }
        }

        $result = array(
            'folders' => $folderArray,
            'files' => $fileArray,
            'total' => array(
                'folders' => count($folders),
                'files' => count($files),
            ),
            'path' => $prefix . ':' . $path,
        );

        // Fire Event passing result as reference
        $this->fireEvent('onGetItems', array(&$result));

        return $result;
    }

    /**
     * Get a tree node.
     *
     * @param string $dir The relative path of the folder to search
     *
     * @return Tree node array
     */
    public function getTreeItem($path = "")
    {
        $path = rawurldecode($path);

        WFUtility::checkPath($path);

        $path = trim($path, '/');

        $folders = array();

        $label = '';

        if (empty($path)) {
            $store = $this->getDirectoryStore();
            $storeArray = array_values($store);

            if (count($storeArray) > 1) {
                foreach ($storeArray as $item) {
                    $folders[] = array(
                        'id'    => $item['prefix'] . ':',
                        'name'  => $item['label'],
                        'path'  => $item['path'],
                        'class' => 'folder'
                    );
                }
            } else {
                $store = $storeArray[0];
                $folders = $this->getFolders($store['path']);

                $label = isset($store['label']) ? $store['label'] : '';

                array_walk($folders, function (&$item) use ($store) {
                    $path = $item['id'];

                    // remove the $store['path'] value from the beginning of the id, must be multibyte safe
                    if (WFUtility::safe_strpos($item['id'], $store['path']) === 0) {
                        $item['id'] = WFUtility::safe_substr($item['id'], WFUtility::safe_strlen($store['path']));
                    }

                    $item['id'] = trim($item['id'], '/');
                    $path = trim($path, '/');

                    $item['id']     = $store['prefix'] . ':' . $item['id'];
                    $item['path']   = $path;
                    $item['class']  = 'folder';
                });
            }
        } else {
            // get the store array from the complex source path, eg: prefix:path
            $store = $this->getDirectoryStoreFromPath($path);

            // extract the path from the complex source path, eg: prefix:path
            $path = $this->extractPath($path);

            // make the source relative to the store path, eg: stories => images/stories
            $path = WFUtility::makePath($store['path'], $path);

            // get source dir from path eg: images/stories/fruit.jpg = images/stories
            $source = $this->getSourceDir($path);

            // get folder list
            $folders = $this->getFolders($source);

            array_walk($folders, function (&$item) use ($store, $path) {
                // remove the $store['path'] value from the beginning of the id, must be multibyte safe
                if (WFUtility::safe_strpos($item['id'], $store['path']) === 0) {
                    $item['id'] = WFUtility::safe_substr($item['id'], WFUtility::safe_strlen($store['path']));
                }

                $item['id'] = trim($item['id'], '/');

                $item['id']     = $store['prefix'] . ':' . $item['id'];
                $item['path']   = WFUtility::makePath($path, $item['name']);
                $item['class']  = 'folder';
            });
        }

        $result = array(
            'label'     => $label,
            'folders'   => $folders
        );

        return $result;
    }

    /**
     * Build a tree list.
     *
     * @param string $dir The relative path of the folder to search
     *
     * @return Tree html string
     */
    public function getTree($path = '')
    {
        // decode path
        $path = rawurldecode($path);

        WFUtility::checkPath($path);

        $result = $this->getTreeItems($path);

        return $result;
    }

    /**
     * Get Tree list items as html list.
     *
     * @return Tree list html string
     *
     * @param string $path            Current directory
     * @param bool   $root[optional] Is root directory
     * @param bool   $init[optional] Is tree initialisation
     */
    public function getTreeItems($path, $root = true, $init = true)
    {
        $result = '';

        static $treedir = null;

        $folders = [];

        if ($init) {
            $treedir = $path;

            $items = $this->getTreeItem();
            $folders = $items['folders'];

            $label = $items['label'] ? $items['label'] :  Text::_('WF_LABEL_HOME', 'Home');

            if ($root) {
                $result .= '
                <ul>
                    <li data-id="/" class="uk-tree-open uk-tree-root uk-padding-remove">
                        <div class="uk-tree-row">
                            <a href="#">
                                <span class="uk-tree-icon" role="presentation">
                                    <i class="uk-icon uk-icon-home"></i>
                                </span>
                                <span class="uk-tree-text">' . htmlspecialchars($label, ENT_QUOTES, 'UTF-8') . '</span>
                            </a>
                        </div>
                ';
            }
        } else {
            $items = $this->getTreeItem($path);
            $folders = $items['folders'];
        }

        if (count($folders)) {
            $result .= '<ul class="uk-tree-node">';

            $open = false;

            foreach ($folders as $folder) {
                $id = trim($folder['id'], '/');

                if ($treedir) {
                    // resolve $treedir
                    $resolved = $this->resolvePath($treedir);

                    // check if the folder is open, ie: the path matches the current directory
                    $open = (bool) preg_match('#' . preg_quote($folder['path']) . '\b#', $resolved);
                }

                $result .= '
                <li data-id="' . htmlspecialchars($id, ENT_QUOTES, 'UTF-8') . '" class="' . ($open ? 'uk-tree-open' : '') . '">
                    <div class="uk-tree-row">
                        <a href="#">
                            <span class="uk-tree-icon" role="presentation"></span>
                            <span class="uk-tree-text uk-text-truncate" title="' . $folder['name'] . '">' . $folder['name'] . '</span>
                        </a>
                    </div>';

                if ($open) {
                    $result .= $this->getTreeItems($id, false, false);
                }

                $result .= '</li>';
            }

            $result .= '</ul>';
        }

        if ($init && $root) {
            $result .= '</li></ul>';
        }

        $init = false;

        return $result;
    }

    /**
     * Get a folders properties.
     *
     * @return array Array of properties
     *
     * @param string $dir Folder relative path
     */
    public function getFolderDetails($dir)
    {
        WFUtility::checkPath($dir);

        $filesystem = $this->getFileSystem();

        // get array with folder date and content count eg: array('date'=>'00-00-000', 'folders'=>1, 'files'=>2);
        return $filesystem->getFolderDetails($dir);
    }

    /**
     * Get a files properties.
     *
     * @return array Array of properties
     *
     * @param string $file File relative path
     */
    public function getFileDetails($file)
    {
        WFUtility::checkPath($file);

        $filesystem = $this->getFileSystem();

        // get array with folder date and content count eg: array('date'=>'00-00-000', 'folders'=>1, 'files'=>2);
        return $filesystem->getFileDetails($file);
    }

    /**
     * Create default actions based on access.
     */
    private function addDefaultActions()
    {
        if ($this->checkFeature('help')) {
            $this->addAction('help', array('title' => Text::_('WF_BUTTON_HELP')));
        }

        if ($this->checkFeature('upload')) {
            $this->addAction('upload');
            $this->setRequest(array($this, 'upload'));
        }

        if ($this->checkFeature('create', 'folder')) {
            $this->addAction('folder_new');
            $this->setRequest(array($this, 'folderNew'));
        }
    }

    /**
     * Add an action to the list.
     *
     * @param string $name    Action name
     * @param array  $options Array of options
     */
    public function addAction($name, $options = array())
    {
        if (!is_array($options)) {
            list($name, $options['icon'], $options['action'], $options['title']) = func_get_args();
        }

        $options = array_merge(array('name' => $name), $options);

        // set some defaults
        if (!array_key_exists('icon', $options)) {
            $options['icon'] = '';
        }

        if (!array_key_exists('action', $options)) {
            $options['action'] = '';
        }

        if (!array_key_exists('title', $options)) {
            $options['title'] = Text::_('WF_BUTTON_' . strtoupper($name));
        }

        $this->_actions[$name] = $options;
    }

    /**
     * Get all actions.
     *
     * @return object
     */
    private function getActions()
    {
        return array_reverse($this->_actions);
    }

    /**
     * Remove an action from the list by name.
     *
     * @param string $name Action name to remove
     */
    public function removeAction($name)
    {
        if (isset($this->_actions[$name])) {
            unset($this->_actions[$name]);
        }
    }

    /**
     * Create all standard buttons based on access.
     */
    private function addDefaultButtons()
    {
        if ($this->checkFeature('delete', 'folder')) {
            $this->addButton('folder', 'delete', array('multiple' => true));

            $this->setRequest(array($this, 'deleteItem'));
        }
        if ($this->checkFeature('rename', 'folder')) {
            $this->addButton('folder', 'rename');

            $this->setRequest(array($this, 'renameItem'));
        }
        if ($this->checkFeature('move', 'folder')) {
            $this->addButton('folder', 'copy', array('multiple' => true));
            $this->addButton('folder', 'cut', array('multiple' => true));

            $this->addButton('folder', 'paste', array('multiple' => true, 'trigger' => true));

            $this->setRequest(array($this, 'copyItem'));
            $this->setRequest(array($this, 'moveItem'));
        }
        if ($this->checkFeature('rename', 'file')) {
            $this->addButton('file', 'rename');

            $this->setRequest(array($this, 'renameItem'));
        }
        if ($this->checkFeature('delete', 'file')) {
            $this->addButton('file', 'delete', array('multiple' => true));

            $this->setRequest(array($this, 'deleteItem'));
        }
        if ($this->checkFeature('move', 'file')) {
            $this->addButton('file', 'copy', array('multiple' => true));
            $this->addButton('file', 'cut', array('multiple' => true));

            $this->addButton('file', 'paste', array('multiple' => true, 'trigger' => true));

            $this->setRequest(array($this, 'copyItem'));
            $this->setRequest(array($this, 'moveItem'));
        }
        $this->addButton('file', 'view', array('restrict' => $this->getViewable()));
    }

    /**
     * Add a button.
     *
     * @param string $type[optional]     Button type (file or folder)
     * @param string $name               Button name
     * @param string $icon[optional]     Button icon
     * @param string $action[optional]   Button action / function
     * @param string $title              Button title
     * @param bool   $multiple[optional] Supports multiple file selection
     * @param bool   $trigger[optional]
     */
    public function addButton($type, $name, $options = array())
    {
        $options = array_merge(array('name' => $name), $options);

        // set some defaults
        if (!array_key_exists('icon', $options)) {
            $options['icon'] = '';
        }

        if (!array_key_exists('action', $options)) {
            $options['action'] = '';
        }

        if (!array_key_exists('title', $options)) {
            $options['title'] = Text::_('WF_BUTTON_' . strtoupper($name));
        }

        if (!array_key_exists('multiple', $options)) {
            $options['multiple'] = false;
        }

        if (!array_key_exists('trigger', $options)) {
            $options['trigger'] = false;
        }

        if (!array_key_exists('restrict', $options)) {
            $options['restrict'] = '';
        }

        $this->_buttons[$type][$name] = $options;
    }

    /**
     * Return an object list of all buttons.
     *
     * @return object
     */
    private function getButtons()
    {
        return $this->_buttons;
    }

    /**
     * Remove a button.
     *
     * @param string $type Button type
     * @param string $name Button name
     */
    public function removeButton($type, $name)
    {
        if (array_key_exists($name, $this->_buttons[$type])) {
            unset($this->_buttons[$type][$name]);
        }
    }

    /**
     * Change a buttons properties.
     *
     * @param string $type Button type
     * @param string $name Button name
     * @param array $keys Button keys
     */
    public function changeButton($type, $name, $keys)
    {
        foreach ($keys as $key => $value) {
            if (isset($this->_buttons[$type][$name][$key])) {
                $this->_buttons[$type][$name][$key] = $value;
            }
        }
    }

    /**
     * Add an event.
     *
     * @param string $name     Event name
     * @param string $function Event function name
     */
    public function addEvent($name, $function)
    {
        $this->_events[$name] = $function;
    }

    /**
     * Execute an event.
     *
     * @return array result
     *
     * @param object $name           Event name
     * @param array  $args[optional] Optional arguments
     */
    protected function fireEvent($name, $args = null)
    {
        if (array_key_exists($name, $this->_events)) {
            $event = $this->_events[$name];

            if (is_array($event)) {
                return call_user_func_array($event, $args);
            } else {
                return call_user_func($event, $args);
            }
        }

        return array();
    }

    private function validateUploadedFile($file)
    {
        // check the POST data array
        if (empty($file) || empty($file['tmp_name'])) {
            throw new InvalidArgumentException('Upload Failed: No data');
        }

        // check for tmp_name and is valid uploaded file
        if (!is_uploaded_file($file['tmp_name'])) {
            @unlink($file['tmp_name']);
            throw new InvalidArgumentException('Upload Failed: Not an uploaded file');
        }

        $upload = $this->get('upload');

        // check file for various issues
        if (WFUtility::isSafeFile($file) !== true) {
            @unlink($file['tmp_name']);
            throw new InvalidArgumentException('Upload Failed: Invalid file');
        }

        // get extension
        $ext = WFUtility::getExtension($file['name'], true);

        // check extension is allowed
        $allowed = (array) $this->getFileTypes('array');

        if (is_array($allowed) && !empty($allowed) && in_array($ext, $allowed) === false) {
            @unlink($file['tmp_name']);
            throw new InvalidArgumentException(Text::_('WF_MANAGER_UPLOAD_INVALID_EXT_ERROR'));
        }

        $size = round(filesize($file['tmp_name']) / 1024);

        if (empty($upload['max_size'])) {
            $upload['max_size'] = 1024;
        }

        // validate size
        if ($size > (int) $upload['max_size']) {
            @unlink($file['tmp_name']);

            throw new InvalidArgumentException(Text::sprintf('WF_MANAGER_UPLOAD_SIZE_ERROR', $file['name'], $size, $upload['max_size']));
        }

        // validate mimetype
        if ($upload['validate_mimetype']) {
            if (WFMimeType::check($file['name'], $file['tmp_name']) === false) {
                @unlink($file['tmp_name']);
                throw new InvalidArgumentException(Text::_('WF_MANAGER_UPLOAD_MIME_ERROR'));
            }
        }

        return true;
    }

    /**
     * Upload a file.
     *
     * @return array $error on failure or uploaded file name on success
     */
    public function upload()
    {
        // Check for request forgeries
        Session::checkToken('request') or jexit(Text::_('JINVALID_TOKEN'));

        // check for feature access
        if (!$this->checkFeature('upload')) {
            throw new Exception(Text::_('JERROR_ALERTNOAUTHOR'));
        }

        $app = Factory::getApplication();

        $filesystem = $this->getFileSystem();

        // create a filesystem result object
        $result = new WFFileSystemResult();

        // get uploaded file
        $file = $app->input->files->get('file', array(), 'raw');

        // validate file
        $this->validateUploadedFile($file);

        // get file name
        $name = (string) $app->input->get('name', $file['name'], 'STRING');

        // decode
        $name = rawurldecode($name);

        // check name
        if (WFUtility::validateFileName($name) === false) {
            throw new InvalidArgumentException('Upload Failed: The file name is invalid.');
        }

        // check file name
        WFUtility::checkPath($name);

        // get extension from file name
        $ext = WFUtility::getExtension($file['name']);

        // trim extension
        $ext = trim($ext);

        // make extension websafe
        $ext = WFUtility::makeSafe($ext, $this->get('websafe_mode', 'utf-8'), $this->get('websafe_spaces'), $this->get('websafe_textcase'));

        // check extension exists
        if (empty($ext) || $ext === $file['name']) {
            throw new InvalidArgumentException('Upload Failed: The file name does not contain a valid extension.');
        }

        // strip extension
        $name = WFUtility::stripExtension($name);

        // make file name 'web safe'
        $name = WFUtility::makeSafe($name, $this->get('websafe_mode', 'utf-8'), $this->get('websafe_spaces'), $this->get('websafe_textcase'));

        // check name
        if (WFUtility::validateFileName($name) === false) {
            throw new InvalidArgumentException('Upload Failed: The file name is invalid.');
        }

        // target directory
        $dir = (string) $app->input->get('upload-dir', '', 'STRING');

        // decode and cast as string
        $dir = rawurldecode($dir);

        // get upload settings from the config
        $upload = $this->get('upload');

        // add random string
        if ($upload['add_random']) {
            $name = $name . '_' . substr(md5(uniqid(rand(), 1)), 0, 5);
        }

        // rebuild file name - name + extension
        $name = $name . '.' . $ext;

        // pass to onBeforeUpload
        $this->fireEvent('onBeforeUpload', array(&$file, &$dir, &$name));

        // check destination path
        WFUtility::checkPath($dir);

        // if directory is empty, use the default complex path
        if (empty($dir)) {
            $dir = $this->getDefaultPath();
        }

        // extract the path from the complex path, remove prefix
        $dir = $this->resolvePath($dir);

        // an upload cannot be made into the primary directory tree
        if (empty($dir)) {
            throw new InvalidArgumentException('Upload Failed: Invalid target directory');
        }

        // check path exists
        if (!$filesystem->is_dir($dir)) {
            throw new InvalidArgumentException('Upload Failed: The target directory does not exist');
        }

        // check access
        if (!$this->checkPathAccess($dir)) {
            throw new InvalidArgumentException('Upload Failed: Access to the target directory is restricted');
        }

        // Check file number limits
        if (!empty($upload['total_files'])) {
            if ($filesystem->countFiles($dir, true) > $upload['total_files']) {
                throw new InvalidArgumentException(Text::_('WF_MANAGER_FILE_LIMIT_ERROR'));
            }
        }

        // Check total file size limit
        if (!empty($upload['total_size'])) {
            $size = $filesystem->getTotalSize($dir);

            if (($size / 1024 / 1024) > $upload['total_size']) {
                throw new InvalidArgumentException(Text::_('WF_MANAGER_FILE_SIZE_LIMIT_ERROR'));
            }
        }

        $contentType = $_SERVER['CONTENT_TYPE'];

        // Only multipart uploading is supported for now
        if ($contentType && strpos($contentType, 'multipart') !== false) {
            // upload file with filesystem
            $result = $filesystem->upload('multipart', trim($file['tmp_name']), $dir, $name);

            if (!$result->state) {
                if (empty($result->message)) {
                    $result->message = Text::_('WF_MANAGER_UPLOAD_ERROR');
                }

                $result->code = 103;
            }

            @unlink($file['tmp_name']);
        } else {
            $result->state = false;
            $result->code = 103;
            $result->message = Text::_('WF_MANAGER_UPLOAD_ERROR');
        }

        // upload finished
        if ($result instanceof WFFileSystemResult) {
            if ($result->state === true) {
                $name = WFUtility::mb_basename($result->path);

                if (empty($result->url)) {
                    /*$relative = WFUtility::makePath($dir, $name);
                    $result->url = WFUtility::makePath($filesystem->getBaseURL(), $relative);*/

                    $result->url = WFUtility::makePath($dir, $name);
                }

                // trim slashes
                $result->url = trim($result->url, '/');

                // run events
                $data = $this->fireEvent('onUpload', array($result->path, $result->url));

                $data['name'] = $name;

                $this->setResult($data, 'files');
            } else {
                $this->setResult($result->message, 'error');
            }
        }

        return $this->getResult();
    }

    /**
     * Delete the relative file(s).
     *
     * @param $files the relative path to the file name or comma seperated list of multiple paths
     *
     * @return string $error on failure
     */
    public function deleteItem($items)
    {
        // check for feature access
        if (!$this->checkFeature('delete', 'folder') && !$this->checkFeature('delete', 'file')) {
            throw new Exception(Text::_('JERROR_ALERTNOAUTHOR'));
        }

        $filesystem = $this->getFileSystem();
        $items = explode(',', rawurldecode((string) $items));

        foreach ($items as $item) {
            // decode and cast as string
            $item = (string) rawurldecode($item);

            // check path
            WFUtility::checkPath($item);

            $item = $this->resolvePath($item);

            if ($filesystem->is_file($item)) {
                if ($this->checkFeature('delete', 'file') === false) {
                    throw new Exception(Text::_('JERROR_ALERTNOAUTHOR'));
                }

                $path = $item;
            } elseif ($filesystem->is_dir($item)) {
                if ($this->checkFeature('delete', 'folder') === false) {
                    throw new Exception(Text::_('JERROR_ALERTNOAUTHOR'));
                }

                $path = dirname($item);
            }

            // check access
            if (!$this->checkPathAccess($path)) {
                throw new InvalidArgumentException('Delete Failed: Access to the target directory is restricted');
            }

            $result = $filesystem->delete($item);

            if ($result instanceof WFFileSystemResult) {
                if (!$result->state) {
                    if ($result->message) {
                        $this->setResult($result->message, 'error');
                    } else {
                        $this->setResult(Text::sprintf('WF_MANAGER_DELETE_' . strtoupper($result->type) . '_ERROR', WFUtility::mb_basename($item)), 'error');
                    }
                } else {
                    $this->fireEvent('on' . ucfirst($result->type) . 'Delete', array($item));
                    $this->setResult($item, $result->type);
                }
            }
        }

        return $this->getResult();
    }

    /**
     * Rename a file.
     *
     * @param string $src  The relative path of the source file
     * @param string $dest The name of the new file
     *
     * @return string $error
     */
    public function renameItem()
    {
        // check for feature access
        if (!$this->checkFeature('rename', 'folder') && !$this->checkFeature('rename', 'file')) {
            throw new Exception(Text::_('JERROR_ALERTNOAUTHOR'));
        }

        $args = func_get_args();

        $source = array_shift($args);
        $destination = array_shift($args);

        // decode and cast as string
        $source = (string) rawurldecode($source);

        // decode and cast as string
        $destination = (string) rawurldecode($destination);

        WFUtility::checkPath($source);
        WFUtility::checkPath($destination);

        // check for extension in destination name
        if (WFUtility::validateFileName($destination) === false) {
            throw new InvalidArgumentException('Rename Failed: The file name is invalid.');
        }

        // extract the path from the complex path, removing the prefix
        $source = $this->resolvePath($source);

        $filesystem = $this->getFileSystem();

        if ($filesystem->is_file($source)) {
            if ($this->checkFeature('rename', 'file') === false) {
                throw new Exception(Text::_('JERROR_ALERTNOAUTHOR'));
            }

            $path = dirname($source);
        } elseif ($filesystem->is_dir($source)) {
            if ($this->checkFeature('rename', 'folder') === false) {
                throw new Exception(Text::_('JERROR_ALERTNOAUTHOR'));
            }

            $path = $source;
        }

        // check access
        if (!$this->checkPathAccess($path)) {
            throw new InvalidArgumentException('Rename Failed: Access to the target directory is restricted');
        }

        // apply filesystem options
        $destination = WFUtility::makeSafe($destination, $this->get('websafe_mode'), $this->get('websafe_spaces'), $this->get('websafe_textcase'));
        $result = $filesystem->rename($source, $destination, $args);

        if ($result instanceof WFFileSystemResult) {
            if (!$result->state) {
                $this->setResult(Text::sprintf('WF_MANAGER_RENAME_' . strtoupper($result->type) . '_ERROR', WFUtility::mb_basename($source)), 'error');
                if ($result->message) {
                    $this->setResult($result->message, 'error');
                }
            } else {
                $data = array(
                    'name' => WFUtility::mb_basename($result->path),
                );

                $event = $this->fireEvent('on' . ucfirst($result->type) . 'Rename', array($destination));

                // merge event data with default values
                $data = array_merge($data, $event);

                $this->setResult($data, $result->type);
            }
        }

        return $this->getResult();
    }

    /**
     * Copy a file.
     *
     * @param string $files The relative file or comma seperated list of files
     * @param string $dest  The relative path of the destination dir
     * @param string $conflict The conflict action copy|replace or blank to confirm
     *
     * @return string $error on failure
     */
    public function copyItem($items, $destination, $conflict = '')
    {
        // check for feature access
        if (!$this->checkFeature('move', 'folder') && !$this->checkFeature('move', 'file')) {
            throw new Exception(Text::_('JERROR_ALERTNOAUTHOR'));
        }

        $filesystem = $this->getFileSystem();

        $items = explode(',', rawurldecode((string) $items));

        // decode and cast as string
        $destination = (string) rawurldecode($destination);

        // check destination path
        WFUtility::checkPath($destination);

        // extract the path from the complex path, removing the prefix
        $destination = $this->resolvePath($destination);

        if (empty($destination)) {
            throw new InvalidArgumentException('Copy Failed:Invalid destination path.');
        }

        // check for extension in destination name
        if (WFUtility::validateFileName($destination) === false) {
            throw new InvalidArgumentException('Copy Failed: The file name is invalid.');
        }

        // check path exists
        if (!$filesystem->is_dir($destination)) {
            throw new InvalidArgumentException('Copy Failed: The target directory does not exist');
        }

        // check access
        if (!$this->checkPathAccess($destination)) {
            throw new InvalidArgumentException('Copy Failed: Access to the target directory is restricted');
        }

        foreach ($items as $item) {
            // decode and cast as string
            $item = (string) rawurldecode($item);

            // check source path
            WFUtility::checkPath($item);

            if (WFUtility::validateFileName($item) === false) {
                throw new InvalidArgumentException('Copy Failed: The file name is invalid.');
            }

            $item = $this->resolvePath($item);

            if ($filesystem->is_file($item)) {
                if ($this->checkFeature('move', 'file') === false) {
                    throw new Exception(Text::_('JERROR_ALERTNOAUTHOR'));
                }

                $path = dirname($item);
            } elseif ($filesystem->is_dir($item)) {
                if ($this->checkFeature('move', 'folder') === false) {
                    throw new Exception(Text::_('JERROR_ALERTNOAUTHOR'));
                }

                $path = $item;
            }

            $target = WFUtility::makePath($destination, WFUtility::mb_basename($item));

            if ($filesystem->is_file($target)) {
                // target is the same as the source so paste as copy
                if ($target === $item) {
                    $conflict = 'copy';
                    // file exists and is being copied into a new folder
                } else {
                    // conflict action not set so confirm
                    if (!$conflict) {
                        $this->setResult($item, 'confirm');
                        return $this->getResult();
                    }
                }
            }

            // check access
            if (!$this->checkPathAccess($path)) {
                throw new InvalidArgumentException('Copy Failed: Access to the target directory is restricted');
            }

            $result = $filesystem->copy($item, $destination, $conflict);

            if ($result instanceof WFFileSystemResult) {
                if (!$result->state) {
                    if ($result->message) {
                        $this->setResult($result->message, 'error');
                    } else {
                        $this->setResult(Text::sprintf('WF_MANAGER_COPY_' . strtoupper($result->type) . '_ERROR', WFUtility::mb_basename($item)), 'error');
                    }
                } else {
                    $data = array(
                        'name' => $filesystem->toRelative($result->path),
                    );

                    $event = $this->fireEvent('on' . ucfirst($result->type) . 'Copy', array($item));

                    // merge event data with default values
                    $data = array_merge($data, $event);

                    $this->setResult($data, $result->type);
                }
            }
        }

        return $this->getResult();
    }

    /**
     * Copy a file.
     *
     * @param string $files The relative file or comma seperated list of files
     * @param string $dest  The relative path of the destination dir
     *
     * @return string $error on failure
     */
    public function moveItem($items, $destination, $overwrite = false)
    {
        // check for feature access
        if (!$this->checkFeature('move', 'folder') && !$this->checkFeature('move', 'file')) {
            throw new Exception(Text::_('JERROR_ALERTNOAUTHOR'));
        }

        $filesystem = $this->getFileSystem();

        $items = explode(',', rawurldecode((string) $items));

        // decode and cast as string
        $destination = (string) rawurldecode($destination);

        // check destination path
        WFUtility::checkPath($destination);

        // resolve the path to the directory store, eg: files/foo.pdf => images/files/foo.pdf
        $destination = $this->resolvePath($destination);

        if (empty($destination)) {
            throw new InvalidArgumentException('Move Failed: The destination path is invalid.');
        }

        // check for extension in destination name
        if (WFUtility::validateFileName($destination) === false) {
            throw new InvalidArgumentException('Move Failed: The file name is invalid.');
        }

        // check path exists
        if (!$filesystem->is_dir($destination)) {
            throw new InvalidArgumentException('Move Failed: The target directory does not exist');
        }

        // check access
        if (!$this->checkPathAccess($destination)) {
            throw new InvalidArgumentException('Move Failed: Access to the target directory is restricted');
        }

        foreach ($items as $item) {
            // decode and cast as string
            $item = (string) rawurldecode($item);

            // check source path
            WFUtility::checkPath($item);

            // extract the path from the complex path, removing the prefix
            $item = $this->resolvePath($item);

            if (WFUtility::validateFileName($item) === false) {
                throw new InvalidArgumentException('Move Failed: The file name is invalid.');
            }

            if ($filesystem->is_file($item)) {
                if ($this->checkFeature('move', 'file') === false) {
                    throw new Exception(Text::_('JERROR_ALERTNOAUTHOR'));
                }
            } elseif ($filesystem->is_dir($item)) {
                if ($this->checkFeature('move', 'folder') === false) {
                    throw new Exception(Text::_('JERROR_ALERTNOAUTHOR'));
                }
            }

            if ($filesystem->is_file(WFUtility::makePath($destination, WFUtility::mb_basename($item))) && $overwrite === false) {
                $this->setResult($item, 'confirm');

                return $this->getResult();
            }

            $result = $filesystem->move($item, $destination);

            if ($result instanceof WFFileSystemResult) {
                if (!$result->state) {
                    if ($result->message) {
                        $this->setResult($result->message, 'error');
                    } else {
                        $this->setResult(Text::sprintf('WF_MANAGER_MOVE_' . strtoupper($result->type) . '_ERROR', WFUtility::mb_basename($item)), 'error');
                    }
                } else {
                    $data = array(
                        'name' => $filesystem->toRelative($result->path),
                    );

                    $event = $this->fireEvent('on' . ucfirst($result->type) . 'Move', array($item));

                    // merge event data with default values
                    $data = array_merge($data, $event);

                    $this->setResult($data, $result->type);
                }
            }
        }

        return $this->getResult();
    }

    /**
     * Create a new folder
     * @return string $error on failure
     */
    public function folderNew()
    {
        // check if the user has access to create a folder
        if ($this->checkFeature('create', 'folder') === false) {
            throw new Exception(Text::_('JERROR_ALERTNOAUTHOR'));
        }

        $args = func_get_args();

        // path where the new folder will be created
        $target = array_shift($args);

        // a folder cannot be created in the primary directory tree
        if (empty($target)) {
            throw new InvalidArgumentException('Action Failed: Invalid target directory');
        }

        // the name of the new folder
        $new = array_shift($args);

        // decode and cast as string
        $target = (string) rawurldecode($target);
        $new = (string) rawurldecode($new);

        $target = $this->resolvePath($target);

        // check access
        if (!$this->checkPathAccess($target)) {
            throw new InvalidArgumentException('Action Failed: Access to the target directory is restricted');
        }

        $filesystem = $this->getFileSystem();

        $name = WFUtility::makeSafe($new, $this->get('websafe_mode'), $this->get('websafe_spaces'), $this->get('websafe_textcase'));

        // check for extension in destination name
        if (WFUtility::validateFileName($name) === false) {
            throw new InvalidArgumentException('Action Failed: The file name is invalid.');
        }

        $result = $filesystem->createFolder($target, $name, $args);

        if ($result instanceof WFFileSystemResult) {
            if (!$result->state) {
                if ($result->message) {
                    $this->setResult($result->message, 'error');
                } else {
                    $this->setResult(Text::sprintf('WF_MANAGER_NEW_FOLDER_ERROR', WFUtility::mb_basename($new)), 'error');
                }
            } else {
                $data = array(
                    'name'  => WFUtility::mb_basename($new),
                    'id'    => WFUtility::mb_basename($new),
                );

                $event = $this->fireEvent('onFolderNew', array($new));

                // merge event data with default values
                $data = array_merge($data, $event);

                $this->setResult($data, $result->type);
            }
        }

        return $this->getResult();
    }

    /**
     * Get the dimensions of a file.
     *
     * @param string $file The file to get dimensions for
     * @return array The dimensions of the file
     */
    public function getDimensions($file)
    {
        return $this->getFileSystem()->getDimensions($file);
    }

    /**
     * Convert a file to an absolute path.
     *
     * @param string $file The file to convert
     * @return string The absolute path
     */
    public function toAbsolute($file)
    {
        $path = $this->resolvePath($file);

        return $this->getFileSystem()->toAbsolute($path);
    }

    /**
     * Convert a file to a relative path.
     *
     * @param string $file The file to convert
     * @return string The relative path
     */
    public function toRelative($file)
    {
        $path = $this->resolvePath($file);

        return $this->getFileSystem()->toRelative($path);
    }

    /**
     * Proxy for the filesystem read method.
     *
     * @param string $file The file to read
     * @return string The file contents
     */
    public function readFile($file)
    {
        $path = $this->resolvePath($file);

        return $this->getFileSystem()->read($path);
    }

    public function writeFile($file, $data)
    {
        $path = $this->resolvePath($file);

        return $this->getFileSystem()->write($path, $data);
    }

    /**
     * Proxy for the filesystem is_file method.
     * @param string $file The file to check
     * @return bool True if the file exists
     */
    public function is_file($file)
    {
        $path = $this->resolvePath($file);

        return $this->getFileSystem()->is_file($path);
    }

    /**
     * Proxy for the filesystem is_dir method.
     *
     * @param string $path The path to check
     * @return boolean True if the path is a directory
     */
    public function is_dir($path)
    {
        $path = $this->resolvePath($path);

        return $this->getFileSystem()->is_dir($path);
    }

    private function getUploadValue()
    {
        $upload = trim(ini_get('upload_max_filesize'));
        $post = trim(ini_get('post_max_size'));

        $upload = WFUtility::convertSize($upload);
        $post = WFUtility::convertSize($post);

        if (intval($upload) <= intval($post)) {
            return $upload;
        }

        return $post;
    }

    private function getUploadDefaults()
    {
        $filesystem = $this->getFileSystem();
        $features = $filesystem->get('upload');

        $upload_max = $this->getUploadValue();

        $upload = $this->get('upload');

        // get max size as kilobytes
        if (empty($upload['max_size'])) {
            $upload['max_size'] = 1024;
        }

        // get upload size as integer
        $size = intval(preg_replace('/[^0-9]/', '', $upload['max_size']));

        // must not exceed server maximum if > 0
        if (!empty($upload_max)) {
            if ((int) $size * 1024 > (int) $upload_max) {
                $size = $upload_max / 1024;
            }
        }

        $upload = array_merge($upload, array(
            'max_size' => $size,
            'filetypes' => $this->listFileTypes(),
        ));

        if (isset($features['elements'])) {
            $upload['elements'] = $features['elements'];
        }

        if (isset($features['dialog'])) {
            $upload['dialog'] = $features['dialog'];
        }

        return $upload;
    }

    // Set File Browser config
    private function setConfig($config = array())
    {
        // apply passed in properties (this must be done before initialising filesystem!)
        if (!empty($config)) {
            $this->setProperties($config);
        }

        $filesystem = $this->getFileSystem();

        $default = array(
            'upload' => $this->getUploadDefaults(),
        );

        $properties = array('base', 'delete', 'rename', 'folder_new', 'copy', 'move', 'list_limit');

        foreach ($properties as $property) {
            if ($filesystem->get($property)) {
                $default[$property] = $filesystem->get($property);
            }
        }

        $pathVariables = $this->getPathVariables();

        foreach ($pathVariables as $key => $value) {
            $default[$key] = $value;
        }

        // apply default properties
        $this->setProperties($default);
    }
}
libraries/classes/utility.php000060400000124206152455721620012403 0ustar00<?php

/**
 * @package     JCE
 * @subpackage  Editor
 *
 * @copyright   Copyright (C) 2005 - 2020 Open Source Matters, Inc. All rights reserved.
 * @copyright   Copyright (c) 2009-2024 Ryan Demmer. All rights reserved
 * @license     GNU General Public License version 2 or later; see LICENSE.txt
 */

\defined('_JEXEC') or die;

/* Set internal character encoding to UTF-8 */
if (function_exists('mb_internal_encoding')) {
    mb_internal_encoding("UTF-8");
}

use Joomla\CMS\Uri\Uri;

abstract class WFUtility
{
    public static function safe_strpos($string, $needle, $offset = 0)
    {
        if (function_exists('mb_strpos')) {
            return mb_strpos($string, $needle, $offset);
        } else {
            return strpos($string, $needle, $offset);
        }
    }

    public static function safe_substr($string, $start, $length = null)
    {
        if (function_exists('mb_substr')) {
            return mb_substr($string, $start, $length);
        } else {
            return substr($string, $start, $length);
        }
    }

    public static function safe_strlen($string)
    {
        if (function_exists('mb_strlen')) {
            return mb_strlen($string);
        } else {
            return strlen($string);
        }
    }

    /**
     * Multi-byte-safe pathinfo replacement.
     * Drop-in replacement for pathinfo(), but multibyte- and cross-platform-safe.
     *
     * From PHPMailer - https://github.com/PHPMailer/PHPMailer/blob/v6.1.4/src/PHPMailer.php#L4256-L4302
     *
     * @see http://www.php.net/manual/en/function.pathinfo.php#107461
     *
     * @param string     $path    A filename or path, does not need to exist as a file
     * @param int|string $options Either a PATHINFO_* constant,
     *                            or a string name to return only the specified piece
     *
     * @return string|array
     */
    public static function mb_pathinfo($path, $options = null)
    {
        // check if multibyte string, use pathname() if not
        if (function_exists('mb_strlen')) {
            if (mb_strlen($path) === strlen($path)) {
                return pathinfo($path, $options);
            }
        }

        $ret = array('dirname' => '', 'basename' => '', 'extension' => '', 'filename' => '');

        $pathinfo = array();

        if (preg_match('#^(.*?)[\\\\/]*(([^/\\\\]*?)(\.([^.\\\\/]+?)|))[\\\\/.]*$#m', $path, $pathinfo)) {
            if (array_key_exists(1, $pathinfo)) {
                $ret['dirname'] = $pathinfo[1];
            }
            if (array_key_exists(2, $pathinfo)) {
                $ret['basename'] = $pathinfo[2];
            }
            if (array_key_exists(5, $pathinfo)) {
                $ret['extension'] = $pathinfo[5];
            }
            if (array_key_exists(3, $pathinfo)) {
                $ret['filename'] = $pathinfo[3];
            }
        }

        switch ($options) {
            case PATHINFO_DIRNAME:
            case 'dirname':
                return $ret['dirname'];
            case PATHINFO_BASENAME:
            case 'basename':
                return $ret['basename'];
            case PATHINFO_EXTENSION:
            case 'extension':
                return $ret['extension'];
            case PATHINFO_FILENAME:
            case 'filename':
                return $ret['filename'];
            default:
                return $ret;
        }
    }

    /**
     * Get the file extension from a path
     *
     * From libraries/vendor/joomla/filesystem/src/File.php
     * @copyright  Copyright (C) 2005 - 2021 Open Source Matters, Inc. All rights reserved.
     *
     * @param  string $path The file path
     * @param  bool   $lowercase Convert the extension to lowercase
     * @return string The file extension
     */
    public static function getExtension($file, $lowercase = false)
    {
        // String manipulation should be faster than pathinfo() on newer PHP versions.
        $dot = strrpos($file, '.');

        // If no dot is found or it's at the start, return an empty string (no extension)
        if ($dot === false || $dot === 0) {
            return '';
        }

        $ext = substr($file, $dot + 1);

        // Ensure the extension does not contain any slashes or directory separators
        if (strpos($ext, '/') !== false || strpos($ext, DIRECTORY_SEPARATOR) !== false) {
            return '';
        }

        if ($lowercase) {
            $ext = strtolower($ext);
        }

        return $ext;
    }

    /**
     * Remove the extension from a file name or path
     *
     * @param  string $path The file path
     * @return string The file path without the extension
     */
    public static function stripExtension($path)
    {
        return preg_replace('#\.[^.]*$#', '', $path);
    }

    /**
     * Get the file name
     *
     * @param  string $path The file path
     * @return string The file name without the path or extension
     */
    public static function getFilename($path)
    {
        // check if multibyte string, use basename() if not
        if (function_exists('mb_strlen')) {
            if (mb_strlen($path) === strlen($path)) {
                return pathinfo($path, PATHINFO_FILENAME);
            }
        }

        // get basename
        $path = self::mb_basename($path);

        // remove name without extension
        return self::stripExtension($path);
    }

    public static function cleanPath($path, $ds = '/', $prefix = '')
    {
        $path = trim(rawurldecode($path));

        // check for UNC path on IIS and set prefix
        if ($ds == '\\' && strlen($path) > 1) {
            if ($path[0] == '\\' && $path[1] == '\\') {
                $prefix = '\\';
            }
        }

        /// Normalize slashes to forward slashes
        $path = preg_replace('#[/\\\\]+#', $ds, $path);

        // return path with prefix if any
        return $prefix . $path;
    }

    public static function uriToAbsolutePath($url)
    {
        // Get the relative root URL
        $root = Uri::root(true);

        // Make sure JPATH_SITE has a trailing slash
        $base = rtrim(JPATH_SITE, '/');

        // If $url starts with the root URL, replace it with JPATH_SITE
        $path = self::safe_substr($url, 0, self::safe_strlen($root));

        if ($path === $root) {
            $relativePath = self::safe_substr($url, self::safe_strlen($root));

            return self::makePath($base, $relativePath);
        }

        // If no match, return the original URL as it is (or handle accordingly)
        return $url;
    }

    /**
     * Append a DIRECTORY_SEPARATOR to the path if required.
     *
     * @param string $path the path
     * @param string $ds   optional directory seperator
     *
     * @return string path with trailing DIRECTORY_SEPARATOR
     */
    public static function fixPath($path)
    {
        return self::cleanPath($path . '/');
    }

    /**
     * Validates a string for use as a file or folder name or path, ensuring it contains only safe characters.
     *
     * - Disallows null bytes and control characters.
     * - Accepts valid UTF-8 strings with letters, digits, combining marks, and common safe punctuation.
     * - Allows characters: Unicode letters (L), numbers (N), marks (M), space, dot (.), dash (-),
     *   underscore (_), colon (:), forward slash (/), parentheses (), and square brackets [].
     * - Provides a fallback byte-level ASCII check if the string is not valid UTF-8.
     * - Safe for use with both multibyte and legacy ASCII inputs, even if mbstring is not available.
     *
     * @param string $string The input string to validate.
     *
     * @return bool True if the string contains only valid characters, false otherwise.
     */

    private static function checkCharValue($string)
    {
        // Disallow null byte
        if (strpos($string, "\x00") !== false) {
            return false;
        }

        // Try UTF-8 validation if mb_check_encoding() is available
        $isUtf8 = function_exists('mb_check_encoding')
        ? mb_check_encoding($string, 'UTF-8')
        : (bool) preg_match('//u', $string); // minimal UTF-8 validity test

        if ($isUtf8) {
            // Use mb_* if available
            if (function_exists('mb_strlen') && function_exists('mb_substr')) {
                $length = mb_strlen($string, 'UTF-8');

                for ($i = 0; $i < $length; $i++) {
                    $char = mb_substr($string, $i, 1, 'UTF-8');

                    if (!preg_match('#^[\p{L}\p{N}\p{M}\.\-_\:/\(\)\[\] ]$#u', $char)) {
                        return false;
                    }
                }
            } else {
                // No mbstring: use preg_match_all to split into characters
                if (!preg_match_all('/./u', $string, $matches)) {
                    return false;
                }

                foreach ($matches[0] as $char) {
                    if (!preg_match('#^[\p{L}\p{N}\p{M}\.\-_\:/\(\)\[\] ]$#u', $char)) {
                        return false;
                    }
                }
            }
        } else {
            // Fallback: raw byte-level ASCII check
            $length = strlen($string);

            for ($i = 0; $i < $length; $i++) {
                $ord = ord($string[$i]);

                if (
                    $ord < 32 || $ord > 126 ||
                    in_array($ord, [34, 42, 60, 62, 63, 92, 124]) // " * < > ? \ |
                ) {
                    return false;
                }

                if (!(
                    ($ord >= 48 && $ord <= 57) || // 0–9
                    ($ord >= 65 && $ord <= 90) || // A–Z
                    ($ord >= 97 && $ord <= 122) || // a–z
                    in_array($ord, [32, 45, 46, 95, 58, 47, 40, 41, 91, 93]) // allowed symbols
                )) {
                    return false;
                }
            }
        }

        return true;
    }

    /**
     * Validates a relative file or folder path for safe usage.
     *
     * - Decodes the path using urldecode().
     * - Rejects paths containing directory traversal sequences (../).
     * - Delegates character validation to checkCharValue(), ensuring only safe characters are used.
     * - Throws an InvalidArgumentException on failure.
     *
     * Intended for validating UTF-8-safe relative paths, including multibyte directory and file names.
     *
     * @param string $path The relative path to validate (e.g. 'images/ειδήσεις/photo.jpg').
     *
     * @return bool True if the path is valid.
     *
     * @throws InvalidArgumentException If the path contains invalid characters or traversal attempts.
     */

    public static function checkPath($path)
    {
        $path = urldecode($path);

        if (preg_match('#(^|/)\.\.(/|$)#', $path)) {
            throw new InvalidArgumentException('Invalid path traversal');
        }

        if (self::checkCharValue($path) === false) {
            throw new InvalidArgumentException('Invalid path');
        }

        return true;
    }

    /**
     * Concat two paths together. Basically $a + $b.
     *
     * @param string $a  path one
     * @param string $b  path two
     * @param string $ds optional directory seperator
     *
     * @return string $a DIRECTORY_SEPARATOR $b
     */
    public static function makePath($a, $b, $ds = '/')
    {
        return self::cleanPath($a . $ds . $b, $ds);
    }

    /**
     * Converts UTF-8 encoded Latin-based characters with diacritics to their closest ASCII equivalents.
     *
     * - Uses `transliterator_transliterate()` (from the intl extension) if available for broad Unicode support.
     * - Falls back to a static map of pre-defined Latin characters to ASCII equivalents if transliterator is not available.
     * - Handles both single strings and arrays of strings recursively.
     * - Only converts Latin-based accented characters; non-Latin scripts (e.g. Greek, Cyrillic) are not affected unless transliterator is used.
     *
     * Example:
     *   "Crème brûlée" => "Creme brulee"
     *   "Jürgen" => "Jurgen"
     *
     * @param string|array $subject The input string or array of strings to convert.
     *
     * @return string|array The ASCII-transliterated version of the input.
     */
    private static function utf8_latin_to_ascii($subject)
    {
        static $CHARS = null;

        if (is_null($CHARS)) {
            $CHARS = array(
                'À' => 'A',
                'Á' => 'A',
                'Â' => 'A',
                'Ã' => 'A',
                'Ä' => 'A',
                'Å' => 'A',
                'Æ' => 'AE',
                'Ç' => 'C',
                'È' => 'E',
                'É' => 'E',
                'Ê' => 'E',
                'Ë' => 'E',
                'Ì' => 'I',
                'Í' => 'I',
                'Î' => 'I',
                'Ï' => 'I',
                'Ð' => 'D',
                'Ñ' => 'N',
                'Ò' => 'O',
                'Ó' => 'O',
                'Ô' => 'O',
                'Õ' => 'O',
                'Ö' => 'O',
                'Ø' => 'O',
                'Ù' => 'U',
                'Ú' => 'U',
                'Û' => 'U',
                'Ü' => 'U',
                'Ý' => 'Y',
                'ß' => 's',
                'à' => 'a',
                'á' => 'a',
                'â' => 'a',
                'ã' => 'a',
                'ä' => 'a',
                'å' => 'a',
                'æ' => 'ae',
                'ç' => 'c',
                'è' => 'e',
                'é' => 'e',
                'ê' => 'e',
                'ë' => 'e',
                'ì' => 'i',
                'í' => 'i',
                'î' => 'i',
                'ï' => 'i',
                'ñ' => 'n',
                'ò' => 'o',
                'ó' => 'o',
                'ô' => 'o',
                'õ' => 'o',
                'ö' => 'o',
                'ø' => 'o',
                'ù' => 'u',
                'ú' => 'u',
                'û' => 'u',
                'ü' => 'u',
                'ý' => 'y',
                'ÿ' => 'y',
                'Ā' => 'A',
                'ā' => 'a',
                'Ă' => 'A',
                'ă' => 'a',
                'Ą' => 'A',
                'ą' => 'a',
                'Ć' => 'C',
                'ć' => 'c',
                'Ĉ' => 'C',
                'ĉ' => 'c',
                'Ċ' => 'C',
                'ċ' => 'c',
                'Č' => 'C',
                'č' => 'c',
                'Ď' => 'D',
                'ď' => 'd',
                'Đ' => 'D',
                'đ' => 'd',
                'Ē' => 'E',
                'ē' => 'e',
                'Ĕ' => 'E',
                'ĕ' => 'e',
                'Ė' => 'E',
                'ė' => 'e',
                'Ę' => 'E',
                'ę' => 'e',
                'Ě' => 'E',
                'ě' => 'e',
                'Ĝ' => 'G',
                'ĝ' => 'g',
                'Ğ' => 'G',
                'ğ' => 'g',
                'Ġ' => 'G',
                'ġ' => 'g',
                'Ģ' => 'G',
                'ģ' => 'g',
                'Ĥ' => 'H',
                'ĥ' => 'h',
                'Ħ' => 'H',
                'ħ' => 'h',
                'Ĩ' => 'I',
                'ĩ' => 'i',
                'Ī' => 'I',
                'ī' => 'i',
                'Ĭ' => 'I',
                'ĭ' => 'i',
                'Į' => 'I',
                'į' => 'i',
                'İ' => 'I',
                'ı' => 'i',
                'IJ' => 'IJ',
                'ij' => 'ij',
                'Ĵ' => 'J',
                'ĵ' => 'j',
                'Ķ' => 'K',
                'ķ' => 'k',
                'Ĺ' => 'L',
                'ĺ' => 'l',
                'Ļ' => 'L',
                'ļ' => 'l',
                'Ľ' => 'L',
                'ľ' => 'l',
                'Ŀ' => 'L',
                'ŀ' => 'l',
                'Ł' => 'l',
                'ł' => 'l',
                'Ń' => 'N',
                'ń' => 'n',
                'Ņ' => 'N',
                'ņ' => 'n',
                'Ň' => 'N',
                'ň' => 'n',
                'ʼn' => 'n',
                'Ō' => 'O',
                'ō' => 'o',
                'Ŏ' => 'O',
                'ŏ' => 'o',
                'Ő' => 'O',
                'ő' => 'o',
                'Œ' => 'OE',
                'œ' => 'oe',
                'Ŕ' => 'R',
                'ŕ' => 'r',
                'Ŗ' => 'R',
                'ŗ' => 'r',
                'Ř' => 'R',
                'ř' => 'r',
                'Ś' => 'S',
                'ś' => 's',
                'Ŝ' => 'S',
                'ŝ' => 's',
                'Ş' => 'S',
                'ş' => 's',
                'Š' => 'S',
                'š' => 's',
                'Ţ' => 'T',
                'ţ' => 't',
                'Ť' => 'T',
                'ť' => 't',
                'Ŧ' => 'T',
                'ŧ' => 't',
                'Ũ' => 'U',
                'ũ' => 'u',
                'Ū' => 'U',
                'ū' => 'u',
                'Ŭ' => 'U',
                'ŭ' => 'u',
                'Ů' => 'U',
                'ů' => 'u',
                'Ű' => 'U',
                'ű' => 'u',
                'Ų' => 'U',
                'ų' => 'u',
                'Ŵ' => 'W',
                'ŵ' => 'w',
                'Ŷ' => 'Y',
                'ŷ' => 'y',
                'Ÿ' => 'Y',
                'Ź' => 'Z',
                'ź' => 'z',
                'Ż' => 'Z',
                'ż' => 'z',
                'Ž' => 'Z',
                'ž' => 'z',
                'ſ' => 's',
                'ƒ' => 'f',
                'Ơ' => 'O',
                'ơ' => 'o',
                'Ư' => 'U',
                'ư' => 'u',
                'Ǎ' => 'A',
                'ǎ' => 'a',
                'Ǐ' => 'I',
                'ǐ' => 'i',
                'Ǒ' => 'O',
                'ǒ' => 'o',
                'Ǔ' => 'U',
                'ǔ' => 'u',
                'Ǖ' => 'U',
                'ǖ' => 'u',
                'Ǘ' => 'U',
                'ǘ' => 'u',
                'Ǚ' => 'U',
                'ǚ' => 'u',
                'Ǜ' => 'U',
                'ǜ' => 'u',
                'Ǻ' => 'A',
                'ǻ' => 'a',
                'Ǽ' => 'AE',
                'ǽ' => 'ae',
                'Ǿ' => 'O',
                'ǿ' => 'o',
            );
        }

        if (is_array($subject)) {
            foreach ($subject as $i => $string) {
                $subject[$i] = self::utf8_latin_to_ascii($string);
            }

            return $subject;
        }

        if (!is_string($subject)) {
            return $subject;
        }

        if (function_exists('transliterator_transliterate')) {
            $transformed = transliterator_transliterate('Any-Latin; Latin-ASCII;', $subject);

            if ($transformed !== false) {
                return $transformed;
            }
        }

        return strtr($subject, $CHARS);
    }

    /**
     * Changes the case of a string or an array of strings using multibyte-safe functions.
     *
     * Supports 'lowercase' and 'uppercase' case transformations for UTF-8 encoded text.
     * If the input is an array, the transformation is applied recursively to each element.
     * Falls back to returning the original value if mbstring functions are not available.
     *
     * @param string|array $string The input string or array of strings to transform.
     * @param string $case The case to apply: 'lowercase' or 'uppercase'.
     *
     * @return string|array The transformed string or array, or the original input if unsupported.
     */

    protected static function changeCase($string, $case)
    {
        if (!function_exists('mb_strtolower') || !function_exists('mb_strtoupper')) {
            return $string;
        }

        $encoding = 'UTF-8';

        if (is_array($string)) {
            $result = [];

            foreach ($string as $key => $value) {
                $result[$key] = self::changeCase($value, $case);
            }

            return $result;
        }

        switch ($case) {
            case 'lowercase':
                return mb_strtolower($string, $encoding);

            case 'uppercase':
                return mb_strtoupper($string, $encoding);

            default:
                return $string;
        }
    }

    /**
     * Cleans a UTF-8 string by removing disallowed characters.
     *
     * - Strips common punctuation, symbols, brackets, and currency characters.
     * - Preserves only Unicode letters (\p{L}), numbers (\p{N}), space, dot (.), dash (-), and underscore (_).
     * - Returns a cleaned string consisting of readable alphanumeric and structural characters.
     * - Intended for safe output in filenames, slugs, or sanitized text fields.
     *
     * @param string $string The UTF-8 encoded input string to clean.
     * @return string The sanitized UTF-8 string with disallowed characters removed.
     */
    private static function cleanUTF8($string)
    {
        // Remove disallowed ASCII characters (punctuation, symbols)
        // This also removes brackets, currency, etc.
        $string = preg_replace('#[\\\+/\?\#%&<>"\'=\[\]\{\},;@\^\(\)£€$~]#u', '', $string);

        $result = '';
        $length = mb_strlen($string, 'UTF-8');

        for ($i = 0; $i < $length; $i++) {
            $char = mb_substr($string, $i, 1, 'UTF-8');

            // Keep: Unicode letters, numbers, space, dash, underscore, dot
            if (preg_match('#[\p{L}\p{N}\s\.\-_]#u', $char)) {
                $result .= $char;
            }

            // Everything else is skipped
        }

        return $result;
    }

    /**
     * Makes file name safe to use.
     *
     * @param mixed The name of the file (not full path)
     *
     * @return mixed The sanitised string or array
     */
    public static function makeSafe($subject, $mode = 'utf-8', $spaces = '_', $case = '')
    {
        $search = array();

        // set default mode if none is passed in
        if (empty($mode)) {
            $mode = 'utf-8';
        }

        if (!function_exists('mb_internal_encoding')) {
            $mode = 'ascii';
        }

        // trim
        if (is_array($subject)) {
            $subject = array_map('trim', $subject);
        } else {
            $subject = trim($subject);
        }

        // replace spaces with specified character or space
        if (is_string($spaces)) {
            $subject = preg_replace('#[\s ]+#', $spaces, $subject);
        }

        if ($mode === 'utf-8') {
            $search[] = '#[^\pL\pM\pN_\.\-\s ]#u';
        } else {
            $subject = self::utf8_latin_to_ascii($subject);
            $search[] = '#[^a-zA-Z0-9_\.\-\s ]#';
        }

        // remove multiple . characters
        $search[] = '#(\.){2,}#';

        // strip leading period
        $search[] = '#^\.#';

        // strip trailing period
        $search[] = '#\.$#';

        // strip whitespace
        $search[] = '#^\s*|\s*$#';

        // only for utf-8 to avoid PCRE errors - PCRE must be at least version 5
        if ($mode == 'utf-8') {
            try {
                // perform pcre replacement
                $result = preg_replace($search, '', $subject);
            } catch (Exception $e) {
                // try ascii
                return self::makeSafe($subject, 'ascii');
            }

            // try ascii
            if (is_null($result) || $result === false) {
                return self::makeSafe($subject, 'ascii');
            }

            if ($case) {
                // change case
                $result = self::changeCase($result, $case);
            }

            return $result;
        }

        $result = preg_replace($search, '', $subject);

        if ($case) {
            // change case
            $result = self::changeCase($result, $case);
        }

        return $result;
    }

    /**
     * Formats a raw file size (in bytes) as a human-readable string, limited to MB.
     *
     * - Bytes (< 1 KB): formatted as "123 bytes"
     * - Kilobytes (< 1 MB): formatted as "12.34 KB"
     * - Megabytes (≥ 1 MB): formatted as "1.23 MB"
     *
     * @param int $size The file size in bytes.
     * @return string The formatted file size string.
     */
    public static function formatSize($size)
    {
        if ($size < 1024) {
            return $size . ' ' . WFText::_('WF_LABEL_BYTES');
        }

        if ($size < 1048576) { // 1024 * 1024
            return sprintf('%.2f', $size / 1024) . ' ' . WFText::_('WF_LABEL_KB');
        }

        return sprintf('%.2f', $size / 1048576) . ' ' . WFText::_('WF_LABEL_MB');
    }

    /**
     * Convert strftime format to DateTime format.
     *
     * @param string $format The strftime format string.
     *
     * @return string The DateTime format string.
     */
    private static function convertStrftimeToDateTimeFormat($format)
    {
        $replacements = [
            '%d' => 'd', // Day of the month, 2 digits with leading zeros
            '%m' => 'm', // Numeric representation of a month, with leading zeros
            '%Y' => 'Y', // A full numeric representation of a year, 4 digits
            '%y' => 'y', // A two digit representation of a year
            '%H' => 'H', // 24-hour format of an hour with leading zeros
            '%I' => 'h', // 12-hour format of an hour with leading zeros
            '%M' => 'i', // Minutes with leading zeros
            '%S' => 's', // Seconds, with leading zeros
            '%p' => 'A', // UPPER-CASE 'AM' or 'PM' based on the given time
            '%P' => 'a', // lower-case 'am' or 'pm' based on the given time
        ];

        return strtr($format, $replacements);
    }

    /**
     * Format the date.
     *
     * @param int $timestamp the unix timestamp
     * @param string $format the format of the date (default: 'd/m/Y, H:i')
     *
     * @return string formatted date
     */
    public static function formatDate($timestamp = null, $format = 'd/m/Y, H:i')
    {
        $formatDateTime = self::convertStrftimeToDateTimeFormat($format);

        $dateTime = new DateTime();

        if ($timestamp !== null) {
            $dateTime->setTimestamp($timestamp);
        }

        return $dateTime->format($formatDateTime);
    }

    /**
     * Get the modified date of a file.
     *
     * @return Formatted modified date
     *
     * @param string $file Absolute path to file
     */
    public static function getDate($file)
    {
        return self::formatDate(@filemtime($file));
    }

    /**
     * Get the size of a file.
     *
     * @return Formatted filesize value
     *
     * @param string $file Absolute path to file
     */
    public static function getSize($file)
    {
        return self::formatSize(@filesize($file));
    }

    /**
     * Multi-byte-safe dirname replacement.
     * https://gist.github.com/tcyrus/257a1ed93c5e115b7b33426d029b5c5f
     *
     * @param string $path A Path
     * @param int $levels The number of parent directories to go up.
     * @return string The path of a parent directory.
     */
    public static function mb_dirname($path)
    {
        // check if multibyte string, use dirname() if not
        if (function_exists('mb_strlen')) {
            $dir = dirname($path);

            if ($dir == ".") {
                return "";
            }

            return $dir;
        }

        // Normalize the path for non-multibyte environments
        $path = self::cleanPath($path, '/');

        // Get last slash position
        $slash = strrpos($path, '/');

        // If there's no slash in the path, return ''
        if ($slash === false) {
            return "";
        }

        // Return directory part
        $dir = substr($path, 0, $slash);

        // If it's an empty string after substr, then it was a root path
        if ($dir === ".") {
            return "";
        }

        return $dir;
    }

    public static function mb_basename($path, $ext = '')
    {
        // check if multibyte string, use basename() if not
        if (function_exists('mb_strlen')) {
            return basename($path, $ext);
        }

        // clean
        $path = self::cleanPath($path, '/');

        // split path
        $parts = explode('/', $path);

        // return basename
        $path = end($parts);

        if ($ext === '.' . self::getExtension($path)) {
            $path = self::stripExtension($path);
        }

        return $path;
    }

    /**
     * Converts a string to UTF-8 encoding if it's not already UTF-8.
     *
     * - Uses mb_detect_encoding() if available.
     * - Falls back to regex-based UTF-8 detection and utf8_encode() for Latin-1 strings if mbstring is unavailable.
     * - If encoding cannot be determined, returns a sanitized ASCII-only version.
     *
     * @param string $string The input string to normalize.
     * @return string UTF-8 encoded or sanitized string.
     */
    public static function convertEncoding($string)
    {
        if (!function_exists('mb_detect_encoding') || !function_exists('mb_convert_encoding')) {
            // Regex-based UTF-8 detection (W3C)
            $isUTF8 = preg_match('%^(?:
              [\x09\x0A\x0D\x20-\x7E]              # ASCII
            | [\xC2-\xDF][\x80-\xBF]               # non-overlong 2-byte
            |  \xE0[\xA0-\xBF][\x80-\xBF]          # excluding overlongs
            | [\xE1-\xEC\xEE\xEF][\x80-\xBF]{2}    # straight 3-byte
            |  \xED[\x80-\x9F][\x80-\xBF]          # excluding surrogates
            |  \xF0[\x90-\xBF][\x80-\xBF]{2}       # planes 1–3
            | [\xF1-\xF3][\x80-\xBF]{3}            # planes 4–15
            |  \xF4[\x80-\x8F][\x80-\xBF]{2}       # plane 16
        )*$%xs', $string);

            return $isUTF8 ? $string : utf8_encode($string);
        }

        // Try to detect the encoding
        $encoding = mb_detect_encoding($string, ['UTF-8', 'ISO-8859-1', 'Windows-1252', 'ASCII'], true);

        // Return unchanged if already UTF-8
        if ($encoding === 'UTF-8') {
            return $string;
        }

        // If unknown encoding, fallback to stripped ASCII
        if ($encoding === false) {
            return preg_replace('#[^a-zA-Z0-9_\.\-\s ]#u', '', $string);
        }

        // Convert from detected encoding to UTF-8
        return mb_convert_encoding($string, 'UTF-8', $encoding);
    }

    /**
     * Checks whether a string is valid UTF-8.
     *
     * Uses mb_detect_encoding() if available; otherwise falls back to a strict UTF-8 pattern check.
     * Designed for safe operation even in environments without mbstring.
     *
     * @param string $string The input string to validate.
     * @return bool True if the string is valid UTF-8, false otherwise.
     */
    public static function isUtf8($string)
    {
        if (!function_exists('mb_detect_encoding')) {
            return (bool) preg_match(
                '%^(?:
                [\x09\x0A\x0D\x20-\x7E]              # ASCII
              | [\xC2-\xDF][\x80-\xBF]               # non-overlong 2-byte
              |  \xE0[\xA0-\xBF][\x80-\xBF]          # excluding overlongs
              | [\xE1-\xEC\xEE\xEF][\x80-\xBF]{2}    # straight 3-byte
              |  \xED[\x80-\x9F][\x80-\xBF]          # excluding surrogates
              |  \xF0[\x90-\xBF][\x80-\xBF]{2}       # planes 1-3
              | [\xF1-\xF3][\x80-\xBF]{3}            # planes 4-15
              |  \xF4[\x80-\x8F][\x80-\xBF]{2}       # plane 16
            )*$%xs',
                $string
            );
        }

        return mb_detect_encoding($string, 'UTF-8', true);
    }

    /**
     * Converts a human-readable size value (e.g., "2M", "512k", "1G") to bytes.
     *
     * Supports the following unit suffixes (case-insensitive):
     * - K (kilobytes)
     * - M (megabytes)
     * - G (gigabytes)
     *
     * If no unit is specified, the value is assumed to be in bytes.
     *
     * @param string|int $value The size value to convert (e.g., "2M", "1024").
     * @return int Size in bytes.
     */
    public static function convertSize($value)
    {
        $value = trim((string) $value);
        $unit = '';

        if (preg_match('#([\d\.]+)\s*([a-z]*)#i', $value, $matches)) {
            $value = floatval($matches[1]);
            $unit = strtolower(substr($matches[2], 0, 1));
        }

        switch ($unit) {
            case 'g':
                $value *= 1073741824; // 1024^3
                break;
            case 'm':
                $value *= 1048576; // 1024^2
                break;
            case 'k':
                $value *= 1024; // 1024^1
                break;
        }

        return (int) $value;
    }

    /**
     * Checks an upload for suspicious naming, potential PHP contents, valid image and HTML tags.
     */
    public static function isSafeFile($file)
    {
        // null byte check
        if (strstr($file['name'], "\x00")) {
            @unlink($file['tmp_name']);
            throw new InvalidArgumentException('Invalid file: The file name contains a null byte.');
        }

        // check name for invalid extensions
        if (self::validateFileName($file['name']) === false) {
            @unlink($file['tmp_name']);
            throw new InvalidArgumentException('Invalid file: The file name contains an invalid extension.');
        }

        // check file for <?php tags
        $fp = @fopen($file['tmp_name'], 'r');

        if ($fp !== false) {
            $data = '';

            while (!feof($fp)) {
                $data .= @fread($fp, 131072);
                // we can only reliably check for the full <?php tag here (short tags conflict with valid exif xml data), so users are reminded to disable short_open_tag
                if (stripos($data, '<?php') !== false) {
                    @unlink($file['tmp_name']);
                    throw new InvalidArgumentException('Invalid file: The file contains PHP code.');
                }

                // check for `__HALT_COMPILER()` phar stub
                if (stripos($data, '__HALT_COMPILER()') !== false) {
                    @unlink($file['tmp_name']);
                    throw new InvalidArgumentException('Invalid file: The file contains PHP code.');
                }

                $data = substr($data, -10);
            }

            fclose($fp);
        }

        // Get the file extension
        $extension = self::getExtension($file['name'], true);

        // Check if the file extension is a common image
        $isImage = in_array($extension, ['jpeg', 'jpg', 'jpe', 'png', 'apng', 'gif', 'bmp', 'tiff', 'tif', 'webp', 'psd', 'ico', 'xcf', 'odg'], true);

        // validate image
        if ($isImage && @getimagesize($file['tmp_name']) === false) {
            @unlink($file['tmp_name']);
            throw new InvalidArgumentException('Invalid file: The file is not a valid image.');
        }

        return true;
    }

    /**
     * Check file name for extensions.
     *
     * @param type $name
     *
     * @return bool
     */
    public static function validateFileName($name)
    {
        if (empty($name) && (string) $name !== "0") {
            return false;
        }

        // first character is a dot
        if ($name[0] === '.') {
            return false;
        }

        // lowercase it
        $name = strtolower($name);

        // remove multiple . characters
        $name = preg_replace('#(\.){2,}#', '.', $name);

        // list of invalid extensions
        $executable = array(
            'php',
            'php3',
            'php4',
            'php5',
            'php6',
            'php7',
            'phar',
            'js',
            'exe',
            'phtml',
            'java',
            'perl',
            'py',
            'asp',
            'dll',
            'go',
            'ade',
            'adp',
            'bat',
            'chm',
            'cmd',
            'com',
            'cpl',
            'hta',
            'ins',
            'isp',
            'jse',
            'lib',
            'mde',
            'msc',
            'msp',
            'mst',
            'pif',
            'scr',
            'sct',
            'shb',
            'sys',
            'vb',
            'vbe',
            'vbs',
            'vxd',
            'wsc',
            'wsf',
            'wsh',
            'svg',
        );

        // get file parts, eg: ['image', 'php', 'jpg']
        $parts = explode('.', $name);

        // remove extension
        array_pop($parts);

        // remove name
        array_shift($parts);

        // trim each $parts
        $parts = array_map('trim', $parts);

        // no extensions in file name
        if (empty($parts)) {
            return true;
        }

        // check for extension in file name, eg: image.php.jpg
        foreach ($executable as $extension) {
            if (in_array($extension, $parts)) {
                return false;
            }
        }

        return true;
    }

    /**
     * Method to determine if an array is an associative array.
     *
     * @param    array        An array to test
     *
     * @return bool True if the array is an associative array
     *
     * @link    https://www.php.net/manual/en/function.is-array.php#84488
     */
    public static function is_associative_array($array)
    {
        if (!is_array($array)) {
            return false;
        }

        $i = count($array);

        while ($i > 0) {
            if (!array_key_exists(--$i, $array)) {
                return true;
            }
        }

        return false;
    }

    public static function isJson($value)
    {
        // value must be a string
        if (!$value || !is_string($value)) {
            return false;
        }

        // trim
        $value = trim($value);

        if (!$value) {
            return false;
        }

        // quick syntax check
        if ($value[0] !== '{' && $value[0] !== '[') {
            return false;
        }

        // full check using json_decode
        json_decode($value);
        return json_last_error() == JSON_ERROR_NONE;
    }

    /**
     * array_merge_recursive does indeed merge arrays, but it converts values with duplicate
     * keys to arrays rather than overwriting the value in the first array with the duplicate
     * value in the second array, as array_merge does. I.e., with array_merge_recursive,
     * this happens (documented behavior):.
     *
     * array_merge_recursive(array('key' => 'org value'), array('key' => 'new value'));
     *     => array('key' => array('org value', 'new value'));
     *
     * array_merge_recursive_distinct does not change the datatypes of the values in the arrays.
     * Matching keys' values in the second array overwrite those in the first array, as is the
     * case with array_merge, i.e.:
     *
     * array_merge_recursive_distinct(array('key' => 'org value'), array('key' => 'new value'));
     *     => array('key' => array('new value'));
     *
     * Parameters are passed by reference, though only for performance reasons. They're not
     * altered by this function.
     *
     * @param array $array1
     * @param array $array2
     * @param boolean $ignore_empty_string
     *
     * @return array
     *
     * @author Daniel <daniel (at) danielsmedegaardbuus (dot) dk>
     * @author Gabriel Sobrinho <gabriel (dot) sobrinho (at) gmail (dot) com>
     */
    public static function array_merge_recursive_distinct(array $array1, array $array2, $ignore_empty_string = false)
    {
        $merged = $array1;

        foreach ($array2 as $key => $value) {
            if (self::is_associative_array($value) && array_key_exists($key, $merged) && self::is_associative_array($merged[$key])) {
                $merged[$key] = self::array_merge_recursive_distinct($merged[$key], $value, $ignore_empty_string);
            } else {
                if (is_null($value)) {
                    continue;
                }

                if (array_key_exists($key, $merged) && $ignore_empty_string && $value === "") {
                    continue;
                }

                $merged[$key] = $value;
            }
        }

        return $merged;
    }

    /**
     * Return a list of allowed file extensions in a specific format.
     *
     * @param string $format The desired format of the output ('map', 'array', 'list', 'json').
     * @param string $list String of file types to format.
     * @return mixed Formatted extension list.
     */
    public static function formatFileTypesList($format = 'map', $list = '')
    {
        $data = array();

        // Split the list into groups separated by ';'
        foreach (explode(';', $list) as $group) {
            // Exclude group if it starts with '-'
            if (strpos($group, '=') !== false && strpos($group, '-') === 0) {
                continue;
            }

            // Split the group into type and items parts
            $parts = explode('=', $group);
            // Get the extensions, e.g., "jpg,gif,png"
            $items = array_pop($parts);
            // Get the type if available, e.g., "images"
            $type = array_pop($parts);

            // Filter and map items, excluding any that start with '-'
            $items = array_filter(explode(',', $items), function ($item) {
                return substr(trim($item), 0, 1) !== '-';
            });

            // If no type is specified, handle as a flat list
            if (empty($type)) {
                $data = array_merge($data, $items);
            } else {
                // Create flattened array if format is 'array' or 'list'
                if ($format === 'array' || $format === 'list') {
                    $data = array_merge($data, array_map('strtolower', $items));
                } else {
                    // Create associative array, e.g., ["images" => ["jpg", "jpeg", "gif", "png"]]
                    if (!isset($data[$type])) {
                        $data[$type] = array();
                    }
                    $data[$type] = array_merge($data[$type], array_map('strtolower', $items));
                }
            }
        }

        // Return flattened list of extensions, e.g., "jpg,jpeg,png,gif"
        if ($format === 'list') {
            return implode(',', array_unique($data));
        }

        // Return JSON encoded list, e.g., {"images": ["jpg", "jpeg", "gif", "png"]}
        if ($format === 'json') {
            return json_encode($data);
        }

        // Return array, ensure uniqueness and maintain structure for 'map' format
        if ($format === 'array') {
            return array_unique($data);
        }

        // Default return associative array ('map' format)
        foreach ($data as $key => $value) {
            $data[$key] = array_unique($value);
        }

        return $data;
    }
}
libraries/classes/language.php000060400000003564152455721620012466 0ustar00<?php
/**
 * @package     JCE
 * @subpackage  Editor
 *
 * @copyright   Copyright (C) 2005 - 2020 Open Source Matters, Inc. All rights reserved.
 * @copyright   Copyright (c) 2009-2024 Ryan Demmer. All rights reserved
 * @license     GNU General Public License version 2 or later; see LICENSE.txt
 */

\defined('_JEXEC') or die;

use Joomla\CMS\Factory;

abstract class WFLanguage
{
    /* Map language code to generic tag */
    protected static $map = array(
        'de' => 'de-DE',
        'fr' => 'fr-FR',
    );

    /*
     * Check a language file exists and is the correct version
     */
    protected static function isValid($tag)
    {
        return file_exists(JPATH_SITE . '/language/' . $tag . '/' . $tag . '.com_jce.ini');
    }

    /**
     * Return the curernt language code.
     *
     * @return language code
     */
    public static function getDir()
    {
        return Factory::getLanguage()->isRTL() ? 'rtl' : 'ltr';
    }

    /**
     * Return the curernt language code.
     *
     * @return language code
     */
    public static function getTag()
    {
        $tag = Factory::getLanguage()->getTag();

        $code = substr($tag, 0, strpos($tag, '-'));

        if (array_key_exists($code, self::$map)) {
            $tag = self::$map[$code];
        }

        if (false == self::isValid($tag)) {
            return 'en-GB';
        }

        return $tag;
    }

    /**
     * Return the curernt language code.
     *
     * @return language code
     */
    public static function getCode()
    {
        $tag = self::getTag();

        return substr($tag, 0, strpos($tag, '-'));
    }

    /**
     * Load a language file.
     *
     * @param string $prefix         Language prefix
     * @param object $path[optional] Base path
     */
    public static function load($prefix, $path = JPATH_SITE)
    {
        Factory::getLanguage()->load($prefix, $path);
    }
}
libraries/classes/linkhelper.php000060400000005370152455721620013035 0ustar00<?php

/**
 * @package     JCE
 * @subpackage  Editor
 *
 * @copyright   Copyright (C) 2005 - 2020 Open Source Matters, Inc. All rights reserved.
 * @copyright   Copyright (c) 2009-2024 Ryan Demmer. All rights reserved
 * @license     GNU General Public License version 2 or later; see LICENSE.txt
 */

\defined('_JEXEC') or die;

use Joomla\CMS\Factory;

abstract class WFLinkHelper
{
    /**
     * Translates an internal Joomla URL to a humanly readible URL.
     *
     * @param string $url Absolute or Relative URI to Joomla resource
     *
     * @return The translated humanly readible URL
     */
    public static function route($url)
    {
        $app = Joomla\CMS\Application\CMSApplication::getInstance('site');
        $router = $app->getRouter('site');

        if (!$router) {
            return $url;
        }

        $uri = $router->build($url);
        $url = $uri->toString();
        $url = str_replace('/administrator/', '/', $url);

        return $url;
    }

    private static function getDefaultItemId()
    {
        // get menus
        $menus = Factory::getApplication()->getMenu('site');

        // get "default" menu
        $default = $menus->getDefault();

        return $default ? (int) $default->id : 0;
    }

    public static function removeAlias($url)
    {
        // Only strip alias after a numeric ID (e.g. id=1:article-alias)
        $url = preg_replace('#(?<=\d):[\w-]+#u', '', $url);

        return $url;
    }

    private static function parseQueryVars($url)
    {
        $parsed = parse_url($url, PHP_URL_QUERY);
        $parsed = str_replace('&amp;', '&', $parsed);
        parse_str($parsed, $vars);
        return $vars;
    }

    public static function removeItemId($url)
    {
        if (strpos($url, 'Itemid') === false) {
            return $url;
        }

        $vars = self::parseQueryVars($url);

        if (!array_key_exists('Itemid', $vars)) {
            return $url;
        }

        // only remove the Itemid if it is not the only query value
        if (count($vars) === 1) {
            return $url;
        }

        // remove the itemid
        unset($vars['Itemid']);

        // rebuild the query string, preserving colons (valid in query values)
        $query = str_replace('%3A', ':', http_build_query($vars));

        return 'index.php?' . $query;
    }

    public static function removeHomeItemId($url)
    {
        if (strpos($url, 'Itemid') === false) {
            return $url;
        }

        $vars = self::parseQueryVars($url);

        if (!array_key_exists('Itemid', $vars)) {
            return $url;
        }

        $defaultId = self::getDefaultItemId();

        if ((int) $defaultId === (int) $vars['Itemid']) {
            $url = self::removeItemId($url);
        }

        return $url;
    }
}
libraries/classes/extensions.php000060400000021730152455721620013075 0ustar00<?php

/**
 * @package     JCE
 * @subpackage  Editor
 *
 * @copyright   Copyright (C) 2005 - 2020 Open Source Matters, Inc. All rights reserved.
 * @copyright   Copyright (c) 2009-2024 Ryan Demmer. All rights reserved
 * @license     GNU General Public License version 2 or later; see LICENSE.txt
 */

\defined('_JEXEC') or die;

use Joomla\CMS\Factory;
use Joomla\Filesystem\File;
use Joomla\Filesystem\Folder;
use Joomla\CMS\Object\CMSObject;
use Joomla\CMS\Plugin\PluginHelper;

class WFExtension extends CMSObject
{
    /**
     * Constructor activating the default information of the class.
     */
    public function __construct($config = array())
    {
        parent::__construct();

        // set extension properties
        $this->setProperties($config);
    }

    /**
     * Returns a reference to a WFExtension object.
     *
     * This method must be invoked as:
     *    <pre>  $extension = WFExtension::getInstance();</pre>
     *
     * @return object WFExtension
     */
    /* public static function getInstance()
    {
    static $instance;

    if (!is_object($instance)) {
    $instance = new WFExtension();
    }
    return $instance;
    } */

    /**
     * Display the extension.
     */
    public function display() {}

    /**
     * Load a plugin extension.
     *
     * @return array
     */
    private static function _load($types = array(), $extension = null, $config = array())
    {
        $language = Factory::getLanguage();

        $extensions = array();

        if (!isset($config['base_path'])) {
            $config['base_path'] = WF_EDITOR;
        }

        // core extensions path
        $path = $config['base_path'] . '/extensions';

        // cast as array
        $types = (array) $types;

        // get all installed plugins
        $installed = PluginHelper::getPlugin('jce');

        if (!empty($installed)) {
            foreach ($installed as $item) {
                // check for delimiter, only load "extensions"
                if (!preg_match('/[-_]/', $item->name) || preg_match('/^editor[-_]/', $item->name)) {
                    continue;
                }

                $p = clone $item;

                // set path
                $p->path = JPATH_PLUGINS . '/jce/' . $p->name;

                // get type and name
                list($p->folder, $p->extension) = preg_split('/[-_]/', $p->name, 2);

                // load the correct type if set
                if (!empty($types) && !in_array($p->folder, $types)) {
                    continue;
                }

                // specific extension
                if ($extension && $p->extension !== $extension) {
                    continue;
                }

                $language->load('plg_jce_' . $p->name, JPATH_ADMINISTRATOR);
                $language->load('plg_jce_' . $p->name, $p->path);

                // add to array
                $extensions[$p->extension] = $p;
            }
        }

        // get legacy extensions
        $legacy = Folder::folders(WF_EDITOR . '/extensions', '.', false, true);

        $core = array(
            'aggregator' => array(
                'dailymotion',
                'vimeo',
                'youtube',
            ),
            'filesystem' => array(
                'joomla',
            ),
            'links' => array(
                'joomlalinks',
            ),
            'popups' => array(
                'jcemediabox',
            ),
            'search' => array(
                'link',
            ),
        );

        foreach ($legacy as $item) {
            $type = basename($item);

            // unknown type
            if (array_key_exists($type, $core) === false) {
                continue;
            }

            // load the correct type if set
            if (!empty($types) && !in_array($type, $types)) {
                continue;
            }

            // specific extension
            if ($extension && !is_file($item . '/' . $extension . '.php')) {
                continue;
            }

            if (!empty($extension)) {
                // already loaded as Joomla plugin
                if (isset($extensions[$extension])) {
                    continue;
                }

                $files = array($item . '/' . $extension . '.xml');
            } else {
                $files = Folder::files($item, '\.xml$', false, true);
            }

            foreach ($files as $file) {
                $extension = basename($file, '.xml');

                // unknown extension
                if (!in_array($extension, $core[$type])) {
                    continue;
                }

                $object = new stdClass();
                $object->folder = $type;
                $object->path = dirname($file);
                $object->extension = $extension;

                if (!isset($extensions[$extension])) {
                    $extensions[$extension] = $object;
                }
            }
        }

        return $extensions;
    }

    /**
     * Load & Call an extension.
     *
     * @param array $config
     *
     * @return mixed
     */
    public static function loadExtensions($type, $extension = null, $config = array())
    {
        if (!isset($config['base_path'])) {
            $config['base_path'] = WF_EDITOR;
        }

        // sanitize $type
        $type = preg_replace('#[^A-Z0-9\._-]#i', '', $type);

        // sanitize $extension
        if ($extension) {
            $extension = preg_replace('#[^A-Z0-9\._-]#i', '', $extension);
        }

        // Get all extensions
        $extensions = self::_load((array) $type, $extension, $config);

        $result = array();

        if (!empty($extensions)) {
            foreach ($extensions as $item) {
                $name = isset($item->extension) ? $item->extension : '';

                $type = $item->folder;
                $path = $item->path;

                if ($name) {
                    $root = $path . '/' . basename($path) . '.php';

                    // store name in item object
                    $item->name = $name;

                    // legacy - clean defined path for Windows!!
                    if (WFUtility::cleanPath(dirname($path)) === WFUtility::cleanPath(WF_EDITOR_EXTENSIONS)) {
                        $root = $path . '/' . $name . '.php';
                        // redefine path
                        $item->path = $path . '/' . $name;
                    }

                    if (is_dir($path . '/src')) {
                        $root = $path . '/src/' . $type . '.php';
                    }

                    if (file_exists($root)) {
                        // Load root extension file
                        require_once $root;

                        // Return array of extension names
                        $result[$type][] = $item;

                        // if we only want a named extension
                        if ($extension && $extension == $name) {
                            return $item;
                        }
                    }
                }
            }
        }

        // only return extension types requested
        if ($type && array_key_exists($type, $result)) {
            return $result[$type];
        }

        // Return array or extension name
        return $result;
    }

    /**
     * Return a parameter for the current plugin / group.
     *
     * @param object $key   Parameter name
     * @param object $default Default value
     *
     * @return string Parameter value
     */
    public function getParam($key, $default = '')
    {
        $wf = WFApplication::getInstance();

        return $wf->getParam($key, $default);
    }

    public function getView($options = array())
    {
        return new WFView($options);
    }

    protected function getCustomDefaultAttributes($data)
    {
        $custom = array();

        if (is_string($data)) {
            $data = html_entity_decode($data);
            $data = json_decode($data, true);
        }

        // Remove values with invalid key, must be indexed array
        $data = array_filter($data, function ($value, $key) {
            return is_numeric($key) && $value != "";
        }, ARRAY_FILTER_USE_BOTH);

        foreach ($data as $attribute) {
            if (empty($attribute)) {
                continue;
            }

            $name = '';
            $value = '';

            // json associative array
            if (is_array($attribute) && array_key_exists('name', $attribute)) {
                extract($attribute);
            }

            if ($name && $value !== '') {
                $value = trim($value, " \t\n\r\0\x0B'\"");
                $value = htmlspecialchars($value, ENT_QUOTES, 'UTF-8');

                $custom[$name] = $value;
            }
        }

        // remove empty values
        $custom = array_filter($custom, function ($value) {
            return $value !== '';
        });

        // remove invalid keys
        $custom = array_filter($custom, function ($key) {
            return preg_match('/^[a-zA-Z0-9\-_]+$/', $key);
        }, ARRAY_FILTER_USE_KEY);

        return $custom;
    }
}
libraries/classes/devicedetect.php000060400000010226152455721620013324 0ustar00<?php

/**
 * @package     JCE
 * @subpackage  Editor
 *
 * @copyright   Copyright (c) 2009-2026 Ryan Demmer. All rights reserved
 * @license     GNU General Public License version 2 or later; see LICENSE.txt
 */

\defined('_JEXEC') or die;

/**
 * Minimal device detection: phone / tablet / desktop
 * - Uses UA heuristics only (optionally you can pass Client Hints headers)
 * - Not meant for security decisions; only UI/UX branching
 */
final class WFDeviceDetect
{
    /** @var string */
    private $ua;

    /** @var array<string, string> */
    private $headers;

    public function __construct($userAgent = null, $headers = null)
    {
        $this->ua = \is_string($userAgent) ? $userAgent : (isset($_SERVER['HTTP_USER_AGENT']) ? (string) $_SERVER['HTTP_USER_AGENT'] : '');
        $this->headers = \is_array($headers) ? $headers : $this->readHeaders();
    }

    public function isPhone()
    {
        return $this->deviceType() === 'phone';
    }

    public function isTablet()
    {
        return $this->deviceType() === 'tablet';
    }

    public function isMobile()
    {
        $t = $this->deviceType();
        return ($t === 'phone' || $t === 'tablet');
    }

    /**
     * @return string 'phone'|'tablet'|'desktop'
     */
    public function deviceType()
    {
        $ua = $this->ua;

        // 1) Client hint: Sec-CH-UA-Mobile: ?1 / ?0 (Chromium)
        // This indicates "mobile", but not "tablet". Still useful as a signal.
        $chMobile = $this->header('sec-ch-ua-mobile');

        if ($chMobile !== '') {
            // If it's explicitly not mobile, likely desktop.
            if (strpos($chMobile, '?0') !== false) {
                return 'desktop';
            }
            // If mobile, we still need to decide phone vs tablet via UA heuristics.
        }

        // 2) Tablets first (avoid misclassifying as phone)
        if ($this->isIPad($ua)) {
            return 'tablet';
        }

        if ($this->isAndroidTablet($ua)) {
            return 'tablet';
        }

        // Some common tablet tokens
        if ($this->match($ua, '(tablet|kindle|silk|playbook|nexus\s(7|9|10)|sm-t\d+)')) {
            return 'tablet';
        }

        // 3) Phones
        if ($this->match($ua, '(mobi|iphone|ipod|windows\sphone|blackberry|bb10)')) {
            return 'phone';
        }

        if ($this->isAndroidPhone($ua)) {
            return 'phone';
        }

        // 4) Default
        return 'desktop';
    }

    private function isIPad($ua)
    {
        // Classic iPad
        if (stripos($ua, 'iPad') !== false) {
            return true;
        }

        // iPadOS 13+: often reports as Macintosh; include "Mobile" when in mobile mode
        // Common heuristic: Macintosh + Mobile + Safari => iPad
        if (stripos($ua, 'Macintosh') !== false && stripos($ua, 'Mobile') !== false) {
            return true;
        }

        return false;
    }

    private function isAndroidTablet($ua)
    {
        // Android tablet typically has "Android" but NOT "Mobile"
        return (stripos($ua, 'Android') !== false && stripos($ua, 'Mobile') === false);
    }

    private function isAndroidPhone($ua)
    {
        // Android phone typically has Android + Mobile
        return (stripos($ua, 'Android') !== false && stripos($ua, 'Mobile') !== false);
    }

    private function match($ua, $pattern)
    {
        return (bool) preg_match('#' . $pattern . '#i', $ua);
    }

    private function header($name)
    {
        $key = strtolower($name);
        return isset($this->headers[$key]) ? $this->headers[$key] : '';
    }

    private function readHeaders()
    {
        $out = array();

        foreach ($_SERVER as $k => $v) {
            if (!\is_string($v)) {
                continue;
            }

            // Convert HTTP_FOO_BAR to foo-bar
            if (strpos($k, 'HTTP_') === 0) {
                $name = strtolower(str_replace('_', '-', substr($k, 5)));
                $out[$name] = $v;
            }
        }

        // Some servers expose these differently
        if (isset($_SERVER['CONTENT_TYPE']) && \is_string($_SERVER['CONTENT_TYPE'])) {
            $out['content-type'] = $_SERVER['CONTENT_TYPE'];
        }

        return $out;
    }
}libraries/classes/plugin.php000060400000045230152455721620012175 0ustar00<?php
/**
 * @package     JCE
 * @subpackage  Editor
 *
 * @copyright   Copyright (C) 2005 - 2020 Open Source Matters, Inc. All rights reserved.
 * @copyright   Copyright (c) 2009-2024 Ryan Demmer. All rights reserved
 * @license     GNU General Public License version 2 or later; see LICENSE.txt
 */

\defined('_JEXEC') or die;

use Joomla\CMS\Factory;
use Joomla\CMS\Form\Form;
use Joomla\CMS\Language\Text;
use Joomla\CMS\Object\CMSObject;
use Joomla\CMS\Session\Session;
use Joomla\CMS\Uri\Uri;

/**
 * JCE class.
 */
class WFEditorPlugin extends CMSObject
{
    // Editor Plugin instance
    private static $instance;

    // array of alerts
    private $_alerts = array();

    // plugin name
    protected $name = '';

    /**
     * Constructor activating the default information of the class.
     */
    public function __construct($config = array())
    {
        // Call parent
        parent::__construct();

        // get plugin name from url, fallback to default name if set
        $name = Factory::getApplication()->input->getCmd('plugin', $this->get('name'));

        // get name and caller from plugin name
        if (strpos($name, '.') !== false) {
            list($name, $caller) = explode('.', $name);

            // validate then store caller
            if ($caller !== $name) {

                $profile = $this->getProfile();

                if (!empty($profile)) {
                    if (in_array($caller, explode(',', $profile->plugins))) {
                        $this->set('caller', $caller);
                    }
                }
            }
        }

        // re-set the "name" value
        $this->set('name', $name);

        if (!array_key_exists('base_path', $config)) {
            $config['base_path'] = WF_EDITOR_PLUGINS . '/' . $name;
        }

        if (!defined('WF_EDITOR_PLUGIN')) {
            define('WF_EDITOR_PLUGIN', $config['base_path']);
        }

        if (!array_key_exists('view_path', $config)) {
            $config['view_path'] = $config['base_path'];
        }

        if (!array_key_exists('layout', $config)) {
            $config['layout'] = 'default';
        }

        if (!array_key_exists('template_path', $config)) {
            $config['template_path'] = $config['base_path'] . '/tmpl';
        }

        $this->setProperties($config);
    }

    /**
     * Returns a reference to a editor object.
     *
     * This method must be invoked as:
     *         <pre>  $browser =JCE::getInstance();</pre>
     *
     * @return JCE The editor object
     *
     * @since    1.5
     */
    public static function getInstance($config = array())
    {
        if (!isset(self::$instance)) {
            self::$instance = new self($config);
        }

        return self::$instance;
    }

    /**
     * Get plugin View.
     *
     * @return WFView
     */
    public function getView()
    {
        static $view;

        if (!is_object($view)) {

            // create plugin view
            $view = new WFView(array(
                'view_path' => $this->get('base_path'),
                'template_path' => $this->get('template_path'),
                'name' => $this->get('name'),
                'layout' => $this->get('layout')
            ));
        }

        $view->plugin = $this;

        return $view;
    }

    protected function getVersion()
    {
        $wf = WFApplication::getInstance();

        return $wf->getVersion();
    }

    protected function getProfile($plugin = '')
    {
        $wf = WFApplication::getInstance();

        $options = array(
            'plugin' => $plugin
        );

        // get all profiles
        return $wf->getActiveProfile($options);
    }

    protected function getPluginVersion()
    {
        $manifest = $this->get('base_path') . '/' . $this->get('name') . '.xml';

        $version = '';

        if (is_file($manifest)) {
            $version = md5_file($manifest);
        }

        return $version;
    }

    protected function isRtl()
    {
        $language = Factory::getLanguage();

        if ($language->getTag() === WFLanguage::getTag()) {
            return $language->isRTL();
        }

        return false;
    }

    protected function initialize()
    {
        $app = Factory::getApplication();
        $wf = WFApplication::getInstance();

        $version = $this->getVersion();
        $name = $this->getName();

        // set default plugin version
        $plugin_version = $this->getPluginVersion();

        // add plugin version
        if ($plugin_version && $plugin_version != $version) {
            $version .= $plugin_version;
        }

        // default ui theme
        $theme = 'light';

        // get editor theme
        $editor_theme = $wf->getParam('editor.toolbar_theme', 'modern');

        // set ui theme variant
        if ($editor_theme == 'modern.dark') {
            $theme = 'dark';
        }

        // create the document
        $document = WFDocument::getInstance(array(
            'version' => $version,
            'title' => Text::_('WF_' . strtoupper($this->getName() . '_TITLE')),
            'name' => $name,
            'language' => WFLanguage::getTag(),
            'direction' => $this->isRtl() ? 'rtl' : 'ltr',
            'compress_javascript' => $this->getParam('editor.compress_javascript', 0),
            'compress_css' => $this->getParam('editor.compress_css', 0),
            'theme' => 'uk-jce-theme-' . $theme
        ));

        // set standalone mode
        $document->set('standalone', $wf->input->getInt('standalone', 0));

        Factory::getApplication()->triggerEvent('onWfPluginInit', array($this));
    }

    public function execute($task)
    {
        if ($task == 'loadlanguages') {
            return $this->loadlanguages();
        }
        
        $this->initialize();

        // process requests if any - method will end here
        WFRequest::getInstance()->process();

        $this->display();

        $document = WFDocument::getInstance();

        $query = array(
            'task' => 'plugin.loadlanguages', 
            'lang' => WFLanguage::getCode()
        );

        // ini language
        $document->addScript(
            Uri::base(true) . '/index.php?option=com_jce&' . $document->getQueryString($query), 'joomla'
        );

        // pack assets if required
        $document->pack(true, $this->getParam('editor.compress_gzip', 0));

        // get the view
        $view = $this->getView();

        // set body output
        $document->setBody($view->loadTemplate());

        $document->render();
    }

    protected function loadlanguages()
    {
        $name = $this->get('name');

        $parser = new WFLanguageParser(array(
            'plugins' => array('core' => array($name), 'external' => array()),
            'sections' => array('dlg', $name . '_dlg', 'colorpicker'),
            'mode' => 'plugin',
            'language' => WFLanguage::getTag(),
        ));

        $data = $parser->load();
        $parser->output($data);
    }

    /**
     * Display plugin.
     */
    public function display()
    {
        // check session on get request
        Session::checkToken('get') or jexit(Text::_('JINVALID_TOKEN'));

        $this->initialize();

        $document = WFDocument::getInstance();

        if ($document->get('standalone') == 0) {
            $document->addScript(array('tinymce.popup'), 'tinymce');
        }

        $document->addScript(array('jquery.min'), 'jquery');
        $document->addScript(array('jquery-ui.min'), 'jquery');

        $document->addScript(array('plugin.min.js'));
        $document->addStyleSheet(array('plugin.min.css'), 'media');

        // add custom plugin.css if exists
        if (is_file(JPATH_SITE . '/media/jce/css/plugin.css')) {
            $document->addStyleSheet(array('media/jce/css/plugin.css'), 'joomla');
        }

        Factory::getApplication()->triggerEvent('onWfPluginDisplay', array($this));
    }

    /**
     * Return the plugin name.
     *
     * @return string
     */
    public function getName()
    {
        return $this->get('name');
    }

    /**
     * Return the plugin name.
     *
     * @return string
     */
    public function getCaller()
    {
        return $this->get('caller');
    }

    /**
     * Get default values for a plugin.
     * Key / Value pairs will be retrieved from the profile or plugin manifest.
     *
     * @param array $defaults
     *
     * @return array
     */
    public function getDefaults($fieldset = 'defaults', $options = array())
    {
        $name = $this->getName();
        $caller = $this->get('caller');

        if ($caller) {
            $name = $caller;
        }

        $defaults = array();
        $exclude = array();

        if (isset($options['defaults'])) {
            $defaults = $options['defaults'];
        }

        if (isset($options['exclude'])) {
            $exclude = $options['exclude'];
        }

        // get manifest path
        $manifest = $this->get('base_path') . '/' . $name . '.xml';

        // use the plugin name as the form
        $form_id = $name;

        // parameter group
        if (isset($options['group'])) {
            $name .= '.' . $options['group'];
        }

        if (isset($options['manifest'])) {
            $manifest = $options['manifest'];
            // create extension specific form id
            $form_id .= '.' . basename($manifest, '.xml');
        }

        // exclude custom attributes
        $exclude[] = 'attributes';

        // get parameter defaults
        if (is_file($manifest)) {
            $form = Form::getInstance('com_jce.plugin.' . $form_id, $manifest, array('load_data' => false), true, '//extension');
            $fields = $form->getFieldset($fieldset);

            foreach ($fields as $field) {
                $key = $field->getAttribute('name');

                if (!$key || $key === "buttons") {
                    continue;
                }

                if (in_array($key, $exclude)) {
                    continue;
                }

                $def = (string) $field->getAttribute('default');

                // get parameter default value if set, use the specific plugin
                $value = $this->getParam($name . '.' . $key, $def);

                // only use non-empty values
                if ($value !== '') {
                    $defaults[$key] = $value;
                }
            }
        }

        $customAttributes = $this->getParam($name . '.attributes', '');

        if ($customAttributes) {
            if (is_string($customAttributes)) {
                $customAttributes = json_decode($customAttributes, true);
            }

            if (!is_array($customAttributes)) {
                $customAttributes = array();
            }
            
            // Remove values with invalid key, must be indexed array
            $customAttributes = array_filter($customAttributes, function ($value, $key) {
                return is_numeric($key) && $value != "";
            }, ARRAY_FILTER_USE_BOTH);

            foreach ($customAttributes as $attribute) {
                if (empty($attribute)) {
                    continue;
                }

                $name = '';
                $value = '';

                // json associative array
                if (is_array($attribute) && array_key_exists('name', $attribute)) {
                    extract($attribute);
                }

                if ($name && $value !== '') {
                    $value = trim($value, " \t\n\r\0\x0B'\"");
                    $value = htmlspecialchars($value, ENT_QUOTES, 'UTF-8');
                    $defaults[$name] = $value;
                }
            }
        }

        return $defaults;
    }

    public function getDefaultAttributes()
    {
        $defaults = $this->getDefaults();

        $attribs = array();
        $styles = array();

        foreach ($defaults as $key => $value) {
            switch ($key) {
                case 'align':
                    // convert to float
                    if ($value == 'left' || $value == 'right') {
                        $key = 'float';
                    } else {
                        $key = 'vertical-align';
                    }

                    // check for value and exclude border state parameter
                    if ($value != '') {
                        $styles[str_replace('_', '-', $key)] = $value;
                    }
                    break;
                case 'border_width':
                case 'border_style':
                case 'border_color':
                    // only if border state set
                    $value = $defaults['border'] ? $value : '';

                    // add px unit to border-width
                    if ($value && $key == 'border_width' && is_numeric($value)) {
                        $value .= 'px';
                    }

                    // check for value and exclude border state parameter
                    if ($value != '') {
                        $styles[str_replace('_', '-', $key)] = $value;
                    }

                    break;
                case 'margin_left':
                case 'margin_right':
                case 'margin_top':
                case 'margin_bottom':
                    // add px unit to border-width
                    if ($value && is_numeric($value)) {
                        $value .= 'px';
                    }

                    // check for value and exclude border state parameter
                    if ($value != '') {
                        $styles[str_replace('_', '-', $key)] = $value;
                    }

                    break;
                default:
                    if ($key == 'direction') {
                        $key = 'dir';
                    }

                    if ($key == 'classes') {
                        $key = 'class';
                    }

                    if ($value !== '') {
                        $attribs[$key] = $value;
                    }

                    break;
            }
        }

        // styles object
        if (!empty($styles)) {
            $attribs['styles'] = $styles;
        }

        return $attribs;
    }

    /**
     * Check the user is in an authorized group
     * Check the users group is authorized to use the plugin.
     *
     * @return bool
     */
    public function checkPlugin($plugin = null)
    {
        if ($plugin) {
            // check existence of plugin directory
            if (is_dir(WF_EDITOR_PLUGINS . '/' . $plugin)) {
                // get profile
                $profile = $this->getProfile($plugin);
                // check for valid object and profile id
                return is_object($profile) && isset($profile->id);
            }
        }

        return false;
    }

    /**
     * Add an alert array to the stack.
     *
     * @param object $class Alert classname
     * @param object $title Alert title
     * @param object $text  Alert text
     */
    protected function addAlert($class = 'info', $title = '', $text = '')
    {
        $alerts = $this->getAlerts();

        $alerts[] = array(
            'class' => $class,
            'title' => $title,
            'text' => $text,
        );

        $this->set('_alerts', $alerts);
    }

    /**
     * Get current alerts.
     *
     * @return array Alerts
     */
    private function getAlerts()
    {
        return $this->get('_alerts');
    }

    /**
     * Convert a url to path.
     *
     * @param    string     The url to convert
     *
     * @return string Full path to file
     */
    public function urlToPath($url)
    {
        $document = WFDocument::getInstance();

        return $document->urlToPath($url);
    }

    /**
     * Returns an image url.
     *
     * @param    string     The file to load including path and extension eg: libaries.image.gif
     *
     * @return string Image url
     */
    public function image($image, $root = 'libraries')
    {
        $document = WFDocument::getInstance();

        return $document->image($image, $root);
    }

    /**
     * Load & Call an extension.
     *
     * @param array $config
     *
     * @return array
     */
    protected function loadExtensions($type, $extension = null, $config = array())
    {
        return WFExtension::loadExtensions($type, $extension, $config);
    }

    /**
     * Compile plugin settings from defaults and alerts.
     *
     * @param array $settings
     *
     * @return array
     */
    public function getSettings($settings = array())
    {
        $default = array(
            'alerts' => $this->getAlerts(),
            'defaults' => $this->getDefaults(),
        );

        $settings = array_merge($default, $settings);

        return $settings;
    }

    public function getParams($options = array())
    {
        $wf = WFApplication::getInstance();

        return $wf->getParams($options);
    }

    /**
     * Get a parameter by key.
     *
     * @param string $key        Parameter key eg: editor.width
     * @param mixed  $fallback   Fallback value
     * @param mixed  $default    Default value
     * @param string $type       Variable type eg: string, boolean, integer, array
     *
     * @return mixed
     */
    public function getParam($key, $fallback = '', $default = '', $type = 'string')
    {
        // get plugin name
        $name = $this->getName();
        // get caller if any
        $caller = $this->get('caller');

        // get all keys
        $keys = explode('.', $key);
        $wf = WFApplication::getInstance();

        // root key set
        if ($keys[0] == 'editor' || $keys[0] == $name || $keys[0] == $caller) {
            return $wf->getParam($key, $fallback, $default, $type);
            // no root key set, treat as shared param
        } else {
            // get fallback param from editor key
            $fallback = $wf->getParam('editor.' . $key, $fallback, $default, $type);

            if ($caller) {
                // get fallback from plugin (with editor parameter as fallback)
                $fallback = $wf->getParam($name . '.' . $key, $fallback, $default, $type);
                $name = $caller;
            }

            // reset the $default to prevent clearing
            if ($fallback === $default) {
                $default = '';
            }

            // return parameter
            return $wf->getParam($name . '.' . $key, $fallback, $default, $type);
        }
    }

    /**
     * Named wrapper to check access to a feature.
     *
     * @param string    The feature to check, eg: upload
     * @param mixed        The defalt value
     *
     * @return bool
     */
    public function checkAccess($option, $default = 0)
    {
        return (bool) $this->getParam($option, $default);
    }

    protected function allowEvents()
    {
        if ((bool) $this->getParam('editor.allow_javascript')) {
            return true;
        }

        return (bool) $this->getParam('editor.allow_event_attributes');
    }
}
libraries/classes/response.php000060400000005117152455721620012535 0ustar00<?php
/**
 * @package     JCE
 * @subpackage  Editor
 *
 * @copyright   Copyright (C) 2005 - 2020 Open Source Matters, Inc. All rights reserved.
 * @copyright   Copyright (c) 2009-2024 Ryan Demmer. All rights reserved
 * @license     GNU General Public License version 2 or later; see LICENSE.txt
 */

\defined('_JEXEC') or die;

final class WFResponse
{
    private $content = null;

    private $id = null;

    private $error = null;

    private $headers = array(
        'Content-Type' => 'application/json;charset=UTF-8',
    );

    /**
     * Constructor.
     *
     * @param $id Request id
     * @param null $content Response content
     * @param array $headers Optional headers
     */
    public function __construct($id, $content = null, $headers = array())
    {
        // et response content
        $this->setContent($content);

        // set id
        $this->id = $id;

        // set header
        $this->setHeaders($headers);

        return $this;
    }

    /**
     * Send response.
     *
     * @param array $data
     */
    public function send($data = array())
    {
        $data = array_merge($data, array(
            'jsonrpc' => '2.0',
            'id' => $this->id,
            'result' => $this->getContent(),
            'error' => $this->getError(),
        ));

        ob_start();

        // set output headers
        header('Expires: Mon, 04 Apr 1984 05:00:00 GMT');
        header('Last-Modified: ' . gmdate('D, d M Y H:i:s') . ' GMT');
        header('Cache-Control: no-store, no-cache, must-revalidate, post-check=0, pre-check=0');
        header('Pragma: no-cache');

        // set custom headers
        foreach ($this->headers as $key => $value) {
            header($key . ': ' . $value);
        }

        // only echo response if an id is set
        if (!empty($this->id)) {
            echo json_encode($data);
        }

        exit(ob_get_clean());
    }

    public function getHeader()
    {
        return $this->headers;
    }

    public function setHeaders($headers)
    {
        foreach ($headers as $key => $value) {
            $this->headers[$key] = $value;
        }

        return $this;
    }

    /**
     * @param array $error
     */
    public function setError($error = array('code' => -32603, 'message' => 'Internal error'))
    {
        $this->error = $error;

        return $this;
    }

    public function getError()
    {
        return $this->error;
    }

    public function getContent()
    {
        return $this->content;
    }

    public function setContent($content)
    {
        $this->content = $content;

        return $this;
    }
}
libraries/classes/extensions/search.php000060400000002570152455721620014343 0ustar00<?php
/**
 * @package     JCE
 * @subpackage  Editor
 *
 * @copyright   Copyright (C) 2005 - 2020 Open Source Matters, Inc. All rights reserved.
 * @copyright   Copyright (c) 2009-2024 Ryan Demmer. All rights reserved
 * @license     GNU General Public License version 2 or later; see LICENSE.txt
 */

\defined('_JEXEC') or die;

class WFSearchExtension extends WFExtension
{
    private static $instances = array();

    /**
     * Returns a reference to a plugin object.
     *
     * This method must be invoked as:
     *         <pre>  $advlink =AdvLink::getInstance();</pre>
     *
     * @return JCE The editor object
     *
     * @since    1.5
     */
    public static function getInstance($type, $config = array())
    {
        if (!isset(self::$instances)) {
            self::$instances = array();
        }

        if (empty(self::$instances[$type])) {
            $file = WF_EDITOR . '/extensions/search/' . $type . '.php';

            if (is_file($file)) {
                require_once WF_EDITOR . '/extensions/search/' . $type . '.php';
            }

            $classname = 'WF' . ucfirst($type) . 'SearchExtension';

            if (class_exists($classname)) {
                self::$instances[$type] = new $classname($config);
            } else {
                self::$instances[$type] = new self();
            }
        }

        return self::$instances[$type];
    }
}
libraries/classes/extensions/filesystem.php000060400000016611152455721620015263 0ustar00<?php

/**
 * @package     JCE
 * @subpackage  Editor
 *
 * @copyright   Copyright (C) 2005 - 2020 Open Source Matters, Inc. All rights reserved.
 * @copyright   Copyright (c) 2009-2024 Ryan Demmer. All rights reserved
 * @license     GNU General Public License version 2 or later; see LICENSE.txt
 */

\defined('_JEXEC') or die;

use Joomla\CMS\Uri\Uri;
use Joomla\Registry\Registry;

class WFFileSystem extends WFExtension
{
    /**
     * Constructor activating the default information of the class.
     */
    public function __construct($config = array())
    {
        if (!isset($config['list_limit'])) {
            $config['list_limit'] = 50;
        }

        if (!isset($config['local'])) {
            $config['local'] = true;
        }

        if (!isset($config['readonly'])) {
            $config['readonly'] = false;
        }

        if (!isset($config['list_limit_options'])) {
            $config['list_limit_options'] = array(10, 25, 50, 0);
        }
        
        parent::__construct($config);
    }

    /**
     * Custom parameter function for Filesystems which contain complex values
     *
     * @param [string] $key Parameter key
     * @param string $default Default value to return
     * @return mixed Parameter value or default
     */
    public function getParam($key, $default = '')
    {
        $wf = WFEditorPlugin::getInstance();

        // get the filesystem plugin name
        $name = $this->get('name');

        // First, try from the editor context
        $value = $wf->getParam('editor.filesystem.' . $name . '.' . $key, $default);

        $fsConfig = $wf->getParam($wf->getName() . '.filesystem.' . $name);

        if (is_object($fsConfig) || $wf->getParam($wf->getName() . '.filesystem.name') == $name) {
            $fs = new Registry($fsConfig);
            $value = $fs->get($key, $default);
        }

        return $value;
    }

    /**
     * Returns a reference to a plugin object.
     */
    public static function getInstance($type = 'joomla', $config = array())
    {
        static $instances = array();

        $signature = md5($type . serialize($config));

        if (!isset($instances[$signature])) {
            $fs = parent::loadExtensions('filesystem', $type);

            // load the default...
            if (empty($fs)) {
                $fs = parent::loadExtensions('filesystem', 'joomla');
            }

            // get the first filesystem extension only
            if (is_array($fs)) {
                $fs = array_shift($fs);
            }

            $classname = 'WF' . ucfirst($fs->name) . 'FileSystem';

            // store the name
            $config['name'] = $fs->name;

            if (class_exists($classname)) {
                $instances[$signature] = new $classname($config);
            } else {
                $instances[$signature] = new self($config);
            }
        }

        return $instances[$signature];
    }

    /**
     * Get the base directory.
     *
     * @return string base dir
     */
    public function getBaseDir()
    {
        return JPATH_SITE;
    }

    /**
     * Get the full base url.
     *
     * @return string base url
     */
    public function getBaseURL()
    {
        return Uri::root(true);
    }

    /**
     * Return default directory for the filesystem.
     *
     * @return Relative path to the root directory
     */
    public function getRootDir()
    {
        $wf = WFEditorPlugin::getInstance();
        $name = $this->get('name');

        $allow_root = $wf->getParam('filesystem.' . $name . '.allow_root', 0);

        if ($allow_root) {
            return '';
        }

        return 'images';
    }

    protected static function sortItemsByKey($items, $type)
    {
        $sortable = array();

        // set default direction
        $direction = 'asc';

        if ($type[0] === '-') {
            $direction = 'desc';
            $type = substr($type, 1);
        }

        foreach ($items as $key => $item) {
            $sortable[$key] = isset($item[$type]) ? $item[$type] : $item['properties'][$type];
        }

        array_multisort($sortable, $direction === 'desc' ? SORT_DESC : SORT_ASC, SORT_NATURAL | SORT_FLAG_CASE, $items);

        return $items;
    }

    public function toAbsolute($path)
    {
        return $path;
    }

    public function toRelative($path)
    {
        return $path;
    }

    public function getTotalSize($path, $recurse = true)
    {
        return 0;
    }

    public function countFiles($path, $recurse = false)
    {
        return 0;
    }

    public function getFiles($path, $filter)
    {
        return array();
    }

    public function getFolders($path, $filter)
    {
        return array();
    }

    public function getSourceDir($path)
    {
        return $path;
    }

    public function getSourceDirFromFile($path)
    {
        if ($this->is_file($path)) {
            return $this->getSourceDir($path);
        }

        return $path;
    }

    public function isMatch($needle, $haystack)
    {
        return $needle == $haystack;
    }

    public function pathinfo($path)
    {
        return pathinfo($path);
    }

    public function delete($path)
    {
        return true;
    }

    public function createFolder($path, $new)
    {
        return true;
    }

    public function rename($src, $dest)
    {
        return true;
    }

    public function copy($src, $dest)
    {
        return true;
    }

    public function move($src, $dest)
    {
        return true;
    }

    public function getFolderDetails($path)
    {
        return array(
            'properties' => array('modified' => ''),
        );
    }

    public function getFileDetails($path)
    {
        $data = array(
            'properties' => array(
                'size' => '',
                'modified' => '',
            ),
        );

        if (preg_match('#\.(jpg|jpeg|bmp|gif|tiff|png)#i', $path)) {
            $image = array(
                'properties' => array(
                    'width' => 0,
                    'height' => 0,
                    'preview' => '',
                ),
            );

            return array_merge_recursive($data, $image);
        }

        return $data;
    }

    public function getDimensions($path)
    {
        return array(
            'width' => '',
            'height' => '',
        );
    }

    public function upload($method, $src, $dir, $name, $chunks = 0, $chunk = 0)
    {
        return true;
    }

    public function exists($path)
    {
        return true;
    }

    public function read($path)
    {
        return '';
    }

    public function write($path, $content)
    {
        return true;
    }

    public function isLocal()
    {
        return $this->get('local') === true;
    }

    public function is_file($path)
    {
        return true;
    }

    public function is_dir($path)
    {
        return true;
    }
}

/**
 * Filesystem Error class.
 */
final class WFFileSystemResult
{
    /*
     * @var Object type eg: file / folder
     */

    public $type = 'files';
    /*
     * @boolean    Result state
     */
    public $state = false;
    /*
     * @int    Error code
     */
    public $code = null;
    /*
     * @var Error message
     */
    public $message = null;
    /*
     * @var File / Folder path
     */
    public $path = null;
    /*
     * @var File / Folder url
     */
    public $url = null;
    /*
     * @var Original Source path
     */
    public $source = null;

    public function __construct() {}
}
libraries/classes/extensions/aggregator.php000060400000006741152455721620015224 0ustar00<?php
/**
 * @package     JCE
 * @subpackage  Editor
 *
 * @copyright   Copyright (C) 2005 - 2020 Open Source Matters, Inc. All rights reserved.
 * @copyright   Copyright (c) 2009-2024 Ryan Demmer. All rights reserved
 * @license     GNU General Public License version 2 or later; see LICENSE.txt
 */

\defined('_JEXEC') or die;

use Joomla\Filesystem\Folder;

class WFAggregatorExtension extends WFExtension
{
    protected static $instance;

    /**
     * Returns a reference to a plugin object.
     *
     * This method must be invoked as:
     *         <pre>  $advlink =AdvLink::getInstance();</pre>
     *
     * @return JCE The editor object
     *
     * @since    1.5
     */
    public static function getInstance($config = array())
    {
        if (!isset(self::$instance)) {
            self::$instance = new self($config);
        }

        return self::$instance;
    }

    public function getName()
    {
        return $this->get('name');
    }

    public function getTitle()
    {
        return $this->get('title');
    }

    public function display()
    {
        parent::display();

        $document = WFDocument::getInstance();

        $aggregators = $this->getAggregators();

        foreach ($aggregators as $aggregator) {
            $aggregator->display();

            $params = $aggregator->getParams();

            if (!empty($params)) {
                $document->addScriptDeclaration('WFExtensions.Aggregator.setParams("' . $aggregator->getName() . '",' . json_encode($params) . ');');
            }
        }
    }

    public function getAggregators()
    {
        static $aggregators;

        if (!isset($aggregators)) {
            $aggregators = array();
        }

        // get the aggregator format for this instance
        $format = $this->get('format');

        if (empty($aggregators[$format])) {

            // get a plugin instance
            $plugin = WFEditorPlugin::getInstance();

            $aggregators[$format] = array();

            $path = WF_EDITOR_EXTENSIONS . '/aggregator';
            $files = Folder::files($path, '\.php$', false, true);

            foreach ($files as $file) {
                require_once $file;

                $name = basename($file, '.php');
                $classname = 'WFAggregatorExtension_' . ucfirst($name);

                // only load if enabled
                if (class_exists($classname)) {
                    $aggregator = new $classname();

                    // check if enabled
                    if ($aggregator->isEnabled()) {
                        if ($aggregator->get('format') == $format) {
                            $aggregator->set('name', $name);
                            $aggregator->set('title', 'WF_AGGREGATOR_' . strtoupper($name) . '_TITLE');
                            $aggregators[$format][] = $aggregator;
                        }
                    }
                }
            }
        }

        return $aggregators[$format];
    }

    /**
     * @param object $player
     *
     * @return string
     */
    public function loadTemplate($name, $tpl = '')
    {
        $path = WF_EDITOR_EXTENSIONS . '/aggregator/' . $name;

        $output = '';

        $file = 'default.php';

        if ($tpl) {
            $file = 'default_' . $tpl . '.php';
        }

        if (file_exists($path . '/tmpl/' . $file)) {
            ob_start();

            include $path . '/tmpl/' . $file;

            $output .= ob_get_contents();
            ob_end_clean();
        }

        return $output;
    }
}
libraries/classes/extensions/popups.php000060400000010775152455721620014432 0ustar00<?php
/**
 * @package     JCE
 * @subpackage  Editor
 *
 * @copyright   Copyright (C) 2005 - 2020 Open Source Matters, Inc. All rights reserved.
 * @copyright   Copyright (c) 2009-2024 Ryan Demmer. All rights reserved
 * @license     GNU General Public License version 2 or later; see LICENSE.txt
 */

\defined('_JEXEC') or die;

use Joomla\Filesystem\Path;
use Joomla\CMS\HTML\HTMLHelper;
use Joomla\CMS\Language\Text;

class WFPopupsExtension extends WFExtension
{
    protected static $instance;

    private $_popups = array();
    private $_templates = array();

    /**
     * Constructor activating the default information of the class.
     */
    public function __construct($config = array())
    {
        parent::__construct($config);

        $this->setProperties($config);
    }

    /**
     * Returns a reference to a plugin object.
     *
     * This method must be invoked as:
     *    <pre>  $advlink =AdvLink::getInstance();</pre>
     *
     * @return JCE The editor object
     *
     * @since 1.5
     */
    public static function getInstance($config = array())
    {
        if (!isset(self::$instance)) {
            self::$instance = new self($config);
        }

        return self::$instance;
    }

    public function display()
    {
        parent::display();

        $document = WFDocument::getInstance();

        // get all popups extensions
        $popups = parent::loadExtensions('popups');

        $config = $this->getProperties();

        if ($config) {
            // Create global config
            $document->addScriptDeclaration('WFExtensions.Popups.setConfig(' . json_encode($config) . ');');
        }

        // Create an instance of each popup and check if enabled
        foreach ($popups as $item) {
            $popup = $this->getPopupExtension($item->name);

            if ($popup->isEnabled()) {
                $this->addPopup($item);

                $params = $popup->getParams();

                if (!empty($params)) {
                    $document->addScriptDeclaration('WFExtensions.Popups.setParams("' . $item->name . '",' . json_encode($params) . ');');
                }
            }
        }

        $tabs = WFTabs::getInstance();

        // Add popup tab and assign popups reference to document
        if (count($this->getPopups())) {
            $tabs->addTab('popups');
            $panel = $tabs->getPanel('popups');
            $panel->popups = $this;
        }
    }

    private function getPopups()
    {
        return $this->_popups;
    }

    public function addPopup($popup)
    {
        $this->_popups[] = $popup;
    }

    private function getTemplates()
    {
        return $this->_templates;
    }

    public function addTemplate($template)
    {
        $this->_templates[] = $template;
    }

    private function getPopupExtension($name)
    {
        static $popups = array();

        if (!isset($popups[$name])) {
            $classname = 'WFPopupsExtension_' . ucfirst($name);
            $popups[$name] = new $classname();
        }

        return $popups[$name];
    }

    public function getPopupList()
    {
        $options = array();

        $options[] = HTMLHelper::_('select.option', '', '-- ' . Text::_('WF_POPUP_TYPE_SELECT') . ' --');

        foreach ($this->getPopups() as $popup) {
            $options[] = HTMLHelper::_('select.option', $popup->name, Text::_('WF_POPUPS_' . strtoupper($popup->name) . '_TITLE'));
        }

        return HTMLHelper::_('select.genericlist', $options, 'popup_list', '', 'value', 'text', $this->get('default'));
    }

    public function getPopupTemplates()
    {
        $output = '';

        foreach ($this->getTemplates() as $template) {
            $wf = WFEditorPlugin::getInstance();
            $view = $wf->getView();

            $output .= $view->loadTemplate($template);
        }

        foreach ($this->getPopups() as $popup) {
            $view = new WFView(array(
                'name' => $popup->name,
                'base_path' => $popup->path,
                'template_path' => $popup->path . '/tmpl',
            ));

            $instance = $this->getPopupExtension($popup->name);
            $view->popup = $instance;

            if (file_exists($popup->path . '/tmpl/default.php')) {
                ob_start();

                $output .= '<div id="popup_extension_' . $popup->name . '" style="display:none;">';

                $view->display();

                $output .= ob_get_contents();
                $output .= '</div>';
                ob_end_clean();
            }
        }

        return $output;
    }
}
libraries/classes/extensions/link.php000060400000015476152455721620014044 0ustar00<?php
/**
 * @package     JCE
 * @subpackage  Editor
 *
 * @copyright   Copyright (C) 2005 - 2020 Open Source Matters, Inc. All rights reserved.
 * @copyright   Copyright (c) 2009-2024 Ryan Demmer. All rights reserved
 * @license     GNU General Public License version 2 or later; see LICENSE.txt
 */

\defined('_JEXEC') or die;

use Joomla\CMS\Application\CMSApplication;
use Joomla\CMS\Component\ComponentHelper;
use Joomla\CMS\Factory;
use Joomla\CMS\Filter\InputFilter;

class WFLinkExtension extends WFExtension
{
    /*
     *  @var varchar
     */

    private $extensions = array();
    protected static $instance;
    protected static $links = array();

    /**
     * Constructor activating the default information of the class.
     */
    public function __construct()
    {
        parent::__construct();

        $extensions = self::loadExtensions('links');

        // Load all link extensions
        foreach ($extensions as $link) {
            $this->extensions[] = $this->getLinkExtension($link->name);
        }

        $request = WFRequest::getInstance();
        $request->setRequest(array($this, 'getLinks'));
    }

    public static function getInstance($config = array())
    {
        if (!isset(self::$instance)) {
            self::$instance = new self($config);
        }

        return self::$instance;
    }

    public function display()
    {
        parent::display();

        foreach ($this->extensions as $extension) {
            $extension->display();
        }
    }

    private function getLinkExtension($name)
    {
        if (array_key_exists($name, self::$links) === false || empty(self::$links[$name])) {
            $classname = 'WFLinkBrowser_' . ucfirst($name);
            // create class
            if (class_exists($classname)) {
                self::$links[$name] = new $classname();
            }
        }

        return self::$links[$name];
    }

    public function getLists()
    {
        $list = array();

        foreach ($this->extensions as $extension) {
            if ($extension->isEnabled()) {
                $list[] = $extension->getList();
            }
        }

        return $list;
    }

    public function render()
    {
        $list = $this->getLists();

        if (empty($list)) {
            return '';
        }

        $view = $this->getView(array('name' => 'links', 'layout' => 'links'));
        $view->list = implode("\n", $list);
        $view->display();
    }

    private static function cleanInput($args, $method = 'string')
    {
        $filter = InputFilter::getInstance();

        foreach ($args as $k => $v) {
            $args->$k = $filter->clean($v, $method);
            $args->$k = (string) filter_var($args->$k, FILTER_UNSAFE_RAW, FILTER_FLAG_STRIP_LOW | FILTER_FLAG_STRIP_BACKTICK);
            $args->$k = htmlspecialchars(strip_tags($args->$k));
        }

        return $args;
    }

    public function getLinks($args)
    {
        $args = self::cleanInput($args, 'STRING');

        foreach ($this->extensions as $extension) {
            if (in_array($args->option, $extension->getOption())) {
                $items = $extension->getLinks($args);
            }
        }
        $array = array();
        $result = array();
        if (isset($items)) {
            foreach ($items as $item) {
                $array[] = array(
                    'id' => isset($item['id']) ? self::xmlEncode($item['id']) : '',
                    'url' => isset($item['url']) ? self::xmlEncode($item['url']) : '',
                    'name' => self::xmlEncode($item['name']), 'class' => $item['class'],
                );
            }
            $result = array('folders' => $array);
        }

        return $result;
    }

    /**
     * Category function used by many extensions.
     *
     * @return Category list object
     *
     * @since    1.5
     */
    public static function getCategory($section, $parent = 1)
    {
        $db = Factory::getDBO();
        $user = Factory::getUser();
        $wf = WFEditorPlugin::getInstance();

        $query = $db->getQuery(true);

        $where = array();

        $version = new Joomla\CMS\Version();
        $language = $version->isCompatible('3.0') ? ', language' : '';

        $where[] = 'parent_id = ' . (int) $parent;
        $where[] = 'extension = ' . $db->Quote($section);

        if (!$user->authorise('core.admin')) {
            $where[] = 'access IN (' . implode(',', $user->getAuthorisedViewLevels()) . ')';
        }

        if (!$wf->checkAccess('static', 1)) {
            $where[] = 'path != ' . $db->Quote('uncategorised');
        }

        $case = '';

        if ($wf->getParam('category_alias', 1) == 1) {
            //sqlsrv changes
            $case = ', CASE WHEN ';
            $case .= $query->charLength('alias', '!=', '0');
            $case .= ' THEN ';

            // Joomla 3 compatibility
            if (method_exists($query, 'castAsChar')) {
                $a_id = $query->castAsChar('id');
            } else {
                $a_id = $query->castAs('CHAR', 'id');
            }

            $case .= $query->concatenate(array($a_id, 'alias'), ':');
            $case .= ' ELSE ';
            $case .= $a_id . ' END as slug';
        }

        $where[] = 'published = 1';
        $query->select('id AS slug, id AS id, title, alias, access' . $language . $case)->from('#__categories')->where($where)->order('title');

        $db->setQuery($query);

        return $db->loadObjectList();
    }

    /**
     * (Attempt to) Get an Itemid.
     *
     * @param string $component
     * @param array  $needles
     *
     * @return Category list object
     */
    public static function getItemId($component, $needles = array())
    {
        $match = null;

        $version = new Joomla\CMS\Version();

        $app = CMSApplication::getInstance('site');
        $tag = $version->isCompatible('4.0') ? 'component_id' : 'componentid';

        $component = ComponentHelper::getComponent($component);
        $menu = $app->getMenu('site');
        $items = $menu->getItems($tag, $component->id);

        if ($items) {
            foreach ($needles as $needle => $id) {
                foreach ($items as $item) {
                    if ((@$item->query['view'] == $needle) && (@$item->query['id'] == $id)) {
                        $match = $item->id;
                        break;
                    }
                }
                if (isset($match)) {
                    break;
                }
            }
        }

        return $match ? '&Itemid=' . $match : '';
    }

    /**
     * XML encode a string.
     *
     * @param     string    String to encode
     *
     * @return string Encoded string
     */
    private static function xmlEncode($string)
    {
        return str_replace(array('&', '<', '>', "'", '"'), array('&amp;', '&lt;', '&gt;', '&apos;', '&quot;'), $string);
    }
}

abstract class WFLinkBrowser extends WFLinkExtension
{
}
libraries/classes/extensions/index.html000060400000000054152455721620014355 0ustar00<html><body bgcolor="#FFFFFF"></body></html>libraries/classes/extensions/mediaplayer.php000060400000006413152455721620015372 0ustar00<?php
/**
 * @package     JCE
 * @subpackage  Editor
 *
 * @copyright   Copyright (C) 2005 - 2020 Open Source Matters, Inc. All rights reserved.
 * @copyright   Copyright (c) 2009-2024 Ryan Demmer. All rights reserved
 * @license     GNU General Public License version 2 or later; see LICENSE.txt
 */

\defined('_JEXEC') or die;

class WFMediaPlayerExtension extends WFExtension
{
    protected static $instance;

    public function __construct($config = array())
    {
        $default = array(
            'name' => '',
            'title' => '',
            'params' => array(),
        );

        $config = array_merge($default, $config);

        parent::__construct($config);
    }

    /**
     * Returns a reference to a manager object.
     *
     * This method must be invoked as:
     *    <pre>  $manager =MediaManager::getInstance();</pre>
     *
     * @return MediaManager The manager object
     *
     * @since 1.5
     */
    public static function getInstance($name = 'jceplayer')
    {
        if (!isset(self::$instance)) {
            $classname = '';

            if ($name && $name != 'none') {
                $player = parent::loadExtensions('mediaplayer', $name);

                if ($player) {
                    $classname = 'WFMediaPlayerExtension_' . ucfirst($player->name);
                }
            }

            if ($classname && class_exists($classname)) {
                self::$instance = new $classname();
            } else {
                self::$instance = new self();
            }
        }

        return self::$instance;
    }

    public function display()
    {
        parent::display();

        $document = WFDocument::getInstance();

        if ($this->isEnabled() && $this->get('name')) {
            $document->addScript(array(
                'mediaplayer/' . $this->get('name') . '/js/' . $this->get('name'),
            ), 'extensions');

            $document->addStyleSheet(array(
                'mediaplayer/' . $this->get('name') . '/css/' . $this->get('name'),
            ), 'extensions');

            $document->addScriptDeclaration('WFExtensions.MediaPlayer.init(' . json_encode($this->getProperties()) . ')');
        }
    }

    public function isEnabled()
    {
        return false;
    }

    public function getName()
    {
        return $this->get('name');
    }

    public function getTitle()
    {
        return $this->get('title');
    }

    public function getParams()
    {
        return $this->params;
    }

    public function getParam($param, $default = '')
    {
        $params = $this->getParams();

        return isset($params[$param]) ? $params[$param] : $default;
    }

    /**
     * @param object $player
     *
     * @return string
     */
    public function loadTemplate($tpl = '')
    {
        $output = '';

        if ($this->isEnabled()) {
            $path = WF_EDITOR_EXTENSIONS . '/mediaplayer/' . $this->get('name');

            $file = 'default.php';

            if ($tpl) {
                $file = 'default_' . $tpl . '.php';
            }

            if (file_exists($path . '/tmpl/' . $file)) {
                ob_start();

                include $path . '/tmpl/' . $file;

                $output .= ob_get_contents();
                ob_end_clean();
            }
        }

        return $output;
    }
}
libraries/classes/encrypt.php000060400000054036152455721620012367 0ustar00<?php
/**
 * @copyright Copyright (c)2009-2013 Nicholas K. Dionysopoulos
 * @license GNU General Public License version 3, or later
 *
 * @since 2.4
 */

// Protection against direct access
\defined('_JEXEC') or die;

/**
 * AES implementation in PHP (c) Chris Veness 2005-2013.
 * Right to use and adapt is granted for under a simple creative commons attribution
 * licence. No warranty of any form is offered.
 *
 * Modified for Akeeba Backup by Nicholas K. Dionysopoulos
 * Included for JCE with the kind permission of Nicholas K. Dionysopoulos
 */
class WFUtilEncrypt
{
    // Sbox is pre-computed multiplicative inverse in GF(2^8) used in SubBytes and KeyExpansion [�5.1.1]
    protected static $Sbox =
             array(0x63, 0x7c, 0x77, 0x7b, 0xf2, 0x6b, 0x6f, 0xc5, 0x30, 0x01, 0x67, 0x2b, 0xfe, 0xd7, 0xab, 0x76,
                   0xca, 0x82, 0xc9, 0x7d, 0xfa, 0x59, 0x47, 0xf0, 0xad, 0xd4, 0xa2, 0xaf, 0x9c, 0xa4, 0x72, 0xc0,
                   0xb7, 0xfd, 0x93, 0x26, 0x36, 0x3f, 0xf7, 0xcc, 0x34, 0xa5, 0xe5, 0xf1, 0x71, 0xd8, 0x31, 0x15,
                   0x04, 0xc7, 0x23, 0xc3, 0x18, 0x96, 0x05, 0x9a, 0x07, 0x12, 0x80, 0xe2, 0xeb, 0x27, 0xb2, 0x75,
                   0x09, 0x83, 0x2c, 0x1a, 0x1b, 0x6e, 0x5a, 0xa0, 0x52, 0x3b, 0xd6, 0xb3, 0x29, 0xe3, 0x2f, 0x84,
                   0x53, 0xd1, 0x00, 0xed, 0x20, 0xfc, 0xb1, 0x5b, 0x6a, 0xcb, 0xbe, 0x39, 0x4a, 0x4c, 0x58, 0xcf,
                   0xd0, 0xef, 0xaa, 0xfb, 0x43, 0x4d, 0x33, 0x85, 0x45, 0xf9, 0x02, 0x7f, 0x50, 0x3c, 0x9f, 0xa8,
                   0x51, 0xa3, 0x40, 0x8f, 0x92, 0x9d, 0x38, 0xf5, 0xbc, 0xb6, 0xda, 0x21, 0x10, 0xff, 0xf3, 0xd2,
                   0xcd, 0x0c, 0x13, 0xec, 0x5f, 0x97, 0x44, 0x17, 0xc4, 0xa7, 0x7e, 0x3d, 0x64, 0x5d, 0x19, 0x73,
                   0x60, 0x81, 0x4f, 0xdc, 0x22, 0x2a, 0x90, 0x88, 0x46, 0xee, 0xb8, 0x14, 0xde, 0x5e, 0x0b, 0xdb,
                   0xe0, 0x32, 0x3a, 0x0a, 0x49, 0x06, 0x24, 0x5c, 0xc2, 0xd3, 0xac, 0x62, 0x91, 0x95, 0xe4, 0x79,
                   0xe7, 0xc8, 0x37, 0x6d, 0x8d, 0xd5, 0x4e, 0xa9, 0x6c, 0x56, 0xf4, 0xea, 0x65, 0x7a, 0xae, 0x08,
                   0xba, 0x78, 0x25, 0x2e, 0x1c, 0xa6, 0xb4, 0xc6, 0xe8, 0xdd, 0x74, 0x1f, 0x4b, 0xbd, 0x8b, 0x8a,
                   0x70, 0x3e, 0xb5, 0x66, 0x48, 0x03, 0xf6, 0x0e, 0x61, 0x35, 0x57, 0xb9, 0x86, 0xc1, 0x1d, 0x9e,
                   0xe1, 0xf8, 0x98, 0x11, 0x69, 0xd9, 0x8e, 0x94, 0x9b, 0x1e, 0x87, 0xe9, 0xce, 0x55, 0x28, 0xdf,
                   0x8c, 0xa1, 0x89, 0x0d, 0xbf, 0xe6, 0x42, 0x68, 0x41, 0x99, 0x2d, 0x0f, 0xb0, 0x54, 0xbb, 0x16, );

    // Rcon is Round Constant used for the Key Expansion [1st col is 2^(r-1) in GF(2^8)] [�5.2]
    protected static $Rcon = array(
                   array(0x00, 0x00, 0x00, 0x00),
                   array(0x01, 0x00, 0x00, 0x00),
                   array(0x02, 0x00, 0x00, 0x00),
                   array(0x04, 0x00, 0x00, 0x00),
                   array(0x08, 0x00, 0x00, 0x00),
                   array(0x10, 0x00, 0x00, 0x00),
                   array(0x20, 0x00, 0x00, 0x00),
                   array(0x40, 0x00, 0x00, 0x00),
                   array(0x80, 0x00, 0x00, 0x00),
                   array(0x1b, 0x00, 0x00, 0x00),
                   array(0x36, 0x00, 0x00, 0x00), );

    protected static $passwords = array();

    /**
     * AES Cipher function: encrypt 'input' with Rijndael algorithm.
     *
     * @param input message as byte-array (16 bytes)
     * @param w     key schedule as 2D byte-array (Nr+1 x Nb bytes) -
     *              generated from the cipher key by KeyExpansion()
     *
     * @return ciphertext as byte-array (16 bytes)
     */
    public static function Cipher($input, $w)
    {    // main Cipher function [�5.1]
      $Nb = 4;                 // block size (in words): no of columns in state (fixed at 4 for AES)
      $Nr = count($w) / $Nb - 1; // no of rounds: 10/12/14 for 128/192/256-bit keys

      $state = array();  // initialise 4xNb byte-array 'state' with input [�3.4]
      for ($i = 0; $i < 4 * $Nb; ++$i) {
          $state[$i % 4][floor($i / 4)] = $input[$i];
      }

        $state = self::AddRoundKey($state, $w, 0, $Nb);

        for ($round = 1; $round < $Nr; ++$round) {  // apply Nr rounds
        $state = self::SubBytes($state, $Nb);
            $state = self::ShiftRows($state, $Nb);
            $state = self::MixColumns($state, $Nb);
            $state = self::AddRoundKey($state, $w, $round, $Nb);
        }

        $state = self::SubBytes($state, $Nb);
        $state = self::ShiftRows($state, $Nb);
        $state = self::AddRoundKey($state, $w, $Nr, $Nb);

        $output = array(4 * $Nb);  // convert state to 1-d array before returning [�3.4]
      for ($i = 0; $i < 4 * $Nb; ++$i) {
          $output[$i] = $state[$i % 4][floor($i / 4)];
      }

        return $output;
    }

    protected static function AddRoundKey($state, $w, $rnd, $Nb)
    {  // xor Round Key into state S [�5.1.4]
      for ($r = 0; $r < 4; ++$r) {
          for ($c = 0; $c < $Nb; ++$c) {
              $state[$r][$c] ^= $w[$rnd * 4 + $c][$r];
          }
      }

        return $state;
    }

    protected static function SubBytes($s, $Nb)
    {    // apply SBox to state S [�5.1.1]
      for ($r = 0; $r < 4; ++$r) {
          for ($c = 0; $c < $Nb; ++$c) {
              $s[$r][$c] = self::$Sbox[$s[$r][$c]];
          }
      }

        return $s;
    }

    protected static function ShiftRows($s, $Nb)
    {    // shift row r of state S left by r bytes [�5.1.2]
      $t = array(4);
        for ($r = 1; $r < 4; ++$r) {
            for ($c = 0; $c < 4; ++$c) {
                $t[$c] = $s[$r][($c + $r) % $Nb];
            }  // shift into temp copy
        for ($c = 0; $c < 4; ++$c) {
            $s[$r][$c] = $t[$c];
        }         // and copy back
        }          // note that this will work for Nb=4,5,6, but not 7,8 (always 4 for AES):
      return $s;  // see fp.gladman.plus.com/cryptography_technology/rijndael/aes.spec.311.pdf
    }

    protected static function MixColumns($s, $Nb)
    {   // combine bytes of each col of state S [�5.1.3]
      for ($c = 0; $c < 4; ++$c) {
          $a = array(4);  // 'a' is a copy of the current column from 's'
        $b = array(4);  // 'b' is a�{02} in GF(2^8)
        for ($i = 0; $i < 4; ++$i) {
            $a[$i] = $s[$i][$c];
            $b[$i] = $s[$i][$c] & 0x80 ? $s[$i][$c] << 1 ^ 0x011b : $s[$i][$c] << 1;
        }
        // a[n] ^ b[n] is a�{03} in GF(2^8)
        $s[0][$c] = $b[0] ^ $a[1] ^ $b[1] ^ $a[2] ^ $a[3]; // 2*a0 + 3*a1 + a2 + a3
        $s[1][$c] = $a[0] ^ $b[1] ^ $a[2] ^ $b[2] ^ $a[3]; // a0 * 2*a1 + 3*a2 + a3
        $s[2][$c] = $a[0] ^ $a[1] ^ $b[2] ^ $a[3] ^ $b[3]; // a0 + a1 + 2*a2 + 3*a3
        $s[3][$c] = $a[0] ^ $b[0] ^ $a[1] ^ $a[2] ^ $b[3]; // 3*a0 + a1 + a2 + 2*a3
      }

        return $s;
    }

    /**
     * Key expansion for Rijndael Cipher(): performs key expansion on cipher key
     * to generate a key schedule.
     *
     * @param key cipher key byte-array (16 bytes)
     *
     * @return key schedule as 2D byte-array (Nr+1 x Nb bytes)
     */
    public static function KeyExpansion($key)
    {  // generate Key Schedule from Cipher Key [�5.2]
      $Nb = 4;              // block size (in words): no of columns in state (fixed at 4 for AES)
      $Nk = count($key) / 4;  // key length (in words): 4/6/8 for 128/192/256-bit keys
      $Nr = $Nk + 6;        // no of rounds: 10/12/14 for 128/192/256-bit keys

      $w = array();
        $temp = array();

        for ($i = 0; $i < $Nk; ++$i) {
            $r = array($key[4 * $i], $key[4 * $i + 1], $key[4 * $i + 2], $key[4 * $i + 3]);
            $w[$i] = $r;
        }

        for ($i = $Nk; $i < ($Nb * ($Nr + 1)); ++$i) {
            $w[$i] = array();
            for ($t = 0; $t < 4; ++$t) {
                $temp[$t] = $w[$i - 1][$t];
            }
            if ($i % $Nk == 0) {
                $temp = self::SubWord(self::RotWord($temp));
                for ($t = 0; $t < 4; ++$t) {
                    $temp[$t] ^= self::$Rcon[$i / $Nk][$t];
                }
            } elseif ($Nk > 6 && $i % $Nk == 4) {
                $temp = self::SubWord($temp);
            }
            for ($t = 0; $t < 4; ++$t) {
                $w[$i][$t] = $w[$i - $Nk][$t] ^ $temp[$t];
            }
        }

        return $w;
    }

    protected static function SubWord($w)
    {    // apply SBox to 4-byte word w
      for ($i = 0; $i < 4; ++$i) {
          $w[$i] = self::$Sbox[$w[$i]];
      }

        return $w;
    }

    protected static function RotWord($w)
    {    // rotate 4-byte word w left by one byte
      $tmp = $w[0];
        for ($i = 0; $i < 3; ++$i) {
            $w[$i] = $w[$i + 1];
        }
        $w[3] = $tmp;

        return $w;
    }

    /*
     * Unsigned right shift function, since PHP has neither >>> operator nor unsigned ints
     *
     * @param a  number to be shifted (32-bit integer)
     * @param b  number of bits to shift a to the right (0..31)
     * @return   a right-shifted and zero-filled by b bits
     */
    protected static function urs($a, $b)
    {
        $a &= 0xffffffff;
        $b &= 0x1f;  // (bounds check)
      if ($a & 0x80000000 && $b > 0) {   // if left-most bit set
        $a = ($a >> 1) & 0x7fffffff;   //   right-shift one bit & clear left-most bit
        $a = $a >> ($b - 1);           //   remaining right-shifts
      } else {                       // otherwise
        $a = ($a >> $b);               //   use normal right-shift
      }

        return $a;
    }

    /**
     * Encrypt a text using AES encryption in Counter mode of operation
     *  - see http://csrc.nist.gov/publications/nistpubs/800-38a/sp800-38a.pdf.
     *
     * Unicode multi-byte character safe
     *
     * @param plaintext source text to be encrypted
     * @param password  the password to use to generate a key
     * @param nBits     number of bits to be used in the key (128, 192, or 256)
     *
     * @return encrypted text
     */
    public static function AESEncryptCtr($plaintext, $password, $nBits)
    {
        $blockSize = 16;  // block size fixed at 16 bytes / 128 bits (Nb=4) for AES
      if (!($nBits == 128 || $nBits == 192 || $nBits == 256)) {
          return '';
      }  // standard allows 128/192/256 bit keys
      // note PHP (5) gives us plaintext and password in UTF8 encoding!

      // use AES itself to encrypt password to get cipher key (using plain password as source for
      // key expansion) - gives us well encrypted key
      $nBytes = $nBits / 8;  // no bytes in key
      $pwBytes = array();
        for ($i = 0; $i < $nBytes; ++$i) {
            $pwBytes[$i] = ord(substr($password, $i, 1)) & 0xff;
        }
        $key = self::Cipher($pwBytes, self::KeyExpansion($pwBytes));
        $key = array_merge($key, array_slice($key, 0, $nBytes - 16));  // expand key to 16/24/32 bytes long

      // initialise counter block (NIST SP800-38A �B.2): millisecond time-stamp for nonce in
      // 1st 8 bytes, block counter in 2nd 8 bytes
      $counterBlock = array();
        $nonce = floor(microtime(true) * 1000);   // timestamp: milliseconds since 1-Jan-1970
      $nonceSec = floor($nonce / 1000);
        $nonceMs = $nonce % 1000;
      // encode nonce with seconds in 1st 4 bytes, and (repeated) ms part filling 2nd 4 bytes
      for ($i = 0; $i < 4; ++$i) {
          $counterBlock[$i] = self::urs($nonceSec, $i * 8) & 0xff;
      }
        for ($i = 0; $i < 4; ++$i) {
            $counterBlock[$i + 4] = $nonceMs & 0xff;
        }
      // and convert it to a string to go on the front of the ciphertext
      $ctrTxt = '';
        for ($i = 0; $i < 8; ++$i) {
            $ctrTxt .= chr($counterBlock[$i]);
        }

      // generate key schedule - an expansion of the key into distinct Key Rounds for each round
      $keySchedule = self::KeyExpansion($key);

        $blockCount = ceil(strlen($plaintext) / $blockSize);
        $ciphertxt = array();  // ciphertext as array of strings

      for ($b = 0; $b < $blockCount; ++$b) {
          // set counter (block #) in last 8 bytes of counter block (leaving nonce in 1st 8 bytes)
        // done in two stages for 32-bit ops: using two words allows us to go past 2^32 blocks (68GB)
        for ($c = 0; $c < 4; ++$c) {
            $counterBlock[15 - $c] = self::urs($b, $c * 8) & 0xff;
        }
          for ($c = 0; $c < 4; ++$c) {
              $counterBlock[15 - $c - 4] = self::urs($b / 0x100000000, $c * 8);
          }

          $cipherCntr = self::Cipher($counterBlock, $keySchedule);  // -- encrypt counter block --

        // block size is reduced on final block
        $blockLength = $b < $blockCount - 1 ? $blockSize : (strlen($plaintext) - 1) % $blockSize + 1;
          $cipherByte = array();

          for ($i = 0; $i < $blockLength; ++$i) {  // -- xor plaintext with ciphered counter byte-by-byte --
          $cipherByte[$i] = $cipherCntr[$i] ^ ord(substr($plaintext, $b * $blockSize + $i, 1));
              $cipherByte[$i] = chr($cipherByte[$i]);
          }
          $ciphertxt[$b] = implode('', $cipherByte);  // escape troublesome characters in ciphertext
      }

      // implode is more efficient than repeated string concatenation
      $ciphertext = $ctrTxt.implode('', $ciphertxt);
        $ciphertext = base64_encode($ciphertext);

        return $ciphertext;
    }

    /**
     * Decrypt a text encrypted by AES in counter mode of operation.
     *
     * @param ciphertext source text to be decrypted
     * @param password   the password to use to generate a key
     * @param nBits      number of bits to be used in the key (128, 192, or 256)
     *
     * @return decrypted text
     */
    public static function AESDecryptCtr($ciphertext, $password, $nBits)
    {
        $blockSize = 16;  // block size fixed at 16 bytes / 128 bits (Nb=4) for AES
      if (!($nBits == 128 || $nBits == 192 || $nBits == 256)) {
          return '';
      }  // standard allows 128/192/256 bit keys
      $ciphertext = base64_decode($ciphertext);

      // use AES to encrypt password (mirroring encrypt routine)
      $nBytes = $nBits / 8;  // no bytes in key
      $pwBytes = array();
        for ($i = 0; $i < $nBytes; ++$i) {
            $pwBytes[$i] = ord(substr($password, $i, 1)) & 0xff;
        }
        $key = self::Cipher($pwBytes, self::KeyExpansion($pwBytes));
        $key = array_merge($key, array_slice($key, 0, $nBytes - 16));  // expand key to 16/24/32 bytes long

      // recover nonce from 1st element of ciphertext
      $counterBlock = array();
        $ctrTxt = substr($ciphertext, 0, 8);
        for ($i = 0; $i < 8; ++$i) {
            $counterBlock[$i] = ord(substr($ctrTxt, $i, 1));
        }

      // generate key schedule
      $keySchedule = self::KeyExpansion($key);

      // separate ciphertext into blocks (skipping past initial 8 bytes)
      $nBlocks = ceil((strlen($ciphertext) - 8) / $blockSize);
        $ct = array();
        for ($b = 0; $b < $nBlocks; ++$b) {
            $ct[$b] = substr($ciphertext, 8 + $b * $blockSize, 16);
        }
        $ciphertext = $ct;  // ciphertext is now array of block-length strings

      // plaintext will get generated block-by-block into array of block-length strings
      $plaintxt = array();

        for ($b = 0; $b < $nBlocks; ++$b) {
            // set counter (block #) in last 8 bytes of counter block (leaving nonce in 1st 8 bytes)
        for ($c = 0; $c < 4; ++$c) {
            $counterBlock[15 - $c] = self::urs($b, $c * 8) & 0xff;
        }
            for ($c = 0; $c < 4; ++$c) {
                $counterBlock[15 - $c - 4] = self::urs(($b + 1) / 0x100000000 - 1, $c * 8) & 0xff;
            }

            $cipherCntr = self::Cipher($counterBlock, $keySchedule);  // encrypt counter block

        $plaintxtByte = array();
            for ($i = 0; $i < strlen($ciphertext[$b]); ++$i) {
                // -- xor plaintext with ciphered counter byte-by-byte --
          $plaintxtByte[$i] = $cipherCntr[$i] ^ ord(substr($ciphertext[$b], $i, 1));
                $plaintxtByte[$i] = chr($plaintxtByte[$i]);
            }
            $plaintxt[$b] = implode('', $plaintxtByte);
        }

      // join array of blocks into single plaintext string
      $plaintext = implode('', $plaintxt);

        return $plaintext;
    }

    /**
     * AES encryption in CBC mode. This is the standard mode (the CTR methods
     * actually use Rijndael-128 in CTR mode, which - technically - isn't AES).
     * The data length is tucked as a 32-bit unsigned integer (little endian)
     * after the ciphertext. It supports AES-128, AES-192 and AES-256.
     *
     * @since 3.0.1
     *
     * @author Nicholas K. Dionysopoulos
     *
     * @param string $plaintext The data to encrypt
     * @param string $password  Encryption password
     * @param int    $nBits     Encryption key size. Can be 128, 192 or 256
     *
     * @return string The ciphertext
     */
    public static function AESEncryptCBC($plaintext, $password, $nBits = 128)
    {
        if (!($nBits == 128 || $nBits == 192 || $nBits == 256)) {
            return false;
        }  // standard allows 128/192/256 bit keys
        if (!function_exists('mcrypt_module_open')) {
            return false;
        }

            // Try to fetch cached key/iv or create them if they do not exist
        $lookupKey = $password.'-'.$nBits;
        if (array_key_exists($lookupKey, self::$passwords)) {
            $key = self::$passwords[$lookupKey]['key'];
            $iv = self::$passwords[$lookupKey]['iv'];
        } else {
            // use AES itself to encrypt password to get cipher key (using plain password as source for
            // key expansion) - gives us well encrypted key
            $nBytes = $nBits / 8;  // no bytes in key
            $pwBytes = array();
            for ($i = 0; $i < $nBytes; ++$i) {
                $pwBytes[$i] = ord(substr($password, $i, 1)) & 0xff;
            }
            $key = self::Cipher($pwBytes, self::KeyExpansion($pwBytes));
            $key = array_merge($key, array_slice($key, 0, $nBytes - 16));  // expand key to 16/24/32 bytes long
            $newKey = '';
            foreach ($key as $int) {
                $newKey .= chr($int);
            }
            $key = $newKey;

            // Create an Initialization Vector (IV) based on the password, using the same technique as for the key
            $nBytes = 16;  // AES uses a 128 -bit (16 byte) block size, hence the IV size is always 16 bytes
            $pwBytes = array();
            for ($i = 0; $i < $nBytes; ++$i) {
                $pwBytes[$i] = ord(substr($password, $i, 1)) & 0xff;
            }
            $iv = self::Cipher($pwBytes, self::KeyExpansion($pwBytes));
            $newIV = '';
            foreach ($iv as $int) {
                $newIV .= chr($int);
            }
            $iv = $newIV;

            self::$passwords[$lookupKey]['key'] = $key;
            self::$passwords[$lookupKey]['iv'] = $iv;
        }

        $td = mcrypt_module_open(MCRYPT_RIJNDAEL_128, '', MCRYPT_MODE_CBC, '');
        mcrypt_generic_init($td, $key, $iv);
        $ciphertext = mcrypt_generic($td, $plaintext);
        mcrypt_generic_deinit($td);

        $ciphertext .= pack('V', strlen($plaintext));

        return $ciphertext;
    }

    /**
     * AES decryption in CBC mode. This is the standard mode (the CTR methods
     * actually use Rijndael-128 in CTR mode, which - technically - isn't AES).
     *
     * Supports AES-128, AES-192 and AES-256. It supposes that the last 4 bytes
     * contained a little-endian unsigned long integer representing the unpadded
     * data length.
     *
     * @since 3.0.1
     *
     * @author Nicholas K. Dionysopoulos
     *
     * @param string $ciphertext The data to encrypt
     * @param string $password   Encryption password
     * @param int    $nBits      Encryption key size. Can be 128, 192 or 256
     *
     * @return string The plaintext
     */
    public static function AESDecryptCBC($ciphertext, $password, $nBits = 128)
    {
        if (!($nBits == 128 || $nBits == 192 || $nBits == 256)) {
            return false;
        }  // standard allows 128/192/256 bit keys
        if (!function_exists('mcrypt_module_open')) {
            return false;
        }

        // Try to fetch cached key/iv or create them if they do not exist
        $lookupKey = $password.'-'.$nBits;
        if (array_key_exists($lookupKey, self::$passwords)) {
            $key = self::$passwords[$lookupKey]['key'];
            $iv = self::$passwords[$lookupKey]['iv'];
        } else {
            // use AES itself to encrypt password to get cipher key (using plain password as source for
            // key expansion) - gives us well encrypted key
            $nBytes = $nBits / 8;  // no bytes in key
            $pwBytes = array();
            for ($i = 0; $i < $nBytes; ++$i) {
                $pwBytes[$i] = ord(substr($password, $i, 1)) & 0xff;
            }
            $key = self::Cipher($pwBytes, self::KeyExpansion($pwBytes));
            $key = array_merge($key, array_slice($key, 0, $nBytes - 16));  // expand key to 16/24/32 bytes long
            $newKey = '';
            foreach ($key as $int) {
                $newKey .= chr($int);
            }
            $key = $newKey;

            // Create an Initialization Vector (IV) based on the password, using the same technique as for the key
            $nBytes = 16;  // AES uses a 128 -bit (16 byte) block size, hence the IV size is always 16 bytes
            $pwBytes = array();
            for ($i = 0; $i < $nBytes; ++$i) {
                $pwBytes[$i] = ord(substr($password, $i, 1)) & 0xff;
            }
            $iv = self::Cipher($pwBytes, self::KeyExpansion($pwBytes));
            $newIV = '';
            foreach ($iv as $int) {
                $newIV .= chr($int);
            }
            $iv = $newIV;

            self::$passwords[$lookupKey]['key'] = $key;
            self::$passwords[$lookupKey]['iv'] = $iv;
        }

        // Read the data size
        $data_size = unpack('V', substr($ciphertext, -4));

        // Decrypt
        $td = mcrypt_module_open(MCRYPT_RIJNDAEL_128, '', MCRYPT_MODE_CBC, '');
        mcrypt_generic_init($td, $key, $iv);
        $plaintext = mdecrypt_generic($td, substr($ciphertext, 0, -4));
        mcrypt_generic_deinit($td);

        // Trim padding, if necessary
        if (strlen($plaintext) > $data_size) {
            $plaintext = substr($plaintext, 0, $data_size);
        }

        return $plaintext;
    }
}
libraries/classes/vendor/lessphp/lessc.inc.php000060400000355314152455721620015542 0ustar00<?php

/**
 * lessphp v0.5.0
 * http://leafo.net/lessphp
 *
 * LESS CSS compiler, adapted from http://lesscss.org
 *
 * Copyright 2013, Leaf Corcoran <leafot@gmail.com>
 * Licensed under MIT or GPLv3, see LICENSE
 */


/**
 * The LESS compiler and parser.
 *
 * Converting LESS to CSS is a three stage process. The incoming file is parsed
 * by `lessc_parser` into a syntax tree, then it is compiled into another tree
 * representing the CSS structure by `lessc`. The CSS tree is fed into a
 * formatter, like `lessc_formatter` which then outputs CSS as a string.
 *
 * During the first compile, all values are *reduced*, which means that their
 * types are brought to the lowest form before being dump as strings. This
 * handles math equations, variable dereferences, and the like.
 *
 * The `parse` function of `lessc` is the entry point.
 *
 * In summary:
 *
 * The `lessc` class creates an instance of the parser, feeds it LESS code,
 * then transforms the resulting tree to a CSS tree. This class also holds the
 * evaluation context, such as all available mixins and variables at any given
 * time.
 *
 * The `lessc_parser` class is only concerned with parsing its input.
 *
 * The `lessc_formatter` takes a CSS tree, and dumps it to a formatted string,
 * handling things like indentation.
 */
class lessc {
    static public $VERSION = "v0.5.0";

    static public $TRUE = array("keyword", "true");
    static public $FALSE = array("keyword", "false");

    protected $libFunctions = array();
    protected $registeredVars = array();
    protected $preserveComments = false;

    public $vPrefix = '@'; // prefix of abstract properties
    public $mPrefix = '$'; // prefix of abstract blocks
    public $parentSelector = '&';

    public $importDisabled = false;
    public $importDir = '';

    protected $numberPrecision = null;

    protected $allParsedFiles = array();

    // set to the parser that generated the current line when compiling
    // so we know how to create error messages
    protected $sourceParser = null;
    protected $sourceLoc = null;

    static protected $nextImportId = 0; // uniquely identify imports

    // attempts to find the path of an import url, returns null for css files
    protected function findImport($url) {
        foreach ((array)$this->importDir as $dir) {
            $full = $dir.(substr($dir, -1) != '/' ? '/' : '').$url;
            if ($this->fileExists($file = $full.'.less') || $this->fileExists($file = $full)) {
                return $file;
            }
        }

        return null;
    }

    protected function fileExists($name) {
        return is_file($name);
    }

    public static function compressList($items, $delim) {
        if (!isset($items[1]) && isset($items[0])) return $items[0];
        else return array('list', $delim, $items);
    }

    public static function preg_quote($what) {
        return preg_quote($what, '/');
    }

    protected function tryImport($importPath, $parentBlock, $out) {
        if ($importPath[0] == "function" && $importPath[1] == "url") {
            $importPath = $this->flattenList($importPath[2]);
        }

        $str = $this->coerceString($importPath);
        if ($str === null) return false;

        $url = $this->compileValue($this->lib_e($str));

        // don't import if it ends in css
        if (substr_compare($url, '.css', -4, 4) === 0) return false;

        $realPath = $this->findImport($url);

        if ($realPath === null) return false;

        if ($this->importDisabled) {
            return array(false, "/* import disabled */");
        }

        if (isset($this->allParsedFiles[realpath($realPath)])) {
            return array(false, null);
        }

        $this->addParsedFile($realPath);
        $parser = $this->makeParser($realPath);
        $root = $parser->parse(file_get_contents($realPath));

        // set the parents of all the block props
        foreach ($root->props as $prop) {
            if ($prop[0] == "block") {
                $prop[1]->parent = $parentBlock;
            }
        }

        // copy mixins into scope, set their parents
        // bring blocks from import into current block
        // TODO: need to mark the source parser these came from this file
        foreach ($root->children as $childName => $child) {
            if (isset($parentBlock->children[$childName])) {
                $parentBlock->children[$childName] = array_merge(
                    $parentBlock->children[$childName],
                    $child);
            } else {
                $parentBlock->children[$childName] = $child;
            }
        }

        $pi = pathinfo($realPath);
        $dir = $pi["dirname"];

        list($top, $bottom) = $this->sortProps($root->props, true);
        $this->compileImportedProps($top, $parentBlock, $out, $parser, $dir);

        return array(true, $bottom, $parser, $dir);
    }

    protected function compileImportedProps($props, $block, $out, $sourceParser, $importDir) {
        $oldSourceParser = $this->sourceParser;

        $oldImport = $this->importDir;

        // TODO: this is because the importDir api is stupid
        $this->importDir = (array)$this->importDir;
        array_unshift($this->importDir, $importDir);

        foreach ($props as $prop) {
            $this->compileProp($prop, $block, $out);
        }

        $this->importDir = $oldImport;
        $this->sourceParser = $oldSourceParser;
    }

    /**
     * Recursively compiles a block.
     *
     * A block is analogous to a CSS block in most cases. A single LESS document
     * is encapsulated in a block when parsed, but it does not have parent tags
     * so all of it's children appear on the root level when compiled.
     *
     * Blocks are made up of props and children.
     *
     * Props are property instructions, array tuples which describe an action
     * to be taken, eg. write a property, set a variable, mixin a block.
     *
     * The children of a block are just all the blocks that are defined within.
     * This is used to look up mixins when performing a mixin.
     *
     * Compiling the block involves pushing a fresh environment on the stack,
     * and iterating through the props, compiling each one.
     *
     * See lessc::compileProp()
     *
     */
    protected function compileBlock($block) {
        switch ($block->type) {
        case "root":
            $this->compileRoot($block);
            break;
        case null:
            $this->compileCSSBlock($block);
            break;
        case "media":
            $this->compileMedia($block);
            break;
        case "directive":
            $name = "@" . $block->name;
            if (!empty($block->value)) {
                $name .= " " . $this->compileValue($this->reduce($block->value));
            }

            $this->compileNestedBlock($block, array($name));
            break;
        default:
            $this->throwError("unknown block type: $block->type\n");
        }
    }

    protected function compileCSSBlock($block) {
        $env = $this->pushEnv();

        $selectors = $this->compileSelectors($block->tags);
        $env->selectors = $this->multiplySelectors($selectors);
        $out = $this->makeOutputBlock(null, $env->selectors);

        $this->scope->children[] = $out;
        $this->compileProps($block, $out);

        $block->scope = $env; // mixins carry scope with them!
        $this->popEnv();
    }

    protected function compileMedia($media) {
        $env = $this->pushEnv($media);
        $parentScope = $this->mediaParent($this->scope);

        $query = $this->compileMediaQuery($this->multiplyMedia($env));

        $this->scope = $this->makeOutputBlock($media->type, array($query));
        $parentScope->children[] = $this->scope;

        $this->compileProps($media, $this->scope);

        if (count($this->scope->lines) > 0) {
            $orphanSelelectors = $this->findClosestSelectors();
            if (!is_null($orphanSelelectors)) {
                $orphan = $this->makeOutputBlock(null, $orphanSelelectors);
                $orphan->lines = $this->scope->lines;
                array_unshift($this->scope->children, $orphan);
                $this->scope->lines = array();
            }
        }

        $this->scope = $this->scope->parent;
        $this->popEnv();
    }

    protected function mediaParent($scope) {
        while (!empty($scope->parent)) {
            if (!empty($scope->type) && $scope->type != "media") {
                break;
            }
            $scope = $scope->parent;
        }

        return $scope;
    }

    protected function compileNestedBlock($block, $selectors) {
        $this->pushEnv($block);
        $this->scope = $this->makeOutputBlock($block->type, $selectors);
        $this->scope->parent->children[] = $this->scope;

        $this->compileProps($block, $this->scope);

        $this->scope = $this->scope->parent;
        $this->popEnv();
    }

    protected function compileRoot($root) {
        $this->pushEnv();
        $this->scope = $this->makeOutputBlock($root->type);
        $this->compileProps($root, $this->scope);
        $this->popEnv();
    }

    protected function compileProps($block, $out) {
        foreach ($this->sortProps($block->props) as $prop) {
            $this->compileProp($prop, $block, $out);
        }
        $out->lines = $this->deduplicate($out->lines);
    }

    /**
     * Deduplicate lines in a block. Comments are not deduplicated. If a
     * duplicate rule is detected, the comments immediately preceding each
     * occurence are consolidated.
     */
    protected function deduplicate($lines) {
        $unique = array();
        $comments = array();

        foreach ($lines as $line) {
            if (strpos($line, '/*') === 0) {
                $comments[] = $line;
                continue;
            }
            if (!in_array($line, $unique)) {
                $unique[] = $line;
            }
            array_splice($unique, array_search($line, $unique), 0, $comments);
            $comments = array();
        }
        return array_merge($unique, $comments);
    }

    protected function sortProps($props, $split = false) {
        $vars = array();
        $imports = array();
        $other = array();
        $stack = array();

        foreach ($props as $prop) {
            switch ($prop[0]) {
            case "comment":
                $stack[] = $prop;
                break;
            case "assign":
                $stack[] = $prop;
                if (isset($prop[1][0]) && $prop[1][0] == $this->vPrefix) {
                    $vars = array_merge($vars, $stack);
                } else {
                    $other = array_merge($other, $stack);
                }
                $stack = array();
                break;
            case "import":
                $id = self::$nextImportId++;
                $prop[] = $id;
                $stack[] = $prop;
                $imports = array_merge($imports, $stack);
                $other[] = array("import_mixin", $id);
                $stack = array();
                break;
            default:
                $stack[] = $prop;
                $other = array_merge($other, $stack);
                $stack = array();
                break;
            }
        }
        $other = array_merge($other, $stack);

        if ($split) {
            return array(array_merge($imports, $vars), $other);
        } else {
            return array_merge($imports, $vars, $other);
        }
    }

    protected function compileMediaQuery($queries) {
        $compiledQueries = array();
        foreach ($queries as $query) {
            $parts = array();
            foreach ($query as $q) {
                switch ($q[0]) {
                case "mediaType":
                    $parts[] = implode(" ", array_slice($q, 1));
                    break;
                case "mediaExp":
                    if (isset($q[2])) {
                        $parts[] = "($q[1]: " .
                            $this->compileValue($this->reduce($q[2])) . ")";
                    } else {
                        $parts[] = "($q[1])";
                    }
                    break;
                case "variable":
                    $parts[] = $this->compileValue($this->reduce($q));
                break;
                }
            }

            if (count($parts) > 0) {
                $compiledQueries[] =  implode(" and ", $parts);
            }
        }

        $out = "@media";
        if (!empty($parts)) {
            $out .= " " .
                implode($this->formatter->selectorSeparator, $compiledQueries);
        }
        return $out;
    }

    protected function multiplyMedia($env, $childQueries = null) {
        if (is_null($env) ||
            !empty($env->block->type) && $env->block->type != "media"
        ) {
            return $childQueries;
        }

        // plain old block, skip
        if (empty($env->block->type)) {
            return $this->multiplyMedia($env->parent, $childQueries);
        }

        $out = array();
        $queries = $env->block->queries;
        if (is_null($childQueries)) {
            $out = $queries;
        } else {
            foreach ($queries as $parent) {
                foreach ($childQueries as $child) {
                    $out[] = array_merge($parent, $child);
                }
            }
        }

        return $this->multiplyMedia($env->parent, $out);
    }

    protected function expandParentSelectors(&$tag, $replace) {
        $parts = explode("$&$", $tag);
        $count = 0;
        foreach ($parts as &$part) {
            $part = str_replace($this->parentSelector, $replace, $part, $c);
            $count += $c;
        }
        $tag = implode($this->parentSelector, $parts);
        return $count;
    }

    protected function findClosestSelectors() {
        $env = $this->env;
        $selectors = null;
        while ($env !== null) {
            if (isset($env->selectors)) {
                $selectors = $env->selectors;
                break;
            }
            $env = $env->parent;
        }

        return $selectors;
    }


    // multiply $selectors against the nearest selectors in env
    protected function multiplySelectors($selectors) {
        // find parent selectors

        $parentSelectors = $this->findClosestSelectors();
        if (is_null($parentSelectors)) {
            // kill parent reference in top level selector
            foreach ($selectors as &$s) {
                $this->expandParentSelectors($s, "");
            }

            return $selectors;
        }

        $out = array();
        foreach ($parentSelectors as $parent) {
            foreach ($selectors as $child) {
                $count = $this->expandParentSelectors($child, $parent);

                // don't prepend the parent tag if & was used
                if ($count > 0) {
                    $out[] = trim($child);
                } else {
                    $out[] = trim($parent . ' ' . $child);
                }
            }
        }

        return $out;
    }

    // reduces selector expressions
    protected function compileSelectors($selectors) {
        $out = array();

        foreach ($selectors as $s) {
            if (is_array($s)) {
                list(, $value) = $s;
                $out[] = trim($this->compileValue($this->reduce($value)));
            } else {
                $out[] = $s;
            }
        }

        return $out;
    }

    protected function eq($left, $right) {
        return $left == $right;
    }

    protected function patternMatch($block, $orderedArgs, $keywordArgs) {
        // match the guards if it has them
        // any one of the groups must have all its guards pass for a match
        if (!empty($block->guards)) {
            $groupPassed = false;
            foreach ($block->guards as $guardGroup) {
                foreach ($guardGroup as $guard) {
                    $this->pushEnv();
                    $this->zipSetArgs($block->args, $orderedArgs, $keywordArgs);

                    $negate = false;
                    if ($guard[0] == "negate") {
                        $guard = $guard[1];
                        $negate = true;
                    }

                    $passed = $this->reduce($guard) == self::$TRUE;
                    if ($negate) $passed = !$passed;

                    $this->popEnv();

                    if ($passed) {
                        $groupPassed = true;
                    } else {
                        $groupPassed = false;
                        break;
                    }
                }

                if ($groupPassed) break;
            }

            if (!$groupPassed) {
                return false;
            }
        }

        if (empty($block->args)) {
            return $block->isVararg || empty($orderedArgs) && empty($keywordArgs);
        }

        $remainingArgs = $block->args;
        if ($keywordArgs) {
            $remainingArgs = array();
            foreach ($block->args as $arg) {
                if ($arg[0] == "arg" && isset($keywordArgs[$arg[1]])) {
                    continue;
                }

                $remainingArgs[] = $arg;
            }
        }

        $i = -1; // no args
        // try to match by arity or by argument literal
        foreach ($remainingArgs as $i => $arg) {
            switch ($arg[0]) {
            case "lit":
                if (empty($orderedArgs[$i]) || !$this->eq($arg[1], $orderedArgs[$i])) {
                    return false;
                }
                break;
            case "arg":
                // no arg and no default value
                if (!isset($orderedArgs[$i]) && !isset($arg[2])) {
                    return false;
                }
                break;
            case "rest":
                $i--; // rest can be empty
                break 2;
            }
        }

        if ($block->isVararg) {
            return true; // not having enough is handled above
        } else {
            $numMatched = $i + 1;
            // greater than because default values always match
            return $numMatched >= count($orderedArgs);
        }
    }

    protected function patternMatchAll($blocks, $orderedArgs, $keywordArgs, $skip=array()) {
        $matches = null;
        foreach ($blocks as $block) {
            // skip seen blocks that don't have arguments
            if (isset($skip[$block->id]) && !isset($block->args)) {
                continue;
            }

            if ($this->patternMatch($block, $orderedArgs, $keywordArgs)) {
                $matches[] = $block;
            }
        }

        return $matches;
    }

    // attempt to find blocks matched by path and args
    protected function findBlocks($searchIn, $path, $orderedArgs, $keywordArgs, $seen=array()) {
        if ($searchIn == null) return null;
        if (isset($seen[$searchIn->id])) return null;
        $seen[$searchIn->id] = true;

        $name = $path[0];

        if (isset($searchIn->children[$name])) {
            $blocks = $searchIn->children[$name];
            if (count($path) == 1) {
                $matches = $this->patternMatchAll($blocks, $orderedArgs, $keywordArgs, $seen);
                if (!empty($matches)) {
                    // This will return all blocks that match in the closest
                    // scope that has any matching block, like lessjs
                    return $matches;
                }
            } else {
                $matches = array();
                foreach ($blocks as $subBlock) {
                    $subMatches = $this->findBlocks($subBlock,
                        array_slice($path, 1), $orderedArgs, $keywordArgs, $seen);

                    if (!is_null($subMatches)) {
                        foreach ($subMatches as $sm) {
                            $matches[] = $sm;
                        }
                    }
                }

                return count($matches) > 0 ? $matches : null;
            }
        }
        if ($searchIn->parent === $searchIn) return null;
        return $this->findBlocks($searchIn->parent, $path, $orderedArgs, $keywordArgs, $seen);
    }

    // sets all argument names in $args to either the default value
    // or the one passed in through $values
    protected function zipSetArgs($args, $orderedValues, $keywordValues) {
        $assignedValues = array();

        $i = 0;
        foreach ($args as $a) {
            if ($a[0] == "arg") {
                if (isset($keywordValues[$a[1]])) {
                    // has keyword arg
                    $value = $keywordValues[$a[1]];
                } elseif (isset($orderedValues[$i])) {
                    // has ordered arg
                    $value = $orderedValues[$i];
                    $i++;
                } elseif (isset($a[2])) {
                    // has default value
                    $value = $a[2];
                } else {
                    $this->throwError("Failed to assign arg " . $a[1]);
                    $value = null; // :(
                }

                $value = $this->reduce($value);
                $this->set($a[1], $value);
                $assignedValues[] = $value;
            } else {
                // a lit
                $i++;
            }
        }

        // check for a rest
        $last = end($args);
        if ($last[0] == "rest") {
            $rest = array_slice($orderedValues, count($args) - 1);
            $this->set($last[1], $this->reduce(array("list", " ", $rest)));
        }

        // wow is this the only true use of PHP's + operator for arrays?
        $this->env->arguments = $assignedValues + $orderedValues;
    }

    // compile a prop and update $lines or $blocks appropriately
    protected function compileProp($prop, $block, $out) {
        // set error position context
        $this->sourceLoc = isset($prop[-1]) ? $prop[-1] : -1;

        switch ($prop[0]) {
        case 'assign':
            list(, $name, $value) = $prop;
            if ($name[0] == $this->vPrefix) {
                $this->set($name, $value);
            } else {
                $out->lines[] = $this->formatter->property($name,
                        $this->compileValue($this->reduce($value)));
            }
            break;
        case 'block':
            list(, $child) = $prop;
            $this->compileBlock($child);
            break;
        case 'mixin':
            list(, $path, $args, $suffix) = $prop;

            $orderedArgs = array();
            $keywordArgs = array();
            foreach ((array)$args as $arg) {
                $argval = null;
                switch ($arg[0]) {
                case "arg":
                    if (!isset($arg[2])) {
                        $orderedArgs[] = $this->reduce(array("variable", $arg[1]));
                    } else {
                        $keywordArgs[$arg[1]] = $this->reduce($arg[2]);
                    }
                    break;

                case "lit":
                    $orderedArgs[] = $this->reduce($arg[1]);
                    break;
                default:
                    $this->throwError("Unknown arg type: " . $arg[0]);
                }
            }

            $mixins = $this->findBlocks($block, $path, $orderedArgs, $keywordArgs);

            if ($mixins === null) {
                $this->throwError("{$prop[1][0]} is undefined");
            }

            foreach ($mixins as $mixin) {
                if ($mixin === $block && !$orderedArgs) {
                    continue;
                }

                $haveScope = false;
                if (isset($mixin->parent->scope)) {
                    $haveScope = true;
                    $mixinParentEnv = $this->pushEnv();
                    $mixinParentEnv->storeParent = $mixin->parent->scope;
                }

                $haveArgs = false;
                if (isset($mixin->args)) {
                    $haveArgs = true;
                    $this->pushEnv();
                    $this->zipSetArgs($mixin->args, $orderedArgs, $keywordArgs);
                }

                $oldParent = $mixin->parent;
                if ($mixin != $block) $mixin->parent = $block;

                foreach ($this->sortProps($mixin->props) as $subProp) {
                    if ($suffix !== null &&
                        $subProp[0] == "assign" &&
                        is_string($subProp[1]) &&
                        $subProp[1]{0} != $this->vPrefix
                    ) {
                        $subProp[2] = array(
                            'list', ' ',
                            array($subProp[2], array('keyword', $suffix))
                        );
                    }

                    $this->compileProp($subProp, $mixin, $out);
                }

                $mixin->parent = $oldParent;

                if ($haveArgs) $this->popEnv();
                if ($haveScope) $this->popEnv();
            }

            break;
        case 'raw':
            $out->lines[] = $prop[1];
            break;
        case "directive":
            list(, $name, $value) = $prop;
            $out->lines[] = "@$name " . $this->compileValue($this->reduce($value)).';';
            break;
        case "comment":
            $out->lines[] = $prop[1];
            break;
        case "import":
            list(, $importPath, $importId) = $prop;
            $importPath = $this->reduce($importPath);

            if (!isset($this->env->imports)) {
                $this->env->imports = array();
            }

            $result = $this->tryImport($importPath, $block, $out);

            $this->env->imports[$importId] = $result === false ?
                array(false, "@import " . $this->compileValue($importPath).";") :
                $result;

            break;
        case "import_mixin":
            list(,$importId) = $prop;
            $import = $this->env->imports[$importId];
            if ($import[0] === false) {
                if (isset($import[1])) {
                    $out->lines[] = $import[1];
                }
            } else {
                list(, $bottom, $parser, $importDir) = $import;
                $this->compileImportedProps($bottom, $block, $out, $parser, $importDir);
            }

            break;
        default:
            $this->throwError("unknown op: {$prop[0]}\n");
        }
    }


    /**
     * Compiles a primitive value into a CSS property value.
     *
     * Values in lessphp are typed by being wrapped in arrays, their format is
     * typically:
     *
     *     array(type, contents [, additional_contents]*)
     *
     * The input is expected to be reduced. This function will not work on
     * things like expressions and variables.
     */
    public function compileValue($value) {
        switch ($value[0]) {
        case 'list':
            // [1] - delimiter
            // [2] - array of values
            return implode($value[1], array_map(array($this, 'compileValue'), $value[2]));
        case 'raw_color':
            if (!empty($this->formatter->compressColors)) {
                return $this->compileValue($this->coerceColor($value));
            }
            return $value[1];
        case 'keyword':
            // [1] - the keyword
            return $value[1];
        case 'number':
            list(, $num, $unit) = $value;
            // [1] - the number
            // [2] - the unit
            if ($this->numberPrecision !== null) {
                $num = round($num, $this->numberPrecision);
            }
            return $num . $unit;
        case 'string':
            // [1] - contents of string (includes quotes)
            list(, $delim, $content) = $value;
            foreach ($content as &$part) {
                if (is_array($part)) {
                    $part = $this->compileValue($part);
                }
            }
            return $delim . implode($content) . $delim;
        case 'color':
            // [1] - red component (either number or a %)
            // [2] - green component
            // [3] - blue component
            // [4] - optional alpha component
            list(, $r, $g, $b) = $value;
            $r = round($r);
            $g = round($g);
            $b = round($b);

            if (count($value) == 5 && $value[4] != 1) { // rgba
                return 'rgba('.$r.','.$g.','.$b.','.$value[4].')';
            }

            $h = sprintf("#%02x%02x%02x", $r, $g, $b);

            if (!empty($this->formatter->compressColors)) {
                // Converting hex color to short notation (e.g. #003399 to #039)
                if ($h[1] === $h[2] && $h[3] === $h[4] && $h[5] === $h[6]) {
                    $h = '#' . $h[1] . $h[3] . $h[5];
                }
            }

            return $h;

        case 'function':
            list(, $name, $args) = $value;
            return $name.'('.$this->compileValue($args).')';
        default: // assumed to be unit
            $this->throwError("unknown value type: $value[0]");
        }
    }

    protected function lib_pow($args) {
        list($base, $exp) = $this->assertArgs($args, 2, "pow");
        return pow($this->assertNumber($base), $this->assertNumber($exp));
    }

    protected function lib_pi() {
        return pi();
    }

    protected function lib_mod($args) {
        list($a, $b) = $this->assertArgs($args, 2, "mod");
        return $this->assertNumber($a) % $this->assertNumber($b);
    }

    protected function lib_tan($num) {
        return tan($this->assertNumber($num));
    }

    protected function lib_sin($num) {
        return sin($this->assertNumber($num));
    }

    protected function lib_cos($num) {
        return cos($this->assertNumber($num));
    }

    protected function lib_atan($num) {
        $num = atan($this->assertNumber($num));
        return array("number", $num, "rad");
    }

    protected function lib_asin($num) {
        $num = asin($this->assertNumber($num));
        return array("number", $num, "rad");
    }

    protected function lib_acos($num) {
        $num = acos($this->assertNumber($num));
        return array("number", $num, "rad");
    }

    protected function lib_sqrt($num) {
        return sqrt($this->assertNumber($num));
    }

    protected function lib_extract($value) {
        list($list, $idx) = $this->assertArgs($value, 2, "extract");
        $idx = $this->assertNumber($idx);
        // 1 indexed
        if ($list[0] == "list" && isset($list[2][$idx - 1])) {
            return $list[2][$idx - 1];
        }
    }

    protected function lib_isnumber($value) {
        return $this->toBool($value[0] == "number");
    }

    protected function lib_isstring($value) {
        return $this->toBool($value[0] == "string");
    }

    protected function lib_iscolor($value) {
        return $this->toBool($this->coerceColor($value));
    }

    protected function lib_iskeyword($value) {
        return $this->toBool($value[0] == "keyword");
    }

    protected function lib_ispixel($value) {
        return $this->toBool($value[0] == "number" && $value[2] == "px");
    }

    protected function lib_ispercentage($value) {
        return $this->toBool($value[0] == "number" && $value[2] == "%");
    }

    protected function lib_isem($value) {
        return $this->toBool($value[0] == "number" && $value[2] == "em");
    }

    protected function lib_isrem($value) {
        return $this->toBool($value[0] == "number" && $value[2] == "rem");
    }

    protected function lib_rgbahex($color) {
        $color = $this->coerceColor($color);
        if (is_null($color)) {
            $this->throwError("color expected for rgbahex");
        }

        return sprintf("#%02x%02x%02x%02x",
            isset($color[4]) ? $color[4] * 255 : 255,
            $color[1],
            $color[2],
            $color[3]
        );
    }

    protected function lib_argb($color){
        return $this->lib_rgbahex($color);
    }

    /**
     * Given an url, decide whether to output a regular link or the base64-encoded contents of the file
     *
     * @param  array  $value either an argument list (two strings) or a single string
     * @return string        formatted url(), either as a link or base64-encoded
     */
    protected function lib_data_uri($value) {
        $mime = ($value[0] === 'list') ? $value[2][0][2] : null;
        $url = ($value[0] === 'list') ? $value[2][1][2][0] : $value[2][0];

        $fullpath = $this->findImport($url);

        if ($fullpath && ($fsize = filesize($fullpath)) !== false) {
            // IE8 can't handle data uris larger than 32KB
            if ($fsize/1024 < 32) {
                if (is_null($mime)) {
                    if (class_exists('finfo')) { // php 5.3+
                        $finfo = new finfo(FILEINFO_MIME);
                        $mime = explode('; ', $finfo->file($fullpath));
                        $mime = $mime[0];
                    } elseif (function_exists('mime_content_type')) { // PHP 5.2
                        $mime = mime_content_type($fullpath);
                    }
                }

                if (!is_null($mime)) // fallback if the mime type is still unknown
                    $url = sprintf('data:%s;base64,%s', $mime, base64_encode(file_get_contents($fullpath)));
            }
        }

        return 'url("'.$url.'")';
    }

    // utility func to unquote a string
    protected function lib_e($arg) {
        switch ($arg[0]) {
            case "list":
                $items = $arg[2];
                if (isset($items[0])) {
                    return $this->lib_e($items[0]);
                }
                $this->throwError("unrecognised input");
            case "string":
                $arg[1] = "";
                return $arg;
            case "keyword":
                return $arg;
            default:
                return array("keyword", $this->compileValue($arg));
        }
    }

    protected function lib__sprintf($args) {
        if ($args[0] != "list") return $args;
        $values = $args[2];
        $string = array_shift($values);
        $template = $this->compileValue($this->lib_e($string));

        $i = 0;
        if (preg_match_all('/%[dsa]/', $template, $m)) {
            foreach ($m[0] as $match) {
                $val = isset($values[$i]) ?
                    $this->reduce($values[$i]) : array('keyword', '');

                // lessjs compat, renders fully expanded color, not raw color
                if ($color = $this->coerceColor($val)) {
                    $val = $color;
                }

                $i++;
                $rep = $this->compileValue($this->lib_e($val));
                $template = preg_replace('/'.self::preg_quote($match).'/',
                    $rep, $template, 1);
            }
        }

        $d = $string[0] == "string" ? $string[1] : '"';
        return array("string", $d, array($template));
    }

    protected function lib_floor($arg) {
        $value = $this->assertNumber($arg);
        return array("number", floor($value), $arg[2]);
    }

    protected function lib_ceil($arg) {
        $value = $this->assertNumber($arg);
        return array("number", ceil($value), $arg[2]);
    }

    protected function lib_round($arg) {
        if ($arg[0] != "list") {
            $value = $this->assertNumber($arg);
            return array("number", round($value), $arg[2]);
        } else {
            $value = $this->assertNumber($arg[2][0]);
            $precision = $this->assertNumber($arg[2][1]);
            return array("number", round($value, $precision), $arg[2][0][2]);
        }
    }

    protected function lib_unit($arg) {
        if ($arg[0] == "list") {
            list($number, $newUnit) = $arg[2];
            return array("number", $this->assertNumber($number),
                $this->compileValue($this->lib_e($newUnit)));
        } else {
            return array("number", $this->assertNumber($arg), "");
        }
    }

    /**
     * Helper function to get arguments for color manipulation functions.
     * takes a list that contains a color like thing and a percentage
     */
    public function colorArgs($args) {
        if ($args[0] != 'list' || count($args[2]) < 2) {
            return array(array('color', 0, 0, 0), 0);
        }
        list($color, $delta) = $args[2];
        $color = $this->assertColor($color);
        $delta = floatval($delta[1]);

        return array($color, $delta);
    }

    protected function lib_darken($args) {
        list($color, $delta) = $this->colorArgs($args);

        $hsl = $this->toHSL($color);
        $hsl[3] = $this->clamp($hsl[3] - $delta, 100);
        return $this->toRGB($hsl);
    }

    protected function lib_lighten($args) {
        list($color, $delta) = $this->colorArgs($args);

        $hsl = $this->toHSL($color);
        $hsl[3] = $this->clamp($hsl[3] + $delta, 100);
        return $this->toRGB($hsl);
    }

    protected function lib_saturate($args) {
        list($color, $delta) = $this->colorArgs($args);

        $hsl = $this->toHSL($color);
        $hsl[2] = $this->clamp($hsl[2] + $delta, 100);
        return $this->toRGB($hsl);
    }

    protected function lib_desaturate($args) {
        list($color, $delta) = $this->colorArgs($args);

        $hsl = $this->toHSL($color);
        $hsl[2] = $this->clamp($hsl[2] - $delta, 100);
        return $this->toRGB($hsl);
    }

    protected function lib_spin($args) {
        list($color, $delta) = $this->colorArgs($args);

        $hsl = $this->toHSL($color);

        $hsl[1] = $hsl[1] + $delta % 360;
        if ($hsl[1] < 0) {
            $hsl[1] += 360;
        }

        return $this->toRGB($hsl);
    }

    protected function lib_fadeout($args) {
        list($color, $delta) = $this->colorArgs($args);
        $color[4] = $this->clamp((isset($color[4]) ? $color[4] : 1) - $delta/100);
        return $color;
    }

    protected function lib_fadein($args) {
        list($color, $delta) = $this->colorArgs($args);
        $color[4] = $this->clamp((isset($color[4]) ? $color[4] : 1) + $delta/100);
        return $color;
    }

    protected function lib_hue($color) {
        $hsl = $this->toHSL($this->assertColor($color));
        return round($hsl[1]);
    }

    protected function lib_saturation($color) {
        $hsl = $this->toHSL($this->assertColor($color));
        return round($hsl[2]);
    }

    protected function lib_lightness($color) {
        $hsl = $this->toHSL($this->assertColor($color));
        return round($hsl[3]);
    }

    // get the alpha of a color
    // defaults to 1 for non-colors or colors without an alpha
    protected function lib_alpha($value) {
        if (!is_null($color = $this->coerceColor($value))) {
            return isset($color[4]) ? $color[4] : 1;
        }
    }

    // set the alpha of the color
    protected function lib_fade($args) {
        list($color, $alpha) = $this->colorArgs($args);
        $color[4] = $this->clamp($alpha / 100.0);
        return $color;
    }

    protected function lib_percentage($arg) {
        $num = $this->assertNumber($arg);
        return array("number", $num*100, "%");
    }

    /**
     * Mix color with white in variable proportion.
     *
     * It is the same as calling `mix(#ffffff, @color, @weight)`.
     *
     *     tint(@color, [@weight: 50%]);
     *
     * http://lesscss.org/functions/#color-operations-tint
     *
     * @return array Color
     */
    protected function lib_tint($args) {
        $white = ['color', 255, 255, 255];
        if ($args[0] == 'color') {
            return $this->lib_mix([ 'list', ',', [$white, $args] ]);
        } elseif ($args[0] == "list" && count($args[2]) == 2) {
            return $this->lib_mix([ $args[0], $args[1], [$white, $args[2][0], $args[2][1]] ]);
        } else {
            $this->throwError("tint expects (color, weight)");
        }
    }

    /**
     * Mix color with black in variable proportion.
     *
     * It is the same as calling `mix(#000000, @color, @weight)`
     *
     *     shade(@color, [@weight: 50%]);
     *
     * http://lesscss.org/functions/#color-operations-shade
     *
     * @return array Color
     */
    protected function lib_shade($args) {
        $black = ['color', 0, 0, 0];
        if ($args[0] == 'color') {
            return $this->lib_mix([ 'list', ',', [$black, $args] ]);
        } elseif ($args[0] == "list" && count($args[2]) == 2) {
            return $this->lib_mix([ $args[0], $args[1], [$black, $args[2][0], $args[2][1]] ]);
        } else {
            $this->throwError("shade expects (color, weight)");
        }
    }

    // mixes two colors by weight
    // mix(@color1, @color2, [@weight: 50%]);
    // http://sass-lang.com/docs/yardoc/Sass/Script/Functions.html#mix-instance_method
    protected function lib_mix($args) {
        if ($args[0] != "list" || count($args[2]) < 2)
            $this->throwError("mix expects (color1, color2, weight)");

        list($first, $second) = $args[2];
        $first = $this->assertColor($first);
        $second = $this->assertColor($second);

        $first_a = $this->lib_alpha($first);
        $second_a = $this->lib_alpha($second);

        if (isset($args[2][2])) {
            $weight = $args[2][2][1] / 100.0;
        } else {
            $weight = 0.5;
        }

        $w = $weight * 2 - 1;
        $a = $first_a - $second_a;

        $w1 = (($w * $a == -1 ? $w : ($w + $a)/(1 + $w * $a)) + 1) / 2.0;
        $w2 = 1.0 - $w1;

        $new = array('color',
            $w1 * $first[1] + $w2 * $second[1],
            $w1 * $first[2] + $w2 * $second[2],
            $w1 * $first[3] + $w2 * $second[3],
        );

        if ($first_a != 1.0 || $second_a != 1.0) {
            $new[] = $first_a * $weight + $second_a * ($weight - 1);
        }

        return $this->fixColor($new);
    }

    protected function lib_contrast($args) {
        $darkColor  = array('color', 0, 0, 0);
        $lightColor = array('color', 255, 255, 255);
        $threshold  = 0.43;

        if ( $args[0] == 'list' ) {
            $inputColor = ( isset($args[2][0]) ) ? $this->assertColor($args[2][0])  : $lightColor;
            $darkColor  = ( isset($args[2][1]) ) ? $this->assertColor($args[2][1])  : $darkColor;
            $lightColor = ( isset($args[2][2]) ) ? $this->assertColor($args[2][2])  : $lightColor;
            $threshold  = ( isset($args[2][3]) ) ? $this->assertNumber($args[2][3]) : $threshold;
        }
        else {
            $inputColor  = $this->assertColor($args);
        }

        $inputColor = $this->coerceColor($inputColor);
        $darkColor  = $this->coerceColor($darkColor);
        $lightColor = $this->coerceColor($lightColor);

        //Figure out which is actually light and dark!
        if ( $this->toLuma($darkColor) > $this->toLuma($lightColor) ) {
            $t  = $lightColor;
            $lightColor = $darkColor;
            $darkColor  = $t;
        }

        $inputColor_alpha = $this->lib_alpha($inputColor);
        if ( ( $this->toLuma($inputColor) * $inputColor_alpha) < $threshold) {
            return $lightColor;
        }
        return $darkColor;
    }

    private function toLuma($color) {
        list(, $r, $g, $b) = $this->coerceColor($color);

        $r = $r / 255;
        $g = $g / 255;
        $b = $b / 255;

        $r = ($r <= 0.03928) ? $r / 12.92 : pow((($r + 0.055) / 1.055), 2.4);
        $g = ($g <= 0.03928) ? $g / 12.92 : pow((($g + 0.055) / 1.055), 2.4);
        $b = ($b <= 0.03928) ? $b / 12.92 : pow((($b + 0.055) / 1.055), 2.4);

        return (0.2126 * $r) + (0.7152 * $g) + (0.0722 * $b);
    }

    protected function lib_luma($color) {
        return array("number", round($this->toLuma($color) * 100, 8), "%");
    }


    public function assertColor($value, $error = "expected color value") {
        $color = $this->coerceColor($value);
        if (is_null($color)) $this->throwError($error);
        return $color;
    }

    public function assertNumber($value, $error = "expecting number") {
        if ($value[0] == "number") return $value[1];
        $this->throwError($error);
    }

    public function assertArgs($value, $expectedArgs, $name="") {
        if ($expectedArgs == 1) {
            return $value;
        } else {
            if ($value[0] !== "list" || $value[1] != ",") $this->throwError("expecting list");
            $values = $value[2];
            $numValues = count($values);
            if ($expectedArgs != $numValues) {
                if ($name) {
                    $name = $name . ": ";
                }

                $this->throwError("${name}expecting $expectedArgs arguments, got $numValues");
            }

            return $values;
        }
    }

    protected function toHSL($color) {
        if ($color[0] === 'hsl') {
            return $color;
        }

        $r = $color[1] / 255;
        $g = $color[2] / 255;
        $b = $color[3] / 255;

        $min = min($r, $g, $b);
        $max = max($r, $g, $b);

        $L = ($min + $max) / 2;
        if ($min == $max) {
            $S = $H = 0;
        } else {
            if ($L < 0.5) {
                $S = ($max - $min) / ($max + $min);
            } else {
                $S = ($max - $min) / (2.0 - $max - $min);
            }
            if ($r == $max) {
                $H = ($g - $b) / ($max - $min);
            } elseif ($g == $max) {
                $H = 2.0 + ($b - $r) / ($max - $min);
            } elseif ($b == $max) {
                $H = 4.0 + ($r - $g) / ($max - $min);
            }

        }

        $out = array('hsl',
            ($H < 0 ? $H + 6 : $H)*60,
            $S * 100,
            $L * 100,
        );

        if (count($color) > 4) {
            // copy alpha
            $out[] = $color[4];
        }
        return $out;
    }

    protected function toRGB_helper($comp, $temp1, $temp2) {
        if ($comp < 0) {
            $comp += 1.0;
        } elseif ($comp > 1) {
            $comp -= 1.0;
        }

        if (6 * $comp < 1) {
            return $temp1 + ($temp2 - $temp1) * 6 * $comp;
        }
        if (2 * $comp < 1) {
            return $temp2;
        }
        if (3 * $comp < 2) {
            return $temp1 + ($temp2 - $temp1)*((2/3) - $comp) * 6;
        }

        return $temp1;
    }

    /**
     * Converts a hsl array into a color value in rgb.
     * Expects H to be in range of 0 to 360, S and L in 0 to 100
     */
    protected function toRGB($color) {
        if ($color[0] === 'color') {
            return $color;
        }

        $H = $color[1] / 360;
        $S = $color[2] / 100;
        $L = $color[3] / 100;

        if ($S == 0) {
            $r = $g = $b = $L;
        } else {
            $temp2 = $L < 0.5 ?
                $L * (1.0 + $S) :
                $L + $S - $L * $S;

            $temp1 = 2.0 * $L - $temp2;

            $r = $this->toRGB_helper($H + 1/3, $temp1, $temp2);
            $g = $this->toRGB_helper($H, $temp1, $temp2);
            $b = $this->toRGB_helper($H - 1/3, $temp1, $temp2);
        }

        // $out = array('color', round($r*255), round($g*255), round($b*255));
        $out = array('color', $r*255, $g*255, $b*255);
        if (count($color) > 4) {
            // copy alpha
            $out[] = $color[4];
        }
        return $out;
    }

    protected function clamp($v, $max = 1, $min = 0) {
        return min($max, max($min, $v));
    }

    /**
     * Convert the rgb, rgba, hsl color literals of function type
     * as returned by the parser into values of color type.
     */
    protected function funcToColor($func) {
        $fname = $func[1];
        if ($func[2][0] != 'list') {
            // need a list of arguments
            return false;
        }
        $rawComponents = $func[2][2];

        if ($fname == 'hsl' || $fname == 'hsla') {
            $hsl = array('hsl');
            $i = 0;
            foreach ($rawComponents as $c) {
                $val = $this->reduce($c);
                $val = isset($val[1]) ? floatval($val[1]) : 0;

                if ($i == 0) {
                    $clamp = 360;
                } elseif ($i < 3) {
                    $clamp = 100;
                } else {
                    $clamp = 1;
                }

                $hsl[] = $this->clamp($val, $clamp);
                $i++;
            }

            while (count($hsl) < 4) {
                $hsl[] = 0;
            }
            return $this->toRGB($hsl);

        } elseif ($fname == 'rgb' || $fname == 'rgba') {
            $components = array();
            $i = 1;
            foreach ($rawComponents as $c) {
                $c = $this->reduce($c);
                if ($i < 4) {
                    if ($c[0] == "number" && $c[2] == "%") {
                        $components[] = 255 * ($c[1] / 100);
                    } else {
                        $components[] = floatval($c[1]);
                    }
                } elseif ($i == 4) {
                    if ($c[0] == "number" && $c[2] == "%") {
                        $components[] = 1.0 * ($c[1] / 100);
                    } else {
                        $components[] = floatval($c[1]);
                    }
                } else break;

                $i++;
            }
            while (count($components) < 3) {
                $components[] = 0;
            }
            array_unshift($components, 'color');
            return $this->fixColor($components);
        }

        return false;
    }

    protected function reduce($value, $forExpression = false) {
        switch ($value[0]) {
        case "interpolate":
            $reduced = $this->reduce($value[1]);
            $var = $this->compileValue($reduced);
            $res = $this->reduce(array("variable", $this->vPrefix . $var));

            if ($res[0] == "raw_color") {
                $res = $this->coerceColor($res);
            }

            if (empty($value[2])) $res = $this->lib_e($res);

            return $res;
        case "variable":
            $key = $value[1];
            if (is_array($key)) {
                $key = $this->reduce($key);
                $key = $this->vPrefix . $this->compileValue($this->lib_e($key));
            }

            $seen =& $this->env->seenNames;

            if (!empty($seen[$key])) {
                $this->throwError("infinite loop detected: $key");
            }

            $seen[$key] = true;
            $out = $this->reduce($this->get($key));
            $seen[$key] = false;
            return $out;
        case "list":
            foreach ($value[2] as &$item) {
                $item = $this->reduce($item, $forExpression);
            }
            return $value;
        case "expression":
            return $this->evaluate($value);
        case "string":
            foreach ($value[2] as &$part) {
                if (is_array($part)) {
                    $strip = $part[0] == "variable";
                    $part = $this->reduce($part);
                    if ($strip) $part = $this->lib_e($part);
                }
            }
            return $value;
        case "escape":
            list(,$inner) = $value;
            return $this->lib_e($this->reduce($inner));
        case "function":
            $color = $this->funcToColor($value);
            if ($color) return $color;

            list(, $name, $args) = $value;
            if ($name == "%") $name = "_sprintf";

            $f = isset($this->libFunctions[$name]) ?
                $this->libFunctions[$name] : array($this, 'lib_'.str_replace('-', '_', $name));

            if (is_callable($f)) {
                if ($args[0] == 'list')
                    $args = self::compressList($args[2], $args[1]);

                $ret = call_user_func($f, $this->reduce($args, true), $this);

                if (is_null($ret)) {
                    return array("string", "", array(
                        $name, "(", $args, ")"
                    ));
                }

                // convert to a typed value if the result is a php primitive
                if (is_numeric($ret)) {
                    $ret = array('number', $ret, "");
                } elseif (!is_array($ret)) {
                    $ret = array('keyword', $ret);
                }

                return $ret;
            }

            // plain function, reduce args
            $value[2] = $this->reduce($value[2]);
            return $value;
        case "unary":
            list(, $op, $exp) = $value;
            $exp = $this->reduce($exp);

            if ($exp[0] == "number") {
                switch ($op) {
                case "+":
                    return $exp;
                case "-":
                    $exp[1] *= -1;
                    return $exp;
                }
            }
            return array("string", "", array($op, $exp));
        }

        if ($forExpression) {
            switch ($value[0]) {
            case "keyword":
                if ($color = $this->coerceColor($value)) {
                    return $color;
                }
                break;
            case "raw_color":
                return $this->coerceColor($value);
            }
        }

        return $value;
    }


    // coerce a value for use in color operation
    protected function coerceColor($value) {
        switch ($value[0]) {
            case 'color': return $value;
            case 'raw_color':
                $c = array("color", 0, 0, 0);
                $colorStr = substr($value[1], 1);
                $num = hexdec($colorStr);
                $width = strlen($colorStr) == 3 ? 16 : 256;

                for ($i = 3; $i > 0; $i--) { // 3 2 1
                    $t = $num % $width;
                    $num /= $width;

                    $c[$i] = $t * (256/$width) + $t * floor(16/$width);
                }

                return $c;
            case 'keyword':
                $name = $value[1];
                if (isset(self::$cssColors[$name])) {
                    $rgba = explode(',', self::$cssColors[$name]);

                    if (isset($rgba[3])) {
                        return array('color', $rgba[0], $rgba[1], $rgba[2], $rgba[3]);
                    }
                    return array('color', $rgba[0], $rgba[1], $rgba[2]);
                }
                return null;
        }
    }

    // make something string like into a string
    protected function coerceString($value) {
        switch ($value[0]) {
        case "string":
            return $value;
        case "keyword":
            return array("string", "", array($value[1]));
        }
        return null;
    }

    // turn list of length 1 into value type
    protected function flattenList($value) {
        if ($value[0] == "list" && count($value[2]) == 1) {
            return $this->flattenList($value[2][0]);
        }
        return $value;
    }

    public function toBool($a) {
        return $a ? self::$TRUE : self::$FALSE;
    }

    // evaluate an expression
    protected function evaluate($exp) {
        list(, $op, $left, $right, $whiteBefore, $whiteAfter) = $exp;

        $left = $this->reduce($left, true);
        $right = $this->reduce($right, true);

        if ($leftColor = $this->coerceColor($left)) {
            $left = $leftColor;
        }

        if ($rightColor = $this->coerceColor($right)) {
            $right = $rightColor;
        }

        $ltype = $left[0];
        $rtype = $right[0];

        // operators that work on all types
        if ($op == "and") {
            return $this->toBool($left == self::$TRUE && $right == self::$TRUE);
        }

        if ($op == "=") {
            return $this->toBool($this->eq($left, $right) );
        }

        if ($op == "+" && !is_null($str = $this->stringConcatenate($left, $right))) {
            return $str;
        }

        // type based operators
        $fname = "op_${ltype}_${rtype}";
        if (is_callable(array($this, $fname))) {
            $out = $this->$fname($op, $left, $right);
            if (!is_null($out)) return $out;
        }

        // make the expression look it did before being parsed
        $paddedOp = $op;
        if ($whiteBefore) {
            $paddedOp = " " . $paddedOp;
        }
        if ($whiteAfter) {
            $paddedOp .= " ";
        }

        return array("string", "", array($left, $paddedOp, $right));
    }

    protected function stringConcatenate($left, $right) {
        if ($strLeft = $this->coerceString($left)) {
            if ($right[0] == "string") {
                $right[1] = "";
            }
            $strLeft[2][] = $right;
            return $strLeft;
        }

        if ($strRight = $this->coerceString($right)) {
            array_unshift($strRight[2], $left);
            return $strRight;
        }
    }


    // make sure a color's components don't go out of bounds
    protected function fixColor($c) {
        foreach (range(1, 3) as $i) {
            if ($c[$i] < 0) $c[$i] = 0;
            if ($c[$i] > 255) $c[$i] = 255;
        }

        return $c;
    }

    protected function op_number_color($op, $lft, $rgt) {
        if ($op == '+' || $op == '*') {
            return $this->op_color_number($op, $rgt, $lft);
        }
    }

    protected function op_color_number($op, $lft, $rgt) {
        if ($rgt[0] == '%') $rgt[1] /= 100;

        return $this->op_color_color($op, $lft,
            array_fill(1, count($lft) - 1, $rgt[1]));
    }

    protected function op_color_color($op, $left, $right) {
        $out = array('color');
        $max = count($left) > count($right) ? count($left) : count($right);
        foreach (range(1, $max - 1) as $i) {
            $lval = isset($left[$i]) ? $left[$i] : 0;
            $rval = isset($right[$i]) ? $right[$i] : 0;
            switch ($op) {
            case '+':
                $out[] = $lval + $rval;
                break;
            case '-':
                $out[] = $lval - $rval;
                break;
            case '*':
                $out[] = $lval * $rval;
                break;
            case '%':
                $out[] = $lval % $rval;
                break;
            case '/':
                if ($rval == 0) {
                    $this->throwError("evaluate error: can't divide by zero");
                }
                $out[] = $lval / $rval;
                break;
            default:
                $this->throwError('evaluate error: color op number failed on op '.$op);
            }
        }
        return $this->fixColor($out);
    }

    public function lib_red($color){
        $color = $this->coerceColor($color);
        if (is_null($color)) {
            $this->throwError('color expected for red()');
        }

        return $color[1];
    }

    public function lib_green($color){
        $color = $this->coerceColor($color);
        if (is_null($color)) {
            $this->throwError('color expected for green()');
        }

        return $color[2];
    }

    public function lib_blue($color){
        $color = $this->coerceColor($color);
        if (is_null($color)) {
            $this->throwError('color expected for blue()');
        }

        return $color[3];
    }


    // operator on two numbers
    protected function op_number_number($op, $left, $right) {
        $unit = empty($left[2]) ? $right[2] : $left[2];

        $value = 0;
        switch ($op) {
        case '+':
            $value = $left[1] + $right[1];
            break;
        case '*':
            $value = $left[1] * $right[1];
            break;
        case '-':
            $value = $left[1] - $right[1];
            break;
        case '%':
            $value = $left[1] % $right[1];
            break;
        case '/':
            if ($right[1] == 0) $this->throwError('parse error: divide by zero');
            $value = $left[1] / $right[1];
            break;
        case '<':
            return $this->toBool($left[1] < $right[1]);
        case '>':
            return $this->toBool($left[1] > $right[1]);
        case '>=':
            return $this->toBool($left[1] >= $right[1]);
        case '=<':
            return $this->toBool($left[1] <= $right[1]);
        default:
            $this->throwError('parse error: unknown number operator: '.$op);
        }

        return array("number", $value, $unit);
    }


    /* environment functions */

    protected function makeOutputBlock($type, $selectors = null) {
        $b = new stdclass;
        $b->lines = array();
        $b->children = array();
        $b->selectors = $selectors;
        $b->type = $type;
        $b->parent = $this->scope;
        return $b;
    }

    // the state of execution
    protected function pushEnv($block = null) {
        $e = new stdclass;
        $e->parent = $this->env;
        $e->store = array();
        $e->block = $block;

        $this->env = $e;
        return $e;
    }

    // pop something off the stack
    protected function popEnv() {
        $old = $this->env;
        $this->env = $this->env->parent;
        return $old;
    }

    // set something in the current env
    protected function set($name, $value) {
        $this->env->store[$name] = $value;
    }


    // get the highest occurrence entry for a name
    protected function get($name) {
        $current = $this->env;

        $isArguments = $name == $this->vPrefix . 'arguments';
        while ($current) {
            if ($isArguments && isset($current->arguments)) {
                return array('list', ' ', $current->arguments);
            }

            if (isset($current->store[$name])) {
                return $current->store[$name];
            }

            $current = isset($current->storeParent) ?
                $current->storeParent :
                $current->parent;
        }

        $this->throwError("variable $name is undefined");
    }

    // inject array of unparsed strings into environment as variables
    protected function injectVariables($args) {
        $this->pushEnv();
        $parser = new lessc_parser($this, __METHOD__);
        foreach ($args as $name => $strValue) {
            if ($name{0} !== '@') {
                $name = '@' . $name;
            }
            $parser->count = 0;
            $parser->buffer = (string)$strValue;
            if (!$parser->propertyValue($value)) {
                throw new Exception("failed to parse passed in variable $name: $strValue");
            }

            $this->set($name, $value);
        }
    }

    /**
     * Initialize any static state, can initialize parser for a file
     * $opts isn't used yet
     */
    public function __construct($fname = null) {
        if ($fname !== null) {
            // used for deprecated parse method
            $this->_parseFile = $fname;
        }
    }

    public function compile($string, $name = null) {
        $locale = setlocale(LC_NUMERIC, 0);
        setlocale(LC_NUMERIC, "C");

        $this->parser = $this->makeParser($name);
        $root = $this->parser->parse($string);

        $this->env = null;
        $this->scope = null;

        $this->formatter = $this->newFormatter();

        if (!empty($this->registeredVars)) {
            $this->injectVariables($this->registeredVars);
        }

        $this->sourceParser = $this->parser; // used for error messages
        $this->compileBlock($root);

        ob_start();
        $this->formatter->block($this->scope);
        $out = ob_get_clean();
        setlocale(LC_NUMERIC, $locale);
        return $out;
    }

    public function compileFile($fname, $outFname = null) {
        if (!is_readable($fname)) {
            throw new Exception('load error: failed to find '.$fname);
        }

        $pi = pathinfo($fname);

        $oldImport = $this->importDir;

        $this->importDir = (array)$this->importDir;
        $this->importDir[] = $pi['dirname'].'/';

        $this->addParsedFile($fname);

        $out = $this->compile(file_get_contents($fname), $fname);

        $this->importDir = $oldImport;

        if ($outFname !== null) {
            return file_put_contents($outFname, $out);
        }

        return $out;
    }

    // compile only if changed input has changed or output doesn't exist
    public function checkedCompile($in, $out) {
        if (!is_file($out) || filemtime($in) > filemtime($out)) {
            $this->compileFile($in, $out);
            return true;
        }
        return false;
    }

    /**
     * Execute lessphp on a .less file or a lessphp cache structure
     *
     * The lessphp cache structure contains information about a specific
     * less file having been parsed. It can be used as a hint for future
     * calls to determine whether or not a rebuild is required.
     *
     * The cache structure contains two important keys that may be used
     * externally:
     *
     * compiled: The final compiled CSS
     * updated: The time (in seconds) the CSS was last compiled
     *
     * The cache structure is a plain-ol' PHP associative array and can
     * be serialized and unserialized without a hitch.
     *
     * @param mixed $in Input
     * @param bool $force Force rebuild?
     * @return array lessphp cache structure
     */
    public function cachedCompile($in, $force = false) {
        // assume no root
        $root = null;

        if (is_string($in)) {
            $root = $in;
        } elseif (is_array($in) && isset($in['root'])) {
            if ($force || !isset($in['files'])) {
                // If we are forcing a recompile or if for some reason the
                // structure does not contain any file information we should
                // specify the root to trigger a rebuild.
                $root = $in['root'];
            } elseif (isset($in['files']) && is_array($in['files'])) {
                foreach ($in['files'] as $fname => $ftime) {
                    if (!file_exists($fname) || filemtime($fname) > $ftime) {
                        // One of the files we knew about previously has changed
                        // so we should look at our incoming root again.
                        $root = $in['root'];
                        break;
                    }
                }
            }
        } else {
            // TODO: Throw an exception? We got neither a string nor something
            // that looks like a compatible lessphp cache structure.
            return null;
        }

        if ($root !== null) {
            // If we have a root value which means we should rebuild.
            $out = array();
            $out['root'] = $root;
            $out['compiled'] = $this->compileFile($root);
            $out['files'] = $this->allParsedFiles();
            $out['updated'] = time();
            return $out;
        } else {
            // No changes, pass back the structure
            // we were given initially.
            return $in;
        }

    }

    // parse and compile buffer
    // This is deprecated
    public function parse($str = null, $initialVariables = null) {
        if (is_array($str)) {
            $initialVariables = $str;
            $str = null;
        }

        $oldVars = $this->registeredVars;
        if ($initialVariables !== null) {
            $this->setVariables($initialVariables);
        }

        if ($str == null) {
            if (empty($this->_parseFile)) {
                throw new exception("nothing to parse");
            }

            $out = $this->compileFile($this->_parseFile);
        } else {
            $out = $this->compile($str);
        }

        $this->registeredVars = $oldVars;
        return $out;
    }

    protected function makeParser($name) {
        $parser = new lessc_parser($this, $name);
        $parser->writeComments = $this->preserveComments;

        return $parser;
    }

    public function setFormatter($name) {
        $this->formatterName = $name;
    }

    protected function newFormatter() {
        $className = "lessc_formatter_lessjs";
        if (!empty($this->formatterName)) {
            if (!is_string($this->formatterName))
                return $this->formatterName;
            $className = "lessc_formatter_$this->formatterName";
        }

        return new $className;
    }

    public function setPreserveComments($preserve) {
        $this->preserveComments = $preserve;
    }

    public function registerFunction($name, $func) {
        $this->libFunctions[$name] = $func;
    }

    public function unregisterFunction($name) {
        unset($this->libFunctions[$name]);
    }

    public function setVariables($variables) {
        $this->registeredVars = array_merge($this->registeredVars, $variables);
    }

    public function unsetVariable($name) {
        unset($this->registeredVars[$name]);
    }

    public function setImportDir($dirs) {
        $this->importDir = (array)$dirs;
    }

    public function addImportDir($dir) {
        $this->importDir = (array)$this->importDir;
        $this->importDir[] = $dir;
    }

    public function allParsedFiles() {
        return $this->allParsedFiles;
    }

    public function addParsedFile($file) {
        $this->allParsedFiles[realpath($file)] = filemtime($file);
    }

    /**
     * Uses the current value of $this->count to show line and line number
     */
    public function throwError($msg = null) {
        if ($this->sourceLoc >= 0) {
            $this->sourceParser->throwError($msg, $this->sourceLoc);
        }
        throw new exception($msg);
    }

    // compile file $in to file $out if $in is newer than $out
    // returns true when it compiles, false otherwise
    public static function ccompile($in, $out, $less = null) {
        if ($less === null) {
            $less = new self;
        }
        return $less->checkedCompile($in, $out);
    }

    public static function cexecute($in, $force = false, $less = null) {
        if ($less === null) {
            $less = new self;
        }
        return $less->cachedCompile($in, $force);
    }

    static protected $cssColors = array(
        'aliceblue' => '240,248,255',
        'antiquewhite' => '250,235,215',
        'aqua' => '0,255,255',
        'aquamarine' => '127,255,212',
        'azure' => '240,255,255',
        'beige' => '245,245,220',
        'bisque' => '255,228,196',
        'black' => '0,0,0',
        'blanchedalmond' => '255,235,205',
        'blue' => '0,0,255',
        'blueviolet' => '138,43,226',
        'brown' => '165,42,42',
        'burlywood' => '222,184,135',
        'cadetblue' => '95,158,160',
        'chartreuse' => '127,255,0',
        'chocolate' => '210,105,30',
        'coral' => '255,127,80',
        'cornflowerblue' => '100,149,237',
        'cornsilk' => '255,248,220',
        'crimson' => '220,20,60',
        'cyan' => '0,255,255',
        'darkblue' => '0,0,139',
        'darkcyan' => '0,139,139',
        'darkgoldenrod' => '184,134,11',
        'darkgray' => '169,169,169',
        'darkgreen' => '0,100,0',
        'darkgrey' => '169,169,169',
        'darkkhaki' => '189,183,107',
        'darkmagenta' => '139,0,139',
        'darkolivegreen' => '85,107,47',
        'darkorange' => '255,140,0',
        'darkorchid' => '153,50,204',
        'darkred' => '139,0,0',
        'darksalmon' => '233,150,122',
        'darkseagreen' => '143,188,143',
        'darkslateblue' => '72,61,139',
        'darkslategray' => '47,79,79',
        'darkslategrey' => '47,79,79',
        'darkturquoise' => '0,206,209',
        'darkviolet' => '148,0,211',
        'deeppink' => '255,20,147',
        'deepskyblue' => '0,191,255',
        'dimgray' => '105,105,105',
        'dimgrey' => '105,105,105',
        'dodgerblue' => '30,144,255',
        'firebrick' => '178,34,34',
        'floralwhite' => '255,250,240',
        'forestgreen' => '34,139,34',
        'fuchsia' => '255,0,255',
        'gainsboro' => '220,220,220',
        'ghostwhite' => '248,248,255',
        'gold' => '255,215,0',
        'goldenrod' => '218,165,32',
        'gray' => '128,128,128',
        'green' => '0,128,0',
        'greenyellow' => '173,255,47',
        'grey' => '128,128,128',
        'honeydew' => '240,255,240',
        'hotpink' => '255,105,180',
        'indianred' => '205,92,92',
        'indigo' => '75,0,130',
        'ivory' => '255,255,240',
        'khaki' => '240,230,140',
        'lavender' => '230,230,250',
        'lavenderblush' => '255,240,245',
        'lawngreen' => '124,252,0',
        'lemonchiffon' => '255,250,205',
        'lightblue' => '173,216,230',
        'lightcoral' => '240,128,128',
        'lightcyan' => '224,255,255',
        'lightgoldenrodyellow' => '250,250,210',
        'lightgray' => '211,211,211',
        'lightgreen' => '144,238,144',
        'lightgrey' => '211,211,211',
        'lightpink' => '255,182,193',
        'lightsalmon' => '255,160,122',
        'lightseagreen' => '32,178,170',
        'lightskyblue' => '135,206,250',
        'lightslategray' => '119,136,153',
        'lightslategrey' => '119,136,153',
        'lightsteelblue' => '176,196,222',
        'lightyellow' => '255,255,224',
        'lime' => '0,255,0',
        'limegreen' => '50,205,50',
        'linen' => '250,240,230',
        'magenta' => '255,0,255',
        'maroon' => '128,0,0',
        'mediumaquamarine' => '102,205,170',
        'mediumblue' => '0,0,205',
        'mediumorchid' => '186,85,211',
        'mediumpurple' => '147,112,219',
        'mediumseagreen' => '60,179,113',
        'mediumslateblue' => '123,104,238',
        'mediumspringgreen' => '0,250,154',
        'mediumturquoise' => '72,209,204',
        'mediumvioletred' => '199,21,133',
        'midnightblue' => '25,25,112',
        'mintcream' => '245,255,250',
        'mistyrose' => '255,228,225',
        'moccasin' => '255,228,181',
        'navajowhite' => '255,222,173',
        'navy' => '0,0,128',
        'oldlace' => '253,245,230',
        'olive' => '128,128,0',
        'olivedrab' => '107,142,35',
        'orange' => '255,165,0',
        'orangered' => '255,69,0',
        'orchid' => '218,112,214',
        'palegoldenrod' => '238,232,170',
        'palegreen' => '152,251,152',
        'paleturquoise' => '175,238,238',
        'palevioletred' => '219,112,147',
        'papayawhip' => '255,239,213',
        'peachpuff' => '255,218,185',
        'peru' => '205,133,63',
        'pink' => '255,192,203',
        'plum' => '221,160,221',
        'powderblue' => '176,224,230',
        'purple' => '128,0,128',
        'red' => '255,0,0',
        'rosybrown' => '188,143,143',
        'royalblue' => '65,105,225',
        'saddlebrown' => '139,69,19',
        'salmon' => '250,128,114',
        'sandybrown' => '244,164,96',
        'seagreen' => '46,139,87',
        'seashell' => '255,245,238',
        'sienna' => '160,82,45',
        'silver' => '192,192,192',
        'skyblue' => '135,206,235',
        'slateblue' => '106,90,205',
        'slategray' => '112,128,144',
        'slategrey' => '112,128,144',
        'snow' => '255,250,250',
        'springgreen' => '0,255,127',
        'steelblue' => '70,130,180',
        'tan' => '210,180,140',
        'teal' => '0,128,128',
        'thistle' => '216,191,216',
        'tomato' => '255,99,71',
        'transparent' => '0,0,0,0',
        'turquoise' => '64,224,208',
        'violet' => '238,130,238',
        'wheat' => '245,222,179',
        'white' => '255,255,255',
        'whitesmoke' => '245,245,245',
        'yellow' => '255,255,0',
        'yellowgreen' => '154,205,50'
    );
}

// responsible for taking a string of LESS code and converting it into a
// syntax tree
class lessc_parser {
    static protected $nextBlockId = 0; // used to uniquely identify blocks

    static protected $precedence = array(
        '=<' => 0,
        '>=' => 0,
        '=' => 0,
        '<' => 0,
        '>' => 0,

        '+' => 1,
        '-' => 1,
        '*' => 2,
        '/' => 2,
        '%' => 2,
    );

    static protected $whitePattern;
    static protected $commentMulti;

    static protected $commentSingle = "//";
    static protected $commentMultiLeft = "/*";
    static protected $commentMultiRight = "*/";

    // regex string to match any of the operators
    static protected $operatorString;

    // these properties will supress division unless it's inside parenthases
    static protected $supressDivisionProps =
        array('/border-radius$/i', '/^font$/i');

    protected $blockDirectives = array("font-face", "keyframes", "page", "-moz-document", "viewport", "-moz-viewport", "-o-viewport", "-ms-viewport");
    protected $lineDirectives = array("charset");

    /**
     * if we are in parens we can be more liberal with whitespace around
     * operators because it must evaluate to a single value and thus is less
     * ambiguous.
     *
     * Consider:
     *     property1: 10 -5; // is two numbers, 10 and -5
     *     property2: (10 -5); // should evaluate to 5
     */
    protected $inParens = false;

    // caches preg escaped literals
    static protected $literalCache = array();

    public function __construct($lessc, $sourceName = null) {
        $this->eatWhiteDefault = true;
        // reference to less needed for vPrefix, mPrefix, and parentSelector
        $this->lessc = $lessc;

        $this->sourceName = $sourceName; // name used for error messages

        $this->writeComments = false;

        if (!self::$operatorString) {
            self::$operatorString =
                '('.implode('|', array_map(array('lessc', 'preg_quote'),
                    array_keys(self::$precedence))).')';

            $commentSingle = lessc::preg_quote(self::$commentSingle);
            $commentMultiLeft = lessc::preg_quote(self::$commentMultiLeft);
            $commentMultiRight = lessc::preg_quote(self::$commentMultiRight);

            self::$commentMulti = $commentMultiLeft.'.*?'.$commentMultiRight;
            self::$whitePattern = '/'.$commentSingle.'[^\n]*\s*|('.self::$commentMulti.')\s*|\s+/Ais';
        }
    }

    public function parse($buffer) {
        $this->count = 0;
        $this->line = 1;

        $this->env = null; // block stack
        $this->buffer = $this->writeComments ? $buffer : $this->removeComments($buffer);
        $this->pushSpecialBlock("root");
        $this->eatWhiteDefault = true;
        $this->seenComments = array();

        // trim whitespace on head
        // if (preg_match('/^\s+/', $this->buffer, $m)) {
        //  $this->line += substr_count($m[0], "\n");
        //  $this->buffer = ltrim($this->buffer);
        // }
        $this->whitespace();

        // parse the entire file
        while (false !== $this->parseChunk());

        if ($this->count != strlen($this->buffer))
            $this->throwError();

        // TODO report where the block was opened
        if ( !property_exists($this->env, 'parent') || !is_null($this->env->parent) )
            throw new exception('parse error: unclosed block');

        return $this->env;
    }

    /**
     * Parse a single chunk off the head of the buffer and append it to the
     * current parse environment.
     * Returns false when the buffer is empty, or when there is an error.
     *
     * This function is called repeatedly until the entire document is
     * parsed.
     *
     * This parser is most similar to a recursive descent parser. Single
     * functions represent discrete grammatical rules for the language, and
     * they are able to capture the text that represents those rules.
     *
     * Consider the function lessc::keyword(). (all parse functions are
     * structured the same)
     *
     * The function takes a single reference argument. When calling the
     * function it will attempt to match a keyword on the head of the buffer.
     * If it is successful, it will place the keyword in the referenced
     * argument, advance the position in the buffer, and return true. If it
     * fails then it won't advance the buffer and it will return false.
     *
     * All of these parse functions are powered by lessc::match(), which behaves
     * the same way, but takes a literal regular expression. Sometimes it is
     * more convenient to use match instead of creating a new function.
     *
     * Because of the format of the functions, to parse an entire string of
     * grammatical rules, you can chain them together using &&.
     *
     * But, if some of the rules in the chain succeed before one fails, then
     * the buffer position will be left at an invalid state. In order to
     * avoid this, lessc::seek() is used to remember and set buffer positions.
     *
     * Before parsing a chain, use $s = $this->seek() to remember the current
     * position into $s. Then if a chain fails, use $this->seek($s) to
     * go back where we started.
     */
    protected function parseChunk() {
        if (empty($this->buffer)) return false;
        $s = $this->seek();

        if ($this->whitespace()) {
            return true;
        }

        // setting a property
        if ($this->keyword($key) && $this->assign() &&
            $this->propertyValue($value, $key) && $this->end()
        ) {
            $this->append(array('assign', $key, $value), $s);
            return true;
        } else {
            $this->seek($s);
        }


        // look for special css blocks
        if ($this->literal('@', false)) {
            $this->count--;

            // media
            if ($this->literal('@media')) {
                if (($this->mediaQueryList($mediaQueries) || true)
                    && $this->literal('{')
                ) {
                    $media = $this->pushSpecialBlock("media");
                    $media->queries = is_null($mediaQueries) ? array() : $mediaQueries;
                    return true;
                } else {
                    $this->seek($s);
                    return false;
                }
            }

            if ($this->literal("@", false) && $this->keyword($dirName)) {
                if ($this->isDirective($dirName, $this->blockDirectives)) {
                    if (($this->openString("{", $dirValue, null, array(";")) || true) &&
                        $this->literal("{")
                    ) {
                        $dir = $this->pushSpecialBlock("directive");
                        $dir->name = $dirName;
                        if (isset($dirValue)) $dir->value = $dirValue;
                        return true;
                    }
                } elseif ($this->isDirective($dirName, $this->lineDirectives)) {
                    if ($this->propertyValue($dirValue) && $this->end()) {
                        $this->append(array("directive", $dirName, $dirValue));
                        return true;
                    }
                }
            }

            $this->seek($s);
        }

        // setting a variable
        if ($this->variable($var) && $this->assign() &&
            $this->propertyValue($value) && $this->end()
        ) {
            $this->append(array('assign', $var, $value), $s);
            return true;
        } else {
            $this->seek($s);
        }

        if ($this->import($importValue)) {
            $this->append($importValue, $s);
            return true;
        }

        // opening parametric mixin
        if ($this->tag($tag, true) && $this->argumentDef($args, $isVararg) &&
            ($this->guards($guards) || true) &&
            $this->literal('{')
        ) {
            $block = $this->pushBlock($this->fixTags(array($tag)));
            $block->args = $args;
            $block->isVararg = $isVararg;
            if (!empty($guards)) $block->guards = $guards;
            return true;
        } else {
            $this->seek($s);
        }

        // opening a simple block
        if ($this->tags($tags) && $this->literal('{', false)) {
            $tags = $this->fixTags($tags);
            $this->pushBlock($tags);
            return true;
        } else {
            $this->seek($s);
        }

        // closing a block
        if ($this->literal('}', false)) {
            try {
                $block = $this->pop();
            } catch (exception $e) {
                $this->seek($s);
                $this->throwError($e->getMessage());
            }

            $hidden = false;
            if (is_null($block->type)) {
                $hidden = true;
                if (!isset($block->args)) {
                    foreach ($block->tags as $tag) {
                        if (!is_string($tag) || $tag{0} != $this->lessc->mPrefix) {
                            $hidden = false;
                            break;
                        }
                    }
                }

                foreach ($block->tags as $tag) {
                    if (is_string($tag)) {
                        $this->env->children[$tag][] = $block;
                    }
                }
            }

            if (!$hidden) {
                $this->append(array('block', $block), $s);
            }

            // this is done here so comments aren't bundled into he block that
            // was just closed
            $this->whitespace();
            return true;
        }

        // mixin
        if ($this->mixinTags($tags) &&
            ($this->argumentDef($argv, $isVararg) || true) &&
            ($this->keyword($suffix) || true) && $this->end()
        ) {
            $tags = $this->fixTags($tags);
            $this->append(array('mixin', $tags, $argv, $suffix), $s);
            return true;
        } else {
            $this->seek($s);
        }

        // spare ;
        if ($this->literal(';')) return true;

        return false; // got nothing, throw error
    }

    protected function isDirective($dirname, $directives) {
        // TODO: cache pattern in parser
        $pattern = implode("|",
            array_map(array("lessc", "preg_quote"), $directives));
        $pattern = '/^(-[a-z-]+-)?(' . $pattern . ')$/i';

        return preg_match($pattern, $dirname);
    }

    protected function fixTags($tags) {
        // move @ tags out of variable namespace
        foreach ($tags as &$tag) {
            if ($tag{0} == $this->lessc->vPrefix)
                $tag[0] = $this->lessc->mPrefix;
        }
        return $tags;
    }

    // a list of expressions
    protected function expressionList(&$exps) {
        $values = array();

        while ($this->expression($exp)) {
            $values[] = $exp;
        }

        if (count($values) == 0) return false;

        $exps = lessc::compressList($values, ' ');
        return true;
    }

    /**
     * Attempt to consume an expression.
     * @link http://en.wikipedia.org/wiki/Operator-precedence_parser#Pseudo-code
     */
    protected function expression(&$out) {
        if ($this->value($lhs)) {
            $out = $this->expHelper($lhs, 0);

            // look for / shorthand
            if (!empty($this->env->supressedDivision)) {
                unset($this->env->supressedDivision);
                $s = $this->seek();
                if ($this->literal("/") && $this->value($rhs)) {
                    $out = array("list", "",
                        array($out, array("keyword", "/"), $rhs));
                } else {
                    $this->seek($s);
                }
            }

            return true;
        }
        return false;
    }

    /**
     * recursively parse infix equation with $lhs at precedence $minP
     */
    protected function expHelper($lhs, $minP) {
        $this->inExp = true;
        $ss = $this->seek();

        while (true) {
            $whiteBefore = isset($this->buffer[$this->count - 1]) &&
                ctype_space($this->buffer[$this->count - 1]);

            // If there is whitespace before the operator, then we require
            // whitespace after the operator for it to be an expression
            $needWhite = $whiteBefore && !$this->inParens;

            if ($this->match(self::$operatorString.($needWhite ? '\s' : ''), $m) && self::$precedence[$m[1]] >= $minP) {
                if (!$this->inParens && isset($this->env->currentProperty) && $m[1] == "/" && empty($this->env->supressedDivision)) {
                    foreach (self::$supressDivisionProps as $pattern) {
                        if (preg_match($pattern, $this->env->currentProperty)) {
                            $this->env->supressedDivision = true;
                            break 2;
                        }
                    }
                }


                $whiteAfter = isset($this->buffer[$this->count - 1]) &&
                    ctype_space($this->buffer[$this->count - 1]);

                if (!$this->value($rhs)) break;

                // peek for next operator to see what to do with rhs
                if ($this->peek(self::$operatorString, $next) && self::$precedence[$next[1]] > self::$precedence[$m[1]]) {
                    $rhs = $this->expHelper($rhs, self::$precedence[$next[1]]);
                }

                $lhs = array('expression', $m[1], $lhs, $rhs, $whiteBefore, $whiteAfter);
                $ss = $this->seek();

                continue;
            }

            break;
        }

        $this->seek($ss);

        return $lhs;
    }

    // consume a list of values for a property
    public function propertyValue(&$value, $keyName = null) {
        $values = array();

        if ($keyName !== null) $this->env->currentProperty = $keyName;

        $s = null;
        while ($this->expressionList($v)) {
            $values[] = $v;
            $s = $this->seek();
            if (!$this->literal(',')) break;
        }

        if ($s) $this->seek($s);

        if ($keyName !== null) unset($this->env->currentProperty);

        if (count($values) == 0) return false;

        $value = lessc::compressList($values, ', ');
        return true;
    }

    protected function parenValue(&$out) {
        $s = $this->seek();

        // speed shortcut
        if (isset($this->buffer[$this->count]) && $this->buffer[$this->count] != "(") {
            return false;
        }

        $inParens = $this->inParens;
        if ($this->literal("(") &&
            ($this->inParens = true) && $this->expression($exp) &&
            $this->literal(")")
        ) {
            $out = $exp;
            $this->inParens = $inParens;
            return true;
        } else {
            $this->inParens = $inParens;
            $this->seek($s);
        }

        return false;
    }

    // a single value
    protected function value(&$value) {
        $s = $this->seek();

        // speed shortcut
        if (isset($this->buffer[$this->count]) && $this->buffer[$this->count] == "-") {
            // negation
            if ($this->literal("-", false) &&
                (($this->variable($inner) && $inner = array("variable", $inner)) ||
                $this->unit($inner) ||
                $this->parenValue($inner))
            ) {
                $value = array("unary", "-", $inner);
                return true;
            } else {
                $this->seek($s);
            }
        }

        if ($this->parenValue($value)) return true;
        if ($this->unit($value)) return true;
        if ($this->color($value)) return true;
        if ($this->func($value)) return true;
        if ($this->string($value)) return true;

        if ($this->keyword($word)) {
            $value = array('keyword', $word);
            return true;
        }

        // try a variable
        if ($this->variable($var)) {
            $value = array('variable', $var);
            return true;
        }

        // unquote string (should this work on any type?
        if ($this->literal("~") && $this->string($str)) {
            $value = array("escape", $str);
            return true;
        } else {
            $this->seek($s);
        }

        // css hack: \0
        if ($this->literal('\\') && $this->match('([0-9]+)', $m)) {
            $value = array('keyword', '\\'.$m[1]);
            return true;
        } else {
            $this->seek($s);
        }

        return false;
    }

    // an import statement
    protected function import(&$out) {
        if (!$this->literal('@import')) return false;

        // @import "something.css" media;
        // @import url("something.css") media;
        // @import url(something.css) media;

        if ($this->propertyValue($value)) {
            $out = array("import", $value);
            return true;
        }
    }

    protected function mediaQueryList(&$out) {
        if ($this->genericList($list, "mediaQuery", ",", false)) {
            $out = $list[2];
            return true;
        }
        return false;
    }

    protected function mediaQuery(&$out) {
        $s = $this->seek();

        $expressions = null;
        $parts = array();

        if (($this->literal("only") && ($only = true) || $this->literal("not") && ($not = true) || true) && $this->keyword($mediaType)) {
            $prop = array("mediaType");
            if (isset($only)) $prop[] = "only";
            if (isset($not)) $prop[] = "not";
            $prop[] = $mediaType;
            $parts[] = $prop;
        } else {
            $this->seek($s);
        }


        if (!empty($mediaType) && !$this->literal("and")) {
            // ~
        } else {
            $this->genericList($expressions, "mediaExpression", "and", false);
            if (is_array($expressions)) $parts = array_merge($parts, $expressions[2]);
        }

        if (count($parts) == 0) {
            $this->seek($s);
            return false;
        }

        $out = $parts;
        return true;
    }

    protected function mediaExpression(&$out) {
        $s = $this->seek();
        $value = null;
        if ($this->literal("(") &&
            $this->keyword($feature) &&
            ($this->literal(":") && $this->expression($value) || true) &&
            $this->literal(")")
        ) {
            $out = array("mediaExp", $feature);
            if ($value) $out[] = $value;
            return true;
        } elseif ($this->variable($variable)) {
            $out = array('variable', $variable);
            return true;
        }

        $this->seek($s);
        return false;
    }

    // an unbounded string stopped by $end
    protected function openString($end, &$out, $nestingOpen=null, $rejectStrs = null) {
        $oldWhite = $this->eatWhiteDefault;
        $this->eatWhiteDefault = false;

        $stop = array("'", '"', "@{", $end);
        $stop = array_map(array("lessc", "preg_quote"), $stop);
        // $stop[] = self::$commentMulti;

        if (!is_null($rejectStrs)) {
            $stop = array_merge($stop, $rejectStrs);
        }

        $patt = '(.*?)('.implode("|", $stop).')';

        $nestingLevel = 0;

        $content = array();
        while ($this->match($patt, $m, false)) {
            if (!empty($m[1])) {
                $content[] = $m[1];
                if ($nestingOpen) {
                    $nestingLevel += substr_count($m[1], $nestingOpen);
                }
            }

            $tok = $m[2];

            $this->count-= strlen($tok);
            if ($tok == $end) {
                if ($nestingLevel == 0) {
                    break;
                } else {
                    $nestingLevel--;
                }
            }

            if (($tok == "'" || $tok == '"') && $this->string($str)) {
                $content[] = $str;
                continue;
            }

            if ($tok == "@{" && $this->interpolation($inter)) {
                $content[] = $inter;
                continue;
            }

            if (!empty($rejectStrs) && in_array($tok, $rejectStrs)) {
                break;
            }

            $content[] = $tok;
            $this->count+= strlen($tok);
        }

        $this->eatWhiteDefault = $oldWhite;

        if (count($content) == 0) return false;

        // trim the end
        if (is_string(end($content))) {
            $content[count($content) - 1] = rtrim(end($content));
        }

        $out = array("string", "", $content);
        return true;
    }

    protected function string(&$out) {
        $s = $this->seek();
        if ($this->literal('"', false)) {
            $delim = '"';
        } elseif ($this->literal("'", false)) {
            $delim = "'";
        } else {
            return false;
        }

        $content = array();

        // look for either ending delim , escape, or string interpolation
        $patt = '([^\n]*?)(@\{|\\\\|' .
            lessc::preg_quote($delim).')';

        $oldWhite = $this->eatWhiteDefault;
        $this->eatWhiteDefault = false;

        while ($this->match($patt, $m, false)) {
            $content[] = $m[1];
            if ($m[2] == "@{") {
                $this->count -= strlen($m[2]);
                if ($this->interpolation($inter, false)) {
                    $content[] = $inter;
                } else {
                    $this->count += strlen($m[2]);
                    $content[] = "@{"; // ignore it
                }
            } elseif ($m[2] == '\\') {
                $content[] = $m[2];
                if ($this->literal($delim, false)) {
                    $content[] = $delim;
                }
            } else {
                $this->count -= strlen($delim);
                break; // delim
            }
        }

        $this->eatWhiteDefault = $oldWhite;

        if ($this->literal($delim)) {
            $out = array("string", $delim, $content);
            return true;
        }

        $this->seek($s);
        return false;
    }

    protected function interpolation(&$out) {
        $oldWhite = $this->eatWhiteDefault;
        $this->eatWhiteDefault = true;

        $s = $this->seek();
        if ($this->literal("@{") &&
            $this->openString("}", $interp, null, array("'", '"', ";")) &&
            $this->literal("}", false)
        ) {
            $out = array("interpolate", $interp);
            $this->eatWhiteDefault = $oldWhite;
            if ($this->eatWhiteDefault) $this->whitespace();
            return true;
        }

        $this->eatWhiteDefault = $oldWhite;
        $this->seek($s);
        return false;
    }

    protected function unit(&$unit) {
        // speed shortcut
        if (isset($this->buffer[$this->count])) {
            $char = $this->buffer[$this->count];
            if (!ctype_digit($char) && $char != ".") return false;
        }

        if ($this->match('([0-9]+(?:\.[0-9]*)?|\.[0-9]+)([%a-zA-Z]+)?', $m)) {
            $unit = array("number", $m[1], empty($m[2]) ? "" : $m[2]);
            return true;
        }
        return false;
    }

    // a # color
    protected function color(&$out) {
        if ($this->match('(#(?:[0-9a-f]{8}|[0-9a-f]{6}|[0-9a-f]{3}))', $m)) {
            if (strlen($m[1]) > 7) {
                $out = array("string", "", array($m[1]));
            } else {
                $out = array("raw_color", $m[1]);
            }
            return true;
        }

        return false;
    }

    // consume an argument definition list surrounded by ()
    // each argument is a variable name with optional value
    // or at the end a ... or a variable named followed by ...
    // arguments are separated by , unless a ; is in the list, then ; is the
    // delimiter.
    protected function argumentDef(&$args, &$isVararg) {
        $s = $this->seek();
        if (!$this->literal('(')) {
            return false;
        }

        $values = array();
        $delim = ",";
        $method = "expressionList";

        $isVararg = false;
        while (true) {
            if ($this->literal("...")) {
                $isVararg = true;
                break;
            }

            if ($this->$method($value)) {
                if ($value[0] == "variable") {
                    $arg = array("arg", $value[1]);
                    $ss = $this->seek();

                    if ($this->assign() && $this->$method($rhs)) {
                        $arg[] = $rhs;
                    } else {
                        $this->seek($ss);
                        if ($this->literal("...")) {
                            $arg[0] = "rest";
                            $isVararg = true;
                        }
                    }

                    $values[] = $arg;
                    if ($isVararg) {
                        break;
                    }
                    continue;
                } else {
                    $values[] = array("lit", $value);
                }
            }


            if (!$this->literal($delim)) {
                if ($delim == "," && $this->literal(";")) {
                    // found new delim, convert existing args
                    $delim = ";";
                    $method = "propertyValue";

                    // transform arg list
                    if (isset($values[1])) { // 2 items
                        $newList = array();
                        foreach ($values as $i => $arg) {
                            switch ($arg[0]) {
                            case "arg":
                                if ($i) {
                                    $this->throwError("Cannot mix ; and , as delimiter types");
                                }
                                $newList[] = $arg[2];
                                break;
                            case "lit":
                                $newList[] = $arg[1];
                                break;
                            case "rest":
                                $this->throwError("Unexpected rest before semicolon");
                            }
                        }

                        $newList = array("list", ", ", $newList);

                        switch ($values[0][0]) {
                        case "arg":
                            $newArg = array("arg", $values[0][1], $newList);
                            break;
                        case "lit":
                            $newArg = array("lit", $newList);
                            break;
                        }

                    } elseif ($values) { // 1 item
                        $newArg = $values[0];
                    }

                    if ($newArg) {
                        $values = array($newArg);
                    }
                } else {
                    break;
                }
            }
        }

        if (!$this->literal(')')) {
            $this->seek($s);
            return false;
        }

        $args = $values;

        return true;
    }

    // consume a list of tags
    // this accepts a hanging delimiter
    protected function tags(&$tags, $simple = false, $delim = ',') {
        $tags = array();
        while ($this->tag($tt, $simple)) {
            $tags[] = $tt;
            if (!$this->literal($delim)) break;
        }
        if (count($tags) == 0) return false;

        return true;
    }

    // list of tags of specifying mixin path
    // optionally separated by > (lazy, accepts extra >)
    protected function mixinTags(&$tags) {
        $tags = array();
        while ($this->tag($tt, true)) {
            $tags[] = $tt;
            $this->literal(">");
        }

        if (!$tags) {
            return false;
        }

        return true;
    }

    // a bracketed value (contained within in a tag definition)
    protected function tagBracket(&$parts, &$hasExpression) {
        // speed shortcut
        if (isset($this->buffer[$this->count]) && $this->buffer[$this->count] != "[") {
            return false;
        }

        $s = $this->seek();

        $hasInterpolation = false;

        if ($this->literal("[", false)) {
            $attrParts = array("[");
            // keyword, string, operator
            while (true) {
                if ($this->literal("]", false)) {
                    $this->count--;
                    break; // get out early
                }

                if ($this->match('\s+', $m)) {
                    $attrParts[] = " ";
                    continue;
                }
                if ($this->string($str)) {
                    // escape parent selector, (yuck)
                    foreach ($str[2] as &$chunk) {
                        $chunk = str_replace($this->lessc->parentSelector, "$&$", $chunk);
                    }

                    $attrParts[] = $str;
                    $hasInterpolation = true;
                    continue;
                }

                if ($this->keyword($word)) {
                    $attrParts[] = $word;
                    continue;
                }

                if ($this->interpolation($inter, false)) {
                    $attrParts[] = $inter;
                    $hasInterpolation = true;
                    continue;
                }

                // operator, handles attr namespace too
                if ($this->match('[|-~\$\*\^=]+', $m)) {
                    $attrParts[] = $m[0];
                    continue;
                }

                break;
            }

            if ($this->literal("]", false)) {
                $attrParts[] = "]";
                foreach ($attrParts as $part) {
                    $parts[] = $part;
                }
                $hasExpression = $hasExpression || $hasInterpolation;
                return true;
            }
            $this->seek($s);
        }

        $this->seek($s);
        return false;
    }

    // a space separated list of selectors
    protected function tag(&$tag, $simple = false) {
        if ($simple) {
            $chars = '^@,:;{}\][>\(\) "\'';
        } else {
            $chars = '^@,;{}["\'';
        }
        $s = $this->seek();

        $hasExpression = false;
        $parts = array();
        while ($this->tagBracket($parts, $hasExpression));

        $oldWhite = $this->eatWhiteDefault;
        $this->eatWhiteDefault = false;

        while (true) {
            if ($this->match('(['.$chars.'0-9]['.$chars.']*)', $m)) {
                $parts[] = $m[1];
                if ($simple) break;

                while ($this->tagBracket($parts, $hasExpression));
                continue;
            }

            if (isset($this->buffer[$this->count]) && $this->buffer[$this->count] == "@") {
                if ($this->interpolation($interp)) {
                    $hasExpression = true;
                    $interp[2] = true; // don't unescape
                    $parts[] = $interp;
                    continue;
                }

                if ($this->literal("@")) {
                    $parts[] = "@";
                    continue;
                }
            }

            if ($this->unit($unit)) { // for keyframes
                $parts[] = $unit[1];
                $parts[] = $unit[2];
                continue;
            }

            break;
        }

        $this->eatWhiteDefault = $oldWhite;
        if (!$parts) {
            $this->seek($s);
            return false;
        }

        if ($hasExpression) {
            $tag = array("exp", array("string", "", $parts));
        } else {
            $tag = trim(implode($parts));
        }

        $this->whitespace();
        return true;
    }

    // a css function
    protected function func(&$func) {
        $s = $this->seek();

        if ($this->match('(%|[\w\-_][\w\-_:\.]+|[\w_])', $m) && $this->literal('(')) {
            $fname = $m[1];

            $sPreArgs = $this->seek();

            $args = array();
            while (true) {
                $ss = $this->seek();
                // this ugly nonsense is for ie filter properties
                if ($this->keyword($name) && $this->literal('=') && $this->expressionList($value)) {
                    $args[] = array("string", "", array($name, "=", $value));
                } else {
                    $this->seek($ss);
                    if ($this->expressionList($value)) {
                        $args[] = $value;
                    }
                }

                if (!$this->literal(',')) break;
            }
            $args = array('list', ',', $args);

            if ($this->literal(')')) {
                $func = array('function', $fname, $args);
                return true;
            } elseif ($fname == 'url') {
                // couldn't parse and in url? treat as string
                $this->seek($sPreArgs);
                if ($this->openString(")", $string) && $this->literal(")")) {
                    $func = array('function', $fname, $string);
                    return true;
                }
            }
        }

        $this->seek($s);
        return false;
    }

    // consume a less variable
    protected function variable(&$name) {
        $s = $this->seek();
        if ($this->literal($this->lessc->vPrefix, false) &&
            ($this->variable($sub) || $this->keyword($name))
        ) {
            if (!empty($sub)) {
                $name = array('variable', $sub);
            } else {
                $name = $this->lessc->vPrefix.$name;
            }
            return true;
        }

        $name = null;
        $this->seek($s);
        return false;
    }

    /**
     * Consume an assignment operator
     * Can optionally take a name that will be set to the current property name
     */
    protected function assign($name = null) {
        if ($name) $this->currentProperty = $name;
        return $this->literal(':') || $this->literal('=');
    }

    // consume a keyword
    protected function keyword(&$word) {
        if ($this->match('([\w_\-\*!"][\w\-_"]*)', $m)) {
            $word = $m[1];
            return true;
        }
        return false;
    }

    // consume an end of statement delimiter
    protected function end() {
        if ($this->literal(';', false)) {
            return true;
        } elseif ($this->count == strlen($this->buffer) || $this->buffer[$this->count] == '}') {
            // if there is end of file or a closing block next then we don't need a ;
            return true;
        }
        return false;
    }

    protected function guards(&$guards) {
        $s = $this->seek();

        if (!$this->literal("when")) {
            $this->seek($s);
            return false;
        }

        $guards = array();

        while ($this->guardGroup($g)) {
            $guards[] = $g;
            if (!$this->literal(",")) break;
        }

        if (count($guards) == 0) {
            $guards = null;
            $this->seek($s);
            return false;
        }

        return true;
    }

    // a bunch of guards that are and'd together
    // TODO rename to guardGroup
    protected function guardGroup(&$guardGroup) {
        $s = $this->seek();
        $guardGroup = array();
        while ($this->guard($guard)) {
            $guardGroup[] = $guard;
            if (!$this->literal("and")) break;
        }

        if (count($guardGroup) == 0) {
            $guardGroup = null;
            $this->seek($s);
            return false;
        }

        return true;
    }

    protected function guard(&$guard) {
        $s = $this->seek();
        $negate = $this->literal("not");

        if ($this->literal("(") && $this->expression($exp) && $this->literal(")")) {
            $guard = $exp;
            if ($negate) $guard = array("negate", $guard);
            return true;
        }

        $this->seek($s);
        return false;
    }

    /* raw parsing functions */

    protected function literal($what, $eatWhitespace = null) {
        if ($eatWhitespace === null) $eatWhitespace = $this->eatWhiteDefault;

        // shortcut on single letter
        if (!isset($what[1]) && isset($this->buffer[$this->count])) {
            if ($this->buffer[$this->count] == $what) {
                if (!$eatWhitespace) {
                    $this->count++;
                    return true;
                }
                // goes below...
            } else {
                return false;
            }
        }

        if (!isset(self::$literalCache[$what])) {
            self::$literalCache[$what] = lessc::preg_quote($what);
        }

        return $this->match(self::$literalCache[$what], $m, $eatWhitespace);
    }

    protected function genericList(&$out, $parseItem, $delim="", $flatten=true) {
        $s = $this->seek();
        $items = array();
        while ($this->$parseItem($value)) {
            $items[] = $value;
            if ($delim) {
                if (!$this->literal($delim)) break;
            }
        }

        if (count($items) == 0) {
            $this->seek($s);
            return false;
        }

        if ($flatten && count($items) == 1) {
            $out = $items[0];
        } else {
            $out = array("list", $delim, $items);
        }

        return true;
    }


    // advance counter to next occurrence of $what
    // $until - don't include $what in advance
    // $allowNewline, if string, will be used as valid char set
    protected function to($what, &$out, $until = false, $allowNewline = false) {
        if (is_string($allowNewline)) {
            $validChars = $allowNewline;
        } else {
            $validChars = $allowNewline ? "." : "[^\n]";
        }
        if (!$this->match('('.$validChars.'*?)'.lessc::preg_quote($what), $m, !$until)) return false;
        if ($until) $this->count -= strlen($what); // give back $what
        $out = $m[1];
        return true;
    }

    // try to match something on head of buffer
    protected function match($regex, &$out, $eatWhitespace = null) {
        if ($eatWhitespace === null) $eatWhitespace = $this->eatWhiteDefault;

        $r = '/'.$regex.($eatWhitespace && !$this->writeComments ? '\s*' : '').'/Ais';
        if (preg_match($r, $this->buffer, $out, null, $this->count)) {
            $this->count += strlen($out[0]);
            if ($eatWhitespace && $this->writeComments) $this->whitespace();
            return true;
        }
        return false;
    }

    // match some whitespace
    protected function whitespace() {
        if ($this->writeComments) {
            $gotWhite = false;
            while (preg_match(self::$whitePattern, $this->buffer, $m, null, $this->count)) {
                if (isset($m[1]) && empty($this->seenComments[$this->count])) {
                    $this->append(array("comment", $m[1]));
                    $this->seenComments[$this->count] = true;
                }
                $this->count += strlen($m[0]);
                $gotWhite = true;
            }
            return $gotWhite;
        } else {
            $this->match("", $m);
            return strlen($m[0]) > 0;
        }
    }

    // match something without consuming it
    protected function peek($regex, &$out = null, $from=null) {
        if (is_null($from)) $from = $this->count;
        $r = '/'.$regex.'/Ais';
        $result = preg_match($r, $this->buffer, $out, null, $from);

        return $result;
    }

    // seek to a spot in the buffer or return where we are on no argument
    protected function seek($where = null) {
        if ($where === null) return $this->count;
        else $this->count = $where;
        return true;
    }

    /* misc functions */

    public function throwError($msg = "parse error", $count = null) {
        $count = is_null($count) ? $this->count : $count;

        $line = $this->line +
            substr_count(substr($this->buffer, 0, $count), "\n");

        if (!empty($this->sourceName)) {
            $loc = "$this->sourceName on line $line";
        } else {
            $loc = "line: $line";
        }

        // TODO this depends on $this->count
        if ($this->peek("(.*?)(\n|$)", $m, $count)) {
            throw new exception("$msg: failed at `$m[1]` $loc");
        } else {
            throw new exception("$msg: $loc");
        }
    }

    protected function pushBlock($selectors=null, $type=null) {
        $b = new stdclass;
        $b->parent = $this->env;

        $b->type = $type;
        $b->id = self::$nextBlockId++;

        $b->isVararg = false; // TODO: kill me from here
        $b->tags = $selectors;

        $b->props = array();
        $b->children = array();

        $this->env = $b;
        return $b;
    }

    // push a block that doesn't multiply tags
    protected function pushSpecialBlock($type) {
        return $this->pushBlock(null, $type);
    }

    // append a property to the current block
    protected function append($prop, $pos = null) {
        if ($pos !== null) $prop[-1] = $pos;
        $this->env->props[] = $prop;
    }

    // pop something off the stack
    protected function pop() {
        $old = $this->env;
        $this->env = $this->env->parent;
        return $old;
    }

    // remove comments from $text
    // todo: make it work for all functions, not just url
    protected function removeComments($text) {
        $look = array(
            'url(', '//', '/*', '"', "'"
        );

        $out = '';
        $min = null;
        while (true) {
            // find the next item
            foreach ($look as $token) {
                $pos = strpos($text, $token);
                if ($pos !== false) {
                    if (!isset($min) || $pos < $min[1]) $min = array($token, $pos);
                }
            }

            if (is_null($min)) break;

            $count = $min[1];
            $skip = 0;
            $newlines = 0;
            switch ($min[0]) {
            case 'url(':
                if (preg_match('/url\(.*?\)/', $text, $m, 0, $count))
                    $count += strlen($m[0]) - strlen($min[0]);
                break;
            case '"':
            case "'":
                if (preg_match('/'.$min[0].'.*?(?<!\\\\)'.$min[0].'/', $text, $m, 0, $count))
                    $count += strlen($m[0]) - 1;
                break;
            case '//':
                $skip = strpos($text, "\n", $count);
                if ($skip === false) $skip = strlen($text) - $count;
                else $skip -= $count;
                break;
            case '/*':
                if (preg_match('/\/\*.*?\*\//s', $text, $m, 0, $count)) {
                    $skip = strlen($m[0]);
                    $newlines = substr_count($m[0], "\n");
                }
                break;
            }

            if ($skip == 0) $count += strlen($min[0]);

            $out .= substr($text, 0, $count).str_repeat("\n", $newlines);
            $text = substr($text, $count + $skip);

            $min = null;
        }

        return $out.$text;
    }

}

class lessc_formatter_classic {
    public $indentChar = "  ";

    public $break = "\n";
    public $open = " {";
    public $close = "}";
    public $selectorSeparator = ", ";
    public $assignSeparator = ":";

    public $openSingle = " { ";
    public $closeSingle = " }";

    public $disableSingle = false;
    public $breakSelectors = false;

    public $compressColors = false;

    public function __construct() {
        $this->indentLevel = 0;
    }

    public function indentStr($n = 0) {
        return str_repeat($this->indentChar, max($this->indentLevel + $n, 0));
    }

    public function property($name, $value) {
        return $name . $this->assignSeparator . $value . ";";
    }

    protected function isEmpty($block) {
        if (empty($block->lines)) {
            foreach ($block->children as $child) {
                if (!$this->isEmpty($child)) return false;
            }

            return true;
        }
        return false;
    }

    public function block($block) {
        if ($this->isEmpty($block)) return;

        $inner = $pre = $this->indentStr();

        $isSingle = !$this->disableSingle &&
            is_null($block->type) && count($block->lines) == 1;

        if (!empty($block->selectors)) {
            $this->indentLevel++;

            if ($this->breakSelectors) {
                $selectorSeparator = $this->selectorSeparator . $this->break . $pre;
            } else {
                $selectorSeparator = $this->selectorSeparator;
            }

            echo $pre .
                implode($selectorSeparator, $block->selectors);
            if ($isSingle) {
                echo $this->openSingle;
                $inner = "";
            } else {
                echo $this->open . $this->break;
                $inner = $this->indentStr();
            }

        }

        if (!empty($block->lines)) {
            $glue = $this->break.$inner;
            echo $inner . implode($glue, $block->lines);
            if (!$isSingle && !empty($block->children)) {
                echo $this->break;
            }
        }

        foreach ($block->children as $child) {
            $this->block($child);
        }

        if (!empty($block->selectors)) {
            if (!$isSingle && empty($block->children)) echo $this->break;

            if ($isSingle) {
                echo $this->closeSingle . $this->break;
            } else {
                echo $pre . $this->close . $this->break;
            }

            $this->indentLevel--;
        }
    }
}

class lessc_formatter_compressed extends lessc_formatter_classic {
    public $disableSingle = true;
    public $open = "{";
    public $selectorSeparator = ",";
    public $assignSeparator = ":";
    public $break = "";
    public $compressColors = true;

    public function indentStr($n = 0) {
        return "";
    }
}

class lessc_formatter_lessjs extends lessc_formatter_classic {
    public $disableSingle = true;
    public $breakSelectors = true;
    public $assignSeparator = ": ";
    public $selectorSeparator = ",";
}
libraries/classes/vendor/lessphp/LICENSE000060400000101551152455721620014145 0ustar00For ease of distribution, lessphp is under a dual license.
You are free to pick which one suits your needs.




MIT LICENSE




Copyright (c) 2014 Leaf Corcoran, http://leafo.net/lessphp

Permission is hereby granted, free of charge, to any person obtaining
a copy of this software and associated documentation files (the
"Software"), to deal in the Software without restriction, including
without limitation the rights to use, copy, modify, merge, publish,
distribute, sublicense, and/or sell copies of the Software, and to
permit persons to whom the Software is furnished to do so, subject to
the following conditions:

The above copyright notice and this permission notice shall be
included in all copies or substantial portions of the Software.

THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE
LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION
OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION
WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.




GPL VERSION 3




					GNU GENERAL PUBLIC LICENSE
                       Version 3, 29 June 2007

 Copyright (C) 2007 Free Software Foundation, Inc. <http://fsf.org/>
 Everyone is permitted to copy and distribute verbatim copies
 of this license document, but changing it is not allowed.

                            Preamble

  The GNU General Public License is a free, copyleft license for
software and other kinds of works.

  The licenses for most software and other practical works are designed
to take away your freedom to share and change the works.  By contrast,
the GNU General Public License is intended to guarantee your freedom to
share and change all versions of a program--to make sure it remains free
software for all its users.  We, the Free Software Foundation, use the
GNU General Public License for most of our software; it applies also to
any other work released this way by its authors.  You can apply it to
your programs, too.

  When we speak of free software, we are referring to freedom, not
price.  Our General Public Licenses are designed to make sure that you
have the freedom to distribute copies of free software (and charge for
them if you wish), that you receive source code or can get it if you
want it, that you can change the software or use pieces of it in new
free programs, and that you know you can do these things.

  To protect your rights, we need to prevent others from denying you
these rights or asking you to surrender the rights.  Therefore, you have
certain responsibilities if you distribute copies of the software, or if
you modify it: responsibilities to respect the freedom of others.

  For example, if you distribute copies of such a program, whether
gratis or for a fee, you must pass on to the recipients the same
freedoms that you received.  You must make sure that they, too, receive
or can get the source code.  And you must show them these terms so they
know their rights.

  Developers that use the GNU GPL protect your rights with two steps:
(1) assert copyright on the software, and (2) offer you this License
giving you legal permission to copy, distribute and/or modify it.

  For the developers' and authors' protection, the GPL clearly explains
that there is no warranty for this free software.  For both users' and
authors' sake, the GPL requires that modified versions be marked as
changed, so that their problems will not be attributed erroneously to
authors of previous versions.

  Some devices are designed to deny users access to install or run
modified versions of the software inside them, although the manufacturer
can do so.  This is fundamentally incompatible with the aim of
protecting users' freedom to change the software.  The systematic
pattern of such abuse occurs in the area of products for individuals to
use, which is precisely where it is most unacceptable.  Therefore, we
have designed this version of the GPL to prohibit the practice for those
products.  If such problems arise substantially in other domains, we
stand ready to extend this provision to those domains in future versions
of the GPL, as needed to protect the freedom of users.

  Finally, every program is threatened constantly by software patents.
States should not allow patents to restrict development and use of
software on general-purpose computers, but in those that do, we wish to
avoid the special danger that patents applied to a free program could
make it effectively proprietary.  To prevent this, the GPL assures that
patents cannot be used to render the program non-free.

  The precise terms and conditions for copying, distribution and
modification follow.

                       TERMS AND CONDITIONS

  0. Definitions.

  "This License" refers to version 3 of the GNU General Public License.

  "Copyright" also means copyright-like laws that apply to other kinds of
works, such as semiconductor masks.

  "The Program" refers to any copyrightable work licensed under this
License.  Each licensee is addressed as "you".  "Licensees" and
"recipients" may be individuals or organizations.

  To "modify" a work means to copy from or adapt all or part of the work
in a fashion requiring copyright permission, other than the making of an
exact copy.  The resulting work is called a "modified version" of the
earlier work or a work "based on" the earlier work.

  A "covered work" means either the unmodified Program or a work based
on the Program.

  To "propagate" a work means to do anything with it that, without
permission, would make you directly or secondarily liable for
infringement under applicable copyright law, except executing it on a
computer or modifying a private copy.  Propagation includes copying,
distribution (with or without modification), making available to the
public, and in some countries other activities as well.

  To "convey" a work means any kind of propagation that enables other
parties to make or receive copies.  Mere interaction with a user through
a computer network, with no transfer of a copy, is not conveying.

  An interactive user interface displays "Appropriate Legal Notices"
to the extent that it includes a convenient and prominently visible
feature that (1) displays an appropriate copyright notice, and (2)
tells the user that there is no warranty for the work (except to the
extent that warranties are provided), that licensees may convey the
work under this License, and how to view a copy of this License.  If
the interface presents a list of user commands or options, such as a
menu, a prominent item in the list meets this criterion.

  1. Source Code.

  The "source code" for a work means the preferred form of the work
for making modifications to it.  "Object code" means any non-source
form of a work.

  A "Standard Interface" means an interface that either is an official
standard defined by a recognized standards body, or, in the case of
interfaces specified for a particular programming language, one that
is widely used among developers working in that language.

  The "System Libraries" of an executable work include anything, other
than the work as a whole, that (a) is included in the normal form of
packaging a Major Component, but which is not part of that Major
Component, and (b) serves only to enable use of the work with that
Major Component, or to implement a Standard Interface for which an
implementation is available to the public in source code form.  A
"Major Component", in this context, means a major essential component
(kernel, window system, and so on) of the specific operating system
(if any) on which the executable work runs, or a compiler used to
produce the work, or an object code interpreter used to run it.

  The "Corresponding Source" for a work in object code form means all
the source code needed to generate, install, and (for an executable
work) run the object code and to modify the work, including scripts to
control those activities.  However, it does not include the work's
System Libraries, or general-purpose tools or generally available free
programs which are used unmodified in performing those activities but
which are not part of the work.  For example, Corresponding Source
includes interface definition files associated with source files for
the work, and the source code for shared libraries and dynamically
linked subprograms that the work is specifically designed to require,
such as by intimate data communication or control flow between those
subprograms and other parts of the work.

  The Corresponding Source need not include anything that users
can regenerate automatically from other parts of the Corresponding
Source.

  The Corresponding Source for a work in source code form is that
same work.

  2. Basic Permissions.

  All rights granted under this License are granted for the term of
copyright on the Program, and are irrevocable provided the stated
conditions are met.  This License explicitly affirms your unlimited
permission to run the unmodified Program.  The output from running a
covered work is covered by this License only if the output, given its
content, constitutes a covered work.  This License acknowledges your
rights of fair use or other equivalent, as provided by copyright law.

  You may make, run and propagate covered works that you do not
convey, without conditions so long as your license otherwise remains
in force.  You may convey covered works to others for the sole purpose
of having them make modifications exclusively for you, or provide you
with facilities for running those works, provided that you comply with
the terms of this License in conveying all material for which you do
not control copyright.  Those thus making or running the covered works
for you must do so exclusively on your behalf, under your direction
and control, on terms that prohibit them from making any copies of
your copyrighted material outside their relationship with you.

  Conveying under any other circumstances is permitted solely under
the conditions stated below.  Sublicensing is not allowed; section 10
makes it unnecessary.

  3. Protecting Users' Legal Rights From Anti-Circumvention Law.

  No covered work shall be deemed part of an effective technological
measure under any applicable law fulfilling obligations under article
11 of the WIPO copyright treaty adopted on 20 December 1996, or
similar laws prohibiting or restricting circumvention of such
measures.

  When you convey a covered work, you waive any legal power to forbid
circumvention of technological measures to the extent such circumvention
is effected by exercising rights under this License with respect to
the covered work, and you disclaim any intention to limit operation or
modification of the work as a means of enforcing, against the work's
users, your or third parties' legal rights to forbid circumvention of
technological measures.

  4. Conveying Verbatim Copies.

  You may convey verbatim copies of the Program's source code as you
receive it, in any medium, provided that you conspicuously and
appropriately publish on each copy an appropriate copyright notice;
keep intact all notices stating that this License and any
non-permissive terms added in accord with section 7 apply to the code;
keep intact all notices of the absence of any warranty; and give all
recipients a copy of this License along with the Program.

  You may charge any price or no price for each copy that you convey,
and you may offer support or warranty protection for a fee.

  5. Conveying Modified Source Versions.

  You may convey a work based on the Program, or the modifications to
produce it from the Program, in the form of source code under the
terms of section 4, provided that you also meet all of these conditions:

    a) The work must carry prominent notices stating that you modified
    it, and giving a relevant date.

    b) The work must carry prominent notices stating that it is
    released under this License and any conditions added under section
    7.  This requirement modifies the requirement in section 4 to
    "keep intact all notices".

    c) You must license the entire work, as a whole, under this
    License to anyone who comes into possession of a copy.  This
    License will therefore apply, along with any applicable section 7
    additional terms, to the whole of the work, and all its parts,
    regardless of how they are packaged.  This License gives no
    permission to license the work in any other way, but it does not
    invalidate such permission if you have separately received it.

    d) If the work has interactive user interfaces, each must display
    Appropriate Legal Notices; however, if the Program has interactive
    interfaces that do not display Appropriate Legal Notices, your
    work need not make them do so.

  A compilation of a covered work with other separate and independent
works, which are not by their nature extensions of the covered work,
and which are not combined with it such as to form a larger program,
in or on a volume of a storage or distribution medium, is called an
"aggregate" if the compilation and its resulting copyright are not
used to limit the access or legal rights of the compilation's users
beyond what the individual works permit.  Inclusion of a covered work
in an aggregate does not cause this License to apply to the other
parts of the aggregate.

  6. Conveying Non-Source Forms.

  You may convey a covered work in object code form under the terms
of sections 4 and 5, provided that you also convey the
machine-readable Corresponding Source under the terms of this License,
in one of these ways:

    a) Convey the object code in, or embodied in, a physical product
    (including a physical distribution medium), accompanied by the
    Corresponding Source fixed on a durable physical medium
    customarily used for software interchange.

    b) Convey the object code in, or embodied in, a physical product
    (including a physical distribution medium), accompanied by a
    written offer, valid for at least three years and valid for as
    long as you offer spare parts or customer support for that product
    model, to give anyone who possesses the object code either (1) a
    copy of the Corresponding Source for all the software in the
    product that is covered by this License, on a durable physical
    medium customarily used for software interchange, for a price no
    more than your reasonable cost of physically performing this
    conveying of source, or (2) access to copy the
    Corresponding Source from a network server at no charge.

    c) Convey individual copies of the object code with a copy of the
    written offer to provide the Corresponding Source.  This
    alternative is allowed only occasionally and noncommercially, and
    only if you received the object code with such an offer, in accord
    with subsection 6b.

    d) Convey the object code by offering access from a designated
    place (gratis or for a charge), and offer equivalent access to the
    Corresponding Source in the same way through the same place at no
    further charge.  You need not require recipients to copy the
    Corresponding Source along with the object code.  If the place to
    copy the object code is a network server, the Corresponding Source
    may be on a different server (operated by you or a third party)
    that supports equivalent copying facilities, provided you maintain
    clear directions next to the object code saying where to find the
    Corresponding Source.  Regardless of what server hosts the
    Corresponding Source, you remain obligated to ensure that it is
    available for as long as needed to satisfy these requirements.

    e) Convey the object code using peer-to-peer transmission, provided
    you inform other peers where the object code and Corresponding
    Source of the work are being offered to the general public at no
    charge under subsection 6d.

  A separable portion of the object code, whose source code is excluded
from the Corresponding Source as a System Library, need not be
included in conveying the object code work.

  A "User Product" is either (1) a "consumer product", which means any
tangible personal property which is normally used for personal, family,
or household purposes, or (2) anything designed or sold for incorporation
into a dwelling.  In determining whether a product is a consumer product,
doubtful cases shall be resolved in favor of coverage.  For a particular
product received by a particular user, "normally used" refers to a
typical or common use of that class of product, regardless of the status
of the particular user or of the way in which the particular user
actually uses, or expects or is expected to use, the product.  A product
is a consumer product regardless of whether the product has substantial
commercial, industrial or non-consumer uses, unless such uses represent
the only significant mode of use of the product.

  "Installation Information" for a User Product means any methods,
procedures, authorization keys, or other information required to install
and execute modified versions of a covered work in that User Product from
a modified version of its Corresponding Source.  The information must
suffice to ensure that the continued functioning of the modified object
code is in no case prevented or interfered with solely because
modification has been made.

  If you convey an object code work under this section in, or with, or
specifically for use in, a User Product, and the conveying occurs as
part of a transaction in which the right of possession and use of the
User Product is transferred to the recipient in perpetuity or for a
fixed term (regardless of how the transaction is characterized), the
Corresponding Source conveyed under this section must be accompanied
by the Installation Information.  But this requirement does not apply
if neither you nor any third party retains the ability to install
modified object code on the User Product (for example, the work has
been installed in ROM).

  The requirement to provide Installation Information does not include a
requirement to continue to provide support service, warranty, or updates
for a work that has been modified or installed by the recipient, or for
the User Product in which it has been modified or installed.  Access to a
network may be denied when the modification itself materially and
adversely affects the operation of the network or violates the rules and
protocols for communication across the network.

  Corresponding Source conveyed, and Installation Information provided,
in accord with this section must be in a format that is publicly
documented (and with an implementation available to the public in
source code form), and must require no special password or key for
unpacking, reading or copying.

  7. Additional Terms.

  "Additional permissions" are terms that supplement the terms of this
License by making exceptions from one or more of its conditions.
Additional permissions that are applicable to the entire Program shall
be treated as though they were included in this License, to the extent
that they are valid under applicable law.  If additional permissions
apply only to part of the Program, that part may be used separately
under those permissions, but the entire Program remains governed by
this License without regard to the additional permissions.

  When you convey a copy of a covered work, you may at your option
remove any additional permissions from that copy, or from any part of
it.  (Additional permissions may be written to require their own
removal in certain cases when you modify the work.)  You may place
additional permissions on material, added by you to a covered work,
for which you have or can give appropriate copyright permission.

  Notwithstanding any other provision of this License, for material you
add to a covered work, you may (if authorized by the copyright holders of
that material) supplement the terms of this License with terms:

    a) Disclaiming warranty or limiting liability differently from the
    terms of sections 15 and 16 of this License; or

    b) Requiring preservation of specified reasonable legal notices or
    author attributions in that material or in the Appropriate Legal
    Notices displayed by works containing it; or

    c) Prohibiting misrepresentation of the origin of that material, or
    requiring that modified versions of such material be marked in
    reasonable ways as different from the original version; or

    d) Limiting the use for publicity purposes of names of licensors or
    authors of the material; or

    e) Declining to grant rights under trademark law for use of some
    trade names, trademarks, or service marks; or

    f) Requiring indemnification of licensors and authors of that
    material by anyone who conveys the material (or modified versions of
    it) with contractual assumptions of liability to the recipient, for
    any liability that these contractual assumptions directly impose on
    those licensors and authors.

  All other non-permissive additional terms are considered "further
restrictions" within the meaning of section 10.  If the Program as you
received it, or any part of it, contains a notice stating that it is
governed by this License along with a term that is a further
restriction, you may remove that term.  If a license document contains
a further restriction but permits relicensing or conveying under this
License, you may add to a covered work material governed by the terms
of that license document, provided that the further restriction does
not survive such relicensing or conveying.

  If you add terms to a covered work in accord with this section, you
must place, in the relevant source files, a statement of the
additional terms that apply to those files, or a notice indicating
where to find the applicable terms.

  Additional terms, permissive or non-permissive, may be stated in the
form of a separately written license, or stated as exceptions;
the above requirements apply either way.

  8. Termination.

  You may not propagate or modify a covered work except as expressly
provided under this License.  Any attempt otherwise to propagate or
modify it is void, and will automatically terminate your rights under
this License (including any patent licenses granted under the third
paragraph of section 11).

  However, if you cease all violation of this License, then your
license from a particular copyright holder is reinstated (a)
provisionally, unless and until the copyright holder explicitly and
finally terminates your license, and (b) permanently, if the copyright
holder fails to notify you of the violation by some reasonable means
prior to 60 days after the cessation.

  Moreover, your license from a particular copyright holder is
reinstated permanently if the copyright holder notifies you of the
violation by some reasonable means, this is the first time you have
received notice of violation of this License (for any work) from that
copyright holder, and you cure the violation prior to 30 days after
your receipt of the notice.

  Termination of your rights under this section does not terminate the
licenses of parties who have received copies or rights from you under
this License.  If your rights have been terminated and not permanently
reinstated, you do not qualify to receive new licenses for the same
material under section 10.

  9. Acceptance Not Required for Having Copies.

  You are not required to accept this License in order to receive or
run a copy of the Program.  Ancillary propagation of a covered work
occurring solely as a consequence of using peer-to-peer transmission
to receive a copy likewise does not require acceptance.  However,
nothing other than this License grants you permission to propagate or
modify any covered work.  These actions infringe copyright if you do
not accept this License.  Therefore, by modifying or propagating a
covered work, you indicate your acceptance of this License to do so.

  10. Automatic Licensing of Downstream Recipients.

  Each time you convey a covered work, the recipient automatically
receives a license from the original licensors, to run, modify and
propagate that work, subject to this License.  You are not responsible
for enforcing compliance by third parties with this License.

  An "entity transaction" is a transaction transferring control of an
organization, or substantially all assets of one, or subdividing an
organization, or merging organizations.  If propagation of a covered
work results from an entity transaction, each party to that
transaction who receives a copy of the work also receives whatever
licenses to the work the party's predecessor in interest had or could
give under the previous paragraph, plus a right to possession of the
Corresponding Source of the work from the predecessor in interest, if
the predecessor has it or can get it with reasonable efforts.

  You may not impose any further restrictions on the exercise of the
rights granted or affirmed under this License.  For example, you may
not impose a license fee, royalty, or other charge for exercise of
rights granted under this License, and you may not initiate litigation
(including a cross-claim or counterclaim in a lawsuit) alleging that
any patent claim is infringed by making, using, selling, offering for
sale, or importing the Program or any portion of it.

  11. Patents.

  A "contributor" is a copyright holder who authorizes use under this
License of the Program or a work on which the Program is based.  The
work thus licensed is called the contributor's "contributor version".

  A contributor's "essential patent claims" are all patent claims
owned or controlled by the contributor, whether already acquired or
hereafter acquired, that would be infringed by some manner, permitted
by this License, of making, using, or selling its contributor version,
but do not include claims that would be infringed only as a
consequence of further modification of the contributor version.  For
purposes of this definition, "control" includes the right to grant
patent sublicenses in a manner consistent with the requirements of
this License.

  Each contributor grants you a non-exclusive, worldwide, royalty-free
patent license under the contributor's essential patent claims, to
make, use, sell, offer for sale, import and otherwise run, modify and
propagate the contents of its contributor version.

  In the following three paragraphs, a "patent license" is any express
agreement or commitment, however denominated, not to enforce a patent
(such as an express permission to practice a patent or covenant not to
sue for patent infringement).  To "grant" such a patent license to a
party means to make such an agreement or commitment not to enforce a
patent against the party.

  If you convey a covered work, knowingly relying on a patent license,
and the Corresponding Source of the work is not available for anyone
to copy, free of charge and under the terms of this License, through a
publicly available network server or other readily accessible means,
then you must either (1) cause the Corresponding Source to be so
available, or (2) arrange to deprive yourself of the benefit of the
patent license for this particular work, or (3) arrange, in a manner
consistent with the requirements of this License, to extend the patent
license to downstream recipients.  "Knowingly relying" means you have
actual knowledge that, but for the patent license, your conveying the
covered work in a country, or your recipient's use of the covered work
in a country, would infringe one or more identifiable patents in that
country that you have reason to believe are valid.

  If, pursuant to or in connection with a single transaction or
arrangement, you convey, or propagate by procuring conveyance of, a
covered work, and grant a patent license to some of the parties
receiving the covered work authorizing them to use, propagate, modify
or convey a specific copy of the covered work, then the patent license
you grant is automatically extended to all recipients of the covered
work and works based on it.

  A patent license is "discriminatory" if it does not include within
the scope of its coverage, prohibits the exercise of, or is
conditioned on the non-exercise of one or more of the rights that are
specifically granted under this License.  You may not convey a covered
work if you are a party to an arrangement with a third party that is
in the business of distributing software, under which you make payment
to the third party based on the extent of your activity of conveying
the work, and under which the third party grants, to any of the
parties who would receive the covered work from you, a discriminatory
patent license (a) in connection with copies of the covered work
conveyed by you (or copies made from those copies), or (b) primarily
for and in connection with specific products or compilations that
contain the covered work, unless you entered into that arrangement,
or that patent license was granted, prior to 28 March 2007.

  Nothing in this License shall be construed as excluding or limiting
any implied license or other defenses to infringement that may
otherwise be available to you under applicable patent law.

  12. No Surrender of Others' Freedom.

  If conditions are imposed on you (whether by court order, agreement or
otherwise) that contradict the conditions of this License, they do not
excuse you from the conditions of this License.  If you cannot convey a
covered work so as to satisfy simultaneously your obligations under this
License and any other pertinent obligations, then as a consequence you may
not convey it at all.  For example, if you agree to terms that obligate you
to collect a royalty for further conveying from those to whom you convey
the Program, the only way you could satisfy both those terms and this
License would be to refrain entirely from conveying the Program.

  13. Use with the GNU Affero General Public License.

  Notwithstanding any other provision of this License, you have
permission to link or combine any covered work with a work licensed
under version 3 of the GNU Affero General Public License into a single
combined work, and to convey the resulting work.  The terms of this
License will continue to apply to the part which is the covered work,
but the special requirements of the GNU Affero General Public License,
section 13, concerning interaction through a network will apply to the
combination as such.

  14. Revised Versions of this License.

  The Free Software Foundation may publish revised and/or new versions of
the GNU General Public License from time to time.  Such new versions will
be similar in spirit to the present version, but may differ in detail to
address new problems or concerns.

  Each version is given a distinguishing version number.  If the
Program specifies that a certain numbered version of the GNU General
Public License "or any later version" applies to it, you have the
option of following the terms and conditions either of that numbered
version or of any later version published by the Free Software
Foundation.  If the Program does not specify a version number of the
GNU General Public License, you may choose any version ever published
by the Free Software Foundation.

  If the Program specifies that a proxy can decide which future
versions of the GNU General Public License can be used, that proxy's
public statement of acceptance of a version permanently authorizes you
to choose that version for the Program.

  Later license versions may give you additional or different
permissions.  However, no additional obligations are imposed on any
author or copyright holder as a result of your choosing to follow a
later version.

  15. Disclaimer of Warranty.

  THERE IS NO WARRANTY FOR THE PROGRAM, TO THE EXTENT PERMITTED BY
APPLICABLE LAW.  EXCEPT WHEN OTHERWISE STATED IN WRITING THE COPYRIGHT
HOLDERS AND/OR OTHER PARTIES PROVIDE THE PROGRAM "AS IS" WITHOUT WARRANTY
OF ANY KIND, EITHER EXPRESSED OR IMPLIED, INCLUDING, BUT NOT LIMITED TO,
THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
PURPOSE.  THE ENTIRE RISK AS TO THE QUALITY AND PERFORMANCE OF THE PROGRAM
IS WITH YOU.  SHOULD THE PROGRAM PROVE DEFECTIVE, YOU ASSUME THE COST OF
ALL NECESSARY SERVICING, REPAIR OR CORRECTION.

  16. Limitation of Liability.

  IN NO EVENT UNLESS REQUIRED BY APPLICABLE LAW OR AGREED TO IN WRITING
WILL ANY COPYRIGHT HOLDER, OR ANY OTHER PARTY WHO MODIFIES AND/OR CONVEYS
THE PROGRAM AS PERMITTED ABOVE, BE LIABLE TO YOU FOR DAMAGES, INCLUDING ANY
GENERAL, SPECIAL, INCIDENTAL OR CONSEQUENTIAL DAMAGES ARISING OUT OF THE
USE OR INABILITY TO USE THE PROGRAM (INCLUDING BUT NOT LIMITED TO LOSS OF
DATA OR DATA BEING RENDERED INACCURATE OR LOSSES SUSTAINED BY YOU OR THIRD
PARTIES OR A FAILURE OF THE PROGRAM TO OPERATE WITH ANY OTHER PROGRAMS),
EVEN IF SUCH HOLDER OR OTHER PARTY HAS BEEN ADVISED OF THE POSSIBILITY OF
SUCH DAMAGES.

  17. Interpretation of Sections 15 and 16.

  If the disclaimer of warranty and limitation of liability provided
above cannot be given local legal effect according to their terms,
reviewing courts shall apply local law that most closely approximates
an absolute waiver of all civil liability in connection with the
Program, unless a warranty or assumption of liability accompanies a
copy of the Program in return for a fee.

libraries/classes/vendor/lessphp/index.html000060400000000054152455721620015131 0ustar00<html><body bgcolor="#FFFFFF"></body></html>libraries/classes/vendor/index.html000060400000000054152455721620013453 0ustar00<html><body bgcolor="#FFFFFF"></body></html>libraries/classes/vendor/cssmin/src/Colors.php000060400000012561152455721620015521 0ustar00<?php

namespace tubalmartin\CssMin;

class Colors
{
    public static function getHexToNamedMap()
    {
        // Hex colors longer than named counterpart
        return array(
            '#f0ffff' => 'azure',
            '#f5f5dc' => 'beige',
            '#ffe4c4' => 'bisque',
            '#a52a2a' => 'brown',
            '#ff7f50' => 'coral',
            '#ffd700' => 'gold',
            '#808080' => 'gray',
            '#008000' => 'green',
            '#4b0082' => 'indigo',
            '#fffff0' => 'ivory',
            '#f0e68c' => 'khaki',
            '#faf0e6' => 'linen',
            '#800000' => 'maroon',
            '#000080' => 'navy',
            '#fdf5e6' => 'oldlace',
            '#808000' => 'olive',
            '#ffa500' => 'orange',
            '#da70d6' => 'orchid',
            '#cd853f' => 'peru',
            '#ffc0cb' => 'pink',
            '#dda0dd' => 'plum',
            '#800080' => 'purple',
            '#f00'    => 'red',
            '#fa8072' => 'salmon',
            '#a0522d' => 'sienna',
            '#c0c0c0' => 'silver',
            '#fffafa' => 'snow',
            '#d2b48c' => 'tan',
            '#008080' => 'teal',
            '#ff6347' => 'tomato',
            '#ee82ee' => 'violet',
            '#f5deb3' => 'wheat'
        );
    }

    public static function getNamedToHexMap()
    {
        // Named colors longer than hex counterpart
        return array(
            'aliceblue' => '#f0f8ff',
            'antiquewhite' => '#faebd7',
            'aquamarine' => '#7fffd4',
            'black' => '#000',
            'blanchedalmond' => '#ffebcd',
            'blueviolet' => '#8a2be2',
            'burlywood' => '#deb887',
            'cadetblue' => '#5f9ea0',
            'chartreuse' => '#7fff00',
            'chocolate' => '#d2691e',
            'cornflowerblue' => '#6495ed',
            'cornsilk' => '#fff8dc',
            'darkblue' => '#00008b',
            'darkcyan' => '#008b8b',
            'darkgoldenrod' => '#b8860b',
            'darkgray' => '#a9a9a9',
            'darkgreen' => '#006400',
            'darkgrey' => '#a9a9a9',
            'darkkhaki' => '#bdb76b',
            'darkmagenta' => '#8b008b',
            'darkolivegreen' => '#556b2f',
            'darkorange' => '#ff8c00',
            'darkorchid' => '#9932cc',
            'darksalmon' => '#e9967a',
            'darkseagreen' => '#8fbc8f',
            'darkslateblue' => '#483d8b',
            'darkslategray' => '#2f4f4f',
            'darkslategrey' => '#2f4f4f',
            'darkturquoise' => '#00ced1',
            'darkviolet' => '#9400d3',
            'deeppink' => '#ff1493',
            'deepskyblue' => '#00bfff',
            'dodgerblue' => '#1e90ff',
            'firebrick' => '#b22222',
            'floralwhite' => '#fffaf0',
            'forestgreen' => '#228b22',
            'fuchsia' => '#f0f',
            'gainsboro' => '#dcdcdc',
            'ghostwhite' => '#f8f8ff',
            'goldenrod' => '#daa520',
            'greenyellow' => '#adff2f',
            'honeydew' => '#f0fff0',
            'indianred' => '#cd5c5c',
            'lavender' => '#e6e6fa',
            'lavenderblush' => '#fff0f5',
            'lawngreen' => '#7cfc00',
            'lemonchiffon' => '#fffacd',
            'lightblue' => '#add8e6',
            'lightcoral' => '#f08080',
            'lightcyan' => '#e0ffff',
            'lightgoldenrodyellow' => '#fafad2',
            'lightgray' => '#d3d3d3',
            'lightgreen' => '#90ee90',
            'lightgrey' => '#d3d3d3',
            'lightpink' => '#ffb6c1',
            'lightsalmon' => '#ffa07a',
            'lightseagreen' => '#20b2aa',
            'lightskyblue' => '#87cefa',
            'lightslategray' => '#778899',
            'lightslategrey' => '#778899',
            'lightsteelblue' => '#b0c4de',
            'lightyellow' => '#ffffe0',
            'limegreen' => '#32cd32',
            'mediumaquamarine' => '#66cdaa',
            'mediumblue' => '#0000cd',
            'mediumorchid' => '#ba55d3',
            'mediumpurple' => '#9370db',
            'mediumseagreen' => '#3cb371',
            'mediumslateblue' => '#7b68ee',
            'mediumspringgreen' => '#00fa9a',
            'mediumturquoise' => '#48d1cc',
            'mediumvioletred' => '#c71585',
            'midnightblue' => '#191970',
            'mintcream' => '#f5fffa',
            'mistyrose' => '#ffe4e1',
            'moccasin' => '#ffe4b5',
            'navajowhite' => '#ffdead',
            'olivedrab' => '#6b8e23',
            'orangered' => '#ff4500',
            'palegoldenrod' => '#eee8aa',
            'palegreen' => '#98fb98',
            'paleturquoise' => '#afeeee',
            'palevioletred' => '#db7093',
            'papayawhip' => '#ffefd5',
            'peachpuff' => '#ffdab9',
            'powderblue' => '#b0e0e6',
            'rebeccapurple' => '#663399',
            'rosybrown' => '#bc8f8f',
            'royalblue' => '#4169e1',
            'saddlebrown' => '#8b4513',
            'sandybrown' => '#f4a460',
            'seagreen' => '#2e8b57',
            'seashell' => '#fff5ee',
            'slateblue' => '#6a5acd',
            'slategray' => '#708090',
            'slategrey' => '#708090',
            'springgreen' => '#00ff7f',
            'steelblue' => '#4682b4',
            'turquoise' => '#40e0d0',
            'white' => '#fff',
            'whitesmoke' => '#f5f5f5',
            'yellow' => '#ff0',
            'yellowgreen' => '#9acd32'
        );
    }
}
libraries/classes/vendor/cssmin/src/Minifier.php000060400000076515152455721620016033 0ustar00<?php

/*!
 * CssMin
 * Author: Tubal Martin - http://tubalmartin.me/
 * Repo: https://github.com/tubalmartin/YUI-CSS-compressor-PHP-port
 *
 * This is a PHP port of the CSS minification tool distributed with YUICompressor,
 * itself a port of the cssmin utility by Isaac Schlueter - http://foohack.com/
 * Permission is hereby granted to use the PHP version under the same
 * conditions as the YUICompressor.
 */

/*!
 * YUI Compressor
 * http://developer.yahoo.com/yui/compressor/
 * Author: Julien Lecomte - http://www.julienlecomte.net/
 * Copyright (c) 2013 Yahoo! Inc. All rights reserved.
 * The copyrights embodied in the content of this file are licensed
 * by Yahoo! Inc. under the BSD (revised) open source license.
 */

namespace tubalmartin\CssMin;

class Minifier
{
    const QUERY_FRACTION = '_CSSMIN_QF_';
    const COMMENT_TOKEN = '_CSSMIN_CMT_%d_';
    const COMMENT_TOKEN_START = '_CSSMIN_CMT_';
    const RULE_BODY_TOKEN = '_CSSMIN_RBT_%d_';
    const PRESERVED_TOKEN = '_CSSMIN_PTK_%d_';
    
    // Token lists
    private $comments = array();
    private $ruleBodies = array();
    private $preservedTokens = array();
    
    // Output options
    private $keepImportantComments = true;
    private $keepSourceMapComment = false;
    private $linebreakPosition = 0;
    
    // PHP ini limits
    private $raisePhpLimits;
    private $memoryLimit;
    private $maxExecutionTime = 60; // 1 min
    private $pcreBacktrackLimit;
    private $pcreRecursionLimit;
    
    // Color maps
    private $hexToNamedColorsMap;
    private $namedToHexColorsMap;
    
    // Regexes
    private $numRegex;
    private $charsetRegex = '/@charset [^;]+;/Si';
    private $importRegex = '/@import [^;]+;/Si';
    private $namespaceRegex = '/@namespace [^;]+;/Si';
    private $namedToHexColorsRegex;
    private $shortenOneZeroesRegex;
    private $shortenTwoZeroesRegex;
    private $shortenThreeZeroesRegex;
    private $shortenFourZeroesRegex;
    private $unitsGroupRegex = '(?:ch|cm|em|ex|gd|in|mm|px|pt|pc|q|rem|vh|vmax|vmin|vw|%)';

    /**
     * @param bool|int $raisePhpLimits If true, PHP settings will be raised if needed
     */
    public function __construct($raisePhpLimits = true)
    {
        $this->raisePhpLimits = (bool) $raisePhpLimits;
        $this->memoryLimit = 128 * 1048576; // 128MB in bytes
        $this->pcreBacktrackLimit = 1000 * 1000;
        $this->pcreRecursionLimit = 500 * 1000;
        $this->hexToNamedColorsMap = Colors::getHexToNamedMap();
        $this->namedToHexColorsMap = Colors::getNamedToHexMap();
        $this->namedToHexColorsRegex = sprintf(
            '/([:,( ])(%s)( |,|\)|;|$)/Si',
            implode('|', array_keys($this->namedToHexColorsMap))
        );
        $this->numRegex = sprintf('-?\d*\.?\d+%s?', $this->unitsGroupRegex);
        $this->setShortenZeroValuesRegexes();
    }

    /**
     * Parses & minifies the given input CSS string
     * @param string $css
     * @return string
     */
    public function run($css = '')
    {
        if (empty($css) || !is_string($css)) {
            return '';
        }

        $this->resetRunProperties();

        if ($this->raisePhpLimits) {
            $this->doRaisePhpLimits();
        }

        return $this->minify($css);
    }

    /**
     * Sets whether to keep or remove sourcemap special comment.
     * Sourcemap comments are removed by default.
     * @param bool $keepSourceMapComment
     */
    public function keepSourceMapComment($keepSourceMapComment = true)
    {
        $this->keepSourceMapComment = (bool) $keepSourceMapComment;
    }

    /**
     * Sets whether to keep or remove important comments.
     * Important comments outside of a declaration block are kept by default.
     * @param bool $removeImportantComments
     */
    public function removeImportantComments($removeImportantComments = true)
    {
        $this->keepImportantComments = !(bool) $removeImportantComments;
    }

    /**
     * Sets the approximate column after which long lines will be splitted in the output
     * with a linebreak.
     * @param int $position
     */
    public function setLineBreakPosition($position)
    {
        $this->linebreakPosition = (int) $position;
    }

    /**
     * Sets the memory limit for this script
     * @param int|string $limit
     */
    public function setMemoryLimit($limit)
    {
        $this->memoryLimit = Utils::normalizeInt($limit);
    }

    /**
     * Sets the maximum execution time for this script
     * @param int|string $seconds
     */
    public function setMaxExecutionTime($seconds)
    {
        $this->maxExecutionTime = (int) $seconds;
    }

    /**
     * Sets the PCRE backtrack limit for this script
     * @param int $limit
     */
    public function setPcreBacktrackLimit($limit)
    {
        $this->pcreBacktrackLimit = (int) $limit;
    }

    /**
     * Sets the PCRE recursion limit for this script
     * @param int $limit
     */
    public function setPcreRecursionLimit($limit)
    {
        $this->pcreRecursionLimit = (int) $limit;
    }

    /**
     * Builds regular expressions needed for shortening zero values
     */
    private function setShortenZeroValuesRegexes()
    {
        $zeroRegex = '0'. $this->unitsGroupRegex;
        $numOrPosRegex = '('. $this->numRegex .'|top|left|bottom|right|center) ';
        $oneZeroSafeProperties = array(
            '(?:line-)?height',
            '(?:(?:min|max)-)?width',
            'top',
            'left',
            'background-position',
            'bottom',
            'right',
            'border(?:-(?:top|left|bottom|right))?(?:-width)?',
            'border-(?:(?:top|bottom)-(?:left|right)-)?radius',
            'column-(?:gap|width)',
            'margin(?:-(?:top|left|bottom|right))?',
            'outline-width',
            'padding(?:-(?:top|left|bottom|right))?'
        );

        // First zero regex
        $regex = '/(^|;)('. implode('|', $oneZeroSafeProperties) .'):%s/Si';
        $this->shortenOneZeroesRegex = sprintf($regex, $zeroRegex);

        // Multiple zeroes regexes
        $regex = '/(^|;)(margin|padding|border-(?:width|radius)|background-position):%s/Si';
        $this->shortenTwoZeroesRegex = sprintf($regex, $numOrPosRegex . $zeroRegex);
        $this->shortenThreeZeroesRegex = sprintf($regex, $numOrPosRegex . $numOrPosRegex . $zeroRegex);
        $this->shortenFourZeroesRegex = sprintf($regex, $numOrPosRegex . $numOrPosRegex . $numOrPosRegex . $zeroRegex);
    }

    /**
     * Resets properties whose value may change between runs
     */
    private function resetRunProperties()
    {
        $this->comments = array();
        $this->ruleBodies = array();
        $this->preservedTokens = array();
    }

    /**
     * Tries to configure PHP to use at least the suggested minimum settings
     * @return void
     */
    private function doRaisePhpLimits()
    {
        $phpLimits = array(
            'memory_limit' => $this->memoryLimit,
            'max_execution_time' => $this->maxExecutionTime,
            'pcre.backtrack_limit' => $this->pcreBacktrackLimit,
            'pcre.recursion_limit' =>  $this->pcreRecursionLimit
        );

        // If current settings are higher respect them.
        foreach ($phpLimits as $name => $suggested) {
            $current = Utils::normalizeInt(ini_get($name));

            if ($current >= $suggested) {
                continue;
            }

            // memoryLimit exception: allow -1 for "no memory limit".
            if ($name === 'memory_limit' && $current === -1) {
                continue;
            }

            // maxExecutionTime exception: allow 0 for "no memory limit".
            if ($name === 'max_execution_time' && $current === 0) {
                continue;
            }

            ini_set($name, $suggested);
        }
    }

    /**
     * Registers a preserved token
     * @param string $token
     * @return string The token ID string
     */
    private function registerPreservedToken($token)
    {
        $tokenId = sprintf(self::PRESERVED_TOKEN, count($this->preservedTokens));
        $this->preservedTokens[$tokenId] = $token;
        return $tokenId;
    }

    /**
     * Registers a candidate comment token
     * @param string $comment
     * @return string The comment token ID string
     */
    private function registerCommentToken($comment)
    {
        $tokenId = sprintf(self::COMMENT_TOKEN, count($this->comments));
        $this->comments[$tokenId] = $comment;
        return $tokenId;
    }

    /**
     * Registers a rule body token
     * @param string $body the minified rule body
     * @return string The rule body token ID string
     */
    private function registerRuleBodyToken($body)
    {
        if (empty($body)) {
            return '';
        }

        $tokenId = sprintf(self::RULE_BODY_TOKEN, count($this->ruleBodies));
        $this->ruleBodies[$tokenId] = $body;
        return $tokenId;
    }

    /**
     * Parses & minifies the given input CSS string
     * @param string $css
     * @return string
     */
    private function minify($css)
    {
        // Process data urls
        $css = $this->processDataUrls($css);

        // Process comments
        $css = preg_replace_callback(
            '/(?<!\\\\)\/\*(.*?)\*(?<!\\\\)\//Ss',
            array($this, 'processCommentsCallback'),
            $css
        );

        // IE7: Process Microsoft matrix filters (whitespaces between Matrix parameters). Can contain strings inside.
        $css = preg_replace_callback(
            '/filter:\s*progid:DXImageTransform\.Microsoft\.Matrix\(([^)]+)\)/Ss',
            array($this, 'processOldIeSpecificMatrixDefinitionCallback'),
            $css
        );

        // Process quoted unquotable attribute selectors to unquote them. Covers most common cases.
        // Likelyhood of a quoted attribute selector being a substring in a string: Very very low.
        $css = preg_replace(
            '/\[\s*([a-z][a-z-]+)\s*([\*\|\^\$~]?=)\s*[\'"](-?[a-z_][a-z0-9-_]+)[\'"]\s*\]/Ssi',
            '[$1$2$3]',
            $css
        );

        // Process strings so their content doesn't get accidentally minified
        $css = preg_replace_callback(
            '/(?:"(?:[^\\\\"]|\\\\.|\\\\)*")|'."(?:'(?:[^\\\\']|\\\\.|\\\\)*')/S",
            array($this, 'processStringsCallback'),
            $css
        );

        // Normalize all whitespace strings to single spaces. Easier to work with that way.
        $css = preg_replace('/\s+/S', ' ', $css);

        // Process import At-rules with unquoted URLs so URI reserved characters such as a semicolon may be used safely.
        $css = preg_replace_callback(
            '/@import url\(([^\'"]+?)\)( |;)/Si',
            array($this, 'processImportUnquotedUrlAtRulesCallback'),
            $css
        );
        
        // Process comments
        $css = $this->processComments($css);
        
        // Process rule bodies
        $css = $this->processRuleBodies($css);
        
        // Process at-rules and selectors
        $css = $this->processAtRulesAndSelectors($css);

        // Restore preserved rule bodies before splitting
        $css = strtr($css, $this->ruleBodies);

        // Split long lines in output if required
        $css = $this->processLongLineSplitting($css);

        // Restore preserved comments and strings
        $css = strtr($css, $this->preservedTokens);

        return trim($css);
    }

    /**
     * Searches & replaces all data urls with tokens before we start compressing,
     * to avoid performance issues running some of the subsequent regexes against large string chunks.
     * @param string $css
     * @return string
     */
    private function processDataUrls($css)
    {
        $ret = '';
        $searchOffset = $substrOffset = 0;

        // Since we need to account for non-base64 data urls, we need to handle
        // ' and ) being part of the data string.
        while (preg_match('/url\(\s*(["\']?)data:/Si', $css, $m, PREG_OFFSET_CAPTURE, $searchOffset)) {
            $matchStartIndex = $m[0][1];
            $dataStartIndex = $matchStartIndex + 4; // url( length
            $searchOffset = $matchStartIndex + strlen($m[0][0]);
            $terminator = $m[1][0]; // ', " or empty (not quoted)
            $terminatorRegex = '/(?<!\\\\)'. (strlen($terminator) === 0 ? '' : $terminator.'\s*') .'(\))/S';
            
            $ret .= substr($css, $substrOffset, $matchStartIndex - $substrOffset);

            // Terminator found
            if (preg_match($terminatorRegex, $css, $matches, PREG_OFFSET_CAPTURE, $searchOffset)) {
                $matchEndIndex = $matches[1][1];
                $searchOffset = $matchEndIndex + 1;
                $token = substr($css, $dataStartIndex, $matchEndIndex - $dataStartIndex);

                // Remove all spaces only for base64 encoded URLs.
                if (stripos($token, 'base64,') !== false) {
                    $token = preg_replace('/\s+/S', '', $token);
                }

                $ret .= 'url('. $this->registerPreservedToken(trim($token)) .')';
            // No end terminator found, re-add the whole match. Should we throw/warn here?
            } else {
                $ret .= substr($css, $matchStartIndex, $searchOffset - $matchStartIndex);
            }

            $substrOffset = $searchOffset;
        }

        $ret .= substr($css, $substrOffset);

        return $ret;
    }

    /**
     * Registers all comments found as candidates to be preserved.
     * @param array $matches
     * @return string
     */
    private function processCommentsCallback($matches)
    {
        return '/*'. $this->registerCommentToken($matches[1]) .'*/';
    }

    /**
     * Preserves old IE Matrix string definition
     * @param array $matches
     * @return string
     */
    private function processOldIeSpecificMatrixDefinitionCallback($matches)
    {
        return 'filter:progid:DXImageTransform.Microsoft.Matrix('. $this->registerPreservedToken($matches[1]) .')';
    }

    /**
     * Preserves strings found
     * @param array $matches
     * @return string
     */
    private function processStringsCallback($matches)
    {
        $match = $matches[0];
        $quote = substr($match, 0, 1);
        $match = substr($match, 1, -1);

        // maybe the string contains a comment-like substring?
        // one, maybe more? put'em back then
        if (strpos($match, self::COMMENT_TOKEN_START) !== false) {
            $match = strtr($match, $this->comments);
        }

        // minify alpha opacity in filter strings
        $match = str_ireplace('progid:DXImageTransform.Microsoft.Alpha(Opacity=', 'alpha(opacity=', $match);

        return $quote . $this->registerPreservedToken($match) . $quote;
    }

    /**
     * Searches & replaces all import at-rule unquoted urls with tokens so URI reserved characters such as a semicolon
     * may be used safely in a URL.
     * @param array $matches
     * @return string
     */
    private function processImportUnquotedUrlAtRulesCallback($matches)
    {
        return '@import url('. $this->registerPreservedToken($matches[1]) .')'. $matches[2];
    }

    /**
     * Preserves or removes comments found.
     * @param string $css
     * @return string
     */
    private function processComments($css)
    {
        foreach ($this->comments as $commentId => $comment) {
            $commentIdString = '/*'. $commentId .'*/';
            
            // ! in the first position of the comment means preserve
            // so push to the preserved tokens keeping the !
            if ($this->keepImportantComments && strpos($comment, '!') === 0) {
                $preservedTokenId = $this->registerPreservedToken($comment);
                // Put new lines before and after /*! important comments
                $css = str_replace($commentIdString, "\n/*$preservedTokenId*/\n", $css);
                continue;
            }

            // # sourceMappingURL= in the first position of the comment means sourcemap
            // so push to the preserved tokens if {$this->keepSourceMapComment} is truthy.
            if ($this->keepSourceMapComment && strpos($comment, '# sourceMappingURL=') === 0) {
                $preservedTokenId = $this->registerPreservedToken($comment);
                // Add new line before the sourcemap comment
                $css = str_replace($commentIdString, "\n/*$preservedTokenId*/", $css);
                continue;
            }

            // Keep empty comments after child selectors (IE7 hack)
            // e.g. html >/**/ body
            if (strlen($comment) === 0 && strpos($css, '>/*'.$commentId) !== false) {
                $css = str_replace($commentId, $this->registerPreservedToken(''), $css);
                continue;
            }

            // in all other cases kill the comment
            $css = str_replace($commentIdString, '', $css);
        }

        // Normalize whitespace again
        $css = preg_replace('/ +/S', ' ', $css);

        return $css;
    }

    /**
     * Finds, minifies & preserves all rule bodies.
     * @param string $css the whole stylesheet.
     * @return string
     */
    private function processRuleBodies($css)
    {
        $ret = '';
        $searchOffset = $substrOffset = 0;

        while (($blockStartPos = strpos($css, '{', $searchOffset)) !== false) {
            $blockEndPos = strpos($css, '}', $blockStartPos);
            $nextBlockStartPos = strpos($css, '{', $blockStartPos + 1);
            $ret .= substr($css, $substrOffset, $blockStartPos - $substrOffset);

            if ($nextBlockStartPos !== false && $nextBlockStartPos < $blockEndPos) {
                $ret .= substr($css, $blockStartPos, $nextBlockStartPos - $blockStartPos);
                $searchOffset = $nextBlockStartPos;
            } else {
                $ruleBody = substr($css, $blockStartPos + 1, $blockEndPos - $blockStartPos - 1);
                $ruleBodyToken = $this->registerRuleBodyToken($this->processRuleBody($ruleBody));
                $ret .= '{'. $ruleBodyToken .'}';
                $searchOffset = $blockEndPos + 1;
            }

            $substrOffset = $searchOffset;
        }

        $ret .= substr($css, $substrOffset);

        return $ret;
    }

    /**
     * Compresses non-group rule bodies.
     * @param string $body The rule body without curly braces
     * @return string
     */
    private function processRuleBody($body)
    {
        $body = trim($body);

        // Remove spaces before the things that should not have spaces before them.
        $body = preg_replace('/ ([:=,)*\/;\n])/S', '$1', $body);

        // Remove the spaces after the things that should not have spaces after them.
        $body = preg_replace('/([:=,(*\/!;\n]) /S', '$1', $body);
        
        // Replace multiple semi-colons in a row by a single one
        $body = preg_replace('/;;+/S', ';', $body);

        // Remove semicolon before closing brace except when:
        // - The last property is prefixed with a `*` (lte IE7 hack) to avoid issues on Symbian S60 3.x browsers.
        if (!preg_match('/\*[a-z0-9-]+:[^;]+;$/Si', $body)) {
            $body = rtrim($body, ';');
        }

        // Remove important comments inside a rule body (because they make no sense here).
        if (strpos($body, '/*') !== false) {
            $body = preg_replace('/\n?\/\*[A-Z0-9_]+\*\/\n?/S', '', $body);
        }
        
        // Empty rule body? Exit :)
        if (empty($body)) {
            return '';
        }

        // Shorten font-weight values
        $body = preg_replace(
            array('/(font-weight:)bold\b/Si', '/(font-weight:)normal\b/Si'),
            array('${1}700', '${1}400'),
            $body
        );

        // Shorten background property
        $body = preg_replace('/(background:)(?:none|transparent)( !|;|$)/Si', '${1}0 0$2', $body);

        // Shorten opacity IE filter
        $body = str_ireplace('progid:DXImageTransform.Microsoft.Alpha(Opacity=', 'alpha(opacity=', $body);

        // Shorten colors from rgb(51,102,153) to #336699, rgb(100%,0%,0%) to #ff0000 (sRGB color space)
        // Shorten colors from hsl(0, 100%, 50%) to #ff0000 (sRGB color space)
        // This makes it more likely that it'll get further compressed in the next step.
        $body = preg_replace_callback(
            '/(rgb|hsl)\(([0-9,.% -]+)\)(.|$)/Si',
            array($this, 'shortenHslAndRgbToHexCallback'),
            $body
        );

        // Shorten colors from #AABBCC to #ABC or shorter color name:
        // - Look for hex colors which don't have a "=" in front of them (to avoid MSIE filters)
        $body = preg_replace_callback(
            '/(?<!=)#([0-9a-f]{3,6})( |,|\)|;|$)/Si',
            array($this, 'shortenHexColorsCallback'),
            $body
        );

        // Shorten long named colors with a shorter HEX counterpart: white -> #fff.
        // Run at least 2 times to cover most cases
        $body = preg_replace_callback(
            array($this->namedToHexColorsRegex, $this->namedToHexColorsRegex),
            array($this, 'shortenNamedColorsCallback'),
            $body
        );

        // Replace positive sign from numbers before the leading space is removed.
        // +1.2em to 1.2em, +.8px to .8px, +2% to 2%
        $body = preg_replace('/([ :,(])\+(\.?\d+)/S', '$1$2', $body);

        // shorten ms to s
        $body = preg_replace_callback('/([ :,(])(-?)(\d{3,})ms/Si', function ($matches) {
            return $matches[1] . $matches[2] . ((int) $matches[3] / 1000) .'s';
        }, $body);

        // Remove leading zeros from integer and float numbers.
        // 000.6 to .6, -0.8 to -.8, 0050 to 50, -01.05 to -1.05
        $body = preg_replace('/([ :,(])(-?)0+([1-9]?\.?\d+)/S', '$1$2$3', $body);

        // Remove trailing zeros from float numbers.
        // -6.0100em to -6.01em, .0100 to .01, 1.200px to 1.2px
        $body = preg_replace('/([ :,(])(-?\d?\.\d+?)0+([^\d])/S', '$1$2$3', $body);

        // Remove trailing .0 -> -9.0 to -9
        $body = preg_replace('/([ :,(])(-?\d+)\.0([^\d])/S', '$1$2$3', $body);

        // Replace 0 length numbers with 0
        $body = preg_replace('/([ :,(])-?\.?0+([^\d])/S', '${1}0$2', $body);

        // Shorten zero values for safe properties only
        $body = preg_replace(
            array(
                $this->shortenOneZeroesRegex,
                $this->shortenTwoZeroesRegex,
                $this->shortenThreeZeroesRegex,
                $this->shortenFourZeroesRegex
            ),
            array(
                '$1$2:0',
                '$1$2:$3 0',
                '$1$2:$3 $4 0',
                '$1$2:$3 $4 $5 0'
            ),
            $body
        );

        // Replace 0 0 0; or 0 0 0 0; with 0 0 for background-position property.
        $body = preg_replace('/(background-position):0(?: 0){2,3}( !|;|$)/Si', '$1:0 0$2', $body);

        // Shorten suitable shorthand properties with repeated values
        $body = preg_replace(
            array(
                '/(margin|padding|border-(?:width|radius)):('.$this->numRegex.')(?: \2)+( !|;|$)/Si',
                '/(border-(?:style|color)):([#a-z0-9]+)(?: \2)+( !|;|$)/Si'
            ),
            '$1:$2$3',
            $body
        );
        $body = preg_replace(
            array(
                '/(margin|padding|border-(?:width|radius)):'.
                '('.$this->numRegex.') ('.$this->numRegex.') \2 \3( !|;|$)/Si',
                '/(border-(?:style|color)):([#a-z0-9]+) ([#a-z0-9]+) \2 \3( !|;|$)/Si'
            ),
            '$1:$2 $3$4',
            $body
        );
        $body = preg_replace(
            array(
                '/(margin|padding|border-(?:width|radius)):'.
                '('.$this->numRegex.') ('.$this->numRegex.') ('.$this->numRegex.') \3( !|;|$)/Si',
                '/(border-(?:style|color)):([#a-z0-9]+) ([#a-z0-9]+) ([#a-z0-9]+) \3( !|;|$)/Si'
            ),
            '$1:$2 $3 $4$5',
            $body
        );

        // Lowercase some common functions that can be values
        $body = preg_replace_callback(
            '/(?:attr|blur|brightness|circle|contrast|cubic-bezier|drop-shadow|ellipse|from|grayscale|'.
            'hsla?|hue-rotate|inset|invert|local|minmax|opacity|perspective|polygon|rgba?|rect|repeat|saturate|sepia|'.
            'steps|to|url|var|-webkit-gradient|'.
            '(?:-(?:atsc|khtml|moz|ms|o|wap|webkit)-)?(?:calc|(?:repeating-)?(?:linear|radial)-gradient))\(/Si',
            array($this, 'strtolowerCallback'),
            $body
        );

        // Lowercase all uppercase properties
        $body = preg_replace_callback('/(?:^|;)[A-Z-]+:/S', array($this, 'strtolowerCallback'), $body);

        return $body;
    }

    /**
     * Compresses At-rules and selectors.
     * @param string $css the whole stylesheet with rule bodies tokenized.
     * @return string
     */
    private function processAtRulesAndSelectors($css)
    {
        $charset = '';
        $imports = '';
        $namespaces = '';
        
        // Remove spaces before the things that should not have spaces before them.
        $css = preg_replace('/ ([@{};>+)\]~=,\/\n])/S', '$1', $css);

        // Remove the spaces after the things that should not have spaces after them.
        $css = preg_replace('/([{}:;>+(\[~=,\/\n]) /S', '$1', $css);
        
        // Shorten shortable double colon (CSS3) pseudo-elements to single colon (CSS2)
        $css = preg_replace('/::(before|after|first-(?:line|letter))(\{|,)/Si', ':$1$2', $css);

        // Retain space for special IE6 cases
        $css = preg_replace_callback('/:first-(line|letter)(\{|,)/Si', function ($matches) {
            return ':first-'. strtolower($matches[1]) .' '. $matches[2];
        }, $css);

        // Find a fraction that may used in some @media queries such as: (min-aspect-ratio: 1/1)
        // Add token to add the "/" back in later
        $css = preg_replace('/\(([a-z-]+):([0-9]+)\/([0-9]+)\)/Si', '($1:$2'. self::QUERY_FRACTION .'$3)', $css);

        // Remove empty rule blocks up to 2 levels deep.
        $css = preg_replace(array_fill(0, 2, '/(\{)[^{};\/\n]+\{\}/S'), '$1', $css);
        $css = preg_replace('/[^{};\/\n]+\{\}/S', '', $css);

        // Two important comments next to each other? Remove extra newline.
        if ($this->keepImportantComments) {
            $css = str_replace("\n\n", "\n", $css);
        }
        
        // Restore fraction
        $css = str_replace(self::QUERY_FRACTION, '/', $css);

        // Lowercase some popular @directives
        $css = preg_replace_callback(
            '/(?<!\\\\)@(?:charset|document|font-face|import|(?:-(?:atsc|khtml|moz|ms|o|wap|webkit)-)?keyframes|media|'.
            'namespace|page|supports|viewport)/Si',
            array($this, 'strtolowerCallback'),
            $css
        );

        // Lowercase some popular media types
        $css = preg_replace_callback(
            '/[ ,](?:all|aural|braille|handheld|print|projection|screen|tty|tv|embossed|speech)[ ,;{]/Si',
            array($this, 'strtolowerCallback'),
            $css
        );

        // Lowercase some common pseudo-classes & pseudo-elements
        $css = preg_replace_callback(
            '/(?<!\\\\):(?:active|after|before|checked|default|disabled|empty|enabled|first-(?:child|of-type)|'.
            'focus(?:-within)?|hover|indeterminate|in-range|invalid|lang\(|last-(?:child|of-type)|left|link|not\(|'.
            'nth-(?:child|of-type)\(|nth-last-(?:child|of-type)\(|only-(?:child|of-type)|optional|out-of-range|'.
            'read-(?:only|write)|required|right|root|:selection|target|valid|visited)/Si',
            array($this, 'strtolowerCallback'),
            $css
        );
        
        // @charset handling
        if (preg_match($this->charsetRegex, $css, $matches)) {
            // Keep the first @charset at-rule found
            $charset = $matches[0];
            // Delete all @charset at-rules
            $css = preg_replace($this->charsetRegex, '', $css);
        }

        // @import handling
        $css = preg_replace_callback($this->importRegex, function ($matches) use (&$imports) {
            // Keep all @import at-rules found for later
            $imports .= $matches[0];
            // Delete all @import at-rules
            return '';
        }, $css);

        // @namespace handling
        $css = preg_replace_callback($this->namespaceRegex, function ($matches) use (&$namespaces) {
            // Keep all @namespace at-rules found for later
            $namespaces .= $matches[0];
            // Delete all @namespace at-rules
            return '';
        }, $css);
        
        // Order critical at-rules:
        // 1. @charset first
        // 2. @imports below @charset
        // 3. @namespaces below @imports
        $css = $charset . $imports . $namespaces . $css;

        return $css;
    }

    /**
     * Splits long lines after a specific column.
     *
     * Some source control tools don't like it when files containing lines longer
     * than, say 8000 characters, are checked in. The linebreak option is used in
     * that case to split long lines after a specific column.
     *
     * @param string $css the whole stylesheet.
     * @return string
     */
    private function processLongLineSplitting($css)
    {
        if ($this->linebreakPosition > 0) {
            $l = strlen($css);
            $offset = $this->linebreakPosition;
            while (preg_match('/(?<!\\\\)\}(?!\n)/S', $css, $matches, PREG_OFFSET_CAPTURE, $offset)) {
                $matchIndex = $matches[0][1];
                $css = substr_replace($css, "\n", $matchIndex + 1, 0);
                $offset = $matchIndex + 2 + $this->linebreakPosition;
                $l += 1;
                if ($offset > $l) {
                    break;
                }
            }
        }

        return $css;
    }

    /**
     * Converts hsl() & rgb() colors to HEX format.
     * @param $matches
     * @return string
     */
    private function shortenHslAndRgbToHexCallback($matches)
    {
        $type = $matches[1];
        $values = explode(',', $matches[2]);
        $terminator = $matches[3];
        
        if ($type === 'hsl') {
            $values = Utils::hslToRgb($values);
        }
        
        $hexColors = Utils::rgbToHex($values);

        // Restore space after rgb() or hsl() function in some cases such as:
        // background-image: linear-gradient(to bottom, rgb(210,180,140) 10%, rgb(255,0,0) 90%);
        if (!empty($terminator) && !preg_match('/[ ,);]/S', $terminator)) {
            $terminator = ' '. $terminator;
        }

        return '#'. implode('', $hexColors) . $terminator;
    }

    /**
     * Compresses HEX color values of the form #AABBCC to #ABC or short color name.
     * @param $matches
     * @return string
     */
    private function shortenHexColorsCallback($matches)
    {
        $hex = $matches[1];
        
        // Shorten suitable 6 chars HEX colors
        if (strlen($hex) === 6 && preg_match('/^([0-9a-f])\1([0-9a-f])\2([0-9a-f])\3$/Si', $hex, $m)) {
            $hex = $m[1] . $m[2] . $m[3];
        }
        
        // Lowercase
        $hex = '#'. strtolower($hex);

        // Replace Hex colors with shorter color names
        $color = array_key_exists($hex, $this->hexToNamedColorsMap) ? $this->hexToNamedColorsMap[$hex] : $hex;

        return $color . $matches[2];
    }

    /**
     * Shortens all named colors with a shorter HEX counterpart for a set of safe properties
     * e.g. white -> #fff
     * @param array $matches
     * @return string
     */
    private function shortenNamedColorsCallback($matches)
    {
        return $matches[1] . $this->namedToHexColorsMap[strtolower($matches[2])] . $matches[3];
    }

    /**
     * Makes a string lowercase
     * @param array $matches
     * @return string
     */
    private function strtolowerCallback($matches)
    {
        return strtolower($matches[0]);
    }
}
libraries/classes/vendor/cssmin/src/Utils.php000060400000007750152455721620015364 0ustar00<?php

namespace tubalmartin\CssMin;

class Utils
{
    /**
     * Clamps a number between a minimum and a maximum value.
     * @param int|float $n the number to clamp
     * @param int|float $min the lower end number allowed
     * @param int|float $max the higher end number allowed
     * @return int|float
     */
    public static function clampNumber($n, $min, $max)
    {
        return min(max($n, $min), $max);
    }

    /**
     * Clamps a RGB color number outside the sRGB color space
     * @param int|float $n the number to clamp
     * @return int|float
     */
    public static function clampNumberSrgb($n)
    {
        return self::clampNumber($n, 0, 255);
    }

    /**
     * Converts a HSL color into a RGB color
     * @param array $hslValues
     * @return array
     */
    public static function hslToRgb($hslValues)
    {
        $h = floatval($hslValues[0]);
        $s = floatval(str_replace('%', '', $hslValues[1]));
        $l = floatval(str_replace('%', '', $hslValues[2]));

        // Wrap and clamp, then fraction!
        $h = ((($h % 360) + 360) % 360) / 360;
        $s = self::clampNumber($s, 0, 100) / 100;
        $l = self::clampNumber($l, 0, 100) / 100;

        if ($s == 0) {
            $r = $g = $b = self::roundNumber(255 * $l);
        } else {
            $v2 = $l < 0.5 ? $l * (1 + $s) : ($l + $s) - ($s * $l);
            $v1 = (2 * $l) - $v2;
            $r = self::roundNumber(255 * self::hueToRgb($v1, $v2, $h + (1/3)));
            $g = self::roundNumber(255 * self::hueToRgb($v1, $v2, $h));
            $b = self::roundNumber(255 * self::hueToRgb($v1, $v2, $h - (1/3)));
        }

        return array($r, $g, $b);
    }

    /**
     * Tests and selects the correct formula for each RGB color channel
     * @param $v1
     * @param $v2
     * @param $vh
     * @return mixed
     */
    public static function hueToRgb($v1, $v2, $vh)
    {
        $vh = $vh < 0 ? $vh + 1 : ($vh > 1 ? $vh - 1 : $vh);

        if ($vh * 6 < 1) {
            return $v1 + ($v2 - $v1) * 6 * $vh;
        }

        if ($vh * 2 < 1) {
            return $v2;
        }

        if ($vh * 3 < 2) {
            return $v1 + ($v2 - $v1) * ((2 / 3) - $vh) * 6;
        }

        return $v1;
    }

    /**
     * Convert strings like "64M" or "30" to int values
     * @param mixed $size
     * @return int
     */
    public static function normalizeInt($size)
    {
        if (is_string($size)) {
            $letter = substr($size, -1);
            $size = intval($size);
            switch ($letter) {
                case 'M':
                case 'm':
                    return (int) $size * 1048576;
                case 'K':
                case 'k':
                    return (int) $size * 1024;
                case 'G':
                case 'g':
                    return (int) $size * 1073741824;
            }
        }
        return (int) $size;
    }

    /**
     * Converts a string containing and RGB percentage value into a RGB integer value i.e. '90%' -> 229.5
     * @param $rgbPercentage
     * @return int
     */
    public static function rgbPercentageToRgbInteger($rgbPercentage)
    {
        if (strpos($rgbPercentage, '%') !== false) {
            $rgbPercentage = self::roundNumber(floatval(str_replace('%', '', $rgbPercentage)) * 2.55);
        }

        return intval($rgbPercentage, 10);
    }

    /**
     * Converts a RGB color into a HEX color
     * @param array $rgbColors
     * @return array
     */
    public static function rgbToHex($rgbColors)
    {
        $hexColors = array();

        // Values outside the sRGB color space should be clipped (0-255)
        for ($i = 0, $l = count($rgbColors); $i < $l; $i++) {
            $hexColors[$i] = sprintf("%02x", self::clampNumberSrgb(self::rgbPercentageToRgbInteger($rgbColors[$i])));
        }

        return $hexColors;
    }

    /**
     * Rounds a number to its closest integer
     * @param $n
     * @return int
     */
    public static function roundNumber($n)
    {
        return intval(round(floatval($n)), 10);
    }
}
libraries/classes/vendor/cssmin/src/Command.php000060400000015225152455721620015636 0ustar00<?php

namespace tubalmartin\CssMin;

class Command
{
    const SUCCESS_EXIT = 0;
    const FAILURE_EXIT = 1;
    
    protected $stats = array();
    
    public static function main()
    {
        $command = new self;
        $command->run();
    }

    public function run()
    {
        $opts = getopt(
            'hi:o:',
            array(
                'help',
                'input:',
                'output:',
                'dry-run',
                'keep-sourcemap',
                'keep-sourcemap-comment',
                'linebreak-position:',
                'memory-limit:',
                'pcre-backtrack-limit:',
                'pcre-recursion-limit:',
                'remove-important-comments'
            )
        );

        $help = $this->getOpt(array('h', 'help'), $opts);
        $input = $this->getOpt(array('i', 'input'), $opts);
        $output = $this->getOpt(array('o', 'output'), $opts);
        $dryrun = $this->getOpt('dry-run', $opts);
        $keepSourceMapComment = $this->getOpt(array('keep-sourcemap', 'keep-sourcemap-comment'), $opts);
        $linebreakPosition = $this->getOpt('linebreak-position', $opts);
        $memoryLimit = $this->getOpt('memory-limit', $opts);
        $backtrackLimit = $this->getOpt('pcre-backtrack-limit', $opts);
        $recursionLimit = $this->getOpt('pcre-recursion-limit', $opts);
        $removeImportantComments = $this->getOpt('remove-important-comments', $opts);

        if (!is_null($help)) {
            $this->showHelp();
            die(self::SUCCESS_EXIT);
        }

        if (is_null($input)) {
            fwrite(STDERR, '-i <file> argument is missing' . PHP_EOL);
            $this->showHelp();
            die(self::FAILURE_EXIT);
        }

        if (!is_readable($input)) {
            fwrite(STDERR, 'Input file is not readable' . PHP_EOL);
            die(self::FAILURE_EXIT);
        }

        $css = file_get_contents($input);

        if ($css === false) {
            fwrite(STDERR, 'Input CSS code could not be retrieved from input file' . PHP_EOL);
            die(self::FAILURE_EXIT);
        }
        
        $this->setStat('original-size', strlen($css));
        
        $cssmin = new Minifier;

        if (!is_null($keepSourceMapComment)) {
            $cssmin->keepSourceMapComment();
        }

        if (!is_null($removeImportantComments)) {
            $cssmin->removeImportantComments();
        }

        if (!is_null($linebreakPosition)) {
            $cssmin->setLineBreakPosition($linebreakPosition);
        }
        
        if (!is_null($memoryLimit)) {
            $cssmin->setMemoryLimit($memoryLimit);
        }

        if (!is_null($backtrackLimit)) {
            $cssmin->setPcreBacktrackLimit($backtrackLimit);
        }

        if (!is_null($recursionLimit)) {
            $cssmin->setPcreRecursionLimit($recursionLimit);
        }
        
        $this->setStat('compression-time-start', microtime(true));
        
        $css = $cssmin->run($css);

        $this->setStat('compression-time-end', microtime(true));
        $this->setStat('peak-memory-usage', memory_get_peak_usage(true));
        $this->setStat('compressed-size', strlen($css));
        
        if (!is_null($dryrun)) {
            $this->showStats();
            die(self::SUCCESS_EXIT);
        }

        if (is_null($output)) {
            fwrite(STDOUT, $css . PHP_EOL);
            $this->showStats();
            die(self::SUCCESS_EXIT);
        }

        if (!is_writable(dirname($output))) {
            fwrite(STDERR, 'Output file is not writable' . PHP_EOL);
            die(self::FAILURE_EXIT);
        }

        if (file_put_contents($output, $css) === false) {
            fwrite(STDERR, 'Compressed CSS code could not be saved to output file' . PHP_EOL);
            die(self::FAILURE_EXIT);
        }

        $this->showStats();

        die(self::SUCCESS_EXIT);
    }

    protected function getOpt($opts, $options)
    {
        $value = null;

        if (is_string($opts)) {
            $opts = array($opts);
        }

        foreach ($opts as $opt) {
            if (array_key_exists($opt, $options)) {
                $value = $options[$opt];
                break;
            }
        }

        return $value;
    }
    
    protected function setStat($statName, $statValue)
    {
        $this->stats[$statName] = $statValue;
    }
    
    protected function formatBytes($size, $precision = 2)
    {
        $base = log($size, 1024);
        $suffixes = array('B', 'K', 'M', 'G', 'T');
        return round(pow(1024, $base - floor($base)), $precision) .' '. $suffixes[floor($base)];
    }
    
    protected function formatMicroSeconds($microSecs, $precision = 2)
    {
        // ms
        $time = round($microSecs * 1000, $precision);
        
        if ($time >= 60 * 1000) {
            $time = round($time / 60 * 1000, $precision) .' m'; // m
        } elseif ($time >= 1000) {
            $time = round($time / 1000, $precision) .' s'; // s
        } else {
            $time .= ' ms';
        }
        
        return $time;
    }
    
    protected function showStats()
    {
        $spaceSavings = round((1 - ($this->stats['compressed-size'] / $this->stats['original-size'])) * 100, 2);
        $compressionRatio = round($this->stats['original-size'] / $this->stats['compressed-size'], 2);
        $compressionTime = $this->formatMicroSeconds(
            $this->stats['compression-time-end'] - $this->stats['compression-time-start']
        );
        $peakMemoryUsage = $this->formatBytes($this->stats['peak-memory-usage']);
        
        print <<<EOT
        
------------------------------
CSSMIN STATS        
------------------------------ 
Space savings:       {$spaceSavings} %       
Compression ratio:   {$compressionRatio}:1
Compression time:    $compressionTime
Peak memory usage:   $peakMemoryUsage


EOT;
    }

    protected function showHelp()
    {
        print <<<'EOT'
Usage: cssmin [options] -i <file> [-o <file>]
  
  -i|--input <file>              File containing uncompressed CSS code.
  -o|--output <file>             File to use to save compressed CSS code.
    
Options:
    
  -h|--help                      Prints this usage information.
  --dry-run                      Performs a dry run displaying statistics.
  --keep-sourcemap[-comment]     Keeps the sourcemap special comment in the output.
  --linebreak-position <pos>     Splits long lines after a specific column in the output.
  --memory-limit <limit>         Sets the memory limit for this script.
  --pcre-backtrack-limit <limit> Sets the PCRE backtrack limit for this script.
  --pcre-recursion-limit <limit> Sets the PCRE recursion limit for this script.
  --remove-important-comments    Removes !important comments from output.

EOT;
    }
}
libraries/classes/vendor/cssmin/src/index.html000060400000000054152455721620015536 0ustar00<html><body bgcolor="#FFFFFF"></body></html>libraries/classes/vendor/cssmin/index.html000060400000000054152455721620014747 0ustar00<html><body bgcolor="#FFFFFF"></body></html>libraries/classes/vendor/cssmin/cssmin.php000060400000000267152455721620014765 0ustar00<?php

abstract class CssMin {
    public static function minify($text)
    {
        $compressor = new tubalmartin\CssMin\Minifier();

        return $compressor->run($text);
    }
}libraries/classes/document.php000060400000043247152455721620012523 0ustar00<?php
/**
 * @package     JCE
 * @subpackage  Editor
 *
 * @copyright   Copyright (C) 2005 - 2020 Open Source Matters, Inc. All rights reserved.
 * @copyright   Copyright (c) 2009-2024 Ryan Demmer. All rights reserved
 * @license     GNU General Public License version 2 or later; see LICENSE.txt
 */

\defined('_JEXEC') or die;

use Joomla\CMS\Factory;
use Joomla\Filesystem\Path;
use Joomla\CMS\Object\CMSObject;
use Joomla\CMS\Session\Session;
use Joomla\CMS\Uri\Uri;

class WFDocument extends CMSObject
{
    /**
     * Array of linked scripts.
     *
     * @var array
     */
    private $scripts = array();

    /**
     * Array of scripts placed in the header.
     *
     * @var array
     */
    private $script = array();

    /**
     * Array of linked style sheets.
     *
     * @var array
     */
    private $styles = array();

    /**
     * Array of head items.
     *
     * @var array
     */
    private $head = array();

    /**
     * Body content.
     *
     * @var array
     */
    private $body = '';

    /**
     * Document title.
     *
     * @var string
     */
    public $title = '';

    /**
     * Contains the document language setting.
     *
     * @var string
     */
    public $language = 'en-gb';

    /**
     * Contains the document direction setting.
     *
     * @var string
     */
    public $direction = 'ltr';

    private static $queryMap = array(
        'imgmanager' => 'image',
        'imgmanager_ext' => 'imagepro',
    );

    /**
     * Constructor activating the default information of the class.
     */
    public function __construct($config = array())
    {
        parent::__construct();

        // set document title
        if (isset($config['title'])) {
            $this->setTitle($config['title']);
        }

        $this->setProperties($config);
    }

    /**
     * Returns a reference to a WFDocument object.
     *
     * This method must be invoked as:
     *    <pre>  $document = WFDocument::getInstance();</pre>
     *
     * @return object WFDocument
     */
    public static function getInstance($config = array())
    {
        static $instance;

        if (!is_object($instance)) {
            $instance = new self($config);
        }

        return $instance;
    }

    /**
     * Set the document title.
     *
     * @param string $title
     */
    public function setTitle($title)
    {
        $this->title = $title;
    }

    /**
     * Get the document title.
     *
     * @return string
     */
    public function getTitle()
    {
        return $this->title;
    }

    /**
     * Set the document name.
     *
     * @param string $name
     */
    public function setName($name)
    {
        $this->name = $name;
    }

    /**
     * Get the document name.
     *
     * @return string
     */
    public function getName()
    {
        return $this->name;
    }

    /**
     * Get the editor URL.
     *
     * @param bool $relative
     *
     * @return string
     */
    private function getURL($relative = false)
    {
        if ($relative) {
            return Uri::root(true) . '/media/com_jce/editor';
        }

        return Uri::root() . 'media/com_jce/editor';
    }

    /**
     * Sets the global document language declaration. Default is English (en-gb).
     *
     * @param string $lang
     */
    public function setLanguage($lang = 'en-gb')
    {
        $this->language = strtolower($lang);
    }

    /**
     * Returns the document language.
     *
     * @return string
     */
    public function getLanguage()
    {
        return $this->language;
    }

    /**
     * Sets the global document direction declaration. Default is left-to-right (ltr).
     *
     * @param string $lang
     */
    public function setDirection($dir = 'ltr')
    {
        $this->direction = strtolower($dir);
    }

    /**
     * Returns the document language.
     *
     * @return string
     */
    public function getDirection()
    {
        return $this->direction;
    }

    /**
     * Returns a JCE resource url.
     *
     * @param     string  The path to resolve eg: libaries
     * @param     bool Create a relative url
     *
     * @return full url
     */
    private function getBaseURL($path, $type = '')
    {
        static $url;

        if (!isset($url)) {
            $url = array();
        }

        $signature = serialize(array($type, $path));

        // Check if value is already stored
        if (!isset($url[$signature])) {
            // get the plugin name using this document instance
            $plugin = $this->get('name');

            $base = $this->getURL(true) . '/';

            $parts = explode('.', $path);
            $path = array_shift($parts);

            switch ($path) {
                // JCE root folder
                case 'jce':
                    $pre = $base . '';
                    break;
                // JCE libraries resource folder
                case 'media':
                    $pre = $base . '/' . $type;
                    break;
                case 'pro':
                    $pre = Uri::root(true) . '/media/plg_system_jcepro/editor/';
                    break;
                case 'jquery':
                    $pre = $base . 'vendor/jquery/' . $type;
                    break;
                // TinyMCE folder
                case 'tinymce':
                    $pre = $base . 'tinymce';
                    break;
                // Tinymce plugins folder
                case 'plugins':
                    $pre = $base . 'tinymce/plugins/' . $plugin . '/' . $type;
                    break;
                // Extensions folder
                case 'extensions':
                    $pre = $base . 'extensions';
                    break;
                case 'joomla':
                    return Uri::root(true);
                    break;
                case 'component':
                    $pre = Uri::root(true) . '/media/com_jce/admin/' . $type;
                    break;
                default:
                    $pre = $base . $path;
                    break;
            }

            if (count($parts)) {
                $pre = rtrim($pre, '/') . '/' . implode('/', $parts);
            }

            // Store url
            $url[$signature] = $pre;
        }

        return $url[$signature];
    }

    /**
     * Convert a url to path.
     *
     * @param string $url
     *
     * @return string
     */
    private function urlToPath($url)
    {
        $root = Uri::root(true);

        // remove root from url
        if (!empty($root)) {
            $url = substr($url, strlen($root));
        }

        return WFUtility::makePath(JPATH_SITE, Path::clean($url));
    }

    /**
     * Returns an image url.
     *
     * @param string  The file to load including path and extension eg: libaries.image.gif
     *
     * @return Image url
     *
     * @since 1.5
     */
    public function image($image, $root = 'media')
    {
        $parts = explode('.', $image);
        $parts = preg_replace('#[^A-Z0-9-_]#i', '', $parts);

        $ext = array_pop($parts);
        $name = trim(array_pop($parts), '/');

        $parts[] = 'img';
        $parts[] = $name . '.' . $ext;

        return $this->getBaseURL($root) . implode('/', $parts);
    }

    public function removeScript($file, $root = 'media')
    {
        $file = $this->buildScriptPath($file, $root);
        unset($this->scripts[$file]);
    }

    public function removeCss($file, $root = 'media')
    {
        $file = $this->buildStylePath($file, $root);
        unset($this->styles[$file]);
    }

    public function buildScriptPath($file, $root)
    {
        $file = preg_replace('#[^A-Z0-9-_\/\.]#i', '', $file);
        // get base dir
        $base = dirname($file);
        // remove extension if present
        $file = basename($file, '.js');
        // strip . and trailing /
        $file = trim(trim($base, '.'), '/') . '/' . $file . '.js';
        // remove leading and trailing slashes
        $file = trim($file, '/');
        // create path
        $file = $this->getBaseURL($root, 'js') . '/' . $file;
        // remove duplicate slashes
        $file = preg_replace('#[/\\\\]+#', '/', $file);

        return $file;
    }

    public function buildStylePath($file, $root)
    {
        $file = preg_replace('#[^A-Z0-9-_\/\.]#i', '', $file);
        // get base dir
        $base = dirname($file);
        // remove extension if present
        $file = basename($file, '.css');
        // strip . and trailing /
        $file = trim(trim($base, '.'), '/') . '/' . $file . '.css';
        // remove leading and trailing slashes
        $file = trim($file, '/');
        // create path
        $file = $this->getBaseURL($root, 'css') . '/' . $file;
        // remove duplicate slashes
        $file = preg_replace('#[/\\\\]+#', '/', $file);

        return $file;
    }

    /**
     * Loads a javascript file.
     *
     * @param string  The file to load including path eg: libaries.manager
     * @param bool Debug mode load src file
     *
     * @return echo script html
     *
     * @since 1.5
     */
    public function addScript($files, $root = 'media', $type = 'text/javascript')
    {
        $files = (array) $files;

        foreach ($files as $file) {
            // external link
            if (strpos($file, '://') !== false || strpos($file, 'index.php?option=com_jce') !== false) {
                $this->scripts[$file] = $type;
            } else {
                $file = $this->buildScriptPath($file, $root);
                // store path
                $this->scripts[$file] = $type;
            }
        }
    }

    /**
     * Loads a css file.
     *
     * @param string The file to load including path eg: libaries.manager
     * @param string Root folder
     *
     * @return echo css html
     *
     * @since 1.5
     */
    public function addStyleSheet($files, $root = 'media', $type = 'text/css')
    {
        $files = (array) $files;

        foreach ($files as $file) {
            $url = $this->buildStylePath($file, $root);
            // store path
            $this->styles[$url] = $type;
        }
    }

    public function addScriptDeclaration($content, $type = 'text/javascript')
    {
        if (!isset($this->script[strtolower($type)])) {
            $this->script[strtolower($type)] = $content;
        } else {
            $this->script[strtolower($type)] .= chr(13) . $content;
        }
    }

    private function getScriptDeclarations()
    {
        return $this->script;
    }

    private function getScripts()
    {
        return $this->scripts;
    }

    private function getStyleSheets()
    {
        return $this->styles;
    }

    /**
     * Setup head data.
     */
    private function setHead($data)
    {
        if (is_array($data)) {
            $this->head = array_merge($this->head, $data);
        } else {
            $this->head[] = $data;
        }
    }

    public function getQueryString($query = array())
    {
        $app = Factory::getApplication();

        // get plugin name and assign to query
        $name = $this->get('name');

        // re-map plugin name
        if (array_key_exists($name, self::$queryMap)) {
            $name = self::$queryMap[$name];
        }

        $query['plugin'] = $name;

        // set slot
        $query['slot'] = $app->input->getCmd('slot');

        // set standalone mode (for File Browser etc)
        $query['standalone'] = $this->get('standalone', 0);

        // set context id
        $query['context'] = $app->input->getInt('context', 0);

        // get profile custom query variables
        $query['profile_custom'] = $app->input->get('profile_custom', array(), 'array');

        // get token
        $token = Session::getFormToken();

        // set token
        $query[$token] = 1;

        // filter out empty values from the $query array
        $query = array_filter($query, function ($value) {
            return !empty($value);
        });

       return http_build_query($query);
    }

    private function getHash($files)
    {
        $seed = '';
        $hash = '';

        // cast as array
        $files = (array) $files;

        foreach ($files as $file) {

            // only add stamp to static stylesheets
            if (strpos($file, '://') === false && strpos($file, 'index.php?option=com_jce') === false) {
                $seed .= basename($file);
            }
        }

        if ($seed) {
            $hash = md5(WF_VERSION . $seed);
        }

        return $hash;
    }

    /**
     * Render document head data.
     */
    private function getHead()
    {
        // set title
        $output = '<title>' . $this->getTitle() . '</title>' . "\n";

        // render stylesheets
        if ($this->get('compress_css', 0)) {
            $file = Uri::base(true) . '/index.php?option=com_jce&' . $this->getQueryString(array('task' => 'plugin.pack', 'type' => 'css'));
            // add hash
            $file .= '&' . $this->getHash(array_keys($this->styles));

            $output .= "\t\t<link href=\"" . $file . "\" rel=\"stylesheet\" type=\"text/css\" />\n";
        } else {
            foreach ($this->styles as $src => $type) {
                $hash = $this->getHash($src);

                // only add stamp to static stylesheets
                if (!empty($hash)) {
                    $hash = strpos($src, '?') === false ? '?' . $hash : '&' . $hash;
                }

                $output .= "\t\t<link href=\"" . $src . $hash . '" rel="stylesheet" type="' . $type . "\" />\n";
            }
        }

        // Render scripts
        if ($this->get('compress_javascript', 0)) {
            $script = Uri::base(true) . '/index.php?option=com_jce&' . $this->getQueryString(array('task' => 'plugin.pack'));
            // add hash
            $script .= '&' . $this->getHash(array_keys($this->scripts));

            $output .= "\t\t<script data-cfasync=\"false\" type=\"text/javascript\" src=\"" . $script . "\"></script>\n";
        } else {
            foreach ($this->scripts as $src => $type) {
                $hash = $this->getHash($src);

                // only add stamp to static stylesheets
                if (!empty($hash)) {
                    $hash = strpos($src, '?') === false ? '?' . $hash : '&' . $hash;
                }

                $output .= "\t\t<script data-cfasync=\"false\" type=\"" . $type . '" src="' . $src . $hash . "\"></script>\n";
            }
        }

        // Script declarations
        foreach ($this->script as $type => $content) {
            $output .= "\t\t<script data-cfasync=\"false\" type=\"" . $type . '">' . $content . '</script>';
        }

        // Other head data
        foreach ($this->head as $head) {
            $output .= "\t" . $head . "\n";
        }

        return $output;
    }

    public function setBody($data = '')
    {
        $this->body = $data;
    }

    private function getBody()
    {
        return $this->body;
    }

    private function loadData()
    {
        //get the file content
        ob_start();
        require_once WF_EDITOR_LIBRARIES . '/views/plugin/index.php';
        $data = ob_get_contents();
        ob_end_clean();

        return $data;
    }

    /**
     * Render the document.
     */
    public function render()
    {
        // assign language
        $this->language = $this->getLanguage();
        $this->direction = $this->getDirection();

        // load template data
        $output = $this->loadData();
        $output = $this->parseData($output);

        exit($output);
    }

    private function parseData($data)
    {
        $data = preg_replace_callback('#<!-- \[head\] -->#', array($this, 'getHead'), $data);
        $data = preg_replace_callback('#<!-- \[body\] -->#', array($this, 'getBody'), $data);

        return $data;
    }

    /**
     * pack function for plugins.
     */
    public function pack($minify = true, $gzip = false)
    {
        $app = Factory::getApplication();

        if ($app->input->getCmd('task') == 'pack') {

            // check token
            Session::checkToken('get') or jexit();

            $type = $app->input->getWord('type', 'javascript');

            // create packer
            $packer = new WFPacker(array('type' => $type));

            $files = array();

            switch ($type) {
                case 'javascript':
                    $data = '';

                    foreach ($this->getScripts() as $src => $type) {
                        if (strpos($src, '://') === false && strpos($src, 'index.php') === false) {
                            $src .= preg_match('/\.js$/', $src) ? '' : '.js';

                            $files[] = $this->urlToPath($src);
                        }
                    }

                    // parse ini language files
                    $parser = new WFLanguageParser(array(
                        'plugins' => array('core' => array($this->getName()), 'external' => array()),
                        'sections' => array('dlg', $this->getName() . '_dlg'),
                        'mode' => 'plugin',
                        'language' => WFLanguage::getTag(),
                    ));

                    $data .= $parser->load();

                    // add script declarations
                    /*foreach ($this->getScriptDeclarations() as $script) {
                    $data .= $script;
                    }*/

                    $packer->setContentEnd($data);

                    break;
                case 'css':
                    foreach ($this->getStyleSheets() as $style => $type) {
                        if (strpos($style, '://') === false && strpos($style, 'index.php') === false) {
                            $style .= preg_match('/\.css$/', $style) ? '' : '.css';

                            $files[] = $this->urlToPath($style);
                        }
                    }

                    break;
            }

            $packer->setFiles($files);
            $packer->pack($minify, $gzip);
        }
    }
}
libraries/classes/application.php000060400000037355152455721620013213 0ustar00<?php

/**
 * @package     JCE
 * @subpackage  Editor
 *
 * @copyright   Copyright (C) 2005 - 2020 Open Source Matters, Inc. All rights reserved.
 * @copyright   Copyright (c) 2009-2024 Ryan Demmer. All rights reserved
 * @license     GNU General Public License version 2 or later; see LICENSE.txt
 */

\defined('_JEXEC') or die;

use Joomla\CMS\Component\ComponentHelper;
use Joomla\CMS\Factory;
use Joomla\CMS\Object\CMSObject;
use Joomla\CMS\Plugin\PluginHelper;
use Joomla\Registry\Registry;

require_once JPATH_ADMINISTRATOR . '/components/com_jce/includes/base.php';

/**
 * JCE class.
 *
 * @static
 *
 * @since    1.5
 */
class WFApplication extends CMSObject
{
    // Editor instance
    protected static $instance;

    // Editor Profile
    protected static $profiles = array();

    // Editor Params
    protected static $params = array();

    // JInput Reference
    public $input;

    /**
     * Constructor activating the default information of the class.
     */
    public function __construct($config = array())
    {
        $this->setProperties($config);

        // store a reference to the Joomla Application input
        $this->input = Factory::getApplication()->input;

        Factory::getApplication()->triggerEvent('onWfApplicationInit', array($this));
    }

    /**
     * Returns a reference to a editor object.
     *
     * This method must be invoked as:
     *         <pre>  $browser =JContentEditor::getInstance();</pre>
     *
     * @return JCE The editor object
     */
    public static function getInstance($config = array())
    {
        if (!isset(self::$instance)) {
            self::$instance = new self($config);
        }

        return self::$instance;
    }

    /**
     * Get the current version.
     *
     * @return string
     */
    public function getVersion()
    {
        $manifest = WF_ADMINISTRATOR . '/jce.xml';

        $version = md5_file($manifest);

        return $version;
    }

    protected function getComponent($id = null, $option = null)
    {
        if ($id) {
            $components = ComponentHelper::getComponents();

            foreach ($components as $option => $component) {
                if ($id == $component->id) {
                    return $component;
                }
            }
        }

        return ComponentHelper::getComponent($option);
    }

    public function getContext()
    {
        $option = Factory::getApplication()->input->getCmd('option');
        $component = ComponentHelper::getComponent($option, true);

        return $component->id;
    }

    private function isFileBrowser()
    {
        $app = Factory::getApplication();
        $option = $app->input->getCmd('option', '');

        if ($option !== 'com_jce') {
            return false;
        }

        if ($app->input->getCmd('view') === 'browser') {
            return true;
        }

        if ($app->input->getCmd('plugin') === 'browser') {
            return true;
        }

        return false;
    }

    private function getProfileVars()
    {
        $app = Factory::getApplication();
        $user = Factory::getUser();
        $option = $app->input->getCmd('option', '');

        $settings = array(
            'option' => $option,
            'area' => 2,
            'device' => 'desktop',
            'groups' => array(),
        );

        // find the component if this is called from within the JCE component
        if ($option == 'com_jce') {
            $context = $app->input->getInt('context');

            if ($context) {

                if ($context === 'mediafield') {
                    $settings['option'] = 'mediafield';
                } else {
                    $component = $this->getComponent($context);
                    $settings['option'] = $component->option;
                }
            }

            $profile_id = $app->input->getInt('profile_id');

            if ($profile_id) {
                $settings['profile_id'] = $profile_id;
            }
        }

        // get the Joomla! area, default to "site"
        $settings['area'] = $app->getClientId() === 0 ? 1 : 2;

        $mobile = new WFDeviceDetect();

        // phone
        if ($mobile->isPhone()) {
            $settings['device'] = 'phone';
        }

        if ($mobile->isTablet()) {
            $settings['device'] = 'tablet';
        }

        $settings['groups'] = $user->getAuthorisedGroups();

        return $settings;
    }

    private function isCorePlugin($plugin)
    {
        return in_array($plugin, array('core', 'autolink', 'cleanup', 'code', 'format', 'importcss', 'colorpicker', 'upload', 'branding', 'inlinepopups', 'figure', 'ui', 'help'));
    }

    public function isValidPlugin($name)
    {
        $plugins = JcePluginsHelper::getPlugins();

        // installed plugins will have a name prefixed with "editor-", so remove to validate
        if (preg_match('/^editor[-_]/', $name)) {
            $name = preg_replace('/^editor[-_]/', '', $name);
        }

        if (!isset($plugins[$name])) {
            return false;
        }

        $plugin = $plugins[$name];

        if (isset($plugin->checksum) && strlen($plugin->checksum) == 64) {
            $path = $plugin->path . '/' . $plugin->name . '.php';

            if (!is_file($path)) {
                return false;
            }

            return $plugin->checksum === hash_file('sha256', $path);
        }

        return true;
    }

    public function checkProfile($plugin)
    {
        $profile = $this->getActiveProfile(array('plugin' => $plugin));
        return $profile ? true : false;
    }
    /**
     * Return the active profile based on certain conditions.
     *
     * @param array $options An array of options to pass to the getProfile method
     * @return object The active profile
     */
    public function getActiveProfile($options = array())
    {
        // in future this might return an array of profiles by key
        $profiles = $this->getProfiles($options);

        return $profiles;
    }

    /**
     * Legacy getProfile function for backwards compatibility.
     *
     * @param array $options
     * @return void
     */
    public function getProfile($options = array())
    {
        if (is_string($options)) {
            $options = array('plugin' => $options);
        }

        return $this->getActiveProfile($options);
    }

    /**
     * Get an array of editor profiles.
     *
     * @param array $options Array of options to pass to the getProfile method
     * @return array Array of editor profiles by key, with "default" being the default profile
     */
    protected function getProfiles($options = array())
    {
        static $cache = array();

        if (!isset($options['plugin'])) {
            $options['plugin'] = '';
        }

        if (!isset($options['id'])) {
            $options['id'] = 0;
        }

        // get the passed in options as variables
        extract ($options);
        
        // reset the value if it is a core plugin
        if ($this->isCorePlugin($plugin)) {
            $plugin = '';
        }

        // get the profile variables for the current context
        $vars = $this->getProfileVars();

        // installed plugins will have a name prefixed with "editor-", so remove to validate
        if (preg_match('/^editor[-_]/', $plugin)) {
            $plugin = preg_replace('/^editor[-_]/', '', $plugin);
        }

        // add plugin to vars array
        $vars['plugin'] = $plugin;

        // assign profile_id to simple variable
        if (isset($vars['profile_id'])) {
            $id = (int) $vars['profile_id'];
        }

        $db = Factory::getDBO();
        $user = Factory::getUser();
        $app = Factory::getApplication();

        $query = $db->getQuery(true);
        $query->select('*')->from('#__wf_profiles')->where('published = 1')->order('ordering ASC');

        if ($id) {
            $query->where('id = ' . (int) $id);
        }

        $db->setQuery($query);
        $items = $db->loadObjectList();

        // nothing found...
        if (empty($items)) {
            return null;
        }

        // select and return a specific profile by id
        if ($id) {
            return $items[0];
        }

        $app->triggerEvent('onWfEditorProfileOptions', array(&$vars));

        // create a unique signature to store
        $signature = md5(serialize($vars));

        if (!isset($cache[$signature])) {

            foreach ($items as $item) {
                // at least one user group or user must be set
                if (empty($item->types) && empty($item->users)) {
                    continue;
                }

                $app->triggerEvent('onWfBeforeEditorProfileItem', array(&$item));

                // event can "cancel" this profile item
                if ($item === false) {
                    continue;
                }

                // check user groups - a value should always be set
                $groups = array_intersect($vars['groups'], explode(',', $item->types));

                // user not in the current group...
                if (empty($groups)) {
                    // no additional users set or no user match
                    if (empty($item->users) || in_array($user->id, explode(',', $item->users)) === false) {
                        continue;
                    }
                }

                // check component, but skip if this is the file browser
                if (!empty($item->components)) {
                    $components = explode(',', $item->components);

                    // remove duplicates
                    $components = array_unique($components);

                    if (in_array($vars['option'], $components) === false) {
                        continue;
                    }
                }

                // set device default as 'desktop,tablet,mobile'
                if (empty($item->device)) {
                    $item->device = 'desktop,tablet,phone';
                }

                // check device
                if (in_array($vars['device'], explode(',', $item->device)) === false) {
                    continue;
                }

                // check area
                if (!empty($item->area) && (int) $item->area != $vars['area']) {
                    continue;
                }

                // check against passed in plugin value
                if ($plugin && in_array($plugin, explode(',', $item->plugins)) === false) {
                    continue;
                }

                // decrypt params
                if (!empty($item->params)) {
                    $item->params = JceEncryptHelper::decrypt($item->params);
                }

                $app->triggerEvent('onWfAfterEditorProfileItem', array(&$item));

                // event can "cancel" this profile item
                if ($item === false) {
                    continue;
                }

                // assign item to profile
                $cache[$signature] = (object) $item;

                // return
                return $cache[$signature];
            }

            return null;
        }

        return $cache[$signature];
    }

    /**
     * Get editor parameters.
     *
     * @param array $options
     *
     * @return object
     */
    public function getParams($options = array())
    {
        $app = Factory::getApplication();

        if (!isset(self::$params)) {
            self::$params = array();
        }

        // set blank key if not set
        if (!isset($options['key'])) {
            $options['key'] = '';
        }
        // set blank path if not set
        if (!isset($options['path'])) {
            $options['path'] = '';
        }

        // get plugin name
        $plugin = $app->input->getCmd('plugin', '');

        // reset the plugin value if this is not called from within the JCE component
        if ($app->input->getCmd('option') !== 'com_jce') {
            $plugin = '';
        }

        if ($plugin) {
            // optional caller, eg: Link
            $caller = '';

            // get name and caller from plugin name
            if (strpos($plugin, '.') !== false) {
                list($plugin, $caller) = explode('.', $plugin);

                if ($caller) {
                    $options['caller'] = $caller;
                }
            }

            $options['plugin'] = $plugin;
        }

        $signature = serialize($options);

        if (empty(self::$params[$signature])) {
            // get plugin
            $editor = PluginHelper::getPlugin('editors', 'jce');

            if (empty($editor->params)) {
                $editor->params = '{}';
            }

            // get editor params as an associative array
            $data1 = json_decode($editor->params, true);

            // if null or false, revert to array
            if (empty($data1)) {
                $data1 = array();
            }

            // assign params to "editor" key
            $data1 = array('editor' => $data1);

            // get params data for the active profile
            $profile = $this->getActiveProfile(array('plugin' => $plugin));

            // create empty default if no profile or params are set
            $params = empty($profile->params) ? '{}' : $profile->params;

            // get profile params as an associative array
            $data2 = json_decode($params, true);

            // if null or false, revert to array
            if (empty($data2)) {
                $data2 = array();
            }

            // merge params, but ignore empty values
            $data = WFUtility::array_merge_recursive_distinct($data1, $data2, true);

            // create new registry with params
            $params = new Registry($data);

            self::$params[$signature] = $params;
        }

        return self::$params[$signature];
    }

    private function isEmptyValue($value)
    {
        if (is_null($value)) {
            return true;
        }

        if (is_array($value)) {
            return empty($value);
        }

        return false;
    }

    /**
     * Get a parameter by key.
     *
     * @param $key Parameter key eg: editor.width
     * @param $fallback Fallback value
     * @param $default Default value
     */
    public function getParam($key, $fallback = '', $default = '', $type = 'string')
    {
        // get params for base key
        $params = $this->getParams();

        // get a parameter
        $value = $params->get($key);

        // key not present in params or was empty string or empty array (JRegistry returns null), use fallback value
        if (self::isEmptyValue($value)) {
            // set default as empty string
            $value = '';

            // key does not exist (parameter was not set) - use fallback
            if ($params->exists($key) === false) {
                $value = $fallback;

                // if fallback is empty, revert to system default if it is non-empty
                if ($fallback == '' && $default != '') {
                    $value = $default;

                    // reset $default to prevent clearing
                    $default = '';
                }
                // parameter is set, but is empty, but fallback is not (inherited values)
            } else if ($fallback != '') {
                $value = $fallback;
            }
        }

        // clean string value of whitespace
        if (is_string($value)) {
            $value = trim(preg_replace('#[\n\r\t]+#', '', $value));
        }

        // cast default to float if numeric
        if (is_numeric($default)) {
            $default = (float) $default;
        }

        // cast value to float if numeric
        if (is_numeric($value)) {
            $value = (float) $value;
        }

        // if value is equal to system default, clear $value and return
        if ($value === $default) {
            return '';
        }

        // cast value to boolean
        if ($type == 'boolean') {
            $value = (bool) $value;
        }

        return $value;
    }
}
libraries/classes/mime.php000060400000102332152455721620011623 0ustar00<?php

/**
 * @copyright     Copyright (c) 2009-2022 Ryan Demmer. All rights reserved
 * @license       GNU/GPL 2 or later - http://www.gnu.org/licenses/old-licenses/gpl-2.0.html
 * JCE is free software. This version may have been modified pursuant
 * to the GNU General Public License, and as distributed it includes or
 * is derivative of works licensed under the GNU General Public License or
 * other free or open source software licenses
 */
abstract class WFMimeType
{
    /*
     * @var Array Mimetype values by extension
     * From mimetype list maintained at http://svn.apache.org/viewvc/httpd/httpd/trunk/docs/conf/mime.types
     */

    private static $mimes = array(
        'application/andrew-inset' => 'ez',
        'application/applixware' => 'aw',
        'application/atom+xml' => 'atom',
        'application/atomcat+xml' => 'atomcat',
        'application/atomsvc+xml' => 'atomsvc',
        'application/ccxml+xml' => 'ccxml',
        'application/cu-seeme' => 'cu',
        'application/davmount+xml' => 'davmount',
        'application/dssc+der' => 'dssc',
        'application/dssc+xml' => 'xdssc',
        'application/ecmascript' => 'ecma',
        'application/emma+xml' => 'emma',
        'application/epub+zip' => 'epub',
        'application/font-tdpfr' => 'pfr',
        'application/hyperstudio' => 'stk',
        'application/ipfix' => 'ipfix',
        'application/java-archive' => 'jar',
        'application/java-serialized-object' => 'ser',
        'application/java-vm' => 'class',
        'application/javascript' => 'js',
        'application/json' => 'json',
        'application/lost+xml' => 'lostxml',
        'application/mac-binhex40' => 'hqx',
        'application/mac-compactpro' => 'cpt',
        'application/marc' => 'mrc',
        'application/mathematica' => 'ma nb mb',
        'application/mathml+xml' => 'mathml',
        'application/mbox' => 'mbox',
        'application/mediaservercontrol+xml' => 'mscml',
        'application/mp4' => 'mp4s',
        'application/msword' => 'doc dot ppt xls xlsm dotx docx pptx xlsx ppsx sldx potx xltx',
        'application/vnd.openxmlformats-officedocument.wordprocessingml.template' => 'dotx',
        'application/vnd.openxmlformats-officedocument.wordprocessingml.document' => 'docx',
        'application/vnd.openxmlformats-officedocument.presentationml.presentation' => 'pptx',
        'application/vnd.openxmlformats-officedocument.spreadsheetml.sheet' => 'xlsx',
        'application/vnd.openxmlformats-officedocument.presentationml.slideshow' => 'ppsx',
        'application/vnd.openxmlformats-officedocument.presentationml.slide' => 'sldx',
        'application/vnd.openxmlformats-officedocument.presentationml.template' => 'potx',
        'application/vnd.openxmlformats-officedocument.spreadsheetml.template' => 'xltx',
        'application/mxf' => 'mxf',
        'application/octet-stream' => 'bin dms lha lrf lzh so iso dmg dist distz pkg bpk dump elc deploy',
        'application/oda' => 'oda',
        'application/oebps-package+xml' => 'opf',
        'application/ogg' => 'ogx ogg ogv oga',
        'application/onenote' => 'onetoc onetoc2 onetmp onepkg',
        'application/patch-ops-error+xml' => 'xer',
        'application/pdf' => 'pdf',
        'application/pgp-encrypted' => 'pgp',
        'application/pgp-signature' => 'asc sig',
        'application/pics-rules' => 'prf',
        'application/pkcs10' => 'p10',
        'application/pkcs7-mime' => 'p7m p7c',
        'application/pkcs7-signature' => 'p7s',
        'application/pkix-cert' => 'cer',
        'application/pkix-crl' => 'crl',
        'application/pkix-pkipath' => 'pkipath',
        'application/pkixcmp' => 'pki',
        'application/pls+xml' => 'pls',
        'application/postscript' => 'ai eps ps',
        'application/prs.cww' => 'cww',
        'application/rdf+xml' => 'rdf',
        'application/reginfo+xml' => 'rif',
        'application/relax-ng-compact-syntax' => 'rnc',
        'application/resource-lists+xml' => 'rl',
        'application/resource-lists-diff+xml' => 'rld',
        'application/rls-services+xml' => 'rs',
        'application/rsd+xml' => 'rsd',
        'application/rss+xml' => 'rss',
        'application/rtf' => 'rtf',
        'application/sbml+xml' => 'sbml',
        'application/scvp-cv-request' => 'scq',
        'application/scvp-cv-response' => 'scs',
        'application/scvp-vp-request' => 'spq',
        'application/scvp-vp-response' => 'spp',
        'application/sdp' => 'sdp',
        'application/set-payment-initiation' => 'setpay',
        'application/set-registration-initiation' => 'setreg',
        'application/shf+xml' => 'shf',
        'application/smil+xml' => 'smi smil',
        'application/sparql-query' => 'rq',
        'application/sparql-results+xml' => 'srx',
        'application/srgs' => 'gram',
        'application/srgs+xml' => 'grxml',
        'application/ssml+xml' => 'ssml',
        'application/vnd.3gpp.pic-bw-large' => 'plb',
        'application/vnd.3gpp.pic-bw-small' => 'psb',
        'application/vnd.3gpp.pic-bw-var' => 'pvb',
        'application/vnd.3gpp2.tcap' => 'tcap',
        'application/vnd.3m.post-it-notes' => 'pwn',
        'application/vnd.accpac.simply.aso' => 'aso',
        'application/vnd.accpac.simply.imp' => 'imp',
        'application/vnd.acucobol' => 'acu',
        'application/vnd.acucorp' => 'atc acutc',
        'application/vnd.adobe.air-application-installer-package+zip' => 'air',
        'application/vnd.adobe.xdp+xml' => 'xdp',
        'application/vnd.adobe.xfdf' => 'xfdf',
        'application/vnd.airzip.filesecure.azf' => 'azf',
        'application/vnd.airzip.filesecure.azs' => 'azs',
        'application/vnd.amazon.ebook' => 'azw',
        'application/vnd.americandynamics.acc' => 'acc',
        'application/vnd.amiga.ami' => 'ami',
        'application/vnd.android.package-archive' => 'apk',
        'application/vnd.anser-web-certificate-issue-initiation' => 'cii',
        'application/vnd.anser-web-funds-transfer-initiation' => 'fti',
        'application/vnd.antix.game-component' => 'atx',
        'application/vnd.apple.installer+xml' => 'mpkg',
        'application/vnd.apple.mpegurl' => 'm3u8',
        'application/vnd.aristanetworks.swi' => 'swi',
        'application/vnd.audiograph' => 'aep',
        'application/vnd.blueice.multipass' => 'mpm',
        'application/vnd.bmi' => 'bmi',
        'application/vnd.businessobjects' => 'rep',
        'application/vnd.chemdraw+xml' => 'cdxml',
        'application/vnd.chipnuts.karaoke-mmd' => 'mmd',
        'application/vnd.cinderella' => 'cdy',
        'application/vnd.claymore' => 'cla',
        'application/vnd.cloanto.rp9' => 'rp9',
        'application/vnd.clonk.c4group' => 'c4g c4d c4f c4p c4u',
        'application/vnd.commonspace' => 'csp',
        'application/vnd.contact.cmsg' => 'cdbcmsg',
        'application/vnd.cosmocaller' => 'cmc',
        'application/vnd.crick.clicker' => 'clkx',
        'application/vnd.crick.clicker.keyboard' => 'clkk',
        'application/vnd.crick.clicker.palette' => 'clkp',
        'application/vnd.crick.clicker.template' => 'clkt',
        'application/vnd.crick.clicker.wordbank' => 'clkw',
        'application/vnd.criticaltools.wbs+xml' => 'wbs',
        'application/vnd.ctc-posml' => 'pml',
        'application/vnd.cups-ppd' => 'ppd',
        'application/vnd.curl.car' => 'car',
        'application/vnd.curl.pcurl' => 'pcurl',
        'application/vnd.data-vision.rdz' => 'rdz',
        'application/vnd.denovo.fcselayout-link' => 'fe_launch',
        'application/vnd.dna' => 'dna',
        'application/vnd.dolby.mlp' => 'mlp',
        'application/vnd.dpgraph' => 'dpg',
        'application/vnd.dreamfactory' => 'dfac',
        'application/vnd.dynageo' => 'geo',
        'application/vnd.ecowin.chart' => 'mag',
        'application/vnd.enliven' => 'nml',
        'application/vnd.epson.esf' => 'esf',
        'application/vnd.epson.msf' => 'msf',
        'application/vnd.epson.quickanime' => 'qam',
        'application/vnd.epson.salt' => 'slt',
        'application/vnd.epson.ssf' => 'ssf',
        'application/vnd.eszigno3+xml' => 'es3 et3',
        'application/vnd.ezpix-album' => 'ez2',
        'application/vnd.ezpix-package' => 'ez3',
        'application/vnd.fdf' => 'fdf',
        'application/vnd.fdsn.mseed' => 'mseed',
        'application/vnd.fdsn.seed' => 'seed dataless',
        'application/vnd.flographit' => 'gph',
        'application/vnd.fluxtime.clip' => 'ftc',
        'application/vnd.framemaker' => 'fm frame maker book',
        'application/vnd.frogans.fnc' => 'fnc',
        'application/vnd.frogans.ltf' => 'ltf',
        'application/vnd.fsc.weblaunch' => 'fsc',
        'application/vnd.fujitsu.oasys' => 'oas',
        'application/vnd.fujitsu.oasys2' => 'oa2',
        'application/vnd.fujitsu.oasys3' => 'oa3',
        'application/vnd.fujitsu.oasysgp' => 'fg5',
        'application/vnd.fujitsu.oasysprs' => 'bh2',
        'application/vnd.fujixerox.ddd' => 'ddd',
        'application/vnd.fujixerox.docuworks' => 'xdw',
        'application/vnd.fujixerox.docuworks.binder' => 'xbd',
        'application/vnd.fuzzysheet' => 'fzs',
        'application/vnd.genomatix.tuxedo' => 'txd',
        'application/vnd.geogebra.file' => 'ggb',
        'application/vnd.geogebra.tool' => 'ggt',
        'application/vnd.geometry-explorer' => 'gex gre',
        'application/vnd.geonext' => 'gxt',
        'application/vnd.geoplan' => 'g2w',
        'application/vnd.geospace' => 'g3w',
        'application/vnd.gmx' => 'gmx',
        'application/vnd.google-earth.kml+xml' => 'kml',
        'application/vnd.google-earth.kmz' => 'kmz',
        'application/vnd.grafeq' => 'gqf gqs',
        'application/vnd.groove-account' => 'gac',
        'application/vnd.groove-help' => 'ghf',
        'application/vnd.groove-identity-message' => 'gim',
        'application/vnd.groove-injector' => 'grv',
        'application/vnd.groove-tool-message' => 'gtm',
        'application/vnd.groove-tool-template' => 'tpl',
        'application/vnd.groove-vcard' => 'vcg',
        'application/vnd.handheld-entertainment+xml' => 'zmm',
        'application/vnd.hbci' => 'hbci',
        'application/vnd.hhe.lesson-player' => 'les',
        'application/vnd.hp-hpgl' => 'hpgl',
        'application/vnd.hp-hpid' => 'hpid',
        'application/vnd.hp-hps' => 'hps',
        'application/vnd.hp-jlyt' => 'jlt',
        'application/vnd.hp-pcl' => 'pcl',
        'application/vnd.hp-pclxl' => 'pclxl',
        'application/vnd.hydrostatix.sof-data' => 'sfd-hdstx',
        'application/vnd.hzn-3d-crossword' => 'x3d',
        'application/vnd.ibm.minipay' => 'mpy',
        'application/vnd.ibm.modcap' => 'afp listafp list3820',
        'application/vnd.ibm.rights-management' => 'irm',
        'application/vnd.ibm.secure-container' => 'sc',
        'application/vnd.iccprofile' => 'icc icm',
        'application/vnd.igloader' => 'igl',
        'application/vnd.immervision-ivp' => 'ivp',
        'application/vnd.immervision-ivu' => 'ivu',
        'application/vnd.intercon.formnet' => 'xpw xpx',
        'application/vnd.intu.qbo' => 'qbo',
        'application/vnd.intu.qfx' => 'qfx',
        'application/vnd.ipunplugged.rcprofile' => 'rcprofile',
        'application/vnd.irepository.package+xml' => 'irp',
        'application/vnd.is-xpr' => 'xpr',
        'application/vnd.jam' => 'jam',
        'application/vnd.jcp.javame.midlet-rms' => 'rms',
        'application/vnd.jisp' => 'jisp',
        'application/vnd.joost.joda-archive' => 'joda',
        'application/vnd.kahootz' => 'ktz ktr',
        'application/vnd.kde.karbon' => 'karbon',
        'application/vnd.kde.kchart' => 'chrt',
        'application/vnd.kde.kformula' => 'kfo',
        'application/vnd.kde.kivio' => 'flw',
        'application/vnd.kde.kontour' => 'kon',
        'application/vnd.kde.kpresenter' => 'kpr kpt',
        'application/vnd.kde.kspread' => 'ksp',
        'application/vnd.kde.kword' => 'kwd kwt',
        'application/vnd.kenameaapp' => 'htke',
        'application/vnd.kidspiration' => 'kia',
        'application/vnd.kinar' => 'kne knp',
        'application/vnd.koan' => 'skp skd skt skm',
        'application/vnd.kodak-descriptor' => 'sse',
        'application/vnd.llamagraphics.life-balance.desktop' => 'lbd',
        'application/vnd.llamagraphics.life-balance.exchange+xml' => 'lbe',
        'application/vnd.lotus-1-2-3' => '123',
        'application/vnd.lotus-approach' => 'apr',
        'application/vnd.lotus-freelance' => 'pre',
        'application/vnd.lotus-notes' => 'nsf',
        'application/vnd.lotus-organizer' => 'org',
        'application/vnd.lotus-screencam' => 'scm',
        'application/vnd.lotus-wordpro' => 'lwp',
        'application/vnd.macports.portpkg' => 'portpkg',
        'application/vnd.mcd' => 'mcd',
        'application/vnd.medcalcdata' => 'mc1',
        'application/vnd.mediastation.cdkey' => 'cdkey',
        'application/vnd.mfer' => 'mwf',
        'application/vnd.mfmp' => 'mfm',
        'application/vnd.micrografx.flo' => 'flo',
        'application/vnd.micrografx.igx' => 'igx',
        'application/vnd.mif' => 'mif',
        'application/vnd.mobius.daf' => 'daf',
        'application/vnd.mobius.dis' => 'dis',
        'application/vnd.mobius.mbk' => 'mbk',
        'application/vnd.mobius.mqy' => 'mqy',
        'application/vnd.mobius.msl' => 'msl',
        'application/vnd.mobius.plc' => 'plc',
        'application/vnd.mobius.txf' => 'txf',
        'application/vnd.mophun.application' => 'mpn',
        'application/vnd.mophun.certificate' => 'mpc',
        'application/vnd.mozilla.xul+xml' => 'xul',
        'application/vnd.ms-artgalry' => 'cil',
        'application/vnd.ms-cab-compressed' => 'cab',
        'application/vnd.ms-excel' => 'xls xlm xla xlc xlt xlw xlsx xlsm',
        'application/vnd.ms-excel.addin.macroenabled.12' => 'xlam',
        'application/vnd.ms-excel.sheet.binary.macroenabled.12' => 'xlsb',
        'application/vnd.ms-excel.sheet.macroenabled.12' => 'xlsm',
        'application/vnd.ms-excel.template.macroenabled.12' => 'xltm',
        'application/vnd.ms-fontobject' => 'eot',
        'application/vnd.ms-htmlhelp' => 'chm',
        'application/vnd.ms-ims' => 'ims',
        'application/vnd.ms-lrm' => 'lrm',
        'application/vnd.ms-pki.seccat' => 'cat',
        'application/vnd.ms-pki.stl' => 'stl',
        'application/vnd.ms-powerpoint' => 'ppt pps pot pptx',
        'application/vnd.ms-powerpoint.addin.macroenabled.12' => 'ppam',
        'application/vnd.ms-powerpoint.presentation.macroenabled.12' => 'pptm',
        'application/vnd.ms-powerpoint.slide.macroenabled.12' => 'sldm',
        'application/vnd.ms-powerpoint.slideshow.macroenabled.12' => 'ppsm',
        'application/vnd.ms-powerpoint.template.macroenabled.12' => 'potm',
        'application/vnd.ms-project' => 'mpp mpt',
        'application/vnd.ms-word.document.macroenabled.12' => 'docm',
        'application/vnd.ms-word.template.macroenabled.12' => 'dotm',
        'application/vnd.ms-works' => 'wps wks wcm wdb',
        'application/vnd.ms-wpl' => 'wpl',
        'application/vnd.ms-xpsdocument' => 'xps',
        'application/vnd.mseq' => 'mseq',
        'application/vnd.musician' => 'mus',
        'application/vnd.muvee.style' => 'msty',
        'application/vnd.neurolanguage.nlu' => 'nlu',
        'application/vnd.noblenet-directory' => 'nnd',
        'application/vnd.noblenet-sealer' => 'nns',
        'application/vnd.noblenet-web' => 'nnw',
        'application/vnd.nokia.n-gage.data' => 'ngdat',
        'application/vnd.nokia.n-gage.symbian.install' => 'n-gage',
        'application/vnd.nokia.radio-preset' => 'rpst',
        'application/vnd.nokia.radio-presets' => 'rpss',
        'application/vnd.novadigm.edm' => 'edm',
        'application/vnd.novadigm.edx' => 'edx',
        'application/vnd.novadigm.ext' => 'ext',
        'application/vnd.oasis.opendocument.chart' => 'odc',
        'application/vnd.oasis.opendocument.chart-template' => 'otc',
        'application/vnd.oasis.opendocument.database' => 'odb',
        'application/vnd.oasis.opendocument.formula' => 'odf',
        'application/vnd.oasis.opendocument.formula-template' => 'odft',
        'application/vnd.oasis.opendocument.graphics' => 'odg',
        'application/vnd.oasis.opendocument.graphics-template' => 'otg',
        'application/vnd.oasis.opendocument.image' => 'odi',
        'application/vnd.oasis.opendocument.image-template' => 'oti',
        'application/vnd.oasis.opendocument.presentation' => 'odp',
        'application/vnd.oasis.opendocument.presentation-template' => 'otp',
        'application/vnd.oasis.opendocument.spreadsheet' => 'ods',
        'application/vnd.oasis.opendocument.spreadsheet-template' => 'ots',
        'application/vnd.oasis.opendocument.text' => 'odt',
        'application/vnd.oasis.opendocument.text-master' => 'otm',
        'application/vnd.oasis.opendocument.text-template' => 'ott',
        'application/vnd.oasis.opendocument.text-web' => 'oth',
        'application/vnd.olpc-sugar' => 'xo',
        'application/vnd.oma.dd2+xml' => 'dd2',
        'application/vnd.openofficeorg.extension' => 'oxt',
        'application/vnd.openxmlformats-officedocument.presentationml.presentation' => 'pptx',
        'application/vnd.openxmlformats-officedocument.presentationml.slide' => 'sldx',
        'application/vnd.openxmlformats-officedocument.presentationml.slideshow' => 'ppsx',
        'application/vnd.openxmlformats-officedocument.presentationml.template' => 'potx',
        'application/vnd.openxmlformats-officedocument.spreadsheetml.sheet' => 'xlsx',
        'application/vnd.openxmlformats-officedocument.spreadsheetml.template' => 'xltx',
        'application/vnd.ms-excel.sheet.macroEnabled.12' => 'xlsm',
        'application/vnd.openxmlformats-officedocument.wordprocessingml.document' => 'docx dotx',
        'application/vnd.openxmlformats-officedocument.wordprocessingml.template' => 'dotx',
        'application/vnd.osgi.dp' => 'dp',
        'application/vnd.palm' => 'pdb pqa oprc',
        'application/vnd.pawaafile' => 'paw',
        'application/vnd.pg.format' => 'str',
        'application/vnd.pg.osasli' => 'ei6',
        'application/vnd.picsel' => 'efif',
        'application/vnd.pmi.widget' => 'wg',
        'application/vnd.pocketlearn' => 'plf',
        'application/vnd.powerbuilder6' => 'pbd',
        'application/vnd.previewsystems.box' => 'box',
        'application/vnd.proteus.magazine' => 'mgz',
        'application/vnd.publishare-delta-tree' => 'qps',
        'application/vnd.pvi.ptid1' => 'ptid',
        'application/vnd.quark.quarkxpress' => 'qxd qxt qwd qwt qxl qxb',
        'application/vnd.realvnc.bed' => 'bed',
        'application/vnd.recordare.musicxml' => 'mxl',
        'application/vnd.recordare.musicxml+xml' => 'musicxml',
        'application/vnd.rim.cod' => 'cod',
        'application/vnd.rn-realmedia' => 'rm',
        'application/vnd.route66.link66+xml' => 'link66',
        'application/vnd.sailingtracker.track' => 'st',
        'application/vnd.seemail' => 'see',
        'application/vnd.sema' => 'sema',
        'application/vnd.semd' => 'semd',
        'application/vnd.semf' => 'semf',
        'application/vnd.shana.informed.formdata' => 'ifm',
        'application/vnd.shana.informed.formtemplate' => 'itp',
        'application/vnd.shana.informed.interchange' => 'iif',
        'application/vnd.shana.informed.package' => 'ipk',
        'application/vnd.simtech-mindmapper' => 'twd twds',
        'application/vnd.smaf' => 'mmf',
        'application/vnd.smart.teacher' => 'teacher',
        'application/vnd.solent.sdkm+xml' => 'sdkm sdkd',
        'application/vnd.spotfire.dxp' => 'dxp',
        'application/vnd.spotfire.sfs' => 'sfs',
        'application/vnd.stardivision.calc' => 'sdc',
        'application/vnd.stardivision.draw' => 'sda',
        'application/vnd.stardivision.impress' => 'sdd',
        'application/vnd.stardivision.math' => 'smf',
        'application/vnd.stardivision.writer' => 'sdw vor',
        'application/vnd.stardivision.writer-global' => 'sgl',
        'application/vnd.sun.xml.calc' => 'sxc',
        'application/vnd.sun.xml.calc.template' => 'stc',
        'application/vnd.sun.xml.draw' => 'sxd',
        'application/vnd.sun.xml.draw.template' => 'std',
        'application/vnd.sun.xml.impress' => 'sxi',
        'application/vnd.sun.xml.impress.template' => 'sti',
        'application/vnd.sun.xml.math' => 'sxm',
        'application/vnd.sun.xml.writer' => 'sxw',
        'application/vnd.sun.xml.writer.global' => 'sxg',
        'application/vnd.sun.xml.writer.template' => 'stw',
        'application/vnd.sus-calendar' => 'sus susp',
        'application/vnd.svd' => 'svd',
        'application/vnd.symbian.install' => 'sis sisx',
        'application/vnd.syncml+xml' => 'xsm',
        'application/vnd.syncml.dm+wbxml' => 'bdm',
        'application/vnd.syncml.dm+xml' => 'xdm',
        'application/vnd.tao.intent-module-archive' => 'tao',
        'application/vnd.tmobile-livetv' => 'tmo',
        'application/vnd.trid.tpt' => 'tpt',
        'application/vnd.triscape.mxs' => 'mxs',
        'application/vnd.trueapp' => 'tra',
        'application/vnd.ufdl' => 'ufd ufdl',
        'application/vnd.uiq.theme' => 'utz',
        'application/vnd.umajin' => 'umj',
        'application/vnd.unity' => 'unityweb',
        'application/vnd.uoml+xml' => 'uoml',
        'application/vnd.vcx' => 'vcx',
        'application/vnd.visio' => 'vsd vst vss vsw',
        'application/vnd.visionary' => 'vis',
        'application/vnd.vsf' => 'vsf',
        'application/vnd.wap.wbxml' => 'wbxml',
        'application/vnd.wap.wmlc' => 'wmlc',
        'application/vnd.wap.wmlscriptc' => 'wmlsc',
        'application/vnd.webturbo' => 'wtb',
        'application/vnd.wolfram.player' => 'nbp',
        'application/vnd.wordperfect' => 'wpd',
        'application/vnd.wqd' => 'wqd',
        'application/vnd.wt.stf' => 'stf',
        'application/vnd.xara' => 'xar',
        'application/vnd.xfdl' => 'xfdl',
        'application/vnd.yamaha.hv-dic' => 'hvd',
        'application/vnd.yamaha.hv-script' => 'hvs',
        'application/vnd.yamaha.hv-voice' => 'hvp',
        'application/vnd.yamaha.openscoreformat' => 'osf',
        'application/vnd.yamaha.openscoreformat.osfpvg+xml' => 'osfpvg',
        'application/vnd.yamaha.smaf-audio' => 'saf',
        'application/vnd.yamaha.smaf-phrase' => 'spf',
        'application/vnd.yellowriver-custom-menu' => 'cmp',
        'application/vnd.zul' => 'zir zirz',
        'application/vnd.zzazz.deck+xml' => 'zaz',
        'application/voicexml+xml' => 'vxml',
        'application/winhlp' => 'hlp',
        'application/wsdl+xml' => 'wsdl',
        'application/wspolicy+xml' => 'wspolicy',
        'application/x-abiword' => 'abw',
        'application/x-ace-compressed' => 'ace',
        'application/x-authorware-bin' => 'aab x32 u32 vox',
        'application/x-authorware-map' => 'aam',
        'application/x-authorware-seg' => 'aas',
        'application/x-bcpio' => 'bcpio',
        'application/x-bittorrent' => 'torrent',
        'application/x-bzip' => 'bz',
        'application/x-bzip2' => 'bz2 boz',
        'application/x-cdlink' => 'vcd',
        'application/x-chat' => 'chat',
        'application/x-chess-pgn' => 'pgn',
        'application/x-cpio' => 'cpio',
        'application/x-csh' => 'csh',
        'application/x-debian-package' => 'deb udeb',
        'application/x-director' => 'dir dcr dxr cst cct cxt w3d fgd swa',
        'application/x-doom' => 'wad',
        'application/x-dtbncx+xml' => 'ncx',
        'application/x-dtbook+xml' => 'dtb',
        'application/x-dtbresource+xml' => 'res',
        'application/x-dvi' => 'dvi',
        'application/x-font-bdf' => 'bdf',
        'application/x-font-ghostscript' => 'gsf',
        'application/x-font-linux-psf' => 'psf',
        'application/x-font-otf' => 'otf',
        'application/x-font-pcf' => 'pcf',
        'application/x-font-snf' => 'snf',
        'application/x-font-ttf' => 'ttf ttc',
        'application/x-font-type1' => 'pfa pfb pfm afm',
        'application/x-futuresplash' => 'spl',
        'application/x-gnumeric' => 'gnumeric',
        'application/x-gtar' => 'gtar',
        'application/x-hdf' => 'hdf',
        'application/x-java-jnlp-file' => 'jnlp',
        'application/x-latex' => 'latex',
        'application/x-mobipocket-ebook' => 'prc mobi',
        'application/x-ms-application' => 'application',
        'application/x-ms-wmd' => 'wmd',
        'application/x-ms-wmz' => 'wmz',
        'application/x-ms-xbap' => 'xbap',
        'application/x-msaccess' => 'mdb',
        'application/x-msbinder' => 'obd',
        'application/x-mscardfile' => 'crd',
        'application/x-msclip' => 'clp',
        'application/x-msdownload' => 'exe dll com bat msi',
        'application/x-msmediaview' => 'mvb m13 m14',
        'application/x-msmetafile' => 'wmf',
        'application/x-msmoney' => 'mny',
        'application/x-mspublisher' => 'pub',
        'application/x-msschedule' => 'scd',
        'application/x-msterminal' => 'trm',
        'application/x-mswrite' => 'wri',
        'application/x-netcdf' => 'nc cdf',
        'application/x-pkcs12' => 'p12 pfx',
        'application/x-pkcs7-certificates' => 'p7b spc',
        'application/x-pkcs7-certreqresp' => 'p7r',
        'application/x-rar-compressed' => 'rar',
        'application/x-sh' => 'sh',
        'application/x-shar' => 'shar',
        'application/x-shockwave-flash' => 'swf',
        'application/x-silverlight-app' => 'xap',
        'application/x-stuffit' => 'sit',
        'application/x-stuffitx' => 'sitx',
        'application/x-sv4cpio' => 'sv4cpio',
        'application/x-sv4crc' => 'sv4crc',
        'application/x-tar' => 'tar',
        'application/x-tcl' => 'tcl',
        'application/x-tex' => 'tex',
        'application/x-tex-tfm' => 'tfm',
        'application/x-texinfo' => 'texinfo texi',
        'application/x-ustar' => 'ustar',
        'application/x-wais-source' => 'src',
        'application/x-x509-ca-cert' => 'der crt',
        'application/x-xfig' => 'fig',
        'application/x-xpinstall' => 'xpi',
        'application/xenc+xml' => 'xenc',
        'application/xhtml+xml' => 'xhtml xht',
        'application/xml' => 'xml xsl',
        'application/xml-dtd' => 'dtd',
        'application/xop+xml' => 'xop',
        'application/xslt+xml' => 'xslt',
        'application/xspf+xml' => 'xspf',
        'application/xv+xml' => 'mxml xhvml xvml xvm',
        'application/zip' => 'zip docx pptx ppsx xlsx sldx potx xltx dotx',
        'audio/adpcm' => 'adp',
        'audio/basic' => 'au snd',
        'audio/midi' => 'mid midi kar rmi',
        'audio/mp4' => 'mp4a',
        'audio/mpeg' => 'mpga mp2 mp2a mp3 m2a m3a',
        'audio/ogg' => 'oga ogg spx',
        'audio/vnd.digital-winds' => 'eol',
        'audio/vnd.dra' => 'dra',
        'audio/vnd.dts' => 'dts',
        'audio/vnd.dts.hd' => 'dtshd',
        'audio/vnd.lucent.voice' => 'lvp',
        'audio/vnd.ms-playready.media.pya' => 'pya',
        'audio/vnd.nuera.ecelp4800' => 'ecelp4800',
        'audio/vnd.nuera.ecelp7470' => 'ecelp7470',
        'audio/vnd.nuera.ecelp9600' => 'ecelp9600',
        'audio/x-aac' => 'aac',
        'audio/x-aiff' => 'aif aiff aifc',
        'audio/x-mpegurl' => 'm3u',
        'audio/x-ms-wax' => 'wax',
        'audio/x-ms-wma' => 'wma',
        'audio/x-pn-realaudio' => 'ram ra',
        'audio/x-pn-realaudio-plugin' => 'rmp',
        'audio/x-wav' => 'wav',
        'audio/webm' => 'webm',
        'chemical/x-cdx' => 'cdx',
        'chemical/x-cif' => 'cif',
        'chemical/x-cmdf' => 'cmdf',
        'chemical/x-cml' => 'cml',
        'chemical/x-csml' => 'csml',
        'chemical/x-xyz' => 'xyz',
        'image/bmp' => 'bmp',
        'image/cgm' => 'cgm',
        'image/g3fax' => 'g3',
        'image/gif' => 'gif',
        'image/ief' => 'ief',
        'image/jpeg' => 'jpeg jpg jpe',
        'image/png' => 'png',
        'image/prs.btif' => 'btif',
        'image/svg+xml' => 'svg svgz',
        'image/tiff' => 'tiff tif',
        'image/vnd.adobe.photoshop' => 'psd',
        'image/vnd.djvu' => 'djvu djv',
        'image/vnd.dwg' => 'dwg',
        'image/vnd.dxf' => 'dxf',
        'image/vnd.fastbidsheet' => 'fbs',
        'image/vnd.fpx' => 'fpx',
        'image/vnd.fst' => 'fst',
        'image/vnd.fujixerox.edmics-mmr' => 'mmr',
        'image/vnd.fujixerox.edmics-rlc' => 'rlc',
        'image/vnd.ms-modi' => 'mdi',
        'image/vnd.net-fpx' => 'npx',
        'image/vnd.wap.wbmp' => 'wbmp',
        'image/vnd.xiff' => 'xif',
        'image/x-cmu-raster' => 'ras',
        'image/x-cmx' => 'cmx',
        'image/x-freehand' => 'fh fhc fh4 fh5 fh7',
        'image/x-icon' => 'ico',
        'image/x-pcx' => 'pcx',
        'image/x-pict' => 'pic pct',
        'image/x-portable-anymap' => 'pnm',
        'image/x-portable-bitmap' => 'pbm',
        'image/x-portable-graymap' => 'pgm',
        'image/x-portable-pixmap' => 'ppm',
        'image/x-rgb' => 'rgb',
        'image/x-xbitmap' => 'xbm',
        'image/x-xpixmap' => 'xpm',
        'image/x-xwindowdump' => 'xwd',
        'message/rfc822' => 'eml mime',
        'model/iges' => 'igs iges',
        'model/mesh' => 'msh mesh silo',
        'model/vnd.dwf' => 'dwf',
        'model/vnd.gdl' => 'gdl',
        'model/vnd.gtw' => 'gtw',
        'model/vnd.mts' => 'mts',
        'model/vnd.vtu' => 'vtu',
        'model/vrml' => 'wrl vrml',
        'text/calendar' => 'ics ifb',
        'text/css' => 'css',
        'text/csv' => 'csv',
        'text/html' => 'html htm',
        'text/plain' => 'txt text conf def list log in csv',
        'text/prs.lines.tag' => 'dsc',
        'text/richtext' => 'rtx',
        'text/sgml' => 'sgml sgm',
        'text/tab-separated-values' => 'tsv',
        'text/troff' => 't tr roff man me ms',
        'text/uri-list' => 'uri uris urls',
        'text/vnd.curl' => 'curl',
        'text/vnd.curl.dcurl' => 'dcurl',
        'text/vnd.curl.scurl' => 'scurl',
        'text/vnd.curl.mcurl' => 'mcurl',
        'text/vnd.fly' => 'fly',
        'text/vnd.fmi.flexstor' => 'flx',
        'text/vnd.graphviz' => 'gv',
        'text/vnd.in3d.3dml' => '3dml',
        'text/vnd.in3d.spot' => 'spot',
        'text/vnd.sun.j2me.app-descriptor' => 'jad',
        'text/vnd.wap.wml' => 'wml',
        'text/vnd.wap.wmlscript' => 'wmls',
        'text/x-asm' => 's asm',
        'text/x-c' => 'c cc cxx cpp h hh dic',
        'text/x-fortran' => 'f for f77 f90',
        'text/x-pascal' => 'p pas',
        'text/x-java-source' => 'java',
        'text/x-setext' => 'etx',
        'text/x-uuencode' => 'uu',
        'text/x-vcalendar' => 'vcs',
        'text/x-vcard' => 'vcf',
        'video/3gpp' => '3gp',
        'video/3gpp2' => '3g2',
        'video/h261' => 'h261',
        'video/h263' => 'h263',
        'video/h264' => 'h264',
        'video/jpeg' => 'jpgv',
        'video/jpm' => 'jpm jpgm',
        'video/mj2' => 'mj2 mjp2',
        'video/mp4' => 'mp4 mp4v mpg4',
        'video/mpeg' => 'mpeg mpg mpe m1v m2v',
        'video/ogg' => 'ogg ogv',
        'video/quicktime' => 'qt mov',
        'video/vnd.fvt' => 'fvt',
        'video/vnd.mpegurl' => 'mxu m4u',
        'video/vnd.ms-playready.media.pyv' => 'pyv',
        'video/vnd.vivo' => 'viv',
        'video/x-f4v' => 'f4v',
        'video/x-fli' => 'fli',
        'video/x-flv' => 'flv',
        'video/x-m4v' => 'm4v',
        'video/x-ms-asf' => 'asf asx wmv',
        'video/x-ms-wm' => 'wm',
        'video/x-ms-wmv' => 'wmv',
        'video/x-ms-wmx' => 'wmx',
        'video/x-ms-wvx' => 'wvx',
        'video/x-msvideo' => 'avi',
        'video/x-sgi-movie' => 'movie',
        'video/webm' => 'webm',
        'x-conference/x-cooltalk' => 'ice',
    );

    /**
     * $mimes getter - see $mimes.
     */
    private static function getMimes()
    {
        return self::$mimes;
    }

    /**
     * Get the mime type from the $mimes array.
     *
     * @param string $type
     *
     * @return string
     */
    private static function getMime($type)
    {
        // get mimetype array
        $mimes = self::getMimes();

        if (array_key_exists($type, $mimes)) {
            return explode(' ', $mimes[$type]);
        }

        return null;
    }

    private static function isSupported($extension)
    {
        // get mimetype array
        $mimes = self::getMimes();

        $supported = false;

        foreach(array_values($mimes) as $mime) {
            if (in_array($extension, explode(' ', $mime))) {
                $supported = true;
                break;
            }
        };

        return $supported;
    }

    /**
     * Check file mime type.
     *
     * @param string $name
     * @param string $path
     * @param string $type
     *
     * @return bool
     */
    public static function check($name, $path)
    {
        $extension = strtolower(substr($name, strrpos($name, '.') + 1));
        $mimetype = null;

        // if the extension is allowed, but no mimetype reference is found, let it through...
        if (self::isSupported($extension) === false) {
            return true;
        }

        if (function_exists('finfo_open')) {
            if (!$finfo = new finfo(FILEINFO_MIME_TYPE)) {
                return true;
            }
            $mimetype = $finfo->file($path);
        } elseif (function_exists('mime_content_type')) {
            $mimetype = @mime_content_type($path);
        }

        if ($mimetype) {
            $mime = self::getMime($mimetype);

            if ($mime) {
                if (!in_array($extension, $mime)) {
                    return false;
                }
            }
        }

        // server doesn't support mime type check, let it through...
        return true;
    }
}
libraries/classes/tabs.php000060400000013102152455721620011621 0ustar00<?php
/**
 * @package     JCE
 * @subpackage  Editor
 *
 * @copyright   Copyright (C) 2005 - 2020 Open Source Matters, Inc. All rights reserved.
 * @copyright   Copyright (c) 2009-2024 Ryan Demmer. All rights reserved
 * @license     GNU General Public License version 2 or later; see LICENSE.txt
 */

\defined('_JEXEC') or die;

use Joomla\CMS\Language\Text;
use Joomla\CMS\Object\CMSObject;

final class WFTabs extends CMSObject
{
    private $_tabs = array();
    private $_panels = array();
    private $_paths = array();

    /**
     * Constructor activating the default information of the class.
     */
    public function __construct($config = array())
    {
        if (!array_key_exists('base_path', $config)) {
            $config['base_path'] = WF_EDITOR_LIBRARIES;
        }

        $this->setProperties($config);

        if (array_key_exists('template_path', $config)) {
            $this->addTemplatePath($config['template_path']);
        } else {
            $this->addTemplatePath($this->get('base_path') . '/tmpl');
        }
    }

    /**
     * Returns a reference to a WFTabs object.
     *
     * This method must be invoked as:
     *    <pre>  $tabs = WFTabs::getInstance();</pre>
     *
     * @return object WFTabs
     */
    public static function getInstance($config = array())
    {
        static $instance;

        if (!is_object($instance)) {
            $instance = new self($config);
        }

        return $instance;
    }

    /**
     * Add a template path.
     *
     * @param string $path
     */
    public function addTemplatePath($path)
    {
        $this->_paths[] = $path;
    }

    /**
     * Load a panel view.
     *
     * @param object $layout Layout (panel) name
     *
     * @return panel WFView object
     */
    private function loadPanel($panel, $state)
    {
        $view = new WFView(array(
            'name' => $panel,
            'layout' => $panel,
        ));

        // add tab paths
        foreach ($this->_paths as $path) {
            $view->addTemplatePath($path);
        }

        // assign panel state to view
        $view->state = (int) $state;

        return $view;
    }

    public function getPanel($panel)
    {
        if (array_key_exists($panel, $this->_panels)) {
            return $this->_panels[$panel];
        }

        return false;
    }

    /**
     * Add a tab to the document. A panel is automatically created and assigned.
     *
     * @param object $tab    Tab name
     * @param int    $state  Tab state (active or inactive)
     * @param array  $values An array of values to assign to panel view
     */
    public function addTab($tab, $state = 1, $values = array())
    {
        if (!array_key_exists($tab, $this->_tabs)) {
            $this->_tabs[$tab] = (int) $state === 1 ? $tab : '';

            $panel = $this->addPanel($tab, $state);

            // array is not empty and is associative
            if (!empty($values) && array_values($values) !== $values) {
                foreach ($values as $key => $value) {
                    $panel->$key = $value;
                }
            }
        }
    }

    /**
     * Add a panel to the document.
     *
     * @param object $panel Panel name
     */
    public function addPanel($tab, $state)
    {
        if (!array_key_exists($tab, $this->_panels)) {
            $this->_panels[$tab] = $this->loadPanel($tab, $state);

            return $this->_panels[$tab];
        }
    }

    /**
     * Remove a tab from the document.
     *
     * @param object $tab Tab name
     */
    public function removeTab($tab)
    {
        if (array_key_exists($tab, $this->_tabs)) {
            unset($this->_tabs[$tab]);
        }
    }

    /**
     * Render the document tabs and panels.
     */
    public function render()
    {
        $output = '';

        if (!empty($this->_tabs)) {
            $output .= '<div id="tabs">';
        }

        // add tabs
        if (count($this->_tabs) > 1) {
            $output .= '<ul class="uk-tab" role="tablist">' . "\n";

            $x = 0;

            foreach ($this->_tabs as $name => $tab) {
                $class = '';

                if ($x === 0) {
                    $class .= ' uk-active';
                }

                if (!$tab) {
                    $class .= ' uk-hidden';
                }

                $output .= "\t" . '<li role="presentation" aria-selected="false" class="' . $class . '"><button type="button" class="uk-button uk-button-link uk-button-tab" tabindex="-1" value="' . $name . '">' . Text::_('WF_TAB_' . strtoupper($name)) . '</button></li>' . "\n";
                ++$x;
            }

            $output .= "</ul>\n";
        }

        // add panels
        if (!empty($this->_panels)) {
            $x = 0;

            $output .= '<div class="uk-switcher">';

            foreach ($this->_panels as $key => $panel) {
                $class = '';

                if ($panel->state === 0) {
                    $class .= ' uk-hidden';
                }

                if (!empty($this->_tabs)) {
                    if ($x === 0) {
                        $class .= ' uk-active';
                    } else {
                        $class .= ' uk-tabs-hide';
                    }
                }

                $output .= '<div id="' . $key . '_tab" class="' . $class . '" role="tabpanel" aria-hidden="true">';
                $output .= $panel->loadTemplate();
                $output .= '</div>';

                ++$x;
            }

            $output .= '</div>';
        }

        // add closing div
        if (!empty($this->_tabs)) {
            $output .= "</div>\n";
        }

        echo $output;
    }
}
libraries/classes/request.php000060400000015772152455721620012377 0ustar00<?php
/**
 * @package     JCE
 * @subpackage  Editor
 *
 * @copyright   Copyright (C) 2005 - 2020 Open Source Matters, Inc. All rights reserved.
 * @copyright   Copyright (c) 2009-2024 Ryan Demmer. All rights reserved
 * @license     GNU General Public License version 2 or later; see LICENSE.txt
 */

\defined('_JEXEC') or die;

use Joomla\CMS\Factory;
use Joomla\CMS\Filter\InputFilter;
use Joomla\CMS\Language\Text;
use Joomla\CMS\Object\CMSObject;
use Joomla\CMS\Session\Session;

final class WFRequest extends CMSObject
{
    protected static $instance;

    protected $requests = array();

    /**
     * Constructor activating the default information of the class.
     */
    public function __construct()
    {
        parent::__construct();
    }

    /**
     * Returns a reference to a WFRequest object.
     *
     * This method must be invoked as:
     *    <pre>  $request = WFRequest::getInstance();</pre>
     *
     * @return object WFRequest
     */
    public static function getInstance()
    {
        if (!isset(self::$instance)) {
            self::$instance = new self();
        }

        return self::$instance;
    }

    /**
     * Set Request function.
     *
     * @param array $function An array containing the function and object
     */
    public function register($function)
    {
        $object = new stdClass();

        if (is_array($function)) {
            $ref = array_shift($function);
            $name = array_shift($function);

            $object->fn = $name;
            $object->ref = $ref;

            $this->requests[$name] = $object;
        } else {
            $object->fn = $function;
            $this->requests[$function] = $object;
        }
    }

    private function isRegistered($function)
    {
        return array_key_exists($function, $this->requests);
    }

    /**
     * Get a request function.
     *
     * @param string $function
     */
    public function getFunction($function)
    {
        return $this->requests[$function];
    }

    /**
     * Check if the HTTP Request is a WFRequest.
     *
     * @return bool
     */
    private function isRequest()
    {
        return (isset($_SERVER['HTTP_X_REQUESTED_WITH']) && strtolower($_SERVER['HTTP_X_REQUESTED_WITH']) === 'xmlhttprequest') || (isset($_SERVER['CONTENT_TYPE']) && strpos($_SERVER['CONTENT_TYPE'], 'multipart') !== false);
    }

    public function setRequest($request)
    {
        return $this->register($request);
    }

    /**
     * Check a request query for bad stuff.
     *
     * @param array $query
     */
    private function checkQuery($query)
    {
        if (is_string($query)) {
            $query = array($query);
        }

        // check for null byte
        foreach ($query as $key => $value) {
            if (is_array($value) || is_object($value)) {
                return self::checkQuery($value);
            }

            if (is_array($key)) {
                return self::checkQuery($key);
            }

            // Check if $key or $value is null before using strpos
            if ($key !== null && strpos($key, '\u0000') !== false) {
                throw new InvalidArgumentException('Invalid Data', 403);
            }

            if ($value !== null && strpos($value, '\u0000') !== false) {
                throw new InvalidArgumentException('Invalid Data', 403);
            }
        }
    }

    /**
     * Process an ajax call and return result.
     *
     * @return string
     */
    public function process($array = false)
    {
        if ($this->isRequest() === false) {
            return false;
        }

        // Check for request forgeries
        Session::checkToken('request') or jexit(Text::_('JINVALID_TOKEN'));

        $app = Factory::getApplication();

        // empty arguments
        $args = array();

        $json = $app->input->getVar('json', '', 'POST', 'STRING', 2);
        $method = $app->input->getWord('method');

        // get and encode json data
        if ($json) {
            // convert to JSON object
            $json = json_decode($json);
        }

        // get current request id
        $id = empty($json->id) ? $app->input->getWord('id') : $json->id;

        // create response
        $response = new WFResponse($id);

        if ($method || $json) {
            // set request flag
            define('JCE_REQUEST', 1);

            // check if valid json object
            if (is_object($json)) {
                // no function call
                if (isset($json->method) === false) {
                    $response->setError(array('code' => -32600, 'message' => 'Invalid Request'))->send();
                }

                // get function call
                $fn = $json->method;

                // clean function
                $fn = InputFilter::getInstance()->clean($fn, 'cmd');

                // pass params to input and flatten
                if (empty($json->params)) {
                    $json->params = "";
                }

                try {
                    // check query
                    $this->checkQuery($json->params);
                } catch (Exception $e) {
                    $response->setError(array('code' => $e->getCode(), 'message' => $e->getMessage()))->send();
                }

                // merge array with args
                if (is_array($json->params)) {
                    $args = array_merge($args, $json->params);
                    // pass through string or object
                } else {
                    $args[] = $json->params;
                }
            } else {
                $fn = $method;
                $response->setHeaders(array('Content-type' => 'text/html;charset=UTF-8'));
            }

            if (empty($fn) || $this->isRegistered($fn) === false) {
                $response->setError(array('code' => -32601, 'message' => 'Method not found'))->send();
            }

            // get method
            $request = $this->getFunction($fn);

            // create callable function
            $callback = array($request->ref, $request->fn);

            // check function is callable
            if (is_callable($callback) === false) {
                $response->setError(array('code' => -32601, 'message' => 'Method not found'))->send();
            }

            // create empty result
            $result = '';

            try {
                $result = call_user_func_array($callback, (array) $args);

                if (is_array($result) && !empty($result['error'])) {
                    if (is_array($result['error'])) {
                        $result['error'] = implode("\n", $result['error']);
                    }

                    $response->setError(array('message' => $result['error']))->send();
                }
            } catch (Exception $e) {
                $response->setError(array('code' => $e->getCode(), 'message' => $e->getMessage()))->send();
            }

            $response->setContent($result)->send();
        }

        // default response
        $response->setError(array('code' => -32601, 'message' => 'The server returned an invalid response'))->send();
    }
}
libraries/classes/text.php000060400000001105152455721620011654 0ustar00<?php
/**
 * @package     JCE
 * @subpackage  Editor
 *
 * @copyright   Copyright (C) 2005 - 2020 Open Source Matters, Inc. All rights reserved.
 * @copyright   Copyright (c) 2009-2024 Ryan Demmer. All rights reserved
 * @license     GNU General Public License version 2 or later; see LICENSE.txt
 */

\defined('_JEXEC') or die;

use Joomla\CMS\Language\Text;

abstract class WFText
{
    public static function _($string, $default = '')
    {
        return Text::_($string);
    }

    public static function sprintf($string)
    {
        return Text::sprintf($string);
    }
}
libraries/classes/uploadshield.php000060400000025470152455721620013360 0ustar00<?php

/**
 * @package   	JCE
 * @copyright 	Copyright (c) 2009-2015 Ryan Demmer. All rights reserved.
 * @license   	GNU/GPL 2 or later - http://www.gnu.org/licenses/old-licenses/gpl-2.0.html
 * @copyright   Copyright (C) 2005 - 2015 Open Source Matters, Inc. All rights reserved.
 * JCE is free software. This version may have been modified pursuant
 * to the GNU General Public License, and as distributed it includes or
 * is derivative of works licensed under the GNU General Public License or
 * other free or open source software licenses.
 */
defined('_JEXEC') or die('RESTRICTED');

abstract class WFUploadShield {

    /**
     * Checks an uploaded for suspicious naming and potential PHP contents which could indicate a hacking attempt.
     *
     * The options you can define are:
     * null_byte                   Prevent files with a null byte in their name (buffer overflow attack)
     * forbidden_extensions        Do not allow these strings anywhere in the file's extension
     * php_tag_in_content          Do not allow <?php tag in content
     * shorttag_in_content         Do not allow short tag <? in content
     * shorttag_extensions         Which file extensions to scan for short tags in content
     * fobidden_ext_in_content     Do not allow forbidden_extensions anywhere in content
     * php_ext_content_extensions  Which file extensions to scan for .php in content
     *
     * This code is an adaptation and improvement of Admin Tools' UploadShield feature,
     * relicensed and contributed by its author.
     *
     * @param   array  $file     An uploaded file descriptor
     * @param   array  $options  The scanner options (see the code for details)
     *
     * @return  boolean  True of the file is safe
     *
     * https://github.com/joomla/joomla-cms/blob/staging/libraries/joomla/filter/input.php
     * @copyright   Copyright (C) 2005 - 2015 Open Source Matters, Inc. All rights reserved.
     */
    public static function isSafeFile($file, $options = array()) {
        $defaultOptions = array(
            // Null byte in file name
            'null_byte' => true,
            // Forbidden string in extension (e.g. php matched .php, .xxx.php, .php.xxx and so on)
            'forbidden_extensions' => array(
                'php', 'phps', 'php5', 'php3', 'php4', 'inc', 'pl', 'cgi', 'fcgi', 'java', 'jar', 'py'
            ),
            // <?php tag in file contents
            'php_tag_in_content' => true,
            // <? tag in file contents
            'shorttag_in_content' => true,
            // Which file extensions to scan for short tags
            'shorttag_extensions' => array(
                'inc', 'phps', 'class', 'php3', 'php4', 'php5', 'txt', 'dat', 'tpl', 'tmpl'
            ),
            // Forbidden extensions anywhere in the content
            'fobidden_ext_in_content' => true,
            // Which file extensions to scan for .php in the content
            'php_ext_content_extensions' => array('zip', 'rar', 'tar', 'gz', 'tgz', 'bz2', 'tbz', 'jpa'),
        );

        $options = array_merge($defaultOptions, $options);

        // Make sure we can scan nested file descriptors
        $descriptors = $file;

        if (isset($file['name']) && isset($file['tmp_name'])) {
            $descriptors = self::decodeFileData(
                            array(
                                $file['name'],
                                $file['type'],
                                $file['tmp_name'],
                                $file['error'],
                                $file['size']
                            )
            );
        }

        // Handle non-nested descriptors (single files)
        if (isset($descriptors['name'])) {
            $descriptors = array($descriptors);
        }

        // Scan all descriptors detected
        foreach ($descriptors as $fileDescriptor) {
            if (!isset($fileDescriptor['name'])) {
                // This is a nested descriptor. We have to recurse.
                if (!self::isSafeFile($fileDescriptor, $options)) {
                    return false;
                }

                continue;
            }

            $tempNames = $fileDescriptor['tmp_name'];
            $intendedNames = $fileDescriptor['name'];

            if (!is_array($tempNames)) {
                $tempNames = array($tempNames);
            }

            if (!is_array($intendedNames)) {
                $intendedNames = array($intendedNames);
            }

            $len = count($tempNames);

            for ($i = 0; $i < $len; $i++) {
                $tempName = array_shift($tempNames);
                $intendedName = array_shift($intendedNames);

                // 1. Null byte check
                if ($options['null_byte']) {
                    if (strstr($intendedName, "\x00")) {
                        return false;
                    }
                }

                // 2. PHP-in-extension check (.php, .php.xxx[.yyy[.zzz[...]]], .xxx[.yyy[.zzz[...]]].php)
                if (!empty($options['forbidden_extensions'])) {
                    $explodedName = explode('.', $intendedName);
                    $explodedName = array_reverse($explodedName);
                    array_pop($explodedName);
                    array_map('strtolower', $explodedName);

                    /*
                     * DO NOT USE array_intersect HERE! array_intersect expects the two arrays to
                     * be set, i.e. they should have unique values.
                     */
                    foreach ($options['forbidden_extensions'] as $ext) {
                        if (in_array($ext, $explodedName)) {
                            return false;
                        }
                    }
                }

                // 3. File contents scanner (PHP tag in file contents)
                if ($options['php_tag_in_content'] || $options['shorttag_in_content'] || ($options['fobidden_ext_in_content'] && !empty($options['forbidden_extensions']))) {
                    $fp = @fopen($tempName, 'r');

                    if ($fp !== false) {
                        $data = '';

                        while (!feof($fp)) {
                            $buffer = @fread($fp, 131072);
                            $data .= $buffer;

                            if ($options['php_tag_in_content'] && strstr($buffer, '<?php')) {
                                return false;
                            }

                            if ($options['shorttag_in_content']) {
                                $suspiciousExtensions = $options['shorttag_extensions'];

                                if (empty($suspiciousExtensions)) {
                                    $suspiciousExtensions = array(
                                        'inc', 'phps', 'class', 'php3', 'php4', 'txt', 'dat', 'tpl', 'tmpl'
                                    );
                                }

                                /*
                                 * DO NOT USE array_intersect HERE! array_intersect expects the two arrays to
                                 * be set, i.e. they should have unique values.
                                 */
                                $collide = false;

                                foreach ($suspiciousExtensions as $ext) {
                                    if (in_array($ext, $explodedName)) {
                                        $collide = true;

                                        break;
                                    }
                                }

                                if ($collide) {
                                    // These are suspicious text files which may have the short tag (<?) in them
                                    if (strstr($buffer, '<?')) {
                                        return false;
                                    }
                                }
                            }

                            if ($options['fobidden_ext_in_content'] && !empty($options['forbidden_extensions'])) {
                                $suspiciousExtensions = $options['php_ext_content_extensions'];

                                if (empty($suspiciousExtensions)) {
                                    $suspiciousExtensions = array(
                                        'zip', 'rar', 'tar', 'gz', 'tgz', 'bz2', 'tbz', 'jpa'
                                    );
                                }

                                /*
                                 * DO NOT USE array_intersect HERE! array_intersect expects the two arrays to
                                 * be set, i.e. they should have unique values.
                                 */
                                $collide = false;

                                foreach ($suspiciousExtensions as $ext) {
                                    if (in_array($ext, $explodedName)) {
                                        $collide = true;

                                        break;
                                    }
                                }

                                if ($collide) {
                                    /*
                                     * These are suspicious text files which may have an executable
                                     * file extension in them
                                     */
                                    foreach ($options['forbidden_extensions'] as $ext) {
                                        if (strstr($buffer, '.' . $ext)) {
                                            return false;
                                        }
                                    }
                                }
                            }

                            /*
                             * This makes sure that we don't accidentally skip a <?php tag if it's across
                             * a read boundary, even on multibyte strings
                             */
                            $data = substr($data, -8);
                        }

                        fclose($fp);
                    }
                }
            }
        }

        return true;
    }

    /**
     * Method to decode a file data array.
     *
     * @param   array  $data  The data array to decode.
     *
     * @return  array
     *
     * https://github.com/joomla/joomla-cms/blob/staging/libraries/joomla/filter/input.php
     * @copyright   Copyright (C) 2005 - 2015 Open Source Matters, Inc. All rights reserved.
     */
    protected static function decodeFileData(array $data) {
        $result = array();

        if (is_array($data[0])) {
            foreach ($data[0] as $k => $v) {
                $result[$k] = self::decodeFileData(array($data[0][$k], $data[1][$k], $data[2][$k], $data[3][$k], $data[4][$k]));
            }

            return $result;
        }

        return array('name' => $data[0], 'type' => $data[1], 'tmp_name' => $data[2], 'error' => $data[3], 'size' => $data[4]);
    }
}libraries/uikit/uikit.min.css000060400000377730152455721620012314 0ustar00progress,sub,sup{vertical-align:baseline}.uk-panel,sub,sup{position:relative}.uk-article-title,.uk-panel-title{text-transform:none;font-weight:400}.uk-accordion-content:after,.uk-article:after,.uk-block:after,.uk-clearfix:after,.uk-comment-header:after,.uk-container:after,.uk-datepicker-nav:after,.uk-dotnav:after,.uk-form-row:after,.uk-grid:after,.uk-htmleditor-content:after,.uk-htmleditor-navbar:after,.uk-list>li:after,.uk-navbar:after,.uk-pagination:after,.uk-panel:after,.uk-subnav:after,.uk-tab:after,.uk-thumbnav:after{clear:both}.uk-button-group,.uk-dotnav>*>*,.uk-dropdown-small,.uk-modal-caption,.uk-text-nowrap,.uk-text-truncate{white-space:nowrap}.uk-nestable a,.uk-nestable img,.uk-sortable a,.uk-sortable img{-webkit-touch-callout:none}.uk-nestable-dragged,.uk-nestable-moving iframe,.uk-slider img,.uk-sortable-dragged,.uk-sortable-moving iframe{pointer-events:none}html{font:400 13px/20px "Helvetica Neue",Helvetica,Arial,sans-serif;-webkit-text-size-adjust:100%;-ms-text-size-adjust:100%;background:#fff;color:#444}body{margin:0}a{background:0 0}a:active,a:hover{outline:0}.uk-link,a{color:#337ab7;text-decoration:none;cursor:pointer}.uk-link:hover,a:hover{color:#23527c;text-decoration:underline}.uk-article-title a,.uk-nav li>a,.uk-navbar-nav>li>a,.uk-panel,.uk-panel:hover,ins{text-decoration:none}abbr[title]{border-bottom:1px dotted}b,strong{font-weight:700}:not(pre)>code,:not(pre)>kbd,:not(pre)>samp{font-size:11px;font-family:Consolas,monospace,serif;color:#c7254e;white-space:nowrap;padding:0 4px;border:1px solid #ddd;border-radius:3px;background:#fafafa}em,ins,mark,pre{color:#444}hr,img{border:0}ins{background:#ffa}mark{background:#fcf8e1}q{font-style:italic}small{font-size:80%}sub,sup{font-size:75%;line-height:0}sup{top:-.5em}sub{bottom:-.25em}audio,canvas,iframe,img,svg,video{vertical-align:middle}audio,canvas,img,svg,video{max-width:100%;height:auto;box-sizing:border-box}.uk-img-preserve,.uk-img-preserve audio,.uk-img-preserve canvas,.uk-img-preserve img,.uk-img-preserve svg,.uk-img-preserve video{max-width:none}svg:not(:root){overflow:hidden}address,blockquote,dl,fieldset,figure,ol,p,pre,ul{margin:0 0 15px}*+address,*+blockquote,*+dl,*+fieldset,*+figure,*+ol,*+p,*+pre,*+ul{margin-top:15px}h1,h2,h3,h4,h5,h6{margin:0 0 15px;font-family:"Helvetica Neue",Helvetica,Arial,sans-serif;font-weight:400;color:#444;text-transform:none}*+h1,*+h2,*+h3,*+h4,*+h5,*+h6{margin-top:25px}.uk-h1,h1{font-size:34px;line-height:39px}.uk-h2,h2{font-size:23px;line-height:29px}.uk-h3,h3{font-size:17px;line-height:22px}.uk-h4,h4{font-size:15px;line-height:20px}.uk-h5,h5{font-size:13px;line-height:20px}.uk-h6,h6{font-size:11px;line-height:16px}ol,ul{padding-left:30px}ol>li>ol,ol>li>ul,ul>li>ol,ul>li>ul{margin:0}dt{font-weight:700}dd{margin-left:0}hr{box-sizing:content-box;height:0;margin:15px 0;border-top:1px solid #ddd}address{font-style:normal}blockquote{padding-left:15px;border-left:5px solid #ddd;font-size:15px;line-height:20px;font-style:italic}pre{padding:10px;background:#fafafa;font:11px/16px Consolas,monospace,serif;-moz-tab-size:4;tab-size:4;overflow:auto;border:1px solid #ddd;border-radius:3px}::-moz-selection{background:#337ab7;color:#fff;text-shadow:none}::selection{background:#337ab7;color:#fff;text-shadow:none}article,aside,details,figcaption,figure,footer,header,main,nav,section,summary{display:block}[hidden],audio:not([controls]),template{display:none}iframe{border:0}@media screen and (max-width:400px){@-ms-viewport{width:device-width}}.uk-grid{display:-ms-flexbox;display:-webkit-flex;display:flex;-ms-flex-wrap:wrap;-webkit-flex-wrap:wrap;flex-wrap:wrap;margin:0;padding:0;list-style:none}.uk-grid:after,.uk-grid:before{content:"";display:block;overflow:hidden}.uk-grid>*{-ms-flex:none;-webkit-flex:none;flex:none;margin:0;float:left;padding-left:25px}.uk-grid>*>:last-child{margin-bottom:0}.uk-grid{margin-left:-25px}.uk-grid+.uk-grid,.uk-grid-margin,.uk-grid>*>.uk-panel+.uk-panel{margin-top:25px}@media (min-width:1220px){.uk-grid{margin-left:-35px}.uk-grid>*{padding-left:35px}.uk-grid+.uk-grid,.uk-grid-margin,.uk-grid>*>.uk-panel+.uk-panel{margin-top:35px}}.uk-grid-collapse{margin-left:0}.uk-grid-collapse>*{padding-left:0}.uk-grid-collapse+.uk-grid-collapse,.uk-grid-collapse>*>.uk-panel+.uk-panel,.uk-grid-collapse>.uk-grid-margin{margin-top:0}.uk-grid-small{margin-left:-10px}.uk-grid-small>*{padding-left:10px}.uk-grid-small+.uk-grid-small,.uk-grid-small>*>.uk-panel+.uk-panel,.uk-grid-small>.uk-grid-margin{margin-top:10px}.uk-grid-medium{margin-left:-25px}.uk-grid-medium>*{padding-left:25px}.uk-grid-medium+.uk-grid-medium,.uk-grid-medium>*>.uk-panel+.uk-panel,.uk-grid-medium>.uk-grid-margin{margin-top:25px}@media (min-width:960px){.uk-grid-large{margin-left:-35px}.uk-grid-large>*{padding-left:35px}.uk-grid-large+.uk-grid-large,.uk-grid-large-margin,.uk-grid-large>*>.uk-panel+.uk-panel{margin-top:35px}}@media (min-width:1220px){.uk-grid-large{margin-left:-50px}.uk-grid-large>*{padding-left:50px}.uk-grid-large+.uk-grid-large,.uk-grid-large-margin,.uk-grid-large>*>.uk-panel+.uk-panel{margin-top:50px}}.uk-grid-divider:not(:empty){margin-left:-25px;margin-right:-25px}.uk-grid-divider>*{padding-left:25px;padding-right:25px}.uk-grid-divider>[class*=uk-width-9-]:nth-child(n+2),.uk-grid-divider>[class*=uk-width-1-]:not(.uk-width-1-1):nth-child(n+2),.uk-grid-divider>[class*=uk-width-2-]:nth-child(n+2),.uk-grid-divider>[class*=uk-width-3-]:nth-child(n+2),.uk-grid-divider>[class*=uk-width-4-]:nth-child(n+2),.uk-grid-divider>[class*=uk-width-5-]:nth-child(n+2),.uk-grid-divider>[class*=uk-width-6-]:nth-child(n+2),.uk-grid-divider>[class*=uk-width-7-]:nth-child(n+2),.uk-grid-divider>[class*=uk-width-8-]:nth-child(n+2){border-left:1px solid #ddd}@media (min-width:768px){.uk-grid-divider>[class*=uk-width-medium-]:not(.uk-width-medium-1-1):nth-child(n+2){border-left:1px solid #ddd}}@media (min-width:960px){.uk-grid-divider>[class*=uk-width-large-]:not(.uk-width-large-1-1):nth-child(n+2){border-left:1px solid #ddd}}@media (min-width:1220px){.uk-grid-divider:not(:empty){margin-left:-35px;margin-right:-35px}.uk-grid-divider>*{padding-left:35px;padding-right:35px}.uk-grid-divider:empty{margin-top:35px;margin-bottom:35px}}.uk-grid-divider:empty{margin-top:25px;margin-bottom:25px;border-top:1px solid #ddd}.uk-grid-match>*{display:-ms-flexbox;display:-webkit-flex;display:flex;-ms-flex-wrap:wrap;-webkit-flex-wrap:wrap;flex-wrap:wrap}.uk-grid-match>*>*{-ms-flex:none;-webkit-flex:none;flex:none;box-sizing:border-box;width:100%}[class*=uk-grid-width]>*{box-sizing:border-box;width:100%}.uk-grid-width-1-2>*{width:50%}.uk-grid-width-1-3>*{width:33.333%}.uk-grid-width-1-4>*{width:25%}.uk-grid-width-1-5>*{width:20%}.uk-grid-width-1-6>*{width:16.666%}.uk-grid-width-1-10>*{width:10%}.uk-grid-width-auto>*{width:auto}@media (min-width:480px){.uk-grid-width-small-1-1>*{width:100%}.uk-grid-width-small-1-2>*{width:50%}.uk-grid-width-small-1-3>*{width:33.333%}.uk-grid-width-small-1-4>*{width:25%}.uk-grid-width-small-1-5>*{width:20%}.uk-grid-width-small-1-6>*{width:16.666%}.uk-grid-width-small-1-10>*{width:10%}}@media (min-width:768px){.uk-grid-width-medium-1-1>*{width:100%}.uk-grid-width-medium-1-2>*{width:50%}.uk-grid-width-medium-1-3>*{width:33.333%}.uk-grid-width-medium-1-4>*{width:25%}.uk-grid-width-medium-1-5>*{width:20%}.uk-grid-width-medium-1-6>*{width:16.666%}.uk-grid-width-medium-1-10>*{width:10%}}@media (min-width:960px){.uk-grid-width-large-1-1>*{width:100%}.uk-grid-width-large-1-2>*{width:50%}.uk-grid-width-large-1-3>*{width:33.333%}.uk-grid-width-large-1-4>*{width:25%}.uk-grid-width-large-1-5>*{width:20%}.uk-grid-width-large-1-6>*{width:16.666%}.uk-grid-width-large-1-10>*{width:10%}}@media (min-width:1220px){.uk-grid-width-xlarge-1-1>*{width:100%}.uk-grid-width-xlarge-1-2>*{width:50%}.uk-grid-width-xlarge-1-3>*{width:33.333%}.uk-grid-width-xlarge-1-4>*{width:25%}.uk-grid-width-xlarge-1-5>*{width:20%}.uk-grid-width-xlarge-1-6>*{width:16.666%}.uk-grid-width-xlarge-1-10>*{width:10%}}[class*=uk-width]{box-sizing:border-box;width:100%}.uk-width-1-1{width:100%}.uk-width-1-2,.uk-width-2-4,.uk-width-3-6,.uk-width-5-10{width:50%}.uk-width-1-3,.uk-width-2-6{width:33.333%}.uk-width-2-3,.uk-width-4-6{width:66.666%}.uk-width-1-4{width:25%}.uk-width-3-4{width:75%}.uk-width-1-5,.uk-width-2-10{width:20%}.uk-width-2-5,.uk-width-4-10{width:40%}.uk-width-3-5,.uk-width-6-10{width:60%}.uk-width-4-5,.uk-width-8-10{width:80%}.uk-width-1-6{width:16.666%}.uk-width-5-6{width:83.333%}.uk-width-1-10{width:10%}.uk-width-3-10{width:30%}.uk-width-7-10{width:70%}.uk-width-9-10{width:90%}@media (min-width:480px){.uk-width-small-1-1{width:100%}.uk-width-small-1-2,.uk-width-small-2-4,.uk-width-small-3-6,.uk-width-small-5-10{width:50%}.uk-width-small-1-3,.uk-width-small-2-6{width:33.333%}.uk-width-small-2-3,.uk-width-small-4-6{width:66.666%}.uk-width-small-1-4{width:25%}.uk-width-small-3-4{width:75%}.uk-width-small-1-5,.uk-width-small-2-10{width:20%}.uk-width-small-2-5,.uk-width-small-4-10{width:40%}.uk-width-small-3-5,.uk-width-small-6-10{width:60%}.uk-width-small-4-5,.uk-width-small-8-10{width:80%}.uk-width-small-1-6{width:16.666%}.uk-width-small-5-6{width:83.333%}.uk-width-small-1-10{width:10%}.uk-width-small-3-10{width:30%}.uk-width-small-7-10{width:70%}.uk-width-small-9-10{width:90%}}@media (min-width:768px){.uk-width-medium-1-1{width:100%}.uk-width-medium-1-2,.uk-width-medium-2-4,.uk-width-medium-3-6,.uk-width-medium-5-10{width:50%}.uk-width-medium-1-3,.uk-width-medium-2-6{width:33.333%}.uk-width-medium-2-3,.uk-width-medium-4-6{width:66.666%}.uk-width-medium-1-4{width:25%}.uk-width-medium-3-4{width:75%}.uk-width-medium-1-5,.uk-width-medium-2-10{width:20%}.uk-width-medium-2-5,.uk-width-medium-4-10{width:40%}.uk-width-medium-3-5,.uk-width-medium-6-10{width:60%}.uk-width-medium-4-5,.uk-width-medium-8-10{width:80%}.uk-width-medium-1-6{width:16.666%}.uk-width-medium-5-6{width:83.333%}.uk-width-medium-1-10{width:10%}.uk-width-medium-3-10{width:30%}.uk-width-medium-7-10{width:70%}.uk-width-medium-9-10{width:90%}}@media (min-width:960px){.uk-width-large-1-1{width:100%}.uk-width-large-1-2,.uk-width-large-2-4,.uk-width-large-3-6,.uk-width-large-5-10{width:50%}.uk-width-large-1-3,.uk-width-large-2-6{width:33.333%}.uk-width-large-2-3,.uk-width-large-4-6{width:66.666%}.uk-width-large-1-4{width:25%}.uk-width-large-3-4{width:75%}.uk-width-large-1-5,.uk-width-large-2-10{width:20%}.uk-width-large-2-5,.uk-width-large-4-10{width:40%}.uk-width-large-3-5,.uk-width-large-6-10{width:60%}.uk-width-large-4-5,.uk-width-large-8-10{width:80%}.uk-width-large-1-6{width:16.666%}.uk-width-large-5-6{width:83.333%}.uk-width-large-1-10{width:10%}.uk-width-large-3-10{width:30%}.uk-width-large-7-10{width:70%}.uk-width-large-9-10{width:90%}}@media (min-width:1220px){.uk-width-xlarge-1-1{width:100%}.uk-width-xlarge-1-2,.uk-width-xlarge-2-4,.uk-width-xlarge-3-6,.uk-width-xlarge-5-10{width:50%}.uk-width-xlarge-1-3,.uk-width-xlarge-2-6{width:33.333%}.uk-width-xlarge-2-3,.uk-width-xlarge-4-6{width:66.666%}.uk-width-xlarge-1-4{width:25%}.uk-width-xlarge-3-4{width:75%}.uk-width-xlarge-1-5,.uk-width-xlarge-2-10{width:20%}.uk-width-xlarge-2-5,.uk-width-xlarge-4-10{width:40%}.uk-width-xlarge-3-5,.uk-width-xlarge-6-10{width:60%}.uk-width-xlarge-4-5,.uk-width-xlarge-8-10{width:80%}.uk-width-xlarge-1-6{width:16.666%}.uk-width-xlarge-5-6{width:83.333%}.uk-width-xlarge-1-10{width:10%}.uk-width-xlarge-3-10{width:30%}.uk-width-xlarge-7-10{width:70%}.uk-width-xlarge-9-10{width:90%}}@media (min-width:768px){[class*=uk-push-],[class*=uk-pull-]{position:relative}.uk-push-1-2,.uk-push-2-4,.uk-push-3-6,.uk-push-5-10{left:50%}.uk-push-1-3,.uk-push-2-6{left:33.333%}.uk-push-2-3,.uk-push-4-6{left:66.666%}.uk-push-1-4{left:25%}.uk-push-3-4{left:75%}.uk-push-1-5,.uk-push-2-10{left:20%}.uk-push-2-5,.uk-push-4-10{left:40%}.uk-push-3-5,.uk-push-6-10{left:60%}.uk-push-4-5,.uk-push-8-10{left:80%}.uk-push-1-6{left:16.666%}.uk-push-5-6{left:83.333%}.uk-push-1-10{left:10%}.uk-push-3-10{left:30%}.uk-push-7-10{left:70%}.uk-push-9-10{left:90%}.uk-pull-1-2,.uk-pull-2-4,.uk-pull-3-6,.uk-pull-5-10{left:-50%}.uk-pull-1-3,.uk-pull-2-6{left:-33.333%}.uk-pull-2-3,.uk-pull-4-6{left:-66.666%}.uk-pull-1-4{left:-25%}.uk-pull-3-4{left:-75%}.uk-pull-1-5,.uk-pull-2-10{left:-20%}.uk-pull-2-5,.uk-pull-4-10{left:-40%}.uk-pull-3-5,.uk-pull-6-10{left:-60%}.uk-pull-4-5,.uk-pull-8-10{left:-80%}.uk-pull-1-6{left:-16.666%}.uk-pull-5-6{left:-83.333%}.uk-pull-1-10{left:-10%}.uk-pull-3-10{left:-30%}.uk-pull-7-10{left:-70%}.uk-pull-9-10{left:-90%}}.uk-panel{display:block}.uk-panel:after,.uk-panel:before{content:"";display:table}.uk-panel>:not(.uk-panel-title):last-child{margin-bottom:0}.uk-panel-teaser,.uk-panel-title{margin-bottom:15px}.uk-panel-title{margin-top:0;font-size:17px;line-height:22px;color:#444}.uk-panel-badge{position:absolute;top:0;right:0;z-index:1}.uk-panel-box .uk-panel-badge,.uk-panel-hover .uk-panel-badge{top:10px;right:10px}.uk-panel-body{padding:15px}.uk-panel-box{padding:15px;background:#fafafa;color:#444;border:1px solid #ddd;border-radius:2px}.uk-panel-box .uk-panel-title,.uk-panel-box-hover:hover{color:#444}.uk-panel-box>.uk-panel-teaser{margin-top:-16px;margin-left:-16px;margin-right:-16px}.uk-panel-box>.uk-nav-side{margin:0 -15px}.uk-article>:last-child,.uk-block>:last-child{margin-bottom:0}.uk-panel-box-primary{background-color:#ebf7fd;color:#2d7091;border-color:rgba(45,112,145,.3)}.uk-panel-box-primary .uk-panel-title,.uk-panel-box-primary-hover:hover{color:#2d7091}.uk-panel-box-secondary{background-color:#fff;color:#444}.uk-panel-box-secondary .uk-panel-title,.uk-panel-box-secondary-hover:hover{color:#444}.uk-panel-hover{padding:15px;color:#444;border:1px solid transparent;border-radius:2px}.uk-panel-hover:hover{background:#fafafa;color:#444;border-color:#ddd}.uk-panel-hover>.uk-panel-teaser{margin-top:-16px;margin-left:-16px;margin-right:-16px}.uk-panel-header .uk-panel-title{padding-bottom:10px;border-bottom:1px solid #ddd;color:#444}.uk-panel-space{padding:30px}.uk-panel-space .uk-panel-badge{top:30px;right:30px}.uk-panel+.uk-panel-divider{margin-top:50px!important}.uk-panel+.uk-panel-divider:before{content:"";display:block;position:absolute;top:-25px;left:0;right:0;border-top:1px solid #ddd}.uk-article:after,.uk-article:before,.uk-block:after,.uk-block:before,.uk-comment-header:after,.uk-comment-header:before{content:"";display:table}@media (min-width:1220px){.uk-panel+.uk-panel-divider{margin-top:70px!important}.uk-panel+.uk-panel-divider:before{top:-35px}}.uk-cover-object,[data-uk-cover]{left:50%;top:50%;position:relative}.uk-panel-box .uk-panel-teaser{border-top-left-radius:2px;border-top-right-radius:2px;overflow:hidden;-webkit-transform:translateZ(0)}.uk-block{position:relative;box-sizing:border-box;padding-top:20px;padding-bottom:20px}@media (min-width:768px){.uk-block{padding-top:50px;padding-bottom:50px}}.uk-block-large{padding-top:20px;padding-bottom:20px}@media (min-width:768px){.uk-block-large{padding-top:50px;padding-bottom:50px}}@media (min-width:960px){.uk-block-large{padding-top:100px;padding-bottom:100px}}.uk-block-default{background:#fff}.uk-block-muted{background:#f9f9f9}.uk-block-primary{background:#337ab7}.uk-block-secondary{background:#222}.uk-block-default+.uk-block-default,.uk-block-muted+.uk-block-muted,.uk-block-primary+.uk-block-primary,.uk-block-secondary+.uk-block-secondary{padding-top:0}.uk-article-title{font-size:34px;line-height:39px}.uk-article-title a{color:inherit}.uk-article-meta{font-size:11px;line-height:16px;color:#999}.uk-article-lead{color:#444;font-size:17px;line-height:22px;font-weight:400}.uk-article-divider{margin-bottom:25px;border-color:#ddd}*+.uk-article-divider{margin-top:25px}.uk-article+.uk-article{margin-top:25px;padding-top:25px;border-top:1px solid #ddd}.uk-comment-header{margin-bottom:15px;padding:10px;border:1px solid #ddd;border-radius:2px;background:#fafafa}.uk-comment-avatar{margin-right:15px;float:left}.uk-comment-title{margin:5px 0 0;font-size:15px;line-height:20px}.uk-comment-meta{margin:2px 0 0;font-size:10px;line-height:15px;color:#999}.uk-comment-body{padding-left:10px;padding-right:10px}.uk-comment-body>:last-child{margin-bottom:0}.uk-comment-list{padding:0;list-style:none}.uk-comment-list .uk-comment+ul{margin:25px 0 0;list-style:none}.uk-comment-list .uk-comment+ul>li:nth-child(n+2),.uk-comment-list>li:nth-child(n+2){margin-top:25px}@media (min-width:768px){.uk-comment-list .uk-comment+ul{padding-left:100px}}.uk-comment-primary .uk-comment-header{border-color:rgba(45,112,145,.3);background-color:#d9edf7;color:#2d7091;text-shadow:0 1px 0 #fff}.uk-nav-dropdown .uk-nav-divider,.uk-nav-navbar .uk-nav-divider{border-top:1px solid #ddd}.uk-cover-background{background-position:50% 50%;background-size:cover;background-repeat:no-repeat}.uk-cover{overflow:hidden}.uk-cover-object{width:auto;height:auto;min-width:100%;min-height:100%;max-width:none;-webkit-transform:translate(-50%,-50%);transform:translate(-50%,-50%)}[data-uk-cover]{-webkit-transform:translate(-50%,-50%);transform:translate(-50%,-50%)}.uk-nav,.uk-nav ul{margin:0;padding:0;list-style:none}.uk-nav li>a{display:block}.uk-nav>li>a{padding:5px 15px}.uk-nav ul{padding-left:15px}.uk-nav ul a{padding:2px 0}.uk-nav li>a>div{font-size:11px;line-height:16px}.uk-nav-header{padding:5px 15px;text-transform:uppercase;font-weight:700;font-size:11px}.uk-nav-header:not(:first-child){margin-top:15px}.uk-nav-divider{margin:9px 15px}ul.uk-nav-sub{padding:5px 0 5px 15px}.uk-nav-parent-icon>.uk-parent>a:after{content:"\f104";width:20px;margin-right:-10px;float:right;font-family:FontAwesome;text-align:center}.uk-nav-parent-icon>.uk-parent.uk-open>a:after{content:"\f107"}.uk-nav-side>li>a{color:#444}.uk-nav-side>li>a:focus,.uk-nav-side>li>a:hover{background:rgba(0,0,0,.03);color:#444;outline:0;box-shadow:inset 0 0 1px rgba(0,0,0,.06);text-shadow:0 -1px 0 #fff}.uk-nav-side>li.uk-active>a{background:#337ab7;color:#fff;box-shadow:inset 0 0 5px rgba(0,0,0,.05);text-shadow:0 -1px 0 rgba(0,0,0,.1)}.uk-nav-side .uk-nav-header{color:#444}.uk-nav-side .uk-nav-divider{border-top:1px solid #ddd;box-shadow:0 1px 0 #fff}.uk-nav-side ul a{color:#337ab7}.uk-nav-side ul a:hover{color:#23527c}.uk-nav-dropdown>li>a{color:#444}.uk-nav-dropdown>li>a:focus,.uk-nav-dropdown>li>a:hover{background:#337ab7;color:#fff;outline:0;box-shadow:inset 0 0 5px rgba(0,0,0,.05);text-shadow:0 -1px 0 rgba(0,0,0,.1)}.uk-nav-dropdown .uk-nav-header{color:#999}.uk-nav-dropdown ul a{color:#337ab7}.uk-nav-dropdown ul a:hover{color:#23527c}.uk-nav-navbar>li>a{color:#444}.uk-nav-navbar>li>a:focus,.uk-nav-navbar>li>a:hover{background:#337ab7;color:#fff;outline:0;box-shadow:inset 0 0 5px rgba(0,0,0,.05);text-shadow:0 -1px 0 rgba(0,0,0,.1)}.uk-nav-navbar .uk-nav-header{color:#999}.uk-nav-offcanvas .uk-nav-header,.uk-nav-offcanvas>li>a{border-top:1px solid rgba(0,0,0,.3);text-shadow:0 1px 0 rgba(0,0,0,.5)}.uk-nav-navbar ul a{color:#337ab7}.uk-nav-navbar ul a:hover{color:#23527c}.uk-nav-offcanvas>li>a{color:#ccc;padding:10px 15px;box-shadow:inset 0 1px 0 rgba(255,255,255,.05)}.uk-nav-offcanvas>.uk-open>a,html:not(.uk-touch) .uk-nav-offcanvas>li>a:focus,html:not(.uk-touch) .uk-nav-offcanvas>li>a:hover{background:#404040;color:#fff;outline:0}html .uk-nav.uk-nav-offcanvas>li.uk-active>a{background:#1a1a1a;color:#fff;box-shadow:inset 0 1px 3px rgba(0,0,0,.3)}.uk-nav-offcanvas .uk-nav-header{color:#777;margin-top:0;background:#404040;box-shadow:inset 0 1px 0 rgba(255,255,255,.05)}.uk-nav-offcanvas .uk-nav-divider{border-top:1px solid rgba(255,255,255,.01);margin:0;height:4px;background:rgba(0,0,0,.2);box-shadow:inset 0 1px 3px rgba(0,0,0,.3)}.uk-nav-offcanvas ul a{color:#ccc}html:not(.uk-touch) .uk-nav-offcanvas ul a:hover{color:#fff}.uk-nav-offcanvas{border-bottom:1px solid rgba(0,0,0,.3);box-shadow:0 1px 0 rgba(255,255,255,.05)}.uk-nav-offcanvas .uk-nav-sub{border-top:1px solid rgba(0,0,0,.3);box-shadow:inset 0 1px 0 rgba(255,255,255,.05)}.uk-navbar{background:#f5f5f5;color:#444;border:1px solid rgba(0,0,0,.06);border-radius:2px}.uk-navbar:after,.uk-navbar:before{content:"";display:table}.uk-navbar-nav{margin:0;padding:0;list-style:none;float:left}.uk-navbar-nav>li{float:left;position:relative}.uk-navbar-nav>li>a{display:block;box-sizing:border-box;height:41px;padding:0 15px;line-height:40px;color:#444;font-size:13px;font-family:"Helvetica Neue",Helvetica,Arial,sans-serif;font-weight:400;margin-top:-1px;margin-left:-1px;border:1px solid transparent;border-bottom-width:0;text-shadow:0 1px 0 #fff}.uk-navbar-nav>li.uk-active>a,.uk-navbar-nav>li>a:active{color:#444;border-left-color:rgba(0,0,0,.1);border-right-color:rgba(0,0,0,.1)}.uk-navbar-nav>li>a[href='#']{cursor:text}.uk-navbar-nav>li.uk-open>a,.uk-navbar-nav>li:hover>a,.uk-navbar-nav>li>a:focus{background-color:#fafafa;color:#444;outline:0;position:relative;z-index:1;border-left-color:rgba(0,0,0,.1);border-right-color:rgba(0,0,0,.1);border-top-color:rgba(0,0,0,.1)}.uk-navbar-nav>li>a:active{background-color:#eee;border-top-color:rgba(0,0,0,.2)}.uk-navbar-nav>li.uk-active>a{background-color:#fafafa;border-top-color:rgba(0,0,0,.1)}.uk-navbar-nav .uk-navbar-nav-subtitle{line-height:28px}.uk-navbar-nav-subtitle>div{margin-top:-6.5px;font-size:10px;line-height:12px}.uk-navbar-brand,.uk-navbar-toggle{font-size:17px;text-decoration:none}.uk-navbar-brand,.uk-navbar-content,.uk-navbar-toggle{box-sizing:border-box;display:block;height:41px;padding:0 15px;float:left;margin-top:-1px;text-shadow:0 1px 0 #fff}.uk-navbar-brand:before,.uk-navbar-content:before,.uk-navbar-toggle:before{content:'';display:inline-block;height:100%;vertical-align:middle}.uk-navbar-content+.uk-navbar-content:not(.uk-navbar-center){padding-left:0}.uk-navbar-content>a:not([class]){color:#337ab7}.uk-navbar-content>a:not([class]):hover{color:#23527c}.uk-navbar-brand{color:#444}.uk-navbar-brand:focus,.uk-navbar-brand:hover{color:#444;text-decoration:none;outline:0}.uk-navbar-toggle{color:#444}.uk-navbar-toggle:focus,.uk-navbar-toggle:hover{color:#444;text-decoration:none;outline:0}.uk-navbar-toggle:after{content:"\f0c9";font-family:FontAwesome;vertical-align:middle}.uk-navbar-toggle-alt:after{content:"\f002"}.uk-navbar-center{float:none;text-align:center;max-width:50%;margin-left:auto;margin-right:auto}.uk-navbar-flip{float:right}.uk-navbar-nav:first-child>li:first-child>a{border-top-left-radius:2px;border-bottom-left-radius:2px}.uk-navbar-flip .uk-navbar-nav>li>a{margin-left:0;margin-right:-1px}.uk-navbar-flip .uk-navbar-nav:first-child>li:first-child>a{border-top-left-radius:0;border-bottom-left-radius:0}.uk-navbar-flip .uk-navbar-nav:last-child>li:last-child>a{border-top-right-radius:2px;border-bottom-right-radius:2px}.uk-navbar-attached{border-top-color:transparent;border-left-color:transparent;border-right-color:transparent;border-radius:0}.uk-navbar-attached .uk-navbar-nav>li>a{border-radius:0!important}.uk-subnav{display:-ms-flexbox;display:-webkit-flex;display:flex;-ms-flex-wrap:wrap;-webkit-flex-wrap:wrap;flex-wrap:wrap;margin-left:-10px;margin-top:-10px;padding:0;list-style:none}.uk-subnav>*{-ms-flex:none;-webkit-flex:none;flex:none;padding-left:10px;margin-top:10px;position:relative;float:left}.uk-subnav:after,.uk-subnav:before{content:"";display:block;overflow:hidden}.uk-breadcrumb>li,.uk-breadcrumb>li>a,.uk-breadcrumb>li>span,.uk-subnav-line>:before,.uk-subnav>*>*{display:inline-block}.uk-subnav>*>*{color:#444}.uk-subnav>*>:focus,.uk-subnav>*>:hover{color:#337ab7;text-decoration:none}.uk-subnav>.uk-active>*{color:#337ab7}.uk-subnav-line>:before{content:"";height:10px;vertical-align:middle}.uk-breadcrumb>li,.uk-pagination>li,.uk-table td{vertical-align:top}.uk-subnav-line>:nth-child(n+2):before{margin-right:10px;border-left:1px solid #ddd}.uk-subnav-pill>*>*{padding:3px 9px;border-radius:2px}.uk-subnav-pill>*>:focus,.uk-subnav-pill>*>:hover{background:#fafafa;color:#444;text-decoration:none;outline:0;box-shadow:0 0 0 1px rgba(0,0,0,.15)}.uk-subnav-pill>.uk-active>*{background:#337ab7;color:#fff;box-shadow:inset 0 0 5px rgba(0,0,0,.05)}.uk-subnav>.uk-disabled>*{background:0 0;color:#999;text-decoration:none;cursor:text;box-shadow:none}.uk-breadcrumb{padding:0;list-style:none;font-size:0}.uk-breadcrumb>li{font-size:1rem}.uk-breadcrumb>li:nth-child(n+2):before{content:"/";display:inline-block;margin:0 8px}.uk-breadcrumb>li:not(.uk-active)>span{color:#999}.uk-pagination{padding:0;list-style:none;text-align:center;font-size:0}.uk-pagination:after,.uk-pagination:before{content:"";display:table}.uk-pagination>li{display:inline-block;font-size:1rem}.uk-pagination>li:nth-child(n+2){margin-left:5px}.uk-pagination>li>a,.uk-pagination>li>span{display:inline-block;min-width:16px;padding:3px 5px;line-height:20px;text-decoration:none;box-sizing:content-box;text-align:center;border:1px solid rgba(0,0,0,.06);border-radius:2px}.uk-pagination>li>a{background:#f5f5f5;color:#444;text-shadow:0 1px 0 #fff}.uk-pagination>li>a:focus,.uk-pagination>li>a:hover{background-color:#fafafa;color:#444;outline:0;border-color:rgba(0,0,0,.16)}.uk-pagination>li>a:active{background-color:#eee;color:#444}.uk-pagination>.uk-active>span{background:#337ab7;color:#fff;border-color:transparent;box-shadow:inset 0 0 5px rgba(0,0,0,.05);text-shadow:0 -1px 0 rgba(0,0,0,.1)}.uk-pagination>.uk-disabled>span{background-color:#fafafa;color:#999;border:1px solid rgba(0,0,0,.06);text-shadow:0 1px 0 #fff}.uk-pagination-previous{float:left}.uk-pagination-next{float:right}.uk-pagination-left{text-align:left}.uk-pagination-right{text-align:right}.uk-tab-center .uk-tab>li>a,.uk-tab-center .uk-tab>li>button,.uk-tab-grid>li>a,.uk-tab-grid>li>button{text-align:center}.uk-tab{margin:0;padding:0;list-style:none;border-bottom:1px solid #ddd}.uk-tab:after,.uk-tab:before{content:"";display:table}.uk-tab>li{margin-bottom:-1px;float:left;position:relative}.uk-alert>.uk-close:first-child,.uk-tab-center .uk-tab,.uk-tab-flip>li{float:right}.uk-tab>li>a,.uk-tab>li>button{display:block;padding:8px 12px;border:1px solid transparent;border-bottom-width:0;color:#337ab7;text-decoration:none;border-radius:2px 2px 0 0;text-shadow:0 1px 0 #fff}.uk-tab>li:nth-child(n+2)>a,.uk-tab>li:nth-child(n+2)>button{margin-left:5px}.uk-tab>li.uk-open>a,.uk-tab>li.uk-open>button,.uk-tab>li>a:focus,.uk-tab>li>a:hover,.uk-tab>li>button:focus,.uk-tab>li>button:hover{border-color:rgba(0,0,0,.06);background:#f5f5f5;color:#23527c;outline:0}.uk-tab>li.uk-open:not(.uk-active)>a,.uk-tab>li.uk-open:not(.uk-active)>button,.uk-tab>li:not(.uk-active)>a:focus,.uk-tab>li:not(.uk-active)>a:hover,.uk-tab>li:not(.uk-active)>button:focus,.uk-tab>li:not(.uk-active)>button:hover{margin-bottom:1px;padding-bottom:7px}.uk-tab>li.uk-active>a,.uk-tab>li.uk-active>button{border-color:#ddd #ddd transparent;background:#fff;color:#444}.uk-tab>li.uk-disabled>a,.uk-tab>li.uk-disabled>button{color:#999;cursor:text}.uk-tab>li.uk-disabled.uk-active>a,.uk-tab>li.uk-disabled.uk-active>button,.uk-tab>li.uk-disabled>a:focus,.uk-tab>li.uk-disabled>a:hover,.uk-tab>li.uk-disabled>button:focus,.uk-tab>li.uk-disabled>button:hover{background:0 0;border-color:transparent}.uk-tab-flip>li:nth-child(n+2)>a,.uk-tab-flip>li:nth-child(n+2)>button{margin-left:0;margin-right:5px}.uk-tab>li.uk-tab-responsive>a,.uk-tab>li.uk-tab-responsive>button{margin-left:0;margin-right:0}.uk-tab-responsive>a:before,.uk-tab-responsive>button:before{content:"\f0c9\00a0";font-family:FontAwesome}.uk-tab-center{border-bottom:1px solid #ddd}.uk-tab-center-bottom{border-bottom:none;border-top:1px solid #ddd}.uk-tab-center:after,.uk-tab-center:before{content:"";display:table}.uk-tab-center:after{clear:both}.uk-tab-center .uk-tab{position:relative;right:50%;border:none}.uk-tab-center .uk-tab>li{position:relative;right:-50%}.uk-tab-bottom{border-top:1px solid #ddd;border-bottom:none}.uk-tab-bottom>li{margin-top:-1px;margin-bottom:0}.uk-tab-bottom>li>a,.uk-tab-bottom>li>button{padding-top:8px;padding-bottom:8px;border-bottom-width:1px;border-top-width:0}.uk-tab-bottom>li.uk-open:not(.uk-active)>a,.uk-tab-bottom>li.uk-open:not(.uk-active)>button,.uk-tab-bottom>li:not(.uk-active)>a:focus,.uk-tab-bottom>li:not(.uk-active)>a:hover,.uk-tab-bottom>li:not(.uk-active)>button:focus,.uk-tab-bottom>li:not(.uk-active)>button:hover{margin-bottom:0;margin-top:1px;padding-bottom:8px;padding-top:7px}.uk-tab-bottom>li.uk-active>a,.uk-tab-bottom>li.uk-active>button{border-top-color:transparent;border-bottom-color:#ddd}.uk-tab-grid{margin-left:-5px;border-bottom:none;position:relative;z-index:0}.uk-tab-grid:before{display:block;position:absolute;left:5px;right:0;bottom:-1px;border-top:1px solid #ddd;z-index:-1}.uk-tab-grid>li:first-child>a,.uk-tab-grid>li:first-child>button{margin-left:5px}.uk-tab-grid.uk-tab-bottom{border-top:none}.uk-tab-grid.uk-tab-bottom:before{top:-1px;bottom:auto}@media (min-width:768px){.uk-tab-left,.uk-tab-right{border-bottom:none}.uk-tab-left>li,.uk-tab-right>li{margin-bottom:0;float:none}.uk-tab-left>li>a,.uk-tab-right>li>a{padding-top:8px;padding-bottom:8px}.uk-tab-left>li:nth-child(n+2)>a,.uk-tab-right>li:nth-child(n+2)>a{margin-left:0;margin-top:5px}.uk-tab-left>li.uk-active>a,.uk-tab-right>li.uk-active>a{border-color:#ddd}.uk-tab-left{border-right:1px solid #ddd}.uk-tab-left>li{margin-right:-1px}.uk-tab-left>li>a{border-bottom-width:1px;border-right-width:0}.uk-tab-left>li:not(.uk-active)>a:focus,.uk-tab-left>li:not(.uk-active)>a:hover{margin-bottom:0;margin-right:1px;padding-bottom:8px;padding-right:11px}.uk-tab-left>li.uk-active>a{border-right-color:transparent}.uk-tab-right{border-left:1px solid #ddd}.uk-tab-right>li{margin-left:-1px}.uk-tab-right>li>a{border-bottom-width:1px;border-left-width:0}.uk-tab-right>li:not(.uk-active)>a:focus,.uk-tab-right>li:not(.uk-active)>a:hover{margin-bottom:0;margin-left:1px;padding-bottom:8px;padding-left:11px}.uk-tab-right>li.uk-active>a{border-left-color:transparent}}.uk-tab-bottom>li>a{border-radius:0 0 2px 2px}@media (min-width:768px){.uk-tab-left>li>a{border-radius:2px 0 0 2px}.uk-tab-right>li>a{border-radius:0 2px 2px 0}}.uk-thumbnav{display:-ms-flexbox;display:-webkit-flex;display:flex;-ms-flex-wrap:wrap;-webkit-flex-wrap:wrap;flex-wrap:wrap;margin-left:-10px;margin-top:-10px;padding:0;list-style:none}.uk-thumbnav>*{-ms-flex:none;-webkit-flex:none;flex:none;padding-left:10px;margin-top:10px;float:left}.uk-thumbnav:after,.uk-thumbnav:before{content:"";display:block;overflow:hidden}.uk-thumbnav>*>*{display:block;background:#fff}.uk-thumbnav>*>*>img{opacity:.7;-webkit-transition:opacity .15s linear;transition:opacity .15s linear}.uk-thumbnav>*>:focus>img,.uk-thumbnav>*>:hover>img,.uk-thumbnav>.uk-active>*>img{opacity:1}.uk-list{padding:0;list-style:none}.uk-list>li:after,.uk-list>li:before{content:"";display:table}.uk-list>li>:last-child{margin-bottom:0}.uk-list ul{margin:0;padding-left:20px;list-style:none}.uk-list-line>li:nth-child(n+2){margin-top:5px;padding-top:5px;border-top:1px solid #ddd}.uk-list-striped>li{padding:5px;border-bottom:1px solid #ddd}.uk-list-striped>li:nth-of-type(odd){background:#fafafa}.uk-list-space>li:nth-child(n+2){margin-top:10px}.uk-list-striped>li:first-child{border-top:1px solid #ddd}@media (min-width:768px){.uk-description-list-horizontal{overflow:hidden}.uk-description-list-horizontal>dt{width:160px;float:left;clear:both;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}.uk-description-list-horizontal>dd{margin-left:180px}}.uk-description-list-line>dt{font-weight:400}.uk-description-list-line>dt:nth-child(n+2){margin-top:5px;padding-top:5px;border-top:1px solid #ddd}.uk-description-list-line>dd{color:#999}.uk-table{border-collapse:collapse;border-spacing:0;width:100%;margin-bottom:15px}*+.uk-table{margin-top:15px}.uk-table td,.uk-table th{padding:8px;border-bottom:1px solid #ddd}.uk-table th{text-align:left}.uk-table thead th{vertical-align:bottom}.uk-table caption,.uk-table tfoot{font-size:11px;font-style:italic}.uk-table caption{text-align:left;color:#999}.uk-table tbody tr.uk-active{background:#f0f0f0}.uk-table-middle,.uk-table-middle td{vertical-align:middle!important}.uk-table-striped tbody tr:nth-of-type(odd){background:#fafafa}.uk-table-condensed td{padding:4px 8px}.uk-table-hover tbody tr:hover{background:#f0f0f0}.uk-form input,.uk-form select,.uk-form textarea{box-sizing:border-box;margin:0;border-radius:0;font:inherit;color:inherit}.uk-form select{text-transform:none}.uk-form optgroup{font:inherit;font-weight:700}.uk-form input::-moz-focus-inner{border:0;padding:0}.uk-form input[type=checkbox],.uk-form input[type=radio]{padding:0}.uk-form input[type=checkbox]:not(:disabled),.uk-form input[type=radio]:not(:disabled){cursor:pointer}.uk-form input:not([type]),.uk-form input[type=text],.uk-form input[type=password],.uk-form input[type=email],.uk-form input[type=url],.uk-form input[type=search],.uk-form input[type=tel],.uk-form input[type=number],.uk-form input[type=datetime],.uk-form textarea{-webkit-appearance:none}.uk-form input[type=search]::-webkit-search-cancel-button,.uk-form input[type=search]::-webkit-search-decoration{-webkit-appearance:none}.uk-form input[type=number]::-webkit-inner-spin-button,.uk-form input[type=number]::-webkit-outer-spin-button{height:auto}.uk-form fieldset{border:none;margin:0;padding:0}.uk-form textarea{overflow:auto;vertical-align:top}.uk-button,.uk-button-group,.uk-form input:not([type=radio]):not([type=checkbox]),.uk-form select{vertical-align:middle}.uk-form :invalid{box-shadow:none}.uk-form>:last-child{margin-bottom:0}.uk-form input:not([type]),.uk-form input[type=text],.uk-form input[type=password],.uk-form input[type=email],.uk-form input[type=url],.uk-form input[type=search],.uk-form input[type=tel],.uk-form input[type=number],.uk-form input[type=datetime],.uk-form input[type=datetime-local],.uk-form input[type=date],.uk-form input[type=month],.uk-form input[type=time],.uk-form input[type=week],.uk-form input[type=color],.uk-form select,.uk-form textarea{height:32px;max-width:100%;padding:2px 3px;border:1px solid #ddd;background:#fff;color:#444;-webkit-transition:all .2s linear;-webkit-transition-property:border,background,color,box-shadow,padding;transition:all .2s linear;transition-property:border,background,color,box-shadow,padding;border-radius:2px}.uk-form input:not([type]):focus,.uk-form input[type=text]:focus,.uk-form input[type=password]:focus,.uk-form input[type=email]:focus,.uk-form input[type=url]:focus,.uk-form input[type=search]:focus,.uk-form input[type=tel]:focus,.uk-form input[type=number]:focus,.uk-form input[type=datetime]:focus,.uk-form input[type=datetime-local]:focus,.uk-form input[type=date]:focus,.uk-form input[type=month]:focus,.uk-form input[type=time]:focus,.uk-form input[type=week]:focus,.uk-form input[type=color]:focus,.uk-form select:focus,.uk-form textarea:focus{border-color:#66afe9;outline:0;background:#f5fbfe;color:#444}.uk-form input:not([type]):disabled,.uk-form input[type=text]:disabled,.uk-form input[type=password]:disabled,.uk-form input[type=email]:disabled,.uk-form input[type=url]:disabled,.uk-form input[type=search]:disabled,.uk-form input[type=tel]:disabled,.uk-form input[type=number]:disabled,.uk-form input[type=datetime]:disabled,.uk-form input[type=datetime-local]:disabled,.uk-form input[type=date]:disabled,.uk-form input[type=month]:disabled,.uk-form input[type=time]:disabled,.uk-form input[type=week]:disabled,.uk-form input[type=color]:disabled,.uk-form select:disabled,.uk-form textarea:disabled{border-color:#ddd;background-color:#fafafa;color:#999}.uk-form :-ms-input-placeholder{color:#999!important}.uk-form ::-moz-placeholder{opacity:1;color:#999}.uk-form ::-webkit-input-placeholder{color:#999}.uk-form :disabled:-ms-input-placeholder{color:#999!important}.uk-form :disabled::-moz-placeholder{color:#999}.uk-form :disabled::-webkit-input-placeholder{color:#999}.uk-form legend{width:100%;border:0;padding:0 0 15px;font-size:17px;line-height:29px}.uk-form legend:after{content:"";display:block;border-bottom:1px solid #ddd;width:100%}input:not([type]).uk-form-small,input[type].uk-form-small,select.uk-form-small,textarea.uk-form-small{height:20px;padding:2px;font-size:11px}input:not([type]).uk-form-large,input[type].uk-form-large,select.uk-form-large,textarea.uk-form-large{height:32px;padding:4px 3px;font-size:15px}.uk-form select[multiple],.uk-form select[size],.uk-form textarea{height:auto}.uk-form-danger{border-color:#a94442!important;background:#fff7f8!important;color:#d9534f!important}.uk-form-success{border-color:#3c763d!important;background:#fafff2!important;color:#5cb85c!important}.uk-form-blank{border-color:transparent!important;border-style:dashed!important;background:0 0!important}.uk-form-blank:focus{border-color:#ddd!important}input.uk-form-width-mini{width:40px}select.uk-form-width-mini{width:65px}.uk-form-width-small{width:130px}.uk-form-width-medium{width:200px}.uk-form-width-large{width:500px}.uk-form-row:after,.uk-form-row:before{content:"";display:table}.uk-form-row+.uk-form-row{margin-top:15px}.uk-form-help-inline{display:inline-block;margin:0 0 0 10px}.uk-form-help-block{margin:5px 0 0}.uk-form-controls>:first-child{margin-top:0}.uk-form-controls>:last-child{margin-bottom:0}.uk-form-controls-condensed{margin:5px 0}.uk-form-stacked .uk-form-label{display:block;margin-bottom:5px;font-weight:700}@media (max-width:959px){.uk-form-horizontal .uk-form-label{display:block;margin-bottom:5px;font-weight:700}}@media (min-width:960px){.uk-form-horizontal .uk-form-label{width:200px;margin-top:5px;float:left}.uk-form-horizontal .uk-form-controls{margin-left:215px}.uk-form-horizontal .uk-form-controls-text{padding-top:5px}}.uk-form-icon{display:inline-block;position:relative;max-width:100%}.uk-form-icon>[class*=uk-icon-]{position:absolute;top:50%;width:30px;margin-top:-7px;font-size:13px;color:#999;text-align:center;pointer-events:none}.uk-button-group,.uk-button-group .uk-button.uk-active,.uk-button-group .uk-button:active,.uk-button-group .uk-button:hover,.uk-overlay{position:relative}.uk-button,.uk-close{margin:0;overflow:visible;display:inline-block;text-transform:none;text-align:center;-webkit-appearance:none}.uk-form-icon:not(.uk-form-icon-flip)>input{padding-left:30px!important}.uk-form-icon-flip>[class*=uk-icon-]{right:0}.uk-form-icon-flip>input{padding-right:30px!important}.uk-button::-moz-focus-inner{border:0;padding:0}.uk-button{border:none;font:inherit;color:#444;box-sizing:border-box;padding:0 12px;background:#f5f5f5;line-height:30px;min-height:32px;font-size:1rem;text-decoration:none;border:1px solid rgba(0,0,0,.06);border-radius:2px;text-shadow:0 1px 0 #fff}.uk-button:not(:disabled){cursor:pointer}.uk-button:focus,.uk-button:hover{background-color:#fafafa;color:#444;outline:0;text-decoration:none;border-color:rgba(0,0,0,.16)}.uk-button.uk-active,.uk-button:active{background-color:#eee;color:#444}.uk-button-primary{background-color:#337ab7;color:#fff}.uk-button-primary:focus,.uk-button-primary:hover{background-color:#286090;color:#fff}.uk-button-primary.uk-active,.uk-button-primary:active{background-color:#0091ca;color:#fff}.uk-button-success{background-color:#5cb85c;color:#fff}.uk-button-success:focus,.uk-button-success:hover{background-color:#449d44;color:#fff}.uk-button-success.uk-active,.uk-button-success:active{background-color:#72ae41;color:#fff}.uk-button-danger{background-color:#d9534f;color:#fff}.uk-button-danger:focus,.uk-button-danger:hover{background-color:#c9302c;color:#fff}.uk-button-danger.uk-active,.uk-button-danger:active{background-color:#c91032;color:#fff}.uk-button:disabled{background-color:#fafafa;color:#999;border-color:rgba(0,0,0,.06);box-shadow:none;text-shadow:0 1px 0 #fff}.uk-button-link,.uk-button-link.uk-active,.uk-button-link:active,.uk-button-link:disabled,.uk-button-link:focus,.uk-button-link:hover{border-color:transparent;background:0 0;box-shadow:none;text-shadow:none}.uk-button-link{color:#337ab7}.uk-button-link.uk-active,.uk-button-link:active,.uk-button-link:focus,.uk-button-link:hover{color:#23527c;text-decoration:underline}.uk-button-link:disabled,.uk-icon-hover{color:#999}.uk-button-link:focus{outline:dotted 1px}.uk-button-mini{min-height:18px;padding:0 6px;line-height:16px;font-size:10px}.uk-button-small{min-height:20px;padding:0 10px;line-height:18px;font-size:11px}.uk-button-large{min-height:32px;padding:0 15px;line-height:30px;font-size:15px;border-radius:3px}.uk-button-group{display:inline-block;font-size:0}.uk-button-group>*{display:inline-block}.uk-button-group .uk-button{vertical-align:top}.uk-badge,.uk-button-dropdown,.uk-close,.uk-overlay,.uk-overlay-area-content{vertical-align:middle}.uk-button-dropdown{display:inline-block;position:relative}.uk-button-danger,.uk-button-primary,.uk-button-success{box-shadow:inset 0 0 5px rgba(0,0,0,.05);text-shadow:0 -1px 0 rgba(0,0,0,.1)}.uk-button-danger:focus,.uk-button-danger:hover,.uk-button-primary:focus,.uk-button-primary:hover,.uk-button-success:focus,.uk-button-success:hover{border-color:rgba(0,0,0,.21)}.uk-button-group>.uk-button:not(:first-child):not(:last-child),.uk-button-group>div:not(:first-child):not(:last-child) .uk-button{border-left-color:rgba(0,0,0,.1);border-right-color:rgba(0,0,0,.1);border-radius:0}.uk-button-group>.uk-button:first-child,.uk-button-group>div:first-child .uk-button{border-right-color:rgba(0,0,0,.1);border-top-right-radius:0;border-bottom-right-radius:0}.uk-button-group>.uk-button:last-child,.uk-button-group>div:last-child .uk-button{border-left-color:rgba(0,0,0,.1);border-top-left-radius:0;border-bottom-left-radius:0}.uk-button-group>.uk-button:nth-child(n+2),.uk-button-group>div:nth-child(n+2) .uk-button{margin-left:-1px}@font-face{font-family:FontAwesome;src:url(../fonts/fontawesome-webfont.woff) format("woff");font-weight:400;font-style:normal}[class*=uk-icon-]{font-family:FontAwesome;display:inline-block;font-weight:400;font-style:normal;line-height:1;-webkit-font-smoothing:antialiased;-moz-osx-font-smoothing:grayscale}[class*=uk-icon-],[class*=uk-icon-]:focus,[class*=uk-icon-]:hover{text-decoration:none}.uk-icon-small{font-size:150%;vertical-align:-10%}.uk-icon-medium{font-size:200%;vertical-align:-16%}.uk-icon-large{font-size:250%;vertical-align:-22%}.uk-icon-justify{width:1em;text-align:center}.uk-icon-spin{display:inline-block;-webkit-animation:uk-rotate 2s infinite linear;animation:uk-rotate 2s infinite linear}.uk-icon-hover:hover{color:#444}.uk-icon-button{box-sizing:border-box;display:inline-block;width:35px;height:35px;border-radius:100%;background:#f5f5f5;line-height:35px;color:#444;font-size:18px;text-align:center;border:1px solid #e7e7e7;text-shadow:0 1px 0 #fff}.uk-icon-button:focus,.uk-icon-button:hover{background-color:#fafafa;color:#444;outline:0;border-color:#d3d3d3}.uk-icon-button:active{background-color:#eee;color:#444}.uk-icon-glass:before{content:"\f000"}.uk-icon-music:before{content:"\f001"}.uk-icon-search:before{content:"\f002"}.uk-icon-envelope-o:before{content:"\f003"}.uk-icon-heart:before{content:"\f004"}.uk-icon-star:before{content:"\f005"}.uk-icon-star-o:before{content:"\f006"}.uk-icon-user:before{content:"\f007"}.uk-icon-film:before{content:"\f008"}.uk-icon-th-large:before{content:"\f009"}.uk-icon-th:before{content:"\f00a"}.uk-icon-th-list:before{content:"\f00b"}.uk-icon-check:before{content:"\f00c"}.uk-close:after,.uk-icon-close:before,.uk-icon-remove:before,.uk-icon-times:before{content:"\f00d"}.uk-icon-search-plus:before{content:"\f00e"}.uk-icon-search-minus:before{content:"\f010"}.uk-icon-power-off:before{content:"\f011"}.uk-icon-signal:before{content:"\f012"}.uk-icon-cog:before,.uk-icon-gear:before{content:"\f013"}.uk-icon-trash-o:before{content:"\f014"}.uk-icon-home:before{content:"\f015"}.uk-icon-file-o:before{content:"\f016"}.uk-icon-clock-o:before{content:"\f017"}.uk-icon-road:before{content:"\f018"}.uk-icon-download:before{content:"\f019"}.uk-icon-arrow-circle-o-down:before{content:"\f01a"}.uk-icon-arrow-circle-o-up:before{content:"\f01b"}.uk-icon-inbox:before{content:"\f01c"}.uk-icon-play-circle-o:before{content:"\f01d"}.uk-icon-repeat:before,.uk-icon-rotate-right:before{content:"\f01e"}.uk-icon-refresh:before{content:"\f021"}.uk-icon-list-alt:before{content:"\f022"}.uk-icon-lock:before{content:"\f023"}.uk-icon-flag:before{content:"\f024"}.uk-icon-headphones:before{content:"\f025"}.uk-icon-volume-off:before{content:"\f026"}.uk-icon-volume-down:before{content:"\f027"}.uk-icon-volume-up:before{content:"\f028"}.uk-icon-qrcode:before{content:"\f029"}.uk-icon-barcode:before{content:"\f02a"}.uk-icon-tag:before{content:"\f02b"}.uk-icon-tags:before{content:"\f02c"}.uk-icon-book:before{content:"\f02d"}.uk-icon-bookmark:before{content:"\f02e"}.uk-icon-print:before{content:"\f02f"}.uk-icon-camera:before{content:"\f030"}.uk-icon-font:before{content:"\f031"}.uk-icon-bold:before{content:"\f032"}.uk-icon-italic:before{content:"\f033"}.uk-icon-text-height:before{content:"\f034"}.uk-icon-text-width:before{content:"\f035"}.uk-icon-align-left:before{content:"\f036"}.uk-icon-align-center:before{content:"\f037"}.uk-icon-align-right:before{content:"\f038"}.uk-icon-align-justify:before{content:"\f039"}.uk-icon-list:before{content:"\f03a"}.uk-icon-dedent:before,.uk-icon-outdent:before{content:"\f03b"}.uk-icon-indent:before{content:"\f03c"}.uk-icon-video-camera:before{content:"\f03d"}.uk-icon-image:before,.uk-icon-photo:before,.uk-icon-picture-o:before{content:"\f03e"}.uk-icon-pencil:before{content:"\f040"}.uk-icon-map-marker:before{content:"\f041"}.uk-icon-adjust:before{content:"\f042"}.uk-icon-tint:before{content:"\f043"}.uk-icon-edit:before,.uk-icon-pencil-square-o:before{content:"\f044"}.uk-icon-share-square-o:before{content:"\f045"}.uk-icon-check-square-o:before{content:"\f046"}.uk-icon-arrows:before{content:"\f047"}.uk-icon-step-backward:before{content:"\f048"}.uk-icon-fast-backward:before{content:"\f049"}.uk-icon-backward:before{content:"\f04a"}.uk-icon-play:before{content:"\f04b"}.uk-icon-pause:before{content:"\f04c"}.uk-icon-stop:before{content:"\f04d"}.uk-icon-forward:before{content:"\f04e"}.uk-icon-fast-forward:before{content:"\f050"}.uk-icon-step-forward:before{content:"\f051"}.uk-icon-eject:before{content:"\f052"}.uk-icon-chevron-left:before{content:"\f053"}.uk-icon-chevron-right:before{content:"\f054"}.uk-icon-plus-circle:before{content:"\f055"}.uk-icon-minus-circle:before{content:"\f056"}.uk-icon-times-circle:before{content:"\f057"}.uk-icon-check-circle:before{content:"\f058"}.uk-icon-question-circle:before{content:"\f059"}.uk-icon-info-circle:before{content:"\f05a"}.uk-icon-crosshairs:before{content:"\f05b"}.uk-icon-times-circle-o:before{content:"\f05c"}.uk-icon-check-circle-o:before{content:"\f05d"}.uk-icon-ban:before{content:"\f05e"}.uk-icon-arrow-left:before{content:"\f060"}.uk-icon-arrow-right:before{content:"\f061"}.uk-icon-arrow-up:before{content:"\f062"}.uk-icon-arrow-down:before{content:"\f063"}.uk-icon-mail-forward:before,.uk-icon-share:before{content:"\f064"}.uk-icon-expand:before{content:"\f065"}.uk-icon-compress:before{content:"\f066"}.uk-icon-plus:before{content:"\f067"}.uk-icon-minus:before{content:"\f068"}.uk-icon-asterisk:before{content:"\f069"}.uk-icon-exclamation-circle:before{content:"\f06a"}.uk-icon-gift:before{content:"\f06b"}.uk-icon-leaf:before{content:"\f06c"}.uk-icon-fire:before{content:"\f06d"}.uk-icon-eye:before{content:"\f06e"}.uk-icon-eye-slash:before{content:"\f070"}.uk-icon-exclamation-triangle:before,.uk-icon-warning:before{content:"\f071"}.uk-icon-plane:before{content:"\f072"}.uk-icon-calendar:before{content:"\f073"}.uk-icon-random:before{content:"\f074"}.uk-icon-comment:before{content:"\f075"}.uk-icon-magnet:before{content:"\f076"}.uk-icon-chevron-up:before{content:"\f077"}.uk-icon-chevron-down:before{content:"\f078"}.uk-icon-retweet:before{content:"\f079"}.uk-icon-shopping-cart:before{content:"\f07a"}.uk-icon-folder:before{content:"\f07b"}.uk-icon-folder-open:before{content:"\f07c"}.uk-icon-arrows-v:before{content:"\f07d"}.uk-icon-arrows-h:before{content:"\f07e"}.uk-icon-bar-chart-o:before,.uk-icon-bar-chart:before{content:"\f080"}.uk-icon-twitter-square:before{content:"\f081"}.uk-icon-facebook-square:before{content:"\f082"}.uk-icon-camera-retro:before{content:"\f083"}.uk-icon-key:before{content:"\f084"}.uk-icon-cogs:before,.uk-icon-gears:before{content:"\f085"}.uk-icon-comments:before{content:"\f086"}.uk-icon-thumbs-o-up:before{content:"\f087"}.uk-icon-thumbs-o-down:before{content:"\f088"}.uk-icon-star-half:before{content:"\f089"}.uk-icon-heart-o:before{content:"\f08a"}.uk-icon-sign-out:before{content:"\f08b"}.uk-icon-linkedin-square:before{content:"\f08c"}.uk-icon-thumb-tack:before{content:"\f08d"}.uk-icon-external-link:before{content:"\f08e"}.uk-icon-sign-in:before{content:"\f090"}.uk-icon-trophy:before{content:"\f091"}.uk-icon-github-square:before{content:"\f092"}.uk-icon-upload:before{content:"\f093"}.uk-icon-lemon-o:before{content:"\f094"}.uk-icon-phone:before{content:"\f095"}.uk-icon-square-o:before{content:"\f096"}.uk-icon-bookmark-o:before{content:"\f097"}.uk-icon-phone-square:before{content:"\f098"}.uk-icon-twitter:before{content:"\f099"}.uk-icon-facebook-f:before,.uk-icon-facebook:before{content:"\f09a"}.uk-icon-github:before{content:"\f09b"}.uk-icon-unlock:before{content:"\f09c"}.uk-icon-credit-card:before{content:"\f09d"}.uk-icon-rss:before{content:"\f09e"}.uk-icon-hdd-o:before{content:"\f0a0"}.uk-icon-bullhorn:before{content:"\f0a1"}.uk-icon-bell:before{content:"\f0f3"}.uk-icon-certificate:before{content:"\f0a3"}.uk-icon-hand-o-right:before{content:"\f0a4"}.uk-icon-hand-o-left:before{content:"\f0a5"}.uk-icon-hand-o-up:before{content:"\f0a6"}.uk-icon-hand-o-down:before{content:"\f0a7"}.uk-icon-arrow-circle-left:before{content:"\f0a8"}.uk-icon-arrow-circle-right:before{content:"\f0a9"}.uk-icon-arrow-circle-up:before{content:"\f0aa"}.uk-icon-arrow-circle-down:before{content:"\f0ab"}.uk-icon-globe:before{content:"\f0ac"}.uk-icon-wrench:before{content:"\f0ad"}.uk-icon-tasks:before{content:"\f0ae"}.uk-icon-filter:before{content:"\f0b0"}.uk-icon-briefcase:before{content:"\f0b1"}.uk-icon-arrows-alt:before{content:"\f0b2"}.uk-icon-group:before,.uk-icon-users:before{content:"\f0c0"}.uk-icon-chain:before,.uk-icon-link:before{content:"\f0c1"}.uk-icon-cloud:before{content:"\f0c2"}.uk-icon-flask:before{content:"\f0c3"}.uk-icon-cut:before,.uk-icon-scissors:before{content:"\f0c4"}.uk-icon-copy:before,.uk-icon-files-o:before{content:"\f0c5"}.uk-icon-paperclip:before{content:"\f0c6"}.uk-icon-floppy-o:before,.uk-icon-save:before{content:"\f0c7"}.uk-icon-square:before{content:"\f0c8"}.uk-icon-bars:before,.uk-icon-navicon:before,.uk-icon-reorder:before{content:"\f0c9"}.uk-icon-list-ul:before{content:"\f0ca"}.uk-icon-list-ol:before{content:"\f0cb"}.uk-icon-strikethrough:before{content:"\f0cc"}.uk-icon-underline:before{content:"\f0cd"}.uk-icon-table:before{content:"\f0ce"}.uk-icon-magic:before{content:"\f0d0"}.uk-icon-truck:before{content:"\f0d1"}.uk-icon-pinterest:before{content:"\f0d2"}.uk-icon-pinterest-square:before{content:"\f0d3"}.uk-icon-google-plus-square:before{content:"\f0d4"}.uk-icon-google-plus:before{content:"\f0d5"}.uk-icon-money:before{content:"\f0d6"}.uk-icon-caret-down:before{content:"\f0d7"}.uk-icon-caret-up:before{content:"\f0d8"}.uk-icon-caret-left:before{content:"\f0d9"}.uk-icon-caret-right:before{content:"\f0da"}.uk-icon-columns:before{content:"\f0db"}.uk-icon-sort:before,.uk-icon-unsorted:before{content:"\f0dc"}.uk-icon-sort-desc:before,.uk-icon-sort-down:before{content:"\f0dd"}.uk-icon-sort-asc:before,.uk-icon-sort-up:before{content:"\f0de"}.uk-icon-envelope:before{content:"\f0e0"}.uk-icon-linkedin:before{content:"\f0e1"}.uk-icon-rotate-left:before,.uk-icon-undo:before{content:"\f0e2"}.uk-icon-gavel:before,.uk-icon-legal:before{content:"\f0e3"}.uk-icon-dashboard:before,.uk-icon-tachometer:before{content:"\f0e4"}.uk-icon-comment-o:before{content:"\f0e5"}.uk-icon-comments-o:before{content:"\f0e6"}.uk-icon-bolt:before,.uk-icon-flash:before{content:"\f0e7"}.uk-icon-sitemap:before{content:"\f0e8"}.uk-icon-umbrella:before{content:"\f0e9"}.uk-icon-clipboard:before,.uk-icon-paste:before{content:"\f0ea"}.uk-icon-lightbulb-o:before{content:"\f0eb"}.uk-icon-exchange:before{content:"\f0ec"}.uk-icon-cloud-download:before{content:"\f0ed"}.uk-icon-cloud-upload:before{content:"\f0ee"}.uk-icon-user-md:before{content:"\f0f0"}.uk-icon-stethoscope:before{content:"\f0f1"}.uk-icon-suitcase:before{content:"\f0f2"}.uk-icon-bell-o:before{content:"\f0a2"}.uk-icon-coffee:before{content:"\f0f4"}.uk-icon-cutlery:before{content:"\f0f5"}.uk-icon-file-text-o:before{content:"\f0f6"}.uk-icon-building-o:before{content:"\f0f7"}.uk-icon-hospital-o:before{content:"\f0f8"}.uk-icon-ambulance:before{content:"\f0f9"}.uk-icon-medkit:before{content:"\f0fa"}.uk-icon-fighter-jet:before{content:"\f0fb"}.uk-icon-beer:before{content:"\f0fc"}.uk-icon-h-square:before{content:"\f0fd"}.uk-icon-plus-square:before{content:"\f0fe"}.uk-icon-angle-double-left:before{content:"\f100"}.uk-icon-angle-double-right:before{content:"\f101"}.uk-icon-angle-double-up:before{content:"\f102"}.uk-icon-angle-double-down:before{content:"\f103"}.uk-icon-angle-left:before{content:"\f104"}.uk-icon-angle-right:before{content:"\f105"}.uk-icon-angle-up:before{content:"\f106"}.uk-icon-angle-down:before{content:"\f107"}.uk-icon-desktop:before{content:"\f108"}.uk-icon-laptop:before{content:"\f109"}.uk-icon-tablet:before{content:"\f10a"}.uk-icon-mobile-phone:before,.uk-icon-mobile:before{content:"\f10b"}.uk-icon-circle-o:before{content:"\f10c"}.uk-icon-quote-left:before{content:"\f10d"}.uk-icon-quote-right:before{content:"\f10e"}.uk-icon-spinner:before{content:"\f110"}.uk-icon-circle:before{content:"\f111"}.uk-icon-mail-reply:before,.uk-icon-reply:before{content:"\f112"}.uk-icon-github-alt:before{content:"\f113"}.uk-icon-folder-o:before{content:"\f114"}.uk-icon-folder-open-o:before{content:"\f115"}.uk-icon-smile-o:before{content:"\f118"}.uk-icon-frown-o:before{content:"\f119"}.uk-icon-meh-o:before{content:"\f11a"}.uk-icon-gamepad:before{content:"\f11b"}.uk-icon-keyboard-o:before{content:"\f11c"}.uk-icon-flag-o:before{content:"\f11d"}.uk-icon-flag-checkered:before{content:"\f11e"}.uk-icon-terminal:before{content:"\f120"}.uk-icon-code:before{content:"\f121"}.uk-icon-mail-reply-all:before,.uk-icon-reply-all:before{content:"\f122"}.uk-icon-star-half-empty:before,.uk-icon-star-half-full:before,.uk-icon-star-half-o:before{content:"\f123"}.uk-icon-location-arrow:before{content:"\f124"}.uk-icon-crop:before{content:"\f125"}.uk-icon-code-fork:before{content:"\f126"}.uk-icon-chain-broken:before,.uk-icon-unlink:before{content:"\f127"}.uk-icon-question:before{content:"\f128"}.uk-icon-info:before{content:"\f129"}.uk-icon-exclamation:before{content:"\f12a"}.uk-icon-superscript:before{content:"\f12b"}.uk-icon-subscript:before{content:"\f12c"}.uk-icon-eraser:before{content:"\f12d"}.uk-icon-puzzle-piece:before{content:"\f12e"}.uk-icon-microphone:before{content:"\f130"}.uk-icon-microphone-slash:before{content:"\f131"}.uk-icon-shield:before{content:"\f132"}.uk-icon-calendar-o:before{content:"\f133"}.uk-icon-fire-extinguisher:before{content:"\f134"}.uk-icon-rocket:before{content:"\f135"}.uk-icon-maxcdn:before{content:"\f136"}.uk-icon-chevron-circle-left:before{content:"\f137"}.uk-icon-chevron-circle-right:before{content:"\f138"}.uk-icon-chevron-circle-up:before{content:"\f139"}.uk-icon-chevron-circle-down:before{content:"\f13a"}.uk-icon-html5:before{content:"\f13b"}.uk-icon-css3:before{content:"\f13c"}.uk-icon-anchor:before{content:"\f13d"}.uk-icon-unlock-alt:before{content:"\f13e"}.uk-icon-bullseye:before{content:"\f140"}.uk-icon-ellipsis-h:before{content:"\f141"}.uk-icon-ellipsis-v:before{content:"\f142"}.uk-icon-rss-square:before{content:"\f143"}.uk-icon-play-circle:before{content:"\f144"}.uk-icon-ticket:before{content:"\f145"}.uk-icon-minus-square:before{content:"\f146"}.uk-icon-minus-square-o:before{content:"\f147"}.uk-icon-level-up:before{content:"\f148"}.uk-icon-level-down:before{content:"\f149"}.uk-icon-check-square:before{content:"\f14a"}.uk-icon-pencil-square:before{content:"\f14b"}.uk-icon-external-link-square:before{content:"\f14c"}.uk-icon-share-square:before{content:"\f14d"}.uk-icon-compass:before{content:"\f14e"}.uk-icon-caret-square-o-down:before,.uk-icon-toggle-down:before{content:"\f150"}.uk-icon-caret-square-o-up:before,.uk-icon-toggle-up:before{content:"\f151"}.uk-icon-caret-square-o-right:before,.uk-icon-toggle-right:before{content:"\f152"}.uk-icon-eur:before,.uk-icon-euro:before{content:"\f153"}.uk-icon-gbp:before{content:"\f154"}.uk-icon-dollar:before,.uk-icon-usd:before{content:"\f155"}.uk-icon-inr:before,.uk-icon-rupee:before{content:"\f156"}.uk-icon-cny:before,.uk-icon-jpy:before,.uk-icon-rmb:before,.uk-icon-yen:before{content:"\f157"}.uk-icon-rouble:before,.uk-icon-rub:before,.uk-icon-ruble:before{content:"\f158"}.uk-icon-krw:before,.uk-icon-won:before{content:"\f159"}.uk-icon-bitcoin:before,.uk-icon-btc:before{content:"\f15a"}.uk-icon-file:before{content:"\f15b"}.uk-icon-file-text:before{content:"\f15c"}.uk-icon-sort-alpha-asc:before{content:"\f15d"}.uk-icon-sort-alpha-desc:before{content:"\f15e"}.uk-icon-sort-amount-asc:before{content:"\f160"}.uk-icon-sort-amount-desc:before{content:"\f161"}.uk-icon-sort-numeric-asc:before{content:"\f162"}.uk-icon-sort-numeric-desc:before{content:"\f163"}.uk-icon-thumbs-up:before{content:"\f164"}.uk-icon-thumbs-down:before{content:"\f165"}.uk-icon-youtube-square:before{content:"\f166"}.uk-icon-youtube:before{content:"\f167"}.uk-icon-xing:before{content:"\f168"}.uk-icon-xing-square:before{content:"\f169"}.uk-icon-youtube-play:before{content:"\f16a"}.uk-icon-dropbox:before{content:"\f16b"}.uk-icon-stack-overflow:before{content:"\f16c"}.uk-icon-instagram:before{content:"\f16d"}.uk-icon-flickr:before{content:"\f16e"}.uk-icon-adn:before{content:"\f170"}.uk-icon-bitbucket:before{content:"\f171"}.uk-icon-bitbucket-square:before{content:"\f172"}.uk-icon-tumblr:before{content:"\f173"}.uk-icon-tumblr-square:before{content:"\f174"}.uk-icon-long-arrow-down:before{content:"\f175"}.uk-icon-long-arrow-up:before{content:"\f176"}.uk-icon-long-arrow-left:before{content:"\f177"}.uk-icon-long-arrow-right:before{content:"\f178"}.uk-icon-apple:before{content:"\f179"}.uk-icon-windows:before{content:"\f17a"}.uk-icon-android:before{content:"\f17b"}.uk-icon-linux:before{content:"\f17c"}.uk-icon-dribbble:before{content:"\f17d"}.uk-icon-skype:before{content:"\f17e"}.uk-icon-foursquare:before{content:"\f180"}.uk-icon-trello:before{content:"\f181"}.uk-icon-female:before{content:"\f182"}.uk-icon-male:before{content:"\f183"}.uk-icon-gittip:before,.uk-icon-gratipay:before{content:"\f184"}.uk-icon-sun-o:before{content:"\f185"}.uk-icon-moon-o:before{content:"\f186"}.uk-icon-archive:before{content:"\f187"}.uk-icon-bug:before{content:"\f188"}.uk-icon-vk:before{content:"\f189"}.uk-icon-weibo:before{content:"\f18a"}.uk-icon-renren:before{content:"\f18b"}.uk-icon-pagelines:before{content:"\f18c"}.uk-icon-stack-exchange:before{content:"\f18d"}.uk-icon-arrow-circle-o-right:before{content:"\f18e"}.uk-icon-arrow-circle-o-left:before{content:"\f190"}.uk-icon-caret-square-o-left:before,.uk-icon-toggle-left:before{content:"\f191"}.uk-icon-dot-circle-o:before{content:"\f192"}.uk-icon-wheelchair:before{content:"\f193"}.uk-icon-vimeo-square:before{content:"\f194"}.uk-icon-try:before,.uk-icon-turkish-lira:before{content:"\f195"}.uk-icon-plus-square-o:before{content:"\f196"}.uk-icon-space-shuttle:before{content:"\f197"}.uk-icon-slack:before{content:"\f198"}.uk-icon-envelope-square:before{content:"\f199"}.uk-icon-wordpress:before{content:"\f19a"}.uk-icon-openid:before{content:"\f19b"}.uk-icon-bank:before,.uk-icon-institution:before,.uk-icon-university:before{content:"\f19c"}.uk-icon-graduation-cap:before,.uk-icon-mortar-board:before{content:"\f19d"}.uk-icon-yahoo:before{content:"\f19e"}.uk-icon-google:before{content:"\f1a0"}.uk-icon-reddit:before{content:"\f1a1"}.uk-icon-reddit-square:before{content:"\f1a2"}.uk-icon-stumbleupon-circle:before{content:"\f1a3"}.uk-icon-stumbleupon:before{content:"\f1a4"}.uk-icon-delicious:before{content:"\f1a5"}.uk-icon-digg:before{content:"\f1a6"}.uk-icon-pied-piper:before{content:"\f1a7"}.uk-icon-pied-piper-alt:before{content:"\f1a8"}.uk-icon-drupal:before{content:"\f1a9"}.uk-icon-joomla:before{content:"\f1aa"}.uk-icon-language:before{content:"\f1ab"}.uk-icon-fax:before{content:"\f1ac"}.uk-icon-building:before{content:"\f1ad"}.uk-icon-child:before{content:"\f1ae"}.uk-icon-paw:before{content:"\f1b0"}.uk-icon-spoon:before{content:"\f1b1"}.uk-icon-cube:before{content:"\f1b2"}.uk-icon-cubes:before{content:"\f1b3"}.uk-icon-behance:before{content:"\f1b4"}.uk-icon-behance-square:before{content:"\f1b5"}.uk-icon-steam:before{content:"\f1b6"}.uk-icon-steam-square:before{content:"\f1b7"}.uk-icon-recycle:before{content:"\f1b8"}.uk-icon-automobile:before,.uk-icon-car:before{content:"\f1b9"}.uk-icon-cab:before,.uk-icon-taxi:before{content:"\f1ba"}.uk-icon-tree:before{content:"\f1bb"}.uk-icon-spotify:before{content:"\f1bc"}.uk-icon-deviantart:before{content:"\f1bd"}.uk-icon-soundcloud:before{content:"\f1be"}.uk-icon-database:before{content:"\f1c0"}.uk-icon-file-pdf-o:before{content:"\f1c1"}.uk-icon-file-word-o:before{content:"\f1c2"}.uk-icon-file-excel-o:before{content:"\f1c3"}.uk-icon-file-powerpoint-o:before{content:"\f1c4"}.uk-icon-file-image-o:before,.uk-icon-file-photo-o:before,.uk-icon-file-picture-o:before{content:"\f1c5"}.uk-icon-file-archive-o:before,.uk-icon-file-zip-o:before{content:"\f1c6"}.uk-icon-file-audio-o:before,.uk-icon-file-sound-o:before{content:"\f1c7"}.uk-icon-file-movie-o:before,.uk-icon-file-video-o:before{content:"\f1c8"}.uk-icon-file-code-o:before{content:"\f1c9"}.uk-icon-vine:before{content:"\f1ca"}.uk-icon-codepen:before{content:"\f1cb"}.uk-icon-jsfiddle:before{content:"\f1cc"}.uk-icon-life-bouy:before,.uk-icon-life-buoy:before,.uk-icon-life-ring:before,.uk-icon-life-saver:before,.uk-icon-support:before{content:"\f1cd"}.uk-icon-circle-o-notch:before{content:"\f1ce"}.uk-icon-ra:before,.uk-icon-rebel:before{content:"\f1d0"}.uk-icon-empire:before,.uk-icon-ge:before{content:"\f1d1"}.uk-icon-git-square:before{content:"\f1d2"}.uk-icon-git:before{content:"\f1d3"}.uk-icon-hacker-news:before{content:"\f1d4"}.uk-icon-tencent-weibo:before{content:"\f1d5"}.uk-icon-qq:before{content:"\f1d6"}.uk-icon-wechat:before,.uk-icon-weixin:before{content:"\f1d7"}.uk-icon-paper-plane:before,.uk-icon-send:before{content:"\f1d8"}.uk-icon-paper-plane-o:before,.uk-icon-send-o:before{content:"\f1d9"}.uk-icon-history:before{content:"\f1da"}.uk-icon-circle-thin:before,.uk-icon-genderless:before{content:"\f1db"}.uk-icon-header:before{content:"\f1dc"}.uk-icon-paragraph:before{content:"\f1dd"}.uk-icon-sliders:before{content:"\f1de"}.uk-icon-share-alt:before{content:"\f1e0"}.uk-icon-share-alt-square:before{content:"\f1e1"}.uk-icon-bomb:before{content:"\f1e2"}.uk-icon-futbol-o:before,.uk-icon-soccer-ball-o:before{content:"\f1e3"}.uk-icon-tty:before{content:"\f1e4"}.uk-icon-binoculars:before{content:"\f1e5"}.uk-icon-plug:before{content:"\f1e6"}.uk-icon-slideshare:before{content:"\f1e7"}.uk-icon-twitch:before{content:"\f1e8"}.uk-icon-yelp:before{content:"\f1e9"}.uk-icon-newspaper-o:before{content:"\f1ea"}.uk-icon-wifi:before{content:"\f1eb"}.uk-icon-calculator:before{content:"\f1ec"}.uk-icon-paypal:before{content:"\f1ed"}.uk-icon-google-wallet:before{content:"\f1ee"}.uk-icon-cc-visa:before{content:"\f1f0"}.uk-icon-cc-mastercard:before{content:"\f1f1"}.uk-icon-cc-discover:before{content:"\f1f2"}.uk-icon-cc-amex:before{content:"\f1f3"}.uk-icon-cc-paypal:before{content:"\f1f4"}.uk-icon-cc-stripe:before{content:"\f1f5"}.uk-icon-bell-slash:before{content:"\f1f6"}.uk-icon-bell-slash-o:before{content:"\f1f7"}.uk-icon-trash:before{content:"\f1f8"}.uk-icon-copyright:before{content:"\f1f9"}.uk-icon-at:before{content:"\f1fa"}.uk-icon-eyedropper:before{content:"\f1fb"}.uk-icon-paint-brush:before{content:"\f1fc"}.uk-icon-birthday-cake:before{content:"\f1fd"}.uk-icon-area-chart:before{content:"\f1fe"}.uk-icon-pie-chart:before{content:"\f200"}.uk-icon-line-chart:before{content:"\f201"}.uk-icon-lastfm:before{content:"\f202"}.uk-icon-lastfm-square:before{content:"\f203"}.uk-icon-toggle-off:before{content:"\f204"}.uk-icon-toggle-on:before{content:"\f205"}.uk-icon-bicycle:before{content:"\f206"}.uk-icon-bus:before{content:"\f207"}.uk-icon-ioxhost:before{content:"\f208"}.uk-icon-angellist:before{content:"\f209"}.uk-icon-cc:before{content:"\f20a"}.uk-icon-ils:before,.uk-icon-shekel:before,.uk-icon-sheqel:before{content:"\f20b"}.uk-icon-meanpath:before{content:"\f20c"}.uk-icon-buysellads:before{content:"\f20d"}.uk-icon-connectdevelop:before{content:"\f20e"}.uk-icon-dashcube:before{content:"\f210"}.uk-icon-forumbee:before{content:"\f211"}.uk-icon-leanpub:before{content:"\f212"}.uk-icon-sellsy:before{content:"\f213"}.uk-icon-shirtsinbulk:before{content:"\f214"}.uk-icon-simplybuilt:before{content:"\f215"}.uk-icon-skyatlas:before{content:"\f216"}.uk-icon-cart-plus:before{content:"\f217"}.uk-icon-cart-arrow-down:before{content:"\f218"}.uk-icon-diamond:before{content:"\f219"}.uk-icon-ship:before{content:"\f21a"}.uk-icon-user-secret:before{content:"\f21b"}.uk-icon-motorcycle:before{content:"\f21c"}.uk-icon-street-view:before{content:"\f21d"}.uk-icon-heartbeat:before{content:"\f21e"}.uk-icon-venus:before{content:"\f221"}.uk-icon-mars:before{content:"\f222"}.uk-icon-mercury:before{content:"\f223"}.uk-icon-transgender:before{content:"\f224"}.uk-icon-transgender-alt:before{content:"\f225"}.uk-icon-venus-double:before{content:"\f226"}.uk-icon-mars-double:before{content:"\f227"}.uk-icon-venus-mars:before{content:"\f228"}.uk-icon-mars-stroke:before{content:"\f229"}.uk-icon-mars-stroke-v:before{content:"\f22a"}.uk-icon-mars-stroke-h:before{content:"\f22b"}.uk-icon-neuter:before{content:"\f22c"}.uk-icon-facebook-official:before{content:"\f230"}.uk-icon-pinterest-p:before{content:"\f231"}.uk-icon-whatsapp:before{content:"\f232"}.uk-icon-server:before{content:"\f233"}.uk-icon-user-plus:before{content:"\f234"}.uk-icon-user-times:before{content:"\f235"}.uk-icon-bed:before,.uk-icon-hotel:before{content:"\f236"}.uk-icon-viacoin:before{content:"\f237"}.uk-icon-train:before{content:"\f238"}.uk-icon-subway:before{content:"\f239"}.uk-icon-medium-logo:before{content:"\f23a"}.uk-icon-500px:before{content:"\f26e"}.uk-icon-amazon:before{content:"\f270"}.uk-icon-balance-scale:before{content:"\f24e"}.uk-icon-battery-0:before,.uk-icon-battery-empty:before{content:"\f244"}.uk-icon-battery-1:before,.uk-icon-battery-quarter:before{content:"\f243"}.uk-icon-battery-2:before,.uk-icon-battery-half:before{content:"\f242"}.uk-icon-battery-3:before,.uk-icon-battery-three-quarters:before{content:"\f241"}.uk-icon-battery-4:before,.uk-icon-battery-full:before{content:"\f240"}.uk-icon-black-tie:before{content:"\f27e"}.uk-icon-calendar-check-o:before{content:"\f274"}.uk-icon-calendar-minus-o:before{content:"\f272"}.uk-icon-calendar-plus-o:before{content:"\f271"}.uk-icon-calendar-times-o:before{content:"\f273"}.uk-icon-cc-diners-club:before{content:"\f24c"}.uk-icon-cc-jcb:before{content:"\f24b"}.uk-icon-chrome:before{content:"\f268"}.uk-icon-clone:before{content:"\f24d"}.uk-icon-commenting:before{content:"\f27a"}.uk-icon-commenting-o:before{content:"\f27b"}.uk-icon-contao:before{content:"\f26d"}.uk-icon-creative-commons:before{content:"\f25e"}.uk-icon-expeditedssl:before{content:"\f23e"}.uk-icon-firefox:before{content:"\f269"}.uk-icon-fonticons:before{content:"\f280"}.uk-icon-get-pocket:before{content:"\f265"}.uk-icon-gg:before{content:"\f260"}.uk-icon-gg-circle:before{content:"\f261"}.uk-icon-hand-lizard-o:before{content:"\f258"}.uk-icon-hand-paper-o:before,.uk-icon-hand-stop-o:before{content:"\f256"}.uk-icon-hand-peace-o:before{content:"\f25b"}.uk-icon-hand-pointer-o:before{content:"\f25a"}.uk-icon-hand-grab-o:before,.uk-icon-hand-rock-o:before{content:"\f255"}.uk-icon-hand-scissors-o:before{content:"\f257"}.uk-icon-hand-spock-o:before{content:"\f259"}.uk-icon-hourglass:before{content:"\f254"}.uk-icon-hourglass-o:before{content:"\f250"}.uk-icon-hourglass-1:before,.uk-icon-hourglass-start:before{content:"\f251"}.uk-icon-hourglass-2:before,.uk-icon-hourglass-half:before{content:"\f252"}.uk-icon-hourglass-3:before,.uk-icon-hourglass-end:before{content:"\f253"}.uk-icon-houzz:before{content:"\f27c"}.uk-icon-i-cursor:before{content:"\f246"}.uk-icon-industry:before{content:"\f275"}.uk-icon-internet-explorer:before{content:"\f26b"}.uk-icon-map:before{content:"\f279"}.uk-icon-map-o:before{content:"\f278"}.uk-icon-map-pin:before{content:"\f276"}.uk-icon-map-signs:before{content:"\f277"}.uk-icon-mouse-pointer:before{content:"\f245"}.uk-icon-object-group:before{content:"\f247"}.uk-icon-object-ungroup:before{content:"\f248"}.uk-icon-odnoklassniki:before{content:"\f263"}.uk-icon-odnoklassniki-square:before{content:"\f264"}.uk-icon-opencart:before{content:"\f23d"}.uk-icon-opera:before{content:"\f26a"}.uk-icon-optin-monster:before{content:"\f23c"}.uk-icon-registered:before{content:"\f25d"}.uk-icon-safari:before{content:"\f267"}.uk-icon-sticky-note:before{content:"\f249"}.uk-icon-sticky-note-o:before{content:"\f24a"}.uk-icon-television:before,.uk-icon-tv:before{content:"\f26c"}.uk-icon-trademark:before{content:"\f25c"}.uk-icon-tripadvisor:before{content:"\f262"}.uk-icon-vimeo:before{content:"\f27d"}.uk-icon-wikipedia-w:before{content:"\f266"}.uk-icon-y-combinator:before,.uk-icon-yc:before{content:"\f23b"}.uk-icon-y-combinator-square:before,.uk-icon-yc-square:before{content:"\f1d4"}.uk-icon-bluetooth:before{content:"\f293"}.uk-icon-bluetooth-b:before{content:"\f294"}.uk-icon-codiepie:before{content:"\f284"}.uk-icon-credit-card-alt:before{content:"\f283"}.uk-icon-edge:before{content:"\f282"}.uk-icon-fort-awesome:before{content:"\f286"}.uk-icon-hashtag:before{content:"\f292"}.uk-icon-mixcloud:before{content:"\f289"}.uk-icon-modx:before{content:"\f285"}.uk-icon-pause-circle:before{content:"\f28b"}.uk-icon-pause-circle-o:before{content:"\f28c"}.uk-icon-percent:before{content:"\f295"}.uk-icon-product-hunt:before{content:"\f288"}.uk-icon-reddit-alien:before{content:"\f281"}.uk-icon-scribd:before{content:"\f28a"}.uk-icon-shopping-bag:before{content:"\f290"}.uk-icon-shopping-basket:before{content:"\f291"}.uk-icon-stop-circle:before{content:"\f28d"}.uk-icon-stop-circle-o:before{content:"\f28e"}.uk-icon-usb:before{content:"\f287"}.uk-icon-american-sign-language-interpreting:before,.uk-icon-asl-interpreting:before{content:"\f2a3"}.uk-icon-assistive-listening-systems:before{content:"\f2a2"}.uk-icon-audio-description:before{content:"\f29e"}.uk-icon-blind:before{content:"\f29d"}.uk-icon-braille:before{content:"\f2a1"}.uk-icon-deaf:before,.uk-icon-deafness:before{content:"\f2a4"}.uk-icon-envira:before{content:"\f299"}.uk-icon-fa:before,.uk-icon-font-awesome:before{content:"\f2b4"}.uk-icon-first-order:before{content:"\f2b0"}.uk-icon-gitlab:before{content:"\f296"}.uk-icon-glide:before{content:"\f2a5"}.uk-icon-glide-g:before{content:"\f2a6"}.uk-icon-hard-of-hearing:before{content:"\f2a4"}.uk-icon-low-vision:before{content:"\f2a8"}.uk-icon-question-circle-o:before{content:"\f29c"}.uk-icon-sign-language:before,.uk-icon-signing:before{content:"\f2a7"}.uk-icon-snapchat:before{content:"\f2ab"}.uk-icon-snapchat-ghost:before{content:"\f2ac"}.uk-icon-snapchat-square:before{content:"\f2ad"}.uk-icon-themeisle:before{content:"\f2b2"}.uk-icon-universal-access:before{content:"\f29a"}.uk-icon-viadeo:before{content:"\f2a9"}.uk-icon-viadeo-square:before{content:"\f2aa"}.uk-icon-volume-control-phone:before{content:"\f2a0"}.uk-icon-wheelchair-alt:before{content:"\f29b"}.uk-icon-wpbeginner:before{content:"\f297"}.uk-icon-wpforms:before{content:"\f298"}.uk-icon-yoast:before{content:"\f2b1"}.uk-icon-adress-book:before{content:"\f2b9"}.uk-icon-adress-book-o:before{content:"\f2ba"}.uk-icon-adress-card:before{content:"\f2bb"}.uk-icon-adress-card-o:before{content:"\f2bc"}.uk-icon-bandcamp:before{content:"\f2d5"}.uk-icon-bath:before,.uk-icon-bathub:before{content:"\f2cd"}.uk-icon-drivers-license:before{content:"\f2c2"}.uk-icon-drivers-license-o:before{content:"\f2c3"}.uk-icon-eercast:before{content:"\f2da"}.uk-icon-envelope-open:before{content:"\f2b6"}.uk-icon-envelope-open-o:before{content:"\f2b7"}.uk-icon-etsy:before{content:"\f2d7"}.uk-icon-free-code-camp:before{content:"\f2c5"}.uk-icon-grav:before{content:"\f2d6"}.uk-icon-handshake-o:before{content:"\f2b5"}.uk-icon-id-badge:before{content:"\f2c1"}.uk-icon-id-card:before{content:"\f2c2"}.uk-icon-id-card-o:before{content:"\f2c3"}.uk-icon-imdb:before{content:"\f2d8"}.uk-icon-linode:before{content:"\f2b8"}.uk-icon-meetup:before{content:"\f2e0"}.uk-icon-microchip:before{content:"\f2db"}.uk-icon-podcast:before{content:"\f2ce"}.uk-icon-quora:before{content:"\f2c4"}.uk-icon-ravelry:before{content:"\f2d9"}.uk-icon-s15:before{content:"\f2cd"}.uk-icon-shower:before{content:"\f2cc"}.uk-icon-snowflake-o:before{content:"\f2dc"}.uk-icon-superpowers:before{content:"\f2dd"}.uk-icon-telegram:before{content:"\f2c6"}.uk-icon-thermometer:before{content:"\f2c7"}.uk-icon-thermometer-0:before{content:"\f2cb"}.uk-icon-thermometer-1:before{content:"\f2ca"}.uk-icon-thermometer-2:before{content:"\f2c9"}.uk-icon-thermometer-3:before{content:"\f2c8"}.uk-icon-thermometer-4:before{content:"\f2c7"}.uk-icon-thermometer-empty:before{content:"\f2cb"}.uk-icon-thermometer-full:before{content:"\f2c7"}.uk-icon-thermometer-half:before{content:"\f2c9"}.uk-icon-thermometer-quarter:before{content:"\f2ca"}.uk-icon-thermometer-three-quarters:before{content:"\f2c8"}.uk-icon-times-rectangle:before{content:"\f2d3"}.uk-icon-times-rectangle-o:before{content:"\f2d4"}.uk-icon-user-circle:before{content:"\f2bd"}.uk-icon-user-circle-o:before{content:"\f2be"}.uk-icon-user-o:before{content:"\f2c0"}.uk-icon-vcard:before{content:"\f2bb"}.uk-icon-vcard-o:before{content:"\f2bc"}.uk-icon-widow-close:before{content:"\f2d3"}.uk-icon-widow-close-o:before{content:"\f2d4"}.uk-icon-window-maximize:before{content:"\f2d0"}.uk-icon-window-minimize:before{content:"\f2d1"}.uk-icon-window-restore:before{content:"\f2d2"}.uk-icon-wpexplorer:before{content:"\f2de"}.uk-close::-moz-focus-inner{border:0;padding:0}.uk-close{border:none;font:inherit;color:inherit;padding:0;background:0 0;box-sizing:content-box;width:20px;line-height:20px;opacity:.3}.uk-badge-notification,.uk-container,.uk-modal-dialog,.uk-overlay-area-content,.uk-responsive-height,.uk-responsive-width,.uk-scrollable-box,.uk-thumbnail,[class*=uk-height]{box-sizing:border-box}.uk-close:after{display:block;font-family:FontAwesome}.uk-close:focus,.uk-close:hover{opacity:.5;outline:0;color:inherit;text-decoration:none;cursor:pointer}.uk-badge,a.uk-badge:hover{color:#fff}.uk-close-alt{padding:2px;border-radius:50%;background:#fff;opacity:1;box-shadow:0 0 0 1px rgba(0,0,0,.1),0 0 6px rgba(0,0,0,.3)}.uk-close-alt:focus,.uk-close-alt:hover{opacity:1}.uk-close-alt:after{opacity:.5}.uk-close-alt:focus:after,.uk-close-alt:hover:after{opacity:.8}.uk-badge{display:inline-block;padding:0 5px;background:#337ab7;font-size:10px;font-weight:700;line-height:14px;text-align:center;text-transform:none;border:1px solid rgba(0,0,0,.06);border-radius:2px;text-shadow:0 1px 0 rgba(0,0,0,.1)}.uk-badge-notification{min-width:16px;border-radius:500px;font-size:11px;line-height:16px}.uk-badge-success{background-color:#5cb85c}.uk-badge-warning{background-color:#f0ad4e}.uk-badge-danger{background-color:#d9534f}.uk-alert{margin-bottom:15px;padding:10px;background:#d9edf7;color:#31708f;border:1px solid rgba(49,112,143,.3);border-radius:2px;text-shadow:0 1px 0 #fff}*+.uk-alert{margin-top:15px}.uk-alert>:last-child{margin-bottom:0}.uk-alert h1,.uk-alert h2,.uk-alert h3,.uk-alert h4,.uk-alert h5,.uk-alert h6{color:inherit}.uk-alert>.uk-close:first-child+*{margin-top:0}.uk-alert-success{background:#dff0d8;color:#3c763d;border-color:rgba(60,118,61,.3)}.uk-alert-warning{background:#fcf8e7;color:#8a6d3b;border-color:rgba(138,109,59,.3)}.uk-alert-danger{background:#f2dede;color:#a94442;border-color:rgba(169,68,66,.3)}.uk-alert-large{padding:20px}.uk-alert-large>.uk-close:first-child{margin:-10px -10px 0 0}.uk-overlay,.uk-thumbnail{margin:0;display:inline-block;max-width:100%}.uk-overlay-area-content>:last-child,.uk-overlay-panel.uk-flex>*>:last-child,.uk-overlay-panel>:last-child,.uk-overlay>:first-child{margin-bottom:0}.uk-thumbnail{padding:4px;border:1px solid #ddd;background:#fff;border-radius:2px}a.uk-thumbnail:focus,a.uk-thumbnail:hover{border-color:#aaa;background-color:#fff;text-decoration:none;outline:0}.uk-thumbnail-caption{padding-top:4px;text-align:center;color:#444}.uk-thumbnail-mini{width:150px}.uk-thumbnail-small{width:200px}.uk-thumbnail-medium{width:300px}.uk-thumbnail-large{width:400px}.uk-thumbnail-expand,.uk-thumbnail-expand>img{width:100%}.uk-overlay{overflow:hidden;-webkit-transform:translateZ(0)}.uk-overlay-area:empty:before,.uk-overlay-icon:before{content:"\f002";width:50px;height:50px;margin-top:-25px;margin-left:-25px;font-size:50px;line-height:1;text-align:center;font-family:FontAwesome}.uk-overlay.uk-border-circle{-webkit-mask-image:-webkit-radial-gradient(circle,#fff 100%,#000 100%)}.uk-overlay-panel{position:absolute;top:0;bottom:0;left:0;right:0;padding:20px;color:#fff}.uk-overlay-panel a[class*=uk-icon-]:not(.uk-icon-button),.uk-overlay-panel h1,.uk-overlay-panel h2,.uk-overlay-panel h3,.uk-overlay-panel h4,.uk-overlay-panel h5,.uk-overlay-panel h6{color:inherit}.uk-overlay-panel a:not([class]){color:inherit;text-decoration:underline}.uk-overlay-active :not(.uk-active)>.uk-overlay-panel:not(.uk-ignore),.uk-overlay-hover:not(:hover):not(.uk-hover) .uk-overlay-panel:not(.uk-ignore){opacity:0}.uk-overlay-background{background:rgba(0,0,0,.5)}.uk-overlay-image{padding:0}.uk-overlay-top{bottom:auto}.uk-overlay-bottom{top:auto}.uk-overlay-left{right:auto}.uk-overlay-right{left:auto}.uk-overlay-icon:before{position:absolute;top:50%;left:50%;color:#fff}.uk-overlay-blur,.uk-overlay-fade,.uk-overlay-grayscale,.uk-overlay-scale,.uk-overlay-spin,[class*=uk-overlay-slide]{transition-duration:.3s;transition-timing-function:ease-out;transition-property:opacity,transform,filter}.uk-overlay-active .uk-overlay-fade,.uk-overlay-active .uk-overlay-scale,.uk-overlay-active .uk-overlay-spin,.uk-overlay-active [class*=uk-overlay-slide]{transition-duration:.8s}.uk-overlay-fade{opacity:.7}.uk-overlay-active .uk-active>.uk-overlay-fade,.uk-overlay-hover.uk-hover .uk-overlay-fade,.uk-overlay-hover:hover .uk-overlay-fade{opacity:1}.uk-overlay-scale{-webkit-transform:scale(1);transform:scale(1)}.uk-overlay-active .uk-active>.uk-overlay-scale,.uk-overlay-hover.uk-hover .uk-overlay-scale,.uk-overlay-hover:hover .uk-overlay-scale{-webkit-transform:scale(1.1);transform:scale(1.1)}.uk-overlay-spin{-webkit-transform:scale(1) rotate(0);transform:scale(1) rotate(0)}.uk-overlay-active .uk-active>.uk-overlay-spin,.uk-overlay-hover.uk-hover .uk-overlay-spin,.uk-overlay-hover:hover .uk-overlay-spin{-webkit-transform:scale(1.1) rotate(3deg);transform:scale(1.1) rotate(3deg)}.uk-overlay-grayscale{-webkit-filter:grayscale(100%);filter:grayscale(100%)}.uk-overlay-active .uk-active>.uk-overlay-grayscale,.uk-overlay-hover.uk-hover .uk-overlay-grayscale,.uk-overlay-hover:hover .uk-overlay-grayscale{-webkit-filter:grayscale(0);filter:grayscale(0)}[class*=uk-overlay-slide]{opacity:0}.uk-overlay-slide-top{-webkit-transform:translateY(-100%);transform:translateY(-100%)}.uk-overlay-slide-bottom{-webkit-transform:translateY(100%);transform:translateY(100%)}.uk-overlay-slide-left{-webkit-transform:translateX(-100%);transform:translateX(-100%)}.uk-overlay-slide-right{-webkit-transform:translateX(100%);transform:translateX(100%)}.uk-overlay-active .uk-active>[class*=uk-overlay-slide],.uk-overlay-hover.uk-hover [class*=uk-overlay-slide],.uk-overlay-hover:hover [class*=uk-overlay-slide]{opacity:1;-webkit-transform:translateX(0) translateY(0);transform:translateX(0) translateY(0)}.uk-overlay-area,.uk-overlay-caption{-webkit-transition:opacity .15s linear;-webkit-transform:translate3d(0,0,0);position:absolute;right:0;bottom:0}.uk-overlay-area{top:0;left:0;background:rgba(0,0,0,.3);opacity:0;transition:opacity .15s linear}.uk-overlay-toggle.uk-hover .uk-overlay-area,.uk-overlay-toggle:hover .uk-overlay-area,.uk-overlay.uk-hover .uk-overlay-area,.uk-overlay:hover .uk-overlay-area{opacity:1}.uk-overlay-area:empty:before{position:absolute;top:50%;left:50%;color:#fff}.uk-overlay-area:not(:empty){font-size:0}.uk-overlay-area:not(:empty):before{content:'';display:inline-block;height:100%;vertical-align:middle}.uk-overlay-area-content{display:inline-block;width:100%;font-size:1rem;text-align:center;padding:0 15px;color:#fff}.uk-overlay-area-content a:not([class]),.uk-overlay-area-content a:not([class]):hover{color:inherit}.uk-overlay-caption{left:0;padding:15px;background:rgba(0,0,0,.5);color:#fff;opacity:0;transition:opacity .15s linear}.uk-overlay-toggle.uk-hover .uk-overlay-caption,.uk-overlay-toggle:hover .uk-overlay-caption,.uk-overlay.uk-hover .uk-overlay-caption,.uk-overlay:hover .uk-overlay-caption{opacity:1}[class*=uk-column-]{-webkit-column-gap:25px;-moz-column-gap:25px;column-gap:25px}.uk-column-1-2{-webkit-column-count:2;-moz-column-count:2;column-count:2}.uk-column-1-3{-webkit-column-count:3;-moz-column-count:3;column-count:3}.uk-column-1-4{-webkit-column-count:4;-moz-column-count:4;column-count:4}.uk-column-1-5{-webkit-column-count:5;-moz-column-count:5;column-count:5}.uk-column-1-6{-webkit-column-count:6;-moz-column-count:6;column-count:6}@media (min-width:480px){.uk-column-small-1-2{-webkit-column-count:2;-moz-column-count:2;column-count:2}.uk-column-small-1-3{-webkit-column-count:3;-moz-column-count:3;column-count:3}.uk-column-small-1-4{-webkit-column-count:4;-moz-column-count:4;column-count:4}.uk-column-small-1-5{-webkit-column-count:5;-moz-column-count:5;column-count:5}.uk-column-small-1-6{-webkit-column-count:6;-moz-column-count:6;column-count:6}}@media (min-width:768px){.uk-column-medium-1-2{-webkit-column-count:2;-moz-column-count:2;column-count:2}.uk-column-medium-1-3{-webkit-column-count:3;-moz-column-count:3;column-count:3}.uk-column-medium-1-4{-webkit-column-count:4;-moz-column-count:4;column-count:4}.uk-column-medium-1-5{-webkit-column-count:5;-moz-column-count:5;column-count:5}.uk-column-medium-1-6{-webkit-column-count:6;-moz-column-count:6;column-count:6}}@media (min-width:960px){.uk-column-large-1-2{-webkit-column-count:2;-moz-column-count:2;column-count:2}.uk-column-large-1-3{-webkit-column-count:3;-moz-column-count:3;column-count:3}.uk-column-large-1-4{-webkit-column-count:4;-moz-column-count:4;column-count:4}.uk-column-large-1-5{-webkit-column-count:5;-moz-column-count:5;column-count:5}.uk-column-large-1-6{-webkit-column-count:6;-moz-column-count:6;column-count:6}}@media (min-width:1220px){.uk-column-xlarge-1-2{-webkit-column-count:2;-moz-column-count:2;column-count:2}.uk-column-xlarge-1-3{-webkit-column-count:3;-moz-column-count:3;column-count:3}.uk-column-xlarge-1-4{-webkit-column-count:4;-moz-column-count:4;column-count:4}.uk-column-xlarge-1-5{-webkit-column-count:5;-moz-column-count:5;column-count:5}.uk-column-xlarge-1-6{-webkit-column-count:6;-moz-column-count:6;column-count:6}}[class*=uk-animation-]{-webkit-animation-duration:.5s;animation-duration:.5s;-webkit-animation-timing-function:ease-out;animation-timing-function:ease-out;-webkit-animation-fill-mode:both;animation-fill-mode:both}@media screen{[data-uk-scrollspy*=uk-animation-]:not([data-uk-scrollspy*=target]){opacity:0}}.uk-animation-fade{-webkit-animation-name:uk-fade;animation-name:uk-fade;-webkit-animation-duration:.8s;animation-duration:.8s;-webkit-animation-timing-function:linear!important;animation-timing-function:linear!important}.uk-animation-scale-up{-webkit-animation-name:uk-fade-scale-02;animation-name:uk-fade-scale-02}.uk-animation-scale-down{-webkit-animation-name:uk-fade-scale-18;animation-name:uk-fade-scale-18}.uk-animation-slide-top{-webkit-animation-name:uk-fade-top;animation-name:uk-fade-top}.uk-animation-slide-bottom{-webkit-animation-name:uk-fade-bottom;animation-name:uk-fade-bottom}.uk-animation-slide-left{-webkit-animation-name:uk-fade-left;animation-name:uk-fade-left}.uk-animation-slide-right{-webkit-animation-name:uk-fade-right;animation-name:uk-fade-right}.uk-animation-scale{-webkit-animation-name:uk-scale-12;animation-name:uk-scale-12}.uk-animation-shake{-webkit-animation-name:uk-shake;animation-name:uk-shake}.uk-animation-reverse{-webkit-animation-direction:reverse;animation-direction:reverse;-webkit-animation-timing-function:ease-in;animation-timing-function:ease-in}.uk-animation-15{-webkit-animation-duration:15s;animation-duration:15s}.uk-animation-top-left{-webkit-transform-origin:0 0;transform-origin:0 0}.uk-animation-top-center{-webkit-transform-origin:50% 0;transform-origin:50% 0}.uk-animation-top-right{-webkit-transform-origin:100% 0;transform-origin:100% 0}.uk-animation-middle-left{-webkit-transform-origin:0 50%;transform-origin:0 50%}.uk-animation-middle-right{-webkit-transform-origin:100% 50%;transform-origin:100% 50%}.uk-animation-bottom-left{-webkit-transform-origin:0 100%;transform-origin:0 100%}.uk-animation-bottom-center{-webkit-transform-origin:50% 100%;transform-origin:50% 100%}.uk-animation-bottom-right{-webkit-transform-origin:100% 100%;transform-origin:100% 100%}.uk-animation-hover:not(:hover),.uk-animation-hover:not(:hover) [class*=uk-animation-],.uk-touch .uk-animation-hover:not(.uk-hover),.uk-touch .uk-animation-hover:not(.uk-hover) [class*=uk-animation-]{-webkit-animation-name:none;animation-name:none}@-webkit-keyframes uk-fade{0%{opacity:0}100%{opacity:1}}@keyframes uk-fade{0%{opacity:0}100%{opacity:1}}@-webkit-keyframes uk-fade-top{0%{opacity:0;-webkit-transform:translateY(-100%)}100%{opacity:1;-webkit-transform:translateY(0)}}@keyframes uk-fade-top{0%{opacity:0;transform:translateY(-100%)}100%{opacity:1;transform:translateY(0)}}@-webkit-keyframes uk-fade-bottom{0%{opacity:0;-webkit-transform:translateY(100%)}100%{opacity:1;-webkit-transform:translateY(0)}}@keyframes uk-fade-bottom{0%{opacity:0;transform:translateY(100%)}100%{opacity:1;transform:translateY(0)}}@-webkit-keyframes uk-fade-left{0%{opacity:0;-webkit-transform:translateX(-100%)}100%{opacity:1;-webkit-transform:translateX(0)}}@keyframes uk-fade-left{0%{opacity:0;transform:translateX(-100%)}100%{opacity:1;transform:translateX(0)}}@-webkit-keyframes uk-fade-right{0%{opacity:0;-webkit-transform:translateX(100%)}100%{opacity:1;-webkit-transform:translateX(0)}}@keyframes uk-fade-right{0%{opacity:0;transform:translateX(100%)}100%{opacity:1;transform:translateX(0)}}@-webkit-keyframes uk-fade-scale-02{0%{opacity:0;-webkit-transform:scale(.2)}100%{opacity:1;-webkit-transform:scale(1)}}@keyframes uk-fade-scale-02{0%{opacity:0;transform:scale(.2)}100%{opacity:1;transform:scale(1)}}@-webkit-keyframes uk-fade-scale-15{0%{opacity:0;-webkit-transform:scale(1.5)}100%{opacity:1;-webkit-transform:scale(1)}}@keyframes uk-fade-scale-15{0%{opacity:0;transform:scale(1.5)}100%{opacity:1;transform:scale(1)}}@-webkit-keyframes uk-fade-scale-18{0%{opacity:0;-webkit-transform:scale(1.8)}100%{opacity:1;-webkit-transform:scale(1)}}@keyframes uk-fade-scale-18{0%{opacity:0;transform:scale(1.8)}100%{opacity:1;transform:scale(1)}}@-webkit-keyframes uk-slide-left{0%{-webkit-transform:translateX(-100%)}100%{-webkit-transform:translateX(0)}}@keyframes uk-slide-left{0%{transform:translateX(-100%)}100%{transform:translateX(0)}}@-webkit-keyframes uk-slide-right{0%{-webkit-transform:translateX(100%)}100%{-webkit-transform:translateX(0)}}@keyframes uk-slide-right{0%{transform:translateX(100%)}100%{transform:translateX(0)}}@-webkit-keyframes uk-slide-left-33{0%{-webkit-transform:translateX(33%)}100%{-webkit-transform:translateX(0)}}@keyframes uk-slide-left-33{0%{transform:translateX(33%)}100%{transform:translateX(0)}}@-webkit-keyframes uk-slide-right-33{0%{-webkit-transform:translateX(-33%)}100%{-webkit-transform:translateX(0)}}@keyframes uk-slide-right-33{0%{transform:translateX(-33%)}100%{transform:translateX(0)}}@-webkit-keyframes uk-scale-12{0%{-webkit-transform:scale(1.2)}100%{-webkit-transform:scale(1)}}@keyframes uk-scale-12{0%{transform:scale(1.2)}100%{transform:scale(1)}}@-webkit-keyframes uk-rotate{0%{-webkit-transform:rotate(0)}100%{-webkit-transform:rotate(359deg)}}@keyframes uk-rotate{0%{transform:rotate(0)}100%{transform:rotate(359deg)}}@-webkit-keyframes uk-shake{0%,100%{-webkit-transform:translateX(0)}10%{-webkit-transform:translateX(-9px)}20%{-webkit-transform:translateX(8px)}30%{-webkit-transform:translateX(-7px)}40%{-webkit-transform:translateX(6px)}50%{-webkit-transform:translateX(-5px)}60%{-webkit-transform:translateX(4px)}70%{-webkit-transform:translateX(-3px)}80%{-webkit-transform:translateX(2px)}90%{-webkit-transform:translateX(-1px)}}@keyframes uk-shake{0%,100%{transform:translateX(0)}10%{transform:translateX(-9px)}20%{transform:translateX(8px)}30%{transform:translateX(-7px)}40%{transform:translateX(6px)}50%{transform:translateX(-5px)}60%{transform:translateX(4px)}70%{transform:translateX(-3px)}80%{transform:translateX(2px)}90%{transform:translateX(-1px)}}@-webkit-keyframes uk-slide-top-fixed{0%{opacity:0;-webkit-transform:translateY(-10px)}100%{opacity:1;-webkit-transform:translateY(0)}}@keyframes uk-slide-top-fixed{0%{opacity:0;transform:translateY(-10px)}100%{opacity:1;transform:translateY(0)}}@-webkit-keyframes uk-slide-bottom-fixed{0%{opacity:0;-webkit-transform:translateY(10px)}100%{opacity:1;-webkit-transform:translateY(0)}}@keyframes uk-slide-bottom-fixed{0%{opacity:0;transform:translateY(10px)}100%{opacity:1;transform:translateY(0)}}.uk-dropdown,.uk-dropdown-blank{display:none;position:absolute;z-index:1020;box-sizing:border-box;width:200px}.uk-dropdown{padding:15px;background:#fff;color:#444;font-size:1rem;vertical-align:top;border:1px solid #ddd;border-radius:2px}.uk-dropdown:focus{outline:0}.uk-open>.uk-dropdown,.uk-open>.uk-dropdown-blank{display:block;-webkit-animation:uk-fade .2s ease-in-out;animation:uk-fade .2s ease-in-out;-webkit-transform-origin:0 0;transform-origin:0 0}.uk-dropdown-top{margin-top:-5px}.uk-dropdown-bottom{margin-top:5px}.uk-dropdown-left{margin-left:-5px}.uk-dropdown-right{margin-left:5px}.uk-dropdown .uk-nav{margin:0 -15px}.uk-dropdown-grid>[class*=uk-width-]>.uk-panel+.uk-panel,.uk-dropdown-stack>.uk-dropdown-grid>[class*=uk-width-]:nth-child(n+2),.uk-grid .uk-dropdown-grid+.uk-dropdown-grid{margin-top:15px}@media (min-width:768px){.uk-dropdown:not(.uk-dropdown-stack)>.uk-dropdown-grid{margin-left:-15px;margin-right:-15px}.uk-dropdown:not(.uk-dropdown-stack)>.uk-dropdown-grid>[class*=uk-width-]{padding-left:15px;padding-right:15px}.uk-dropdown:not(.uk-dropdown-stack)>.uk-dropdown-grid>[class*=uk-width-]:nth-child(n+2){border-left:1px solid #ddd}.uk-dropdown-width-2:not(.uk-dropdown-stack){width:400px}.uk-dropdown-width-3:not(.uk-dropdown-stack){width:600px}.uk-dropdown-width-4:not(.uk-dropdown-stack){width:800px}.uk-dropdown-width-5:not(.uk-dropdown-stack){width:1000px}}@media (max-width:767px){.uk-dropdown-grid>[class*=uk-width-]{width:100%}.uk-dropdown-grid>[class*=uk-width-]:nth-child(n+2){margin-top:15px}}.uk-dropdown-stack>.uk-dropdown-grid>[class*=uk-width-]{width:100%}.uk-dropdown-small{min-width:150px;width:auto;padding:5px}.uk-dropdown-small .uk-nav{margin:0 -5px}.uk-dropdown-navbar{margin-top:6px;background:#fff;color:#444;left:-1px}.uk-open>.uk-dropdown-navbar{-webkit-animation:uk-slide-top-fixed .2s ease-in-out;animation:uk-slide-top-fixed .2s ease-in-out}.uk-dropdown-scrollable{overflow-y:auto;max-height:200px}.uk-dropdown-navbar.uk-dropdown-flip{left:auto}.uk-modal{display:none;position:fixed;top:0;right:0;bottom:0;left:0;z-index:1010;overflow-y:auto;-webkit-overflow-scrolling:touch;background:rgba(0,0,0,.6);opacity:0;-webkit-transition:opacity .15s linear;transition:opacity .15s linear;touch-action:cross-slide-y pinch-zoom double-tap-zoom}.uk-modal.uk-open{opacity:1}.uk-modal-page,.uk-modal-page body{overflow:hidden}.uk-modal-dialog{position:relative;margin:50px auto;padding:20px;width:600px;max-width:100%;max-width:calc(100% - 20px);background:#fff;opacity:0;-webkit-transform:translateY(-100px);transform:translateY(-100px);-webkit-transition:opacity .3s linear,-webkit-transform .3s ease-out;transition:opacity .3s linear,transform .3s ease-out;border-radius:2px;box-shadow:0 0 10px rgba(0,0,0,.3)}@media (max-width:767px){.uk-modal-dialog{width:auto;margin:10px auto}}.uk-open .uk-modal-dialog{opacity:1;-webkit-transform:translateY(0);transform:translateY(0)}.uk-modal-dialog>:not([class*=uk-modal-]):last-child{margin-bottom:0}.uk-modal-dialog>.uk-close:first-child{margin:-10px -10px 0 0;float:right}.uk-modal-dialog>.uk-close:first-child+:not([class*=uk-modal-]){margin-top:0}.uk-modal-dialog-lightbox{margin:15px auto;padding:0;max-width:95%;max-width:calc(100% - 30px);min-height:50px;border-radius:0}.uk-modal-dialog-lightbox>.uk-close:first-child{position:absolute;top:-12px;right:-12px;margin:0;float:none}@media (max-width:767px){.uk-modal-dialog-lightbox>.uk-close:first-child{top:-7px;right:-7px}}.uk-modal-dialog-blank{margin:0;padding:0;width:100%;max-width:100%;-webkit-transition:opacity .3s linear;transition:opacity .3s linear}.uk-modal-dialog-blank>.uk-close:first-child{position:absolute;top:20px;right:20px;z-index:1;margin:0;float:none}@media (min-width:768px){.uk-modal-dialog-large{width:930px}}@media (min-width:1220px){.uk-modal-dialog-large{width:1130px}}.uk-modal-header{margin:-20px -20px 15px;padding:20px;border-bottom:1px solid #ddd;border-radius:2px 2px 0 0;background:#fafafa}.uk-modal-footer{margin:15px -20px -20px;padding:20px;border-top:1px solid #ddd;border-radius:0 0 2px 2px;background:#fafafa}.uk-modal-footer>:last-child,.uk-modal-header>:last-child{margin-bottom:0}.uk-modal-caption{position:absolute;left:0;right:0;bottom:-20px;margin-bottom:-10px;color:#fff;text-align:center;overflow:hidden;text-overflow:ellipsis}.uk-modal-spinner{position:absolute;top:50%;left:50%;-webkit-transform:translate(-50%,-50%);transform:translate(-50%,-50%);font-size:25px;color:#ddd}.uk-offcanvas,.uk-offcanvas-bar{position:fixed;left:0;top:0;bottom:0}.uk-modal-spinner:after{content:"\f110";display:block;font-family:FontAwesome;-webkit-animation:uk-rotate 2s infinite linear;animation:uk-rotate 2s infinite linear}.uk-clearfix:after,.uk-clearfix:before,.uk-container:after,.uk-container:before,.uk-offcanvas-bar:after{content:""}.uk-offcanvas{display:none;right:0;z-index:1000;touch-action:none;background:rgba(0,0,0,.1)}.uk-offcanvas.uk-active{display:block}.uk-offcanvas-page{position:fixed;-webkit-transition:margin-left .3s ease-in-out;transition:margin-left .3s ease-in-out;margin-left:0}.uk-offcanvas-bar{-webkit-transform:translateX(-100%);transform:translateX(-100%);z-index:1001;width:270px;max-width:100%;background:#333;overflow-y:auto;-webkit-overflow-scrolling:touch;-webkit-transition:-webkit-transform .3s ease-in-out;transition:transform .3s ease-in-out;-ms-scroll-chaining:none}.uk-offcanvas-bar-flip:after,.uk-offcanvas-bar:after{width:1px;background:rgba(0,0,0,.6);box-shadow:0 0 5px 2px rgba(0,0,0,.6)}.uk-offcanvas.uk-active .uk-offcanvas-bar.uk-offcanvas-bar-show{-webkit-transform:translateX(0);transform:translateX(0)}.uk-offcanvas-bar-flip{left:auto;right:0;-webkit-transform:translateX(100%);transform:translateX(100%)}.uk-offcanvas-bar[mode=none]{-webkit-transition:none;transition:none}.uk-offcanvas-bar[mode=reveal]{-webkit-transform:translateX(0);transform:translateX(0);clip:rect(0,0,100vh,0);-webkit-transition:-webkit-transform .3s ease-in-out,clip .3s ease-in-out;transition:transform .3s ease-in-out,clip .3s ease-in-out}.uk-offcanvas-bar-flip[mode=reveal]{clip:none;-webkit-transform:translateX(100%);transform:translateX(100%)}.uk-offcanvas-bar-flip[mode=reveal]>*{-webkit-transform:translateX(-100%);transform:translateX(-100%);-webkit-transition:-webkit-transform .3s ease-in-out;transition:transform .3s ease-in-out}.uk-offcanvas.uk-active .uk-offcanvas-bar-flip[mode=reveal].uk-offcanvas-bar-show>*{-webkit-transform:translateX(0);transform:translateX(0)}.uk-offcanvas .uk-panel{margin:20px 15px;color:#777;text-shadow:0 1px 0 rgba(0,0,0,.5)}.uk-offcanvas .uk-panel a:not([class]),.uk-offcanvas .uk-panel-title{color:#ccc}.uk-offcanvas .uk-panel a:not([class]):hover{color:#fff}.uk-offcanvas-bar:after{display:block;position:absolute;top:0;bottom:0;right:0}.uk-offcanvas-bar-flip:after{right:auto;left:0}.uk-switcher{margin:0;padding:0;list-style:none;touch-action:cross-slide-y pinch-zoom double-tap-zoom}.uk-switcher>:not(.uk-active){display:none}.uk-text-small{font-size:10px;line-height:15px}.uk-text-large{font-size:17px;line-height:22px;font-weight:400}.uk-text-bold{font-weight:700}.uk-text-muted{color:#999!important}.uk-text-primary{color:#337ab7!important}.uk-text-success{color:#5cb85c!important}.uk-text-warning{color:#f0ad4e!important}.uk-text-danger{color:#d9534f!important}.uk-text-contrast{color:#fff!important}.uk-text-left{text-align:left!important}.uk-text-right{text-align:right!important}.uk-text-center{text-align:center!important}.uk-text-justify{text-align:justify!important}.uk-text-top{vertical-align:top!important}.uk-text-middle{vertical-align:middle!important}.uk-text-bottom{vertical-align:bottom!important}@media (max-width:959px){.uk-text-center-medium{text-align:center!important}.uk-text-left-medium{text-align:left!important}}@media (max-width:767px){.uk-text-center-small{text-align:center!important}.uk-text-left-small{text-align:left!important}}.uk-text-truncate{overflow:hidden;text-overflow:ellipsis}.uk-text-break{word-wrap:break-word;-webkit-hyphens:auto;-ms-hyphens:auto;-moz-hyphens:auto;hyphens:auto}.uk-text-capitalize{text-transform:capitalize!important}.uk-text-lowercase{text-transform:lowercase!important}.uk-text-uppercase{text-transform:uppercase!important}.uk-container{max-width:980px;padding:0 25px}@media (min-width:1220px){.uk-container{max-width:1200px;padding:0 35px}}.uk-container:after,.uk-container:before{display:table}.uk-container-center{margin-left:auto;margin-right:auto}.uk-clearfix:before{display:table-cell}.uk-clearfix:after{display:table}.uk-nbfc{overflow:hidden}.uk-nbfc-alt{display:table-cell;width:10000px}.uk-float-left{float:left}.uk-float-right{float:right}[class*=uk-float-]{max-width:100%}[class*=uk-align-]{display:block;margin-bottom:15px}.uk-align-left{margin-right:15px;float:left}.uk-align-right{margin-left:15px;float:right}@media (min-width:768px){.uk-align-medium-left{margin-right:15px;float:left}.uk-align-medium-right{margin-left:15px;float:right}}.uk-align-center{margin-left:auto;margin-right:auto}.uk-vertical-align{font-size:0}.uk-vertical-align:before{content:'';display:inline-block;height:100%;vertical-align:middle}.uk-vertical-align-bottom,.uk-vertical-align-middle{display:inline-block;max-width:100%;font-size:1rem}.uk-vertical-align-middle{vertical-align:middle}.uk-vertical-align-bottom{vertical-align:bottom}.uk-autocomplete,.uk-form-file,.uk-form-select,.uk-search-field{vertical-align:middle}.uk-height-1-1{height:100%}.uk-height-viewport{height:100vh;min-height:600px}.uk-nestable-empty,.uk-sortable-empty{min-height:30px}.uk-responsive-width{max-width:100%!important;height:auto}.uk-responsive-height{max-height:100%;width:auto}.uk-margin{margin-bottom:15px}*+.uk-margin{margin-top:15px}.uk-margin-top{margin-top:15px!important}.uk-margin-bottom{margin-bottom:15px!important}.uk-margin-left{margin-left:15px!important}.uk-margin-right{margin-right:15px!important}.uk-margin-large{margin-bottom:50px}*+.uk-margin-large{margin-top:50px}.uk-margin-large-top{margin-top:50px!important}.uk-margin-large-bottom{margin-bottom:50px!important}.uk-margin-large-left{margin-left:50px!important}.uk-margin-large-right{margin-right:50px!important}.uk-margin-small{margin-bottom:5px}*+.uk-margin-small{margin-top:5px}.uk-margin-small-top{margin-top:5px!important}.uk-margin-small-bottom{margin-bottom:5px!important}.uk-margin-small-left{margin-left:5px!important}.uk-margin-small-right{margin-right:5px!important}.uk-margin-remove{margin:0!important}.uk-margin-top-remove{margin-top:0!important}.uk-margin-bottom-remove{margin-bottom:0!important}.uk-overflow-container>:last-child,.uk-scrollable-box>:last-child{margin-bottom:0}.uk-padding-remove{padding:0!important}.uk-padding-top-remove{padding-top:0!important}.uk-padding-bottom-remove{padding-bottom:0!important}.uk-padding-vertical-remove{padding-top:0!important;padding-bottom:0!important}.uk-border-circle{border-radius:50%}.uk-border-rounded{border-radius:5px}.uk-heading-large{font-size:34px;line-height:39px}@media (min-width:768px){.uk-heading-large{font-size:48px;line-height:59px}}.uk-link-muted,.uk-link-muted a,.uk-link-muted a:hover,.uk-link-muted:hover{color:#444}.uk-link-reset,.uk-link-reset a,.uk-link-reset a:focus,.uk-link-reset a:hover,.uk-link-reset:focus,.uk-link-reset:hover{color:inherit;text-decoration:none}.uk-scrollable-text{height:300px;overflow-y:scroll;-webkit-overflow-scrolling:touch;resize:both}.uk-scrollable-box{height:170px;padding:10px;border:1px solid #ddd;overflow:auto;-webkit-overflow-scrolling:touch;resize:both;border-radius:3px}.uk-contrast .uk-nav-side .uk-nav-divider,.uk-contrast hr{border-top-color:rgba(255,255,255,.2)}.uk-overflow-hidden{overflow:hidden}.uk-overflow-container{overflow:auto;-webkit-overflow-scrolling:touch}.uk-position-absolute,[class*=uk-position-top],[class*=uk-position-bottom]{position:absolute!important}.uk-position-top{top:0;left:0;right:0}.uk-position-bottom{bottom:0;left:0;right:0}.uk-position-top-left{top:0;left:0}.uk-position-top-right{top:0;right:0}.uk-position-bottom-left{bottom:0;left:0}.uk-position-bottom-right{bottom:0;right:0}.uk-position-cover{position:absolute;top:0;bottom:0;left:0;right:0}.uk-position-relative{position:relative!important}.uk-position-z-index{z-index:1}.uk-display-block{display:block!important}.uk-display-inline{display:inline!important}.uk-display-inline-block{display:inline-block!important;max-width:100%}@media (min-width:960px){.uk-hidden-large,.uk-visible-medium,.uk-visible-small{display:none!important}}@media (min-width:768px) and (max-width:959px){.uk-hidden-medium,.uk-visible-large,.uk-visible-small{display:none!important}}@media (max-width:767px){.uk-hidden-small,.uk-visible-large,.uk-visible-medium{display:none!important}}.uk-hidden{display:none!important;visibility:hidden!important}.uk-invisible{visibility:hidden!important}.uk-visible-hover:hover .uk-hidden,.uk-visible-hover:hover .uk-invisible{display:block!important;visibility:visible!important}.uk-visible-hover-inline:hover .uk-hidden,.uk-visible-hover-inline:hover .uk-invisible{display:inline-block!important;visibility:visible!important}.uk-notouch .uk-hidden-notouch,.uk-touch .uk-hidden-touch{display:none!important}.uk-flex{display:-ms-flexbox;display:-webkit-flex;display:flex}.uk-flex-inline{display:-ms-inline-flexbox;display:-webkit-inline-flex;display:inline-flex}.uk-flex-inline>*,.uk-flex>*{-ms-flex-negative:1}.uk-flex-top{-ms-flex-align:start;-webkit-align-items:flex-start;align-items:flex-start}.uk-flex-middle{-ms-flex-align:center;-webkit-align-items:center;align-items:center}.uk-flex-bottom{-ms-flex-align:end;-webkit-align-items:flex-end;align-items:flex-end}.uk-flex-center{-ms-flex-pack:center;-webkit-justify-content:center;justify-content:center}.uk-flex-right{-ms-flex-pack:end;-webkit-justify-content:flex-end;justify-content:flex-end}.uk-flex-space-between{-ms-flex-pack:justify;-webkit-justify-content:space-between;justify-content:space-between}.uk-flex-space-around{-ms-flex-pack:distribute;-webkit-justify-content:space-around;justify-content:space-around}.uk-flex-row-reverse{-ms-flex-direction:row-reverse;-webkit-flex-direction:row-reverse;flex-direction:row-reverse}.uk-flex-column{-ms-flex-direction:column;-webkit-flex-direction:column;flex-direction:column}.uk-flex-column-reverse{-ms-flex-direction:column-reverse;-webkit-flex-direction:column-reverse;flex-direction:column-reverse}.uk-flex-nowrap{-ms-flex-wrap:nowrap;-webkit-flex-wrap:nowrap;flex-wrap:nowrap}.uk-flex-wrap{-ms-flex-wrap:wrap;-webkit-flex-wrap:wrap;flex-wrap:wrap}.uk-flex-wrap-reverse{-ms-flex-wrap:wrap-reverse;-webkit-flex-wrap:wrap-reverse;flex-wrap:wrap-reverse}.uk-flex-wrap-top{-ms-flex-line-pack:start;-webkit-align-content:flex-start;align-content:flex-start}.uk-flex-wrap-middle{-ms-flex-line-pack:center;-webkit-align-content:center;align-content:center}.uk-flex-wrap-bottom{-ms-flex-line-pack:end;-webkit-align-content:flex-end;align-content:flex-end}.uk-flex-wrap-space-between{-ms-flex-line-pack:justify;-webkit-align-content:space-between;align-content:space-between}.uk-flex-wrap-space-around{-ms-flex-line-pack:distribute;-webkit-align-content:space-around;align-content:space-around}.uk-flex-order-first{-ms-flex-order:-1;-webkit-order:-1;order:-1}.uk-flex-order-last{-ms-flex-order:99;-webkit-order:99;order:99}@media (min-width:480px){.uk-flex-order-first-small{-ms-flex-order:-1;-webkit-order:-1;order:-1}.uk-flex-order-last-small{-ms-flex-order:99;-webkit-order:99;order:99}}@media (min-width:768px){.uk-flex-order-first-medium{-ms-flex-order:-1;-webkit-order:-1;order:-1}.uk-flex-order-last-medium{-ms-flex-order:99;-webkit-order:99;order:99}}@media (min-width:960px){.uk-flex-order-first-large{-ms-flex-order:-1;-webkit-order:-1;order:-1}.uk-flex-order-last-large{-ms-flex-order:99;-webkit-order:99;order:99}}@media (min-width:1220px){.uk-flex-order-first-xlarge{-ms-flex-order:-1;-webkit-order:-1;order:-1}.uk-flex-order-last-xlarge{-ms-flex-order:99;-webkit-order:99;order:99}}.uk-flex-item-none{-ms-flex:none;-webkit-flex:none;flex:none}.uk-flex-item-auto{-ms-flex:auto;-webkit-flex:auto;flex:auto;-ms-flex-negative:1}.uk-flex-item-1{-ms-flex:1;-webkit-flex:1;flex:1}.uk-contrast{color:#fff}.uk-contrast .uk-link,.uk-contrast a:not([class]){color:rgba(255,255,255,.7);text-decoration:none}.uk-contrast .uk-link:hover,.uk-contrast a:not([class]):hover{color:#fff;text-decoration:underline}.uk-contrast :not(pre)>code,.uk-contrast :not(pre)>kbd,.uk-contrast :not(pre)>samp{color:#fff;border-color:rgba(255,255,255,.2);background:rgba(255,255,255,.1)}.uk-contrast em,.uk-contrast h1,.uk-contrast h2,.uk-contrast h3,.uk-contrast h4,.uk-contrast h5,.uk-contrast h6{color:#fff}.uk-contrast .uk-nav li>a,.uk-contrast .uk-nav li>a:hover{text-decoration:none}.uk-contrast .uk-nav-side>li>a{color:#fff}.uk-contrast .uk-nav-side>li>a:focus,.uk-contrast .uk-nav-side>li>a:hover{background:rgba(255,255,255,.1);color:#fff;text-shadow:none}.uk-contrast .uk-nav-side>li.uk-active>a{background:#fff;color:#444;text-shadow:none}.uk-contrast .uk-nav-side .uk-nav-header{color:#fff}.uk-contrast .uk-nav-side ul a{color:rgba(255,255,255,.7)}.uk-contrast .uk-nav-side ul a:hover{color:#fff}.uk-contrast .uk-subnav>*>a{color:rgba(255,255,255,.7);text-decoration:none}.uk-contrast .uk-subnav>*>a:focus,.uk-contrast .uk-subnav>*>a:hover{color:#fff;text-decoration:none}.uk-contrast .uk-subnav>.uk-active>a{color:#fff}.uk-contrast .uk-subnav-line>:nth-child(n+2):before{border-left-color:rgba(255,255,255,.2)}.uk-contrast .uk-subnav-pill>*>a:focus,.uk-contrast .uk-subnav-pill>*>a:hover{background:rgba(255,255,255,.7);color:#444;text-decoration:none}.uk-contrast .uk-subnav-pill>.uk-active>a{background:#fff;color:#444}.uk-contrast .uk-tab{border-bottom-color:rgba(255,255,255,.2)}.uk-contrast .uk-tab>li>a{border-color:transparent;color:rgba(255,255,255,.7);text-shadow:none}.uk-contrast .uk-tab>li.uk-open>a,.uk-contrast .uk-tab>li>a:focus,.uk-contrast .uk-tab>li>a:hover{border-color:rgba(255,255,255,.7);background:rgba(255,255,255,.7);color:#444;text-decoration:none}.uk-contrast .uk-tab>li.uk-active>a{border-color:rgba(255,255,255,.2);border-bottom-color:transparent;background:#fff;color:#444}.uk-contrast .uk-tab-center{border-bottom-color:rgba(255,255,255,.2)}.uk-contrast .uk-list-line>li:nth-child(n+2),.uk-contrast .uk-tab-grid:before{border-top-color:rgba(255,255,255,.2)}.uk-contrast .uk-form input:not([type]),.uk-contrast .uk-form input[type=text],.uk-contrast .uk-form input[type=password],.uk-contrast .uk-form input[type=email],.uk-contrast .uk-form input[type=url],.uk-contrast .uk-form input[type=search],.uk-contrast .uk-form input[type=tel],.uk-contrast .uk-form input[type=number],.uk-contrast .uk-form input[type=datetime],.uk-contrast .uk-form input[type=datetime-local],.uk-contrast .uk-form input[type=date],.uk-contrast .uk-form input[type=month],.uk-contrast .uk-form input[type=time],.uk-contrast .uk-form input[type=week],.uk-contrast .uk-form input[type=color],.uk-contrast .uk-form select,.uk-contrast .uk-form textarea{border-color:rgba(255,255,255,.8);background:rgba(255,255,255,.8);color:#444;background-clip:padding-box}.uk-contrast .uk-form input:not([type]):focus,.uk-contrast .uk-form input[type=text]:focus,.uk-contrast .uk-form input[type=password]:focus,.uk-contrast .uk-form input[type=email]:focus,.uk-contrast .uk-form input[type=url]:focus,.uk-contrast .uk-form input[type=search]:focus,.uk-contrast .uk-form input[type=tel]:focus,.uk-contrast .uk-form input[type=number]:focus,.uk-contrast .uk-form input[type=datetime]:focus,.uk-contrast .uk-form input[type=datetime-local]:focus,.uk-contrast .uk-form input[type=date]:focus,.uk-contrast .uk-form input[type=month]:focus,.uk-contrast .uk-form input[type=time]:focus,.uk-contrast .uk-form input[type=week]:focus,.uk-contrast .uk-form input[type=color]:focus,.uk-contrast .uk-form select:focus,.uk-contrast .uk-form textarea:focus{border-color:#fff;background:#fff;color:#444}.uk-contrast .uk-form :-ms-input-placeholder{color:rgba(68,68,68,.7)!important}.uk-contrast .uk-form ::-moz-placeholder{color:rgba(68,68,68,.7)}.uk-contrast .uk-form ::-webkit-input-placeholder{color:rgba(68,68,68,.7)}.uk-contrast .uk-button{color:#444;background:#fff;border-color:transparent}.uk-contrast .uk-button:focus,.uk-contrast .uk-button:hover{background-color:rgba(255,255,255,.8);color:#444;border-color:transparent}.uk-contrast .uk-button.uk-active,.uk-contrast .uk-button:active{background-color:rgba(255,255,255,.7);color:#444}.uk-contrast .uk-button-primary{background-color:#337ab7;color:#fff}.uk-contrast .uk-button-primary:focus,.uk-contrast .uk-button-primary:hover{background-color:#286090;color:#fff}.uk-contrast .uk-button-primary.uk-active,.uk-contrast .uk-button-primary:active{background-color:#0091ca;color:#fff}.uk-contrast .uk-icon-hover{color:rgba(255,255,255,.7)}.uk-contrast .uk-icon-hover:hover{color:#fff}.uk-contrast .uk-icon-button{background:#fff;color:#444;border-color:transparent}.uk-contrast .uk-icon-button:focus,.uk-contrast .uk-icon-button:hover{background-color:rgba(255,255,255,.8);color:#444;border-color:transparent}.uk-contrast .uk-icon-button:active{background-color:rgba(255,255,255,.7);color:#444}.uk-contrast .uk-text-muted{color:rgba(255,255,255,.6)!important}.uk-contrast .uk-text-primary{color:#337ab7!important}@media print{blockquote,img,pre,tr{page-break-inside:avoid}*,:after,:before{background:0 0!important;color:#000!important;box-shadow:none!important;text-shadow:none!important}a,a:visited{text-decoration:underline}blockquote,pre{border:1px solid #999}thead{display:table-header-group}img{max-width:100%!important}@page{margin:.5cm}h2,h3,p{orphans:3;widows:3}h2,h3{page-break-after:avoid}}.uk-dotnav{display:-ms-flexbox;display:-webkit-flex;display:flex;-ms-flex-wrap:wrap;-webkit-flex-wrap:wrap;flex-wrap:wrap;margin-left:-15px;margin-top:-15px;padding:0;list-style:none}.uk-dotnav>*{-ms-flex:none;-webkit-flex:none;flex:none;padding-left:15px;margin-top:15px;float:left}.uk-dotnav:after,.uk-dotnav:before{content:"";display:block;overflow:hidden}.uk-dotnav>*>*{display:block;box-sizing:content-box;width:20px;height:20px;border-radius:50%;background:rgba(50,50,50,.1);text-indent:100%;overflow:hidden;-webkit-transition:all .2s ease-in-out;transition:all .2s ease-in-out}.uk-htmleditor .CodeMirror,.uk-htmleditor-code,.uk-htmleditor-preview,.uk-notify,.uk-progress,.uk-search-field,.uk-slidenav,.uk-tooltip,[data-uk-sticky].uk-active{box-sizing:border-box}.uk-dotnav>*>:focus,.uk-dotnav>*>:hover{background:rgba(50,50,50,.4);outline:0}.uk-dotnav>*>:active{background:rgba(50,50,50,.6)}.uk-dotnav>.uk-active>*{background:rgba(50,50,50,.4);-webkit-transform:scale(1.3);transform:scale(1.3)}.uk-dotnav-contrast>*>*{background:rgba(255,255,255,.4)}.uk-dotnav-contrast>*>:focus,.uk-dotnav-contrast>*>:hover{background:rgba(255,255,255,.7)}.uk-dotnav-contrast>*>:active,.uk-dotnav-contrast>.uk-active>*{background:rgba(255,255,255,.9)}.uk-dotnav-vertical{-ms-flex-direction:column;-webkit-flex-direction:column;flex-direction:column}.uk-dotnav-vertical>*{float:none}.uk-slidenav{display:inline-block;width:60px;height:60px;line-height:60px;color:rgba(50,50,50,.4);font-size:60px;text-align:center}.uk-slidenav:focus,.uk-slidenav:hover{outline:0;text-decoration:none;color:rgba(50,50,50,.7);cursor:pointer}.uk-slidenav:active{color:rgba(50,50,50,.9)}.uk-slidenav-previous:before{content:"\f104";font-family:FontAwesome}.uk-slidenav-next:before{content:"\f105";font-family:FontAwesome}.uk-slidenav-position{position:relative}.uk-slidenav-position .uk-slidenav{display:none;position:absolute;top:50%;z-index:1;margin-top:-30px}.uk-slidenav-position:hover .uk-slidenav{display:block}.uk-slidenav-position .uk-slidenav-previous{left:20px}.uk-slidenav-position .uk-slidenav-next{right:20px}.uk-slidenav-contrast{color:rgba(255,255,255,.5)}.uk-slidenav-contrast:focus,.uk-slidenav-contrast:hover{color:rgba(255,255,255,.7)}.uk-slidenav-contrast:active{color:rgba(255,255,255,.9)}.uk-form input[type=checkbox],.uk-form input[type=radio]{display:inline-block;height:14px;width:14px;border:1px solid #aaa;overflow:hidden;margin-top:-4px;vertical-align:middle;-webkit-appearance:none;outline:0;background:0 0}.uk-form input[type=radio]{border-radius:50%}.uk-form input[type=checkbox]:before,.uk-form input[type=radio]:before{display:block}.uk-form input[type=radio]:checked:before{content:'';width:8px;height:8px;margin:2px auto 0;border-radius:50%;background:#337ab7}.uk-form input[type=checkbox]:checked:before,.uk-form input[type=checkbox]:indeterminate:before{content:"\f00c";font-family:FontAwesome;font-size:12px;-webkit-font-smoothing:antialiased;text-align:center;line-height:12px;color:#337ab7}.uk-form input[type=checkbox]:indeterminate:before{content:"\f068"}.uk-form input[type=checkbox]:disabled,.uk-form input[type=radio]:disabled{border-color:#ddd}.uk-form input[type=radio]:disabled:checked:before{background-color:#aaa}.uk-form input[type=checkbox]:disabled:checked:before,.uk-form input[type=checkbox]:disabled:indeterminate:before{color:#aaa}.uk-form-file{display:inline-block;position:relative;overflow:hidden}.uk-form-file input[type=file]{position:absolute;top:0;z-index:1;width:100%;opacity:0;cursor:pointer;left:0;font-size:500px}.uk-form-password{display:inline-block;position:relative;max-width:100%}.uk-form-password-toggle{display:block;position:absolute;top:50%;right:10px;margin-top:-6px;font-size:12px;line-height:12px;color:#999}*+.uk-placeholder,*+.uk-progress{margin-top:15px}.uk-form-password-toggle:hover{color:#999;text-decoration:none}.uk-form-password>input{padding-right:50px!important}.uk-form-select{display:inline-block;position:relative;overflow:hidden}.uk-form-select select{position:absolute;top:0;z-index:1;width:100%;height:100%;opacity:0;cursor:pointer;left:0;-webkit-appearance:none}.uk-placeholder{margin-bottom:15px;padding:15px;border:1px dashed #ddd;background:#fafafa;color:#444}.uk-placeholder>:last-child{margin-bottom:0}.uk-placeholder-large{padding-top:80px;padding-bottom:80px}.uk-progress{height:20px;margin-bottom:15px;background:#f5f5f5;overflow:hidden;line-height:20px;box-shadow:inset 0 0 0 1px rgba(0,0,0,.06);border-radius:2px}.uk-nav-autocomplete>li.uk-active>a,.uk-progress-bar{box-shadow:inset 0 0 5px rgba(0,0,0,.05);text-shadow:0 -1px 0 rgba(0,0,0,.1)}.uk-progress-bar{width:0;height:100%;background:#337ab7;float:left;-webkit-transition:width .6s ease;transition:width .6s ease;font-size:11px;color:#fff;text-align:center}.uk-progress-mini{height:6px}.uk-progress-small{height:12px}.uk-progress-success .uk-progress-bar{background-color:#5cb85c}.uk-progress-warning .uk-progress-bar{background-color:#f0ad4e}.uk-progress-danger .uk-progress-bar{background-color:#d9534f}.uk-progress-striped .uk-progress-bar{background-image:-webkit-linear-gradient(-45deg,rgba(255,255,255,.15) 25%,transparent 25%,transparent 50%,rgba(255,255,255,.15) 50%,rgba(255,255,255,.15) 75%,transparent 75%,transparent);background-image:linear-gradient(-45deg,rgba(255,255,255,.15) 25%,transparent 25%,transparent 50%,rgba(255,255,255,.15) 50%,rgba(255,255,255,.15) 75%,transparent 75%,transparent);background-size:30px 30px}.uk-progress-striped.uk-active .uk-progress-bar{-webkit-animation:uk-progress-bar-stripes 2s linear infinite;animation:uk-progress-bar-stripes 2s linear infinite}@-webkit-keyframes uk-progress-bar-stripes{0%{background-position:0 0}100%{background-position:30px 0}}@keyframes uk-progress-bar-stripes{0%{background-position:0 0}100%{background-position:30px 0}}.uk-progress-mini,.uk-progress-small{border-radius:500px}.uk-accordion-title{margin-top:0;margin-bottom:15px;padding:5px 15px;background:#f5f5f5;font-size:17px;line-height:22px;cursor:pointer;border:1px solid #ddd;border-radius:2px}.uk-accordion-content{padding:0 15px 15px}.uk-accordion-content:after,.uk-accordion-content:before{content:"";display:table}.uk-accordion-content>:last-child{margin-bottom:0}.uk-autocomplete{display:inline-block;position:relative;max-width:100%}.uk-dropdown-flip{left:auto;right:0}.uk-nav-autocomplete>li>a{color:#444}.uk-nav-autocomplete>li.uk-active>a{background:#337ab7;color:#fff;outline:0}.uk-nav-autocomplete .uk-nav-header{color:#999}.uk-nav-autocomplete .uk-nav-divider{border-top:1px solid #ddd}.uk-datepicker{z-index:1050;width:auto;-webkit-animation:uk-fade .2s ease-in-out;animation:uk-fade .2s ease-in-out;-webkit-transform-origin:0 0;transform-origin:0 0}.uk-datepicker-nav{margin-bottom:15px;text-align:center;line-height:20px}.uk-datepicker-nav:after,.uk-datepicker-nav:before{content:"";display:table}.uk-datepicker-nav a{color:#444;text-decoration:none}.uk-datepicker-nav a:hover{color:#444}.uk-datepicker-previous{float:left}.uk-datepicker-next,.uk-htmleditor-navbar-flip{float:right}.uk-datepicker-next:after,.uk-datepicker-previous:after{width:20px;font-family:FontAwesome}.uk-datepicker-previous:after{content:"\f053"}.uk-datepicker-next:after{content:"\f054"}.uk-datepicker-table{width:100%}.uk-datepicker-table td,.uk-datepicker-table th{padding:2px}.uk-datepicker-table th{font-size:12px}.uk-datepicker-table a{display:block;width:26px;line-height:24px;text-align:center;color:#444;text-decoration:none;border:1px solid transparent;border-radius:2px}a.uk-datepicker-table-muted{color:#999}.uk-datepicker-table a:focus,.uk-datepicker-table a:hover{background-color:#fafafa;color:#444;outline:0;border-color:rgba(0,0,0,.16);text-shadow:0 1px 0 #fff}.uk-datepicker-table a.uk-active,.uk-nav-search>li.uk-active>a{box-shadow:inset 0 0 5px rgba(0,0,0,.05);text-shadow:0 -1px 0 rgba(0,0,0,.1)}.uk-datepicker-table a:active{background-color:#eee;color:#444}.uk-datepicker-table a.uk-active{background:#337ab7;color:#fff}.uk-htmleditor-navbar{background:#f5f5f5;border:1px solid rgba(0,0,0,.06);border-top-left-radius:2px;border-top-right-radius:2px}.uk-htmleditor-navbar:after,.uk-htmleditor-navbar:before{content:"";display:table}.uk-htmleditor-navbar-nav{margin:0;padding:0;list-style:none;float:left}.uk-htmleditor-navbar-nav>li{float:left}.uk-htmleditor-navbar-nav>li>a{display:block;box-sizing:border-box;text-decoration:none;height:41px;padding:0 15px;line-height:40px;color:#444;font-size:11px;cursor:pointer;margin-top:-1px;margin-left:-1px;border:1px solid transparent;border-bottom-width:0;text-shadow:0 1px 0 #fff}.uk-htmleditor-navbar-nav>li.uk-active>a,.uk-htmleditor-navbar-nav>li:hover>a,.uk-htmleditor-navbar-nav>li>a:active,.uk-htmleditor-navbar-nav>li>a:focus{border-left-color:rgba(0,0,0,.1);border-right-color:rgba(0,0,0,.1);color:#444}.uk-htmleditor-navbar-nav>li:hover>a,.uk-htmleditor-navbar-nav>li>a:focus{background-color:#fafafa;outline:0;position:relative;z-index:1;border-top-color:rgba(0,0,0,.1)}.uk-htmleditor-navbar-nav>li>a:active{background-color:#eee;border-top-color:rgba(0,0,0,.2)}.uk-htmleditor-navbar-nav>li.uk-active>a{background-color:#fafafa;border-top-color:rgba(0,0,0,.1)}[data-mode=split] .uk-htmleditor-button-code,[data-mode=split] .uk-htmleditor-button-preview{display:none}.uk-htmleditor-content{border-left:1px solid #ddd;border-right:1px solid #ddd;border-bottom:1px solid #ddd;background:#fff;border-bottom-left-radius:2px;border-bottom-right-radius:2px}.uk-htmleditor-content:after,.uk-htmleditor-content:before{content:"";display:table}.uk-htmleditor-fullscreen{position:fixed;top:0;left:0;right:0;bottom:0;z-index:990}.uk-htmleditor-fullscreen .uk-htmleditor-content{position:absolute;top:41px;left:0;right:0;bottom:0}.uk-htmleditor-fullscreen .uk-icon-expand:before{content:"\f066"}.uk-htmleditor-preview{padding:20px;overflow-y:scroll;position:relative}.uk-slider-container,.uk-slideshow{overflow:hidden}[data-mode=tab][data-active-tab=code] .uk-htmleditor-preview,[data-mode=tab][data-active-tab=preview] .uk-htmleditor-code{display:none}[data-mode=split] .uk-htmleditor-code,[data-mode=split] .uk-htmleditor-preview{float:left;width:50%}[data-mode=split] .uk-htmleditor-code{border-right:1px solid #eee}.uk-htmleditor-iframe{position:absolute;top:0;left:0;width:100%;height:100%}.uk-htmleditor .CodeMirror{padding:10px}.uk-htmleditor-navbar-nav:first-child>li:first-child>a{border-top-left-radius:2px}.uk-htmleditor-navbar-flip .uk-htmleditor-navbar-nav>li>a{margin-left:0;margin-right:-1px}.uk-htmleditor-navbar-flip .uk-htmleditor-navbar-nav:first-child>li:first-child>a{border-top-left-radius:0}.uk-htmleditor-navbar-flip .uk-htmleditor-navbar-nav:last-child>li:last-child>a{border-top-right-radius:2px}.uk-htmleditor-fullscreen .uk-htmleditor-navbar{border-top:none;border-left:none;border-right:none;border-radius:0}.uk-htmleditor-fullscreen .uk-htmleditor-content{border:none;border-radius:0}.uk-htmleditor-fullscreen .uk-htmleditor-navbar-nav>li>a{border-radius:0!important}.uk-slideshow{position:relative;z-index:0;width:100%;margin:0;padding:0;list-style:none;touch-action:pan-y}.uk-nestable-handle,.uk-nestable-item{touch-action:none}.uk-slideshow>li{position:absolute;top:0;left:0;width:100%;opacity:0}.uk-slideshow>.uk-active{z-index:10;opacity:1}.uk-slideshow>li>img{visibility:hidden}[data-uk-slideshow-slide]{cursor:pointer}.uk-slideshow-fullscreen,.uk-slideshow-fullscreen>li{height:100vh}.uk-slideshow-fade-in{-webkit-animation:uk-fade .5s linear;animation:uk-fade .5s linear}.uk-slideshow-fade-out{-webkit-animation:uk-fade .5s linear reverse;animation:uk-fade .5s linear reverse}.uk-slideshow-scroll-forward-in{-webkit-animation:uk-slide-right .5s ease-in-out;animation:uk-slide-right .5s ease-in-out}.uk-slideshow-scroll-forward-out{-webkit-animation:uk-slide-left .5s ease-in-out reverse;animation:uk-slide-left .5s ease-in-out reverse}.uk-slideshow-scroll-backward-in{-webkit-animation:uk-slide-left .5s ease-in-out;animation:uk-slide-left .5s ease-in-out}.uk-slideshow-scroll-backward-out{-webkit-animation:uk-slide-right .5s ease-in-out reverse;animation:uk-slide-right .5s ease-in-out reverse}.uk-slideshow-scale-out{-webkit-animation:uk-fade-scale-15 .5s ease-in-out reverse;animation:uk-fade-scale-15 .5s ease-in-out reverse}.uk-slideshow-swipe-forward-in{-webkit-animation:uk-slide-left-33 .5s ease-in-out;animation:uk-slide-left-33 .5s ease-in-out}.uk-slideshow-swipe-forward-out{-webkit-animation:uk-slide-left .5s ease-in-out reverse;animation:uk-slide-left .5s ease-in-out reverse}.uk-slideshow-swipe-backward-in{-webkit-animation:uk-slide-right-33 .5s ease-in-out;animation:uk-slide-right-33 .5s ease-in-out}.uk-slideshow-swipe-backward-out{-webkit-animation:uk-slide-right .5s ease-in-out reverse;animation:uk-slide-right .5s ease-in-out reverse}.uk-slideshow-swipe-backward-in:before,.uk-slideshow-swipe-forward-in:before{content:'';position:absolute;top:0;bottom:0;left:0;right:0;z-index:1;background:rgba(0,0,0,.6);-webkit-animation:uk-fade .5s ease-in-out reverse;animation:uk-fade .5s ease-in-out reverse}.uk-notify{position:fixed;top:10px;left:10px;z-index:1040;width:350px}.uk-notify-bottom-right,.uk-notify-top-right{left:auto;right:10px}.uk-notify-bottom-center,.uk-notify-top-center{left:50%;margin-left:-175px}.uk-notify-bottom-center,.uk-notify-bottom-left,.uk-notify-bottom-right{top:auto;bottom:10px}@media (max-width:479px){.uk-notify{left:10px;right:10px;width:auto;margin:0}}.uk-notify-message{position:relative;margin-bottom:10px;padding:15px;background:#444;color:#fff;font-size:15px;line-height:20px;cursor:pointer;border:1px solid #444;border-radius:2px}.uk-notify-message>.uk-close{visibility:hidden;float:right}.uk-notify-message:hover>.uk-close{visibility:visible}.uk-notify-message-primary{background:#ebf7fd;color:#2d7091;border-color:rgba(45,112,145,.3)}.uk-notify-message-success{background:#f2fae3;color:#659f13;border-color:rgba(101,159,19,.3)}.uk-notify-message-warning{background:#fffceb;color:#e28327;border-color:rgba(226,131,39,.3)}.uk-notify-message-danger{background:#fff1f0;color:#d85030;border-color:rgba(216,80,48,.3)}.uk-search{display:inline-block;position:relative;margin:0}.uk-search:before{content:"\f002";position:absolute;top:0;left:0;width:30px;line-height:32px;text-align:center;font-family:FontAwesome;font-size:14px;color:rgba(0,0,0,.2)}.uk-search-field::-moz-focus-inner{border:0;padding:0}.uk-search-field::-webkit-search-cancel-button,.uk-search-field::-webkit-search-decoration{-webkit-appearance:none}.uk-search-field::-ms-clear{display:none}.uk-search-field{margin:0;border-radius:0;font:inherit;color:#444;-webkit-appearance:none;width:120px;height:32px;padding:0 0 0 30px;border:1px solid transparent;background:rgba(0,0,0,0);-webkit-transition:all .2s linear;transition:all .2s linear}.uk-search-field:-ms-input-placeholder{color:#999!important}.uk-search-field::-moz-placeholder{opacity:1;color:#999}.uk-search-field::-webkit-input-placeholder{color:#999}.uk-search-field:focus{outline:0}.uk-search-field:focus,.uk-search.uk-active .uk-search-field{width:180px}.uk-dropdown-search{width:300px;margin-top:0;background:#fff;color:#444}.uk-open>.uk-dropdown-search{-webkit-animation:uk-slide-top-fixed .2s ease-in-out;animation:uk-slide-top-fixed .2s ease-in-out}.uk-navbar-flip .uk-dropdown-search{margin-top:12px;margin-right:-16px}.uk-nav-search>li>a{color:#444}.uk-nav-search>li.uk-active>a{background:#337ab7;color:#fff;outline:0}.uk-nav-search .uk-nav-header{color:#999}.uk-nav-search .uk-nav-divider{border-top:1px solid #ddd}.uk-nav-search ul a{color:#337ab7}.uk-nav-search ul a:hover{color:#23527c}.uk-offcanvas .uk-search{display:block;margin:20px 15px}.uk-offcanvas .uk-search:before{color:#777}.uk-offcanvas .uk-search-field{width:100%;border-color:transparent;background:#1a1a1a;color:#ccc}.uk-offcanvas .uk-search-field:-ms-input-placeholder{color:#777!important}.uk-offcanvas .uk-search-field::-moz-placeholder{color:#777}.uk-offcanvas .uk-search-field::-webkit-input-placeholder{color:#777}.uk-nestable{padding:0;list-style:none}.uk-nestable-list{margin:0;padding-left:40px;list-style:none}.uk-nestable-item+.uk-nestable-item,.uk-nestable-list:not(.uk-nestable-dragged)>.uk-nestable-item:first-child{margin-top:10px}.uk-nestable-dragged{position:absolute;z-index:1050;padding-left:0}.uk-nestable-placeholder{position:relative}.uk-nestable-placeholder>*{opacity:0}.uk-nestable-placeholder:after{content:'';position:absolute;top:0;bottom:0;left:0;right:0;border:1px dashed #ddd;opacity:1}.uk-nestable-handle:hover,.uk-nestable-moving,.uk-nestable-moving *{cursor:move}[data-nestable-action=toggle]{cursor:pointer;-moz-user-select:none;-webkit-user-select:none;-ms-user-select:none;user-select:none}.uk-nestable-toggle{display:inline-block;visibility:hidden}.uk-collapsed .uk-nestable-list,.uk-tooltip{display:none}.uk-nestable-toggle:after{content:"\f147";font-family:FontAwesome}.uk-parent>:not(.uk-nestable-list) .uk-nestable-toggle{visibility:visible}.uk-collapsed .uk-nestable-toggle:after{content:"\f196"}.uk-nestable-panel{padding:5px;background:#f5f5f5;border-radius:2px;border:1px solid rgba(0,0,0,.06);text-shadow:0 1px 0 #fff}[data-uk-slider]{direction:ltr}html[dir=rtl] .uk-slider>*{direction:rtl}.uk-slider{position:relative;z-index:0;touch-action:pan-y}.uk-sortable-handle,.uk-sortable>*{touch-action:none}.uk-slider:not(.uk-grid){margin:0;padding:0;list-style:none}.uk-slider>*{position:absolute;top:0;left:0}.uk-slider:not(.uk-drag){-webkit-transition:-webkit-transform .2s linear;transition:transform .2s linear}.uk-slider.uk-drag{cursor:col-resize;-moz-user-select:none;-webkit-user-select:none;-ms-user-select:none;user-select:none}.uk-slider a,.uk-slider img{-webkit-user-drag:none;user-drag:none;-webkit-touch-callout:none}.uk-slider-fullscreen,.uk-slider-fullscreen>li{height:100vh}.uk-sortable{position:relative}.uk-sortable>:last-child{margin-bottom:0}.uk-sortable-dragged{position:absolute;z-index:1050}.uk-sortable-placeholder{opacity:0}.uk-sortable-handle:hover,.uk-sortable-moving,.uk-sortable-moving *{cursor:move}[data-uk-sticky].uk-active{z-index:980;-webkit-backface-visibility:hidden}[data-uk-sticky].uk-animation-reverse,[data-uk-sticky][class*=uk-animation-]{-webkit-animation-duration:.2s;animation-duration:.2s}.uk-dragover{box-shadow:0 0 20px rgba(100,100,100,.3)}.uk-tooltip{position:absolute;z-index:1030;max-width:200px;padding:5px 8px;background:#333;color:rgba(255,255,255,.7);font-size:11px;line-height:16px;border-radius:3px;text-shadow:0 1px 0 rgba(0,0,0,.5)}.uk-tooltip:after{content:"";display:block;position:absolute;width:0;height:0;border:5px dashed #333}.uk-tooltip-top-left:after,.uk-tooltip-top-right:after,.uk-tooltip-top:after{bottom:-5px;border-top-style:solid;border-bottom:none;border-left-color:transparent;border-right-color:transparent;border-top-color:#333}.uk-tooltip-bottom-left:after,.uk-tooltip-bottom-right:after,.uk-tooltip-bottom:after{top:-5px;border-bottom-style:solid;border-top:none;border-left-color:transparent;border-right-color:transparent;border-bottom-color:#333}.uk-tooltip-left:after,.uk-tooltip-right:after{top:50%;margin-top:-5px;border-top-color:transparent;border-bottom-color:transparent}.uk-tooltip-bottom:after,.uk-tooltip-top:after{left:50%;margin-left:-5px}.uk-tooltip-bottom-left:after,.uk-tooltip-top-left:after{left:10px}.uk-tooltip-bottom-right:after,.uk-tooltip-top-right:after{right:10px}.uk-tooltip-left:after{right:-5px;border-left-style:solid;border-right:none;border-left-color:#333}.uk-tooltip-right:after{left:-5px;border-right-style:solid;border-left:none;border-right-color:#333}libraries/uikit/index.html000060400000000054152455721620011646 0ustar00<html><body bgcolor="#FFFFFF"></body></html>libraries/jquery/index.html000060400000000054152455721620012040 0ustar00<html><body bgcolor="#FFFFFF"></body></html>libraries/jquery/js/jquery.min.js000060400000254121152455721620013124 0ustar00/*! jQuery v3.4.1 | (c) JS Foundation and other contributors | jquery.org/license */
!function(e,t){"use strict";"object"==typeof module&&"object"==typeof module.exports?module.exports=e.document?t(e,!0):function(e){if(!e.document)throw new Error("jQuery requires a window with a document");return t(e)}:t(e)}("undefined"!=typeof window?window:this,function(C,e){"use strict";var t=[],E=C.document,r=Object.getPrototypeOf,s=t.slice,g=t.concat,u=t.push,i=t.indexOf,n={},o=n.toString,v=n.hasOwnProperty,a=v.toString,l=a.call(Object),y={},m=function(e){return"function"==typeof e&&"number"!=typeof e.nodeType},x=function(e){return null!=e&&e===e.window},c={type:!0,src:!0,nonce:!0,noModule:!0};function b(e,t,n){var r,i,o=(n=n||E).createElement("script");if(o.text=e,t)for(r in c)(i=t[r]||t.getAttribute&&t.getAttribute(r))&&o.setAttribute(r,i);n.head.appendChild(o).parentNode.removeChild(o)}function w(e){return null==e?e+"":"object"==typeof e||"function"==typeof e?n[o.call(e)]||"object":typeof e}var f="3.4.1",k=function(e,t){return new k.fn.init(e,t)},p=/^[\s\uFEFF\xA0]+|[\s\uFEFF\xA0]+$/g;function d(e){var t=!!e&&"length"in e&&e.length,n=w(e);return!m(e)&&!x(e)&&("array"===n||0===t||"number"==typeof t&&0<t&&t-1 in e)}k.fn=k.prototype={jquery:f,constructor:k,length:0,toArray:function(){return s.call(this)},get:function(e){return null==e?s.call(this):e<0?this[e+this.length]:this[e]},pushStack:function(e){var t=k.merge(this.constructor(),e);return t.prevObject=this,t},each:function(e){return k.each(this,e)},map:function(n){return this.pushStack(k.map(this,function(e,t){return n.call(e,t,e)}))},slice:function(){return this.pushStack(s.apply(this,arguments))},first:function(){return this.eq(0)},last:function(){return this.eq(-1)},eq:function(e){var t=this.length,n=+e+(e<0?t:0);return this.pushStack(0<=n&&n<t?[this[n]]:[])},end:function(){return this.prevObject||this.constructor()},push:u,sort:t.sort,splice:t.splice},k.extend=k.fn.extend=function(){var e,t,n,r,i,o,a=arguments[0]||{},s=1,u=arguments.length,l=!1;for("boolean"==typeof a&&(l=a,a=arguments[s]||{},s++),"object"==typeof a||m(a)||(a={}),s===u&&(a=this,s--);s<u;s++)if(null!=(e=arguments[s]))for(t in e)r=e[t],"__proto__"!==t&&a!==r&&(l&&r&&(k.isPlainObject(r)||(i=Array.isArray(r)))?(n=a[t],o=i&&!Array.isArray(n)?[]:i||k.isPlainObject(n)?n:{},i=!1,a[t]=k.extend(l,o,r)):void 0!==r&&(a[t]=r));return a},k.extend({expando:"jQuery"+(f+Math.random()).replace(/\D/g,""),isReady:!0,error:function(e){throw new Error(e)},noop:function(){},isPlainObject:function(e){var t,n;return!(!e||"[object Object]"!==o.call(e))&&(!(t=r(e))||"function"==typeof(n=v.call(t,"constructor")&&t.constructor)&&a.call(n)===l)},isEmptyObject:function(e){var t;for(t in e)return!1;return!0},globalEval:function(e,t){b(e,{nonce:t&&t.nonce})},each:function(e,t){var n,r=0;if(d(e)){for(n=e.length;r<n;r++)if(!1===t.call(e[r],r,e[r]))break}else for(r in e)if(!1===t.call(e[r],r,e[r]))break;return e},trim:function(e){return null==e?"":(e+"").replace(p,"")},makeArray:function(e,t){var n=t||[];return null!=e&&(d(Object(e))?k.merge(n,"string"==typeof e?[e]:e):u.call(n,e)),n},inArray:function(e,t,n){return null==t?-1:i.call(t,e,n)},merge:function(e,t){for(var n=+t.length,r=0,i=e.length;r<n;r++)e[i++]=t[r];return e.length=i,e},grep:function(e,t,n){for(var r=[],i=0,o=e.length,a=!n;i<o;i++)!t(e[i],i)!==a&&r.push(e[i]);return r},map:function(e,t,n){var r,i,o=0,a=[];if(d(e))for(r=e.length;o<r;o++)null!=(i=t(e[o],o,n))&&a.push(i);else for(o in e)null!=(i=t(e[o],o,n))&&a.push(i);return g.apply([],a)},guid:1,support:y}),"function"==typeof Symbol&&(k.fn[Symbol.iterator]=t[Symbol.iterator]),k.each("Boolean Number String Function Array Date RegExp Object Error Symbol".split(" "),function(e,t){n["[object "+t+"]"]=t.toLowerCase()});var h=function(n){var e,d,b,o,i,h,f,g,w,u,l,T,C,a,E,v,s,c,y,k="sizzle"+1*new Date,m=n.document,S=0,r=0,p=ue(),x=ue(),N=ue(),A=ue(),D=function(e,t){return e===t&&(l=!0),0},j={}.hasOwnProperty,t=[],q=t.pop,L=t.push,H=t.push,O=t.slice,P=function(e,t){for(var n=0,r=e.length;n<r;n++)if(e[n]===t)return n;return-1},R="checked|selected|async|autofocus|autoplay|controls|defer|disabled|hidden|ismap|loop|multiple|open|readonly|required|scoped",M="[\\x20\\t\\r\\n\\f]",I="(?:\\\\.|[\\w-]|[^\0-\\xa0])+",W="\\["+M+"*("+I+")(?:"+M+"*([*^$|!~]?=)"+M+"*(?:'((?:\\\\.|[^\\\\'])*)'|\"((?:\\\\.|[^\\\\\"])*)\"|("+I+"))|)"+M+"*\\]",$=":("+I+")(?:\\((('((?:\\\\.|[^\\\\'])*)'|\"((?:\\\\.|[^\\\\\"])*)\")|((?:\\\\.|[^\\\\()[\\]]|"+W+")*)|.*)\\)|)",F=new RegExp(M+"+","g"),B=new RegExp("^"+M+"+|((?:^|[^\\\\])(?:\\\\.)*)"+M+"+$","g"),_=new RegExp("^"+M+"*,"+M+"*"),z=new RegExp("^"+M+"*([>+~]|"+M+")"+M+"*"),U=new RegExp(M+"|>"),X=new RegExp($),V=new RegExp("^"+I+"$"),G={ID:new RegExp("^#("+I+")"),CLASS:new RegExp("^\\.("+I+")"),TAG:new RegExp("^("+I+"|[*])"),ATTR:new RegExp("^"+W),PSEUDO:new RegExp("^"+$),CHILD:new RegExp("^:(only|first|last|nth|nth-last)-(child|of-type)(?:\\("+M+"*(even|odd|(([+-]|)(\\d*)n|)"+M+"*(?:([+-]|)"+M+"*(\\d+)|))"+M+"*\\)|)","i"),bool:new RegExp("^(?:"+R+")$","i"),needsContext:new RegExp("^"+M+"*[>+~]|:(even|odd|eq|gt|lt|nth|first|last)(?:\\("+M+"*((?:-\\d)?\\d*)"+M+"*\\)|)(?=[^-]|$)","i")},Y=/HTML$/i,Q=/^(?:input|select|textarea|button)$/i,J=/^h\d$/i,K=/^[^{]+\{\s*\[native \w/,Z=/^(?:#([\w-]+)|(\w+)|\.([\w-]+))$/,ee=/[+~]/,te=new RegExp("\\\\([\\da-f]{1,6}"+M+"?|("+M+")|.)","ig"),ne=function(e,t,n){var r="0x"+t-65536;return r!=r||n?t:r<0?String.fromCharCode(r+65536):String.fromCharCode(r>>10|55296,1023&r|56320)},re=/([\0-\x1f\x7f]|^-?\d)|^-$|[^\0-\x1f\x7f-\uFFFF\w-]/g,ie=function(e,t){return t?"\0"===e?"\ufffd":e.slice(0,-1)+"\\"+e.charCodeAt(e.length-1).toString(16)+" ":"\\"+e},oe=function(){T()},ae=be(function(e){return!0===e.disabled&&"fieldset"===e.nodeName.toLowerCase()},{dir:"parentNode",next:"legend"});try{H.apply(t=O.call(m.childNodes),m.childNodes),t[m.childNodes.length].nodeType}catch(e){H={apply:t.length?function(e,t){L.apply(e,O.call(t))}:function(e,t){var n=e.length,r=0;while(e[n++]=t[r++]);e.length=n-1}}}function se(t,e,n,r){var i,o,a,s,u,l,c,f=e&&e.ownerDocument,p=e?e.nodeType:9;if(n=n||[],"string"!=typeof t||!t||1!==p&&9!==p&&11!==p)return n;if(!r&&((e?e.ownerDocument||e:m)!==C&&T(e),e=e||C,E)){if(11!==p&&(u=Z.exec(t)))if(i=u[1]){if(9===p){if(!(a=e.getElementById(i)))return n;if(a.id===i)return n.push(a),n}else if(f&&(a=f.getElementById(i))&&y(e,a)&&a.id===i)return n.push(a),n}else{if(u[2])return H.apply(n,e.getElementsByTagName(t)),n;if((i=u[3])&&d.getElementsByClassName&&e.getElementsByClassName)return H.apply(n,e.getElementsByClassName(i)),n}if(d.qsa&&!A[t+" "]&&(!v||!v.test(t))&&(1!==p||"object"!==e.nodeName.toLowerCase())){if(c=t,f=e,1===p&&U.test(t)){(s=e.getAttribute("id"))?s=s.replace(re,ie):e.setAttribute("id",s=k),o=(l=h(t)).length;while(o--)l[o]="#"+s+" "+xe(l[o]);c=l.join(","),f=ee.test(t)&&ye(e.parentNode)||e}try{return H.apply(n,f.querySelectorAll(c)),n}catch(e){A(t,!0)}finally{s===k&&e.removeAttribute("id")}}}return g(t.replace(B,"$1"),e,n,r)}function ue(){var r=[];return function e(t,n){return r.push(t+" ")>b.cacheLength&&delete e[r.shift()],e[t+" "]=n}}function le(e){return e[k]=!0,e}function ce(e){var t=C.createElement("fieldset");try{return!!e(t)}catch(e){return!1}finally{t.parentNode&&t.parentNode.removeChild(t),t=null}}function fe(e,t){var n=e.split("|"),r=n.length;while(r--)b.attrHandle[n[r]]=t}function pe(e,t){var n=t&&e,r=n&&1===e.nodeType&&1===t.nodeType&&e.sourceIndex-t.sourceIndex;if(r)return r;if(n)while(n=n.nextSibling)if(n===t)return-1;return e?1:-1}function de(t){return function(e){return"input"===e.nodeName.toLowerCase()&&e.type===t}}function he(n){return function(e){var t=e.nodeName.toLowerCase();return("input"===t||"button"===t)&&e.type===n}}function ge(t){return function(e){return"form"in e?e.parentNode&&!1===e.disabled?"label"in e?"label"in e.parentNode?e.parentNode.disabled===t:e.disabled===t:e.isDisabled===t||e.isDisabled!==!t&&ae(e)===t:e.disabled===t:"label"in e&&e.disabled===t}}function ve(a){return le(function(o){return o=+o,le(function(e,t){var n,r=a([],e.length,o),i=r.length;while(i--)e[n=r[i]]&&(e[n]=!(t[n]=e[n]))})})}function ye(e){return e&&"undefined"!=typeof e.getElementsByTagName&&e}for(e in d=se.support={},i=se.isXML=function(e){var t=e.namespaceURI,n=(e.ownerDocument||e).documentElement;return!Y.test(t||n&&n.nodeName||"HTML")},T=se.setDocument=function(e){var t,n,r=e?e.ownerDocument||e:m;return r!==C&&9===r.nodeType&&r.documentElement&&(a=(C=r).documentElement,E=!i(C),m!==C&&(n=C.defaultView)&&n.top!==n&&(n.addEventListener?n.addEventListener("unload",oe,!1):n.attachEvent&&n.attachEvent("onunload",oe)),d.attributes=ce(function(e){return e.className="i",!e.getAttribute("className")}),d.getElementsByTagName=ce(function(e){return e.appendChild(C.createComment("")),!e.getElementsByTagName("*").length}),d.getElementsByClassName=K.test(C.getElementsByClassName),d.getById=ce(function(e){return a.appendChild(e).id=k,!C.getElementsByName||!C.getElementsByName(k).length}),d.getById?(b.filter.ID=function(e){var t=e.replace(te,ne);return function(e){return e.getAttribute("id")===t}},b.find.ID=function(e,t){if("undefined"!=typeof t.getElementById&&E){var n=t.getElementById(e);return n?[n]:[]}}):(b.filter.ID=function(e){var n=e.replace(te,ne);return function(e){var t="undefined"!=typeof e.getAttributeNode&&e.getAttributeNode("id");return t&&t.value===n}},b.find.ID=function(e,t){if("undefined"!=typeof t.getElementById&&E){var n,r,i,o=t.getElementById(e);if(o){if((n=o.getAttributeNode("id"))&&n.value===e)return[o];i=t.getElementsByName(e),r=0;while(o=i[r++])if((n=o.getAttributeNode("id"))&&n.value===e)return[o]}return[]}}),b.find.TAG=d.getElementsByTagName?function(e,t){return"undefined"!=typeof t.getElementsByTagName?t.getElementsByTagName(e):d.qsa?t.querySelectorAll(e):void 0}:function(e,t){var n,r=[],i=0,o=t.getElementsByTagName(e);if("*"===e){while(n=o[i++])1===n.nodeType&&r.push(n);return r}return o},b.find.CLASS=d.getElementsByClassName&&function(e,t){if("undefined"!=typeof t.getElementsByClassName&&E)return t.getElementsByClassName(e)},s=[],v=[],(d.qsa=K.test(C.querySelectorAll))&&(ce(function(e){a.appendChild(e).innerHTML="<a id='"+k+"'></a><select id='"+k+"-\r\\' msallowcapture=''><option selected=''></option></select>",e.querySelectorAll("[msallowcapture^='']").length&&v.push("[*^$]="+M+"*(?:''|\"\")"),e.querySelectorAll("[selected]").length||v.push("\\["+M+"*(?:value|"+R+")"),e.querySelectorAll("[id~="+k+"-]").length||v.push("~="),e.querySelectorAll(":checked").length||v.push(":checked"),e.querySelectorAll("a#"+k+"+*").length||v.push(".#.+[+~]")}),ce(function(e){e.innerHTML="<a href='' disabled='disabled'></a><select disabled='disabled'><option/></select>";var t=C.createElement("input");t.setAttribute("type","hidden"),e.appendChild(t).setAttribute("name","D"),e.querySelectorAll("[name=d]").length&&v.push("name"+M+"*[*^$|!~]?="),2!==e.querySelectorAll(":enabled").length&&v.push(":enabled",":disabled"),a.appendChild(e).disabled=!0,2!==e.querySelectorAll(":disabled").length&&v.push(":enabled",":disabled"),e.querySelectorAll("*,:x"),v.push(",.*:")})),(d.matchesSelector=K.test(c=a.matches||a.webkitMatchesSelector||a.mozMatchesSelector||a.oMatchesSelector||a.msMatchesSelector))&&ce(function(e){d.disconnectedMatch=c.call(e,"*"),c.call(e,"[s!='']:x"),s.push("!=",$)}),v=v.length&&new RegExp(v.join("|")),s=s.length&&new RegExp(s.join("|")),t=K.test(a.compareDocumentPosition),y=t||K.test(a.contains)?function(e,t){var n=9===e.nodeType?e.documentElement:e,r=t&&t.parentNode;return e===r||!(!r||1!==r.nodeType||!(n.contains?n.contains(r):e.compareDocumentPosition&&16&e.compareDocumentPosition(r)))}:function(e,t){if(t)while(t=t.parentNode)if(t===e)return!0;return!1},D=t?function(e,t){if(e===t)return l=!0,0;var n=!e.compareDocumentPosition-!t.compareDocumentPosition;return n||(1&(n=(e.ownerDocument||e)===(t.ownerDocument||t)?e.compareDocumentPosition(t):1)||!d.sortDetached&&t.compareDocumentPosition(e)===n?e===C||e.ownerDocument===m&&y(m,e)?-1:t===C||t.ownerDocument===m&&y(m,t)?1:u?P(u,e)-P(u,t):0:4&n?-1:1)}:function(e,t){if(e===t)return l=!0,0;var n,r=0,i=e.parentNode,o=t.parentNode,a=[e],s=[t];if(!i||!o)return e===C?-1:t===C?1:i?-1:o?1:u?P(u,e)-P(u,t):0;if(i===o)return pe(e,t);n=e;while(n=n.parentNode)a.unshift(n);n=t;while(n=n.parentNode)s.unshift(n);while(a[r]===s[r])r++;return r?pe(a[r],s[r]):a[r]===m?-1:s[r]===m?1:0}),C},se.matches=function(e,t){return se(e,null,null,t)},se.matchesSelector=function(e,t){if((e.ownerDocument||e)!==C&&T(e),d.matchesSelector&&E&&!A[t+" "]&&(!s||!s.test(t))&&(!v||!v.test(t)))try{var n=c.call(e,t);if(n||d.disconnectedMatch||e.document&&11!==e.document.nodeType)return n}catch(e){A(t,!0)}return 0<se(t,C,null,[e]).length},se.contains=function(e,t){return(e.ownerDocument||e)!==C&&T(e),y(e,t)},se.attr=function(e,t){(e.ownerDocument||e)!==C&&T(e);var n=b.attrHandle[t.toLowerCase()],r=n&&j.call(b.attrHandle,t.toLowerCase())?n(e,t,!E):void 0;return void 0!==r?r:d.attributes||!E?e.getAttribute(t):(r=e.getAttributeNode(t))&&r.specified?r.value:null},se.escape=function(e){return(e+"").replace(re,ie)},se.error=function(e){throw new Error("Syntax error, unrecognized expression: "+e)},se.uniqueSort=function(e){var t,n=[],r=0,i=0;if(l=!d.detectDuplicates,u=!d.sortStable&&e.slice(0),e.sort(D),l){while(t=e[i++])t===e[i]&&(r=n.push(i));while(r--)e.splice(n[r],1)}return u=null,e},o=se.getText=function(e){var t,n="",r=0,i=e.nodeType;if(i){if(1===i||9===i||11===i){if("string"==typeof e.textContent)return e.textContent;for(e=e.firstChild;e;e=e.nextSibling)n+=o(e)}else if(3===i||4===i)return e.nodeValue}else while(t=e[r++])n+=o(t);return n},(b=se.selectors={cacheLength:50,createPseudo:le,match:G,attrHandle:{},find:{},relative:{">":{dir:"parentNode",first:!0}," ":{dir:"parentNode"},"+":{dir:"previousSibling",first:!0},"~":{dir:"previousSibling"}},preFilter:{ATTR:function(e){return e[1]=e[1].replace(te,ne),e[3]=(e[3]||e[4]||e[5]||"").replace(te,ne),"~="===e[2]&&(e[3]=" "+e[3]+" "),e.slice(0,4)},CHILD:function(e){return e[1]=e[1].toLowerCase(),"nth"===e[1].slice(0,3)?(e[3]||se.error(e[0]),e[4]=+(e[4]?e[5]+(e[6]||1):2*("even"===e[3]||"odd"===e[3])),e[5]=+(e[7]+e[8]||"odd"===e[3])):e[3]&&se.error(e[0]),e},PSEUDO:function(e){var t,n=!e[6]&&e[2];return G.CHILD.test(e[0])?null:(e[3]?e[2]=e[4]||e[5]||"":n&&X.test(n)&&(t=h(n,!0))&&(t=n.indexOf(")",n.length-t)-n.length)&&(e[0]=e[0].slice(0,t),e[2]=n.slice(0,t)),e.slice(0,3))}},filter:{TAG:function(e){var t=e.replace(te,ne).toLowerCase();return"*"===e?function(){return!0}:function(e){return e.nodeName&&e.nodeName.toLowerCase()===t}},CLASS:function(e){var t=p[e+" "];return t||(t=new RegExp("(^|"+M+")"+e+"("+M+"|$)"))&&p(e,function(e){return t.test("string"==typeof e.className&&e.className||"undefined"!=typeof e.getAttribute&&e.getAttribute("class")||"")})},ATTR:function(n,r,i){return function(e){var t=se.attr(e,n);return null==t?"!="===r:!r||(t+="","="===r?t===i:"!="===r?t!==i:"^="===r?i&&0===t.indexOf(i):"*="===r?i&&-1<t.indexOf(i):"$="===r?i&&t.slice(-i.length)===i:"~="===r?-1<(" "+t.replace(F," ")+" ").indexOf(i):"|="===r&&(t===i||t.slice(0,i.length+1)===i+"-"))}},CHILD:function(h,e,t,g,v){var y="nth"!==h.slice(0,3),m="last"!==h.slice(-4),x="of-type"===e;return 1===g&&0===v?function(e){return!!e.parentNode}:function(e,t,n){var r,i,o,a,s,u,l=y!==m?"nextSibling":"previousSibling",c=e.parentNode,f=x&&e.nodeName.toLowerCase(),p=!n&&!x,d=!1;if(c){if(y){while(l){a=e;while(a=a[l])if(x?a.nodeName.toLowerCase()===f:1===a.nodeType)return!1;u=l="only"===h&&!u&&"nextSibling"}return!0}if(u=[m?c.firstChild:c.lastChild],m&&p){d=(s=(r=(i=(o=(a=c)[k]||(a[k]={}))[a.uniqueID]||(o[a.uniqueID]={}))[h]||[])[0]===S&&r[1])&&r[2],a=s&&c.childNodes[s];while(a=++s&&a&&a[l]||(d=s=0)||u.pop())if(1===a.nodeType&&++d&&a===e){i[h]=[S,s,d];break}}else if(p&&(d=s=(r=(i=(o=(a=e)[k]||(a[k]={}))[a.uniqueID]||(o[a.uniqueID]={}))[h]||[])[0]===S&&r[1]),!1===d)while(a=++s&&a&&a[l]||(d=s=0)||u.pop())if((x?a.nodeName.toLowerCase()===f:1===a.nodeType)&&++d&&(p&&((i=(o=a[k]||(a[k]={}))[a.uniqueID]||(o[a.uniqueID]={}))[h]=[S,d]),a===e))break;return(d-=v)===g||d%g==0&&0<=d/g}}},PSEUDO:function(e,o){var t,a=b.pseudos[e]||b.setFilters[e.toLowerCase()]||se.error("unsupported pseudo: "+e);return a[k]?a(o):1<a.length?(t=[e,e,"",o],b.setFilters.hasOwnProperty(e.toLowerCase())?le(function(e,t){var n,r=a(e,o),i=r.length;while(i--)e[n=P(e,r[i])]=!(t[n]=r[i])}):function(e){return a(e,0,t)}):a}},pseudos:{not:le(function(e){var r=[],i=[],s=f(e.replace(B,"$1"));return s[k]?le(function(e,t,n,r){var i,o=s(e,null,r,[]),a=e.length;while(a--)(i=o[a])&&(e[a]=!(t[a]=i))}):function(e,t,n){return r[0]=e,s(r,null,n,i),r[0]=null,!i.pop()}}),has:le(function(t){return function(e){return 0<se(t,e).length}}),contains:le(function(t){return t=t.replace(te,ne),function(e){return-1<(e.textContent||o(e)).indexOf(t)}}),lang:le(function(n){return V.test(n||"")||se.error("unsupported lang: "+n),n=n.replace(te,ne).toLowerCase(),function(e){var t;do{if(t=E?e.lang:e.getAttribute("xml:lang")||e.getAttribute("lang"))return(t=t.toLowerCase())===n||0===t.indexOf(n+"-")}while((e=e.parentNode)&&1===e.nodeType);return!1}}),target:function(e){var t=n.location&&n.location.hash;return t&&t.slice(1)===e.id},root:function(e){return e===a},focus:function(e){return e===C.activeElement&&(!C.hasFocus||C.hasFocus())&&!!(e.type||e.href||~e.tabIndex)},enabled:ge(!1),disabled:ge(!0),checked:function(e){var t=e.nodeName.toLowerCase();return"input"===t&&!!e.checked||"option"===t&&!!e.selected},selected:function(e){return e.parentNode&&e.parentNode.selectedIndex,!0===e.selected},empty:function(e){for(e=e.firstChild;e;e=e.nextSibling)if(e.nodeType<6)return!1;return!0},parent:function(e){return!b.pseudos.empty(e)},header:function(e){return J.test(e.nodeName)},input:function(e){return Q.test(e.nodeName)},button:function(e){var t=e.nodeName.toLowerCase();return"input"===t&&"button"===e.type||"button"===t},text:function(e){var t;return"input"===e.nodeName.toLowerCase()&&"text"===e.type&&(null==(t=e.getAttribute("type"))||"text"===t.toLowerCase())},first:ve(function(){return[0]}),last:ve(function(e,t){return[t-1]}),eq:ve(function(e,t,n){return[n<0?n+t:n]}),even:ve(function(e,t){for(var n=0;n<t;n+=2)e.push(n);return e}),odd:ve(function(e,t){for(var n=1;n<t;n+=2)e.push(n);return e}),lt:ve(function(e,t,n){for(var r=n<0?n+t:t<n?t:n;0<=--r;)e.push(r);return e}),gt:ve(function(e,t,n){for(var r=n<0?n+t:n;++r<t;)e.push(r);return e})}}).pseudos.nth=b.pseudos.eq,{radio:!0,checkbox:!0,file:!0,password:!0,image:!0})b.pseudos[e]=de(e);for(e in{submit:!0,reset:!0})b.pseudos[e]=he(e);function me(){}function xe(e){for(var t=0,n=e.length,r="";t<n;t++)r+=e[t].value;return r}function be(s,e,t){var u=e.dir,l=e.next,c=l||u,f=t&&"parentNode"===c,p=r++;return e.first?function(e,t,n){while(e=e[u])if(1===e.nodeType||f)return s(e,t,n);return!1}:function(e,t,n){var r,i,o,a=[S,p];if(n){while(e=e[u])if((1===e.nodeType||f)&&s(e,t,n))return!0}else while(e=e[u])if(1===e.nodeType||f)if(i=(o=e[k]||(e[k]={}))[e.uniqueID]||(o[e.uniqueID]={}),l&&l===e.nodeName.toLowerCase())e=e[u]||e;else{if((r=i[c])&&r[0]===S&&r[1]===p)return a[2]=r[2];if((i[c]=a)[2]=s(e,t,n))return!0}return!1}}function we(i){return 1<i.length?function(e,t,n){var r=i.length;while(r--)if(!i[r](e,t,n))return!1;return!0}:i[0]}function Te(e,t,n,r,i){for(var o,a=[],s=0,u=e.length,l=null!=t;s<u;s++)(o=e[s])&&(n&&!n(o,r,i)||(a.push(o),l&&t.push(s)));return a}function Ce(d,h,g,v,y,e){return v&&!v[k]&&(v=Ce(v)),y&&!y[k]&&(y=Ce(y,e)),le(function(e,t,n,r){var i,o,a,s=[],u=[],l=t.length,c=e||function(e,t,n){for(var r=0,i=t.length;r<i;r++)se(e,t[r],n);return n}(h||"*",n.nodeType?[n]:n,[]),f=!d||!e&&h?c:Te(c,s,d,n,r),p=g?y||(e?d:l||v)?[]:t:f;if(g&&g(f,p,n,r),v){i=Te(p,u),v(i,[],n,r),o=i.length;while(o--)(a=i[o])&&(p[u[o]]=!(f[u[o]]=a))}if(e){if(y||d){if(y){i=[],o=p.length;while(o--)(a=p[o])&&i.push(f[o]=a);y(null,p=[],i,r)}o=p.length;while(o--)(a=p[o])&&-1<(i=y?P(e,a):s[o])&&(e[i]=!(t[i]=a))}}else p=Te(p===t?p.splice(l,p.length):p),y?y(null,t,p,r):H.apply(t,p)})}function Ee(e){for(var i,t,n,r=e.length,o=b.relative[e[0].type],a=o||b.relative[" "],s=o?1:0,u=be(function(e){return e===i},a,!0),l=be(function(e){return-1<P(i,e)},a,!0),c=[function(e,t,n){var r=!o&&(n||t!==w)||((i=t).nodeType?u(e,t,n):l(e,t,n));return i=null,r}];s<r;s++)if(t=b.relative[e[s].type])c=[be(we(c),t)];else{if((t=b.filter[e[s].type].apply(null,e[s].matches))[k]){for(n=++s;n<r;n++)if(b.relative[e[n].type])break;return Ce(1<s&&we(c),1<s&&xe(e.slice(0,s-1).concat({value:" "===e[s-2].type?"*":""})).replace(B,"$1"),t,s<n&&Ee(e.slice(s,n)),n<r&&Ee(e=e.slice(n)),n<r&&xe(e))}c.push(t)}return we(c)}return me.prototype=b.filters=b.pseudos,b.setFilters=new me,h=se.tokenize=function(e,t){var n,r,i,o,a,s,u,l=x[e+" "];if(l)return t?0:l.slice(0);a=e,s=[],u=b.preFilter;while(a){for(o in n&&!(r=_.exec(a))||(r&&(a=a.slice(r[0].length)||a),s.push(i=[])),n=!1,(r=z.exec(a))&&(n=r.shift(),i.push({value:n,type:r[0].replace(B," ")}),a=a.slice(n.length)),b.filter)!(r=G[o].exec(a))||u[o]&&!(r=u[o](r))||(n=r.shift(),i.push({value:n,type:o,matches:r}),a=a.slice(n.length));if(!n)break}return t?a.length:a?se.error(e):x(e,s).slice(0)},f=se.compile=function(e,t){var n,v,y,m,x,r,i=[],o=[],a=N[e+" "];if(!a){t||(t=h(e)),n=t.length;while(n--)(a=Ee(t[n]))[k]?i.push(a):o.push(a);(a=N(e,(v=o,m=0<(y=i).length,x=0<v.length,r=function(e,t,n,r,i){var o,a,s,u=0,l="0",c=e&&[],f=[],p=w,d=e||x&&b.find.TAG("*",i),h=S+=null==p?1:Math.random()||.1,g=d.length;for(i&&(w=t===C||t||i);l!==g&&null!=(o=d[l]);l++){if(x&&o){a=0,t||o.ownerDocument===C||(T(o),n=!E);while(s=v[a++])if(s(o,t||C,n)){r.push(o);break}i&&(S=h)}m&&((o=!s&&o)&&u--,e&&c.push(o))}if(u+=l,m&&l!==u){a=0;while(s=y[a++])s(c,f,t,n);if(e){if(0<u)while(l--)c[l]||f[l]||(f[l]=q.call(r));f=Te(f)}H.apply(r,f),i&&!e&&0<f.length&&1<u+y.length&&se.uniqueSort(r)}return i&&(S=h,w=p),c},m?le(r):r))).selector=e}return a},g=se.select=function(e,t,n,r){var i,o,a,s,u,l="function"==typeof e&&e,c=!r&&h(e=l.selector||e);if(n=n||[],1===c.length){if(2<(o=c[0]=c[0].slice(0)).length&&"ID"===(a=o[0]).type&&9===t.nodeType&&E&&b.relative[o[1].type]){if(!(t=(b.find.ID(a.matches[0].replace(te,ne),t)||[])[0]))return n;l&&(t=t.parentNode),e=e.slice(o.shift().value.length)}i=G.needsContext.test(e)?0:o.length;while(i--){if(a=o[i],b.relative[s=a.type])break;if((u=b.find[s])&&(r=u(a.matches[0].replace(te,ne),ee.test(o[0].type)&&ye(t.parentNode)||t))){if(o.splice(i,1),!(e=r.length&&xe(o)))return H.apply(n,r),n;break}}}return(l||f(e,c))(r,t,!E,n,!t||ee.test(e)&&ye(t.parentNode)||t),n},d.sortStable=k.split("").sort(D).join("")===k,d.detectDuplicates=!!l,T(),d.sortDetached=ce(function(e){return 1&e.compareDocumentPosition(C.createElement("fieldset"))}),ce(function(e){return e.innerHTML="<a href='#'></a>","#"===e.firstChild.getAttribute("href")})||fe("type|href|height|width",function(e,t,n){if(!n)return e.getAttribute(t,"type"===t.toLowerCase()?1:2)}),d.attributes&&ce(function(e){return e.innerHTML="<input/>",e.firstChild.setAttribute("value",""),""===e.firstChild.getAttribute("value")})||fe("value",function(e,t,n){if(!n&&"input"===e.nodeName.toLowerCase())return e.defaultValue}),ce(function(e){return null==e.getAttribute("disabled")})||fe(R,function(e,t,n){var r;if(!n)return!0===e[t]?t.toLowerCase():(r=e.getAttributeNode(t))&&r.specified?r.value:null}),se}(C);k.find=h,k.expr=h.selectors,k.expr[":"]=k.expr.pseudos,k.uniqueSort=k.unique=h.uniqueSort,k.text=h.getText,k.isXMLDoc=h.isXML,k.contains=h.contains,k.escapeSelector=h.escape;var T=function(e,t,n){var r=[],i=void 0!==n;while((e=e[t])&&9!==e.nodeType)if(1===e.nodeType){if(i&&k(e).is(n))break;r.push(e)}return r},S=function(e,t){for(var n=[];e;e=e.nextSibling)1===e.nodeType&&e!==t&&n.push(e);return n},N=k.expr.match.needsContext;function A(e,t){return e.nodeName&&e.nodeName.toLowerCase()===t.toLowerCase()}var D=/^<([a-z][^\/\0>:\x20\t\r\n\f]*)[\x20\t\r\n\f]*\/?>(?:<\/\1>|)$/i;function j(e,n,r){return m(n)?k.grep(e,function(e,t){return!!n.call(e,t,e)!==r}):n.nodeType?k.grep(e,function(e){return e===n!==r}):"string"!=typeof n?k.grep(e,function(e){return-1<i.call(n,e)!==r}):k.filter(n,e,r)}k.filter=function(e,t,n){var r=t[0];return n&&(e=":not("+e+")"),1===t.length&&1===r.nodeType?k.find.matchesSelector(r,e)?[r]:[]:k.find.matches(e,k.grep(t,function(e){return 1===e.nodeType}))},k.fn.extend({find:function(e){var t,n,r=this.length,i=this;if("string"!=typeof e)return this.pushStack(k(e).filter(function(){for(t=0;t<r;t++)if(k.contains(i[t],this))return!0}));for(n=this.pushStack([]),t=0;t<r;t++)k.find(e,i[t],n);return 1<r?k.uniqueSort(n):n},filter:function(e){return this.pushStack(j(this,e||[],!1))},not:function(e){return this.pushStack(j(this,e||[],!0))},is:function(e){return!!j(this,"string"==typeof e&&N.test(e)?k(e):e||[],!1).length}});var q,L=/^(?:\s*(<[\w\W]+>)[^>]*|#([\w-]+))$/;(k.fn.init=function(e,t,n){var r,i;if(!e)return this;if(n=n||q,"string"==typeof e){if(!(r="<"===e[0]&&">"===e[e.length-1]&&3<=e.length?[null,e,null]:L.exec(e))||!r[1]&&t)return!t||t.jquery?(t||n).find(e):this.constructor(t).find(e);if(r[1]){if(t=t instanceof k?t[0]:t,k.merge(this,k.parseHTML(r[1],t&&t.nodeType?t.ownerDocument||t:E,!0)),D.test(r[1])&&k.isPlainObject(t))for(r in t)m(this[r])?this[r](t[r]):this.attr(r,t[r]);return this}return(i=E.getElementById(r[2]))&&(this[0]=i,this.length=1),this}return e.nodeType?(this[0]=e,this.length=1,this):m(e)?void 0!==n.ready?n.ready(e):e(k):k.makeArray(e,this)}).prototype=k.fn,q=k(E);var H=/^(?:parents|prev(?:Until|All))/,O={children:!0,contents:!0,next:!0,prev:!0};function P(e,t){while((e=e[t])&&1!==e.nodeType);return e}k.fn.extend({has:function(e){var t=k(e,this),n=t.length;return this.filter(function(){for(var e=0;e<n;e++)if(k.contains(this,t[e]))return!0})},closest:function(e,t){var n,r=0,i=this.length,o=[],a="string"!=typeof e&&k(e);if(!N.test(e))for(;r<i;r++)for(n=this[r];n&&n!==t;n=n.parentNode)if(n.nodeType<11&&(a?-1<a.index(n):1===n.nodeType&&k.find.matchesSelector(n,e))){o.push(n);break}return this.pushStack(1<o.length?k.uniqueSort(o):o)},index:function(e){return e?"string"==typeof e?i.call(k(e),this[0]):i.call(this,e.jquery?e[0]:e):this[0]&&this[0].parentNode?this.first().prevAll().length:-1},add:function(e,t){return this.pushStack(k.uniqueSort(k.merge(this.get(),k(e,t))))},addBack:function(e){return this.add(null==e?this.prevObject:this.prevObject.filter(e))}}),k.each({parent:function(e){var t=e.parentNode;return t&&11!==t.nodeType?t:null},parents:function(e){return T(e,"parentNode")},parentsUntil:function(e,t,n){return T(e,"parentNode",n)},next:function(e){return P(e,"nextSibling")},prev:function(e){return P(e,"previousSibling")},nextAll:function(e){return T(e,"nextSibling")},prevAll:function(e){return T(e,"previousSibling")},nextUntil:function(e,t,n){return T(e,"nextSibling",n)},prevUntil:function(e,t,n){return T(e,"previousSibling",n)},siblings:function(e){return S((e.parentNode||{}).firstChild,e)},children:function(e){return S(e.firstChild)},contents:function(e){return"undefined"!=typeof e.contentDocument?e.contentDocument:(A(e,"template")&&(e=e.content||e),k.merge([],e.childNodes))}},function(r,i){k.fn[r]=function(e,t){var n=k.map(this,i,e);return"Until"!==r.slice(-5)&&(t=e),t&&"string"==typeof t&&(n=k.filter(t,n)),1<this.length&&(O[r]||k.uniqueSort(n),H.test(r)&&n.reverse()),this.pushStack(n)}});var R=/[^\x20\t\r\n\f]+/g;function M(e){return e}function I(e){throw e}function W(e,t,n,r){var i;try{e&&m(i=e.promise)?i.call(e).done(t).fail(n):e&&m(i=e.then)?i.call(e,t,n):t.apply(void 0,[e].slice(r))}catch(e){n.apply(void 0,[e])}}k.Callbacks=function(r){var e,n;r="string"==typeof r?(e=r,n={},k.each(e.match(R)||[],function(e,t){n[t]=!0}),n):k.extend({},r);var i,t,o,a,s=[],u=[],l=-1,c=function(){for(a=a||r.once,o=i=!0;u.length;l=-1){t=u.shift();while(++l<s.length)!1===s[l].apply(t[0],t[1])&&r.stopOnFalse&&(l=s.length,t=!1)}r.memory||(t=!1),i=!1,a&&(s=t?[]:"")},f={add:function(){return s&&(t&&!i&&(l=s.length-1,u.push(t)),function n(e){k.each(e,function(e,t){m(t)?r.unique&&f.has(t)||s.push(t):t&&t.length&&"string"!==w(t)&&n(t)})}(arguments),t&&!i&&c()),this},remove:function(){return k.each(arguments,function(e,t){var n;while(-1<(n=k.inArray(t,s,n)))s.splice(n,1),n<=l&&l--}),this},has:function(e){return e?-1<k.inArray(e,s):0<s.length},empty:function(){return s&&(s=[]),this},disable:function(){return a=u=[],s=t="",this},disabled:function(){return!s},lock:function(){return a=u=[],t||i||(s=t=""),this},locked:function(){return!!a},fireWith:function(e,t){return a||(t=[e,(t=t||[]).slice?t.slice():t],u.push(t),i||c()),this},fire:function(){return f.fireWith(this,arguments),this},fired:function(){return!!o}};return f},k.extend({Deferred:function(e){var o=[["notify","progress",k.Callbacks("memory"),k.Callbacks("memory"),2],["resolve","done",k.Callbacks("once memory"),k.Callbacks("once memory"),0,"resolved"],["reject","fail",k.Callbacks("once memory"),k.Callbacks("once memory"),1,"rejected"]],i="pending",a={state:function(){return i},always:function(){return s.done(arguments).fail(arguments),this},"catch":function(e){return a.then(null,e)},pipe:function(){var i=arguments;return k.Deferred(function(r){k.each(o,function(e,t){var n=m(i[t[4]])&&i[t[4]];s[t[1]](function(){var e=n&&n.apply(this,arguments);e&&m(e.promise)?e.promise().progress(r.notify).done(r.resolve).fail(r.reject):r[t[0]+"With"](this,n?[e]:arguments)})}),i=null}).promise()},then:function(t,n,r){var u=0;function l(i,o,a,s){return function(){var n=this,r=arguments,e=function(){var e,t;if(!(i<u)){if((e=a.apply(n,r))===o.promise())throw new TypeError("Thenable self-resolution");t=e&&("object"==typeof e||"function"==typeof e)&&e.then,m(t)?s?t.call(e,l(u,o,M,s),l(u,o,I,s)):(u++,t.call(e,l(u,o,M,s),l(u,o,I,s),l(u,o,M,o.notifyWith))):(a!==M&&(n=void 0,r=[e]),(s||o.resolveWith)(n,r))}},t=s?e:function(){try{e()}catch(e){k.Deferred.exceptionHook&&k.Deferred.exceptionHook(e,t.stackTrace),u<=i+1&&(a!==I&&(n=void 0,r=[e]),o.rejectWith(n,r))}};i?t():(k.Deferred.getStackHook&&(t.stackTrace=k.Deferred.getStackHook()),C.setTimeout(t))}}return k.Deferred(function(e){o[0][3].add(l(0,e,m(r)?r:M,e.notifyWith)),o[1][3].add(l(0,e,m(t)?t:M)),o[2][3].add(l(0,e,m(n)?n:I))}).promise()},promise:function(e){return null!=e?k.extend(e,a):a}},s={};return k.each(o,function(e,t){var n=t[2],r=t[5];a[t[1]]=n.add,r&&n.add(function(){i=r},o[3-e][2].disable,o[3-e][3].disable,o[0][2].lock,o[0][3].lock),n.add(t[3].fire),s[t[0]]=function(){return s[t[0]+"With"](this===s?void 0:this,arguments),this},s[t[0]+"With"]=n.fireWith}),a.promise(s),e&&e.call(s,s),s},when:function(e){var n=arguments.length,t=n,r=Array(t),i=s.call(arguments),o=k.Deferred(),a=function(t){return function(e){r[t]=this,i[t]=1<arguments.length?s.call(arguments):e,--n||o.resolveWith(r,i)}};if(n<=1&&(W(e,o.done(a(t)).resolve,o.reject,!n),"pending"===o.state()||m(i[t]&&i[t].then)))return o.then();while(t--)W(i[t],a(t),o.reject);return o.promise()}});var $=/^(Eval|Internal|Range|Reference|Syntax|Type|URI)Error$/;k.Deferred.exceptionHook=function(e,t){C.console&&C.console.warn&&e&&$.test(e.name)&&C.console.warn("jQuery.Deferred exception: "+e.message,e.stack,t)},k.readyException=function(e){C.setTimeout(function(){throw e})};var F=k.Deferred();function B(){E.removeEventListener("DOMContentLoaded",B),C.removeEventListener("load",B),k.ready()}k.fn.ready=function(e){return F.then(e)["catch"](function(e){k.readyException(e)}),this},k.extend({isReady:!1,readyWait:1,ready:function(e){(!0===e?--k.readyWait:k.isReady)||(k.isReady=!0)!==e&&0<--k.readyWait||F.resolveWith(E,[k])}}),k.ready.then=F.then,"complete"===E.readyState||"loading"!==E.readyState&&!E.documentElement.doScroll?C.setTimeout(k.ready):(E.addEventListener("DOMContentLoaded",B),C.addEventListener("load",B));var _=function(e,t,n,r,i,o,a){var s=0,u=e.length,l=null==n;if("object"===w(n))for(s in i=!0,n)_(e,t,s,n[s],!0,o,a);else if(void 0!==r&&(i=!0,m(r)||(a=!0),l&&(a?(t.call(e,r),t=null):(l=t,t=function(e,t,n){return l.call(k(e),n)})),t))for(;s<u;s++)t(e[s],n,a?r:r.call(e[s],s,t(e[s],n)));return i?e:l?t.call(e):u?t(e[0],n):o},z=/^-ms-/,U=/-([a-z])/g;function X(e,t){return t.toUpperCase()}function V(e){return e.replace(z,"ms-").replace(U,X)}var G=function(e){return 1===e.nodeType||9===e.nodeType||!+e.nodeType};function Y(){this.expando=k.expando+Y.uid++}Y.uid=1,Y.prototype={cache:function(e){var t=e[this.expando];return t||(t={},G(e)&&(e.nodeType?e[this.expando]=t:Object.defineProperty(e,this.expando,{value:t,configurable:!0}))),t},set:function(e,t,n){var r,i=this.cache(e);if("string"==typeof t)i[V(t)]=n;else for(r in t)i[V(r)]=t[r];return i},get:function(e,t){return void 0===t?this.cache(e):e[this.expando]&&e[this.expando][V(t)]},access:function(e,t,n){return void 0===t||t&&"string"==typeof t&&void 0===n?this.get(e,t):(this.set(e,t,n),void 0!==n?n:t)},remove:function(e,t){var n,r=e[this.expando];if(void 0!==r){if(void 0!==t){n=(t=Array.isArray(t)?t.map(V):(t=V(t))in r?[t]:t.match(R)||[]).length;while(n--)delete r[t[n]]}(void 0===t||k.isEmptyObject(r))&&(e.nodeType?e[this.expando]=void 0:delete e[this.expando])}},hasData:function(e){var t=e[this.expando];return void 0!==t&&!k.isEmptyObject(t)}};var Q=new Y,J=new Y,K=/^(?:\{[\w\W]*\}|\[[\w\W]*\])$/,Z=/[A-Z]/g;function ee(e,t,n){var r,i;if(void 0===n&&1===e.nodeType)if(r="data-"+t.replace(Z,"-$&").toLowerCase(),"string"==typeof(n=e.getAttribute(r))){try{n="true"===(i=n)||"false"!==i&&("null"===i?null:i===+i+""?+i:K.test(i)?JSON.parse(i):i)}catch(e){}J.set(e,t,n)}else n=void 0;return n}k.extend({hasData:function(e){return J.hasData(e)||Q.hasData(e)},data:function(e,t,n){return J.access(e,t,n)},removeData:function(e,t){J.remove(e,t)},_data:function(e,t,n){return Q.access(e,t,n)},_removeData:function(e,t){Q.remove(e,t)}}),k.fn.extend({data:function(n,e){var t,r,i,o=this[0],a=o&&o.attributes;if(void 0===n){if(this.length&&(i=J.get(o),1===o.nodeType&&!Q.get(o,"hasDataAttrs"))){t=a.length;while(t--)a[t]&&0===(r=a[t].name).indexOf("data-")&&(r=V(r.slice(5)),ee(o,r,i[r]));Q.set(o,"hasDataAttrs",!0)}return i}return"object"==typeof n?this.each(function(){J.set(this,n)}):_(this,function(e){var t;if(o&&void 0===e)return void 0!==(t=J.get(o,n))?t:void 0!==(t=ee(o,n))?t:void 0;this.each(function(){J.set(this,n,e)})},null,e,1<arguments.length,null,!0)},removeData:function(e){return this.each(function(){J.remove(this,e)})}}),k.extend({queue:function(e,t,n){var r;if(e)return t=(t||"fx")+"queue",r=Q.get(e,t),n&&(!r||Array.isArray(n)?r=Q.access(e,t,k.makeArray(n)):r.push(n)),r||[]},dequeue:function(e,t){t=t||"fx";var n=k.queue(e,t),r=n.length,i=n.shift(),o=k._queueHooks(e,t);"inprogress"===i&&(i=n.shift(),r--),i&&("fx"===t&&n.unshift("inprogress"),delete o.stop,i.call(e,function(){k.dequeue(e,t)},o)),!r&&o&&o.empty.fire()},_queueHooks:function(e,t){var n=t+"queueHooks";return Q.get(e,n)||Q.access(e,n,{empty:k.Callbacks("once memory").add(function(){Q.remove(e,[t+"queue",n])})})}}),k.fn.extend({queue:function(t,n){var e=2;return"string"!=typeof t&&(n=t,t="fx",e--),arguments.length<e?k.queue(this[0],t):void 0===n?this:this.each(function(){var e=k.queue(this,t,n);k._queueHooks(this,t),"fx"===t&&"inprogress"!==e[0]&&k.dequeue(this,t)})},dequeue:function(e){return this.each(function(){k.dequeue(this,e)})},clearQueue:function(e){return this.queue(e||"fx",[])},promise:function(e,t){var n,r=1,i=k.Deferred(),o=this,a=this.length,s=function(){--r||i.resolveWith(o,[o])};"string"!=typeof e&&(t=e,e=void 0),e=e||"fx";while(a--)(n=Q.get(o[a],e+"queueHooks"))&&n.empty&&(r++,n.empty.add(s));return s(),i.promise(t)}});var te=/[+-]?(?:\d*\.|)\d+(?:[eE][+-]?\d+|)/.source,ne=new RegExp("^(?:([+-])=|)("+te+")([a-z%]*)$","i"),re=["Top","Right","Bottom","Left"],ie=E.documentElement,oe=function(e){return k.contains(e.ownerDocument,e)},ae={composed:!0};ie.getRootNode&&(oe=function(e){return k.contains(e.ownerDocument,e)||e.getRootNode(ae)===e.ownerDocument});var se=function(e,t){return"none"===(e=t||e).style.display||""===e.style.display&&oe(e)&&"none"===k.css(e,"display")},ue=function(e,t,n,r){var i,o,a={};for(o in t)a[o]=e.style[o],e.style[o]=t[o];for(o in i=n.apply(e,r||[]),t)e.style[o]=a[o];return i};function le(e,t,n,r){var i,o,a=20,s=r?function(){return r.cur()}:function(){return k.css(e,t,"")},u=s(),l=n&&n[3]||(k.cssNumber[t]?"":"px"),c=e.nodeType&&(k.cssNumber[t]||"px"!==l&&+u)&&ne.exec(k.css(e,t));if(c&&c[3]!==l){u/=2,l=l||c[3],c=+u||1;while(a--)k.style(e,t,c+l),(1-o)*(1-(o=s()/u||.5))<=0&&(a=0),c/=o;c*=2,k.style(e,t,c+l),n=n||[]}return n&&(c=+c||+u||0,i=n[1]?c+(n[1]+1)*n[2]:+n[2],r&&(r.unit=l,r.start=c,r.end=i)),i}var ce={};function fe(e,t){for(var n,r,i,o,a,s,u,l=[],c=0,f=e.length;c<f;c++)(r=e[c]).style&&(n=r.style.display,t?("none"===n&&(l[c]=Q.get(r,"display")||null,l[c]||(r.style.display="")),""===r.style.display&&se(r)&&(l[c]=(u=a=o=void 0,a=(i=r).ownerDocument,s=i.nodeName,(u=ce[s])||(o=a.body.appendChild(a.createElement(s)),u=k.css(o,"display"),o.parentNode.removeChild(o),"none"===u&&(u="block"),ce[s]=u)))):"none"!==n&&(l[c]="none",Q.set(r,"display",n)));for(c=0;c<f;c++)null!=l[c]&&(e[c].style.display=l[c]);return e}k.fn.extend({show:function(){return fe(this,!0)},hide:function(){return fe(this)},toggle:function(e){return"boolean"==typeof e?e?this.show():this.hide():this.each(function(){se(this)?k(this).show():k(this).hide()})}});var pe=/^(?:checkbox|radio)$/i,de=/<([a-z][^\/\0>\x20\t\r\n\f]*)/i,he=/^$|^module$|\/(?:java|ecma)script/i,ge={option:[1,"<select multiple='multiple'>","</select>"],thead:[1,"<table>","</table>"],col:[2,"<table><colgroup>","</colgroup></table>"],tr:[2,"<table><tbody>","</tbody></table>"],td:[3,"<table><tbody><tr>","</tr></tbody></table>"],_default:[0,"",""]};function ve(e,t){var n;return n="undefined"!=typeof e.getElementsByTagName?e.getElementsByTagName(t||"*"):"undefined"!=typeof e.querySelectorAll?e.querySelectorAll(t||"*"):[],void 0===t||t&&A(e,t)?k.merge([e],n):n}function ye(e,t){for(var n=0,r=e.length;n<r;n++)Q.set(e[n],"globalEval",!t||Q.get(t[n],"globalEval"))}ge.optgroup=ge.option,ge.tbody=ge.tfoot=ge.colgroup=ge.caption=ge.thead,ge.th=ge.td;var me,xe,be=/<|&#?\w+;/;function we(e,t,n,r,i){for(var o,a,s,u,l,c,f=t.createDocumentFragment(),p=[],d=0,h=e.length;d<h;d++)if((o=e[d])||0===o)if("object"===w(o))k.merge(p,o.nodeType?[o]:o);else if(be.test(o)){a=a||f.appendChild(t.createElement("div")),s=(de.exec(o)||["",""])[1].toLowerCase(),u=ge[s]||ge._default,a.innerHTML=u[1]+k.htmlPrefilter(o)+u[2],c=u[0];while(c--)a=a.lastChild;k.merge(p,a.childNodes),(a=f.firstChild).textContent=""}else p.push(t.createTextNode(o));f.textContent="",d=0;while(o=p[d++])if(r&&-1<k.inArray(o,r))i&&i.push(o);else if(l=oe(o),a=ve(f.appendChild(o),"script"),l&&ye(a),n){c=0;while(o=a[c++])he.test(o.type||"")&&n.push(o)}return f}me=E.createDocumentFragment().appendChild(E.createElement("div")),(xe=E.createElement("input")).setAttribute("type","radio"),xe.setAttribute("checked","checked"),xe.setAttribute("name","t"),me.appendChild(xe),y.checkClone=me.cloneNode(!0).cloneNode(!0).lastChild.checked,me.innerHTML="<textarea>x</textarea>",y.noCloneChecked=!!me.cloneNode(!0).lastChild.defaultValue;var Te=/^key/,Ce=/^(?:mouse|pointer|contextmenu|drag|drop)|click/,Ee=/^([^.]*)(?:\.(.+)|)/;function ke(){return!0}function Se(){return!1}function Ne(e,t){return e===function(){try{return E.activeElement}catch(e){}}()==("focus"===t)}function Ae(e,t,n,r,i,o){var a,s;if("object"==typeof t){for(s in"string"!=typeof n&&(r=r||n,n=void 0),t)Ae(e,s,n,r,t[s],o);return e}if(null==r&&null==i?(i=n,r=n=void 0):null==i&&("string"==typeof n?(i=r,r=void 0):(i=r,r=n,n=void 0)),!1===i)i=Se;else if(!i)return e;return 1===o&&(a=i,(i=function(e){return k().off(e),a.apply(this,arguments)}).guid=a.guid||(a.guid=k.guid++)),e.each(function(){k.event.add(this,t,i,r,n)})}function De(e,i,o){o?(Q.set(e,i,!1),k.event.add(e,i,{namespace:!1,handler:function(e){var t,n,r=Q.get(this,i);if(1&e.isTrigger&&this[i]){if(r.length)(k.event.special[i]||{}).delegateType&&e.stopPropagation();else if(r=s.call(arguments),Q.set(this,i,r),t=o(this,i),this[i](),r!==(n=Q.get(this,i))||t?Q.set(this,i,!1):n={},r!==n)return e.stopImmediatePropagation(),e.preventDefault(),n.value}else r.length&&(Q.set(this,i,{value:k.event.trigger(k.extend(r[0],k.Event.prototype),r.slice(1),this)}),e.stopImmediatePropagation())}})):void 0===Q.get(e,i)&&k.event.add(e,i,ke)}k.event={global:{},add:function(t,e,n,r,i){var o,a,s,u,l,c,f,p,d,h,g,v=Q.get(t);if(v){n.handler&&(n=(o=n).handler,i=o.selector),i&&k.find.matchesSelector(ie,i),n.guid||(n.guid=k.guid++),(u=v.events)||(u=v.events={}),(a=v.handle)||(a=v.handle=function(e){return"undefined"!=typeof k&&k.event.triggered!==e.type?k.event.dispatch.apply(t,arguments):void 0}),l=(e=(e||"").match(R)||[""]).length;while(l--)d=g=(s=Ee.exec(e[l])||[])[1],h=(s[2]||"").split(".").sort(),d&&(f=k.event.special[d]||{},d=(i?f.delegateType:f.bindType)||d,f=k.event.special[d]||{},c=k.extend({type:d,origType:g,data:r,handler:n,guid:n.guid,selector:i,needsContext:i&&k.expr.match.needsContext.test(i),namespace:h.join(".")},o),(p=u[d])||((p=u[d]=[]).delegateCount=0,f.setup&&!1!==f.setup.call(t,r,h,a)||t.addEventListener&&t.addEventListener(d,a)),f.add&&(f.add.call(t,c),c.handler.guid||(c.handler.guid=n.guid)),i?p.splice(p.delegateCount++,0,c):p.push(c),k.event.global[d]=!0)}},remove:function(e,t,n,r,i){var o,a,s,u,l,c,f,p,d,h,g,v=Q.hasData(e)&&Q.get(e);if(v&&(u=v.events)){l=(t=(t||"").match(R)||[""]).length;while(l--)if(d=g=(s=Ee.exec(t[l])||[])[1],h=(s[2]||"").split(".").sort(),d){f=k.event.special[d]||{},p=u[d=(r?f.delegateType:f.bindType)||d]||[],s=s[2]&&new RegExp("(^|\\.)"+h.join("\\.(?:.*\\.|)")+"(\\.|$)"),a=o=p.length;while(o--)c=p[o],!i&&g!==c.origType||n&&n.guid!==c.guid||s&&!s.test(c.namespace)||r&&r!==c.selector&&("**"!==r||!c.selector)||(p.splice(o,1),c.selector&&p.delegateCount--,f.remove&&f.remove.call(e,c));a&&!p.length&&(f.teardown&&!1!==f.teardown.call(e,h,v.handle)||k.removeEvent(e,d,v.handle),delete u[d])}else for(d in u)k.event.remove(e,d+t[l],n,r,!0);k.isEmptyObject(u)&&Q.remove(e,"handle events")}},dispatch:function(e){var t,n,r,i,o,a,s=k.event.fix(e),u=new Array(arguments.length),l=(Q.get(this,"events")||{})[s.type]||[],c=k.event.special[s.type]||{};for(u[0]=s,t=1;t<arguments.length;t++)u[t]=arguments[t];if(s.delegateTarget=this,!c.preDispatch||!1!==c.preDispatch.call(this,s)){a=k.event.handlers.call(this,s,l),t=0;while((i=a[t++])&&!s.isPropagationStopped()){s.currentTarget=i.elem,n=0;while((o=i.handlers[n++])&&!s.isImmediatePropagationStopped())s.rnamespace&&!1!==o.namespace&&!s.rnamespace.test(o.namespace)||(s.handleObj=o,s.data=o.data,void 0!==(r=((k.event.special[o.origType]||{}).handle||o.handler).apply(i.elem,u))&&!1===(s.result=r)&&(s.preventDefault(),s.stopPropagation()))}return c.postDispatch&&c.postDispatch.call(this,s),s.result}},handlers:function(e,t){var n,r,i,o,a,s=[],u=t.delegateCount,l=e.target;if(u&&l.nodeType&&!("click"===e.type&&1<=e.button))for(;l!==this;l=l.parentNode||this)if(1===l.nodeType&&("click"!==e.type||!0!==l.disabled)){for(o=[],a={},n=0;n<u;n++)void 0===a[i=(r=t[n]).selector+" "]&&(a[i]=r.needsContext?-1<k(i,this).index(l):k.find(i,this,null,[l]).length),a[i]&&o.push(r);o.length&&s.push({elem:l,handlers:o})}return l=this,u<t.length&&s.push({elem:l,handlers:t.slice(u)}),s},addProp:function(t,e){Object.defineProperty(k.Event.prototype,t,{enumerable:!0,configurable:!0,get:m(e)?function(){if(this.originalEvent)return e(this.originalEvent)}:function(){if(this.originalEvent)return this.originalEvent[t]},set:function(e){Object.defineProperty(this,t,{enumerable:!0,configurable:!0,writable:!0,value:e})}})},fix:function(e){return e[k.expando]?e:new k.Event(e)},special:{load:{noBubble:!0},click:{setup:function(e){var t=this||e;return pe.test(t.type)&&t.click&&A(t,"input")&&De(t,"click",ke),!1},trigger:function(e){var t=this||e;return pe.test(t.type)&&t.click&&A(t,"input")&&De(t,"click"),!0},_default:function(e){var t=e.target;return pe.test(t.type)&&t.click&&A(t,"input")&&Q.get(t,"click")||A(t,"a")}},beforeunload:{postDispatch:function(e){void 0!==e.result&&e.originalEvent&&(e.originalEvent.returnValue=e.result)}}}},k.removeEvent=function(e,t,n){e.removeEventListener&&e.removeEventListener(t,n)},k.Event=function(e,t){if(!(this instanceof k.Event))return new k.Event(e,t);e&&e.type?(this.originalEvent=e,this.type=e.type,this.isDefaultPrevented=e.defaultPrevented||void 0===e.defaultPrevented&&!1===e.returnValue?ke:Se,this.target=e.target&&3===e.target.nodeType?e.target.parentNode:e.target,this.currentTarget=e.currentTarget,this.relatedTarget=e.relatedTarget):this.type=e,t&&k.extend(this,t),this.timeStamp=e&&e.timeStamp||Date.now(),this[k.expando]=!0},k.Event.prototype={constructor:k.Event,isDefaultPrevented:Se,isPropagationStopped:Se,isImmediatePropagationStopped:Se,isSimulated:!1,preventDefault:function(){var e=this.originalEvent;this.isDefaultPrevented=ke,e&&!this.isSimulated&&e.preventDefault()},stopPropagation:function(){var e=this.originalEvent;this.isPropagationStopped=ke,e&&!this.isSimulated&&e.stopPropagation()},stopImmediatePropagation:function(){var e=this.originalEvent;this.isImmediatePropagationStopped=ke,e&&!this.isSimulated&&e.stopImmediatePropagation(),this.stopPropagation()}},k.each({altKey:!0,bubbles:!0,cancelable:!0,changedTouches:!0,ctrlKey:!0,detail:!0,eventPhase:!0,metaKey:!0,pageX:!0,pageY:!0,shiftKey:!0,view:!0,"char":!0,code:!0,charCode:!0,key:!0,keyCode:!0,button:!0,buttons:!0,clientX:!0,clientY:!0,offsetX:!0,offsetY:!0,pointerId:!0,pointerType:!0,screenX:!0,screenY:!0,targetTouches:!0,toElement:!0,touches:!0,which:function(e){var t=e.button;return null==e.which&&Te.test(e.type)?null!=e.charCode?e.charCode:e.keyCode:!e.which&&void 0!==t&&Ce.test(e.type)?1&t?1:2&t?3:4&t?2:0:e.which}},k.event.addProp),k.each({focus:"focusin",blur:"focusout"},function(e,t){k.event.special[e]={setup:function(){return De(this,e,Ne),!1},trigger:function(){return De(this,e),!0},delegateType:t}}),k.each({mouseenter:"mouseover",mouseleave:"mouseout",pointerenter:"pointerover",pointerleave:"pointerout"},function(e,i){k.event.special[e]={delegateType:i,bindType:i,handle:function(e){var t,n=e.relatedTarget,r=e.handleObj;return n&&(n===this||k.contains(this,n))||(e.type=r.origType,t=r.handler.apply(this,arguments),e.type=i),t}}}),k.fn.extend({on:function(e,t,n,r){return Ae(this,e,t,n,r)},one:function(e,t,n,r){return Ae(this,e,t,n,r,1)},off:function(e,t,n){var r,i;if(e&&e.preventDefault&&e.handleObj)return r=e.handleObj,k(e.delegateTarget).off(r.namespace?r.origType+"."+r.namespace:r.origType,r.selector,r.handler),this;if("object"==typeof e){for(i in e)this.off(i,t,e[i]);return this}return!1!==t&&"function"!=typeof t||(n=t,t=void 0),!1===n&&(n=Se),this.each(function(){k.event.remove(this,e,n,t)})}});var je=/<(?!area|br|col|embed|hr|img|input|link|meta|param)(([a-z][^\/\0>\x20\t\r\n\f]*)[^>]*)\/>/gi,qe=/<script|<style|<link/i,Le=/checked\s*(?:[^=]|=\s*.checked.)/i,He=/^\s*<!(?:\[CDATA\[|--)|(?:\]\]|--)>\s*$/g;function Oe(e,t){return A(e,"table")&&A(11!==t.nodeType?t:t.firstChild,"tr")&&k(e).children("tbody")[0]||e}function Pe(e){return e.type=(null!==e.getAttribute("type"))+"/"+e.type,e}function Re(e){return"true/"===(e.type||"").slice(0,5)?e.type=e.type.slice(5):e.removeAttribute("type"),e}function Me(e,t){var n,r,i,o,a,s,u,l;if(1===t.nodeType){if(Q.hasData(e)&&(o=Q.access(e),a=Q.set(t,o),l=o.events))for(i in delete a.handle,a.events={},l)for(n=0,r=l[i].length;n<r;n++)k.event.add(t,i,l[i][n]);J.hasData(e)&&(s=J.access(e),u=k.extend({},s),J.set(t,u))}}function Ie(n,r,i,o){r=g.apply([],r);var e,t,a,s,u,l,c=0,f=n.length,p=f-1,d=r[0],h=m(d);if(h||1<f&&"string"==typeof d&&!y.checkClone&&Le.test(d))return n.each(function(e){var t=n.eq(e);h&&(r[0]=d.call(this,e,t.html())),Ie(t,r,i,o)});if(f&&(t=(e=we(r,n[0].ownerDocument,!1,n,o)).firstChild,1===e.childNodes.length&&(e=t),t||o)){for(s=(a=k.map(ve(e,"script"),Pe)).length;c<f;c++)u=e,c!==p&&(u=k.clone(u,!0,!0),s&&k.merge(a,ve(u,"script"))),i.call(n[c],u,c);if(s)for(l=a[a.length-1].ownerDocument,k.map(a,Re),c=0;c<s;c++)u=a[c],he.test(u.type||"")&&!Q.access(u,"globalEval")&&k.contains(l,u)&&(u.src&&"module"!==(u.type||"").toLowerCase()?k._evalUrl&&!u.noModule&&k._evalUrl(u.src,{nonce:u.nonce||u.getAttribute("nonce")}):b(u.textContent.replace(He,""),u,l))}return n}function We(e,t,n){for(var r,i=t?k.filter(t,e):e,o=0;null!=(r=i[o]);o++)n||1!==r.nodeType||k.cleanData(ve(r)),r.parentNode&&(n&&oe(r)&&ye(ve(r,"script")),r.parentNode.removeChild(r));return e}k.extend({htmlPrefilter:function(e){return e.replace(je,"<$1></$2>")},clone:function(e,t,n){var r,i,o,a,s,u,l,c=e.cloneNode(!0),f=oe(e);if(!(y.noCloneChecked||1!==e.nodeType&&11!==e.nodeType||k.isXMLDoc(e)))for(a=ve(c),r=0,i=(o=ve(e)).length;r<i;r++)s=o[r],u=a[r],void 0,"input"===(l=u.nodeName.toLowerCase())&&pe.test(s.type)?u.checked=s.checked:"input"!==l&&"textarea"!==l||(u.defaultValue=s.defaultValue);if(t)if(n)for(o=o||ve(e),a=a||ve(c),r=0,i=o.length;r<i;r++)Me(o[r],a[r]);else Me(e,c);return 0<(a=ve(c,"script")).length&&ye(a,!f&&ve(e,"script")),c},cleanData:function(e){for(var t,n,r,i=k.event.special,o=0;void 0!==(n=e[o]);o++)if(G(n)){if(t=n[Q.expando]){if(t.events)for(r in t.events)i[r]?k.event.remove(n,r):k.removeEvent(n,r,t.handle);n[Q.expando]=void 0}n[J.expando]&&(n[J.expando]=void 0)}}}),k.fn.extend({detach:function(e){return We(this,e,!0)},remove:function(e){return We(this,e)},text:function(e){return _(this,function(e){return void 0===e?k.text(this):this.empty().each(function(){1!==this.nodeType&&11!==this.nodeType&&9!==this.nodeType||(this.textContent=e)})},null,e,arguments.length)},append:function(){return Ie(this,arguments,function(e){1!==this.nodeType&&11!==this.nodeType&&9!==this.nodeType||Oe(this,e).appendChild(e)})},prepend:function(){return Ie(this,arguments,function(e){if(1===this.nodeType||11===this.nodeType||9===this.nodeType){var t=Oe(this,e);t.insertBefore(e,t.firstChild)}})},before:function(){return Ie(this,arguments,function(e){this.parentNode&&this.parentNode.insertBefore(e,this)})},after:function(){return Ie(this,arguments,function(e){this.parentNode&&this.parentNode.insertBefore(e,this.nextSibling)})},empty:function(){for(var e,t=0;null!=(e=this[t]);t++)1===e.nodeType&&(k.cleanData(ve(e,!1)),e.textContent="");return this},clone:function(e,t){return e=null!=e&&e,t=null==t?e:t,this.map(function(){return k.clone(this,e,t)})},html:function(e){return _(this,function(e){var t=this[0]||{},n=0,r=this.length;if(void 0===e&&1===t.nodeType)return t.innerHTML;if("string"==typeof e&&!qe.test(e)&&!ge[(de.exec(e)||["",""])[1].toLowerCase()]){e=k.htmlPrefilter(e);try{for(;n<r;n++)1===(t=this[n]||{}).nodeType&&(k.cleanData(ve(t,!1)),t.innerHTML=e);t=0}catch(e){}}t&&this.empty().append(e)},null,e,arguments.length)},replaceWith:function(){var n=[];return Ie(this,arguments,function(e){var t=this.parentNode;k.inArray(this,n)<0&&(k.cleanData(ve(this)),t&&t.replaceChild(e,this))},n)}}),k.each({appendTo:"append",prependTo:"prepend",insertBefore:"before",insertAfter:"after",replaceAll:"replaceWith"},function(e,a){k.fn[e]=function(e){for(var t,n=[],r=k(e),i=r.length-1,o=0;o<=i;o++)t=o===i?this:this.clone(!0),k(r[o])[a](t),u.apply(n,t.get());return this.pushStack(n)}});var $e=new RegExp("^("+te+")(?!px)[a-z%]+$","i"),Fe=function(e){var t=e.ownerDocument.defaultView;return t&&t.opener||(t=C),t.getComputedStyle(e)},Be=new RegExp(re.join("|"),"i");function _e(e,t,n){var r,i,o,a,s=e.style;return(n=n||Fe(e))&&(""!==(a=n.getPropertyValue(t)||n[t])||oe(e)||(a=k.style(e,t)),!y.pixelBoxStyles()&&$e.test(a)&&Be.test(t)&&(r=s.width,i=s.minWidth,o=s.maxWidth,s.minWidth=s.maxWidth=s.width=a,a=n.width,s.width=r,s.minWidth=i,s.maxWidth=o)),void 0!==a?a+"":a}function ze(e,t){return{get:function(){if(!e())return(this.get=t).apply(this,arguments);delete this.get}}}!function(){function e(){if(u){s.style.cssText="position:absolute;left:-11111px;width:60px;margin-top:1px;padding:0;border:0",u.style.cssText="position:relative;display:block;box-sizing:border-box;overflow:scroll;margin:auto;border:1px;padding:1px;width:60%;top:1%",ie.appendChild(s).appendChild(u);var e=C.getComputedStyle(u);n="1%"!==e.top,a=12===t(e.marginLeft),u.style.right="60%",o=36===t(e.right),r=36===t(e.width),u.style.position="absolute",i=12===t(u.offsetWidth/3),ie.removeChild(s),u=null}}function t(e){return Math.round(parseFloat(e))}var n,r,i,o,a,s=E.createElement("div"),u=E.createElement("div");u.style&&(u.style.backgroundClip="content-box",u.cloneNode(!0).style.backgroundClip="",y.clearCloneStyle="content-box"===u.style.backgroundClip,k.extend(y,{boxSizingReliable:function(){return e(),r},pixelBoxStyles:function(){return e(),o},pixelPosition:function(){return e(),n},reliableMarginLeft:function(){return e(),a},scrollboxSize:function(){return e(),i}}))}();var Ue=["Webkit","Moz","ms"],Xe=E.createElement("div").style,Ve={};function Ge(e){var t=k.cssProps[e]||Ve[e];return t||(e in Xe?e:Ve[e]=function(e){var t=e[0].toUpperCase()+e.slice(1),n=Ue.length;while(n--)if((e=Ue[n]+t)in Xe)return e}(e)||e)}var Ye=/^(none|table(?!-c[ea]).+)/,Qe=/^--/,Je={position:"absolute",visibility:"hidden",display:"block"},Ke={letterSpacing:"0",fontWeight:"400"};function Ze(e,t,n){var r=ne.exec(t);return r?Math.max(0,r[2]-(n||0))+(r[3]||"px"):t}function et(e,t,n,r,i,o){var a="width"===t?1:0,s=0,u=0;if(n===(r?"border":"content"))return 0;for(;a<4;a+=2)"margin"===n&&(u+=k.css(e,n+re[a],!0,i)),r?("content"===n&&(u-=k.css(e,"padding"+re[a],!0,i)),"margin"!==n&&(u-=k.css(e,"border"+re[a]+"Width",!0,i))):(u+=k.css(e,"padding"+re[a],!0,i),"padding"!==n?u+=k.css(e,"border"+re[a]+"Width",!0,i):s+=k.css(e,"border"+re[a]+"Width",!0,i));return!r&&0<=o&&(u+=Math.max(0,Math.ceil(e["offset"+t[0].toUpperCase()+t.slice(1)]-o-u-s-.5))||0),u}function tt(e,t,n){var r=Fe(e),i=(!y.boxSizingReliable()||n)&&"border-box"===k.css(e,"boxSizing",!1,r),o=i,a=_e(e,t,r),s="offset"+t[0].toUpperCase()+t.slice(1);if($e.test(a)){if(!n)return a;a="auto"}return(!y.boxSizingReliable()&&i||"auto"===a||!parseFloat(a)&&"inline"===k.css(e,"display",!1,r))&&e.getClientRects().length&&(i="border-box"===k.css(e,"boxSizing",!1,r),(o=s in e)&&(a=e[s])),(a=parseFloat(a)||0)+et(e,t,n||(i?"border":"content"),o,r,a)+"px"}function nt(e,t,n,r,i){return new nt.prototype.init(e,t,n,r,i)}k.extend({cssHooks:{opacity:{get:function(e,t){if(t){var n=_e(e,"opacity");return""===n?"1":n}}}},cssNumber:{animationIterationCount:!0,columnCount:!0,fillOpacity:!0,flexGrow:!0,flexShrink:!0,fontWeight:!0,gridArea:!0,gridColumn:!0,gridColumnEnd:!0,gridColumnStart:!0,gridRow:!0,gridRowEnd:!0,gridRowStart:!0,lineHeight:!0,opacity:!0,order:!0,orphans:!0,widows:!0,zIndex:!0,zoom:!0},cssProps:{},style:function(e,t,n,r){if(e&&3!==e.nodeType&&8!==e.nodeType&&e.style){var i,o,a,s=V(t),u=Qe.test(t),l=e.style;if(u||(t=Ge(s)),a=k.cssHooks[t]||k.cssHooks[s],void 0===n)return a&&"get"in a&&void 0!==(i=a.get(e,!1,r))?i:l[t];"string"===(o=typeof n)&&(i=ne.exec(n))&&i[1]&&(n=le(e,t,i),o="number"),null!=n&&n==n&&("number"!==o||u||(n+=i&&i[3]||(k.cssNumber[s]?"":"px")),y.clearCloneStyle||""!==n||0!==t.indexOf("background")||(l[t]="inherit"),a&&"set"in a&&void 0===(n=a.set(e,n,r))||(u?l.setProperty(t,n):l[t]=n))}},css:function(e,t,n,r){var i,o,a,s=V(t);return Qe.test(t)||(t=Ge(s)),(a=k.cssHooks[t]||k.cssHooks[s])&&"get"in a&&(i=a.get(e,!0,n)),void 0===i&&(i=_e(e,t,r)),"normal"===i&&t in Ke&&(i=Ke[t]),""===n||n?(o=parseFloat(i),!0===n||isFinite(o)?o||0:i):i}}),k.each(["height","width"],function(e,u){k.cssHooks[u]={get:function(e,t,n){if(t)return!Ye.test(k.css(e,"display"))||e.getClientRects().length&&e.getBoundingClientRect().width?tt(e,u,n):ue(e,Je,function(){return tt(e,u,n)})},set:function(e,t,n){var r,i=Fe(e),o=!y.scrollboxSize()&&"absolute"===i.position,a=(o||n)&&"border-box"===k.css(e,"boxSizing",!1,i),s=n?et(e,u,n,a,i):0;return a&&o&&(s-=Math.ceil(e["offset"+u[0].toUpperCase()+u.slice(1)]-parseFloat(i[u])-et(e,u,"border",!1,i)-.5)),s&&(r=ne.exec(t))&&"px"!==(r[3]||"px")&&(e.style[u]=t,t=k.css(e,u)),Ze(0,t,s)}}}),k.cssHooks.marginLeft=ze(y.reliableMarginLeft,function(e,t){if(t)return(parseFloat(_e(e,"marginLeft"))||e.getBoundingClientRect().left-ue(e,{marginLeft:0},function(){return e.getBoundingClientRect().left}))+"px"}),k.each({margin:"",padding:"",border:"Width"},function(i,o){k.cssHooks[i+o]={expand:function(e){for(var t=0,n={},r="string"==typeof e?e.split(" "):[e];t<4;t++)n[i+re[t]+o]=r[t]||r[t-2]||r[0];return n}},"margin"!==i&&(k.cssHooks[i+o].set=Ze)}),k.fn.extend({css:function(e,t){return _(this,function(e,t,n){var r,i,o={},a=0;if(Array.isArray(t)){for(r=Fe(e),i=t.length;a<i;a++)o[t[a]]=k.css(e,t[a],!1,r);return o}return void 0!==n?k.style(e,t,n):k.css(e,t)},e,t,1<arguments.length)}}),((k.Tween=nt).prototype={constructor:nt,init:function(e,t,n,r,i,o){this.elem=e,this.prop=n,this.easing=i||k.easing._default,this.options=t,this.start=this.now=this.cur(),this.end=r,this.unit=o||(k.cssNumber[n]?"":"px")},cur:function(){var e=nt.propHooks[this.prop];return e&&e.get?e.get(this):nt.propHooks._default.get(this)},run:function(e){var t,n=nt.propHooks[this.prop];return this.options.duration?this.pos=t=k.easing[this.easing](e,this.options.duration*e,0,1,this.options.duration):this.pos=t=e,this.now=(this.end-this.start)*t+this.start,this.options.step&&this.options.step.call(this.elem,this.now,this),n&&n.set?n.set(this):nt.propHooks._default.set(this),this}}).init.prototype=nt.prototype,(nt.propHooks={_default:{get:function(e){var t;return 1!==e.elem.nodeType||null!=e.elem[e.prop]&&null==e.elem.style[e.prop]?e.elem[e.prop]:(t=k.css(e.elem,e.prop,""))&&"auto"!==t?t:0},set:function(e){k.fx.step[e.prop]?k.fx.step[e.prop](e):1!==e.elem.nodeType||!k.cssHooks[e.prop]&&null==e.elem.style[Ge(e.prop)]?e.elem[e.prop]=e.now:k.style(e.elem,e.prop,e.now+e.unit)}}}).scrollTop=nt.propHooks.scrollLeft={set:function(e){e.elem.nodeType&&e.elem.parentNode&&(e.elem[e.prop]=e.now)}},k.easing={linear:function(e){return e},swing:function(e){return.5-Math.cos(e*Math.PI)/2},_default:"swing"},k.fx=nt.prototype.init,k.fx.step={};var rt,it,ot,at,st=/^(?:toggle|show|hide)$/,ut=/queueHooks$/;function lt(){it&&(!1===E.hidden&&C.requestAnimationFrame?C.requestAnimationFrame(lt):C.setTimeout(lt,k.fx.interval),k.fx.tick())}function ct(){return C.setTimeout(function(){rt=void 0}),rt=Date.now()}function ft(e,t){var n,r=0,i={height:e};for(t=t?1:0;r<4;r+=2-t)i["margin"+(n=re[r])]=i["padding"+n]=e;return t&&(i.opacity=i.width=e),i}function pt(e,t,n){for(var r,i=(dt.tweeners[t]||[]).concat(dt.tweeners["*"]),o=0,a=i.length;o<a;o++)if(r=i[o].call(n,t,e))return r}function dt(o,e,t){var n,a,r=0,i=dt.prefilters.length,s=k.Deferred().always(function(){delete u.elem}),u=function(){if(a)return!1;for(var e=rt||ct(),t=Math.max(0,l.startTime+l.duration-e),n=1-(t/l.duration||0),r=0,i=l.tweens.length;r<i;r++)l.tweens[r].run(n);return s.notifyWith(o,[l,n,t]),n<1&&i?t:(i||s.notifyWith(o,[l,1,0]),s.resolveWith(o,[l]),!1)},l=s.promise({elem:o,props:k.extend({},e),opts:k.extend(!0,{specialEasing:{},easing:k.easing._default},t),originalProperties:e,originalOptions:t,startTime:rt||ct(),duration:t.duration,tweens:[],createTween:function(e,t){var n=k.Tween(o,l.opts,e,t,l.opts.specialEasing[e]||l.opts.easing);return l.tweens.push(n),n},stop:function(e){var t=0,n=e?l.tweens.length:0;if(a)return this;for(a=!0;t<n;t++)l.tweens[t].run(1);return e?(s.notifyWith(o,[l,1,0]),s.resolveWith(o,[l,e])):s.rejectWith(o,[l,e]),this}}),c=l.props;for(!function(e,t){var n,r,i,o,a;for(n in e)if(i=t[r=V(n)],o=e[n],Array.isArray(o)&&(i=o[1],o=e[n]=o[0]),n!==r&&(e[r]=o,delete e[n]),(a=k.cssHooks[r])&&"expand"in a)for(n in o=a.expand(o),delete e[r],o)n in e||(e[n]=o[n],t[n]=i);else t[r]=i}(c,l.opts.specialEasing);r<i;r++)if(n=dt.prefilters[r].call(l,o,c,l.opts))return m(n.stop)&&(k._queueHooks(l.elem,l.opts.queue).stop=n.stop.bind(n)),n;return k.map(c,pt,l),m(l.opts.start)&&l.opts.start.call(o,l),l.progress(l.opts.progress).done(l.opts.done,l.opts.complete).fail(l.opts.fail).always(l.opts.always),k.fx.timer(k.extend(u,{elem:o,anim:l,queue:l.opts.queue})),l}k.Animation=k.extend(dt,{tweeners:{"*":[function(e,t){var n=this.createTween(e,t);return le(n.elem,e,ne.exec(t),n),n}]},tweener:function(e,t){m(e)?(t=e,e=["*"]):e=e.match(R);for(var n,r=0,i=e.length;r<i;r++)n=e[r],dt.tweeners[n]=dt.tweeners[n]||[],dt.tweeners[n].unshift(t)},prefilters:[function(e,t,n){var r,i,o,a,s,u,l,c,f="width"in t||"height"in t,p=this,d={},h=e.style,g=e.nodeType&&se(e),v=Q.get(e,"fxshow");for(r in n.queue||(null==(a=k._queueHooks(e,"fx")).unqueued&&(a.unqueued=0,s=a.empty.fire,a.empty.fire=function(){a.unqueued||s()}),a.unqueued++,p.always(function(){p.always(function(){a.unqueued--,k.queue(e,"fx").length||a.empty.fire()})})),t)if(i=t[r],st.test(i)){if(delete t[r],o=o||"toggle"===i,i===(g?"hide":"show")){if("show"!==i||!v||void 0===v[r])continue;g=!0}d[r]=v&&v[r]||k.style(e,r)}if((u=!k.isEmptyObject(t))||!k.isEmptyObject(d))for(r in f&&1===e.nodeType&&(n.overflow=[h.overflow,h.overflowX,h.overflowY],null==(l=v&&v.display)&&(l=Q.get(e,"display")),"none"===(c=k.css(e,"display"))&&(l?c=l:(fe([e],!0),l=e.style.display||l,c=k.css(e,"display"),fe([e]))),("inline"===c||"inline-block"===c&&null!=l)&&"none"===k.css(e,"float")&&(u||(p.done(function(){h.display=l}),null==l&&(c=h.display,l="none"===c?"":c)),h.display="inline-block")),n.overflow&&(h.overflow="hidden",p.always(function(){h.overflow=n.overflow[0],h.overflowX=n.overflow[1],h.overflowY=n.overflow[2]})),u=!1,d)u||(v?"hidden"in v&&(g=v.hidden):v=Q.access(e,"fxshow",{display:l}),o&&(v.hidden=!g),g&&fe([e],!0),p.done(function(){for(r in g||fe([e]),Q.remove(e,"fxshow"),d)k.style(e,r,d[r])})),u=pt(g?v[r]:0,r,p),r in v||(v[r]=u.start,g&&(u.end=u.start,u.start=0))}],prefilter:function(e,t){t?dt.prefilters.unshift(e):dt.prefilters.push(e)}}),k.speed=function(e,t,n){var r=e&&"object"==typeof e?k.extend({},e):{complete:n||!n&&t||m(e)&&e,duration:e,easing:n&&t||t&&!m(t)&&t};return k.fx.off?r.duration=0:"number"!=typeof r.duration&&(r.duration in k.fx.speeds?r.duration=k.fx.speeds[r.duration]:r.duration=k.fx.speeds._default),null!=r.queue&&!0!==r.queue||(r.queue="fx"),r.old=r.complete,r.complete=function(){m(r.old)&&r.old.call(this),r.queue&&k.dequeue(this,r.queue)},r},k.fn.extend({fadeTo:function(e,t,n,r){return this.filter(se).css("opacity",0).show().end().animate({opacity:t},e,n,r)},animate:function(t,e,n,r){var i=k.isEmptyObject(t),o=k.speed(e,n,r),a=function(){var e=dt(this,k.extend({},t),o);(i||Q.get(this,"finish"))&&e.stop(!0)};return a.finish=a,i||!1===o.queue?this.each(a):this.queue(o.queue,a)},stop:function(i,e,o){var a=function(e){var t=e.stop;delete e.stop,t(o)};return"string"!=typeof i&&(o=e,e=i,i=void 0),e&&!1!==i&&this.queue(i||"fx",[]),this.each(function(){var e=!0,t=null!=i&&i+"queueHooks",n=k.timers,r=Q.get(this);if(t)r[t]&&r[t].stop&&a(r[t]);else for(t in r)r[t]&&r[t].stop&&ut.test(t)&&a(r[t]);for(t=n.length;t--;)n[t].elem!==this||null!=i&&n[t].queue!==i||(n[t].anim.stop(o),e=!1,n.splice(t,1));!e&&o||k.dequeue(this,i)})},finish:function(a){return!1!==a&&(a=a||"fx"),this.each(function(){var e,t=Q.get(this),n=t[a+"queue"],r=t[a+"queueHooks"],i=k.timers,o=n?n.length:0;for(t.finish=!0,k.queue(this,a,[]),r&&r.stop&&r.stop.call(this,!0),e=i.length;e--;)i[e].elem===this&&i[e].queue===a&&(i[e].anim.stop(!0),i.splice(e,1));for(e=0;e<o;e++)n[e]&&n[e].finish&&n[e].finish.call(this);delete t.finish})}}),k.each(["toggle","show","hide"],function(e,r){var i=k.fn[r];k.fn[r]=function(e,t,n){return null==e||"boolean"==typeof e?i.apply(this,arguments):this.animate(ft(r,!0),e,t,n)}}),k.each({slideDown:ft("show"),slideUp:ft("hide"),slideToggle:ft("toggle"),fadeIn:{opacity:"show"},fadeOut:{opacity:"hide"},fadeToggle:{opacity:"toggle"}},function(e,r){k.fn[e]=function(e,t,n){return this.animate(r,e,t,n)}}),k.timers=[],k.fx.tick=function(){var e,t=0,n=k.timers;for(rt=Date.now();t<n.length;t++)(e=n[t])()||n[t]!==e||n.splice(t--,1);n.length||k.fx.stop(),rt=void 0},k.fx.timer=function(e){k.timers.push(e),k.fx.start()},k.fx.interval=13,k.fx.start=function(){it||(it=!0,lt())},k.fx.stop=function(){it=null},k.fx.speeds={slow:600,fast:200,_default:400},k.fn.delay=function(r,e){return r=k.fx&&k.fx.speeds[r]||r,e=e||"fx",this.queue(e,function(e,t){var n=C.setTimeout(e,r);t.stop=function(){C.clearTimeout(n)}})},ot=E.createElement("input"),at=E.createElement("select").appendChild(E.createElement("option")),ot.type="checkbox",y.checkOn=""!==ot.value,y.optSelected=at.selected,(ot=E.createElement("input")).value="t",ot.type="radio",y.radioValue="t"===ot.value;var ht,gt=k.expr.attrHandle;k.fn.extend({attr:function(e,t){return _(this,k.attr,e,t,1<arguments.length)},removeAttr:function(e){return this.each(function(){k.removeAttr(this,e)})}}),k.extend({attr:function(e,t,n){var r,i,o=e.nodeType;if(3!==o&&8!==o&&2!==o)return"undefined"==typeof e.getAttribute?k.prop(e,t,n):(1===o&&k.isXMLDoc(e)||(i=k.attrHooks[t.toLowerCase()]||(k.expr.match.bool.test(t)?ht:void 0)),void 0!==n?null===n?void k.removeAttr(e,t):i&&"set"in i&&void 0!==(r=i.set(e,n,t))?r:(e.setAttribute(t,n+""),n):i&&"get"in i&&null!==(r=i.get(e,t))?r:null==(r=k.find.attr(e,t))?void 0:r)},attrHooks:{type:{set:function(e,t){if(!y.radioValue&&"radio"===t&&A(e,"input")){var n=e.value;return e.setAttribute("type",t),n&&(e.value=n),t}}}},removeAttr:function(e,t){var n,r=0,i=t&&t.match(R);if(i&&1===e.nodeType)while(n=i[r++])e.removeAttribute(n)}}),ht={set:function(e,t,n){return!1===t?k.removeAttr(e,n):e.setAttribute(n,n),n}},k.each(k.expr.match.bool.source.match(/\w+/g),function(e,t){var a=gt[t]||k.find.attr;gt[t]=function(e,t,n){var r,i,o=t.toLowerCase();return n||(i=gt[o],gt[o]=r,r=null!=a(e,t,n)?o:null,gt[o]=i),r}});var vt=/^(?:input|select|textarea|button)$/i,yt=/^(?:a|area)$/i;function mt(e){return(e.match(R)||[]).join(" ")}function xt(e){return e.getAttribute&&e.getAttribute("class")||""}function bt(e){return Array.isArray(e)?e:"string"==typeof e&&e.match(R)||[]}k.fn.extend({prop:function(e,t){return _(this,k.prop,e,t,1<arguments.length)},removeProp:function(e){return this.each(function(){delete this[k.propFix[e]||e]})}}),k.extend({prop:function(e,t,n){var r,i,o=e.nodeType;if(3!==o&&8!==o&&2!==o)return 1===o&&k.isXMLDoc(e)||(t=k.propFix[t]||t,i=k.propHooks[t]),void 0!==n?i&&"set"in i&&void 0!==(r=i.set(e,n,t))?r:e[t]=n:i&&"get"in i&&null!==(r=i.get(e,t))?r:e[t]},propHooks:{tabIndex:{get:function(e){var t=k.find.attr(e,"tabindex");return t?parseInt(t,10):vt.test(e.nodeName)||yt.test(e.nodeName)&&e.href?0:-1}}},propFix:{"for":"htmlFor","class":"className"}}),y.optSelected||(k.propHooks.selected={get:function(e){var t=e.parentNode;return t&&t.parentNode&&t.parentNode.selectedIndex,null},set:function(e){var t=e.parentNode;t&&(t.selectedIndex,t.parentNode&&t.parentNode.selectedIndex)}}),k.each(["tabIndex","readOnly","maxLength","cellSpacing","cellPadding","rowSpan","colSpan","useMap","frameBorder","contentEditable"],function(){k.propFix[this.toLowerCase()]=this}),k.fn.extend({addClass:function(t){var e,n,r,i,o,a,s,u=0;if(m(t))return this.each(function(e){k(this).addClass(t.call(this,e,xt(this)))});if((e=bt(t)).length)while(n=this[u++])if(i=xt(n),r=1===n.nodeType&&" "+mt(i)+" "){a=0;while(o=e[a++])r.indexOf(" "+o+" ")<0&&(r+=o+" ");i!==(s=mt(r))&&n.setAttribute("class",s)}return this},removeClass:function(t){var e,n,r,i,o,a,s,u=0;if(m(t))return this.each(function(e){k(this).removeClass(t.call(this,e,xt(this)))});if(!arguments.length)return this.attr("class","");if((e=bt(t)).length)while(n=this[u++])if(i=xt(n),r=1===n.nodeType&&" "+mt(i)+" "){a=0;while(o=e[a++])while(-1<r.indexOf(" "+o+" "))r=r.replace(" "+o+" "," ");i!==(s=mt(r))&&n.setAttribute("class",s)}return this},toggleClass:function(i,t){var o=typeof i,a="string"===o||Array.isArray(i);return"boolean"==typeof t&&a?t?this.addClass(i):this.removeClass(i):m(i)?this.each(function(e){k(this).toggleClass(i.call(this,e,xt(this),t),t)}):this.each(function(){var e,t,n,r;if(a){t=0,n=k(this),r=bt(i);while(e=r[t++])n.hasClass(e)?n.removeClass(e):n.addClass(e)}else void 0!==i&&"boolean"!==o||((e=xt(this))&&Q.set(this,"__className__",e),this.setAttribute&&this.setAttribute("class",e||!1===i?"":Q.get(this,"__className__")||""))})},hasClass:function(e){var t,n,r=0;t=" "+e+" ";while(n=this[r++])if(1===n.nodeType&&-1<(" "+mt(xt(n))+" ").indexOf(t))return!0;return!1}});var wt=/\r/g;k.fn.extend({val:function(n){var r,e,i,t=this[0];return arguments.length?(i=m(n),this.each(function(e){var t;1===this.nodeType&&(null==(t=i?n.call(this,e,k(this).val()):n)?t="":"number"==typeof t?t+="":Array.isArray(t)&&(t=k.map(t,function(e){return null==e?"":e+""})),(r=k.valHooks[this.type]||k.valHooks[this.nodeName.toLowerCase()])&&"set"in r&&void 0!==r.set(this,t,"value")||(this.value=t))})):t?(r=k.valHooks[t.type]||k.valHooks[t.nodeName.toLowerCase()])&&"get"in r&&void 0!==(e=r.get(t,"value"))?e:"string"==typeof(e=t.value)?e.replace(wt,""):null==e?"":e:void 0}}),k.extend({valHooks:{option:{get:function(e){var t=k.find.attr(e,"value");return null!=t?t:mt(k.text(e))}},select:{get:function(e){var t,n,r,i=e.options,o=e.selectedIndex,a="select-one"===e.type,s=a?null:[],u=a?o+1:i.length;for(r=o<0?u:a?o:0;r<u;r++)if(((n=i[r]).selected||r===o)&&!n.disabled&&(!n.parentNode.disabled||!A(n.parentNode,"optgroup"))){if(t=k(n).val(),a)return t;s.push(t)}return s},set:function(e,t){var n,r,i=e.options,o=k.makeArray(t),a=i.length;while(a--)((r=i[a]).selected=-1<k.inArray(k.valHooks.option.get(r),o))&&(n=!0);return n||(e.selectedIndex=-1),o}}}}),k.each(["radio","checkbox"],function(){k.valHooks[this]={set:function(e,t){if(Array.isArray(t))return e.checked=-1<k.inArray(k(e).val(),t)}},y.checkOn||(k.valHooks[this].get=function(e){return null===e.getAttribute("value")?"on":e.value})}),y.focusin="onfocusin"in C;var Tt=/^(?:focusinfocus|focusoutblur)$/,Ct=function(e){e.stopPropagation()};k.extend(k.event,{trigger:function(e,t,n,r){var i,o,a,s,u,l,c,f,p=[n||E],d=v.call(e,"type")?e.type:e,h=v.call(e,"namespace")?e.namespace.split("."):[];if(o=f=a=n=n||E,3!==n.nodeType&&8!==n.nodeType&&!Tt.test(d+k.event.triggered)&&(-1<d.indexOf(".")&&(d=(h=d.split(".")).shift(),h.sort()),u=d.indexOf(":")<0&&"on"+d,(e=e[k.expando]?e:new k.Event(d,"object"==typeof e&&e)).isTrigger=r?2:3,e.namespace=h.join("."),e.rnamespace=e.namespace?new RegExp("(^|\\.)"+h.join("\\.(?:.*\\.|)")+"(\\.|$)"):null,e.result=void 0,e.target||(e.target=n),t=null==t?[e]:k.makeArray(t,[e]),c=k.event.special[d]||{},r||!c.trigger||!1!==c.trigger.apply(n,t))){if(!r&&!c.noBubble&&!x(n)){for(s=c.delegateType||d,Tt.test(s+d)||(o=o.parentNode);o;o=o.parentNode)p.push(o),a=o;a===(n.ownerDocument||E)&&p.push(a.defaultView||a.parentWindow||C)}i=0;while((o=p[i++])&&!e.isPropagationStopped())f=o,e.type=1<i?s:c.bindType||d,(l=(Q.get(o,"events")||{})[e.type]&&Q.get(o,"handle"))&&l.apply(o,t),(l=u&&o[u])&&l.apply&&G(o)&&(e.result=l.apply(o,t),!1===e.result&&e.preventDefault());return e.type=d,r||e.isDefaultPrevented()||c._default&&!1!==c._default.apply(p.pop(),t)||!G(n)||u&&m(n[d])&&!x(n)&&((a=n[u])&&(n[u]=null),k.event.triggered=d,e.isPropagationStopped()&&f.addEventListener(d,Ct),n[d](),e.isPropagationStopped()&&f.removeEventListener(d,Ct),k.event.triggered=void 0,a&&(n[u]=a)),e.result}},simulate:function(e,t,n){var r=k.extend(new k.Event,n,{type:e,isSimulated:!0});k.event.trigger(r,null,t)}}),k.fn.extend({trigger:function(e,t){return this.each(function(){k.event.trigger(e,t,this)})},triggerHandler:function(e,t){var n=this[0];if(n)return k.event.trigger(e,t,n,!0)}}),y.focusin||k.each({focus:"focusin",blur:"focusout"},function(n,r){var i=function(e){k.event.simulate(r,e.target,k.event.fix(e))};k.event.special[r]={setup:function(){var e=this.ownerDocument||this,t=Q.access(e,r);t||e.addEventListener(n,i,!0),Q.access(e,r,(t||0)+1)},teardown:function(){var e=this.ownerDocument||this,t=Q.access(e,r)-1;t?Q.access(e,r,t):(e.removeEventListener(n,i,!0),Q.remove(e,r))}}});var Et=C.location,kt=Date.now(),St=/\?/;k.parseXML=function(e){var t;if(!e||"string"!=typeof e)return null;try{t=(new C.DOMParser).parseFromString(e,"text/xml")}catch(e){t=void 0}return t&&!t.getElementsByTagName("parsererror").length||k.error("Invalid XML: "+e),t};var Nt=/\[\]$/,At=/\r?\n/g,Dt=/^(?:submit|button|image|reset|file)$/i,jt=/^(?:input|select|textarea|keygen)/i;function qt(n,e,r,i){var t;if(Array.isArray(e))k.each(e,function(e,t){r||Nt.test(n)?i(n,t):qt(n+"["+("object"==typeof t&&null!=t?e:"")+"]",t,r,i)});else if(r||"object"!==w(e))i(n,e);else for(t in e)qt(n+"["+t+"]",e[t],r,i)}k.param=function(e,t){var n,r=[],i=function(e,t){var n=m(t)?t():t;r[r.length]=encodeURIComponent(e)+"="+encodeURIComponent(null==n?"":n)};if(null==e)return"";if(Array.isArray(e)||e.jquery&&!k.isPlainObject(e))k.each(e,function(){i(this.name,this.value)});else for(n in e)qt(n,e[n],t,i);return r.join("&")},k.fn.extend({serialize:function(){return k.param(this.serializeArray())},serializeArray:function(){return this.map(function(){var e=k.prop(this,"elements");return e?k.makeArray(e):this}).filter(function(){var e=this.type;return this.name&&!k(this).is(":disabled")&&jt.test(this.nodeName)&&!Dt.test(e)&&(this.checked||!pe.test(e))}).map(function(e,t){var n=k(this).val();return null==n?null:Array.isArray(n)?k.map(n,function(e){return{name:t.name,value:e.replace(At,"\r\n")}}):{name:t.name,value:n.replace(At,"\r\n")}}).get()}});var Lt=/%20/g,Ht=/#.*$/,Ot=/([?&])_=[^&]*/,Pt=/^(.*?):[ \t]*([^\r\n]*)$/gm,Rt=/^(?:GET|HEAD)$/,Mt=/^\/\//,It={},Wt={},$t="*/".concat("*"),Ft=E.createElement("a");function Bt(o){return function(e,t){"string"!=typeof e&&(t=e,e="*");var n,r=0,i=e.toLowerCase().match(R)||[];if(m(t))while(n=i[r++])"+"===n[0]?(n=n.slice(1)||"*",(o[n]=o[n]||[]).unshift(t)):(o[n]=o[n]||[]).push(t)}}function _t(t,i,o,a){var s={},u=t===Wt;function l(e){var r;return s[e]=!0,k.each(t[e]||[],function(e,t){var n=t(i,o,a);return"string"!=typeof n||u||s[n]?u?!(r=n):void 0:(i.dataTypes.unshift(n),l(n),!1)}),r}return l(i.dataTypes[0])||!s["*"]&&l("*")}function zt(e,t){var n,r,i=k.ajaxSettings.flatOptions||{};for(n in t)void 0!==t[n]&&((i[n]?e:r||(r={}))[n]=t[n]);return r&&k.extend(!0,e,r),e}Ft.href=Et.href,k.extend({active:0,lastModified:{},etag:{},ajaxSettings:{url:Et.href,type:"GET",isLocal:/^(?:about|app|app-storage|.+-extension|file|res|widget):$/.test(Et.protocol),global:!0,processData:!0,async:!0,contentType:"application/x-www-form-urlencoded; charset=UTF-8",accepts:{"*":$t,text:"text/plain",html:"text/html",xml:"application/xml, text/xml",json:"application/json, text/javascript"},contents:{xml:/\bxml\b/,html:/\bhtml/,json:/\bjson\b/},responseFields:{xml:"responseXML",text:"responseText",json:"responseJSON"},converters:{"* text":String,"text html":!0,"text json":JSON.parse,"text xml":k.parseXML},flatOptions:{url:!0,context:!0}},ajaxSetup:function(e,t){return t?zt(zt(e,k.ajaxSettings),t):zt(k.ajaxSettings,e)},ajaxPrefilter:Bt(It),ajaxTransport:Bt(Wt),ajax:function(e,t){"object"==typeof e&&(t=e,e=void 0),t=t||{};var c,f,p,n,d,r,h,g,i,o,v=k.ajaxSetup({},t),y=v.context||v,m=v.context&&(y.nodeType||y.jquery)?k(y):k.event,x=k.Deferred(),b=k.Callbacks("once memory"),w=v.statusCode||{},a={},s={},u="canceled",T={readyState:0,getResponseHeader:function(e){var t;if(h){if(!n){n={};while(t=Pt.exec(p))n[t[1].toLowerCase()+" "]=(n[t[1].toLowerCase()+" "]||[]).concat(t[2])}t=n[e.toLowerCase()+" "]}return null==t?null:t.join(", ")},getAllResponseHeaders:function(){return h?p:null},setRequestHeader:function(e,t){return null==h&&(e=s[e.toLowerCase()]=s[e.toLowerCase()]||e,a[e]=t),this},overrideMimeType:function(e){return null==h&&(v.mimeType=e),this},statusCode:function(e){var t;if(e)if(h)T.always(e[T.status]);else for(t in e)w[t]=[w[t],e[t]];return this},abort:function(e){var t=e||u;return c&&c.abort(t),l(0,t),this}};if(x.promise(T),v.url=((e||v.url||Et.href)+"").replace(Mt,Et.protocol+"//"),v.type=t.method||t.type||v.method||v.type,v.dataTypes=(v.dataType||"*").toLowerCase().match(R)||[""],null==v.crossDomain){r=E.createElement("a");try{r.href=v.url,r.href=r.href,v.crossDomain=Ft.protocol+"//"+Ft.host!=r.protocol+"//"+r.host}catch(e){v.crossDomain=!0}}if(v.data&&v.processData&&"string"!=typeof v.data&&(v.data=k.param(v.data,v.traditional)),_t(It,v,t,T),h)return T;for(i in(g=k.event&&v.global)&&0==k.active++&&k.event.trigger("ajaxStart"),v.type=v.type.toUpperCase(),v.hasContent=!Rt.test(v.type),f=v.url.replace(Ht,""),v.hasContent?v.data&&v.processData&&0===(v.contentType||"").indexOf("application/x-www-form-urlencoded")&&(v.data=v.data.replace(Lt,"+")):(o=v.url.slice(f.length),v.data&&(v.processData||"string"==typeof v.data)&&(f+=(St.test(f)?"&":"?")+v.data,delete v.data),!1===v.cache&&(f=f.replace(Ot,"$1"),o=(St.test(f)?"&":"?")+"_="+kt+++o),v.url=f+o),v.ifModified&&(k.lastModified[f]&&T.setRequestHeader("If-Modified-Since",k.lastModified[f]),k.etag[f]&&T.setRequestHeader("If-None-Match",k.etag[f])),(v.data&&v.hasContent&&!1!==v.contentType||t.contentType)&&T.setRequestHeader("Content-Type",v.contentType),T.setRequestHeader("Accept",v.dataTypes[0]&&v.accepts[v.dataTypes[0]]?v.accepts[v.dataTypes[0]]+("*"!==v.dataTypes[0]?", "+$t+"; q=0.01":""):v.accepts["*"]),v.headers)T.setRequestHeader(i,v.headers[i]);if(v.beforeSend&&(!1===v.beforeSend.call(y,T,v)||h))return T.abort();if(u="abort",b.add(v.complete),T.done(v.success),T.fail(v.error),c=_t(Wt,v,t,T)){if(T.readyState=1,g&&m.trigger("ajaxSend",[T,v]),h)return T;v.async&&0<v.timeout&&(d=C.setTimeout(function(){T.abort("timeout")},v.timeout));try{h=!1,c.send(a,l)}catch(e){if(h)throw e;l(-1,e)}}else l(-1,"No Transport");function l(e,t,n,r){var i,o,a,s,u,l=t;h||(h=!0,d&&C.clearTimeout(d),c=void 0,p=r||"",T.readyState=0<e?4:0,i=200<=e&&e<300||304===e,n&&(s=function(e,t,n){var r,i,o,a,s=e.contents,u=e.dataTypes;while("*"===u[0])u.shift(),void 0===r&&(r=e.mimeType||t.getResponseHeader("Content-Type"));if(r)for(i in s)if(s[i]&&s[i].test(r)){u.unshift(i);break}if(u[0]in n)o=u[0];else{for(i in n){if(!u[0]||e.converters[i+" "+u[0]]){o=i;break}a||(a=i)}o=o||a}if(o)return o!==u[0]&&u.unshift(o),n[o]}(v,T,n)),s=function(e,t,n,r){var i,o,a,s,u,l={},c=e.dataTypes.slice();if(c[1])for(a in e.converters)l[a.toLowerCase()]=e.converters[a];o=c.shift();while(o)if(e.responseFields[o]&&(n[e.responseFields[o]]=t),!u&&r&&e.dataFilter&&(t=e.dataFilter(t,e.dataType)),u=o,o=c.shift())if("*"===o)o=u;else if("*"!==u&&u!==o){if(!(a=l[u+" "+o]||l["* "+o]))for(i in l)if((s=i.split(" "))[1]===o&&(a=l[u+" "+s[0]]||l["* "+s[0]])){!0===a?a=l[i]:!0!==l[i]&&(o=s[0],c.unshift(s[1]));break}if(!0!==a)if(a&&e["throws"])t=a(t);else try{t=a(t)}catch(e){return{state:"parsererror",error:a?e:"No conversion from "+u+" to "+o}}}return{state:"success",data:t}}(v,s,T,i),i?(v.ifModified&&((u=T.getResponseHeader("Last-Modified"))&&(k.lastModified[f]=u),(u=T.getResponseHeader("etag"))&&(k.etag[f]=u)),204===e||"HEAD"===v.type?l="nocontent":304===e?l="notmodified":(l=s.state,o=s.data,i=!(a=s.error))):(a=l,!e&&l||(l="error",e<0&&(e=0))),T.status=e,T.statusText=(t||l)+"",i?x.resolveWith(y,[o,l,T]):x.rejectWith(y,[T,l,a]),T.statusCode(w),w=void 0,g&&m.trigger(i?"ajaxSuccess":"ajaxError",[T,v,i?o:a]),b.fireWith(y,[T,l]),g&&(m.trigger("ajaxComplete",[T,v]),--k.active||k.event.trigger("ajaxStop")))}return T},getJSON:function(e,t,n){return k.get(e,t,n,"json")},getScript:function(e,t){return k.get(e,void 0,t,"script")}}),k.each(["get","post"],function(e,i){k[i]=function(e,t,n,r){return m(t)&&(r=r||n,n=t,t=void 0),k.ajax(k.extend({url:e,type:i,dataType:r,data:t,success:n},k.isPlainObject(e)&&e))}}),k._evalUrl=function(e,t){return k.ajax({url:e,type:"GET",dataType:"script",cache:!0,async:!1,global:!1,converters:{"text script":function(){}},dataFilter:function(e){k.globalEval(e,t)}})},k.fn.extend({wrapAll:function(e){var t;return this[0]&&(m(e)&&(e=e.call(this[0])),t=k(e,this[0].ownerDocument).eq(0).clone(!0),this[0].parentNode&&t.insertBefore(this[0]),t.map(function(){var e=this;while(e.firstElementChild)e=e.firstElementChild;return e}).append(this)),this},wrapInner:function(n){return m(n)?this.each(function(e){k(this).wrapInner(n.call(this,e))}):this.each(function(){var e=k(this),t=e.contents();t.length?t.wrapAll(n):e.append(n)})},wrap:function(t){var n=m(t);return this.each(function(e){k(this).wrapAll(n?t.call(this,e):t)})},unwrap:function(e){return this.parent(e).not("body").each(function(){k(this).replaceWith(this.childNodes)}),this}}),k.expr.pseudos.hidden=function(e){return!k.expr.pseudos.visible(e)},k.expr.pseudos.visible=function(e){return!!(e.offsetWidth||e.offsetHeight||e.getClientRects().length)},k.ajaxSettings.xhr=function(){try{return new C.XMLHttpRequest}catch(e){}};var Ut={0:200,1223:204},Xt=k.ajaxSettings.xhr();y.cors=!!Xt&&"withCredentials"in Xt,y.ajax=Xt=!!Xt,k.ajaxTransport(function(i){var o,a;if(y.cors||Xt&&!i.crossDomain)return{send:function(e,t){var n,r=i.xhr();if(r.open(i.type,i.url,i.async,i.username,i.password),i.xhrFields)for(n in i.xhrFields)r[n]=i.xhrFields[n];for(n in i.mimeType&&r.overrideMimeType&&r.overrideMimeType(i.mimeType),i.crossDomain||e["X-Requested-With"]||(e["X-Requested-With"]="XMLHttpRequest"),e)r.setRequestHeader(n,e[n]);o=function(e){return function(){o&&(o=a=r.onload=r.onerror=r.onabort=r.ontimeout=r.onreadystatechange=null,"abort"===e?r.abort():"error"===e?"number"!=typeof r.status?t(0,"error"):t(r.status,r.statusText):t(Ut[r.status]||r.status,r.statusText,"text"!==(r.responseType||"text")||"string"!=typeof r.responseText?{binary:r.response}:{text:r.responseText},r.getAllResponseHeaders()))}},r.onload=o(),a=r.onerror=r.ontimeout=o("error"),void 0!==r.onabort?r.onabort=a:r.onreadystatechange=function(){4===r.readyState&&C.setTimeout(function(){o&&a()})},o=o("abort");try{r.send(i.hasContent&&i.data||null)}catch(e){if(o)throw e}},abort:function(){o&&o()}}}),k.ajaxPrefilter(function(e){e.crossDomain&&(e.contents.script=!1)}),k.ajaxSetup({accepts:{script:"text/javascript, application/javascript, application/ecmascript, application/x-ecmascript"},contents:{script:/\b(?:java|ecma)script\b/},converters:{"text script":function(e){return k.globalEval(e),e}}}),k.ajaxPrefilter("script",function(e){void 0===e.cache&&(e.cache=!1),e.crossDomain&&(e.type="GET")}),k.ajaxTransport("script",function(n){var r,i;if(n.crossDomain||n.scriptAttrs)return{send:function(e,t){r=k("<script>").attr(n.scriptAttrs||{}).prop({charset:n.scriptCharset,src:n.url}).on("load error",i=function(e){r.remove(),i=null,e&&t("error"===e.type?404:200,e.type)}),E.head.appendChild(r[0])},abort:function(){i&&i()}}});var Vt,Gt=[],Yt=/(=)\?(?=&|$)|\?\?/;k.ajaxSetup({jsonp:"callback",jsonpCallback:function(){var e=Gt.pop()||k.expando+"_"+kt++;return this[e]=!0,e}}),k.ajaxPrefilter("json jsonp",function(e,t,n){var r,i,o,a=!1!==e.jsonp&&(Yt.test(e.url)?"url":"string"==typeof e.data&&0===(e.contentType||"").indexOf("application/x-www-form-urlencoded")&&Yt.test(e.data)&&"data");if(a||"jsonp"===e.dataTypes[0])return r=e.jsonpCallback=m(e.jsonpCallback)?e.jsonpCallback():e.jsonpCallback,a?e[a]=e[a].replace(Yt,"$1"+r):!1!==e.jsonp&&(e.url+=(St.test(e.url)?"&":"?")+e.jsonp+"="+r),e.converters["script json"]=function(){return o||k.error(r+" was not called"),o[0]},e.dataTypes[0]="json",i=C[r],C[r]=function(){o=arguments},n.always(function(){void 0===i?k(C).removeProp(r):C[r]=i,e[r]&&(e.jsonpCallback=t.jsonpCallback,Gt.push(r)),o&&m(i)&&i(o[0]),o=i=void 0}),"script"}),y.createHTMLDocument=((Vt=E.implementation.createHTMLDocument("").body).innerHTML="<form></form><form></form>",2===Vt.childNodes.length),k.parseHTML=function(e,t,n){return"string"!=typeof e?[]:("boolean"==typeof t&&(n=t,t=!1),t||(y.createHTMLDocument?((r=(t=E.implementation.createHTMLDocument("")).createElement("base")).href=E.location.href,t.head.appendChild(r)):t=E),o=!n&&[],(i=D.exec(e))?[t.createElement(i[1])]:(i=we([e],t,o),o&&o.length&&k(o).remove(),k.merge([],i.childNodes)));var r,i,o},k.fn.load=function(e,t,n){var r,i,o,a=this,s=e.indexOf(" ");return-1<s&&(r=mt(e.slice(s)),e=e.slice(0,s)),m(t)?(n=t,t=void 0):t&&"object"==typeof t&&(i="POST"),0<a.length&&k.ajax({url:e,type:i||"GET",dataType:"html",data:t}).done(function(e){o=arguments,a.html(r?k("<div>").append(k.parseHTML(e)).find(r):e)}).always(n&&function(e,t){a.each(function(){n.apply(this,o||[e.responseText,t,e])})}),this},k.each(["ajaxStart","ajaxStop","ajaxComplete","ajaxError","ajaxSuccess","ajaxSend"],function(e,t){k.fn[t]=function(e){return this.on(t,e)}}),k.expr.pseudos.animated=function(t){return k.grep(k.timers,function(e){return t===e.elem}).length},k.offset={setOffset:function(e,t,n){var r,i,o,a,s,u,l=k.css(e,"position"),c=k(e),f={};"static"===l&&(e.style.position="relative"),s=c.offset(),o=k.css(e,"top"),u=k.css(e,"left"),("absolute"===l||"fixed"===l)&&-1<(o+u).indexOf("auto")?(a=(r=c.position()).top,i=r.left):(a=parseFloat(o)||0,i=parseFloat(u)||0),m(t)&&(t=t.call(e,n,k.extend({},s))),null!=t.top&&(f.top=t.top-s.top+a),null!=t.left&&(f.left=t.left-s.left+i),"using"in t?t.using.call(e,f):c.css(f)}},k.fn.extend({offset:function(t){if(arguments.length)return void 0===t?this:this.each(function(e){k.offset.setOffset(this,t,e)});var e,n,r=this[0];return r?r.getClientRects().length?(e=r.getBoundingClientRect(),n=r.ownerDocument.defaultView,{top:e.top+n.pageYOffset,left:e.left+n.pageXOffset}):{top:0,left:0}:void 0},position:function(){if(this[0]){var e,t,n,r=this[0],i={top:0,left:0};if("fixed"===k.css(r,"position"))t=r.getBoundingClientRect();else{t=this.offset(),n=r.ownerDocument,e=r.offsetParent||n.documentElement;while(e&&(e===n.body||e===n.documentElement)&&"static"===k.css(e,"position"))e=e.parentNode;e&&e!==r&&1===e.nodeType&&((i=k(e).offset()).top+=k.css(e,"borderTopWidth",!0),i.left+=k.css(e,"borderLeftWidth",!0))}return{top:t.top-i.top-k.css(r,"marginTop",!0),left:t.left-i.left-k.css(r,"marginLeft",!0)}}},offsetParent:function(){return this.map(function(){var e=this.offsetParent;while(e&&"static"===k.css(e,"position"))e=e.offsetParent;return e||ie})}}),k.each({scrollLeft:"pageXOffset",scrollTop:"pageYOffset"},function(t,i){var o="pageYOffset"===i;k.fn[t]=function(e){return _(this,function(e,t,n){var r;if(x(e)?r=e:9===e.nodeType&&(r=e.defaultView),void 0===n)return r?r[i]:e[t];r?r.scrollTo(o?r.pageXOffset:n,o?n:r.pageYOffset):e[t]=n},t,e,arguments.length)}}),k.each(["top","left"],function(e,n){k.cssHooks[n]=ze(y.pixelPosition,function(e,t){if(t)return t=_e(e,n),$e.test(t)?k(e).position()[n]+"px":t})}),k.each({Height:"height",Width:"width"},function(a,s){k.each({padding:"inner"+a,content:s,"":"outer"+a},function(r,o){k.fn[o]=function(e,t){var n=arguments.length&&(r||"boolean"!=typeof e),i=r||(!0===e||!0===t?"margin":"border");return _(this,function(e,t,n){var r;return x(e)?0===o.indexOf("outer")?e["inner"+a]:e.document.documentElement["client"+a]:9===e.nodeType?(r=e.documentElement,Math.max(e.body["scroll"+a],r["scroll"+a],e.body["offset"+a],r["offset"+a],r["client"+a])):void 0===n?k.css(e,t,i):k.style(e,t,n,i)},s,n?e:void 0,n)}})}),k.each("blur focus focusin focusout resize scroll click dblclick mousedown mouseup mousemove mouseover mouseout mouseenter mouseleave change select submit keydown keypress keyup contextmenu".split(" "),function(e,n){k.fn[n]=function(e,t){return 0<arguments.length?this.on(n,null,e,t):this.trigger(n)}}),k.fn.extend({hover:function(e,t){return this.mouseenter(e).mouseleave(t||e)}}),k.fn.extend({bind:function(e,t,n){return this.on(e,null,t,n)},unbind:function(e,t){return this.off(e,null,t)},delegate:function(e,t,n,r){return this.on(t,e,n,r)},undelegate:function(e,t,n){return 1===arguments.length?this.off(e,"**"):this.off(t,e||"**",n)}}),k.proxy=function(e,t){var n,r,i;if("string"==typeof t&&(n=e[t],t=e,e=n),m(e))return r=s.call(arguments,2),(i=function(){return e.apply(t||this,r.concat(s.call(arguments)))}).guid=e.guid=e.guid||k.guid++,i},k.holdReady=function(e){e?k.readyWait++:k.ready(!0)},k.isArray=Array.isArray,k.parseJSON=JSON.parse,k.nodeName=A,k.isFunction=m,k.isWindow=x,k.camelCase=V,k.type=w,k.now=Date.now,k.isNumeric=function(e){var t=k.type(e);return("number"===t||"string"===t)&&!isNaN(e-parseFloat(e))},"function"==typeof define&&define.amd&&define("jquery",[],function(){return k});var Qt=C.jQuery,Jt=C.$;return k.noConflict=function(e){return C.$===k&&(C.$=Jt),e&&C.jQuery===k&&(C.jQuery=Qt),k},e||(C.jQuery=C.$=k),k});
libraries/jquery/js/index.html000060400000000054152455721620012454 0ustar00<html><body bgcolor="#FFFFFF"></body></html>libraries/jquery/js/jquery-ui.min.js000060400000245162152455721620013544 0ustar00/*! jQuery UI - v1.12.1 - 2019-04-09
* http://jqueryui.com
* Includes: widget.js, data.js, disable-selection.js, keycode.js, scroll-parent.js, widgets/draggable.js, widgets/resizable.js, widgets/sortable.js, widgets/mouse.js, widgets/slider.js
* Copyright jQuery Foundation and other contributors; Licensed MIT */

(function(t){"function"==typeof define&&define.amd?define(["jquery"],t):t(jQuery)})(function(t){t.ui=t.ui||{},t.ui.version="1.12.1";var e=0,i=Array.prototype.slice;t.cleanData=function(e){return function(i){var s,n,o;for(o=0;null!=(n=i[o]);o++)try{s=t._data(n,"events"),s&&s.remove&&t(n).triggerHandler("remove")}catch(a){}e(i)}}(t.cleanData),t.widget=function(e,i,s){var n,o,a,r={},l=e.split(".")[0];e=e.split(".")[1];var h=l+"-"+e;return s||(s=i,i=t.Widget),t.isArray(s)&&(s=t.extend.apply(null,[{}].concat(s))),t.expr[":"][h.toLowerCase()]=function(e){return!!t.data(e,h)},t[l]=t[l]||{},n=t[l][e],o=t[l][e]=function(t,e){return this._createWidget?(arguments.length&&this._createWidget(t,e),void 0):new o(t,e)},t.extend(o,n,{version:s.version,_proto:t.extend({},s),_childConstructors:[]}),a=new i,a.options=t.widget.extend({},a.options),t.each(s,function(e,s){return t.isFunction(s)?(r[e]=function(){function t(){return i.prototype[e].apply(this,arguments)}function n(t){return i.prototype[e].apply(this,t)}return function(){var e,i=this._super,o=this._superApply;return this._super=t,this._superApply=n,e=s.apply(this,arguments),this._super=i,this._superApply=o,e}}(),void 0):(r[e]=s,void 0)}),o.prototype=t.widget.extend(a,{widgetEventPrefix:n?a.widgetEventPrefix||e:e},r,{constructor:o,namespace:l,widgetName:e,widgetFullName:h}),n?(t.each(n._childConstructors,function(e,i){var s=i.prototype;t.widget(s.namespace+"."+s.widgetName,o,i._proto)}),delete n._childConstructors):i._childConstructors.push(o),t.widget.bridge(e,o),o},t.widget.extend=function(e){for(var s,n,o=i.call(arguments,1),a=0,r=o.length;r>a;a++)for(s in o[a])n=o[a][s],o[a].hasOwnProperty(s)&&void 0!==n&&(e[s]=t.isPlainObject(n)?t.isPlainObject(e[s])?t.widget.extend({},e[s],n):t.widget.extend({},n):n);return e},t.widget.bridge=function(e,s){var n=s.prototype.widgetFullName||e;t.fn[e]=function(o){var a="string"==typeof o,r=i.call(arguments,1),l=this;return a?this.length||"instance"!==o?this.each(function(){var i,s=t.data(this,n);return"instance"===o?(l=s,!1):s?t.isFunction(s[o])&&"_"!==o.charAt(0)?(i=s[o].apply(s,r),i!==s&&void 0!==i?(l=i&&i.jquery?l.pushStack(i.get()):i,!1):void 0):t.error("no such method '"+o+"' for "+e+" widget instance"):t.error("cannot call methods on "+e+" prior to initialization; "+"attempted to call method '"+o+"'")}):l=void 0:(r.length&&(o=t.widget.extend.apply(null,[o].concat(r))),this.each(function(){var e=t.data(this,n);e?(e.option(o||{}),e._init&&e._init()):t.data(this,n,new s(o,this))})),l}},t.Widget=function(){},t.Widget._childConstructors=[],t.Widget.prototype={widgetName:"widget",widgetEventPrefix:"",defaultElement:"<div>",options:{classes:{},disabled:!1,create:null},_createWidget:function(i,s){s=t(s||this.defaultElement||this)[0],this.element=t(s),this.uuid=e++,this.eventNamespace="."+this.widgetName+this.uuid,this.bindings=t(),this.hoverable=t(),this.focusable=t(),this.classesElementLookup={},s!==this&&(t.data(s,this.widgetFullName,this),this._on(!0,this.element,{remove:function(t){t.target===s&&this.destroy()}}),this.document=t(s.style?s.ownerDocument:s.document||s),this.window=t(this.document[0].defaultView||this.document[0].parentWindow)),this.options=t.widget.extend({},this.options,this._getCreateOptions(),i),this._create(),this.options.disabled&&this._setOptionDisabled(this.options.disabled),this._trigger("create",null,this._getCreateEventData()),this._init()},_getCreateOptions:function(){return{}},_getCreateEventData:t.noop,_create:t.noop,_init:t.noop,destroy:function(){var e=this;this._destroy(),t.each(this.classesElementLookup,function(t,i){e._removeClass(i,t)}),this.element.off(this.eventNamespace).removeData(this.widgetFullName),this.widget().off(this.eventNamespace).removeAttr("aria-disabled"),this.bindings.off(this.eventNamespace)},_destroy:t.noop,widget:function(){return this.element},option:function(e,i){var s,n,o,a=e;if(0===arguments.length)return t.widget.extend({},this.options);if("string"==typeof e)if(a={},s=e.split("."),e=s.shift(),s.length){for(n=a[e]=t.widget.extend({},this.options[e]),o=0;s.length-1>o;o++)n[s[o]]=n[s[o]]||{},n=n[s[o]];if(e=s.pop(),1===arguments.length)return void 0===n[e]?null:n[e];n[e]=i}else{if(1===arguments.length)return void 0===this.options[e]?null:this.options[e];a[e]=i}return this._setOptions(a),this},_setOptions:function(t){var e;for(e in t)this._setOption(e,t[e]);return this},_setOption:function(t,e){return"classes"===t&&this._setOptionClasses(e),this.options[t]=e,"disabled"===t&&this._setOptionDisabled(e),this},_setOptionClasses:function(e){var i,s,n;for(i in e)n=this.classesElementLookup[i],e[i]!==this.options.classes[i]&&n&&n.length&&(s=t(n.get()),this._removeClass(n,i),s.addClass(this._classes({element:s,keys:i,classes:e,add:!0})))},_setOptionDisabled:function(t){this._toggleClass(this.widget(),this.widgetFullName+"-disabled",null,!!t),t&&(this._removeClass(this.hoverable,null,"ui-state-hover"),this._removeClass(this.focusable,null,"ui-state-focus"))},enable:function(){return this._setOptions({disabled:!1})},disable:function(){return this._setOptions({disabled:!0})},_classes:function(e){function i(i,o){var a,r;for(r=0;i.length>r;r++)a=n.classesElementLookup[i[r]]||t(),a=e.add?t(t.unique(a.get().concat(e.element.get()))):t(a.not(e.element).get()),n.classesElementLookup[i[r]]=a,s.push(i[r]),o&&e.classes[i[r]]&&s.push(e.classes[i[r]])}var s=[],n=this;return e=t.extend({element:this.element,classes:this.options.classes||{}},e),this._on(e.element,{remove:"_untrackClassesElement"}),e.keys&&i(e.keys.match(/\S+/g)||[],!0),e.extra&&i(e.extra.match(/\S+/g)||[]),s.join(" ")},_untrackClassesElement:function(e){var i=this;t.each(i.classesElementLookup,function(s,n){-1!==t.inArray(e.target,n)&&(i.classesElementLookup[s]=t(n.not(e.target).get()))})},_removeClass:function(t,e,i){return this._toggleClass(t,e,i,!1)},_addClass:function(t,e,i){return this._toggleClass(t,e,i,!0)},_toggleClass:function(t,e,i,s){s="boolean"==typeof s?s:i;var n="string"==typeof t||null===t,o={extra:n?e:i,keys:n?t:e,element:n?this.element:t,add:s};return o.element.toggleClass(this._classes(o),s),this},_on:function(e,i,s){var n,o=this;"boolean"!=typeof e&&(s=i,i=e,e=!1),s?(i=n=t(i),this.bindings=this.bindings.add(i)):(s=i,i=this.element,n=this.widget()),t.each(s,function(s,a){function r(){return e||o.options.disabled!==!0&&!t(this).hasClass("ui-state-disabled")?("string"==typeof a?o[a]:a).apply(o,arguments):void 0}"string"!=typeof a&&(r.guid=a.guid=a.guid||r.guid||t.guid++);var l=s.match(/^([\w:-]*)\s*(.*)$/),h=l[1]+o.eventNamespace,c=l[2];c?n.on(h,c,r):i.on(h,r)})},_off:function(e,i){i=(i||"").split(" ").join(this.eventNamespace+" ")+this.eventNamespace,e.off(i).off(i),this.bindings=t(this.bindings.not(e).get()),this.focusable=t(this.focusable.not(e).get()),this.hoverable=t(this.hoverable.not(e).get())},_delay:function(t,e){function i(){return("string"==typeof t?s[t]:t).apply(s,arguments)}var s=this;return setTimeout(i,e||0)},_hoverable:function(e){this.hoverable=this.hoverable.add(e),this._on(e,{mouseenter:function(e){this._addClass(t(e.currentTarget),null,"ui-state-hover")},mouseleave:function(e){this._removeClass(t(e.currentTarget),null,"ui-state-hover")}})},_focusable:function(e){this.focusable=this.focusable.add(e),this._on(e,{focusin:function(e){this._addClass(t(e.currentTarget),null,"ui-state-focus")},focusout:function(e){this._removeClass(t(e.currentTarget),null,"ui-state-focus")}})},_trigger:function(e,i,s){var n,o,a=this.options[e];if(s=s||{},i=t.Event(i),i.type=(e===this.widgetEventPrefix?e:this.widgetEventPrefix+e).toLowerCase(),i.target=this.element[0],o=i.originalEvent)for(n in o)n in i||(i[n]=o[n]);return this.element.trigger(i,s),!(t.isFunction(a)&&a.apply(this.element[0],[i].concat(s))===!1||i.isDefaultPrevented())}},t.each({show:"fadeIn",hide:"fadeOut"},function(e,i){t.Widget.prototype["_"+e]=function(s,n,o){"string"==typeof n&&(n={effect:n});var a,r=n?n===!0||"number"==typeof n?i:n.effect||i:e;n=n||{},"number"==typeof n&&(n={duration:n}),a=!t.isEmptyObject(n),n.complete=o,n.delay&&s.delay(n.delay),a&&t.effects&&t.effects.effect[r]?s[e](n):r!==e&&s[r]?s[r](n.duration,n.easing,o):s.queue(function(i){t(this)[e](),o&&o.call(s[0]),i()})}}),t.widget,t.extend(t.expr[":"],{data:t.expr.createPseudo?t.expr.createPseudo(function(e){return function(i){return!!t.data(i,e)}}):function(e,i,s){return!!t.data(e,s[3])}}),t.fn.extend({disableSelection:function(){var t="onselectstart"in document.createElement("div")?"selectstart":"mousedown";return function(){return this.on(t+".ui-disableSelection",function(t){t.preventDefault()})}}(),enableSelection:function(){return this.off(".ui-disableSelection")}}),t.ui.keyCode={BACKSPACE:8,COMMA:188,DELETE:46,DOWN:40,END:35,ENTER:13,ESCAPE:27,HOME:36,LEFT:37,PAGE_DOWN:34,PAGE_UP:33,PERIOD:190,RIGHT:39,SPACE:32,TAB:9,UP:38},t.fn.scrollParent=function(e){var i=this.css("position"),s="absolute"===i,n=e?/(auto|scroll|hidden)/:/(auto|scroll)/,o=this.parents().filter(function(){var e=t(this);return s&&"static"===e.css("position")?!1:n.test(e.css("overflow")+e.css("overflow-y")+e.css("overflow-x"))}).eq(0);return"fixed"!==i&&o.length?o:t(this[0].ownerDocument||document)},t.ui.ie=!!/msie [\w.]+/.exec(navigator.userAgent.toLowerCase());var s=!1;t(document).on("mouseup",function(){s=!1}),t.widget("ui.mouse",{version:"1.12.1",options:{cancel:"input, textarea, button, select, option",distance:1,delay:0},_mouseInit:function(){var e=this;this.element.on("mousedown."+this.widgetName,function(t){return e._mouseDown(t)}).on("click."+this.widgetName,function(i){return!0===t.data(i.target,e.widgetName+".preventClickEvent")?(t.removeData(i.target,e.widgetName+".preventClickEvent"),i.stopImmediatePropagation(),!1):void 0}),this.started=!1},_mouseDestroy:function(){this.element.off("."+this.widgetName),this._mouseMoveDelegate&&this.document.off("mousemove."+this.widgetName,this._mouseMoveDelegate).off("mouseup."+this.widgetName,this._mouseUpDelegate)},_mouseDown:function(e){if(!s){this._mouseMoved=!1,this._mouseStarted&&this._mouseUp(e),this._mouseDownEvent=e;var i=this,n=1===e.which,o="string"==typeof this.options.cancel&&e.target.nodeName?t(e.target).closest(this.options.cancel).length:!1;return n&&!o&&this._mouseCapture(e)?(this.mouseDelayMet=!this.options.delay,this.mouseDelayMet||(this._mouseDelayTimer=setTimeout(function(){i.mouseDelayMet=!0},this.options.delay)),this._mouseDistanceMet(e)&&this._mouseDelayMet(e)&&(this._mouseStarted=this._mouseStart(e)!==!1,!this._mouseStarted)?(e.preventDefault(),!0):(!0===t.data(e.target,this.widgetName+".preventClickEvent")&&t.removeData(e.target,this.widgetName+".preventClickEvent"),this._mouseMoveDelegate=function(t){return i._mouseMove(t)},this._mouseUpDelegate=function(t){return i._mouseUp(t)},this.document.on("mousemove."+this.widgetName,this._mouseMoveDelegate).on("mouseup."+this.widgetName,this._mouseUpDelegate),e.preventDefault(),s=!0,!0)):!0}},_mouseMove:function(e){if(this._mouseMoved){if(t.ui.ie&&(!document.documentMode||9>document.documentMode)&&!e.button)return this._mouseUp(e);if(!e.which)if(e.originalEvent.altKey||e.originalEvent.ctrlKey||e.originalEvent.metaKey||e.originalEvent.shiftKey)this.ignoreMissingWhich=!0;else if(!this.ignoreMissingWhich)return this._mouseUp(e)}return(e.which||e.button)&&(this._mouseMoved=!0),this._mouseStarted?(this._mouseDrag(e),e.preventDefault()):(this._mouseDistanceMet(e)&&this._mouseDelayMet(e)&&(this._mouseStarted=this._mouseStart(this._mouseDownEvent,e)!==!1,this._mouseStarted?this._mouseDrag(e):this._mouseUp(e)),!this._mouseStarted)},_mouseUp:function(e){this.document.off("mousemove."+this.widgetName,this._mouseMoveDelegate).off("mouseup."+this.widgetName,this._mouseUpDelegate),this._mouseStarted&&(this._mouseStarted=!1,e.target===this._mouseDownEvent.target&&t.data(e.target,this.widgetName+".preventClickEvent",!0),this._mouseStop(e)),this._mouseDelayTimer&&(clearTimeout(this._mouseDelayTimer),delete this._mouseDelayTimer),this.ignoreMissingWhich=!1,s=!1,e.preventDefault()},_mouseDistanceMet:function(t){return Math.max(Math.abs(this._mouseDownEvent.pageX-t.pageX),Math.abs(this._mouseDownEvent.pageY-t.pageY))>=this.options.distance},_mouseDelayMet:function(){return this.mouseDelayMet},_mouseStart:function(){},_mouseDrag:function(){},_mouseStop:function(){},_mouseCapture:function(){return!0}}),t.ui.plugin={add:function(e,i,s){var n,o=t.ui[e].prototype;for(n in s)o.plugins[n]=o.plugins[n]||[],o.plugins[n].push([i,s[n]])},call:function(t,e,i,s){var n,o=t.plugins[e];if(o&&(s||t.element[0].parentNode&&11!==t.element[0].parentNode.nodeType))for(n=0;o.length>n;n++)t.options[o[n][0]]&&o[n][1].apply(t.element,i)}},t.ui.safeActiveElement=function(t){var e;try{e=t.activeElement}catch(i){e=t.body}return e||(e=t.body),e.nodeName||(e=t.body),e},t.ui.safeBlur=function(e){e&&"body"!==e.nodeName.toLowerCase()&&t(e).trigger("blur")},t.widget("ui.draggable",t.ui.mouse,{version:"1.12.1",widgetEventPrefix:"drag",options:{addClasses:!0,appendTo:"parent",axis:!1,connectToSortable:!1,containment:!1,cursor:"auto",cursorAt:!1,grid:!1,handle:!1,helper:"original",iframeFix:!1,opacity:!1,refreshPositions:!1,revert:!1,revertDuration:500,scope:"default",scroll:!0,scrollSensitivity:20,scrollSpeed:20,snap:!1,snapMode:"both",snapTolerance:20,stack:!1,zIndex:!1,drag:null,start:null,stop:null},_create:function(){"original"===this.options.helper&&this._setPositionRelative(),this.options.addClasses&&this._addClass("ui-draggable"),this._setHandleClassName(),this._mouseInit()},_setOption:function(t,e){this._super(t,e),"handle"===t&&(this._removeHandleClassName(),this._setHandleClassName())},_destroy:function(){return(this.helper||this.element).is(".ui-draggable-dragging")?(this.destroyOnClear=!0,void 0):(this._removeHandleClassName(),this._mouseDestroy(),void 0)},_mouseCapture:function(e){var i=this.options;return this.helper||i.disabled||t(e.target).closest(".ui-resizable-handle").length>0?!1:(this.handle=this._getHandle(e),this.handle?(this._blurActiveElement(e),this._blockFrames(i.iframeFix===!0?"iframe":i.iframeFix),!0):!1)},_blockFrames:function(e){this.iframeBlocks=this.document.find(e).map(function(){var e=t(this);return t("<div>").css("position","absolute").appendTo(e.parent()).outerWidth(e.outerWidth()).outerHeight(e.outerHeight()).offset(e.offset())[0]})},_unblockFrames:function(){this.iframeBlocks&&(this.iframeBlocks.remove(),delete this.iframeBlocks)},_blurActiveElement:function(e){var i=t.ui.safeActiveElement(this.document[0]),s=t(e.target);s.closest(i).length||t.ui.safeBlur(i)},_mouseStart:function(e){var i=this.options;return this.helper=this._createHelper(e),this._addClass(this.helper,"ui-draggable-dragging"),this._cacheHelperProportions(),t.ui.ddmanager&&(t.ui.ddmanager.current=this),this._cacheMargins(),this.cssPosition=this.helper.css("position"),this.scrollParent=this.helper.scrollParent(!0),this.offsetParent=this.helper.offsetParent(),this.hasFixedAncestor=this.helper.parents().filter(function(){return"fixed"===t(this).css("position")}).length>0,this.positionAbs=this.element.offset(),this._refreshOffsets(e),this.originalPosition=this.position=this._generatePosition(e,!1),this.originalPageX=e.pageX,this.originalPageY=e.pageY,i.cursorAt&&this._adjustOffsetFromHelper(i.cursorAt),this._setContainment(),this._trigger("start",e)===!1?(this._clear(),!1):(this._cacheHelperProportions(),t.ui.ddmanager&&!i.dropBehaviour&&t.ui.ddmanager.prepareOffsets(this,e),this._mouseDrag(e,!0),t.ui.ddmanager&&t.ui.ddmanager.dragStart(this,e),!0)},_refreshOffsets:function(t){this.offset={top:this.positionAbs.top-this.margins.top,left:this.positionAbs.left-this.margins.left,scroll:!1,parent:this._getParentOffset(),relative:this._getRelativeOffset()},this.offset.click={left:t.pageX-this.offset.left,top:t.pageY-this.offset.top}},_mouseDrag:function(e,i){if(this.hasFixedAncestor&&(this.offset.parent=this._getParentOffset()),this.position=this._generatePosition(e,!0),this.positionAbs=this._convertPositionTo("absolute"),!i){var s=this._uiHash();if(this._trigger("drag",e,s)===!1)return this._mouseUp(new t.Event("mouseup",e)),!1;this.position=s.position}return this.helper[0].style.left=this.position.left+"px",this.helper[0].style.top=this.position.top+"px",t.ui.ddmanager&&t.ui.ddmanager.drag(this,e),!1},_mouseStop:function(e){var i=this,s=!1;return t.ui.ddmanager&&!this.options.dropBehaviour&&(s=t.ui.ddmanager.drop(this,e)),this.dropped&&(s=this.dropped,this.dropped=!1),"invalid"===this.options.revert&&!s||"valid"===this.options.revert&&s||this.options.revert===!0||t.isFunction(this.options.revert)&&this.options.revert.call(this.element,s)?t(this.helper).animate(this.originalPosition,parseInt(this.options.revertDuration,10),function(){i._trigger("stop",e)!==!1&&i._clear()}):this._trigger("stop",e)!==!1&&this._clear(),!1},_mouseUp:function(e){return this._unblockFrames(),t.ui.ddmanager&&t.ui.ddmanager.dragStop(this,e),this.handleElement.is(e.target)&&this.element.trigger("focus"),t.ui.mouse.prototype._mouseUp.call(this,e)},cancel:function(){return this.helper.is(".ui-draggable-dragging")?this._mouseUp(new t.Event("mouseup",{target:this.element[0]})):this._clear(),this},_getHandle:function(e){return this.options.handle?!!t(e.target).closest(this.element.find(this.options.handle)).length:!0},_setHandleClassName:function(){this.handleElement=this.options.handle?this.element.find(this.options.handle):this.element,this._addClass(this.handleElement,"ui-draggable-handle")},_removeHandleClassName:function(){this._removeClass(this.handleElement,"ui-draggable-handle")},_createHelper:function(e){var i=this.options,s=t.isFunction(i.helper),n=s?t(i.helper.apply(this.element[0],[e])):"clone"===i.helper?this.element.clone().removeAttr("id"):this.element;return n.parents("body").length||n.appendTo("parent"===i.appendTo?this.element[0].parentNode:i.appendTo),s&&n[0]===this.element[0]&&this._setPositionRelative(),n[0]===this.element[0]||/(fixed|absolute)/.test(n.css("position"))||n.css("position","absolute"),n},_setPositionRelative:function(){/^(?:r|a|f)/.test(this.element.css("position"))||(this.element[0].style.position="relative")},_adjustOffsetFromHelper:function(e){"string"==typeof e&&(e=e.split(" ")),t.isArray(e)&&(e={left:+e[0],top:+e[1]||0}),"left"in e&&(this.offset.click.left=e.left+this.margins.left),"right"in e&&(this.offset.click.left=this.helperProportions.width-e.right+this.margins.left),"top"in e&&(this.offset.click.top=e.top+this.margins.top),"bottom"in e&&(this.offset.click.top=this.helperProportions.height-e.bottom+this.margins.top)},_isRootNode:function(t){return/(html|body)/i.test(t.tagName)||t===this.document[0]},_getParentOffset:function(){var e=this.offsetParent.offset(),i=this.document[0];return"absolute"===this.cssPosition&&this.scrollParent[0]!==i&&t.contains(this.scrollParent[0],this.offsetParent[0])&&(e.left+=this.scrollParent.scrollLeft(),e.top+=this.scrollParent.scrollTop()),this._isRootNode(this.offsetParent[0])&&(e={top:0,left:0}),{top:e.top+(parseInt(this.offsetParent.css("borderTopWidth"),10)||0),left:e.left+(parseInt(this.offsetParent.css("borderLeftWidth"),10)||0)}},_getRelativeOffset:function(){if("relative"!==this.cssPosition)return{top:0,left:0};var t=this.element.position(),e=this._isRootNode(this.scrollParent[0]);return{top:t.top-(parseInt(this.helper.css("top"),10)||0)+(e?0:this.scrollParent.scrollTop()),left:t.left-(parseInt(this.helper.css("left"),10)||0)+(e?0:this.scrollParent.scrollLeft())}},_cacheMargins:function(){this.margins={left:parseInt(this.element.css("marginLeft"),10)||0,top:parseInt(this.element.css("marginTop"),10)||0,right:parseInt(this.element.css("marginRight"),10)||0,bottom:parseInt(this.element.css("marginBottom"),10)||0}},_cacheHelperProportions:function(){this.helperProportions={width:this.helper.outerWidth(),height:this.helper.outerHeight()}},_setContainment:function(){var e,i,s,n=this.options,o=this.document[0];return this.relativeContainer=null,n.containment?"window"===n.containment?(this.containment=[t(window).scrollLeft()-this.offset.relative.left-this.offset.parent.left,t(window).scrollTop()-this.offset.relative.top-this.offset.parent.top,t(window).scrollLeft()+t(window).width()-this.helperProportions.width-this.margins.left,t(window).scrollTop()+(t(window).height()||o.body.parentNode.scrollHeight)-this.helperProportions.height-this.margins.top],void 0):"document"===n.containment?(this.containment=[0,0,t(o).width()-this.helperProportions.width-this.margins.left,(t(o).height()||o.body.parentNode.scrollHeight)-this.helperProportions.height-this.margins.top],void 0):n.containment.constructor===Array?(this.containment=n.containment,void 0):("parent"===n.containment&&(n.containment=this.helper[0].parentNode),i=t(n.containment),s=i[0],s&&(e=/(scroll|auto)/.test(i.css("overflow")),this.containment=[(parseInt(i.css("borderLeftWidth"),10)||0)+(parseInt(i.css("paddingLeft"),10)||0),(parseInt(i.css("borderTopWidth"),10)||0)+(parseInt(i.css("paddingTop"),10)||0),(e?Math.max(s.scrollWidth,s.offsetWidth):s.offsetWidth)-(parseInt(i.css("borderRightWidth"),10)||0)-(parseInt(i.css("paddingRight"),10)||0)-this.helperProportions.width-this.margins.left-this.margins.right,(e?Math.max(s.scrollHeight,s.offsetHeight):s.offsetHeight)-(parseInt(i.css("borderBottomWidth"),10)||0)-(parseInt(i.css("paddingBottom"),10)||0)-this.helperProportions.height-this.margins.top-this.margins.bottom],this.relativeContainer=i),void 0):(this.containment=null,void 0)},_convertPositionTo:function(t,e){e||(e=this.position);var i="absolute"===t?1:-1,s=this._isRootNode(this.scrollParent[0]);return{top:e.top+this.offset.relative.top*i+this.offset.parent.top*i-("fixed"===this.cssPosition?-this.offset.scroll.top:s?0:this.offset.scroll.top)*i,left:e.left+this.offset.relative.left*i+this.offset.parent.left*i-("fixed"===this.cssPosition?-this.offset.scroll.left:s?0:this.offset.scroll.left)*i}},_generatePosition:function(t,e){var i,s,n,o,a=this.options,r=this._isRootNode(this.scrollParent[0]),l=t.pageX,h=t.pageY;return r&&this.offset.scroll||(this.offset.scroll={top:this.scrollParent.scrollTop(),left:this.scrollParent.scrollLeft()}),e&&(this.containment&&(this.relativeContainer?(s=this.relativeContainer.offset(),i=[this.containment[0]+s.left,this.containment[1]+s.top,this.containment[2]+s.left,this.containment[3]+s.top]):i=this.containment,t.pageX-this.offset.click.left<i[0]&&(l=i[0]+this.offset.click.left),t.pageY-this.offset.click.top<i[1]&&(h=i[1]+this.offset.click.top),t.pageX-this.offset.click.left>i[2]&&(l=i[2]+this.offset.click.left),t.pageY-this.offset.click.top>i[3]&&(h=i[3]+this.offset.click.top)),a.grid&&(n=a.grid[1]?this.originalPageY+Math.round((h-this.originalPageY)/a.grid[1])*a.grid[1]:this.originalPageY,h=i?n-this.offset.click.top>=i[1]||n-this.offset.click.top>i[3]?n:n-this.offset.click.top>=i[1]?n-a.grid[1]:n+a.grid[1]:n,o=a.grid[0]?this.originalPageX+Math.round((l-this.originalPageX)/a.grid[0])*a.grid[0]:this.originalPageX,l=i?o-this.offset.click.left>=i[0]||o-this.offset.click.left>i[2]?o:o-this.offset.click.left>=i[0]?o-a.grid[0]:o+a.grid[0]:o),"y"===a.axis&&(l=this.originalPageX),"x"===a.axis&&(h=this.originalPageY)),{top:h-this.offset.click.top-this.offset.relative.top-this.offset.parent.top+("fixed"===this.cssPosition?-this.offset.scroll.top:r?0:this.offset.scroll.top),left:l-this.offset.click.left-this.offset.relative.left-this.offset.parent.left+("fixed"===this.cssPosition?-this.offset.scroll.left:r?0:this.offset.scroll.left)}},_clear:function(){this._removeClass(this.helper,"ui-draggable-dragging"),this.helper[0]===this.element[0]||this.cancelHelperRemoval||this.helper.remove(),this.helper=null,this.cancelHelperRemoval=!1,this.destroyOnClear&&this.destroy()},_trigger:function(e,i,s){return s=s||this._uiHash(),t.ui.plugin.call(this,e,[i,s,this],!0),/^(drag|start|stop)/.test(e)&&(this.positionAbs=this._convertPositionTo("absolute"),s.offset=this.positionAbs),t.Widget.prototype._trigger.call(this,e,i,s)},plugins:{},_uiHash:function(){return{helper:this.helper,position:this.position,originalPosition:this.originalPosition,offset:this.positionAbs}}}),t.ui.plugin.add("draggable","connectToSortable",{start:function(e,i,s){var n=t.extend({},i,{item:s.element});s.sortables=[],t(s.options.connectToSortable).each(function(){var i=t(this).sortable("instance");i&&!i.options.disabled&&(s.sortables.push(i),i.refreshPositions(),i._trigger("activate",e,n))})},stop:function(e,i,s){var n=t.extend({},i,{item:s.element});s.cancelHelperRemoval=!1,t.each(s.sortables,function(){var t=this;t.isOver?(t.isOver=0,s.cancelHelperRemoval=!0,t.cancelHelperRemoval=!1,t._storedCSS={position:t.placeholder.css("position"),top:t.placeholder.css("top"),left:t.placeholder.css("left")},t._mouseStop(e),t.options.helper=t.options._helper):(t.cancelHelperRemoval=!0,t._trigger("deactivate",e,n))})},drag:function(e,i,s){t.each(s.sortables,function(){var n=!1,o=this;o.positionAbs=s.positionAbs,o.helperProportions=s.helperProportions,o.offset.click=s.offset.click,o._intersectsWith(o.containerCache)&&(n=!0,t.each(s.sortables,function(){return this.positionAbs=s.positionAbs,this.helperProportions=s.helperProportions,this.offset.click=s.offset.click,this!==o&&this._intersectsWith(this.containerCache)&&t.contains(o.element[0],this.element[0])&&(n=!1),n})),n?(o.isOver||(o.isOver=1,s._parent=i.helper.parent(),o.currentItem=i.helper.appendTo(o.element).data("ui-sortable-item",!0),o.options._helper=o.options.helper,o.options.helper=function(){return i.helper[0]},e.target=o.currentItem[0],o._mouseCapture(e,!0),o._mouseStart(e,!0,!0),o.offset.click.top=s.offset.click.top,o.offset.click.left=s.offset.click.left,o.offset.parent.left-=s.offset.parent.left-o.offset.parent.left,o.offset.parent.top-=s.offset.parent.top-o.offset.parent.top,s._trigger("toSortable",e),s.dropped=o.element,t.each(s.sortables,function(){this.refreshPositions()}),s.currentItem=s.element,o.fromOutside=s),o.currentItem&&(o._mouseDrag(e),i.position=o.position)):o.isOver&&(o.isOver=0,o.cancelHelperRemoval=!0,o.options._revert=o.options.revert,o.options.revert=!1,o._trigger("out",e,o._uiHash(o)),o._mouseStop(e,!0),o.options.revert=o.options._revert,o.options.helper=o.options._helper,o.placeholder&&o.placeholder.remove(),i.helper.appendTo(s._parent),s._refreshOffsets(e),i.position=s._generatePosition(e,!0),s._trigger("fromSortable",e),s.dropped=!1,t.each(s.sortables,function(){this.refreshPositions()}))})}}),t.ui.plugin.add("draggable","cursor",{start:function(e,i,s){var n=t("body"),o=s.options;n.css("cursor")&&(o._cursor=n.css("cursor")),n.css("cursor",o.cursor)},stop:function(e,i,s){var n=s.options;n._cursor&&t("body").css("cursor",n._cursor)}}),t.ui.plugin.add("draggable","opacity",{start:function(e,i,s){var n=t(i.helper),o=s.options;n.css("opacity")&&(o._opacity=n.css("opacity")),n.css("opacity",o.opacity)},stop:function(e,i,s){var n=s.options;n._opacity&&t(i.helper).css("opacity",n._opacity)}}),t.ui.plugin.add("draggable","scroll",{start:function(t,e,i){i.scrollParentNotHidden||(i.scrollParentNotHidden=i.helper.scrollParent(!1)),i.scrollParentNotHidden[0]!==i.document[0]&&"HTML"!==i.scrollParentNotHidden[0].tagName&&(i.overflowOffset=i.scrollParentNotHidden.offset())},drag:function(e,i,s){var n=s.options,o=!1,a=s.scrollParentNotHidden[0],r=s.document[0];a!==r&&"HTML"!==a.tagName?(n.axis&&"x"===n.axis||(s.overflowOffset.top+a.offsetHeight-e.pageY<n.scrollSensitivity?a.scrollTop=o=a.scrollTop+n.scrollSpeed:e.pageY-s.overflowOffset.top<n.scrollSensitivity&&(a.scrollTop=o=a.scrollTop-n.scrollSpeed)),n.axis&&"y"===n.axis||(s.overflowOffset.left+a.offsetWidth-e.pageX<n.scrollSensitivity?a.scrollLeft=o=a.scrollLeft+n.scrollSpeed:e.pageX-s.overflowOffset.left<n.scrollSensitivity&&(a.scrollLeft=o=a.scrollLeft-n.scrollSpeed))):(n.axis&&"x"===n.axis||(e.pageY-t(r).scrollTop()<n.scrollSensitivity?o=t(r).scrollTop(t(r).scrollTop()-n.scrollSpeed):t(window).height()-(e.pageY-t(r).scrollTop())<n.scrollSensitivity&&(o=t(r).scrollTop(t(r).scrollTop()+n.scrollSpeed))),n.axis&&"y"===n.axis||(e.pageX-t(r).scrollLeft()<n.scrollSensitivity?o=t(r).scrollLeft(t(r).scrollLeft()-n.scrollSpeed):t(window).width()-(e.pageX-t(r).scrollLeft())<n.scrollSensitivity&&(o=t(r).scrollLeft(t(r).scrollLeft()+n.scrollSpeed)))),o!==!1&&t.ui.ddmanager&&!n.dropBehaviour&&t.ui.ddmanager.prepareOffsets(s,e)}}),t.ui.plugin.add("draggable","snap",{start:function(e,i,s){var n=s.options;s.snapElements=[],t(n.snap.constructor!==String?n.snap.items||":data(ui-draggable)":n.snap).each(function(){var e=t(this),i=e.offset();this!==s.element[0]&&s.snapElements.push({item:this,width:e.outerWidth(),height:e.outerHeight(),top:i.top,left:i.left})})},drag:function(e,i,s){var n,o,a,r,l,h,c,u,d,p,f=s.options,g=f.snapTolerance,m=i.offset.left,_=m+s.helperProportions.width,v=i.offset.top,b=v+s.helperProportions.height;for(d=s.snapElements.length-1;d>=0;d--)l=s.snapElements[d].left-s.margins.left,h=l+s.snapElements[d].width,c=s.snapElements[d].top-s.margins.top,u=c+s.snapElements[d].height,l-g>_||m>h+g||c-g>b||v>u+g||!t.contains(s.snapElements[d].item.ownerDocument,s.snapElements[d].item)?(s.snapElements[d].snapping&&s.options.snap.release&&s.options.snap.release.call(s.element,e,t.extend(s._uiHash(),{snapItem:s.snapElements[d].item})),s.snapElements[d].snapping=!1):("inner"!==f.snapMode&&(n=g>=Math.abs(c-b),o=g>=Math.abs(u-v),a=g>=Math.abs(l-_),r=g>=Math.abs(h-m),n&&(i.position.top=s._convertPositionTo("relative",{top:c-s.helperProportions.height,left:0}).top),o&&(i.position.top=s._convertPositionTo("relative",{top:u,left:0}).top),a&&(i.position.left=s._convertPositionTo("relative",{top:0,left:l-s.helperProportions.width}).left),r&&(i.position.left=s._convertPositionTo("relative",{top:0,left:h}).left)),p=n||o||a||r,"outer"!==f.snapMode&&(n=g>=Math.abs(c-v),o=g>=Math.abs(u-b),a=g>=Math.abs(l-m),r=g>=Math.abs(h-_),n&&(i.position.top=s._convertPositionTo("relative",{top:c,left:0}).top),o&&(i.position.top=s._convertPositionTo("relative",{top:u-s.helperProportions.height,left:0}).top),a&&(i.position.left=s._convertPositionTo("relative",{top:0,left:l}).left),r&&(i.position.left=s._convertPositionTo("relative",{top:0,left:h-s.helperProportions.width}).left)),!s.snapElements[d].snapping&&(n||o||a||r||p)&&s.options.snap.snap&&s.options.snap.snap.call(s.element,e,t.extend(s._uiHash(),{snapItem:s.snapElements[d].item})),s.snapElements[d].snapping=n||o||a||r||p)}}),t.ui.plugin.add("draggable","stack",{start:function(e,i,s){var n,o=s.options,a=t.makeArray(t(o.stack)).sort(function(e,i){return(parseInt(t(e).css("zIndex"),10)||0)-(parseInt(t(i).css("zIndex"),10)||0)});a.length&&(n=parseInt(t(a[0]).css("zIndex"),10)||0,t(a).each(function(e){t(this).css("zIndex",n+e)}),this.css("zIndex",n+a.length))}}),t.ui.plugin.add("draggable","zIndex",{start:function(e,i,s){var n=t(i.helper),o=s.options;n.css("zIndex")&&(o._zIndex=n.css("zIndex")),n.css("zIndex",o.zIndex)},stop:function(e,i,s){var n=s.options;n._zIndex&&t(i.helper).css("zIndex",n._zIndex)}}),t.ui.draggable,t.widget("ui.resizable",t.ui.mouse,{version:"1.12.1",widgetEventPrefix:"resize",options:{alsoResize:!1,animate:!1,animateDuration:"slow",animateEasing:"swing",aspectRatio:!1,autoHide:!1,classes:{"ui-resizable-se":"ui-icon ui-icon-gripsmall-diagonal-se"},containment:!1,ghost:!1,grid:!1,handles:"e,s,se",helper:!1,maxHeight:null,maxWidth:null,minHeight:10,minWidth:10,zIndex:90,resize:null,start:null,stop:null},_num:function(t){return parseFloat(t)||0},_isNumber:function(t){return!isNaN(parseFloat(t))},_hasScroll:function(e,i){if("hidden"===t(e).css("overflow"))return!1;var s=i&&"left"===i?"scrollLeft":"scrollTop",n=!1;return e[s]>0?!0:(e[s]=1,n=e[s]>0,e[s]=0,n)},_create:function(){var e,i=this.options,s=this;this._addClass("ui-resizable"),t.extend(this,{_aspectRatio:!!i.aspectRatio,aspectRatio:i.aspectRatio,originalElement:this.element,_proportionallyResizeElements:[],_helper:i.helper||i.ghost||i.animate?i.helper||"ui-resizable-helper":null}),this.element[0].nodeName.match(/^(canvas|textarea|input|select|button|img)$/i)&&(this.element.wrap(t("<div class='ui-wrapper' style='overflow: hidden;'></div>").css({position:this.element.css("position"),width:this.element.outerWidth(),height:this.element.outerHeight(),top:this.element.css("top"),left:this.element.css("left")})),this.element=this.element.parent().data("ui-resizable",this.element.resizable("instance")),this.elementIsWrapper=!0,e={marginTop:this.originalElement.css("marginTop"),marginRight:this.originalElement.css("marginRight"),marginBottom:this.originalElement.css("marginBottom"),marginLeft:this.originalElement.css("marginLeft")},this.element.css(e),this.originalElement.css("margin",0),this.originalResizeStyle=this.originalElement.css("resize"),this.originalElement.css("resize","none"),this._proportionallyResizeElements.push(this.originalElement.css({position:"static",zoom:1,display:"block"})),this.originalElement.css(e),this._proportionallyResize()),this._setupHandles(),i.autoHide&&t(this.element).on("mouseenter",function(){i.disabled||(s._removeClass("ui-resizable-autohide"),s._handles.show())
}).on("mouseleave",function(){i.disabled||s.resizing||(s._addClass("ui-resizable-autohide"),s._handles.hide())}),this._mouseInit()},_destroy:function(){this._mouseDestroy();var e,i=function(e){t(e).removeData("resizable").removeData("ui-resizable").off(".resizable").find(".ui-resizable-handle").remove()};return this.elementIsWrapper&&(i(this.element),e=this.element,this.originalElement.css({position:e.css("position"),width:e.outerWidth(),height:e.outerHeight(),top:e.css("top"),left:e.css("left")}).insertAfter(e),e.remove()),this.originalElement.css("resize",this.originalResizeStyle),i(this.originalElement),this},_setOption:function(t,e){switch(this._super(t,e),t){case"handles":this._removeHandles(),this._setupHandles();break;default:}},_setupHandles:function(){var e,i,s,n,o,a=this.options,r=this;if(this.handles=a.handles||(t(".ui-resizable-handle",this.element).length?{n:".ui-resizable-n",e:".ui-resizable-e",s:".ui-resizable-s",w:".ui-resizable-w",se:".ui-resizable-se",sw:".ui-resizable-sw",ne:".ui-resizable-ne",nw:".ui-resizable-nw"}:"e,s,se"),this._handles=t(),this.handles.constructor===String)for("all"===this.handles&&(this.handles="n,e,s,w,se,sw,ne,nw"),s=this.handles.split(","),this.handles={},i=0;s.length>i;i++)e=t.trim(s[i]),n="ui-resizable-"+e,o=t("<div>"),this._addClass(o,"ui-resizable-handle "+n),o.css({zIndex:a.zIndex}),this.handles[e]=".ui-resizable-"+e,this.element.append(o);this._renderAxis=function(e){var i,s,n,o;e=e||this.element;for(i in this.handles)this.handles[i].constructor===String?this.handles[i]=this.element.children(this.handles[i]).first().show():(this.handles[i].jquery||this.handles[i].nodeType)&&(this.handles[i]=t(this.handles[i]),this._on(this.handles[i],{mousedown:r._mouseDown})),this.elementIsWrapper&&this.originalElement[0].nodeName.match(/^(textarea|input|select|button)$/i)&&(s=t(this.handles[i],this.element),o=/sw|ne|nw|se|n|s/.test(i)?s.outerHeight():s.outerWidth(),n=["padding",/ne|nw|n/.test(i)?"Top":/se|sw|s/.test(i)?"Bottom":/^e$/.test(i)?"Right":"Left"].join(""),e.css(n,o),this._proportionallyResize()),this._handles=this._handles.add(this.handles[i])},this._renderAxis(this.element),this._handles=this._handles.add(this.element.find(".ui-resizable-handle")),this._handles.disableSelection(),this._handles.on("mouseover",function(){r.resizing||(this.className&&(o=this.className.match(/ui-resizable-(se|sw|ne|nw|n|e|s|w)/i)),r.axis=o&&o[1]?o[1]:"se")}),a.autoHide&&(this._handles.hide(),this._addClass("ui-resizable-autohide"))},_removeHandles:function(){this._handles.remove()},_mouseCapture:function(e){var i,s,n=!1;for(i in this.handles)s=t(this.handles[i])[0],(s===e.target||t.contains(s,e.target))&&(n=!0);return!this.options.disabled&&n},_mouseStart:function(e){var i,s,n,o=this.options,a=this.element;return this.resizing=!0,this._renderProxy(),i=this._num(this.helper.css("left")),s=this._num(this.helper.css("top")),o.containment&&(i+=t(o.containment).scrollLeft()||0,s+=t(o.containment).scrollTop()||0),this.offset=this.helper.offset(),this.position={left:i,top:s},this.size=this._helper?{width:this.helper.width(),height:this.helper.height()}:{width:a.width(),height:a.height()},this.originalSize=this._helper?{width:a.outerWidth(),height:a.outerHeight()}:{width:a.width(),height:a.height()},this.sizeDiff={width:a.outerWidth()-a.width(),height:a.outerHeight()-a.height()},this.originalPosition={left:i,top:s},this.originalMousePosition={left:e.pageX,top:e.pageY},this.aspectRatio="number"==typeof o.aspectRatio?o.aspectRatio:this.originalSize.width/this.originalSize.height||1,n=t(".ui-resizable-"+this.axis).css("cursor"),t("body").css("cursor","auto"===n?this.axis+"-resize":n),this._addClass("ui-resizable-resizing"),this._propagate("start",e),!0},_mouseDrag:function(e){var i,s,n=this.originalMousePosition,o=this.axis,a=e.pageX-n.left||0,r=e.pageY-n.top||0,l=this._change[o];return this._updatePrevProperties(),l?(i=l.apply(this,[e,a,r]),this._updateVirtualBoundaries(e.shiftKey),(this._aspectRatio||e.shiftKey)&&(i=this._updateRatio(i,e)),i=this._respectSize(i,e),this._updateCache(i),this._propagate("resize",e),s=this._applyChanges(),!this._helper&&this._proportionallyResizeElements.length&&this._proportionallyResize(),t.isEmptyObject(s)||(this._updatePrevProperties(),this._trigger("resize",e,this.ui()),this._applyChanges()),!1):!1},_mouseStop:function(e){this.resizing=!1;var i,s,n,o,a,r,l,h=this.options,c=this;return this._helper&&(i=this._proportionallyResizeElements,s=i.length&&/textarea/i.test(i[0].nodeName),n=s&&this._hasScroll(i[0],"left")?0:c.sizeDiff.height,o=s?0:c.sizeDiff.width,a={width:c.helper.width()-o,height:c.helper.height()-n},r=parseFloat(c.element.css("left"))+(c.position.left-c.originalPosition.left)||null,l=parseFloat(c.element.css("top"))+(c.position.top-c.originalPosition.top)||null,h.animate||this.element.css(t.extend(a,{top:l,left:r})),c.helper.height(c.size.height),c.helper.width(c.size.width),this._helper&&!h.animate&&this._proportionallyResize()),t("body").css("cursor","auto"),this._removeClass("ui-resizable-resizing"),this._propagate("stop",e),this._helper&&this.helper.remove(),!1},_updatePrevProperties:function(){this.prevPosition={top:this.position.top,left:this.position.left},this.prevSize={width:this.size.width,height:this.size.height}},_applyChanges:function(){var t={};return this.position.top!==this.prevPosition.top&&(t.top=this.position.top+"px"),this.position.left!==this.prevPosition.left&&(t.left=this.position.left+"px"),this.size.width!==this.prevSize.width&&(t.width=this.size.width+"px"),this.size.height!==this.prevSize.height&&(t.height=this.size.height+"px"),this.helper.css(t),t},_updateVirtualBoundaries:function(t){var e,i,s,n,o,a=this.options;o={minWidth:this._isNumber(a.minWidth)?a.minWidth:0,maxWidth:this._isNumber(a.maxWidth)?a.maxWidth:1/0,minHeight:this._isNumber(a.minHeight)?a.minHeight:0,maxHeight:this._isNumber(a.maxHeight)?a.maxHeight:1/0},(this._aspectRatio||t)&&(e=o.minHeight*this.aspectRatio,s=o.minWidth/this.aspectRatio,i=o.maxHeight*this.aspectRatio,n=o.maxWidth/this.aspectRatio,e>o.minWidth&&(o.minWidth=e),s>o.minHeight&&(o.minHeight=s),o.maxWidth>i&&(o.maxWidth=i),o.maxHeight>n&&(o.maxHeight=n)),this._vBoundaries=o},_updateCache:function(t){this.offset=this.helper.offset(),this._isNumber(t.left)&&(this.position.left=t.left),this._isNumber(t.top)&&(this.position.top=t.top),this._isNumber(t.height)&&(this.size.height=t.height),this._isNumber(t.width)&&(this.size.width=t.width)},_updateRatio:function(t){var e=this.position,i=this.size,s=this.axis;return this._isNumber(t.height)?t.width=t.height*this.aspectRatio:this._isNumber(t.width)&&(t.height=t.width/this.aspectRatio),"sw"===s&&(t.left=e.left+(i.width-t.width),t.top=null),"nw"===s&&(t.top=e.top+(i.height-t.height),t.left=e.left+(i.width-t.width)),t},_respectSize:function(t){var e=this._vBoundaries,i=this.axis,s=this._isNumber(t.width)&&e.maxWidth&&e.maxWidth<t.width,n=this._isNumber(t.height)&&e.maxHeight&&e.maxHeight<t.height,o=this._isNumber(t.width)&&e.minWidth&&e.minWidth>t.width,a=this._isNumber(t.height)&&e.minHeight&&e.minHeight>t.height,r=this.originalPosition.left+this.originalSize.width,l=this.originalPosition.top+this.originalSize.height,h=/sw|nw|w/.test(i),c=/nw|ne|n/.test(i);return o&&(t.width=e.minWidth),a&&(t.height=e.minHeight),s&&(t.width=e.maxWidth),n&&(t.height=e.maxHeight),o&&h&&(t.left=r-e.minWidth),s&&h&&(t.left=r-e.maxWidth),a&&c&&(t.top=l-e.minHeight),n&&c&&(t.top=l-e.maxHeight),t.width||t.height||t.left||!t.top?t.width||t.height||t.top||!t.left||(t.left=null):t.top=null,t},_getPaddingPlusBorderDimensions:function(t){for(var e=0,i=[],s=[t.css("borderTopWidth"),t.css("borderRightWidth"),t.css("borderBottomWidth"),t.css("borderLeftWidth")],n=[t.css("paddingTop"),t.css("paddingRight"),t.css("paddingBottom"),t.css("paddingLeft")];4>e;e++)i[e]=parseFloat(s[e])||0,i[e]+=parseFloat(n[e])||0;return{height:i[0]+i[2],width:i[1]+i[3]}},_proportionallyResize:function(){if(this._proportionallyResizeElements.length)for(var t,e=0,i=this.helper||this.element;this._proportionallyResizeElements.length>e;e++)t=this._proportionallyResizeElements[e],this.outerDimensions||(this.outerDimensions=this._getPaddingPlusBorderDimensions(t)),t.css({height:i.height()-this.outerDimensions.height||0,width:i.width()-this.outerDimensions.width||0})},_renderProxy:function(){var e=this.element,i=this.options;this.elementOffset=e.offset(),this._helper?(this.helper=this.helper||t("<div style='overflow:hidden;'></div>"),this._addClass(this.helper,this._helper),this.helper.css({width:this.element.outerWidth(),height:this.element.outerHeight(),position:"absolute",left:this.elementOffset.left+"px",top:this.elementOffset.top+"px",zIndex:++i.zIndex}),this.helper.appendTo("body").disableSelection()):this.helper=this.element},_change:{e:function(t,e){return{width:this.originalSize.width+e}},w:function(t,e){var i=this.originalSize,s=this.originalPosition;return{left:s.left+e,width:i.width-e}},n:function(t,e,i){var s=this.originalSize,n=this.originalPosition;return{top:n.top+i,height:s.height-i}},s:function(t,e,i){return{height:this.originalSize.height+i}},se:function(e,i,s){return t.extend(this._change.s.apply(this,arguments),this._change.e.apply(this,[e,i,s]))},sw:function(e,i,s){return t.extend(this._change.s.apply(this,arguments),this._change.w.apply(this,[e,i,s]))},ne:function(e,i,s){return t.extend(this._change.n.apply(this,arguments),this._change.e.apply(this,[e,i,s]))},nw:function(e,i,s){return t.extend(this._change.n.apply(this,arguments),this._change.w.apply(this,[e,i,s]))}},_propagate:function(e,i){t.ui.plugin.call(this,e,[i,this.ui()]),"resize"!==e&&this._trigger(e,i,this.ui())},plugins:{},ui:function(){return{originalElement:this.originalElement,element:this.element,helper:this.helper,position:this.position,size:this.size,originalSize:this.originalSize,originalPosition:this.originalPosition}}}),t.ui.plugin.add("resizable","animate",{stop:function(e){var i=t(this).resizable("instance"),s=i.options,n=i._proportionallyResizeElements,o=n.length&&/textarea/i.test(n[0].nodeName),a=o&&i._hasScroll(n[0],"left")?0:i.sizeDiff.height,r=o?0:i.sizeDiff.width,l={width:i.size.width-r,height:i.size.height-a},h=parseFloat(i.element.css("left"))+(i.position.left-i.originalPosition.left)||null,c=parseFloat(i.element.css("top"))+(i.position.top-i.originalPosition.top)||null;i.element.animate(t.extend(l,c&&h?{top:c,left:h}:{}),{duration:s.animateDuration,easing:s.animateEasing,step:function(){var s={width:parseFloat(i.element.css("width")),height:parseFloat(i.element.css("height")),top:parseFloat(i.element.css("top")),left:parseFloat(i.element.css("left"))};n&&n.length&&t(n[0]).css({width:s.width,height:s.height}),i._updateCache(s),i._propagate("resize",e)}})}}),t.ui.plugin.add("resizable","containment",{start:function(){var e,i,s,n,o,a,r,l=t(this).resizable("instance"),h=l.options,c=l.element,u=h.containment,d=u instanceof t?u.get(0):/parent/.test(u)?c.parent().get(0):u;d&&(l.containerElement=t(d),/document/.test(u)||u===document?(l.containerOffset={left:0,top:0},l.containerPosition={left:0,top:0},l.parentData={element:t(document),left:0,top:0,width:t(document).width(),height:t(document).height()||document.body.parentNode.scrollHeight}):(e=t(d),i=[],t(["Top","Right","Left","Bottom"]).each(function(t,s){i[t]=l._num(e.css("padding"+s))}),l.containerOffset=e.offset(),l.containerPosition=e.position(),l.containerSize={height:e.innerHeight()-i[3],width:e.innerWidth()-i[1]},s=l.containerOffset,n=l.containerSize.height,o=l.containerSize.width,a=l._hasScroll(d,"left")?d.scrollWidth:o,r=l._hasScroll(d)?d.scrollHeight:n,l.parentData={element:d,left:s.left,top:s.top,width:a,height:r}))},resize:function(e){var i,s,n,o,a=t(this).resizable("instance"),r=a.options,l=a.containerOffset,h=a.position,c=a._aspectRatio||e.shiftKey,u={top:0,left:0},d=a.containerElement,p=!0;d[0]!==document&&/static/.test(d.css("position"))&&(u=l),h.left<(a._helper?l.left:0)&&(a.size.width=a.size.width+(a._helper?a.position.left-l.left:a.position.left-u.left),c&&(a.size.height=a.size.width/a.aspectRatio,p=!1),a.position.left=r.helper?l.left:0),h.top<(a._helper?l.top:0)&&(a.size.height=a.size.height+(a._helper?a.position.top-l.top:a.position.top),c&&(a.size.width=a.size.height*a.aspectRatio,p=!1),a.position.top=a._helper?l.top:0),n=a.containerElement.get(0)===a.element.parent().get(0),o=/relative|absolute/.test(a.containerElement.css("position")),n&&o?(a.offset.left=a.parentData.left+a.position.left,a.offset.top=a.parentData.top+a.position.top):(a.offset.left=a.element.offset().left,a.offset.top=a.element.offset().top),i=Math.abs(a.sizeDiff.width+(a._helper?a.offset.left-u.left:a.offset.left-l.left)),s=Math.abs(a.sizeDiff.height+(a._helper?a.offset.top-u.top:a.offset.top-l.top)),i+a.size.width>=a.parentData.width&&(a.size.width=a.parentData.width-i,c&&(a.size.height=a.size.width/a.aspectRatio,p=!1)),s+a.size.height>=a.parentData.height&&(a.size.height=a.parentData.height-s,c&&(a.size.width=a.size.height*a.aspectRatio,p=!1)),p||(a.position.left=a.prevPosition.left,a.position.top=a.prevPosition.top,a.size.width=a.prevSize.width,a.size.height=a.prevSize.height)},stop:function(){var e=t(this).resizable("instance"),i=e.options,s=e.containerOffset,n=e.containerPosition,o=e.containerElement,a=t(e.helper),r=a.offset(),l=a.outerWidth()-e.sizeDiff.width,h=a.outerHeight()-e.sizeDiff.height;e._helper&&!i.animate&&/relative/.test(o.css("position"))&&t(this).css({left:r.left-n.left-s.left,width:l,height:h}),e._helper&&!i.animate&&/static/.test(o.css("position"))&&t(this).css({left:r.left-n.left-s.left,width:l,height:h})}}),t.ui.plugin.add("resizable","alsoResize",{start:function(){var e=t(this).resizable("instance"),i=e.options;t(i.alsoResize).each(function(){var e=t(this);e.data("ui-resizable-alsoresize",{width:parseFloat(e.width()),height:parseFloat(e.height()),left:parseFloat(e.css("left")),top:parseFloat(e.css("top"))})})},resize:function(e,i){var s=t(this).resizable("instance"),n=s.options,o=s.originalSize,a=s.originalPosition,r={height:s.size.height-o.height||0,width:s.size.width-o.width||0,top:s.position.top-a.top||0,left:s.position.left-a.left||0};t(n.alsoResize).each(function(){var e=t(this),s=t(this).data("ui-resizable-alsoresize"),n={},o=e.parents(i.originalElement[0]).length?["width","height"]:["width","height","top","left"];t.each(o,function(t,e){var i=(s[e]||0)+(r[e]||0);i&&i>=0&&(n[e]=i||null)}),e.css(n)})},stop:function(){t(this).removeData("ui-resizable-alsoresize")}}),t.ui.plugin.add("resizable","ghost",{start:function(){var e=t(this).resizable("instance"),i=e.size;e.ghost=e.originalElement.clone(),e.ghost.css({opacity:.25,display:"block",position:"relative",height:i.height,width:i.width,margin:0,left:0,top:0}),e._addClass(e.ghost,"ui-resizable-ghost"),t.uiBackCompat!==!1&&"string"==typeof e.options.ghost&&e.ghost.addClass(this.options.ghost),e.ghost.appendTo(e.helper)},resize:function(){var e=t(this).resizable("instance");e.ghost&&e.ghost.css({position:"relative",height:e.size.height,width:e.size.width})},stop:function(){var e=t(this).resizable("instance");e.ghost&&e.helper&&e.helper.get(0).removeChild(e.ghost.get(0))}}),t.ui.plugin.add("resizable","grid",{resize:function(){var e,i=t(this).resizable("instance"),s=i.options,n=i.size,o=i.originalSize,a=i.originalPosition,r=i.axis,l="number"==typeof s.grid?[s.grid,s.grid]:s.grid,h=l[0]||1,c=l[1]||1,u=Math.round((n.width-o.width)/h)*h,d=Math.round((n.height-o.height)/c)*c,p=o.width+u,f=o.height+d,g=s.maxWidth&&p>s.maxWidth,m=s.maxHeight&&f>s.maxHeight,_=s.minWidth&&s.minWidth>p,v=s.minHeight&&s.minHeight>f;s.grid=l,_&&(p+=h),v&&(f+=c),g&&(p-=h),m&&(f-=c),/^(se|s|e)$/.test(r)?(i.size.width=p,i.size.height=f):/^(ne)$/.test(r)?(i.size.width=p,i.size.height=f,i.position.top=a.top-d):/^(sw)$/.test(r)?(i.size.width=p,i.size.height=f,i.position.left=a.left-u):((0>=f-c||0>=p-h)&&(e=i._getPaddingPlusBorderDimensions(this)),f-c>0?(i.size.height=f,i.position.top=a.top-d):(f=c-e.height,i.size.height=f,i.position.top=a.top+o.height-f),p-h>0?(i.size.width=p,i.position.left=a.left-u):(p=h-e.width,i.size.width=p,i.position.left=a.left+o.width-p))}}),t.ui.resizable,t.widget("ui.sortable",t.ui.mouse,{version:"1.12.1",widgetEventPrefix:"sort",ready:!1,options:{appendTo:"parent",axis:!1,connectWith:!1,containment:!1,cursor:"auto",cursorAt:!1,dropOnEmpty:!0,forcePlaceholderSize:!1,forceHelperSize:!1,grid:!1,handle:!1,helper:"original",items:"> *",opacity:!1,placeholder:!1,revert:!1,scroll:!0,scrollSensitivity:20,scrollSpeed:20,scope:"default",tolerance:"intersect",zIndex:1e3,activate:null,beforeStop:null,change:null,deactivate:null,out:null,over:null,receive:null,remove:null,sort:null,start:null,stop:null,update:null},_isOverAxis:function(t,e,i){return t>=e&&e+i>t},_isFloating:function(t){return/left|right/.test(t.css("float"))||/inline|table-cell/.test(t.css("display"))},_create:function(){this.containerCache={},this._addClass("ui-sortable"),this.refresh(),this.offset=this.element.offset(),this._mouseInit(),this._setHandleClassName(),this.ready=!0},_setOption:function(t,e){this._super(t,e),"handle"===t&&this._setHandleClassName()},_setHandleClassName:function(){var e=this;this._removeClass(this.element.find(".ui-sortable-handle"),"ui-sortable-handle"),t.each(this.items,function(){e._addClass(this.instance.options.handle?this.item.find(this.instance.options.handle):this.item,"ui-sortable-handle")})},_destroy:function(){this._mouseDestroy();for(var t=this.items.length-1;t>=0;t--)this.items[t].item.removeData(this.widgetName+"-item");return this},_mouseCapture:function(e,i){var s=null,n=!1,o=this;return this.reverting?!1:this.options.disabled||"static"===this.options.type?!1:(this._refreshItems(e),t(e.target).parents().each(function(){return t.data(this,o.widgetName+"-item")===o?(s=t(this),!1):void 0}),t.data(e.target,o.widgetName+"-item")===o&&(s=t(e.target)),s?!this.options.handle||i||(t(this.options.handle,s).find("*").addBack().each(function(){this===e.target&&(n=!0)}),n)?(this.currentItem=s,this._removeCurrentsFromItems(),!0):!1:!1)},_mouseStart:function(e,i,s){var n,o,a=this.options;if(this.currentContainer=this,this.refreshPositions(),this.helper=this._createHelper(e),this._cacheHelperProportions(),this._cacheMargins(),this.scrollParent=this.helper.scrollParent(),this.offset=this.currentItem.offset(),this.offset={top:this.offset.top-this.margins.top,left:this.offset.left-this.margins.left},t.extend(this.offset,{click:{left:e.pageX-this.offset.left,top:e.pageY-this.offset.top},parent:this._getParentOffset(),relative:this._getRelativeOffset()}),this.helper.css("position","absolute"),this.cssPosition=this.helper.css("position"),this.originalPosition=this._generatePosition(e),this.originalPageX=e.pageX,this.originalPageY=e.pageY,a.cursorAt&&this._adjustOffsetFromHelper(a.cursorAt),this.domPosition={prev:this.currentItem.prev()[0],parent:this.currentItem.parent()[0]},this.helper[0]!==this.currentItem[0]&&this.currentItem.hide(),this._createPlaceholder(),a.containment&&this._setContainment(),a.cursor&&"auto"!==a.cursor&&(o=this.document.find("body"),this.storedCursor=o.css("cursor"),o.css("cursor",a.cursor),this.storedStylesheet=t("<style>*{ cursor: "+a.cursor+" !important; }</style>").appendTo(o)),a.opacity&&(this.helper.css("opacity")&&(this._storedOpacity=this.helper.css("opacity")),this.helper.css("opacity",a.opacity)),a.zIndex&&(this.helper.css("zIndex")&&(this._storedZIndex=this.helper.css("zIndex")),this.helper.css("zIndex",a.zIndex)),this.scrollParent[0]!==this.document[0]&&"HTML"!==this.scrollParent[0].tagName&&(this.overflowOffset=this.scrollParent.offset()),this._trigger("start",e,this._uiHash()),this._preserveHelperProportions||this._cacheHelperProportions(),!s)for(n=this.containers.length-1;n>=0;n--)this.containers[n]._trigger("activate",e,this._uiHash(this));return t.ui.ddmanager&&(t.ui.ddmanager.current=this),t.ui.ddmanager&&!a.dropBehaviour&&t.ui.ddmanager.prepareOffsets(this,e),this.dragging=!0,this._addClass(this.helper,"ui-sortable-helper"),this._mouseDrag(e),!0},_mouseDrag:function(e){var i,s,n,o,a=this.options,r=!1;for(this.position=this._generatePosition(e),this.positionAbs=this._convertPositionTo("absolute"),this.lastPositionAbs||(this.lastPositionAbs=this.positionAbs),this.options.scroll&&(this.scrollParent[0]!==this.document[0]&&"HTML"!==this.scrollParent[0].tagName?(this.overflowOffset.top+this.scrollParent[0].offsetHeight-e.pageY<a.scrollSensitivity?this.scrollParent[0].scrollTop=r=this.scrollParent[0].scrollTop+a.scrollSpeed:e.pageY-this.overflowOffset.top<a.scrollSensitivity&&(this.scrollParent[0].scrollTop=r=this.scrollParent[0].scrollTop-a.scrollSpeed),this.overflowOffset.left+this.scrollParent[0].offsetWidth-e.pageX<a.scrollSensitivity?this.scrollParent[0].scrollLeft=r=this.scrollParent[0].scrollLeft+a.scrollSpeed:e.pageX-this.overflowOffset.left<a.scrollSensitivity&&(this.scrollParent[0].scrollLeft=r=this.scrollParent[0].scrollLeft-a.scrollSpeed)):(e.pageY-this.document.scrollTop()<a.scrollSensitivity?r=this.document.scrollTop(this.document.scrollTop()-a.scrollSpeed):this.window.height()-(e.pageY-this.document.scrollTop())<a.scrollSensitivity&&(r=this.document.scrollTop(this.document.scrollTop()+a.scrollSpeed)),e.pageX-this.document.scrollLeft()<a.scrollSensitivity?r=this.document.scrollLeft(this.document.scrollLeft()-a.scrollSpeed):this.window.width()-(e.pageX-this.document.scrollLeft())<a.scrollSensitivity&&(r=this.document.scrollLeft(this.document.scrollLeft()+a.scrollSpeed))),r!==!1&&t.ui.ddmanager&&!a.dropBehaviour&&t.ui.ddmanager.prepareOffsets(this,e)),this.positionAbs=this._convertPositionTo("absolute"),this.options.axis&&"y"===this.options.axis||(this.helper[0].style.left=this.position.left+"px"),this.options.axis&&"x"===this.options.axis||(this.helper[0].style.top=this.position.top+"px"),i=this.items.length-1;i>=0;i--)if(s=this.items[i],n=s.item[0],o=this._intersectsWithPointer(s),o&&s.instance===this.currentContainer&&n!==this.currentItem[0]&&this.placeholder[1===o?"next":"prev"]()[0]!==n&&!t.contains(this.placeholder[0],n)&&("semi-dynamic"===this.options.type?!t.contains(this.element[0],n):!0)){if(this.direction=1===o?"down":"up","pointer"!==this.options.tolerance&&!this._intersectsWithSides(s))break;this._rearrange(e,s),this._trigger("change",e,this._uiHash());break}return this._contactContainers(e),t.ui.ddmanager&&t.ui.ddmanager.drag(this,e),this._trigger("sort",e,this._uiHash()),this.lastPositionAbs=this.positionAbs,!1},_mouseStop:function(e,i){if(e){if(t.ui.ddmanager&&!this.options.dropBehaviour&&t.ui.ddmanager.drop(this,e),this.options.revert){var s=this,n=this.placeholder.offset(),o=this.options.axis,a={};o&&"x"!==o||(a.left=n.left-this.offset.parent.left-this.margins.left+(this.offsetParent[0]===this.document[0].body?0:this.offsetParent[0].scrollLeft)),o&&"y"!==o||(a.top=n.top-this.offset.parent.top-this.margins.top+(this.offsetParent[0]===this.document[0].body?0:this.offsetParent[0].scrollTop)),this.reverting=!0,t(this.helper).animate(a,parseInt(this.options.revert,10)||500,function(){s._clear(e)})}else this._clear(e,i);return!1}},cancel:function(){if(this.dragging){this._mouseUp(new t.Event("mouseup",{target:null})),"original"===this.options.helper?(this.currentItem.css(this._storedCSS),this._removeClass(this.currentItem,"ui-sortable-helper")):this.currentItem.show();for(var e=this.containers.length-1;e>=0;e--)this.containers[e]._trigger("deactivate",null,this._uiHash(this)),this.containers[e].containerCache.over&&(this.containers[e]._trigger("out",null,this._uiHash(this)),this.containers[e].containerCache.over=0)}return this.placeholder&&(this.placeholder[0].parentNode&&this.placeholder[0].parentNode.removeChild(this.placeholder[0]),"original"!==this.options.helper&&this.helper&&this.helper[0].parentNode&&this.helper.remove(),t.extend(this,{helper:null,dragging:!1,reverting:!1,_noFinalSort:null}),this.domPosition.prev?t(this.domPosition.prev).after(this.currentItem):t(this.domPosition.parent).prepend(this.currentItem)),this},serialize:function(e){var i=this._getItemsAsjQuery(e&&e.connected),s=[];return e=e||{},t(i).each(function(){var i=(t(e.item||this).attr(e.attribute||"id")||"").match(e.expression||/(.+)[\-=_](.+)/);i&&s.push((e.key||i[1]+"[]")+"="+(e.key&&e.expression?i[1]:i[2]))}),!s.length&&e.key&&s.push(e.key+"="),s.join("&")},toArray:function(e){var i=this._getItemsAsjQuery(e&&e.connected),s=[];return e=e||{},i.each(function(){s.push(t(e.item||this).attr(e.attribute||"id")||"")}),s},_intersectsWith:function(t){var e=this.positionAbs.left,i=e+this.helperProportions.width,s=this.positionAbs.top,n=s+this.helperProportions.height,o=t.left,a=o+t.width,r=t.top,l=r+t.height,h=this.offset.click.top,c=this.offset.click.left,u="x"===this.options.axis||s+h>r&&l>s+h,d="y"===this.options.axis||e+c>o&&a>e+c,p=u&&d;return"pointer"===this.options.tolerance||this.options.forcePointerForContainers||"pointer"!==this.options.tolerance&&this.helperProportions[this.floating?"width":"height"]>t[this.floating?"width":"height"]?p:e+this.helperProportions.width/2>o&&a>i-this.helperProportions.width/2&&s+this.helperProportions.height/2>r&&l>n-this.helperProportions.height/2},_intersectsWithPointer:function(t){var e,i,s="x"===this.options.axis||this._isOverAxis(this.positionAbs.top+this.offset.click.top,t.top,t.height),n="y"===this.options.axis||this._isOverAxis(this.positionAbs.left+this.offset.click.left,t.left,t.width),o=s&&n;return o?(e=this._getDragVerticalDirection(),i=this._getDragHorizontalDirection(),this.floating?"right"===i||"down"===e?2:1:e&&("down"===e?2:1)):!1},_intersectsWithSides:function(t){var e=this._isOverAxis(this.positionAbs.top+this.offset.click.top,t.top+t.height/2,t.height),i=this._isOverAxis(this.positionAbs.left+this.offset.click.left,t.left+t.width/2,t.width),s=this._getDragVerticalDirection(),n=this._getDragHorizontalDirection();return this.floating&&n?"right"===n&&i||"left"===n&&!i:s&&("down"===s&&e||"up"===s&&!e)},_getDragVerticalDirection:function(){var t=this.positionAbs.top-this.lastPositionAbs.top;return 0!==t&&(t>0?"down":"up")},_getDragHorizontalDirection:function(){var t=this.positionAbs.left-this.lastPositionAbs.left;return 0!==t&&(t>0?"right":"left")},refresh:function(t){return this._refreshItems(t),this._setHandleClassName(),this.refreshPositions(),this},_connectWith:function(){var t=this.options;return t.connectWith.constructor===String?[t.connectWith]:t.connectWith},_getItemsAsjQuery:function(e){function i(){r.push(this)}var s,n,o,a,r=[],l=[],h=this._connectWith();if(h&&e)for(s=h.length-1;s>=0;s--)for(o=t(h[s],this.document[0]),n=o.length-1;n>=0;n--)a=t.data(o[n],this.widgetFullName),a&&a!==this&&!a.options.disabled&&l.push([t.isFunction(a.options.items)?a.options.items.call(a.element):t(a.options.items,a.element).not(".ui-sortable-helper").not(".ui-sortable-placeholder"),a]);for(l.push([t.isFunction(this.options.items)?this.options.items.call(this.element,null,{options:this.options,item:this.currentItem}):t(this.options.items,this.element).not(".ui-sortable-helper").not(".ui-sortable-placeholder"),this]),s=l.length-1;s>=0;s--)l[s][0].each(i);return t(r)},_removeCurrentsFromItems:function(){var e=this.currentItem.find(":data("+this.widgetName+"-item)");this.items=t.grep(this.items,function(t){for(var i=0;e.length>i;i++)if(e[i]===t.item[0])return!1;return!0})},_refreshItems:function(e){this.items=[],this.containers=[this];var i,s,n,o,a,r,l,h,c=this.items,u=[[t.isFunction(this.options.items)?this.options.items.call(this.element[0],e,{item:this.currentItem}):t(this.options.items,this.element),this]],d=this._connectWith();if(d&&this.ready)for(i=d.length-1;i>=0;i--)for(n=t(d[i],this.document[0]),s=n.length-1;s>=0;s--)o=t.data(n[s],this.widgetFullName),o&&o!==this&&!o.options.disabled&&(u.push([t.isFunction(o.options.items)?o.options.items.call(o.element[0],e,{item:this.currentItem}):t(o.options.items,o.element),o]),this.containers.push(o));for(i=u.length-1;i>=0;i--)for(a=u[i][1],r=u[i][0],s=0,h=r.length;h>s;s++)l=t(r[s]),l.data(this.widgetName+"-item",a),c.push({item:l,instance:a,width:0,height:0,left:0,top:0})},refreshPositions:function(e){this.floating=this.items.length?"x"===this.options.axis||this._isFloating(this.items[0].item):!1,this.offsetParent&&this.helper&&(this.offset.parent=this._getParentOffset());var i,s,n,o;for(i=this.items.length-1;i>=0;i--)s=this.items[i],s.instance!==this.currentContainer&&this.currentContainer&&s.item[0]!==this.currentItem[0]||(n=this.options.toleranceElement?t(this.options.toleranceElement,s.item):s.item,e||(s.width=n.outerWidth(),s.height=n.outerHeight()),o=n.offset(),s.left=o.left,s.top=o.top);if(this.options.custom&&this.options.custom.refreshContainers)this.options.custom.refreshContainers.call(this);else for(i=this.containers.length-1;i>=0;i--)o=this.containers[i].element.offset(),this.containers[i].containerCache.left=o.left,this.containers[i].containerCache.top=o.top,this.containers[i].containerCache.width=this.containers[i].element.outerWidth(),this.containers[i].containerCache.height=this.containers[i].element.outerHeight();return this},_createPlaceholder:function(e){e=e||this;var i,s=e.options;s.placeholder&&s.placeholder.constructor!==String||(i=s.placeholder,s.placeholder={element:function(){var s=e.currentItem[0].nodeName.toLowerCase(),n=t("<"+s+">",e.document[0]);return e._addClass(n,"ui-sortable-placeholder",i||e.currentItem[0].className)._removeClass(n,"ui-sortable-helper"),"tbody"===s?e._createTrPlaceholder(e.currentItem.find("tr").eq(0),t("<tr>",e.document[0]).appendTo(n)):"tr"===s?e._createTrPlaceholder(e.currentItem,n):"img"===s&&n.attr("src",e.currentItem.attr("src")),i||n.css("visibility","hidden"),n},update:function(t,n){(!i||s.forcePlaceholderSize)&&(n.height()||n.height(e.currentItem.innerHeight()-parseInt(e.currentItem.css("paddingTop")||0,10)-parseInt(e.currentItem.css("paddingBottom")||0,10)),n.width()||n.width(e.currentItem.innerWidth()-parseInt(e.currentItem.css("paddingLeft")||0,10)-parseInt(e.currentItem.css("paddingRight")||0,10)))}}),e.placeholder=t(s.placeholder.element.call(e.element,e.currentItem)),e.currentItem.after(e.placeholder),s.placeholder.update(e,e.placeholder)},_createTrPlaceholder:function(e,i){var s=this;e.children().each(function(){t("<td>&#160;</td>",s.document[0]).attr("colspan",t(this).attr("colspan")||1).appendTo(i)})},_contactContainers:function(e){var i,s,n,o,a,r,l,h,c,u,d=null,p=null;for(i=this.containers.length-1;i>=0;i--)if(!t.contains(this.currentItem[0],this.containers[i].element[0]))if(this._intersectsWith(this.containers[i].containerCache)){if(d&&t.contains(this.containers[i].element[0],d.element[0]))continue;d=this.containers[i],p=i}else this.containers[i].containerCache.over&&(this.containers[i]._trigger("out",e,this._uiHash(this)),this.containers[i].containerCache.over=0);if(d)if(1===this.containers.length)this.containers[p].containerCache.over||(this.containers[p]._trigger("over",e,this._uiHash(this)),this.containers[p].containerCache.over=1);else{for(n=1e4,o=null,c=d.floating||this._isFloating(this.currentItem),a=c?"left":"top",r=c?"width":"height",u=c?"pageX":"pageY",s=this.items.length-1;s>=0;s--)t.contains(this.containers[p].element[0],this.items[s].item[0])&&this.items[s].item[0]!==this.currentItem[0]&&(l=this.items[s].item.offset()[a],h=!1,e[u]-l>this.items[s][r]/2&&(h=!0),n>Math.abs(e[u]-l)&&(n=Math.abs(e[u]-l),o=this.items[s],this.direction=h?"up":"down"));if(!o&&!this.options.dropOnEmpty)return;if(this.currentContainer===this.containers[p])return this.currentContainer.containerCache.over||(this.containers[p]._trigger("over",e,this._uiHash()),this.currentContainer.containerCache.over=1),void 0;o?this._rearrange(e,o,null,!0):this._rearrange(e,null,this.containers[p].element,!0),this._trigger("change",e,this._uiHash()),this.containers[p]._trigger("change",e,this._uiHash(this)),this.currentContainer=this.containers[p],this.options.placeholder.update(this.currentContainer,this.placeholder),this.containers[p]._trigger("over",e,this._uiHash(this)),this.containers[p].containerCache.over=1
}},_createHelper:function(e){var i=this.options,s=t.isFunction(i.helper)?t(i.helper.apply(this.element[0],[e,this.currentItem])):"clone"===i.helper?this.currentItem.clone():this.currentItem;return s.parents("body").length||t("parent"!==i.appendTo?i.appendTo:this.currentItem[0].parentNode)[0].appendChild(s[0]),s[0]===this.currentItem[0]&&(this._storedCSS={width:this.currentItem[0].style.width,height:this.currentItem[0].style.height,position:this.currentItem.css("position"),top:this.currentItem.css("top"),left:this.currentItem.css("left")}),(!s[0].style.width||i.forceHelperSize)&&s.width(this.currentItem.width()),(!s[0].style.height||i.forceHelperSize)&&s.height(this.currentItem.height()),s},_adjustOffsetFromHelper:function(e){"string"==typeof e&&(e=e.split(" ")),t.isArray(e)&&(e={left:+e[0],top:+e[1]||0}),"left"in e&&(this.offset.click.left=e.left+this.margins.left),"right"in e&&(this.offset.click.left=this.helperProportions.width-e.right+this.margins.left),"top"in e&&(this.offset.click.top=e.top+this.margins.top),"bottom"in e&&(this.offset.click.top=this.helperProportions.height-e.bottom+this.margins.top)},_getParentOffset:function(){this.offsetParent=this.helper.offsetParent();var e=this.offsetParent.offset();return"absolute"===this.cssPosition&&this.scrollParent[0]!==this.document[0]&&t.contains(this.scrollParent[0],this.offsetParent[0])&&(e.left+=this.scrollParent.scrollLeft(),e.top+=this.scrollParent.scrollTop()),(this.offsetParent[0]===this.document[0].body||this.offsetParent[0].tagName&&"html"===this.offsetParent[0].tagName.toLowerCase()&&t.ui.ie)&&(e={top:0,left:0}),{top:e.top+(parseInt(this.offsetParent.css("borderTopWidth"),10)||0),left:e.left+(parseInt(this.offsetParent.css("borderLeftWidth"),10)||0)}},_getRelativeOffset:function(){if("relative"===this.cssPosition){var t=this.currentItem.position();return{top:t.top-(parseInt(this.helper.css("top"),10)||0)+this.scrollParent.scrollTop(),left:t.left-(parseInt(this.helper.css("left"),10)||0)+this.scrollParent.scrollLeft()}}return{top:0,left:0}},_cacheMargins:function(){this.margins={left:parseInt(this.currentItem.css("marginLeft"),10)||0,top:parseInt(this.currentItem.css("marginTop"),10)||0}},_cacheHelperProportions:function(){this.helperProportions={width:this.helper.outerWidth(),height:this.helper.outerHeight()}},_setContainment:function(){var e,i,s,n=this.options;"parent"===n.containment&&(n.containment=this.helper[0].parentNode),("document"===n.containment||"window"===n.containment)&&(this.containment=[0-this.offset.relative.left-this.offset.parent.left,0-this.offset.relative.top-this.offset.parent.top,"document"===n.containment?this.document.width():this.window.width()-this.helperProportions.width-this.margins.left,("document"===n.containment?this.document.height()||document.body.parentNode.scrollHeight:this.window.height()||this.document[0].body.parentNode.scrollHeight)-this.helperProportions.height-this.margins.top]),/^(document|window|parent)$/.test(n.containment)||(e=t(n.containment)[0],i=t(n.containment).offset(),s="hidden"!==t(e).css("overflow"),this.containment=[i.left+(parseInt(t(e).css("borderLeftWidth"),10)||0)+(parseInt(t(e).css("paddingLeft"),10)||0)-this.margins.left,i.top+(parseInt(t(e).css("borderTopWidth"),10)||0)+(parseInt(t(e).css("paddingTop"),10)||0)-this.margins.top,i.left+(s?Math.max(e.scrollWidth,e.offsetWidth):e.offsetWidth)-(parseInt(t(e).css("borderLeftWidth"),10)||0)-(parseInt(t(e).css("paddingRight"),10)||0)-this.helperProportions.width-this.margins.left,i.top+(s?Math.max(e.scrollHeight,e.offsetHeight):e.offsetHeight)-(parseInt(t(e).css("borderTopWidth"),10)||0)-(parseInt(t(e).css("paddingBottom"),10)||0)-this.helperProportions.height-this.margins.top])},_convertPositionTo:function(e,i){i||(i=this.position);var s="absolute"===e?1:-1,n="absolute"!==this.cssPosition||this.scrollParent[0]!==this.document[0]&&t.contains(this.scrollParent[0],this.offsetParent[0])?this.scrollParent:this.offsetParent,o=/(html|body)/i.test(n[0].tagName);return{top:i.top+this.offset.relative.top*s+this.offset.parent.top*s-("fixed"===this.cssPosition?-this.scrollParent.scrollTop():o?0:n.scrollTop())*s,left:i.left+this.offset.relative.left*s+this.offset.parent.left*s-("fixed"===this.cssPosition?-this.scrollParent.scrollLeft():o?0:n.scrollLeft())*s}},_generatePosition:function(e){var i,s,n=this.options,o=e.pageX,a=e.pageY,r="absolute"!==this.cssPosition||this.scrollParent[0]!==this.document[0]&&t.contains(this.scrollParent[0],this.offsetParent[0])?this.scrollParent:this.offsetParent,l=/(html|body)/i.test(r[0].tagName);return"relative"!==this.cssPosition||this.scrollParent[0]!==this.document[0]&&this.scrollParent[0]!==this.offsetParent[0]||(this.offset.relative=this._getRelativeOffset()),this.originalPosition&&(this.containment&&(e.pageX-this.offset.click.left<this.containment[0]&&(o=this.containment[0]+this.offset.click.left),e.pageY-this.offset.click.top<this.containment[1]&&(a=this.containment[1]+this.offset.click.top),e.pageX-this.offset.click.left>this.containment[2]&&(o=this.containment[2]+this.offset.click.left),e.pageY-this.offset.click.top>this.containment[3]&&(a=this.containment[3]+this.offset.click.top)),n.grid&&(i=this.originalPageY+Math.round((a-this.originalPageY)/n.grid[1])*n.grid[1],a=this.containment?i-this.offset.click.top>=this.containment[1]&&i-this.offset.click.top<=this.containment[3]?i:i-this.offset.click.top>=this.containment[1]?i-n.grid[1]:i+n.grid[1]:i,s=this.originalPageX+Math.round((o-this.originalPageX)/n.grid[0])*n.grid[0],o=this.containment?s-this.offset.click.left>=this.containment[0]&&s-this.offset.click.left<=this.containment[2]?s:s-this.offset.click.left>=this.containment[0]?s-n.grid[0]:s+n.grid[0]:s)),{top:a-this.offset.click.top-this.offset.relative.top-this.offset.parent.top+("fixed"===this.cssPosition?-this.scrollParent.scrollTop():l?0:r.scrollTop()),left:o-this.offset.click.left-this.offset.relative.left-this.offset.parent.left+("fixed"===this.cssPosition?-this.scrollParent.scrollLeft():l?0:r.scrollLeft())}},_rearrange:function(t,e,i,s){i?i[0].appendChild(this.placeholder[0]):e.item[0].parentNode.insertBefore(this.placeholder[0],"down"===this.direction?e.item[0]:e.item[0].nextSibling),this.counter=this.counter?++this.counter:1;var n=this.counter;this._delay(function(){n===this.counter&&this.refreshPositions(!s)})},_clear:function(t,e){function i(t,e,i){return function(s){i._trigger(t,s,e._uiHash(e))}}this.reverting=!1;var s,n=[];if(!this._noFinalSort&&this.currentItem.parent().length&&this.placeholder.before(this.currentItem),this._noFinalSort=null,this.helper[0]===this.currentItem[0]){for(s in this._storedCSS)("auto"===this._storedCSS[s]||"static"===this._storedCSS[s])&&(this._storedCSS[s]="");this.currentItem.css(this._storedCSS),this._removeClass(this.currentItem,"ui-sortable-helper")}else this.currentItem.show();for(this.fromOutside&&!e&&n.push(function(t){this._trigger("receive",t,this._uiHash(this.fromOutside))}),!this.fromOutside&&this.domPosition.prev===this.currentItem.prev().not(".ui-sortable-helper")[0]&&this.domPosition.parent===this.currentItem.parent()[0]||e||n.push(function(t){this._trigger("update",t,this._uiHash())}),this!==this.currentContainer&&(e||(n.push(function(t){this._trigger("remove",t,this._uiHash())}),n.push(function(t){return function(e){t._trigger("receive",e,this._uiHash(this))}}.call(this,this.currentContainer)),n.push(function(t){return function(e){t._trigger("update",e,this._uiHash(this))}}.call(this,this.currentContainer)))),s=this.containers.length-1;s>=0;s--)e||n.push(i("deactivate",this,this.containers[s])),this.containers[s].containerCache.over&&(n.push(i("out",this,this.containers[s])),this.containers[s].containerCache.over=0);if(this.storedCursor&&(this.document.find("body").css("cursor",this.storedCursor),this.storedStylesheet.remove()),this._storedOpacity&&this.helper.css("opacity",this._storedOpacity),this._storedZIndex&&this.helper.css("zIndex","auto"===this._storedZIndex?"":this._storedZIndex),this.dragging=!1,e||this._trigger("beforeStop",t,this._uiHash()),this.placeholder[0].parentNode.removeChild(this.placeholder[0]),this.cancelHelperRemoval||(this.helper[0]!==this.currentItem[0]&&this.helper.remove(),this.helper=null),!e){for(s=0;n.length>s;s++)n[s].call(this,t);this._trigger("stop",t,this._uiHash())}return this.fromOutside=!1,!this.cancelHelperRemoval},_trigger:function(){t.Widget.prototype._trigger.apply(this,arguments)===!1&&this.cancel()},_uiHash:function(e){var i=e||this;return{helper:i.helper,placeholder:i.placeholder||t([]),position:i.position,originalPosition:i.originalPosition,offset:i.positionAbs,item:i.currentItem,sender:e?e.element:null}}}),t.widget("ui.slider",t.ui.mouse,{version:"1.12.1",widgetEventPrefix:"slide",options:{animate:!1,classes:{"ui-slider":"ui-corner-all","ui-slider-handle":"ui-corner-all","ui-slider-range":"ui-corner-all ui-widget-header"},distance:0,max:100,min:0,orientation:"horizontal",range:!1,step:1,value:0,values:null,change:null,slide:null,start:null,stop:null},numPages:5,_create:function(){this._keySliding=!1,this._mouseSliding=!1,this._animateOff=!0,this._handleIndex=null,this._detectOrientation(),this._mouseInit(),this._calculateNewMax(),this._addClass("ui-slider ui-slider-"+this.orientation,"ui-widget ui-widget-content"),this._refresh(),this._animateOff=!1},_refresh:function(){this._createRange(),this._createHandles(),this._setupEvents(),this._refreshValue()},_createHandles:function(){var e,i,s=this.options,n=this.element.find(".ui-slider-handle"),o="<span tabindex='0'></span>",a=[];for(i=s.values&&s.values.length||1,n.length>i&&(n.slice(i).remove(),n=n.slice(0,i)),e=n.length;i>e;e++)a.push(o);this.handles=n.add(t(a.join("")).appendTo(this.element)),this._addClass(this.handles,"ui-slider-handle","ui-state-default"),this.handle=this.handles.eq(0),this.handles.each(function(e){t(this).data("ui-slider-handle-index",e).attr("tabIndex",0)})},_createRange:function(){var e=this.options;e.range?(e.range===!0&&(e.values?e.values.length&&2!==e.values.length?e.values=[e.values[0],e.values[0]]:t.isArray(e.values)&&(e.values=e.values.slice(0)):e.values=[this._valueMin(),this._valueMin()]),this.range&&this.range.length?(this._removeClass(this.range,"ui-slider-range-min ui-slider-range-max"),this.range.css({left:"",bottom:""})):(this.range=t("<div>").appendTo(this.element),this._addClass(this.range,"ui-slider-range")),("min"===e.range||"max"===e.range)&&this._addClass(this.range,"ui-slider-range-"+e.range)):(this.range&&this.range.remove(),this.range=null)},_setupEvents:function(){this._off(this.handles),this._on(this.handles,this._handleEvents),this._hoverable(this.handles),this._focusable(this.handles)},_destroy:function(){this.handles.remove(),this.range&&this.range.remove(),this._mouseDestroy()},_mouseCapture:function(e){var i,s,n,o,a,r,l,h,c=this,u=this.options;return u.disabled?!1:(this.elementSize={width:this.element.outerWidth(),height:this.element.outerHeight()},this.elementOffset=this.element.offset(),i={x:e.pageX,y:e.pageY},s=this._normValueFromMouse(i),n=this._valueMax()-this._valueMin()+1,this.handles.each(function(e){var i=Math.abs(s-c.values(e));(n>i||n===i&&(e===c._lastChangedValue||c.values(e)===u.min))&&(n=i,o=t(this),a=e)}),r=this._start(e,a),r===!1?!1:(this._mouseSliding=!0,this._handleIndex=a,this._addClass(o,null,"ui-state-active"),o.trigger("focus"),l=o.offset(),h=!t(e.target).parents().addBack().is(".ui-slider-handle"),this._clickOffset=h?{left:0,top:0}:{left:e.pageX-l.left-o.width()/2,top:e.pageY-l.top-o.height()/2-(parseInt(o.css("borderTopWidth"),10)||0)-(parseInt(o.css("borderBottomWidth"),10)||0)+(parseInt(o.css("marginTop"),10)||0)},this.handles.hasClass("ui-state-hover")||this._slide(e,a,s),this._animateOff=!0,!0))},_mouseStart:function(){return!0},_mouseDrag:function(t){var e={x:t.pageX,y:t.pageY},i=this._normValueFromMouse(e);return this._slide(t,this._handleIndex,i),!1},_mouseStop:function(t){return this._removeClass(this.handles,null,"ui-state-active"),this._mouseSliding=!1,this._stop(t,this._handleIndex),this._change(t,this._handleIndex),this._handleIndex=null,this._clickOffset=null,this._animateOff=!1,!1},_detectOrientation:function(){this.orientation="vertical"===this.options.orientation?"vertical":"horizontal"},_normValueFromMouse:function(t){var e,i,s,n,o;return"horizontal"===this.orientation?(e=this.elementSize.width,i=t.x-this.elementOffset.left-(this._clickOffset?this._clickOffset.left:0)):(e=this.elementSize.height,i=t.y-this.elementOffset.top-(this._clickOffset?this._clickOffset.top:0)),s=i/e,s>1&&(s=1),0>s&&(s=0),"vertical"===this.orientation&&(s=1-s),n=this._valueMax()-this._valueMin(),o=this._valueMin()+s*n,this._trimAlignValue(o)},_uiHash:function(t,e,i){var s={handle:this.handles[t],handleIndex:t,value:void 0!==e?e:this.value()};return this._hasMultipleValues()&&(s.value=void 0!==e?e:this.values(t),s.values=i||this.values()),s},_hasMultipleValues:function(){return this.options.values&&this.options.values.length},_start:function(t,e){return this._trigger("start",t,this._uiHash(e))},_slide:function(t,e,i){var s,n,o=this.value(),a=this.values();this._hasMultipleValues()&&(n=this.values(e?0:1),o=this.values(e),2===this.options.values.length&&this.options.range===!0&&(i=0===e?Math.min(n,i):Math.max(n,i)),a[e]=i),i!==o&&(s=this._trigger("slide",t,this._uiHash(e,i,a)),s!==!1&&(this._hasMultipleValues()?this.values(e,i):this.value(i)))},_stop:function(t,e){this._trigger("stop",t,this._uiHash(e))},_change:function(t,e){this._keySliding||this._mouseSliding||(this._lastChangedValue=e,this._trigger("change",t,this._uiHash(e)))},value:function(t){return arguments.length?(this.options.value=this._trimAlignValue(t),this._refreshValue(),this._change(null,0),void 0):this._value()},values:function(e,i){var s,n,o;if(arguments.length>1)return this.options.values[e]=this._trimAlignValue(i),this._refreshValue(),this._change(null,e),void 0;if(!arguments.length)return this._values();if(!t.isArray(arguments[0]))return this._hasMultipleValues()?this._values(e):this.value();for(s=this.options.values,n=arguments[0],o=0;s.length>o;o+=1)s[o]=this._trimAlignValue(n[o]),this._change(null,o);this._refreshValue()},_setOption:function(e,i){var s,n=0;switch("range"===e&&this.options.range===!0&&("min"===i?(this.options.value=this._values(0),this.options.values=null):"max"===i&&(this.options.value=this._values(this.options.values.length-1),this.options.values=null)),t.isArray(this.options.values)&&(n=this.options.values.length),this._super(e,i),e){case"orientation":this._detectOrientation(),this._removeClass("ui-slider-horizontal ui-slider-vertical")._addClass("ui-slider-"+this.orientation),this._refreshValue(),this.options.range&&this._refreshRange(i),this.handles.css("horizontal"===i?"bottom":"left","");break;case"value":this._animateOff=!0,this._refreshValue(),this._change(null,0),this._animateOff=!1;break;case"values":for(this._animateOff=!0,this._refreshValue(),s=n-1;s>=0;s--)this._change(null,s);this._animateOff=!1;break;case"step":case"min":case"max":this._animateOff=!0,this._calculateNewMax(),this._refreshValue(),this._animateOff=!1;break;case"range":this._animateOff=!0,this._refresh(),this._animateOff=!1}},_setOptionDisabled:function(t){this._super(t),this._toggleClass(null,"ui-state-disabled",!!t)},_value:function(){var t=this.options.value;return t=this._trimAlignValue(t)},_values:function(t){var e,i,s;if(arguments.length)return e=this.options.values[t],e=this._trimAlignValue(e);if(this._hasMultipleValues()){for(i=this.options.values.slice(),s=0;i.length>s;s+=1)i[s]=this._trimAlignValue(i[s]);return i}return[]},_trimAlignValue:function(t){if(this._valueMin()>=t)return this._valueMin();if(t>=this._valueMax())return this._valueMax();var e=this.options.step>0?this.options.step:1,i=(t-this._valueMin())%e,s=t-i;return 2*Math.abs(i)>=e&&(s+=i>0?e:-e),parseFloat(s.toFixed(5))},_calculateNewMax:function(){var t=this.options.max,e=this._valueMin(),i=this.options.step,s=Math.round((t-e)/i)*i;t=s+e,t>this.options.max&&(t-=i),this.max=parseFloat(t.toFixed(this._precision()))},_precision:function(){var t=this._precisionOf(this.options.step);return null!==this.options.min&&(t=Math.max(t,this._precisionOf(this.options.min))),t},_precisionOf:function(t){var e=""+t,i=e.indexOf(".");return-1===i?0:e.length-i-1},_valueMin:function(){return this.options.min},_valueMax:function(){return this.max},_refreshRange:function(t){"vertical"===t&&this.range.css({width:"",left:""}),"horizontal"===t&&this.range.css({height:"",bottom:""})},_refreshValue:function(){var e,i,s,n,o,a=this.options.range,r=this.options,l=this,h=this._animateOff?!1:r.animate,c={};this._hasMultipleValues()?this.handles.each(function(s){i=100*((l.values(s)-l._valueMin())/(l._valueMax()-l._valueMin())),c["horizontal"===l.orientation?"left":"bottom"]=i+"%",t(this).stop(1,1)[h?"animate":"css"](c,r.animate),l.options.range===!0&&("horizontal"===l.orientation?(0===s&&l.range.stop(1,1)[h?"animate":"css"]({left:i+"%"},r.animate),1===s&&l.range[h?"animate":"css"]({width:i-e+"%"},{queue:!1,duration:r.animate})):(0===s&&l.range.stop(1,1)[h?"animate":"css"]({bottom:i+"%"},r.animate),1===s&&l.range[h?"animate":"css"]({height:i-e+"%"},{queue:!1,duration:r.animate}))),e=i}):(s=this.value(),n=this._valueMin(),o=this._valueMax(),i=o!==n?100*((s-n)/(o-n)):0,c["horizontal"===this.orientation?"left":"bottom"]=i+"%",this.handle.stop(1,1)[h?"animate":"css"](c,r.animate),"min"===a&&"horizontal"===this.orientation&&this.range.stop(1,1)[h?"animate":"css"]({width:i+"%"},r.animate),"max"===a&&"horizontal"===this.orientation&&this.range.stop(1,1)[h?"animate":"css"]({width:100-i+"%"},r.animate),"min"===a&&"vertical"===this.orientation&&this.range.stop(1,1)[h?"animate":"css"]({height:i+"%"},r.animate),"max"===a&&"vertical"===this.orientation&&this.range.stop(1,1)[h?"animate":"css"]({height:100-i+"%"},r.animate))},_handleEvents:{keydown:function(e){var i,s,n,o,a=t(e.target).data("ui-slider-handle-index");switch(e.keyCode){case t.ui.keyCode.HOME:case t.ui.keyCode.END:case t.ui.keyCode.PAGE_UP:case t.ui.keyCode.PAGE_DOWN:case t.ui.keyCode.UP:case t.ui.keyCode.RIGHT:case t.ui.keyCode.DOWN:case t.ui.keyCode.LEFT:if(e.preventDefault(),!this._keySliding&&(this._keySliding=!0,this._addClass(t(e.target),null,"ui-state-active"),i=this._start(e,a),i===!1))return}switch(o=this.options.step,s=n=this._hasMultipleValues()?this.values(a):this.value(),e.keyCode){case t.ui.keyCode.HOME:n=this._valueMin();break;case t.ui.keyCode.END:n=this._valueMax();break;case t.ui.keyCode.PAGE_UP:n=this._trimAlignValue(s+(this._valueMax()-this._valueMin())/this.numPages);break;case t.ui.keyCode.PAGE_DOWN:n=this._trimAlignValue(s-(this._valueMax()-this._valueMin())/this.numPages);break;case t.ui.keyCode.UP:case t.ui.keyCode.RIGHT:if(s===this._valueMax())return;n=this._trimAlignValue(s+o);break;case t.ui.keyCode.DOWN:case t.ui.keyCode.LEFT:if(s===this._valueMin())return;n=this._trimAlignValue(s-o)}this._slide(e,a,n)},keyup:function(e){var i=t(e.target).data("ui-slider-handle-index");this._keySliding&&(this._keySliding=!1,this._stop(e,i),this._change(e,i),this._removeClass(t(e.target),null,"ui-state-active"))}}})});libraries/jquery/css/index.html000060400000000054152455721620012630 0ustar00<html><body bgcolor="#FFFFFF"></body></html>libraries/jquery/css/jquery-ui.min.css000060400000007635152455721620014075 0ustar00/*! jQuery UI - v1.11.4 - 2016-05-15
* http://jqueryui.com
* Includes: core.css, draggable.css, resizable.css, sortable.css, slider.css
* Copyright jQuery Foundation and other contributors; Licensed MIT */.ui-helper-hidden{display:none}.ui-helper-hidden-accessible{border:0;clip:rect(0 0 0 0);height:1px;margin:-1px;overflow:hidden;padding:0;position:absolute;width:1px}.ui-helper-reset{margin:0;padding:0;border:0;outline:0;line-height:1.3;text-decoration:none;font-size:100%;list-style:none}.ui-helper-clearfix:after,.ui-helper-clearfix:before{content:"";display:table;border-collapse:collapse}.ui-helper-clearfix:after{clear:both}.ui-helper-clearfix{min-height:0}.ui-helper-zfix{width:100%;height:100%;top:0;left:0;position:absolute;opacity:0;filter:Alpha(Opacity=0)}.ui-front{z-index:100}.ui-state-disabled{cursor:default!important}.ui-widget-overlay{position:fixed;top:0;left:0;width:100%;height:100%}.ui-draggable-handle{-ms-touch-action:none;touch-action:none}.ui-resizable{position:relative}.ui-resizable-handle{position:absolute;font-size:.1px;display:block;-ms-touch-action:none;touch-action:none}.ui-resizable-autohide .ui-resizable-handle,.ui-resizable-disabled .ui-resizable-handle{display:none}.ui-resizable-n{cursor:n-resize;height:7px;width:100%;top:-5px;left:0}.ui-resizable-s{cursor:s-resize;height:7px;width:100%;bottom:-5px;left:0}.ui-resizable-e{cursor:e-resize;width:7px;right:-5px;top:0;height:100%}.ui-resizable-w{cursor:w-resize;width:7px;left:-5px;top:0;height:100%}.ui-resizable-se{cursor:se-resize;width:9px;height:9px;right:-5px;bottom:-5px}.ui-resizable-sw{cursor:sw-resize;width:9px;height:9px;left:-5px;bottom:-5px}.ui-slider-vertical .ui-slider-range-min,.uk-jce .ui-slider-vertical .ui-slider-range-min{bottom:0}.ui-resizable-nw{cursor:nw-resize;width:9px;height:9px;left:-5px;top:-5px}.ui-resizable-ne{cursor:ne-resize;width:9px;height:9px;right:-5px;top:-5px}.ui-slider-horizontal .ui-slider-range-max,.uk-jce .ui-slider-horizontal .ui-slider-range-max{right:0}.ui-resizable-ne,.ui-resizable-nw,.ui-resizable-se,.ui-resizable-sw{border:1px solid #444;background:rgba(255,255,255,.8)}.ui-sortable-handle{-ms-touch-action:none;touch-action:none}.ui-slider{position:relative;text-align:left}.ui-slider .ui-slider-handle{position:absolute;z-index:2;width:1.2em;height:1.2em;cursor:default;-ms-touch-action:none;touch-action:none}.ui-slider .ui-slider-range{position:absolute;z-index:1;font-size:.7em;display:block;border:0;background-position:0 0}.ui-slider.ui-state-disabled .ui-slider-handle,.ui-slider.ui-state-disabled .ui-slider-range{filter:inherit}.ui-slider-horizontal{height:.8em}.ui-slider-horizontal .ui-slider-handle{top:-.3em;margin-left:-.6em}.ui-slider-horizontal .ui-slider-range{top:0;height:100%}.ui-slider-horizontal .ui-slider-range-min{left:0}.ui-slider-vertical{width:.8em;height:100px}.ui-slider-vertical .ui-slider-handle{left:-.3em;margin-left:0;margin-bottom:-.6em}.ui-slider-vertical .ui-slider-range{left:0;width:100%}.ui-slider-vertical .ui-slider-range-max{top:0}.uk-jce .ui-slider{position:relative;text-align:left;background:#d7d7d7}.uk-jce .ui-slider .ui-slider-handle{background:#d7d7d7;position:absolute;z-index:2;width:16px;height:16px;cursor:pointer;border:none;outline:0;border-radius:100%;-moz-border-radius:100%;-webkit-border-radius:100%}.uk-jce .ui-slider .ui-slider-handle.ui-state-active{background:#ccc}.uk-jce .ui-slider .ui-slider-range{background:#a3cae0;position:absolute;z-index:1;font-size:.7em;display:block;border:0}.uk-jce .ui-slider-horizontal{height:2px}.uk-jce .ui-slider-horizontal .ui-slider-handle{top:-8px;margin-left:-8px}.uk-jce .ui-slider-horizontal .ui-slider-range{top:0;height:100%}.uk-jce .ui-slider-horizontal .ui-slider-range-min{left:0}.uk-jce .ui-slider-vertical{width:3px;height:100px}.uk-jce .ui-slider-vertical .ui-slider-handle{left:-7px;margin-left:0;margin-bottom:-8px}.uk-jce .ui-slider-vertical .ui-slider-range{left:0;width:100%}.uk-jce .ui-slider-vertical .ui-slider-range-max{top:0}libraries/views/popups/tmpl/index.html000060400000000054152455721620014160 0ustar00<html><body bgcolor="#FFFFFF"></body></html>libraries/views/popups/tmpl/popups.php000060400000003126152455721620014225 0ustar00<?php
/**
 * @package     JCE
 * @subpackage  Editor
 *
 * @copyright   Copyright (C) 2005 - 2020 Open Source Matters, Inc. All rights reserved.
 * @copyright   Copyright (c) 2009-2024 Ryan Demmer. All rights reserved
 * @license     GNU General Public License version 2 or later; see LICENSE.txt
 */

\defined('_JEXEC') or die;

use Joomla\CMS\Language\Text;

?>
<div class="uk-form-row uk-grid uk-grid-small uk-margin-small-bottom">
	<label for="popup_list" class="uk-form-label uk-width-1-5 hastip" title="<?php echo Text::_('WF_POPUP_TYPE_DESC'); ?>"><?php echo Text::_('WF_POPUP_TYPE'); ?></label>
	<div class="uk-form-controls uk-width-4-5">
		<?php echo $this->popups->getPopupList(); ?>
	</div>
</div>

<?php if ($this->popups->get('text')): ?>

<div class="uk-form-row uk-grid uk-grid-small uk-margin-small-bottom"">
	<label for=" popup_text" class="hastip uk-form-label uk-width-1-5" title="<?php echo Text::_('WF_POPUP_TEXT_DESC'); ?>"><?php echo Text::_('WF_POPUP_TEXT'); ?></label>
	<div class="uk-form-controls uk-width-4-5">
		<input id="popup_text" type="text" value="" />
	</div>
</div>

<?php endif;?>

<?php if ($this->popups->get('url')): ?>

<div class="uk-form-row uk-margin-small-bottom uk-grid uk-grid-small">
	<label for="popup_src" class="uk-form-label uk-width-1-5 hastip" title="<?php echo Text::_('WF_LABEL_URL_DESC'); ?>"><?php echo Text::_('WF_LABEL_URL'); ?></label>
	<div class="uk-form-controls uk-width-4-5">
		<input id="popup_src" type="text" value="" class="uk-input-multiple-disabled browser files" />
	</div>
</div>

<?php endif;?>

<?php echo $this->popups->getPopupTemplates(); ?>libraries/views/popups/index.html000060400000000054152455721620013204 0ustar00<html><body bgcolor="#FFFFFF"></body></html>libraries/views/plugin/index.php000060400000001450152455721620013000 0ustar00<?php
/**
 * @package     JCE
 * @subpackage  Editor
 *
 * @copyright   Copyright (C) 2005 - 2020 Open Source Matters, Inc. All rights reserved.
 * @copyright   Copyright (c) 2009-2024 Ryan Demmer. All rights reserved
 * @license     GNU General Public License version 2 or later; see LICENSE.txt
 */

\defined('_JEXEC') or die;

?>
<!DOCTYPE html>
<html lang="<?php echo $this->language; ?>" dir="<?php echo $this->direction; ?>">
	<head>
		<meta http-equiv="content-type" content="text/html; charset=utf-8">
		<meta http-equiv="X-UA-Compatible" content="IE=edge,chrome=1">
		<!-- [head] -->
	</head>
	<body lang="<?php echo $this->language; ?>" id="jce" class="uk-jce <?php echo $this->theme; ?> uk-form uk-form-horizontal" data-plugin="<?php echo $this->getName(); ?>">
		<!-- [body] -->
	</body>
</html>
libraries/views/plugin/tmpl/index.html000060400000000054152455721620014130 0ustar00<html><body bgcolor="#FFFFFF"></body></html>libraries/views/plugin/tmpl/manager.php000060400000001772152455721620014266 0ustar00<?php
/**
 * @package     JCE
 * @subpackage  Editor
 *
 * @copyright   Copyright (C) 2005 - 2020 Open Source Matters, Inc. All rights reserved.
 * @copyright   Copyright (c) 2009-2024 Ryan Demmer. All rights reserved
 * @license     GNU General Public License version 2 or later; see LICENSE.txt
 */

\defined('_JEXEC') or die;

use Joomla\CMS\Language\Text;
?>
<div class="uk-position-cover uk-browser uk-browser-<?php echo $this->filebrowser->get('position'); ?>">
<?php
// render tabs and panels
WFTabs::getInstance()->render();

if ($this->filebrowser->get('position') !== 'external') {
    $this->filebrowser->render();
}
?>
</div>
<div class="actionPanel uk-modal-footer">
    <button class="uk-button uk-button-cancel" id="cancel"><?php echo Text::_('WF_LABEL_CANCEL') ?></button>
    <button class="uk-button uk-button-refresh" id="refresh"><?php echo Text::_('WF_LABEL_REFRESH') ?></button>
    <button class="uk-button uk-button-confirm" id="insert"><?php echo Text::_('WF_LABEL_INSERT') ?></button>
</div>
libraries/views/plugin/tmpl/browser.php000060400000002055152455721620014332 0ustar00<?php
/**
 * @package     JCE
 * @subpackage  Editor
 *
 * @copyright   Copyright (C) 2005 - 2020 Open Source Matters, Inc. All rights reserved.
 * @copyright   Copyright (c) 2009-2024 Ryan Demmer. All rights reserved
 * @license     GNU General Public License version 2 or later; see LICENSE.txt
 */

 \defined('_JEXEC') or die;

 use Joomla\CMS\Client\ClientHelper;
 use Joomla\CMS\Factory;
 use Joomla\Filesystem\File;
 use Joomla\Filesystem\Folder;
 use Joomla\CMS\Language\Text;
 use Joomla\CMS\Uri\Uri;
 
defined('WF_EDITOR') or die('RESTRICTED');
?>
<div class="uk-position-cover uk-browser uk-browser-external">
	<?php $this->filebrowser->render(); ?>

	<input type="hidden" value="" class="filebrowser" data-filebrowser />
</div>
<div class="actionPanel uk-modal-footer">
	<button class="uk-button cancel" id="cancel"><?php echo Text::_('WF_LABEL_CANCEL')?></button>
	<button class="uk-button" id="refresh"><?php echo Text::_('WF_LABEL_REFRESH')?></button>
	<button class="uk-button confirm" id="insert"><?php echo Text::_('WF_LABEL_INSERT')?></button>
</div>
libraries/views/plugin/index.html000060400000000054152455721620013154 0ustar00<html><body bgcolor="#FFFFFF"></body></html>libraries/views/filebrowser/index.html000060400000000054152455721620014201 0ustar00<html><body bgcolor="#FFFFFF"></body></html>libraries/views/filebrowser/tmpl/default.php000060400000022554152455721620015326 0ustar00<?php
/**
 * @package     JCE
 * @subpackage  Editor
 *
 * @copyright   Copyright (C) 2005 - 2020 Open Source Matters, Inc. All rights reserved.
 * @copyright   Copyright (c) 2009-2024 Ryan Demmer. All rights reserved
 * @license     GNU General Public License version 2 or later; see LICENSE.txt
 */

\defined('_JEXEC') or die;

use Joomla\CMS\Language\Text;
use Joomla\CMS\Session\Session;
?>
<form class="uk-form uk-form-horizontal" onsubmit="return false;" action="<?php echo $this->action; ?>" target="_self" method="post" enctype="multipart/form-data">
  <div id="browser">
    <nav class="uk-navbar uk-grid uk-grid-collapse uk-width-1-1">
      <div id="browser-message" class="uk-width-5-10 uk-navbar-content uk-padding-remove">
        <div id="layout-full-toggle" class="uk-button" role="button">
          <i class="uk-icon uk-icon-small uk-icon-angle-double-up"></i>
          <i class="uk-icon uk-icon-small uk-icon-angle-double-down"></i>
        </div>

        <ul class="uk-breadcrumb pathway uk-margin-remove">
          <li title="<?php echo Text::_('WF_LABEL_HOME', 'Home'); ?>">
            <i class="uk-icon uk-icon-spinner"></i>
            <i class="uk-icon uk-icon-home"></i>
          </li>
        </ul>
      </div>
      <div id="browser-actions" class="uk-width-5-10 uk-navbar-content uk-navbar-flip uk-text-right uk-padding-remove"></div>
    </nav>

    <main class="uk-grid uk-grid-collapse uk-width-1-1 uk-position-cover uk-flex">
      <div class="uk-width-3-10 uk-width-large-1-4 uk-hidden-small">
        <div class="uk-navbar">
          <div class="uk-navbar-content uk-width-1-1 uk-text-center">
            <?php echo Text::_('WF_LABEL_FOLDERS'); ?>
          </div>
        </div>
        <div id="browser-tree">
          <div id="tree-body" class="tree"></div>
        </div>
      </div>
      <div class="uk-flex-item-auto uk-width-4-10 uk-position-relative">
        <div class="uk-navbar">
          <div class="uk-navbar-content uk-width-1-1 uk-grid uk-grid-collapse uk-flex uk-padding-remove uk-position-relative" id="browser-list-actions">
            <!-- Check-All -->
            <button id="check-all" class="uk-width-0-10 uk-button uk-button-link" aria-label="Check All">
              <!--span class="checkbox" role="checkbox" aria-checked="false"></span-->
              <input type="checkbox" />
            </button>

            <!-- Sort Extension -->
            <button class="uk-width-1-10 uk-button uk-padding-remove uk-text-left" id="sort-ext" data-sort="extension" data-sort-type="extension" aria-label="<?php echo Text::_('WF_LABEL_EXTENSION'); ?>">
              <i class="uk-icon-sort-alpha-asc"></i>
              <i class="uk-icon-sort-alpha-desc"></i>
            </button>

            <!-- Sort Name -->
            <button class="uk-flex-item-auto uk-button uk-padding-remove uk-text-left" id="sort-name" data-sort="name" data-sort-type="string" aria-labelledby="sort-name-label">
              <i class="uk-icon-sort-alpha-asc"></i>
              <i class="uk-icon-sort-alpha-desc"></i>
              <label id="sort-name-label" for="sort-name">&nbsp;<?php echo Text::_('WF_LABEL_NAME'); ?></label>
            </button>

            <!-- Sort Date -->
            <button class="uk-width-2-10 uk-button uk-padding-remove uk-text-left uk-hidden-mini" id="sort-date" data-sort="modified" data-sort-type="date" aria-labelledby="sort-date-label" aria-hidden="true">
              <i class="uk-icon-sort-numeric-asc"></i>
              <i class="uk-icon-sort-numeric-desc"></i>
              <label id="sort-data-label" for="sort-date">&nbsp;<?php echo Text::_('WF_LABEL_DATE'); ?></label>
            </button>

            <!-- Sort Size -->
            <button class="uk-width-4-10 uk-button uk-text-left uk-hidden-mini" id="sort-size" data-sort="size" data-sort-type="number" aria-labelledby="sort-size-label" aria-hidden="true">
              <i class="uk-icon-sort-numeric-asc"></i>
              <i class="uk-icon-sort-numeric-desc"></i>
              <label id="sort-size-label" for="sort-size">&nbsp;<?php echo Text::_('WF_LABEL_SIZE'); ?></label>
            </button>

             <!-- Toggle Mode -->
             <button class="uk-button view-mode" id="view-mode" aria-label="View Mode"><i class="uk-icon-list"></i><i class="uk-icon-grid"></i></button>
              <!-- Toggle Details -->
              <button class="uk-button uk-active" id="show-details" aria-label="Toggle Details">
                <i class="uk-icon-columns details"></i>
              </button>
              <!-- Search -->
              <button class="uk-button" id="show-search" aria-label="Search">
                <i class="uk-icon-search"></i>
              </button>

            <div id="searchbox" class="uk-form-icon uk-form-icon-flip uk-hidden uk-flex-item-auto uk-position-absolute uk-position-top" role="popup">
              <input type="search" id="search" class="uk-width-1-1" autocomplete="off" spellcheck="false" autocapitalize="off" />
              <i class="uk-icon uk-icon-cross uk-icon-small"></i>
            </div>
          </div>
        </div>

        <div class="uk-flex uk-flex-nowrap">
          <div class="folder-up uk-flex-1 uk-width-1-1 uk-margin-right" title="<?php echo Text::_('WF_LABEL_FOLDER_UP'); ?>">
            <button class="uk-button uk-button-link uk-width-1-1 uk-text-left uk-padding-remove" aria-label="Up"><i class="uk-width-1-10 uk-icon uk-icon-undo uk-icon-folder-up"></i>...</button>
          </div>
          <div class="grid-size uk-flex" title="<?php echo Text::_('WF_LABEL_GRID_SIZE'); ?>">
            <button class="grid-size-plus uk-button uk-button-link uk-width-1-1 uk-text-left uk-padding-remove" aria-label="<?php echo Text::_('WF_LABEL_GRID_SIZE_INCREASE'); ?>"><i class="uk-width-1-10 uk-icon uk-icon-plus-circle"></i></button>
            <button class="grid-size-minus uk-button uk-button-link uk-width-1-1 uk-text-left uk-padding-remove" aria-label="<?php echo Text::_('WF_LABEL_GRID_SIZE_DECREASE'); ?>"><i class="uk-width-1-10 uk-icon uk-icon-minus-circle"></i></button>
          </div>
        </div>  

        <div id="browser-list"></div>

        <div id="browser-list-limit" class="uk-navbar">
          <div class="uk-width-1-1 uk-grid uk-grid-collapse">
            <ul class="limit-left uk-pagination uk-pagination-left uk-width-1-4">
              <li class="limit-left-end uk-invisible" role="button">
                <a href=""><i class="uk-icon-first"></i></a>
              </li>
              <li class="limit-left uk-invisible" role="button">
                <a href=""><i class="uk-icon-backward"></i></a>
              </li>
            </ul>
            <div class="limit-text uk-navbar-content uk-width-2-4">

              <?php if (count((array) $this->list_limit_options)) : ?>
                <label for="browser-list-limit-select" class="uk-margin-small-right">
                  <?php echo Text::_('WF_LABEL_SHOW'); ?>
                </label>
                <select id="browser-list-limit-select">

                <?php foreach ($this->list_limit_options as $value) : ?>
                  <option value="<?php echo $value; ?>" <?php echo $value == $this->list_limit ? 'selected="selected"' : ''; ?>>
                    <?php echo $value ? $value : Text::_('WF_OPTION_ALL'); ?>
                  </option>
                <?php endforeach; ?>

              </select>

              <?php endif; ?>
            </div>
            <ul class="limit-right uk-pagination uk-pagination-right uk-width-1-4">
              <li class="limit-right uk-invisible" role="button">
                <a href=""><i class="uk-icon-forward"></i></a>
              </li>
              <li class="limit-right-end uk-invisible" role="button">
                <a href=""><i class="uk-icon-last"></i></a>
              </li>
            </ul>
          </div>
        </div>

      </div>

      <div class="uk-width-2-10 uk-position-relative uk-hidden-small">
        <div class="uk-navbar">
          <div class="uk-navbar-content uk-width-1-1 uk-text-center">
            <?php echo Text::_('WF_LABEL_DETAILS'); ?>
          </div>
        </div>
        <div id="browser-details-container" class="uk-grid uk-grid-collapse uk-flex uk-height-1-1">
          <div id="browser-details" class="uk-width-8-10 uk-flex-item-auto uk-height-1-1">
            <div id="browser-details-text" class="uk-height-1-1"></div>
            <div id="browser-details-comment"></div>
          </div>
        </div>
        <div id="browser-details-nav" class="uk-navbar">
          <div class="uk-navbar-content uk-width-1-1 uk-padding-remove">
            <ul class="uk-pagination uk-width-1-1 uk-display-block uk-align-left">
              <li class="details-nav-left uk-pagination-previous uk-invisible uk-width-1-10" role="button">
                <a href=""><i class="uk-icon-backward"></i></a>
              </li>
              <li class="uk-navbar-center details-nav-text uk-width-7-10"></li>
              <li class="details-nav-right uk-pagination-next uk-invisible uk-width-1-10" role="button">
                <a href=""><i class="uk-icon-forward"></i></a>
              </li>
            </ul>
          </div>
        </div>
      </div>

      <div id="browser-buttons" class="uk-text-center">
        <div class="uk-navbar uk-width-1-1" role="presentation">
          <div class="uk-navbar-content"></div>
        </div>
      </div>
  </div>
  </main>
  <input type="hidden" name="<?php echo Session::getFormToken(); ?>" value="1" />
</form>libraries/views/filebrowser/tmpl/index.html000060400000000054152455721620015155 0ustar00<html><body bgcolor="#FFFFFF"></body></html>libraries/views/index.html000060400000000054152455721620011656 0ustar00<html><body bgcolor="#FFFFFF"></body></html>libraries/views/search/index.html000060400000000054152455721620013123 0ustar00<html><body bgcolor="#FFFFFF"></body></html>libraries/views/search/tmpl/index.html000060400000000054152455721620014077 0ustar00<html><body bgcolor="#FFFFFF"></body></html>libraries/views/search/tmpl/search.php000060400000005100152455721620014055 0ustar00<?php
/**
 * @package     JCE
 * @subpackage  Editor
 *
 * @copyright   Copyright (C) 2005 - 2020 Open Source Matters, Inc. All rights reserved.
 * @copyright   Copyright (c) 2009-2024 Ryan Demmer. All rights reserved
 * @license     GNU General Public License version 2 or later; see LICENSE.txt
 */

\defined('_JEXEC') or die;

use Joomla\CMS\Language\Text;
?>
<div id="search-browser" class="uk-width-1-1">
    <div class="uk-grid uk-grid-collapse">
        <div id="searchbox" class="uk-form-icon uk-form-icon-flip uk-width-3-4">
            <input type="text" id="search-input" class="uk-width-1-1" aria-label="<?php echo Text::_('WF_LABEL_SEARCH'); ?>" placeholder="<?php echo Text::_('WF_LABEL_SEARCH'); ?>..." />
            <i class="uk-icon uk-icon-close" id="search-clear"></i>
            <i class="uk-icon uk-icon-spinner"></i>
        </div>

        <div class="uk-button-group uk-width-1-4">
            <button class="uk-button uk-width-2-3 uk-width-mini-1-2" id="search-button"><label class="uk-form-label"><?php echo Text::_('WF_LABEL_SEARCH'); ?></label></button>
            <button class="uk-button uk-width-1-3 uk-width-mini-1-2" id="search-options-button" title="<?php echo Text::_('WF_LABEL_SEARCH_OPTIONS'); ?>" aria-label="<?php echo Text::_('WF_LABEL_SEARCH_OPTIONS'); ?>" aria-haspopup="true"><i class="uk-icon uk-icon-cog"></i></button>
        </div>
    </div>

    <div id="search-options" class="uk-dropdown uk-width-1-1">
        <fieldset class="phrases">
            <legend><?php echo Text::_('WF_SEARCH_FOR'); ?>
            </legend>
            <div class="phrases-box">
                <?php echo $this->lists['searchphrase']; ?>
            </div>
            <div class="ordering-box">
                <label for="ordering" class="ordering">
                    <?php echo Text::_('WF_SEARCH_ORDERING'); ?>
                </label>
                <?php echo $this->lists['ordering']; ?>
            </div>
        </fieldset>
        <fieldset class="search_only">
            <legend><?php echo Text::_('WF_SEARCH_SEARCH_ONLY'); ?></legend>
            <ul>
            <?php
foreach ($this->searchareas as $val => $txt):
?>
                <li>
                    <input type="checkbox" name="areas[]" value="<?php echo $val; ?>" id="area-<?php echo $val; ?>" />
                <label for="area-<?php echo $val; ?>">
                    <?php echo Text::_($txt); ?>
                </label>
                </li>
            <?php endforeach;?>
            </ul>
        </fieldset>
    </div>

    <div id="search-result" class="uk-dropdown uk-padding-remove"></div>
</div>
libraries/views/links/tmpl/links.php000060400000000666152455721620013617 0ustar00<?php
/**
 * @package     JCE
 * @subpackage  Editor
 *
 * @copyright   Copyright (C) 2005 - 2020 Open Source Matters, Inc. All rights reserved.
 * @copyright   Copyright (c) 2009-2024 Ryan Demmer. All rights reserved
 * @license     GNU General Public License version 2 or later; see LICENSE.txt
 */

\defined('_JEXEC') or die;

?>
<div id="link-browser" class="tree">
    <ul class="uk-tree-root"><?php echo $this->list; ?></ul>
</div>
libraries/views/links/tmpl/index.html000060400000000054152455721620013752 0ustar00<html><body bgcolor="#FFFFFF"></body></html>libraries/views/links/index.html000060400000000054152455721620012776 0ustar00<html><body bgcolor="#FFFFFF"></body></html>libraries/xml/index.html000060400000000054152455721620011321 0ustar00<html><body bgcolor="#FFFFFF"></body></html>libraries/xml/config/editor.xml000060400000010540152455721620012602 0ustar00<?xml version="1.0" encoding="utf-8"?>
<config>
	<params group="cleanup">
		<param name="verify_html" type="radio" default="1" label="WF_PARAM_CLEANUP" description="WF_PARAM_CLEANUP_DESC">
			<option value="1">WF_OPTION_YES</option>
			<option value="0">WF_OPTION_NO</option>
		</param>
		<param name="schema" type="list" default="mixed" label="WF_PARAM_DOCTYPE" description="WF_PARAM_DOCTYPE_DESC">
			<option value="mixed">WF_PARAM_DOCTYPE_MIXED</option>
			<option value="html4">HTML4</option>
			<option value="html5">HTML5</option>
		</param>
		<param name="entity_encoding" type="list" default="raw" label="WF_PARAM_ENTITY_ENCODING" description="WF_PARAM_ENTITY_ENCODING_DESC">
			<option value="raw">UTF-8</option>
			<option value="named">WF_PARAM_NAMED</option>
			<option value="numeric">WF_PARAM_NUMERIC</option>
		</param>
		<param name="keep_nbsp" type="radio" default="1" label="WF_PARAM_KEEP_NBSP" description="WF_PARAM_KEEP_NBSP_DESC" parent="entity_encoding[raw]">
			<option value="1">WF_OPTION_YES</option>
			<option value="0">WF_OPTION_NO</option>
		</param>
		<param name="pad_empty_tags" type="radio" default="1" label="WF_PARAM_PAD_EMPTY_TAGS" description="WF_PARAM_PAD_EMPTY_TAGS_DESC">
			<option value="1">WF_OPTION_YES</option>
			<option value="0">WF_OPTION_NO</option>
		</param>
		<param name="cleanup_pluginmode" type="radio" default="0" label="WF_PARAM_PLUGIN_MODE" description="WF_PARAM_PLUGIN_MODE_DESC">
			<option value="1">WF_OPTION_YES</option>
			<option value="0">WF_OPTION_NO</option>
		</param>
	</params>
	<params group="format">
		<param name="forced_root_block" type="list" default="p" label="WF_PARAM_ROOT_BLOCK" description="WF_PARAM_ROOT_BLOCK_DESC">
			<option value="p">WF_OPTION_PARAGRAPH</option>
			<option value="div">WF_OPTION_DIV</option>
			<option value="forced_root_block:0|force_p_newlines:1">WF_OPTION_PARAGRAPH_MIXED</option>
			<option value="0">WF_OPTION_LINEBREAK</option>
		</param>
		<!--param name="newlines" type="list" default="0" label="WF_PARAM_NEWLINES" description="WF_PARAM_NEWLINES_DESC"><option value="1">WF_PARAM_LINEBREAKS</option><option value="0">WF_PARAM_PARAGRAPHS</option></param-->
		<param name="content_style_reset" type="radio" default="0" label="WF_PARAM_EDITOR_STYLE_RESET" description="WF_PARAM_EDITOR_STYLE_RESET_DESC">
			<option value="1">WF_OPTION_YES</option>
			<option value="0">WF_OPTION_NO</option>
		</param>
		<param name="content_css" type="list" default="1" label="WF_PARAM_EDITOR_GLOBAL_CSS" description="WF_PARAM_EDITOR_GLOBAL_CSS_DESC">
			<option value="0">WF_PARAM_CSS_CUSTOM</option>
			<option value="1">WF_PARAM_CSS_TEMPLATE</option>
			<option value="2">WF_OPTION_DEFAULT</option>
		</param>
		<param name="content_css_custom" type="textarea" rows="2" cols="50" default="" spellcheck="false" placeholder="eg: templates/$template/css/content.css" label="WF_PARAM_CSS_CUSTOM" description="WF_PARAM_CSS_CUSTOM_DESC" parent="content_css[0]" />
		<param name="body_class" type="text" default="" placeholder="eg: content" label="WF_PARAM_EDITOR_BODY_CLASS" description="WF_PARAM_EDITOR_BODY_CLASS_DESC" />
	</params>
	<params group="compression">
		<param name="compress_javascript" type="radio" default="0" label="WF_PARAM_COMPRESS_JAVASCRIPT" description="WF_PARAM_COMPRESS_JAVASCRIPT_DESC">
			<option value="1">WF_OPTION_YES</option>
			<option value="0">WF_OPTION_NO</option>
		</param>
		<param name="compress_css" type="radio" default="0" label="WF_PARAM_COMPRESS_CSS" description="WF_PARAM_COMPRESS_CSS_DESC">
			<option value="1">WF_OPTION_YES</option>
			<option value="0">WF_OPTION_NO</option>
		</param>
		<param name="compress_gzip" type="radio" default="0" label="WF_PARAM_COMPRESS_GZIP" description="WF_PARAM_COMPRESS_GZIP_DESC">
			<option value="1">WF_OPTION_YES</option>
			<option value="0">WF_OPTION_NO</option>
		</param>
	</params>
	<params group="advanced">
		<param name="custom_config" type="textarea" rows="5" cols="50" default="" spellcheck="false" label="WF_PARAM_CUSTOM_CONFIG" description="WF_PARAM_CUSTOM_CONFIG_DESC" />
		<param name="callback_file" type="text" default="" size="50" label="WF_PARAM_CALLBACK" description="WF_PARAM_CALLBACK_DESC" />
	</params>
	<!--params group="other"><param name="help_url" type="text" size="80" default="http://www.joomlacontenteditor.net/index.php?option=com_content&amp;view=article" label="WF_PARAM_HELP_URL" description="WF_PARAM_HELP_URL_DESC" /></params-->
</config>libraries/xml/config/index.html000060400000000054152455721620012566 0ustar00<html><body bgcolor="#FFFFFF"></body></html>libraries/xml/config/profiles.xml000060400000020402152455721620013135 0ustar00<?xml version="1.0" encoding="UTF-8"?>
<config>
    <params group="setup">
        <!-- URLS -->
        <param name="relative_urls" type="radio" default="1" label="WF_PARAM_RELATIVE" description="WF_PARAM_RELATIVE_DESC">
            <option value="1">WF_OPTION_YES</option>
            <option value="0">WF_OPTION_NO</option>
        </param>
        <param name="verify_html" type="list" default="" label="WF_PARAM_CLEANUP" description="WF_PARAM_EDITOR_PROFILE_CLEANUP_DESC">
            <option value="">WF_OPTION_INHERIT</option>
            <option value="0">WF_OPTION_NO</option>
            <option value="1">WF_OPTION_YES</option>
        </param>
        <param name="schema" type="list" default="" label="WF_PARAM_DOCTYPE" description="WF_PARAM_EDITOR_PROFILE_DOCTYPE_DESC">
            <option value="">WF_OPTION_INHERIT</option>
            <option value="mixed">WF_PARAM_DOCTYPE_MIXED</option>
            <option value="html4">HTML4</option>
            <option value="html5">HTML5</option>
        </param>
    </params>
    <params group="typography">
        <param name="forced_root_block" type="list" default="" label="WF_PARAM_ROOT_BLOCK" description="WF_PARAM_EDITOR_PROFILE_ROOT_BLOCK_DESC">
            <option value="">WF_OPTION_INHERIT</option>
            <option value="p">WF_OPTION_PARAGRAPH</option>
            <option value="div">WF_OPTION_DIV</option>
            <option value="forced_root_block:0|force_p_newlines:1">WF_OPTION_PARAGRAPH_MIXED</option>
            <option value="0">WF_OPTION_LINEBREAK</option>
        </param>
        <param name="profile_content_css" type="list" default="2" label="WF_PARAM_EDITOR_PROFILE_CSS" description="WF_PARAM_EDITOR_PROFILE_CSS_DESC">
            <option value="0">WF_PARAM_CSS_ADD</option>
            <option value="1">WF_PARAM_CSS_OVERWRITE</option>
            <option value="2">WF_PARAM_CSS_INHERIT</option>
        </param>
        <param name="profile_content_css_custom" placeholder="eg: templates/$template/css/content.css" type="textarea" rows="2" cols="55" default="" label="WF_PARAM_CSS_CUSTOM" description="WF_PARAM_CSS_CUSTOM_DESC" parent="profile_content_css[0,1]" />
        <param name="custom_colors" type="textarea" rows="3" cols="50" default="" label="WF_PARAM_CUSTOM_COLORS" description="WF_PARAM_CUSTOM_COLORS_DESC" placeholder="eg: #CC0000,#FF0000" />
    </params>
    <params group="filesystem">
		<!-- Plugin parameters -->
        <param name="dir" type="text" default="" pattern="[a-zA-Z0-9_\-\.\/\$]*" size="50" placeholder="images" label="WF_PARAM_DIRECTORY" description="WF_PARAM_DIRECTORY_DESC"/>
        <param name="dir_filter" type="text" repeatable="1" default="" size="50" label="WF_PARAM_DIRECTORY_FILTER" description="WF_PARAM_DIRECTORY_FILTER_DESC"/>

        <param name="name" type="filesystem" group="filesystem" exclude_default="true" default="joomla" label="WF_PARAM_FILESYSTEM" description="WF_PARAM_FILESYSTEM_DESC" />
        <param name="max_size" class="upload_size" pattern="[0-9]*" placeholder="1024" max="" type="text" default="" label="WF_PARAM_UPLOAD_SIZE" description="WF_PARAM_UPLOAD_SIZE_DESC" />
        <param name="upload_conflict" type="list" default="overwrite" label="WF_PARAM_UPLOAD_EXISTS" description="WF_PARAM_UPLOAD_EXISTS_DESC">
            <option value="unique">WF_PARAM_UPLOAD_EXISTS_UNIQUE</option>
            <option value="overwrite">WF_PARAM_UPLOAD_EXISTS_OVERWRITE</option>
        </param>
        <param name="upload_suffix" placeholder="_copy" max="" type="text" default="" label="WF_PARAM_UPLOAD_SUFFIX" description="WF_PARAM_UPLOAD_SUFFIX_DESC" parent="upload_conflict[unique]" />
        
        <param name="browser_position" type="list" default="bottom" label="WF_PARAM_BROWSER_POSITION" description="WF_PARAM_BROWSER_POSITION_DESC">
            <option value="top">WF_LABEL_TOP</option>
            <option value="bottom">WF_LABEL_BOTTOM</option>
        </param>
        <param name="folder_tree" type="radio" default="1" label="WF_PARAM_FOLDER_TREE" description="WF_PARAM_FOLDER_TREE_DESC">
            <option value="1">WF_OPTION_YES</option>
            <option value="0">WF_OPTION_NO</option>
        </param>
        <param name="list_limit" type="list" default="all" label="WF_PARAM_LIST_LIMIT" description="WF_PARAM_LIST_LIMIT_DESC">
            <option value="10">10</option>
            <option value="25">25</option>
            <option value="50">50</option>
            <option value="100">100</option>
            <option value="all">WF_OPTION_ALL</option>
        </param>
        <param name="validate_mimetype" type="radio" default="1" label="WF_PARAM_VALIDATE_MIMETYPE" description="WF_PARAM_VALIDATE_MIMETYPE_DESC">
            <option value="1">WF_OPTION_YES</option>
            <option value="0">WF_OPTION_NO</option>
        </param>
        <param name="websafe_mode" type="list" default="utf-8" label="WF_PARAM_WEBSAFE_MODE" description="WF_PARAM_WEBSAFE_MODE_DESC">
            <option value="utf-8">UTF-8</option>
            <option value="ascii">ASCII</option>
        </param>
        <param name="websafe_allow_spaces" type="list" default="_" label="WF_PARAM_WEBSAFE_ALLOW_SPACES" description="WF_PARAM_WEBSAFE_ALLOW_SPACES_DESC">
            <option value="1">WF_OPTION_YES</option>
            <option value="_">WF_OPTION_WEBSAFE_ALLOW_SPACES_UNDERSCORE</option>
            <option value="-">WF_OPTION_WEBSAFE_ALLOW_SPACES_DASH</option>
            <option value=".">WF_OPTION_WEBSAFE_ALLOW_SPACES_PERIOD</option>
        </param>
        <param name="websafe_textcase" type="list" class="checklist" multiple="multiple" default="uppercase,lowercase" label="WF_PARAM_WEBSAFE_TEXTCASE" description="WF_PARAM_WEBSAFE_TEXTCASE_DESC">
            <option value="uppercase">WF_OPTION_UPPERCASE</option>
            <option value="lowercase">WF_OPTION_LOWERCASE</option>
        </param>
        <param name="upload_add_random" type="radio" default="0" label="WF_PARAM_UPLOAD_ADD_RANDOM" description="WF_PARAM_UPLOAD_ADD_RANDOM_DESC">
            <option value="1">WF_OPTION_YES</option>
            <option value="0">WF_OPTION_NO</option>
        </param>
        <param name="date_format" type="text" default="" placeholder="eg: %d/%m/%Y, %H:%M" label="WF_PARAM_DATE_FORMAT" description="WF_PARAM_DATE_FORMAT_DESC" />
        <param name="total_files" type="text" pattern="[0-9]*" default="" label="WF_PARAM_TOTAL_FILES_LIMIT" description="WF_PARAM_TOTAL_FILES_LIMIT_DESC" />
        <param name="total_size" type="text" pattern="[0-9]*" default="" label="WF_PARAM_TOTAL_FILES_SIZE_LIMIT" description="WF_PARAM_TOTAL_FILES_SIZE_LIMIT_DESC" />

        <param file="components/com_jce/editor/libraries/pro/xml/image.xml" />

    </params>

    <params group="advanced">
	<!-- Elements -->
        <param name="invalid_elements" type="text" size="50" default="" label="WF_PARAM_NO_ELEMENTS" description="WF_PARAM_NO_ELEMENTS_DESC" />
        <param name="invalid_attributes" type="text" size="50" default="dynsrc,lowsrc" label="WF_PARAM_INVALID_ATTRIBUTES" description="WF_PARAM_INVALID_ATTRIBUTES_DESC" />
        <param name="invalid_attribute_values" type="text" size="50" default="" label="WF_PARAM_INVALID_ATTRIBUTE_VALUES" description="WF_PARAM_INVALID_ATTRIBUTE_VALUES_DESC" />
        <param name="extended_elements" type="textarea" rows="2" cols="46" default="" label="WF_PARAM_ELEMENTS" description="WF_PARAM_ELEMENTS_DESC" />
        <param name="allow_javascript" type="radio" default="0" label="WF_PARAM_JAVASCRIPT" description="WF_PARAM_JAVASCRIPT_DESC">
            <option value="1">WF_OPTION_YES</option>
            <option value="0">WF_OPTION_NO</option>
        </param>
        <param name="allow_css" type="radio" default="0" label="WF_PARAM_CSS" description="WF_PARAM_CSS_DESC">
            <option value="1">WF_OPTION_YES</option>
            <option value="0">WF_OPTION_NO</option>
        </param>
        <param name="allow_php" type="radio" default="0" label="WF_PARAM_PHP" description="WF_PARAM_PHP_DESC">
            <option value="1">WF_OPTION_YES</option>
            <option value="0">WF_OPTION_NO</option>
        </param>

        <!--param name="protect_shortcode" type="radio" default="0" label="WF_PARAM_PROTECT_SHORTCODE" description="WF_PARAM_PROTECT_SHORTCODE_DESC">
            <option value="1">WF_OPTION_YES</option>
            <option value="0">WF_OPTION_NO</option>
        </param-->

    </params>
</config>
libraries/xml/config/layout.xml000060400000010761152455721620012636 0ustar00<?xml version="1.0" encoding="UTF-8"?>
<config>
    <params group="layout">
        <param name="width" type="text" size="5" default="" pattern="([0-9]+)(%|px)?" placeholder="auto" label="WF_PARAM_EDITOR_WIDTH" description="WF_PARAM_EDITOR_WIDTH_DESC" />
        <param name="height" type="text" size="5" default="" pattern="([0-9]+)(%|px)?" placeholder="auto" label="WF_PARAM_EDITOR_HEIGHT" description="WF_PARAM_EDITOR_HEIGHT_DESC" />
		<!--param name="theme_advanced_toolbar_location" type="list" default="top" label="WF_PARAM_TOOLBAR_LOCATION" description="WF_PARAM_TOOLBAR_LOCATION_DESC">
			<option value="top">JWF_OPTION_TOP</option>
			<option value="bottom">WF_OPTION_BOTTOM</option>
			<option value="external">WF_OPTION_EXTERNAL</option>
		</param-->
        <param name="toolbar_theme" type="list" default="default" label="WF_PARAM_EDITOR_TOOLBAR_THEME" description="WF_PARAM_EDITOR_TOOLBAR_THEME_DESC">
            <option value="default">WF_LABEL_DEFAULT</option>
            <option value="o2k7">WF_PARAM_EDITOR_SKIN_OFFICE_BLUE</option>
            <option value="o2k7.silver">WF_PARAM_EDITOR_SKIN_OFFICE_SILVER</option>
            <option value="o2k7.black">WF_PARAM_EDITOR_SKIN_OFFICE_BLACK</option>
            <option value="mobile">WF_PARAM_EDITOR_SKIN_MOBILE</option>
        </param>
        <param name="toolbar_align" type="list" default="left" label="WF_PARAM_EDITOR_TOOLBAR_ALIGN" description="WF_PARAM_EDITOR_TOOLBAR_ALIGN_DESC">
            <option value="left">WF_OPTION_LEFT</option>
            <option value="center">WF_OPTION_CENTER</option>
            <option value="right">WF_OPTION_RIGHT</option>
        </param>
        <param name="toolbar_location" type="list" default="top" label="WF_PARAM_EDITOR_TOOLBAR_LOCATION" description="WF_PARAM_EDITOR_TOOLBAR_LOCATION_DESC">
            <option value="top">WF_OPTION_TOP</option>
            <option value="bottom">WF_OPTION_BOTTOM</option>
        </param>
        <param name="statusbar_location" type="list" default="bottom" label="WF_PARAM_EDITOR_STATUSBAR_LOCATION" description="WF_PARAM_EDITOR_STATUSBAR_LOCATION_DESC">
            <option value="top">WF_OPTION_TOP</option>
            <option value="bottom">WF_OPTION_BOTTOM</option>
            <option value="none">WF_OPTION_NONE</option>
        </param>
        <param name="path" type="radio" default="1" label="WF_PARAM_EDITOR_PATH" description="WF_PARAM_EDITOR_PATH_DESC" parent="statusbar_location[top,bottom]">
            <option value="1">WF_OPTION_YES</option>
            <option value="0">WF_OPTION_NO</option>
        </param>
        <param name="resizing" type="list" default="1" label="WF_PARAM_EDITOR_RESIZING" description="WF_PARAM_EDITOR_RESIZING_DESC" parent="statusbar_location[top,bottom]">
            <option value="1">WF_OPTION_YES</option>
            <option value="0">WF_OPTION_NO</option>
        </param>
        <param name="resize_horizontal" type="radio" default="1" label="WF_PARAM_EDITOR_RESIZE_HORIZONTAL" description="WF_PARAM_EDITOR_RESIZE_HORIZONTAL_DESC" parent="resizing[1]">
            <option value="1">WF_OPTION_YES</option>
            <option value="0">WF_OPTION_NO</option>
        </param>
        <param name="resizing_use_cookie" type="radio" default="1" label="WF_PARAM_EDITOR_RESIZE_COOKIE" description="WF_PARAM_EDITOR_RESIZE_COOKIE_DESC" parent="resizing[1]">
            <option value="1">WF_OPTION_YES</option>
            <option value="0">WF_OPTION_NO</option>
        </param>
        <param name="toggle" type="list" default="1" label="WF_PARAM_EDITOR_TOGGLE" description="WF_PARAM_EDITOR_TOGGLE_DESC">
            <option value="1">WF_OPTION_YES</option>
            <option value="0">WF_OPTION_NO</option>
        </param>
        <param name="toggle_state" type="radio" default="1" label="WF_PARAM_EDITOR_STATE" description="WF_PARAM_EDITOR_STATE_DESC" parent="toggle[1]">
            <option value="1">WF_OPTION_ON</option>
            <option value="0">WF_OPTION_OFF</option>
        </param>
        <param name="toggle_label" type="text" default="" label="WF_PARAM_EDITOR_TOGGLE_LABEL" description="WF_PARAM_EDITOR_TOGGLE_LABEL_DESC" parent="toggle[1]" />
        <param name="active_tab" type="list" default="wysiwyg" label="WF_PARAM_EDITOR_ACTIVE_TAB" description="WF_PARAM_EDITOR_ACTIVE_TAB_DESC">
            <option value="wysiwyg">WF_PARAM_EDITOR_ACTIVE_TAB_WYSIWYG</option>
            <option value="source">WF_PARAM_EDITOR_ACTIVE_TAB_CODE</option>
            <option value="preview">WF_PARAM_EDITOR_ACTIVE_TAB_PREVIEW</option>
        </param>
    </params>
</config>
libraries/xml/config/popups.xml000060400000000554152455721620012646 0ustar00<?xml version="1.0" encoding="UTF-8"?>
<extension>
    <fields>
        <fieldset name="popups">
            <field type="popups" name="default" label="WF_EXTENSIONS_POPUPS_DEFAULT_LABEL" description="WF_EXTENSIONS_POPUPS_DEFAULT_DESC">
                <option value="">WF_OPTION_NOT_SET</option>
            </field>
        </fieldset>
    </fields>
</extension>libraries/xml/help/index.html000060400000000054152455721620012251 0ustar00<html><body bgcolor="#FFFFFF"></body></html>libraries/xml/help/editor.xml000060400000003253152455721620012270 0ustar00<?xml version="1.0"?>
<editor>
	<help>
		<topic key="editor.about" title="WF_EDITOR_HELP_ABOUT">
			<subtopic key="editor.toolbar" title="WF_EDITOR_HELP_TOOLBAR" />
			<subtopic key="editor.content" title="WF_EDITOR_HELP_CONTENT" />
			<subtopic key="editor.path" title="WF_EDITOR_HELP_PATH" />
		</topic>
		<topic title="WF_EDITOR_HELP_BASICS">
			<subtopic key="editor.selection" title="WF_EDITOR_HELP_SELECTION" />
			<subtopic key="editor.format" title="WF_EDITOR_HELP_FORMAT">
				<subtopic key="editor.format.bold" title="WF_EDITOR_HELP_FORMAT_BOLD" />
				<subtopic key="editor.format.align" title="WF_EDITOR_HELP_FORMAT_ALIGN" />
				<subtopic key="editor.format.blocks" title="WF_EDITOR_HELP_FORMAT_BLOCKS" />
				<subtopic key="editor.format.sub" title="WF_EDITOR_HELP_FORMAT_SUB" />
				<subtopic key="editor.format.font" title="WF_EDITOR_HELP_FORMAT_FONT" />
				<subtopic key="editor.format.indent" title="WF_EDITOR_HELP_FORMAT_INDENT" />
				<subtopic key="editor.format.attributes" title="WF_EDITOR_HELP_FORMAT_ATTRIBUTES" />
			</subtopic>
			<subtopic key="editor.lists" title="WF_EDITOR_HELP_LISTS" />		
			<subtopic key="editor.readmore" title="WF_EDITOR_HELP_READMORE" />
			<subtopic key="link.insert" title="WF_EDITOR_HELP_LINKS" />
			<subtopic key="imgmanager.insert" title="WF_EDITOR_HELP_IMAGES" />
			<subtopic key="paste.about" title="WF_EDITOR_HELP_PASTE" />
			<subtopic key="tables.edit" title="WF_EDITOR_HELP_TABLES" />
			<subtopic key="editor.spellchecker" title="WF_EDITOR_HELP_SPELLCHECKER" />
		</topic>
		<topic key="editor.acknowledgements" title="WF_EDITOR_HELP_ACKNOWLEDGEMENTS" />
		<topic key="editor.licence" title="WF_EDITOR_HELP_LICENCE" />
	</help>
</editor>

libraries/xml/help/manager.xml000060400000000473152455721620012415 0ustar00<?xml version="1.0"?>
<manager>
	<help>
		<topic key="manager.upload" title="WF_MANAGER_HELP_UPLOAD" />
		<topic key="manager.delete" title="WF_MANAGER_HELP_DELETE" />
		<topic key="manager.rename" title="WF_MANAGER_HELP_RENAME" />
		<topic key="manager.create" title="WF_MANAGER_HELP_CREATE" />
	</help>
</manager>libraries/index.html000060400000000054152455721620010521 0ustar00<html><body bgcolor="#FFFFFF"></body></html>css/plugin.min.css000060400000141501152456167170010142 0ustar00@import url(../vendor/uikit/uikit.min.css);@import url(../vendor/jquery/css/jquery-ui.min.css);.uk-close:after,[class*=uk-icon-],html{-moz-osx-font-smoothing:grayscale;-webkit-font-smoothing:antialiased}@font-face{font-family:wfeditor;src:url(../fonts/wfeditor.woff) format('woff');font-weight:400;font-style:normal}.uk-close:after,[class*=uk-icon-]{font-family:wfeditor;font-style:normal;font-weight:400;font-variant:normal;text-transform:none;line-height:1;font-size:1rem;vertical-align:middle}.uk-icon-bold:before,.uk-icon-italic:before,.uk-icon-strikethrough:before,.uk-icon-underline:before{font-family:"times new roman,times";line-height:1.25rem}.uk-icon-xsmall{font-size:.5rem}.uk-icon-strikethrough:before{content:"S";font-size:1.25rem;text-decoration:line-through}.uk-icon-underline:before{content:"U";text-decoration:underline;font-size:1.25rem}.uk-icon-bold:before{content:"B";font-weight:800;font-size:1.25rem}.uk-icon-italic:before{content:"I";font-style:italic;font-size:1.25rem}.mce-toolbar .uk-icon-backcolor,.mce-toolbar .uk-icon-forecolor{line-height:1em}.uk-icon-backcolor:before,.uk-icon-forecolor:before{content:"A";font-family:"Helvetica Neue",Helvetica,Arial,sans-serif;font-size:1rem;font-weight:700}.uk-icon-selectall::before{content:"";padding:.5rem;display:inline-block;background-color:#eee;border:1px dashed #aaa}.uk-icon-style:after,.uk-icon-style:before{content:"A";font-weight:700}.uk-icon-style{position:relative}.uk-icon-style:before{font-family:"Helvetica Neue",Helvetica,Arial,sans-serif;font-size:.75em;position:absolute;top:0;left:0}.uk-icon-style:after{font-family:georgia,palatino,serif;font-size:1.25em;color:#666;font-style:italic;position:absolute;right:0;bottom:0}.uk-icon-code-search-matchcase:before,.uk-icon-code-search-regex:before,.uk-icon-code-search-wholeword:before{font-family:Tahoma,Arial,sans-serif;font-size:14px;line-height:1}.uk-icon-visualblocks:before{content:"P";font-size:.625rem;position:absolute;top:.375rem;left:.375rem;border:1px dashed #444;width:.75rem;height:.75rem;text-align:left;padding:.125rem;line-height:.5rem;color:#444;font-weight:700}.uk-icon-hashtag:before{content:"#";font-family:Tahoma,Arial,sans-serif;font-weight:700;line-height:2em}.uk-icon-microdata:before{content:"\ec1b"}.uk-icon-iframe:before{content:"\ead6"}.uk-icon-arrow-up:before{content:"\edcc"}.uk-icon-arrow-down:before{content:"\edd0"}.uk-icon-columns:before{content:"\e900"}.uk-icon-checkbox:before{content:"\e033"}.uk-icon-file-text:before,.uk-icon-file:before,.uk-icon-filemanager:before,.uk-icon-files:before{content:"\e9ad"}.uk-icon-file-aiff:before,.uk-icon-file-audio:before,.uk-icon-file-mp3:before,.uk-icon-file-oga:before,.uk-icon-file-wav:before,.uk-icon-file-wma:before{content:"\e9b1"}.uk-icon-file-avi:before,.uk-icon-file-m4v:before,.uk-icon-file-mov:before,.uk-icon-file-mp4:before,.uk-icon-file-ogg:before,.uk-icon-file-ogv:before,.uk-icon-file-video:before,.uk-icon-file-webm:before{content:"\e9b5"}.uk-icon-email:before{content:"\ea32"}.uk-icon-backward:before{content:"\ed88"}.uk-icon-forward:before{content:"\ed89"}.uk-icon-first:before{content:"\ed8a"}.uk-icon-last:before{content:"\ed8b"}.uk-icon-sort-alpha-asc:before{content:"\ee4c"}.uk-icon-sort-alpha-desc:before{content:"\ee4d"}.uk-icon-sort-numeric-asc:before{content:"\ee4e"}.uk-icon-sort-numeric-desc:before{content:"\ee4f"}.uk-icon-thumbnail-create:before,.uk-icon-thumbnail-delete:before,.uk-icon-thumbnail:before{content:"\e93e"}.uk-icon-upload:before{content:"\ec7f"}.uk-icon-star:before{content:"\ece2"}.uk-icon-remove:before{content:"\ed6d"}.uk-icon-remove-small:before{content:"\ed6e"}.uk-icon-folder-open:before{content:"\e930"}.uk-icon-home:before{content:"\e901"}.uk-icon-edit:before{content:"\e914"}.uk-icon-quill:before{content:"\e91b"}.uk-icon-image:before,.uk-icon-picture:before{content:"\e93c"}.uk-icon-file-media:before,.uk-icon-file-video:before,.uk-icon-film:before,.uk-icon-media:before{content:"\e95e"}.uk-icon-file-empty:before{content:"\e99d"}.uk-icon-file-plus:before{content:"\e9a1"}.uk-icon-file-apng:before,.uk-icon-file-avif:before,.uk-icon-file-bmp:before,.uk-icon-file-gif:before,.uk-icon-file-image:before,.uk-icon-file-jpeg:before,.uk-icon-file-jpg:before,.uk-icon-file-picture:before,.uk-icon-file-png:before,.uk-icon-file-svg:before,.uk-icon-file-tiff:before{content:"\e9af"}.uk-icon-file-gz:before,.uk-icon-file-rar:before,.uk-icon-file-tar:before,.uk-icon-file-zip:before{content:"\e9b9"}.uk-icon-file-xml:before{content:"\e9bb"}.uk-icon-file-ppt:before,.uk-icon-file-pptx:before,.uk-icon-file-presentation:before{content:"\e9bf"}.uk-icon-file-spreadsheet:before,.uk-icon-file-xls:before,.uk-icon-file-xlsx:before{content:"\e9c5"}.uk-icon-copy:before{content:"\e9c7"}.uk-icon-paste:before{content:"\e9ca"}.uk-icon-pastetext:before{content:"\e9cb"}.uk-icon-folder:before{content:"\e9db"}.uk-icon-folder-plus:before{content:"\e9df"}.uk-icon-print:before{content:"\ea66"}.uk-icon-undo:before{content:"\eabc"}.uk-icon-redo:before{content:"\eabd"}.uk-icon-blockquote:before{content:"\eb18"}.uk-icon-searchreplace:before{content:"\eb2b"}.uk-icon-search:before{content:"\eb33"}.uk-icon-fullscreen:before{content:"\eb3b"}.uk-icon-cog:before,.uk-icon-gear:before{content:"\eb63"}.uk-icon-cleanup:before{content:"\ebf8"}.uk-icon-trash:before{content:"\ebfa"}.uk-icon-numlist:before{content:"\ec55"}.uk-icon-bullist:before{content:"\ec57"}.uk-icon-grid:before{content:"\ec5f"}.uk-icon-list:before{content:"\ec6a"}.uk-icon-link:before{content:"\ec98"}.uk-icon-unlink:before{content:"\ec99"}.uk-icon-anchor:before{content:"\eca0"}.uk-icon-preview:before{content:"\ecb3"}.uk-icon-help:before{content:"\ed56"}.uk-icon-plus-circle:before{content:"\ed5c"}.uk-icon-minus-circle:before{content:"\ed5d"}.uk-close:after,.uk-icon-cancel:before,.uk-icon-close:before,.uk-icon-cross:before{content:"\ed69";font-size:.75em;line-height:1.25em}.uk-icon-check:before,.uk-icon-checkmark:before{content:"\ed6c"}.uk-icon-spellchecker:before{content:"\ed71"}.uk-icon-refresh:before{content:"\eda7"}.uk-icon-caret-up:before{content:"\edc4"}.uk-icon-caret-right:before{content:"\edc5"}.uk-icon-caret-down:before{content:"\edc6"}.uk-icon-caret-left:before{content:"\edc7"}.uk-icon-arrow-right:before{content:"\edcb"}.uk-icon-arrow-left:before{content:"\edcf"}.uk-icon-cut:before{content:"\ee83"}.uk-icon-charmap:before{content:"\ee9e"}.uk-icon-nonbreaking:before{content:"\eea0"}.uk-icon-readmore:before{content:"\eea2"}.uk-icon-superscript:before{content:"\eea3"}.uk-icon-subscript:before{content:"\eea4"}.uk-icon-pagebreak:before{content:"\eea9"}.uk-icon-removeformat:before{content:"\eeaa"}.uk-icon-template:before,.uk-icon-templatemanager:before{content:"\eead"}.uk-icon-visualchars:before{content:"\eeae"}.uk-icon-ltr:before{content:"\eeaf"}.uk-icon-rtl:before{content:"\eeb0"}.uk-icon-alignleft:before{content:"\eeb8"}.uk-icon-aligncenter:before{content:"\eeb9"}.uk-icon-alignright:before{content:"\eeba"}.uk-icon-alignjustify:before{content:"\eebb"}.uk-icon-indent:before{content:"\eebc"}.uk-icon-outdent:before{content:"\eebd"}.uk-icon-code:before{content:"\eeca"}.uk-icon-file-pdf:before{content:"\ef36"}.uk-icon-file-openoffice:before{content:"\ef37"}.uk-icon-file-word:before{content:"\ef38"}.uk-icon-file-excel:before{content:"\ef39"}.uk-icon-hr:before{content:"\e01c"}.uk-icon-emotions:before{content:"\e021"}.uk-icon-restoredraft:before{content:"\e028"}.uk-icon-resize:before{content:"\e032"}.uk-icon-table:before,.uk-icon-tableprops:before{content:"\e01b"}.uk-icon-tablerowprops:before{content:"\e604"}.uk-icon-tablecellprops:before{content:"\e605"}.uk-icon-table-2:before{content:"\e606"}.uk-icon-tablemergecells:before{content:"\e607"}.uk-icon-tableinsertcolbefore:before{content:"\e608"}.uk-icon-tableinsertcolafter:before{content:"\e609"}.uk-icon-tableinsertrowbefore:before{content:"\e60a"}.uk-icon-tableinsertrowafter:before{content:"\e60b"}.uk-icon-tablesplitcells:before{content:"\e60d"}.uk-icon-tabledelete:before{content:"\e60e"}.uk-icon-tableleftheader:before{content:"\e62a"}.uk-icon-tabletopheader:before{content:"\e62b"}.uk-icon-tabledeleterow:before{content:"\e800"}.uk-icon-tabledeletecol:before{content:"\e801"}.uk-icon-drag:before{content:"\e908"}.uk-icon-minus:before{content:"\e939"}.uk-icon-plus:before{content:"\e93a"}.uk-icon-rotateleft:before{content:"\eaa8"}.uk-icon-rotateright:before{content:"\eaa9"}.uk-icon-flipv:before{content:"\eaaa"}.uk-icon-fliph:before{content:"\eaac"}.uk-icon-crop:before{content:"\ee78"}.uk-icon-save:before{content:"\e000"}.uk-icon-tag:before{content:"\e013"}.uk-icon-cloud-upload:before{content:"\f0ee"}.uk-icon-lightbox:before{content:"\eecb"}.uk-icon-lightbulb:before{content:"\ebfb";border:1px solid #bbb;padding:1px;margin:-1px 0 0 -2px}.uk-icon-loop:before{content:"\eda8"}.uk-icon-exchange:before{content:"\ee46"}.uk-icon-cross-small:before{content:"\ed6f"}.uk-icon-thumbnail-remove:before{content:"\e93f"}.uk-icon-caption-add:before{content:"\e942"}.uk-icon-caption-delete:before{content:"\e940"}.uk-icon-multiple-images:before{content:"\e943"}.uk-icon-lock:before{content:"\e98f"}.uk-icon-unlocked:before{content:"\e990"}.uk-icon-code-highlight:before{content:"\e924"}.uk-icon-code-linenumbers:before{content:"\ec55"}.uk-icon-code-search-next:before{content:"\edcb"}.uk-icon-code-search-previous:before{content:"\edcf"}.uk-icon-code-format:before{content:"\eebc"}.uk-icon-code-replace-all:before{content:"\eda8"}.uk-icon-code-replace:before{content:"\ee46"}.uk-icon-code-wrap:before{content:"\e902"}.uk-icon-key:before{content:"\e98d"}.uk-icon-code-search-regex:before{content:".*";font-weight:700}.uk-icon-code-search-matchcase:before{content:"Aa"}.uk-icon-code-search-wholeword:before{content:"ab";text-decoration:underline}.uk-icon-spinner::before{content:"";border:.25rem solid rgba(0,0,0,.1);border-left-color:#888;border-radius:50%;width:1.25em;height:1.25em;animation:donut-spin 1.2s linear infinite;box-sizing:border-box;display:inline-block;vertical-align:middle;line-height:1}@keyframes donut-spin{0%{transform:rotate(0)}100%{transform:rotate(360deg)}}@keyframes pulsate{0%{transform:scale(.1);opacity:0}50%{opacity:.8}100%{transform:scale(1.2);opacity:0}}.uk-close:after{font-size:.75em}html{font-family:system-ui,-apple-system,"Segoe UI",Roboto,"Helvetica Neue",Arial,"Noto Sans",sans-serif,"Apple Color Emoji","Segoe UI Emoji","Segoe UI Symbol","Noto Color Emoji"}.uk-form-horizontal .uk-form-label{font-weight:inherit;line-height:32px;display:flex;align-items:center;margin:0}.uk-form-horizontal .uk-form-label.uk-text-center{justify-content:center}.uk-form-horizontal .uk-grid>.uk-form-label{line-height:1.25}.uk-form{height:100%;position:relative}.uk-grid-small>div{padding-left:10px}.uk-grid-mini{margin-left:-10px}.uk-grid-mini>*,.uk-grid-mini>div{padding-left:5px}[class*=uk-icon-]{font-size:16px}.uk-icon-medium{font-size:1.75em}.uk-icon-large{font-size:2em}.uk-icon-small{font-size:1.5em}.uk-close{font-size:14px;width:2em;height:2em}.uk-placeholder-small{padding:5px;margin:5px 0}.uk-button,.uk-button-danger,.uk-button-primary,.uk-button-success{text-shadow:inherit;box-shadow:inherit;line-height:inherit;display:inline-flex;align-items:center}.uk-button.uk-active,.uk-button:active{background-color:#ddd}.uk-navbar .uk-button{border-radius:0}.uk-modal-footer .uk-button:not(.uk-button-primary):not(.uk-button-danger):not(.uk-button-success){background-color:#fff;border-color:#ddd}.uk-modal-footer .uk-button:not(.uk-button-primary):not(.uk-button-danger):not(.uk-button-success):focus,.uk-modal-footer .uk-button:not(.uk-button-primary):not(.uk-button-danger):not(.uk-button-success):hover{color:#444;border-color:#888}.uk-button .uk-text,.uk-button-text{vertical-align:middle;cursor:pointer;display:inline-block;line-height:2;min-width:3em}.uk-modal{padding:10px;background:0 0}.uk-modal-dialog{padding:10px;margin:0 auto;top:50%;max-height:100%;border-radius:4px;overflow:hidden;transform:translateY(-100%)}.uk-open .uk-modal-dialog{-webkit-transform:translateY(-50%);transform:translateY(-50%)}.uk-modal-dialog-full{width:100%}.uk-modal-confirm,.uk-modal-prompt{width:350px}.uk-modal-prompt input[aria-invalid]+.uk-form-help-block{display:none}.uk-modal-prompt input[aria-invalid=true]+.uk-form-help-block{display:block}.uk-modal-preview{min-height:120px;min-width:320px;max-width:640px}.uk-modal-preview .uk-modal-body{width:auto;height:auto;margin:auto;overflow:hidden}.uk-modal-preview .uk-modal-body .iframe-preview,.uk-modal-preview .uk-modal-body .media-preview{padding-bottom:56.25%;width:100%;height:0;position:relative}.uk-modal-preview .uk-modal-body .media-preview-audio{padding-bottom:50px}.uk-modal-preview .uk-modal-body embed,.uk-modal-preview .uk-modal-body iframe,.uk-modal-preview .uk-modal-body object,.uk-modal-preview .uk-modal-body video{border:0;position:absolute;top:0;left:0;width:100%;height:100%}.uk-modal-preview .uk-modal-body .image-preview{text-align:center;width:100%;height:auto;margin:auto}.uk-modal-preview .uk-modal-body .image-preview:empty{width:400px;height:400px}.uk-modal-preview .uk-modal-body audio,.uk-modal-preview .uk-modal-body img{text-align:center;width:100%;height:auto}.uk-modal-dialog>.uk-close:first-child{margin:0;position:absolute;right:5px;top:5px}.uk-modal-header{padding:10px;margin:-10px -10px 0;background:#fff;border-bottom:1px solid #fff;border-radius:4px 4px 0 0}.uk-modal-body{padding:30px 0 20px}.uk-modal-header+.uk-modal-body{padding:10px 0 0}.uk-modal-dialog .uk-modal-close{opacity:1}.uk-modal-dialog .uk-close:focus,.uk-modal-dialog .uk-close:hover{color:#444;background:#e5e5e5;border-radius:2px}.uk-modal-header h3{font-weight:700;font-size:1.25rem}.uk-modal-footer{padding:8px;margin:8px -8px -8px;border-top:1px solid #fff;border-radius:0 0 4px 4px;background:#fff}.uk-modal-alert .uk-modal-dialog,.uk-modal-confirm .uk-modal-dialog,.uk-modal-prompt .uk-modal-dialog{width:360px}.uk-modal-alert,.uk-modal-confirm,.uk-modal-prompt{display:flex;flex-direction:column}.uk-modal-alert .uk-modal-body,.uk-modal-confirm .uk-modal-body,.uk-modal-prompt .uk-modal-body{flex:1;min-height:2rem}.uk-accordion-title{margin-bottom:5px}.uk-accordion-content{padding:0 5px}.uk-form input[type=text],.uk-form select,.uk-form textarea{padding:2px}.uk-form input[type=checkbox]{margin:2px 4px 0 0}.uk-form legend{font-size:14px;line-height:32px;padding-bottom:0;font-weight:600}.uk-form legend:after{border:0}.uk-switcher{overflow:auto}.uk-switcher>*{display:none}.uk-switcher>.uk-active{display:block}.uk-comment-header{border:0;border-radius:0;background:0 0;margin:0;padding:0 0 10px}.uk-comment-meta{color:#444;font-size:1rem;margin:0;line-height:20px}.uk-form-row.uk-flex{display:flex;gap:1em;align-items:center}.uk-form-horizontal .uk-form-controls{display:flex;align-items:center}.uk-form-horizontal .uk-form-controls input[type=text],.uk-form-horizontal .uk-form-controls input[type=number],.uk-form-horizontal .uk-form-controls select,.uk-form-horizontal .uk-form-controls textarea{width:100%}.uk-form-horizontal .uk-form-controls input[type=text],.uk-form-horizontal .uk-form-controls input[type=number],.uk-form-horizontal .uk-form-controls select{line-height:1em;height:32px}.uk-form-horizontal .uk-form-controls select{line-height:1}.uk-form-horizontal .uk-form-controls input[type=range]{height:32px}.uk-form-horizontal .uk-form-controls-text{padding-top:0}.uk-form-row+.uk-form-row,.uk-form-row+.uk-grid,.uk-grid+.uk-form-row,.uk-grid+.uk-grid{margin-top:.5em}.uk-form-icon-both>input{padding:0 2em!important}.uk-form-icon>[class*=uk-icon-]{width:2em;font-size:16px;line-height:2em;margin:0;top:0;color:#666}.uk-form-icon-both>[class*=uk-icon-]:last-child,.uk-form-icon-flip>[class*=uk-icon-]{display:block;cursor:pointer;pointer-events:inherit;right:0;padding:0;margin-top:0;width:2em;height:2em;top:0;line-height:2em}.uk-form-icon-both>[class*=uk-icon-]:first-child{left:inherit;right:inherit}.uk-form-icon .uk-icon-none{top:0;font-size:1em;height:32px;line-height:32px;vertical-align:middle;width:3em}.uk-form-icon-flip .uk-icon+.uk-icon{right:30px}.uk-form-icon-flip .uk-icon+.uk-icon+.uk-icon{right:60px}.uk-form-icon-flip>input{padding-right:26px!important}.uk-form-icon-both>[class*=uk-icon-colorpicker]:last-child,.uk-form-icon-flip>[class*=uk-icon-colorpicker]{background-color:#fff;width:2em;height:2em;top:.25em;border-radius:2px;right:.25em;box-sizing:border-box}html[dir=rtl] .uk-form-icon-both>[class*=uk-icon-colorpicker]:last-child,html[dir=rtl] .uk-form-icon-flip>[class*=uk-icon-colorpicker]{left:1em;right:inherit}.uk-form-icon>[class*=uk-icon-hashtag]{width:1.5em;height:2em;top:0;margin:0}.uk-dropdown{z-index:1010}.uk-pagination>li>a,.uk-pagination>li>span{min-width:1em}.uk-invisible{visibility:hidden!important}input[type=range]{-webkit-appearance:none;max-width:100%;border-radius:0;border:0;margin:0;padding:0}input[type=range]::-webkit-slider-thumb{-webkit-appearance:none;background-color:#ecf0f1;border:1px solid #bdc3c7;width:10px;height:10px;border-radius:0;cursor:pointer;margin-top:-1px}input[type=range]::-webkit-slider-runnable-track{-webkit-appearance:none;border-radius:0;height:10px;border:1px solid #bdc3c7;background-color:#fff}input[type=range]::-moz-range-track{border-radius:0;height:10px;border:1px solid #bdc3c7;background-color:#fff}input[type=range]::-moz-range-thumb{background:#ecf0f1;border:1px solid #bdc3c7;width:10px;height:10px;border-radius:0;cursor:pointer}input[type=range]::-ms-fill-lower,input[type=range]::-ms-fill-upper{background:0 0}input[type=range]::-ms-track{border-radius:0;height:10px;border:1px solid #bdc3c7;background-color:#fff;color:transparent}input[type=range]::-ms-thumb{background-color:#ecf0f1;border:1px solid #bdc3c7;width:10px;height:10px;border-radius:0;cursor:pointer;margin:0}.uk-grid>.uk-width-1-4{padding-left:10px}.uk-width-0-10,.uk-width-0-2,.uk-width-0-3,.uk-width-0-4,.uk-width-0-5,.uk-width-0-6,.uk-width-auto{width:auto}@media (min-width:960px){.uk-form-horizontal .uk-form-controls{margin-left:0;margin-left:initial}.uk-form-horizontal .uk-form-label{width:initial}.uk-form-horizontal .uk-width-1-10{width:10%}.uk-form-horizontal .uk-width-1-5,.uk-form-horizontal .uk-width-2-10{width:20%}.uk-form-horizontal .uk-width-3-10{width:30%}.uk-form-horizontal .uk-width-2-5,.uk-form-horizontal .uk-width-4-10{width:40%}}@media (min-width:414px){.uk-form-horizontal .uk-form-controls,.uk-form-horizontal .uk-form-label,.uk-form-row [class*=uk-width]{float:left}.uk-form-horizontal .uk-width-small-1-10{width:10%}.uk-form-horizontal .uk-width-small-1-5,.uk-form-horizontal .uk-width-small-2-10{width:20%}.uk-form-horizontal .uk-width-small-3-10{width:30%}.uk-form-horizontal .uk-width-small-2-5,.uk-form-horizontal .uk-width-small-4-10{width:40%}}@media (max-width:414px){.uk-hidden-mini{display:none!important}.uk-width-mini-1-1{width:100%}.uk-width-mini-1-2,.uk-width-mini-2-4,.uk-width-mini-3-6,.uk-width-mini-5-10{width:50%}.uk-width-mini-1-3,.uk-width-mini-2-6{width:33.333%}.uk-width-mini-2-3,.uk-width-mini-4-6{width:66.666%}.uk-width-mini-1-4{width:25%}.uk-width-mini-3-4{width:75%}.uk-width-mini-1-5,.uk-width-mini-2-10{width:20%}.uk-width-mini-2-5,.uk-width-mini-4-10{width:40%}.uk-width-mini-3-5,.uk-width-mini-6-10{width:60%}.uk-width-mini-4-5,.uk-width-mini-8-10{width:80%}.uk-width-mini-1-6{width:16.666%}.uk-width-mini-5-6{width:83.333%}.uk-width-mini-1-10{width:10%}.uk-width-mini-3-10{width:30%}.uk-width-mini-7-10{width:70%}.uk-width-mini-9-10{width:90%}.uk-placeholder{padding:10px}.uk-placeholder-small{padding:5px}}.uk-icon-none{font-family:inherit}.uk-icon-thumb-create:before{content:"\f03e"}.uk-progress-bar{line-height:20px;text-shadow:inherit;font-size:inherit;box-shadow:inherit}.uk-stack{position:relative;display:inline-block;width:1em;height:1em;line-height:1em;vertical-align:middle}.uk-stack .uk-icon{position:absolute;left:0;width:100%;text-align:center}.uk-inline-help .uk-modal-dialog{height:100%}.uk-inline-help .uk-modal-dialog iframe{width:100%;height:calc(100% - 48px)}.uk-margin-left-remove{margin-left:0!important}.uk-margin-right-remove{margin-right:0!important}.uk-form-label{min-width:32px}input[list]::-webkit-calendar-picker-indicator,input[list]::-webkit-list-button{display:none}select:not([multiple]):not([size]){-webkit-appearance:none;-moz-appearance:none;padding-right:20px;background-image:url("data:image/svg+xml;charset=UTF-8,%3Csvg%20width%3D%2224%22%20height%3D%2216%22%20viewBox%3D%220%200%2024%2016%22%20xmlns%3D%22http%3A%2F%2Fwww.w3.org%2F2000%2Fsvg%22%3E%0A%20%20%20%20%3Cpolygon%20fill%3D%22%23666%22%20points%3D%2212%201%209%206%2015%206%22%20%2F%3E%0A%20%20%20%20%3Cpolygon%20fill%3D%22%23666%22%20points%3D%2212%2013%209%208%2015%208%22%20%2F%3E%0A%3C%2Fsvg%3E%0A");background-repeat:no-repeat;background-position:100% 50%}.uk-form-row:after,.uk-form-row:before{content:normal}.uk-tooltip{max-width:20rem}.uk-form-striped.uk-form-row:nth-of-type(even){background:#f5f5f5}.uk-panel-box{padding:.5rem}.uk-panel-box-secondary{border:0}.uk-form-icon-flip>[class*=uk-icon-]{display:flex;align-items:center;justify-content:center}.uk-checkbox-label{display:flex;align-items:center;justify-content:center;gap:.5em}.uk-flex-gap{gap:.5em}.uk-flex-gap-small{gap:.25em}.uk-flex-gap-large{gap:.75em}.uk-button-text{width:100%}.uk-datalist-control{position:relative;display:flex;flex-direction:row;flex-wrap:wrap;border:1px solid #ddd;width:100%;border-radius:2px;align-items:center;padding:0;box-sizing:border-box;transition:all .2s linear;transition-property:border,background}.uk-datalist-loading:after{display:block;content:attr(data-label-loading);position:absolute;left:0;top:0;width:100%;height:100%;padding:5px;box-sizing:border-box}.uk-datalist-control.uk-focus{border-color:#66afe9;background-color:#f5fbfe}.uk-form .uk-datalist-control input[type=text]{border:0;width:calc(100% - 2em)}.uk-datalist-loading .uk-datalist-combobox input[type=text]::placeholder{color:#fff}.uk-datalist-combobox{position:relative;display:flex;flex-direction:row;width:100%;flex:1}.uk-datalist-placeholder{height:32px}.uk-datalist-dropdown{position:fixed;padding:0 10px;overflow-x:hidden;box-shadow:0 2px 5px rgba(0,0,0,.1)}.uk-datalist-dropdown li:focus{background-color:#eee;outline:#ccc dotted 1px}.uk-datalist-dropdown li a{box-sizing:border-box;height:30px;padding:5px 15px 5px 30px;position:relative}.uk-datalist-dropdown li.uk-active a:before{content:"\2713";position:absolute;left:1em;top:.5em}.uk-datalist-dropdown .uk-nav-header{margin:0;text-transform:inherit;font-weight:700;font-size:inherit}.uk-datalist-dropdown .uk-nav-indent{margin-left:.5em}.uk-datalist-control .uk-datalist-button{background-color:#fff;background-image:url("data:image/svg+xml;charset=UTF-8,%3Csvg%20width%3D%2224%22%20height%3D%2216%22%20viewBox%3D%220%200%2024%2016%22%20xmlns%3D%22http%3A%2F%2Fwww.w3.org%2F2000%2Fsvg%22%3E%0A%20%20%20%20%3Cpolygon%20fill%3D%22%23666%22%20points%3D%2212%201%209%206%2015%206%22%20%2F%3E%0A%20%20%20%20%3Cpolygon%20fill%3D%22%23666%22%20points%3D%2212%2013%209%208%2015%208%22%20%2F%3E%0A%3C%2Fsvg%3E%0A");background-repeat:no-repeat;background-position:100% 50%;border:0;width:2em;transition:all .2s linear;transition-property:border,background}.uk-datalist-control .uk-datalist-placeholder input[readonly]{position:absolute;left:0;top:0;pointer-events:none;z-index:1;padding-left:.5em}.uk-datalist-control .uk-datalist-placeholder .uk-datalist-button{position:absolute;left:0;top:0;width:100%}.uk-datalist-control input:focus+.uk-datalist-button{border-color:#66afe9;background-color:#f5fbfe}.uk-datalist-control .uk-datalist-button:disabled{background-color:#fafafa}.wf-colorpicker,body{background-color:#fff;box-sizing:border-box}.uk-datalist-control .uk-datalist-tag{position:relative;height:28px;min-width:5em;min-height:inherit;margin:1px 2px;padding:0 1.25em 0 0;box-sizing:border-box}.uk-datalist-control .uk-datalist-tag label{padding-left:.25em}.uk-datalist-control .uk-datalist-tag:before{position:absolute;top:0;right:0;display:block;text-align:center;text-indent:0;content:"\00d7";color:#444;line-height:1.5;font-size:1.25em;font-weight:700;height:100%;width:1em}.uk-repeatable{display:flex}.uk-repeatable .uk-flex{gap:5px}.uk-repeatable .uk-repeatable-create,.uk-repeatable .uk-repeatable-delete{display:none}.uk-repeatable .uk-repeatable-create:first-child,.uk-repeatable+.uk-repeatable .uk-repeatable-delete{display:block}.uk-repeatable .uk-repeatable-hidden-first,.uk-repeatable+.uk-repeatable .uk-repeatable-create{display:none}.uk-repeatable+.uk-repeatable .uk-repeatable-hidden-first{display:block}.uk-repeatable.uk-placeholder{padding:10px}.uk-form-icon input.color{padding-left:20px!important;text-transform:lowercase}.uk-form-icon input.color:disabled~span{opacity:.5}.uk-icon-colorpicker{height:22px}input.color,input.colour{width:100px}.wf-colorpicker{height:350px;max-height:inherit;max-width:inherit;width:310px;border:1px solid #ddd;color:#444;font-size:12px;box-shadow:0 0 10px rgba(0,0,0,.3);bottom:100%;right:inherit}.wf-colorpicker-simple{height:auto;width:inherit;max-width:100px;padding:5px}.wf-colorpicker-simple .uk-icon-close{visibility:hidden}.wf-colorpicker-simple #colorpicker{min-width:inherit;margin:0}.wf-colorpicker-simple .wf-colorpicker-simple-colors>div{width:20px;height:20px;display:inline-block;margin:1px;cursor:pointer}.uk-constrain-label .uk-icon-lock,.uk-constrain-label .uk-icon-unlocked,.uk-form-constrain-icon .uk-constrain-label .uk-text,.uk-tooltip .tooltip-arrow,.wf-colorpicker.uk-tooltip-left.uk-tooltip-bottom:after,.wf-colorpicker.uk-tooltip-left.uk-tooltip-top:after,.wf-colorpicker.uk-tooltip-right.uk-tooltip-bottom:after,.wf-colorpicker.uk-tooltip-right.uk-tooltip-top:after{display:none}.wf-colorpicker .uk-tabs{height:calc(100% - 49px);position:relative}.wf-colorpicker>div{height:calc(100% - 10px)}.wf-colorpicker>div>div{width:100%;height:100%;position:relative}.wf-colorpicker.uk-tooltip-left:after{border-left-color:#fff}.wf-colorpicker.uk-tooltip-right:after{border-right-color:#fff}.wf-colorpicker .uk-modal-footer{position:relative;margin:5px -8px 0;height:49px;box-sizing:border-box}.wf-colorpicker #colorpicker_insert{margin:0}.wf-colorpicker .uk-switcher{padding:0 1px}.wf-colorpicker #colorpicker{position:relative;top:inherit;left:inherit;right:inherit;bottom:inherit}.wf-colorpicker #colorpicker_tabs .uk-switcher{padding:0}.wf-colorpicker.uk-tooltip-top-left::after,.wf-colorpicker.uk-tooltip-top-right::after,.wf-colorpicker.uk-tooltip-top::after{border-top-color:#fff}.uk-tooltip{text-shadow:inherit;right:inherit;bottom:inherit}.uk-tooltip .uk-icon-close{position:absolute;right:3px;cursor:pointer;z-index:10;padding:5px;top:0;font-size:0}.uk-tooltip .uk-icon-close:before{font-size:10px}.uk-tooltip h4,.uk-tooltip p{margin:0;color:#fff}.uk-tooltip h4{font-size:1.1em;font-weight:700}.uk-constrain-icon,.uk-equalize-icon{position:relative;vertical-align:middle;width:2em;text-align:center;cursor:pointer;line-height:2em;margin:0;padding:0;float:left}.uk-form .uk-constrain-icon input,.uk-form .uk-equalize-icon input{opacity:0;position:absolute;left:0;top:0;height:100%;margin:0!important;padding:0;width:100%}.uk-form .uk-form-constrain .uk-constrain-checkbox,.uk-form .uk-form-equalize .uk-equalize-checkbox{margin:5px}.uk-isdirty{color:inherit!important}.uk-form .uk-constrain-container input[type=text],.uk-form .uk-constrain-container input[type=number]{width:65px}.uk-constrain-container{padding-left:10px}.uk-form-constrain-icon .uk-constrain-label{font-size:0;max-width:2em;text-align:center;position:relative}.uk-form-constrain-icon .uk-constrain-label input{visibility:hidden}.uk-form-constrain-icon .uk-constrain-label input:disabled+i{color:#888}.uk-form-constrain-icon .uk-constrain-label .uk-icon-lock,.uk-form-constrain-icon .uk-constrain-label .uk-icon-unlocked{position:absolute;left:5px;top:8px;cursor:pointer;display:inherit}.uk-form-constrain-icon .uk-constrain-label .uk-icon-lock{display:none}.uk-form-constrain-icon .uk-constrain-label.uk-constrain-active .uk-icon-lock{display:inherit}.uk-form-constrain-icon .uk-constrain-label.uk-constrain-active .uk-icon-unlocked{display:none}@media (max-width:960px){.uk-flex-wrap .uk-constrain-label{font-size:0;max-width:2em;text-align:center;position:relative}.uk-flex-wrap .uk-constrain-label .uk-text{display:none}.uk-flex-wrap .uk-constrain-label input{visibility:hidden}.uk-flex-wrap .uk-constrain-label input:disabled+i{color:#888}.uk-flex-wrap .uk-constrain-label .uk-icon-lock,.uk-flex-wrap .uk-constrain-label .uk-icon-unlocked{position:absolute;left:5px;top:8px;cursor:pointer;display:inherit}.uk-flex-wrap .uk-constrain-label .uk-icon-lock{display:none}.uk-flex-wrap .uk-constrain-label.uk-constrain-active .uk-icon-lock{display:inherit}.uk-flex-wrap .uk-constrain-label.uk-constrain-active .uk-icon-unlocked{display:none}}.uk-button.uk-icon{display:flex;align-items:center;justify-content:center}.uk-input-clear .uk-icon{opacity:.5}.uk-input-clear .uk-icon:hover{opacity:.75}.uk-input-clear .uk-icon:before{font-size:.625em}.uk-toggle path{display:none;fill:#444}.uk-toggle path:first-child{display:block}.uk-toggle.uk-toggle-active path:first-child{display:none}.loader,.show,.uk-toggle.uk-toggle-active path:last-child,a.browse span,a.pickcolor span{display:block}html{overflow:hidden;height:100%}body{padding:0;margin:0;position:relative;height:100%;overflow:hidden;-webkit-overflow-scrolling:'touch'}body>div.uk-form,body>form>div{top:5px;left:5px;right:5px;bottom:56px;position:absolute}.actionPanel,.mceActionPanel{text-align:right;bottom:0;position:absolute;right:0;left:0;top:auto;padding:10px;margin:0;box-sizing:border-box;white-space:nowrap}form .actionPanel{left:-5px;right:-5px}textarea{resize:none;outline:0}fieldset{margin:0}label.invalid{color:#d85030}input.invalid{border:1px solid #d85030}a.browse span{width:20px;height:20px;background:url(../img/icons.png) 0 -960px;border:1px solid #FFF;margin-left:1px}a.browse span.datetime{background:url(../img/icons.png) 0 -1020px}.mceOldBoxModel a.browse span{width:22px;height:20px}a.pickcolor span{width:16px;height:16px;background:url(../img/icons.png) 0 -1000px;margin-left:2px}.mceOldBoxModel a.pickcolor span{width:21px;height:17px}.wordWrapCode{vertical-align:middle;border:1px #000;background:0 0}label.disabled{color:#ccc}.visible{visibility:visible}.hidden{visibility:hidden}.loader{background:url(../img/load.gif) center no-repeat;width:20px;height:20px}span.browser_container,span.colour_container,span.loader{display:inline-block;vertical-align:middle}.mceAddSelectValue,.uk-addselect{background-color:#DDD}dl.alert{vertical-align:middle;width:100%;margin:0;padding:0}dl.alert dt{height:20px;background:url(../img/icons.gif) no-repeat;font-weight:700;margin:0;padding:3px 0 0 25px}dl.alert dt.alert{background-position:0 -20px}dl.alert dt.info{background-position:0 -300px}dl.alert dt.error{background-position:0 -340px}dl.alert dd{width:80%;margin:0;padding:0}span.hastip,span.tooltip{border-bottom:1px dashed #919B9C}.hastip:first-line,.tooltip:first-line{background:url(../img/dash.gif) bottom center repeat-x}div.uk-preview div.uk-dialog-content.uk-widget-content{padding:10px}.image-preview img{display:block;cursor:pointer;margin:0 auto}.image-preview.loading,div.iframe-preview.loading,div.media-preview.loading{background:url(../tinymce/themes/advanced/img/progress.gif) center no-repeat}.uk-dialog-content{overflow:hidden}.uk-dialog-content label{min-width:60px;text-align:right;display:inline-block;margin:0 5px 0 0}span.browser_icon{background:url(../img/icons.png) 0 -960px}span.pickcolor_icon{width:16px!important;height:16px!important;margin-top:-8px!important;background:url(../img/icons.png) 0 -1000px}.hide,label.msg{display:none}a.browse,span.uk-slider-block{display:inline-block;vertical-align:middle}.input_noborder,img{border:0}a.browse span.image,span.browser_icon.image{background:url(../img/icons.png) 0 -980px}a.browse span.disabled,span.browser_icon.disabled{border:1px solid #FFF;opacity:.3;-ms-filter:"progid:DXImageTransform.Microsoft.Alpha(Opacity=30)";filter:alpha(opacity=30)}a.browse:hover span.disabled,span.browser_icon.disabled:hover{border:1px solid #FFF;background-color:transparent}a.pickcolor:hover span,span.pickcolor_icon:hover{background-color:#B2BBD0}.disabled{cursor:default}span[role=button].disabled{opacity:.3;-ms-filter:"progid:DXImageTransform.Microsoft.Alpha(Opacity=30)";filter:alpha(opacity=30)}select.editable option.uk-state-highlight{border:0;color:#000}select.editable option.uk-state-highlight:hover{color:#000}span.uk-slider-block{height:1em;margin:0 5px;position:relative}span.uk-slider{position:absolute;display:block;width:100px;left:5px}#jce div.uk-dialog div.uk-dialog-content div.alert,#jce div.uk-dialog div.uk-dialog-content div.confirm{display:inline-block;font-size:1.1em;padding:0 0 0 32px;margin:3px 0;min-height:24px;width:240px;word-wrap:break-word}#jce div.uk-dialog div.uk-dialog-content div.alert span.icon,#jce div.uk-dialog div.uk-dialog-content div.confirm span.icon{display:inline-block;padding:0 0 0 32px;margin:3px 0 0 -32px;min-height:24px;background:url(../img/icons-24.png) 0 -48px no-repeat}#jce div.uk-dialog div.uk-dialog-content div.alert span.icon{background-position:0 -144px}#jce div.uk-dialog div.uk-dialog-content div.alert ul{list-style:none;padding:0;margin:0}#jce div.uk-dialog div.uk-dialog-content div.alert p,#jce div.uk-dialog div.uk-dialog-content div.confirm p{margin:0 0 1em}#dim_loader{display:inline-block}.uk-dialog-content p{margin:1em 0}#jce .aggregator_option_add{background:url(../img/icons.png) 0 -540px no-repeat;color:#CCC;cursor:pointer;display:inline-block;height:20px;line-height:20px;margin:auto;position:absolute;text-align:center;vertical-align:middle;width:130px}#jce .aggregator_option_remove{background:url(../img/icons.png) 0 -560px no-repeat;height:20px;width:20px;line-height:20px;vertical-align:middle;cursor:pointer;display:inline-block}#height,#width{width:65px;text-align:center}.edited{color:inherit!important}#height_unit,#width_unit{width:45px;text-align:center}#margin_bottom,#margin_left,#margin_right,#margin_top,#marginheight,#marginwidth{width:40px}.uk-jce .preview{overflow:hidden;padding:5px;margin:0;text-align:left;height:100%;position:relative;font-size:11px;box-sizing:border-box;border:1px dashed #ddd;background-color:#fafafa}.uk-switcher,.uk-tab{position:absolute;width:100%;top:0;left:0;box-sizing:border-box}.preview h4{font-size:12px;font-weight:700;line-height:14px}.preview img{max-width:50%;vertical-align:baseline;height:auto}@media (min-width:375px){label[for*=margin_]+input:-ms-input-placeholder{opacity:0!important}label[for*=margin_]+input::-moz-placeholder{opacity:0!important}label[for*=margin_]+input::-webkit-input-placeholder{opacity:0!important}}@media (max-width:375px){label[for*=margin_]{display:none}}.uk-tab{padding:0;display:flex}.uk-switcher{height:100%;padding:0 5px}.uk-tabs .uk-tab+.uk-switcher{top:35px;height:calc(100% - 45px)}.uk-browser-bottom .uk-tabs+.uk-form,.uk-browser-top .uk-form{height:60%}.uk-browser .uk-tabs{height:40%;position:relative}.uk-tabs-panel{margin:5px 0}.uk-tree a{display:inline-block;white-space:nowrap}.uk-tree a,.uk-tree a:active,.uk-tree a:hover{text-decoration:none;color:inherit}.uk-tree-toggle{cursor:pointer}.uk-tree-icon,.uk-tree-toggle{display:inline-block;text-align:center;vertical-align:middle}.uk-tree-icon .uk-icon,.uk-tree-toggle .uk-icon{height:2em;width:2em;vertical-align:middle;line-height:2em}.uk-icon-caret-down,.uk-tree-open>.uk-tree-row>.uk-tree-toggle .uk-icon-caret-right{display:none}.uk-tree-open>.uk-tree-row>.uk-tree-toggle .uk-icon-caret-down{display:inline-block}.uk-icon-folder-open,.uk-tree-open>.uk-tree-row .uk-tree-icon .uk-icon-folder{display:none}.uk-tree-open>.uk-tree-row .uk-tree-icon .uk-icon-folder-open{display:inline-block}.uk-tree-loading>.uk-tree-row>.uk-tree-toggle .uk-icon{display:none!important}.uk-tree-loading>.uk-tree-row>.uk-tree-toggle{background:url(../img/load.gif) center no-repeat;width:32px;height:32px}.uk-tree,.uk-tree ul{padding:0;margin:0;list-style:none;-webkit-user-select:none;-moz-user-select:none;user-select:none}.uk-tree li{line-height:32px;vertical-align:middle;margin:0}.uk-tree-node li{padding:0 0 0 32px}.uk-tree-row .uk-tree-text{display:inline-block;line-height:32px;vertical-align:middle}.uk-tree-node li:empty{padding:0;margin:0;visibility:hidden}.uk-tree-active>.uk-tree-row,.uk-tree-row:hover{background-color:#d9edf7}.uk-tree-active>.uk-tree-row .uk-tree-text{font-weight:700}.uk-tree-hide{display:none}.uk-tree-root>ul>li{padding:0}#colorpicker{margin:10px 0 0;min-width:250px;top:5px;right:5px;left:5px;bottom:56px;position:absolute}#colorpicker #colorpicker_tabs ul,body>#colorpicker{margin:0}#colorpicker #colorpicker_named ul,#colorpicker #colorpicker_template ul,#colorpicker #colorpicker_web ul{list-style:none;margin:0;padding:0;line-height:8px}#colorpicker_named ul li,#colorpicker_template ul li,#colorpicker_web ul li{display:inline-block;margin:0 1px 1px 0;line-height:10px}#colorpicker canvas{width:10px;height:10px;margin:0 1px 1px 0}#colorpicker span.mceVoiceLabel{display:none}#colorpicker_insert{float:right;margin:0}#colorpicker_tabs .uk-switcher{overflow:hidden;padding:0 32px;top:35px}#colorpicker .uk-switcher>div{margin:0;padding:0}#colorpicker #colorpicker_tabs a{text-decoration:none}#colorpicker_tab table{margin:auto}#colorpicker_preview_text{position:relative;float:left;height:28px;vertical-align:middle}#colorpicker_preview_text label{margin-right:5px;vertical-align:middle}#colorpicker_preview_color{width:24px;height:24px;cursor:inherit;border-radius:2px;margin-top:-10px;right:4px;padding:0;top:50%}#colorpicker_preview{position:absolute;left:10px;box-sizing:border-box;z-index:1}#colorpicker_named div,#colorpicker_template div,#colorpicker_web div{margin:10px auto 0}#colorpicker_template p{margin:1em auto}#colorpicker_named span,#colorpicker_template span,#colorpicker_web span{display:block;float:left;width:15px;height:15px;overflow:hidden;cursor:pointer}#colorpicker_colorname{margin-top:5px;color:#444}#colorpicker_action{position:absolute;width:100%}#template_tab p{margin:auto;padding:0;width:200px}div.colorpicker_generated div fieldset{height:155px}iframe.colorpicker_blocker{width:100%;height:100%;position:absolute;top:0;left:0;z-index:-1;background-color:#F6F6F6;padding:1px}#colorpicker_color{min-height:18px;padding:2px 32px 2px 24px!important;margin:0;height:32px;line-height:32px;text-align:center;font-size:14px;width:120px;border-radius:3px}div.colorpicker_tabs{width:100%;margin-right:20px}iframe.blocker{height:100%;left:0;position:absolute;top:0;width:100%;background-color:#FFF}#colorpicker_named,#colorpicker_template,#colorpicker_web{position:relative}div#previewblock{margin-top:5px;float:left}#colorpicker_picker{height:100%}#colorpicker_picker div.farbtastic{margin:30px auto 0;position:relative;width:200px;height:88%;height:calc(100% - 30px)}.colorwheel{position:relative;margin:0 auto}.colorwheel *{position:absolute;cursor:crosshair}.colorwheel .color,.colorwheel .overlay{top:47px;left:47px;width:101px;height:101px}.colorwheel .wheel{background:url(../img/wheel.png) no-repeat;width:195px;height:195px}.colorwheel .overlay{background:url(../img/mask.png) no-repeat}.colorwheel .marker{width:17px;height:17px;margin:-8px 0 0 -8px;overflow:hidden;background:url(../img/marker.png) no-repeat}.uk-form input[type],.uk-form select,.uk-form textarea{box-sizing:border-box;margin:0;border-radius:2px;font:inherit}.uk-form input[type=radio]:checked{background-image:url("data:image/svg+xml;charset=UTF-8,%3Csvg%20width%3D%2216%22%20height%3D%2216%22%20viewBox%3D%220%200%2016%2016%22%20xmlns%3D%22http%3A%2F%2Fwww.w3.org%2F2000%2Fsvg%22%3E%0A%20%20%20%20%3Ccircle%20fill%3D%22%23fff%22%20cx%3D%228%22%20cy%3D%228%22%20r%3D%222%22%20%2F%3E%0A%3C%2Fsvg%3E")}.uk-form input[type=checkbox]:checked{background-image:url("data:image/svg+xml;charset=UTF-8,%3Csvg%20width%3D%2214%22%20height%3D%2211%22%20viewBox%3D%220%200%2014%2011%22%20xmlns%3D%22http%3A%2F%2Fwww.w3.org%2F2000%2Fsvg%22%3E%0A%20%20%20%20%3Cpolygon%20fill%3D%22%23fff%22%20points%3D%2212%201%205%207.5%202%205%201%205.5%205%2010%2013%201.5%22%20%2F%3E%0A%3C%2Fsvg%3E%0A")}.uk-form input[type=checkbox]:indeterminate{background-image:url("data:image/svg+xml;charset=UTF-8,%3Csvg%20width%3D%2216%22%20height%3D%2216%22%20viewBox%3D%220%200%2016%2016%22%20xmlns%3D%22http%3A%2F%2Fwww.w3.org%2F2000%2Fsvg%22%3E%0A%20%20%20%20%3Crect%20fill%3D%22%23fff%22%20x%3D%223%22%20y%3D%228%22%20width%3D%2210%22%20height%3D%221%22%20%2F%3E%0A%3C%2Fsvg%3E")}.uk-form input[type=radio]:disabled:checked{background-image:url("data:image/svg+xml;charset=UTF-8,%3Csvg%20width%3D%2216%22%20height%3D%2216%22%20viewBox%3D%220%200%2016%2016%22%20xmlns%3D%22http%3A%2F%2Fwww.w3.org%2F2000%2Fsvg%22%3E%0A%20%20%20%20%3Ccircle%20fill%3D%22%23999%22%20cx%3D%228%22%20cy%3D%228%22%20r%3D%222%22%20%2F%3E%0A%3C%2Fsvg%3E")}.uk-form input[type=checkbox]:disabled:checked{background-image:url("data:image/svg+xml;charset=UTF-8,%3Csvg%20width%3D%2214%22%20height%3D%2211%22%20viewBox%3D%220%200%2014%2011%22%20xmlns%3D%22http%3A%2F%2Fwww.w3.org%2F2000%2Fsvg%22%3E%0A%20%20%20%20%3Cpolygon%20fill%3D%22%23999%22%20points%3D%2212%201%205%207.5%202%205%201%205.5%205%2010%2013%201.5%22%20%2F%3E%0A%3C%2Fsvg%3E%0A")}.uk-form input[type=checkbox]:disabled:indeterminate{background-image:url("data:image/svg+xml;charset=UTF-8,%3Csvg%20width%3D%2216%22%20height%3D%2216%22%20viewBox%3D%220%200%2016%2016%22%20xmlns%3D%22http%3A%2F%2Fwww.w3.org%2F2000%2Fsvg%22%3E%0A%20%20%20%20%3Crect%20fill%3D%22%23999%22%20x%3D%223%22%20y%3D%228%22%20width%3D%2210%22%20height%3D%221%22%20%2F%3E%0A%3C%2Fsvg%3E")}.uk-form input[type=checkbox]:checked,.uk-form input[type=checkbox]:indeterminate,.uk-form input[type=radio]:checked{background-color:#337ab7;border-color:transparent}.uk-form input[type=checkbox]:focus,.uk-form input[type=radio]:focus{border-color:#66afe9;outline:0}.uk-form input[type=checkbox]:checked:focus,.uk-form input[type=checkbox]:indeterminate:focus,.uk-form input[type=radio]:checked:focus{background-color:#0e6dcd}.uk-form input[type=checkbox]:checked:disabled,.uk-form input[type=checkbox]:indeterminate:disabled,.uk-form input[type=radio]:checked:disabled{background-color:#eee;border-color:#ddd}.uk-form input[type=checkbox]:not(:disabled),.uk-form input[type=radio]:not(:disabled){cursor:pointer}.uk-form input[type=checkbox],.uk-form input[type=radio]{display:inline-block;height:16px;width:16px;overflow:hidden;vertical-align:middle;appearance:none;background-color:#fff;background-repeat:no-repeat;background-position:50% 50%;border:1px solid #ccc;transition:.2s ease-in-out;transition-property:background-color,border}.uk-form input[type=checkbox]:checked::before,.uk-form input[type=checkbox]:indeterminate::before{content:""}.uk-form input[type=radio]:checked::before{content:"";display:none}.uk-form input[type=radio]{border-radius:50%}.uk-jce-theme-dark{--wfe-bg:#2B3035;--wfe-bg-active:rgba(255, 255, 255, 0.2);--wfe-bg-hover:rgba(255, 255, 255, 0.1);--wfe-border-color:rgba(255, 255, 255, 0.15);--wfe-color:#dee2e6;--wfe-modal-bg:#212529;--wfe-modal-border-color:rgba(255, 255, 255, 0.15);--wfe-modal-input-focus:#86b7fe;background-color:var(--wfe-modal-bg);color:var(--wfe-color)}.uk-jce-theme-dark .uk-datalist-control,.uk-jce-theme-dark input[type],.uk-jce-theme-dark select,.uk-jce-theme-dark textarea{background-color:var(--wfe-modal-bg);border-color:var(--wfe-modal-border-color);color:var(--wfe-color)}.uk-jce-theme-dark .uk-datalist-control:active,.uk-jce-theme-dark .uk-datalist-control:focus,.uk-jce-theme-dark input[type]:active,.uk-jce-theme-dark input[type]:focus,.uk-jce-theme-dark select:active,.uk-jce-theme-dark select:focus,.uk-jce-theme-dark textarea:active,.uk-jce-theme-dark textarea:focus{border-color:var(--wfe-modal-input-focus);background-color:var(--wfe-modal-bg);color:var(--wfe-color)}.uk-jce-theme-dark .uk-datalist-control:disabled,.uk-jce-theme-dark input[type]:disabled,.uk-jce-theme-dark select:disabled,.uk-jce-theme-dark textarea:disabled{border-color:var(--wfe-modal-border-color);background-color:var(--wfe-bg-hover);color:var(--wfe-bg-hover)}.uk-jce-theme-dark .uk-datalist-control .uk-datalist-button:disabled,.uk-jce-theme-dark input[type] .uk-datalist-button:disabled,.uk-jce-theme-dark select .uk-datalist-button:disabled,.uk-jce-theme-dark textarea .uk-datalist-button:disabled{background-color:transparent;color:var(--wfe-bg-hover)}.uk-jce-theme-dark .uk-datalist-control input:focus+.uk-datalist-button,.uk-jce-theme-dark input[type] input:focus+.uk-datalist-button,.uk-jce-theme-dark select input:focus+.uk-datalist-button,.uk-jce-theme-dark textarea input:focus+.uk-datalist-button{border-color:var(--wfe-modal-input-focus);background-color:var(--wfe-modal-bg);color:var(--wfe-color)}.uk-jce-theme-dark .uk-button,.uk-jce-theme-dark .uk-dropdown,.uk-jce-theme-dark .uk-tab{border-color:var(--wfe-modal-border-color)}.uk-jce-theme-dark .uk-dropdown{background-color:var(--wfe-modal-bg);color:var(--wfe-color)}.uk-jce-theme-dark .uk-dropdown li:focus{background-color:var(--wfe-modal-input-focus)}.uk-jce-theme-dark .uk-dropdown li>a{color:var(--wfe-color)}.uk-jce-theme-dark .uk-button{background-color:var(--wfe-modal-bg);color:var(--wfe-color);text-shadow:none}.uk-jce-theme-dark .uk-button.uk-button-primary{background-color:#337ab7}.uk-jce-theme-dark .uk-button:hover{color:var(--wfe-color)}.uk-jce-theme-dark .uk-tab>li>a,.uk-jce-theme-dark .uk-tab>li>button{background-color:var(--wfe-modal-bg);border-color:transparent;color:var(--wfe-color);text-shadow:none;padding-bottom:7px;margin-bottom:1px}.uk-jce-theme-dark .uk-tab>li.uk-active>a,.uk-jce-theme-dark .uk-tab>li.uk-active>button{border-color:var(--wfe-modal-border-color) var(--wfe-modal-border-color) transparent;padding-bottom:8px;margin-bottom:-1px}.uk-jce-theme-dark .uk-placeholder{border-color:var(--wfe-modal-border-color);background-color:var(--wfe-bg-hover);color:var(--wfe-color)}.uk-jce-theme-dark .uk-modal-footer{background-color:var(--wfe-modal-bg)}.uk-jce-theme-dark .uk-modal-footer .uk-button-primary:hover{background-color:#286090}.uk-jce-theme-dark .uk-modal-footer .uk-button:not(.uk-button-primary):not(.uk-button-danger):not(.uk-button-success){background-color:var(--wfe-modal-bg);border-color:var(--wfe-modal-border-color)}.uk-jce-theme-dark .uk-modal-footer .uk-button:not(.uk-button-primary):not(.uk-button-danger):not(.uk-button-success):hover{color:var(--wfe-color);background-color:var(--wfe-bg-hover)}.uk-jce-theme-dark .wf-colorpicker{border-color:var(--wfe-modal-border-color);background-color:var(--wfe-modal-bg);color:var(--wfe-color)}.uk-jce-theme-dark .wf-colorpicker #colorpicker_colorname{color:var(--wfe-color)}.uk-jce-theme-dark .preview{border-color:var(--wfe-modal-border-color);background-color:transparent;color:var(--wfe-color)}.uk-jce-theme-dark #browser{background-color:var(--wfe-modal-bg)}.uk-jce-theme-dark #browser main>div{border-color:var(--wfe-modal-border-color)}.uk-jce-theme-dark #browser #info-body,.uk-jce-theme-dark #browser #tree-body,.uk-jce-theme-dark #browser .uk-navbar{border-color:var(--wfe-modal-border-color);background-color:transparent;color:var(--wfe-color)}.uk-jce-theme-dark #browser .uk-navbar .uk-navbar-content{text-shadow:none}.uk-jce-theme-dark #browser .uk-navbar .uk-button.action{background-color:transparent;border-color:var(--wfe-modal-border-color)}.uk-jce-theme-dark #browser .uk-navbar .uk-button:focus,.uk-jce-theme-dark #browser .uk-navbar .uk-button:hover{background-color:transparent}.uk-jce-theme-dark #browser .uk-navbar .uk-button:first-child{border-color:var(--wfe-modal-border-color)}.uk-jce-theme-dark #browser .uk-tree-active>.uk-tree-row,.uk-jce-theme-dark #browser .uk-tree-row:hover{background-color:var(--wfe-bg-hover)}.uk-jce-theme-dark #browser .item-list li{border-color:transparent}.uk-jce-theme-dark #browser #browser-buttons,.uk-jce-theme-dark #browser.view-mode-grid .item-list li,.uk-jce-theme-dark .uk-modal-dialog,.uk-jce-theme-dark .uk-modal-header{border-color:var(--wfe-modal-border-color)}.uk-jce-theme-dark #browser .item-list li.selected{color:var(--wfe-color);background-color:var(--wfe-bg-hover)}.uk-jce-theme-dark #browser #browser-buttons .button{color:var(--wfe-color)}.uk-jce-theme-dark #browser.view-mode-grid .item-list li.folder:not(.selected){background-color:transparent}.uk-jce-theme-dark #browser.view-mode-grid .item-list li .uk-item-checkbox{background-color:var(--wfe-modal-bg)}.uk-jce-theme-dark #browser.view-mode-grid .gif:not(.selected) .uk-thumbnail,.uk-jce-theme-dark #browser.view-mode-grid .item-list li:after,.uk-jce-theme-dark #browser.view-mode-grid .png:not(.selected) .uk-thumbnail{background-color:transparent}.uk-jce-theme-dark #browser.view-mode-grid .item-list.ui-sortable .file.selected:after{color:var(--wfe-color)}.uk-jce-theme-dark .uk-modal-dialog,.uk-jce-theme-dark .uk-modal-header{background-color:var(--wfe-modal-bg)}.uk-jce-theme-dark .uk-modal-footer,.uk-jce-theme-dark .uk-modal-header{border-color:transparent}.uk-jce-theme-dark .uk-modal-dialog *{color:var(--wfe-color)}.uk-jce-theme-dark .uk-modal-dialog .uk-close:focus,.uk-jce-theme-dark .uk-modal-dialog .uk-close:hover{color:var(--wfe-color);background-color:var(--wfe-bg-hover)}.uk-jce-theme-dark .uk-comment *{color:var(--wfe-color)}.uk-jce-theme-dark .uk-tree-active>.uk-tree-row{background-color:var(--wfe-bg-active)}.uk-jce-theme-dark .uk-tree-row:hover{background-color:var(--wfe-bg-hover)}.uk-jce-theme-dark .uk-pagination>li>a{background-color:var(--wfe-modal-bg);color:var(--wfe-color);text-shadow:none}.uk-jce-theme-dark .uk-accordion-title,.uk-jce-theme-dark .uk-panel-box{background-color:var(--wfe-bg-hover);border-color:var(--wfe-modal-border-color)}.uk-jce-theme-dark .uk-form-icon>[class*=uk-icon-],.uk-jce-theme-dark .uk-panel-box{color:var(--wfe-color)}css/filebrowser.min.css000060400000027524152456167170011177 0ustar00#browser-message,.item-list,.pathway,.uk-tree a{white-space:nowrap}.root .folder-up,.root .item-list li input[type=checkbox]:disabled,.uk-tree-node li:empty{visibility:hidden}.uk-tree a{display:inline-block}.uk-tree a,.uk-tree a:active,.uk-tree a:hover{text-decoration:none;color:inherit}.uk-tree-toggle{cursor:pointer}.uk-tree-icon,.uk-tree-toggle{display:inline-block;text-align:center;vertical-align:middle}.uk-tree-icon .uk-icon,.uk-tree-toggle .uk-icon{height:2em;width:2em;vertical-align:middle;line-height:2em}.queue-item .queue-item-name .queue-item-extension,.queue-item-size,.uk-tree li,.uk-tree-row .uk-tree-text{line-height:32px;vertical-align:middle}.uk-icon-caret-down,.uk-tree-open>.uk-tree-row>.uk-tree-toggle .uk-icon-caret-right{display:none}.uk-tree-open>.uk-tree-row>.uk-tree-toggle .uk-icon-caret-down{display:inline-block}.uk-icon-folder-open,.uk-tree-open>.uk-tree-row .uk-tree-icon .uk-icon-folder{display:none}.uk-tree-open>.uk-tree-row .uk-tree-icon .uk-icon-folder-open{display:inline-block}.uk-tree-loading>.uk-tree-row>.uk-tree-toggle .uk-icon{display:none!important}.uk-tree-loading>.uk-tree-row>.uk-tree-toggle{background:url(../img/load.gif) center no-repeat;width:32px;height:32px}.uk-tree,.uk-tree ul{padding:0;margin:0;list-style:none;-webkit-user-select:none;-moz-user-select:none;user-select:none}.uk-tree li{margin:0;flex:1 0 auto}.uk-tree-node li{padding:0 0 0 32px}.uk-tree-row .uk-tree-text{display:inline-block}.uk-tree-node li:empty{padding:0;margin:0}.uk-tree-active>.uk-tree-row,.uk-tree-row:hover{background-color:#d9edf7}.uk-progress,nav.uk-navbar{background-color:transparent}.uk-tree-active>.uk-tree-row .uk-tree-text{font-weight:700}.uk-tree-hide{display:none}.uk-tree-root>ul>li{padding:0}#upload-body{height:100%;position:static!important;z-index:10}#upload-queue-block{clear:both;height:14rem;overflow:auto;box-sizing:border-box;padding:5px;margin:0}#upload-body fieldset{border:1px solid #ddd;margin:0;padding:0 5px}#upload-body fieldset legend{width:auto;padding:0 5px}#upload-options{max-height:14rem;overflow:auto}#upload-options .uk-form-row{margin-bottom:.5em;margin-top:0}.queue-item-loading .queue-item-name input{padding-right:4rem!important}.queue-item-loading .queue-item-name .uk-icon:before{content:"";border:.25rem solid rgba(0,0,0,.1);border-left-color:#888;border-radius:100%;width:1.125em;height:1.125em;animation:donut-spin 1.2s linear infinite;box-sizing:border-box;display:inline-block;vertical-align:middle;top:-.375em;position:relative}@keyframes donut-spin{0%{transform:rotate(0)}100%{transform:rotate(360deg)}}.uk-progress{margin:5px 0;box-shadow:inherit;display:none}.queue-item-loading .uk-progress{display:block}.uk-alert{white-space:normal;margin:5px 0}.queue-item .queue-item-name .queue-item-extension{padding:0;font-size:inherit;cursor:inherit;height:inherit;margin:0;top:0;right:0;width:4rem}.wf-uploader-container{display:inline-block;position:relative;overflow:inherit}#sort-date,#sort-size,.uk-tree-hidden>div:first-child{display:none}.wf-uploader-element{font-size:999px;opacity:0;position:absolute;right:0;top:0;cursor:pointer;z-index:10;width:100%;height:100%}::-ms-clear{display:none}.wf-upload-dragover>div{border-width:2px!important}.queue-item-action{padding:0 7px}.uk-browser{top:5px;left:5px;right:5px;bottom:55px}#browser{width:100%;height:100%;position:relative;display:table}.uk-navbar{border-radius:0}.uk-navbar .uk-button{border-width:0;height:2em;line-height:1;font-size:16px}.uk-navbar .uk-button label{font-size:1rem;cursor:pointer;pointer-events:none}.uk-navbar-content{height:32px;margin:0}.uk-navbar-content input[type=checkbox]{margin:0 0 0 2px}nav.uk-navbar{border-width:0;padding:0}.uk-browser-bottom nav.uk-navbar{border-top-width:1px;padding:0}nav .uk-navbar-content{height:32px}main{margin-top:35px!important}main .uk-navbar{border-width:0 0 1px}main>div{border:1px solid #ddd;height:100%;border-right-width:0}main>div:first-child{border-left-width:1px;border-right-width:0}main>div:last-child{width:32px;border-right-width:1px}main>div+div+div{max-width:18em}@media (min-width:960px){main>div+div+div{max-width:20rem}}.uk-navbar .uk-button.uk-active{border-width:0 1px}.uk-tree{display:flex}.uk-tree-hidden #sort-date,.uk-tree-hidden #sort-size,.uk-tree-hidden .item-list .uk-item-date,.uk-tree-hidden .item-list .uk-item-size{display:inline-block}#browser.full-height{position:absolute;top:5px;left:5px;z-index:1;width:calc(100% - 10px);height:calc(100% - 50px)}.load #layout-full-toggle{display:none!important}#layout-full-toggle{display:none;border:0;padding-left:5px}.expandable #layout-full-toggle{display:inline-block}#layout-full-toggle i{display:none;vertical-align:middle;line-height:30px}#layout-full-toggle i:first-child,.full-height #layout-full-toggle i{display:block}.full-height #layout-full-toggle i:first-child,.root #check-all input[type=checkbox]{display:none}#browser-tree{box-sizing:border-box;margin:0;height:calc(100% - 33px)}.layout-left .header{margin:0 1px 0 0}.layout-top .layout-header{height:30px}.expanadable div.layout-top div.layout-header{padding-left:20px}#browser-list{margin:0;padding:1px;overflow:auto;user-select:none;height:calc(100% - 98px);width:100%;box-sizing:border-box}.root #browser-list{height:calc(100% - 66px);padding:5px 1px}#browser-list-limit{margin:0;position:relative;border-top-width:1px;width:100%;border-bottom-width:0}#browser-list-limit label,#browser-list-limit select{vertical-align:auto}#browser-list-limit select{margin:0;min-width:60px;max-height:28px}#browser-list-limit label{min-width:30px;vertical-align:initial}#browser-details-comment li,#browser-list-limit .limit-text,#info-body,#tree-body,.icon,.item-list,.item-list li>*,.pathway,.pathway .uk-icon,.pathway li{vertical-align:middle}#browser-list-limit .limit-text{text-align:center}#browser-list-limit-select{margin:0;padding:0}.uk-pagination>li>a{border:0;border-radius:0;line-height:32px;padding:0;width:100%}#browser-list-limit .limit-left li,#browser-list-limit .limit-right li{margin:0 2px}#browser-list-actions{padding:0 5px}#browser-details-container{height:79%;height:calc(100% - 66px);width:100%}#browser-details{margin:0;padding:5px;position:relative}.icon{border:0}.layout-icon{display:inline-block;width:20px;height:20px}#browser-message{padding-left:0}#browser-message .uk-icon-spinner,#browser-message.load .uk-icon{display:none}#browser-message.load .uk-icon-spinner{display:inline-flex;height:30px;align-items:center;justify-content:center}.pathway{overflow:visible;display:inline-block}.pathway .uk-icon{width:28px;height:28px;text-align:center;line-height:28px}.pathway li.count{margin:0;cursor:default;text-decoration:none}.uk-breadcrumb>li:nth-child(n+2)::before{margin:0 5px}.uk-breadcrumb .uk-breadcrumb-truncate a{display:none}.uk-breadcrumb .uk-breadcrumb-truncate::after{content:"...";text-decoration:none;cursor:pointer}div#browser-message span{margin-left:30px;line-height:24px;font-size:1.1em;display:inline-block}.uk-navbar .uk-text-right .uk-button{padding:0 .5em}div#info-comment,div#info-text{width:100%;padding:2px}.uk-navbar .uk-button:focus,.uk-navbar .uk-button:hover{background-color:#fff}#show-search.uk-active{border-width:0}#searchbox{margin:0 32px 0 0!important;height:32px;top:0;right:0;left:2px}#searchbox input{border-radius:0;height:100%;margin:0 0 0 -1px;border:0}#info-body,#tree-body{overflow:auto}#tree-body{height:100%;box-sizing:border-box;padding:5px}#info-body{position:relative;overflow:hidden;line-height:14px;border:1px solid #ccc;float:left;width:180px;padding:2px 1px 10px 2px}div#info-text.loader{height:50%;background-position:center}div#info-comment{position:absolute;height:60px;bottom:0}.uk-width-0-10{width:auto}#check-all{padding:0 7px;min-width:32px}.asc [class*="-asc"]{display:inline-block;margin:auto 8px}.asc [class*="-desc"]{display:none}.desc [class*="-desc"]{display:inline-block;margin:auto 8px}#info-preview .uk-icon,.desc [class*="-asc"],.item-list .load .uk-icon:before{display:none}#sort-ext{max-width:32px}#browser-details-comment{bottom:5px;position:absolute}#browser-details-comment ul{list-style:none;margin:0}#browser-details-comment>ul{padding:2px 0 0 2px}#browser-details-comment li{margin:0;line-height:18px}#browser-details-comment li.comments{line-height:20px;padding:0}.uk-comment-header{padding:0}#info-preview{height:calc(100% - 120px);padding:5px 0}#info-preview img{max-width:100%;max-height:100%;box-sizing:border-box}#info-preview.loading .uk-icon{display:block}#info-buttons{height:inherit}#browser-details-nav{border-top-width:1px;border-bottom-width:0;width:100%}#browser-details-nav ul{margin:0;line-height:32px}.item-list{list-style:none;margin:0;padding:0;-webkit-user-select:none;-moz-user-select:none;user-select:none;width:100%;overflow:hidden;-o-text-overflow:ellipsis;text-overflow:ellipsis}.item-list li{cursor:pointer;margin:0;padding:0;line-height:26px;position:relative;border-bottom:1px solid #fff;background:0 0;animation:fadeIn 1s}@keyframes fadeIn{0%{opacity:0}100%{opacity:1}}.item-list li>*{line-height:32px}.item-list li.file,.item-list li.folder{background-image:none!important;margin:0}.item-list li>.uk-button{padding:0 8px 0 3px}.item-list li a{text-decoration:none;overflow:hidden;color:inherit;position:relative}.item-list li a .uk-item-text{position:relative;max-width:calc(100% - 32px);float:left}.item-list li strong{font-weight:600}.item-list li input[type=checkbox]{width:16px;height:16px;margin:7px}#browser-buttons .button,.item-list li .uk-icon{text-align:center;line-height:2em;width:2em;height:2em}.item-list li a:active,.item-list li a:hover,.item-list li a:visited{color:inherit}.item-list .load .uk-icon{background:url(../img/load.gif) left center no-repeat}.folder-up{display:block;position:static;cursor:pointer}.grid-size,.root:not(.view-mode-grid) .folder-up{display:none}.folder-up .uk-icon-folder-up{line-height:2em;width:2em;text-align:center;margin:0 .5em 0 0}.folder-up button,.folder-up button:active,.folder-up button:hover,.folder-up button:visited{color:#444;text-decoration:none;border:0}.grid-size button,.grid-size button:hover{color:inherit;text-decoration:none}.grid-size{align-items:center;justify-content:center;gap:.5em}.view-mode-grid .grid-size{display:flex}.grid-size button{line-height:2em;width:2em;text-align:center}.item-list li .uk-icon{background-color:transparent;margin:0 10px 0 0}.item-list .selected{color:#000;font-weight:700;background-color:#d9edf7}.item-list .nofile{font-size:1.3em;font-weight:700;text-align:center;color:#ddd;cursor:default;margin:1px 2px}.item-list li .uk-item-date,.item-list li .uk-item-size{display:none}.item-list li .uk-item-size{padding-left:22px}.item-list li .uk-item-date{padding-left:12px}#browser-buttons{border-left:1px solid #ddd;min-width:2em;font-size:16px;box-sizing:border-box}#browser-buttons .button{border:0;margin:auto;color:#444;background:0 0;padding:0;min-height:inherit;font-size:inherit;display:flex;align-items:center;justify-content:center}#upload-options:empty,.thumbnail-preview .uk-icon,.uk-tree-hidden .thumbnail-preview .uk-item-date,.uk-tree-hidden .thumbnail-preview .uk-item-size,.view-mode{display:none}#browser-buttons .button:hover{opacity:.6;text-decoration:none}nav.uk-navbar .uk-button.action{background-color:#fff}.button .uk-icon:hover{opacity:.6}.uk-dialog div.big-loader{background:url(../tinymce/themes/advanced/img/progress.gif) center 50% no-repeat;margin-top:-33px!important;width:100%;height:100%}.thumbnail-preview input[type=checkbox]{margin:5px;position:absolute;bottom:0;right:0;left:auto}@media (max-width:800px){.uk-tree-hidden .item-list li a{max-width:36%}}.bmp .uk-icon,.gif .uk-icon,.jpeg .uk-icon,.jpg .uk-icon,.png .uk-icon,.tiff .uk-icon,.webp .uk-icon{color:#4f9245}.flv .uk-icon,.mov .uk-icon,.mp4 .uk-icon,.ogg .uk-icon,.webm .uk-icon,.wmv .uk-icon{color:#566485}.doc .uk-icon,.docx .uk-icon{color:#2133a0}.xls .uk-icon,.xlsx .uk-icon{color:#7bac67}.ppt .uk-icon,.pptx .uk-icon{color:#db6319}.pdf .uk-icon{color:#d00000}@media (max-height:600px){#browser-buttons .button{height:1.75em}}.uk-icon-refresh{width:1.25em}css/editor.min.css000060400000014561152456167170010137 0ustar00#wf_upload_button,.wf-editor-container,.wf-editor-container *{font-family:apple-system,BlinkMacSystemFont,"Segoe UI",Roboto,Oxygen-Sans,Ubuntu,Cantarell,"Helvetica Neue",Arial,sans-serif}.wf-editor-container,.wf-editor-container *{margin:0;padding:0;outline:0;vertical-align:top;background:0 0;text-decoration:none;color:#444;font-size:13px;text-shadow:none;float:none;position:static;width:auto;height:auto;white-space:nowrap;cursor:inherit;-webkit-tap-highlight-color:transparent;line-height:normal;font-weight:400;text-align:left;-moz-box-sizing:content-box;-webkit-box-sizing:content-box;box-sizing:content-box;direction:ltr;max-width:none}.repeatable-element .repeatable-content{width:100%}.wf-editor-container{position:relative;width:100%;min-width:280px;box-sizing:border-box}.wf-editor-container.mce-fullscreen{position:fixed;width:100%;height:100%;padding:0;left:0;top:0;z-index:10000;background:#fff}.wf-editor-container.mce-fullscreen.mce-loading:before{height:95.75%;height:calc(100% - 45px);top:45px}.wf-editor-container.mce-fullscreen .wf-editor-header{background-color:#fff}.wf-editor-container.mce-loading:before{content:"";position:absolute;width:100%;height:calc(100% - 41px);left:0;top:41px;background:#fff;opacity:.8;border:1px solid #ccc;z-index:10000;box-sizing:border-box}.wf-editor-container.mce-loading:after{content:"";display:block;border:.25rem solid rgba(0,0,0,.1);border-left-color:#888;border-radius:50%;width:2rem;height:2rem;animation:donut-spin 1.2s linear infinite;z-index:10001;position:absolute;top:50%;left:50%;margin:-1rem 0 0 -1rem;box-sizing:border-box}.wf-editor-container .mce-tinymce{box-sizing:border-box}.wf-editor-container .wf-editor-tabs{width:100%;box-sizing:border-box}.wf-editor-container .wf-editor-tabs li{cursor:pointer}.wf-editor-container+.btn-toolbar{display:flex;gap:2px;flex-wrap:wrap}.wf-editor-container+.btn-toolbar a.btn{margin:0}section[role=tabpanel] .wf-editor-container{margin-top:1rem}.joomla3,field-wysiwygeditor{--nav-tabs-border-width:1px;--nav-tabs-border-color:#ddd;--nav-tabs-border-radius:2px;--nav-link-color:#666;--nav-tabs-link-hover-border-color:#ddd;--nav-tabs-link-active-bg:#fff;--nav-tabs-link-active-border-color:#ddd;--nav-tabs-link-active-color:#555}.wf-editor-header{min-height:2.5rem;display:flex;align-items:center;justify-content:flex-end}.wf-editor-header:empty{min-height:inherit}.wf-editor-header .wf-editor-tabs{display:flex;justify-content:flex-end;margin:0 0 .25rem;list-style:none;border-bottom:var(--nav-tabs-border-width) solid var(--nav-tabs-border-color)}.wf-editor-header .wf-editor-tabs:after,.wf-editor-header .wf-editor-tabs:before{display:table;content:"";line-height:0}.wf-editor-header .wf-editor-tabs:after{clear:both}.wf-editor-header .wf-editor-tabs>button{appearance:none;background:0 0;padding:.75em 1.25em;margin-right:2px;line-height:1.5em;background-color:inherit;border-radius:0;display:block;cursor:pointer;border:var(--nav-tabs-border-width) solid transparent;border-top-left-radius:var(--nav-tabs-border-radius);border-top-right-radius:var(--nav-tabs-border-radius);margin-bottom:calc(var(--nav-tabs-border-width) *-1);color:var(--nav-link-color)}.wf-editor-header .wf-editor-tabs>button:hover{border-color:var(--nav-tabs-link-hover-border-color);isolation:isolate}.wf-editor-header .wf-editor-tabs>button.active{cursor:default;margin-bottom:-1px;background-color:var(--nav-tabs-link-active-bg);border-color:var(--nav-tabs-link-active-border-color);border-bottom-color:transparent;color:var(--nav-tabs-link-active-color)}.wf-editor-header .wf-editor-toggle{display:block;padding:.5em .75em;text-align:center;cursor:pointer;min-height:.75em;position:absolute;left:0;margin:0;z-index:10;border:0;background:0 0;appearance:none;line-height:1;color:inherit}.wf-editor-header .wf-editor-toggle:hover{color:inherit}.wf-editor-header .wf-editor-toggle>svg{display:inline-block;margin:auto;fill:var(--nav-link-color);width:16px;height:16px;vertical-align:middle}.wf-editor-header .wf-editor-toggle:hover>svg{fill:var(--nav-tabs-link-active-color)}joomla-tab .wf-editor-tabs button[role=tab]{border:unset;box-shadow:inherit;color:inherit;padding:.75em 1.25em}joomla-tab .wf-editor-tabs button[role=tab][aria-expanded=true]{background:0 0;box-shadow:inherit}#wf_upload_button,#wf_upload_button:hover{background-color:#fff}.mce-fullscreen .mce-resizehandle,joomla-tab .wf-editor-tabs button[role=tab][aria-expanded=true]:after{display:none}.mce-fullscreen textarea{resize:none}.mce-fullscreen .wf-no-editor{max-width:calc(100% - 10px);margin:5px;resize:none;height:calc(100% - 60px)}.mce-fullscreen .wf-editor-header{min-height:2.5rem;display:flex;align-items:center;justify-content:flex-end}.mce-fullscreen .wf-editor-header:empty{min-height:inherit}.mce-fullscreen .wf-editor-toggle{top:0;margin:0}@keyframes donut-spin{0%{transform:rotate(0)}100%{transform:rotate(360deg)}}.wf-editor,.wf-editor-source textarea,.wf-no-editor{background:#fff;font-family:monospace;font-size:12px;color:#444;line-height:16px;position:relative;border:1px dashed #ccc;box-sizing:border-box;box-shadow:inherit;padding:10px;white-space:pre-wrap;width:100%}.wf-editor-source textarea:focus,.wf-editor:focus,.wf-no-editor:focus{background:#fff;color:#333;border-color:#ccc;box-shadow:inherit}.wf-editor-source textarea,.wf-editor-source textarea:focus{border:0}.wf-no-editor{width:100%;min-height:200px}.wf-editor-preview,.wf-editor-source{position:relative;width:100%;border:1px solid #ddd;box-sizing:border-box;background:#fff;min-width:300px}.wf-editor-source iframe{position:relative;width:100%;height:100%}.wf-editor-source textarea{resize:none;border:0}.wf-editor-preview iframe{position:absolute;width:100%;height:100%;top:0;left:0;bottom:0;right:0}#wf_upload_button{border:1px solid #bbb;color:#444;font-size:13px;border-radius:2px;cursor:pointer;display:none;overflow:hidden;position:absolute;text-align:center}#wf_upload_button label{position:relative;border-radius:2px;cursor:pointer;margin:0;padding:.25em}#wf_upload_button input[type=file]{font-size:5em;opacity:0;position:absolute;right:0;top:0;cursor:pointer;width:100%;height:100%}.com_k2 .k2ItemFormEditor .wf-editor-container{background:#fff;border-bottom:0 none}.com_k2 .k2ItemFormEditor .wf-editor-container .wf-editor-header{padding-top:.25em}.wf-media-wrapper td input[type=text]:not(.field-media-input){width:100%}@media (prefers-color-scheme:dark){.wf-editor-preview,.wf-editor-source{border-color:rgba(0,0,0,.15)}}.xtd-button.btn.hidden{display:none}img/mask.png000060400000003072152456167170006775 0ustar00�PNG


IHDRee�u�DIDATxݜ�n$)E
��x�?�q�[�z�J�R\��@uj�����'�O0F��<��1����'��{IN�(�]ڮ����@��2M�v$�A��FL��8��S`�V��)��Mj9�<�5�H����>�}�n{�8~�.�����1u&o��!���]�P	��C'V�K��j�GVmy�(%  '����I̥BN���
	��<I8
��h@�p"�m�k�()�+Rr���7�SJ)O.����/m�ˠC���/Fx�pw���^KIni_��
R��ʎ�����Pi!�S�L|r�� ��Le�r����(��܅)��$�qR�~�f� 5"P椙6��]q0��F��bB�
��3P��I���
��P�#�I�����֔��g:�������wP	&H�
��)����Ho�=3�|4�}p�T�፮x�8�D�&-�u�IcF�`>+��`�
*�s�& )��wEQ�#����B���׉��YP�?8��=7�q�!�h�TTm��a��ꗇ��8��r��u=Qw����
�#]�G��Xp��������t�G$�>9-$�9����yWHl�����0~V��_R���,$�j�ͩK���ɹ��t��I@��p��*Ϝ�����?,����M�E�LM�%B�����Ի�E/��ix�uO���{Z�*Lk�Nnn��[��%��O�BRj�DH��I�i����F��](��Qa@�wp���bsk���by	Y�X����Q*�#2�^��f4<)�3�<�hQ�}���260�:ȇ�=�S��Y�J�Y_�'i%���)mRQ94��D2Sl�*0� y��s���
�5��PVT��Y�F�Е��̃��� )�i�(u���Z���ӆ�����A��h8�'�KүB�?]�y;�K�����_oYj���"	���-=�?G�m߆�8��)�%���Vv�6`��ɧOK����˷m�0@�	0dJJ�P�:�|�"i+Ʃ$�M�
�+�D��	N�)�����޽W�î�	,"*$"�B�{Ex0v�c���*\8�ro�5�G�mϮ���Ѐ��<���w��#�x8��5^��^` ��v�"O��#X	i����^S�'Oy��Y�]y��]!�Ԃ��d&E���Jh�{��sװ\6�6rW�>��#r�{b9�`��D���x*1��T��ΩMb�N�*�N������f���T�4����!��t��_y��*j�FF9,0ͪA����
�w�(dvE�8�mrk)��S���q���QxI	�
R��"�.����$=
�%�~9!rN�:Q�B�����G���Tg��-'$}ֳ���JR�E�&�K��$��$��)�ȥ�6��H�Q�^T�3��-�Ts�+�A�=���\k	�mG��`�-	{/s����2�!h�:_`���s)e�W�E���$�~�Q��/y��ws�H�1IEND�B`�img/ext.png000060400000017554152456167170006654 0ustar00�PNG


IHDR�E �,sRGB����eXIfMM*bj(1r2��i�HHPixelmator 3.92020:01:24 10:01:37����{-��	pHYs��#iTXtXML:com.adobe.xmp<x:xmpmeta xmlns:x="adobe:ns:meta/" x:xmptk="XMP Core 5.4.0">
   <rdf:RDF xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#">
      <rdf:Description rdf:about=""
            xmlns:dc="http://purl.org/dc/elements/1.1/"
            xmlns:xmp="http://ns.adobe.com/xap/1.0/"
            xmlns:exif="http://ns.adobe.com/exif/1.0/"
            xmlns:tiff="http://ns.adobe.com/tiff/1.0/">
         <dc:subject>
            <rdf:Bag/>
         </dc:subject>
         <xmp:ModifyDate>2020-01-24T10:01:37</xmp:ModifyDate>
         <xmp:CreatorTool>Pixelmator 3.9</xmp:CreatorTool>
         <exif:PixelXDimension>20</exif:PixelXDimension>
         <exif:PixelYDimension>440</exif:PixelYDimension>
         <exif:ColorSpace>1</exif:ColorSpace>
         <tiff:Compression>0</tiff:Compression>
         <tiff:XResolution>72</tiff:XResolution>
         <tiff:Orientation>1</tiff:Orientation>
         <tiff:ResolutionUnit>2</tiff:ResolutionUnit>
         <tiff:YResolution>72</tiff:YResolution>
      </rdf:Description>
   </rdf:RDF>
</x:xmpmeta>
���.IDATx�]	xTŖ>�ȾIIX	�
"��.���:�'�ot��F�����y3��Sq���Q��A6EY�@ !AȞt��I'=��T��N'�{���Kݪ[�ϭ{s�{jk�����4k�u�v{7�t��ZP�v�…��4�샧�����D�����d��l���ϴh��{'L�B�@UIg�f�6��Q�F���uuT[[K555TWg�OfϞ��2�A{��76�f� $(�B��)4$��	Y��E4f��7�����h�e���X��r,��1c��MC+�n�8�j��F�(s!�t�6no������5@TvE�"ԝ�@p�?mFu�DE�����!A@b`o�A���<����pk�A��Ҁ
�6�Y<Vܶ�o�h0_T����h��'��eu0�
6���|��MP>�B�9$GY���X�|r.���(.��ʲ��8#���"T�A�B3C;���Y�'հ���.a�w�=q�*<7�d�r��U\�6��W����tq~N9w�����&>.���z��՛�l8�WV� #<���8!�xzzF�Rp�8%�t���B��M�V
�ׯ}��;3S@���j�B�%���j�?Ʒ�EJ�8�b8�i��$w?��F�A����)Λ���U�8WZ%��c܆x�e�eBR�'\�t�ԉ��vm�djm�TnK|DA��õ�S

�R���S:$���9e܅
�y�T?���;<��Ӆ��a�<ۨ;�.��5;�І7?��=u6���j������}�m��5ߊ�����ƍv��dR��9�n�d��������Gύ���&$Aҹ�S��@?c|�)�[5��(?:?��3��[T��{h�v�<z�����f�!��<����F�̂��N~�!ݷkV�&��gl�l�~챧�R����CJN���7*�ƎO�?��zPh�3�S6�[/$�5{��q��$��H2jt��p��YL)lT:_�vs
�*�[�NH��3�8�҈����N��n��;FH�ԓO�5��|(�������+�SR�SS/���vv�v�PPp�>�O-��Rsq�7�T¾B��GϢ�"`�vʹ�SΏ��_��`o3T5�7 3�]�A�=�Q�{�]9�B���`Y3��m1%'[��f��?��w���TPQU�W;�(P��4x�y��ԥS/*�n�!"mٺ���貼
f2�w>@�"�����,�.qѴ��^��[��J��(9��b��eMTc�Ľ26:QSI�i�h嶝ԙ�q��e�נ��j.W���!xs�Q��@ȃk���E
�{jg�������� �䉾ݺ��:�FD�����G���9tA�(�-��!����5$5�O�^�d0��}_z3v�S�C��1��ȮHz0����k|�����K$?,½r������C����#G��½$�����.N�?�4��ؕ���SN��}_� �i22��>�22_����m���H���@��v�$����ȓ����i
Mm�(����n*�C��)@�)��hL��G����(:|�F�܁����)F@�x
l���*�tbr��v�)I��������'u���)h-�b��S��:�"��^������r�7���+��{?�%���[���k�Hvi2%t�k׮U
4g��Y<��4��A2`�郗�e��ީS(��;|�-���9EI���F=22(����iӮ]K�lٲMb T����Bu�F����pZ�����$iZOQ��0 �ߒ#��Cs��Q�\��R^^��}��:}��%DzXD]4���)��5OnX��Ӵ��A-�R �8]�x���B�y
�S�C9p`=O&I���T<"��)���)��WRT��n�22h������>\�rU�Ν?�O�a�����v�|b�66
_��`7Y,���^���X�����)��)8����B����r��.
V�|6�b�O���R����crss/�1���а��]}��q�:�+E�Ǒ��Y��(����n�-��dfVܽ[u�*	-�-��,�[^UIe嬵�(*6����ж�VPo���!uhk}�ל]�f�M=#�K"��f`e�T�ƺqZ��Q�U8��
���mxƌ����=YRB��NѾ}{)�X�X%�7^Q���������[��Q�	��#�[�n�t��Z�"t���#�-�(�\�����:�'^Q�������C_�3�y˵<�|�C�% ����xE�/-���ϯ�o�Sb<e��ի����1Xo2��rB���S����B�T�UՓ�"SQ�GZ�_F&&�M�:u�q���L]���СCԧO5M���m	h�A��E�B32,Θ1�M6ǘ��S�>���<O����|x�B�i,,=5N�q�	eD]8C�ԑ��A���W��s�Ь����$ԙ���Qw]s��Pi0�ͬɣٚ���CL7ڵ{�~�Ut�#���TR�F����C���������U?Z�N�*��S0��݋����D������bH���/%!T9�`g�ޡKGO���p�+�B��f����ON�����k�_��R�8�2��+��&�R,�IM-N���r
:� Iz�D��G����`�'�d�^o�
%����)6[z�>}q��r�Σ�Ad��TR�H��8%�d�s�ȑ�(2:zش�o�JC�xzG�&���)���H��+�h���׏��Z�))����h���pk*kl���=Ix�0�Kw�8E/#��m�m֞���=�%O���t�/“ՉJ����[�&w4*�9E6�y�(?MX]{k�.Qos��_Q�l�%�.U����=C�ј��pC�]D�S/'g�){���c���0�ڏ�I<;N�n�!:^�(];`��ft $��Z�x�ՙ�8%?�zć���Xԫm���Z��zmꝜ2o��H?�k���Z��)��8�o���㷋(����ko=]��9��%픽�]z{��pR���S�Ɩv��_�SsS�wN�}��P�S|�'V�z�N��`5Y��4�� 7��-�"�/pm�(9e�HL�$�<M�˦S�sG]5�,��3��0~�!�9E6B?��9E:J�<�n���_����7|��%FS���P:���x�>������ŋ���G�|1l��'�G1lw0P!/͑3������J�2N��7�|���VSq�c�y���H3�|�}����cBc)5�1�gҍ���F���"��KH,a!�g~��#6SM��^�K�-��K�`��LLλun���<$�3�T�Wkv�HS�Nṳ0-������CR�z�O������14<1B�M�qǝ.�ԥ	�ח��Z��I���:���&LRt�<���m9��G����=�U[�2q�dɞW\q��ߟ�u��cDv_ɲ�8ť3-":����S���im<E^P��?�CJ�CM���
�y�}_\�?�"��<

�r66
���9��y�($��y��͢f�y<9�C���g�7���)�K\R|��x�U2�f9f�,�7��I'�zK��@yu��Q~~>E��h�G����gXy���Ё��n����iА!B'"��"��7��iR
Oʹ�Ç^L�W��M�����f�6t�0�c)%G�r|B�i�L����Q%�#��8�Z\w>��)�k��y���i�s�}WЀg<�G@�g�'�g�'�~/�Hp~N�����}�B9�r���q�s��fPo��(o��rʖM?(m
�!�/?�<3N������;���������[C�޲�}�R]YI���J,y���Y�p�Kt/�߸�[�VU�t=bhC�)&��n��G�qY"ĭ#4+�:
8�O$�l�1��²e�h�LU~��(���/E^s�'N1:ק�4�a���_�6�~�!��3�����q�P����!	�k'LP��,�n�#z��)m�������x��r
�S�I��{���[��?l�I����L<����o;��d�54(�)(6���%��LW�v�!�Q���,�Z}�N�<X^ZO�3��&�G�о��	��+iF?ާ�������ڴ{7s���BQ�"Gr2$�%�>��5QdD��w�����
΃%��lËx��.�j���OT�4�	���9�RŸx��pӞ�J�vq
jI	�fg�p�Y���e�2�q�AB�'��[�"��ڍ@8��L�]8e�E�w�NI�Cǫ)������?�l��>K8�w���D��i�\�3*�0��9'/o��I�n@����GIa�j�T���H�y�u�_�o-Y��ƍ"���g���?�
�A�pF��!?�d��ڒ����-��P���EB���)��Vd|(�4ԓ@�$?`p��Wb����켁�Py�,l�d�<l8l�(�(��+
\b�~���m�N�A��� kl������/�I�$�ɋ T'��ؾ:���*;9Yy�x�T��C��ti�W��G틽�7��Eɼ���F�C�v��:�w��
��£8yC��.e�cK�<u	P���s�b�����8�k�t�m��>����1�1�#mux��(��G�!Α�����O�9
��^V�By����h��wg���-�vʹ�S~����k��jH��7=���'>��yJc�Dw��쮟R��Tp����۾�.�*@�S̡�=b��C��^<��^�n�R���$�,�N�#��1��
=�}����F�>A���6�=�w?���xH3H(�S���!ګ��]��P��=9����~_@i{�%v~��hdYH&��b��T�4$�{��&;Î�)J��>���0�[+GŧҸ��������^l�=>�1G��sK�5�K쾆����B(���"�]�,}��c��C�O�����Y�0o�易��я�;_=!�)��UT�\�/2=��-o������>-@�6���"q9=�M{����PK_ly���bݙ7C�HGz�$�ON17��
tKL�p���)B��#��<�wD9��-6�cLx҅��ȗ����У�l�5n�����ီ����J�W�vr��3�ĵ3w86|qn���6{AYw%�̐�"o�3(	A_���/]��u���%l�S���9_���HpJcKY:��"��?�І?����f��gͲ�-.�/��K�Ǵ�o�9s��
��-�2��pu	VY���d���n�#������vhC�%��wS�?�f��/R%��=�&N�H���ծ1��D�0|ܽ�R��NV
���s�crrk�QFJ0�����I���Tޖ�[�^���8E)T�.a�t
*�����/�8S����)��'K�x��t�ԑD�e�.NA%�x��y."΃T��q�jC�}	R����ҧ?�����S��n	��e�3�����Ϲ�/D�SZ���+���m?���S�����{h��[!wZ��H'9�I���<*��J��~���ƍ�"a����
NUs�
�
��W4�s�>*.9I��.8���)	���x�Oң�R�8��O=~Xh�̌J�9�i3�}�e*�N�W����Z&w�)UΩYm�M.�)_h�E��;�{��w�t�˨[��)!S����9�ӧ!i�9�py����R���N�&�� U�;��)�i��s����A�/�k��-�/�������Gwxm�ʿi_ߗ�t5�0W�:A����Rr)��)dON#䷛S�0ˁ��wE��C����}���z�^��C���d�2�`��e_�)@Ke
����E���t�Q7�� ��t�Gp��t�8Ei�F�C�'�gH�=X�8�C��S ����(�$�Y��մ�!��!�-v�lj�m�{K��0��
Wj7������}����ω��R�g�(	��q�O�AQJI�Ô��t��s
�>��8wu~��k�S���'1
+mc���O����;/�E�9��g����.Ni�4р�X�m��c2�d2���SL�V1n�]�ip�pb���b��[���xF?n���Y]H�2v
l��R^&�
	��{OR��Q*���d�oN����Ɖ�0^�8|<'Eő�;Eݲ�ڸ��^9%�O��F��e�͇8�i����G81��C�o�{�=z�N������S����㯣�56By��w�ڱ���Eޜ����M<�N~O#��G��y�eQF:C�?��kxW�%~(@���?�O}_	QӤy�P]m���b�����~b"�œ3��a���y�"U��{��8�=^�?��D2�-����A�rg��w��uʿ�7�$�=u��tmWu)��A��q�U��З+W��9/�,��1���?PO^�"˪L�n�gB«���᥎�v�}��oPV�>�?:_-�@Yq�������i�a����y�^�����Bj�Λ7O��{���0�}��^dY��<跌N�ꊊPY@J*ΙC0���β]8������'c��$}��#��IEND�B`�img/dash.gif000060400000000055152456167170006740 0ustar00GIF87a����!�,�`;img/marker.png000060400000000414152456167170007320 0ustar00�PNG


IHDR�d�q�IDATx����� D͉KZ@�7A4A?���@��7�-Z�ʶ�D+�V�9����9`4��.�ė��D���Ӊ���N�Wq�]�_ڃL�P"�F5'6�e�Ϥ��@Ӑ&q�f�
�z݊t��-Jy�*"��A�E�\6�k,�g9�0H<���G7�K�.a�}jX�V~GE�R�e{u/��#.ƔT��
G��7�+k��IEND�B`�img/cloud.svg000060400000001616152456167170007165 0ustar00<!-- Generated by IcoMoon.io -->
<svg version="1.1" xmlns="http://www.w3.org/2000/svg" width="549" height="512" viewBox="0 0 549 512">
<title>Cloud Upload</title>
<path d="M365.714 262.857c0-2.286-0.857-4.857-2.572-6.572l-100.572-100.572c-1.714-1.714-4-2.571-6.572-2.571-2.286 0-4.857 0.857-6.572 2.571l-100.286 100.286c-1.714 2-2.857 4.286-2.857 6.857 0 5.143 4 9.143 9.143 9.143h64v100.572c0 4.857 4.286 9.143 9.143 9.143h54.857c4.857 0 9.143-4.286 9.143-9.143v-100.572h64c5.143 0 9.143-4.286 9.143-9.143zM548.572 345.143c0 60.572-49.143 109.714-109.714 109.714h-310.857c-70.572 0-128-57.428-128-128 0-49.714 28.857-94.857 73.715-115.714-0.285-4.286-0.572-8.286-0.572-12.286 0-80.857 65.429-146.286 146.286-146.286 59.429 0 112.857 36 135.429 90.857 13.143-11.429 30-17.715 47.428-17.715 40.286 0 73.143 32.857 73.143 73.143 0 14-4 27.714-11.714 39.428 49.714 11.714 84.857 56 84.857 106.857z"></path>
</svg>img/power.svg000060400000013544152456167170007216 0ustar00<!-- Generated by IcoMoon.io -->
<svg version="1.1" xmlns="http://www.w3.org/2000/svg" width="448" height="448" viewBox="0 0 448 448">
<title></title>
<g id="icomoon-ignore">
    <line stroke-width="1" x1="16" y1="0" x2="16" y2="448" stroke="#449FDB" opacity="0.3"></line>
    <line stroke-width="1" x1="32" y1="0" x2="32" y2="448" stroke="#449FDB" opacity="1"></line>
    <line stroke-width="1" x1="48" y1="0" x2="48" y2="448" stroke="#449FDB" opacity="0.3"></line>
    <line stroke-width="1" x1="64" y1="0" x2="64" y2="448" stroke="#449FDB" opacity="1"></line>
    <line stroke-width="1" x1="80" y1="0" x2="80" y2="448" stroke="#449FDB" opacity="0.3"></line>
    <line stroke-width="1" x1="96" y1="0" x2="96" y2="448" stroke="#449FDB" opacity="1"></line>
    <line stroke-width="1" x1="112" y1="0" x2="112" y2="448" stroke="#449FDB" opacity="0.3"></line>
    <line stroke-width="1" x1="128" y1="0" x2="128" y2="448" stroke="#449FDB" opacity="1"></line>
    <line stroke-width="1" x1="144" y1="0" x2="144" y2="448" stroke="#449FDB" opacity="0.3"></line>
    <line stroke-width="1" x1="160" y1="0" x2="160" y2="448" stroke="#449FDB" opacity="1"></line>
    <line stroke-width="1" x1="176" y1="0" x2="176" y2="448" stroke="#449FDB" opacity="0.3"></line>
    <line stroke-width="1" x1="192" y1="0" x2="192" y2="448" stroke="#449FDB" opacity="1"></line>
    <line stroke-width="1" x1="208" y1="0" x2="208" y2="448" stroke="#449FDB" opacity="0.3"></line>
    <line stroke-width="1" x1="224" y1="0" x2="224" y2="448" stroke="#449FDB" opacity="1"></line>
    <line stroke-width="1" x1="240" y1="0" x2="240" y2="448" stroke="#449FDB" opacity="0.3"></line>
    <line stroke-width="1" x1="256" y1="0" x2="256" y2="448" stroke="#449FDB" opacity="1"></line>
    <line stroke-width="1" x1="272" y1="0" x2="272" y2="448" stroke="#449FDB" opacity="0.3"></line>
    <line stroke-width="1" x1="288" y1="0" x2="288" y2="448" stroke="#449FDB" opacity="1"></line>
    <line stroke-width="1" x1="304" y1="0" x2="304" y2="448" stroke="#449FDB" opacity="0.3"></line>
    <line stroke-width="1" x1="320" y1="0" x2="320" y2="448" stroke="#449FDB" opacity="1"></line>
    <line stroke-width="1" x1="336" y1="0" x2="336" y2="448" stroke="#449FDB" opacity="0.3"></line>
    <line stroke-width="1" x1="352" y1="0" x2="352" y2="448" stroke="#449FDB" opacity="1"></line>
    <line stroke-width="1" x1="368" y1="0" x2="368" y2="448" stroke="#449FDB" opacity="0.3"></line>
    <line stroke-width="1" x1="384" y1="0" x2="384" y2="448" stroke="#449FDB" opacity="1"></line>
    <line stroke-width="1" x1="400" y1="0" x2="400" y2="448" stroke="#449FDB" opacity="0.3"></line>
    <line stroke-width="1" x1="416" y1="0" x2="416" y2="448" stroke="#449FDB" opacity="1"></line>
    <line stroke-width="1" x1="432" y1="0" x2="432" y2="448" stroke="#449FDB" opacity="0.3"></line>
    <line stroke-width="1" x1="0" y1="16" x2="448" y2="16" stroke="#449FDB" opacity="0.3"></line>
    <line stroke-width="1" x1="0" y1="32" x2="448" y2="32" stroke="#449FDB" opacity="1"></line>
    <line stroke-width="1" x1="0" y1="48" x2="448" y2="48" stroke="#449FDB" opacity="0.3"></line>
    <line stroke-width="1" x1="0" y1="64" x2="448" y2="64" stroke="#449FDB" opacity="1"></line>
    <line stroke-width="1" x1="0" y1="80" x2="448" y2="80" stroke="#449FDB" opacity="0.3"></line>
    <line stroke-width="1" x1="0" y1="96" x2="448" y2="96" stroke="#449FDB" opacity="1"></line>
    <line stroke-width="1" x1="0" y1="112" x2="448" y2="112" stroke="#449FDB" opacity="0.3"></line>
    <line stroke-width="1" x1="0" y1="128" x2="448" y2="128" stroke="#449FDB" opacity="1"></line>
    <line stroke-width="1" x1="0" y1="144" x2="448" y2="144" stroke="#449FDB" opacity="0.3"></line>
    <line stroke-width="1" x1="0" y1="160" x2="448" y2="160" stroke="#449FDB" opacity="1"></line>
    <line stroke-width="1" x1="0" y1="176" x2="448" y2="176" stroke="#449FDB" opacity="0.3"></line>
    <line stroke-width="1" x1="0" y1="192" x2="448" y2="192" stroke="#449FDB" opacity="1"></line>
    <line stroke-width="1" x1="0" y1="208" x2="448" y2="208" stroke="#449FDB" opacity="0.3"></line>
    <line stroke-width="1" x1="0" y1="224" x2="448" y2="224" stroke="#449FDB" opacity="1"></line>
    <line stroke-width="1" x1="0" y1="240" x2="448" y2="240" stroke="#449FDB" opacity="0.3"></line>
    <line stroke-width="1" x1="0" y1="256" x2="448" y2="256" stroke="#449FDB" opacity="1"></line>
    <line stroke-width="1" x1="0" y1="272" x2="448" y2="272" stroke="#449FDB" opacity="0.3"></line>
    <line stroke-width="1" x1="0" y1="288" x2="448" y2="288" stroke="#449FDB" opacity="1"></line>
    <line stroke-width="1" x1="0" y1="304" x2="448" y2="304" stroke="#449FDB" opacity="0.3"></line>
    <line stroke-width="1" x1="0" y1="320" x2="448" y2="320" stroke="#449FDB" opacity="1"></line>
    <line stroke-width="1" x1="0" y1="336" x2="448" y2="336" stroke="#449FDB" opacity="0.3"></line>
    <line stroke-width="1" x1="0" y1="352" x2="448" y2="352" stroke="#449FDB" opacity="1"></line>
    <line stroke-width="1" x1="0" y1="368" x2="448" y2="368" stroke="#449FDB" opacity="0.3"></line>
    <line stroke-width="1" x1="0" y1="384" x2="448" y2="384" stroke="#449FDB" opacity="1"></line>
    <line stroke-width="1" x1="0" y1="400" x2="448" y2="400" stroke="#449FDB" opacity="0.3"></line>
    <line stroke-width="1" x1="0" y1="416" x2="448" y2="416" stroke="#449FDB" opacity="1"></line>
    <line stroke-width="1" x1="0" y1="432" x2="448" y2="432" stroke="#449FDB" opacity="0.3"></line>
</g>
<path d="M280 64.132v59.482c15.84 6.914 30.406 16.803 42.995 29.391 26.443 26.442 41.005 61.6 41.005 98.995s-14.563 72.552-41.005 98.995c-26.442 26.442-61.599 41.005-98.995 41.005s-72.552-14.563-98.995-41.005c-26.442-26.442-41.005-61.6-41.005-98.995s14.563-72.552 41.005-98.995c12.589-12.589 27.155-22.478 42.995-29.392v-59.481c-80.959 24.097-140 99.082-140 187.868 0 108.248 87.753 196 196 196s196-87.752 196-196c0-88.786-59.041-163.77-140-187.868zM196 0h56v224h-56z"></path>
</svg>
img/wheel.png000060400000025571152456167170007156 0ustar00�PNG


IHDR��?��+@IDATx���U���י��$$!A�Q��"?����"�~�����,b٥��P콯;º(�F�a����{@:�R��o��g��u�̝<yr��\3sf���}��=���j�����j�PC
aj�!kF��Mg1�5��PnF����M)7��N�SL&n �Bf�L�["�T�1�G����܃���������L!��[La泉;�ߙrG�m)���N�%������8Drdȑ�?�r���)w��
��\�=��5�a��lI�b�)^D�q����٦aHQ�������g�����E�0��rfoF�ū(^��*���KZ,��O��
~m�\l��!	��1e{D�/q��D�'@��O����d���9��[�[��PC�SlM<��@���J�V�������Q���#r��S����7�Y�t���g��~��|�H�����0�(Y�(_(�����6��?f[t��[�H8�� �Y�u���6��b:�{���ڷr[s]�;�*�+䮐9�d�b��L|}��S��R�P��r�j 7�i	Gsj���:���W�o��������5�:��N���(�=)C}���=�k�0�*w�*y�`T!����=_���°���i��1��S�� �m
A�
0��=	@�zI��E2��n�{PN,N4qt�&3�5�8�nU�A�"�Ww>C����}2]�[,����xpø��Čb'�I���̫ԸCZ��Ðn�S�4Iwu�ݢ�=�,,Y�a8ں�/|b3�GS���!E��pi����aH_��%j$Kث�\棶v�u����:��y��O����uA:���v�KO�}G�Sxp݄��-'�mq2�A�9%���
� ��qC�lT�C���\,���
���\�OR�0��EK@��`�
�)��J*��V��B��J���u�oX7t�W� ��\ʬ��н+�����=2�Z�P��b��r���?t��v��r^�*���#&h
D�	:t���A�k��uT`�*�u�����2��O`���Ư��d$~�rZ}m��t�T���c�"R�)
��ʾB�A.�zzzr��+�h_?$�J�y.�n�0���[���(�B�!
E�.R�����(�P,������B��O�|)�OaD�d�\f���r3�l�g3=[��Fn�)rS���	�����+$"Q\/�r�F1Zm����|�]k�?A��Z�P���1���_Cy+��@�Kmm�+����=Wn�Yz6�3���.�#K��<�X:�`���w����k�ϧܼ>�[9C�F��R�G(�����u<u��4���嶕�Yn/�}䶒��'W�d-�hQ;T�J�7E�c��s�������͆Mckg�\��x���(Œ�5����zF�`ċ�8@�r��UaHCP����)8_��o|�p����ϝJy��6B)݊�3�^����]�lW�I�����+dг��Fz2�T�y�P=����k�⦵ï�]����,�$��L{�B-)�����Y|	�0atnf��Lv��Ar��Mk����$�Mϛ�_k�ˬ=��73Y�%�;(��5A�Pj�2
:�e?�M&����͑{��z�ʅ�+�A��#
D�-�5�U����=oL�-ʃ�n�.�[:CAy'�|��X�t�i�lno��y��4�ļCEtM{@�m^�w��	��I~��Ah����\Hq:O�ǃ�w���#6�*��V�HMM��p;f �s �y��f���`��(ߦ�5��R�x���~���>���f�c�cev��#�l�Y����+�,�Zs�WӘ�E�{���ڧG�%��>�?�z
u��g�ȡ2G�<KOhC�~��2��5�u֌�w��S��Q��FN�b8�����D��}C5�gO�F�D=�M�.�k5���[M�/�\30�b��Č�� ~��G�#R <N�!O~Z�������� �q��!���= ��Gí�g���	?&N�T@l�
�*�K�����_����k'mn���۠̕�]�(��⧦;K��g޸+Ņ���"=��_Jq6�GQ ]���*s���ʅj�!�Q�}���p��i�;f��"�]�iQ��q�0��l�,7��t��5�W��D&O��!�.-�ۖ~�8��(\3�
O�|3Qs�QD���j������$�ʽ]n�Lz6�=�ʼ���^�nj;O�<�2�@��D�
J�K���C�Y}�-�m�r�����s!Q?�G�W��axH����U����Zal�B��+��C��xpf��}NnV]��|h5���&ޅ��;M
w?��R���4Ŋ�k���bC�}������ܖ-@H0���s�NG�k���oM8A�\�e�_a�<<e��K�-�]��eBrd)�`�u�G����'t�
z;q>e�X���(ݞ��i��p�h�것�0�dv�	c.��4��M1K�W���啔���v�T���ⓄO�o���E�3�me��3��"��=ƈ/"�B����C�ݠ	��2�?��b9���Z
��]���S��k�p�������^���	}���U�?Q47M�b���<y��/_n��=�u��C�sׅ}����3Ҏ������\�q��]�㛐_E܎�p�6��EIyKߩ�<r|��p}�,���Կ=����f���f�*��:�n �ܖ�%��h��,j�I!��B�J)ҵC�X�Y^@y QU�eQ�@K���a����U������M�3ԻA5��^Ξx�}��ֆa�dWgԧF�m}��cn�*�AU���������?/}�Y�B�ݾ��H��v��*���e���~n:�#v�&��fgQ������)�"ʹ�X��5�2;��C�����B�9̰�قWɄ�;T@�A5��������n@4�u��oƹA�Z�Bͼ�r�f�/!�S�w�m�͗����`
��-������mMv��v� Ȁ24N��ۘ7�X3���r.�xI@&� &�H�D)�b�ۓ�q�ۚO{:�����a_&�G�#Δ�^S'�.��T����7�g��ȹY��ע�0F *|��S��=R�[�8�/��-��*Ⱥ��6}�
B�����WB$
B=��u(�!�,ᒰ�2�ޏ ��!�P�_j�8���q���u���$��a���F&�@n/� ���@X�׏����}ј4=�9��06(�(���D���k�G��>`��Z���J_���/0�"���jJ��ʵm�~(�!�M`�*(*�@��[��ƃ�*N�j�n��v@hZ��
m��g�Ϸ��SKN��@���y1��P�8���.��k�q�T=Q.#�g��W�D�`H�kTZV�\�n��G6�sI�.M�cs0�ܚ���:ü���s�!d��H��F�X�:��%�E_��nsH�l���V�	�E�*٠l
A�~�--�7�V�9j��!��60)�B�>�P���>��X]< ��Z�X?���U��m?��bΌX�AHCP�_�:�aZ��
�jYs(ʜ/�Xm���w�����?N_�>���qH�n``��s��K6N}�8	ƣ#l��J(��0u�el�!Fu��>{�OZhj�o-@0໨j�>�2�y閾.
R��!�G��E���V�P��%����S�8��ǁ2p
�AK~�0�u�탻ŵ�;џ5��|u-�R�D�*٬
AG�+�ao��+���s����
h�Rí�슇����G��bM��A�>�3@X�-��_�B�?EB�#�3����F��M��A���̘��3T�����k����5�������Ϊ�v��v��v#\�h,��
�s
>N���1��_K|s�W+ñ��
i��E�n_���d�㺾�0ԸM�����Hz庞��]��wչC�v˽�B��YQ�
1\�exY�>�‘VS��o@�w�tKv��	�l,��"�W���K����%��À�N�'�Q�� ��p~V��T#�=�̘�k���}9C��%��}]�uߗ�,1Pس�
�f..yuDW
�DZj���R�@�u�ݨҿo��QZ]E�Mj�T&}>yN�;y� �?��TP�s�}Yw0p�07rF��j0�����=☖c��5��9jn��}��g�3t���>��ѓv�Rgw�ҁ���'��������+�>�UJ�
DY�C�3��7��8
qj���vj���?gG<�m�K��DPwP�j����s�<kxM��{�Z�' ��	�C�~|�
���+T_��T]��!��{t��� ��[��ۯViBu?q]z��Kw��=J.�l���
�����CU��X[/|Ǐu�bVny�@��#��}�w?J��J_��oq>K��w��B�9���zҠD��2�#U�6�p/J/�iC�~<Kt��E�4�<��zD��o�ק�H�5�>k�7(`�pR��"�>�nP9_�B����/�*g����h`�j�O���0j��-���d�T'�����K;@��"Ft�˄�#W`��!��p���pN\e�4;�2U�/�����P/���mw�� ���r�k��k�ק[�0�܊g��S�TA}PQ��HU3B�H�T� ��
�x6��w
6�On{�:(n��=�Vu��a����pX}��S#�����Q&W�� �_�>�x%^�c�$zk�⸣I�4i �`�����[�r͠a�P��~����>���l��F��
o1���غܵN���s8Nǚ�}0�.v[�@:�o	B"%j��Du�9�
�F���&N �玂�6	q�
2)WH��g���c�-S�&ko4f�ڧ>�T�	@�NH�@�A�@��mئܚ;B���U���K���ҩ����	��X�G��6EnG�n�m�;}������P�~�C�~	P�&�2
�3��H�a��Z�f���3���}Z@�j�ZWۄ����iy�8Au[�?�t�pD��%Y�����\�猂��l���c� 4O�~��7��2C"�i���F�:���t�Ӂ��D_���Sa���0)	C�
���4���Iۇ��6�A��a��y8���h6t��3�������oC�`���9A��7~$lQp3���>���E��<�
��$�%}��@o���	Ҧ��E���iy�o�y���-��DA��l�L�j@��Ϙ�+¿Dե�f�
�P�K�K#/��
@o�v�`]�;��q]_����A���' �I�;�%�{,w�X��w���8�x�	�r�4,���!�[��\&�v�8kq.5о@����m;p�^�x�0|[�yw=�>����0 |i4�ι%
Bc�3Ho�v��˥ۧ?��:�K�yK�~�ޚ��‡#�"P�%4�8 |1���ʸ2�a�\�=Hk�\�{���dX7�j��0L6 }Yx[�t� !E��t�ύv��~����D~��i@zO�w�	�si �"m �Z8@#k�/	�G~��a�@D.�+§G;û3�?W_�'8Ā���o:I��2�k�&��C�|/Bu[q��A��Y᥁�`r��;��G< |"�Z��!|YB����w�w��E����W��\/�,�+}y�ɲ�9Au[ݯ�A��Ia猫��F���]� �::M��'SA�D��q����Z<s�5�[$�H��h~�����0R�b@�'l1�r�-J+���p�hN�K�Rx3E�—H�M�b8�����]>�ij\�ڗ�/�{Â����r~�0�܇�Z�R@?�����Q��9K����h�ah
DGO��-`�@��
j��6R�(�	N�t(�f�����K�Gݨ,9��N��ڠ�uE<X����B�f�h��$@��C���5�<![�"�Ѝ"2����iRg0�4��#���O���!����/H8C��5ǵ.PbR��ðt�0?�S�Q�)�&u��
���0���4)r?��F�L�pL`���:�C>(��,��
P-��
�?�Z�-�Gzh�����0�a��́i�E�W�C��8��Ĥ[lB�l�-�O�0a8�7�Z@PU�N�}`4����4�����C^��dH��⸺��0�.��A��!��u�ϯ0ax��?~-A�Z�w��y��T�p�c��L/��\_Y/`��.�m*K���c�%܇���ّ[���*ʠ��!�
�+��]!��y��U�E���"}\�xE�}�4��a�\a~���`H\�����#�r��0��T�K���)��^�0��`��Yӧ-ה�Z�a�b��^9_s�;xULJ�Ox�0!��{��4����Q�Ł�o�������tƄ�aþ�SVN�����UFy�%b�T_"������V��'<C^+�sQƤ�0$^m�t���%�
�0�66��!r��h@��Cg8"��,C2]
u/~ST}�qU:%j��:~%}U�Mx�0�f�+鳆A�%R���Wҿ!��0#�Y�*}�P�ˎ���s&4C�^�mئ�+���E��+ٯ�!���ٺ��~x��g��:wB�0�a��]�����o	&
�U��՜�#J���>�#���8�<�a��an�=-a����~��U��6
�#85�esg���O߶��&4C�N�8�	���x�׫��[��ް�G�[;A���E���!A���geUꎓ0�(�+"Ue!N�ƣ�)�௸E���8�tɄ�aî��+��FnP��|AE�呪.1���(���a��1��%:�u�!�N�X �ahG��*
/�V��!~�7�j����@��c]9!a��|'��9T�6eJ?� ��LEa��	�ߤ
爺k�����=:�LH�0l/�sy`�j��I�p.^U��j`X�ԧ�@`F�B9
���ǘ�a�v�'3N��j�ڗv����PU�=�X�a��(��Q��p���	���ӧs}�V���%��[���ܨVO���&j�Z@"J���g6��B�!u�R��qF�H���m���PU��!>+pKd$�k��0<Y2��H7O(�0!l�ŁWg�!H��<�U��V1���/K��Jbɷp��t넂a�Ӆ�dL����_={�5
;G���ߏ�Et�J���d7,ԁ�P0a�X��󮌐��;�r;�P� �.!n����d��Ӥj����,�4>�-�00a�!l�su`�U}AZ�9�^a���v�|���P�/��Ϯx�j�	��
�/�)��T��G?�<�HU�I�j��&�]"�eM_�\Yr
��!S�mW�l���ڮ���QB�4	���M�
���#T�(����<!`����sdFhBu&��!"�%��
�+����T�'����%_ı�עu�!A�9py��Y�1�ãO�
�*��q�H�Bܩ�ZL��- 5��}p��Z�N�0�!9�L�B�M�A��	ψ���y�
IwH8E�~��X��g��Gz��"n@��p��qM��삛I+l5��_�y��h��8[��Y�0a#�\Bܥ-���3��\D�
��
1�;~S�w�Q��֒�xp��3N�<���GG+(�%/��*̈���s�F�$5�%���R�-�QN|�03^@~��VU(*_V"U����wqds.���lZ7ԧG�Q����_�\qٺ��`�����eP!�Pd�w���i�0%���8'�5���U��m�W�
�Z�`���3>C<�2O�BMd�|��p�C�;C�6]�ɴ�f+ԆS��	oDz��&
a�b�$N�� 
D}�ƨЋZi��Ź�^s�aYF���'C�-�%���]}�"
X����;�؛�Y�76!B�<�2�0K(>�.�0�!�n�l�WQJ���ڷ/�C�0$j�#WEfԃ��L}n���+�7�a������#)s"�J�$HQ|�x<��A�a2�>�ʔH��	��(X`����0�g�x�)?M9�j�Bc0ʻY�g5N��!
�&#\ٮ��!H��J�s�O�
��!��]�Lyqƪ��/�AK�w��K�X]��7D�.��"��}y�__�4K��*�wa�0/؇���gP֤F��!	Dy!K�2�3��i�!8D@F{W�
��2�Q8�
5�u�^{~J�5�dK�C
�(^�����8]'
Ol%w���\�	�2�O��'�7�U���g�m)E���O�?�ǿ���Ӥ�v���^�"
A��I�O{�g�1^�{P�A�a�C��:!
EM�p9��_0�8b��ʽ5�e�	8���e2_Q���5~tվ�)�Kܚ���C�A(�>�^G
�,�jڃϔ�Tf����]˫@X!������P��Z�喣�=50��� {͌�������iR
�����r�#֎��(dp��(gUhDl>���1���a|�bfc'Ȝ"�5M��S��c�ܥJ��C�a����R~�bf
��X_3�g��H�j<�cq+Q�{������W����B��aT_��A�q��֌~>wS�S鿝8�B3J�6)ӣ�_�����,Ӭ;g�]$�K�a�j���eN�w<�4�Y�y.�W)_B�'H��a廹�'���`�y�Uυr�Z�����p,�;ۈ��^Cu��>�C�'R�-e�H�D_��7}}X7a1��z~,7�E�.��*$J�e��=�Bi��W|��8�r.�U�0��8KPA|��+\���2_��ɐ#�L��!�n��Cѧq����_a��܁2�DQ	�:(�0���V�o�(�׈�"w�Lh1���v)[)w�̉���1��P��
���RL�|=i��[)�ŝ/A���3~?ͦ� wx�k:�pT��Ȝ#�\�I��|L>��(�gQJU��H��p��,;�ZC
�n֨��f�i�&��aH���r�|ߨ�C�ԯNf��c)w���}=��Q��zş(ތ+�Aq/k\�_9����Et� S�Y(w����A뻎=m�ů�8�b/����ߦ���fŁX`
+�/�V�ӂ�M�-�� 4QJ�Pm�ܝ2�E?��77o��M�!ʗQL��� =���o�K�֞v�3M�E�wʄ�듚�B��*�)��+w��p�����6�l�{)w_Y�DJ�8�d�-ց��8WZK
⫭U��W�E��9R.kY;�W��պ=�̟�.��c�K�w���n'���܆b�*���e�P�_�t�7㿬E�Z����f:A�����-�J_
 K��%w�I.0��xҺ��C�mY�
��ߍr#���u��G��J�R���eq?�B��7bc����ի�-AH�(���=z.0�עk��x՜�z�w`�K(�H�|ʍ�畠�q�Z@@$A�8Bq>�a�L�q�q�p~f_���/�y�#����%I���`X*�����T�7�U8^rY�
���P�E�7�V3������3��()�I�(7Nă�;���]��v�'�oh5��*�� ��+]�q=7��f�;Mu��<�B��s&���[SnG���{�:�
)FFj_3��6�P߿��D�&�G
���j�ϰ�/ȽE&����߯�����p�+����Y�rw��~���Y$��O�,�S�+F0�"g��30����7���6�PN�?ue��A�����z^�XȊ#X���Mb�U��T�|@�cr�Z�i �-
C��~���D=}�BO���BV��Em`E�2��)j�:q�E]�=j?�\\��>��8U1�u�r��J�U����7$Ҧ�����պKŅJ�~��qz���R|�ş�"�XA�k�С?�ˆO�͕���HwD�Z��4�mj��Kt:�p���b�5���M1�\�O�̒�)��pT�4-`��MV�u�
-j���XEAq6ˏ[�C���7��m+w�ܛ�z�g��C��뇬��R�4��oC����n�������!���I}�ɢ9z>��������k�-`(����2��x(�)���S��*� c��?��Ɏ�{�̆��q�`H�qC5��Ðp����[�B�+
�V[h�Y��v�s�����D��oB��a(Sǭ��DJt7��y�,,��+�G�0���'�ȫ�|\f�Z�;C����~�0�]�M'�Q�F�%<d�(��0�ṫ����cevO�H���NY70$�>Y�9Z	��t����^�&��x�	�y��~F%��\h_C���H0C���C����?�e_OC0�a�C1�ӼT�2���TE�Z"��siʎ!����ۈ����M`1Zo4O���h�a8HϬ�-U�{���.�p�2
B+�k�*h+(/�<���a��DA���N���Kf�a?=�{��H�U�5˿���ahB�E��)~J�7߆���i�D���r+l-s�܁rϗ�j 趦ȚÐ�o��x�����OZ��s
�l��Gmoěd���UnD��pl�� �'��O�/!�Ò�r�DC��Cɜk3�G�*��嶒�S�nah�|�b��$���f�
�b@��&
uv�mfK#^,�b��� 7� 0�M�H���WP�������0Tp���^n'=;��(��J��"
Cm\P�Oq'�-���x=��9�Q���P�2���&�l&���2���@f�\.�"7E^��)#����Q>J��)$�M�O�k�Q�PC
aj�!C
5�~���3xIEND�B`�img/load.gif000060400000003407152456167170006744 0ustar00GIF89a���y��������������������������wul���!�NETSCAPE2.0!�XMP DataXMP�?xpacke                                                                            
                            
?xpacket end="w"?>!�XMP DataXMP�?xpacke                                                                            
                            
?xpacket end="w"?>!�XMP DataXMP�?xpacke                                                                            
                            
?xpacket end="w"?>!�XMP DataXMP�?xpacke                                                                            
                            
?xpacket end="w"?>!�XMP DataXMP�?xpacke                                                                            
                            
?xpacket end="w"?>!�XMP DataXMP�?xpacke                                                                            
                            
?xpacket end="w"?>!�XMP DataXMP�?xpacke                                                                            
                            
?xpacket end="w"?>!�,@N�����肧��t�A(@	�00A�,�Lb](E�g��Ђ�XI�Y��R����0=Ɇ�4L�P�rQj6"L9K#��!�,N��Ɏ��{�$D�1�hQ]IiN�:��)S�$�����b��$?J �Q(0�)�j�f��{����n-~Nž!�,M���J���B�Beuǁ��Ȕ%5�e��f3ޔ$�ݮ�("�<�L���"`�RJ�J�N
�������9ܣ�=!�,N��Ʉ��Z�g� LQ`��fAP)8�/,S&�,�t�ݮ��	y��D���"�H`�R
b��b�����m�^Sڙ!�,M���B��Z��Z���}�H��I
�	b$�(�T�}绝�	�~9�@2�����	��@0�����M|ř.œ�t;!�,M���֢�Z��R���}�H��I�l��t� 0��:A��
v>CGA 2�ƉHP�Ѧ�j80�R-��J�t;!�,M��ɔ��Z�'��,�}�H��I�l���tS0���ޭ�%8��b0dL�I�B)��Q(0`&� t�ह���3;img/sample.jpg000060400000002164152456167170007320 0ustar00���JFIF��C		#,%!*!&4'*./121%6:60:,010��C		
0  00000000000000000000000000000000000000000000000000��8P"����2!1AQ�"BRq�2Sa�Cbr������$1!AQ2a���?t4m1�외xB(�g�gHV��0'(��Q�`�)1���R��\�73櫥v;ftP3�'>?�ސ�2�rF㓾�a��؋"�8��Ys��t_i�!%��S�\���:���&T��Ͱ�������J,e|_	Ҙ˞E��T|:!q�oo�]_
��Ot��w��(��y�*#�&S��c}6|>O!�G��9�7�o�EcM-��
��z��D��`�Q�2d��#�H+-
,�gTƝ�^�6��2F͠j��X�9�>݆&�==�	u X�ͻ�>6�ѡ/��8[�<z'%�gն1l�>�y���;N���`u�u�̌N��Y�q��qʆ����cD�`��}Ț8��3v�]�k�Z�,t!RSc0JCe��'Q�S�S������k�����)W]��;<TJ�2�I� ���$8�$�m�OR*��39�7j
�-�:�`DlN��̇��.���N�9���qЬ�ki7��K|��\��܅2��~�o��:0��AuLfgjd�hhG/v��Ȼ[��3�X�-�V�M�)q��K��g����Rnt��g�R�K��~�.����	��&m����77��u>j����y<Ys��T7{����o�}B�4���ĵ�ΕlO�Z��uԨ��<os&���f6��\*j�p�'��B�	��EZW��G��$�H��p��{p��Iu>_�
��F�O�tV�>Q�I%�C��&�3����9�PI%�f�(�3p6��G�Y���h��I!�ѧHf`0q�>������XI$&��4�?��js/filebrowser.min.js000060400000352433152456167170010647 0ustar00/* jce - 2.9.99.2 | 2026-04-22 | https://www.joomlacontenteditor.net | Source: https://github.com/widgetfactory/jce | Copyright (C) 2006 - 2026 Ryan Demmer. All rights reserved | GNU/GPL Version 2 or later - http://www.gnu.org/licenses/gpl-2.0.html */
!function() {
    "use strict";
    var $;
    !function($, Wf) {
        function escapeRegex(s) {
            return s.replace(/[.*+?^${}()|[\]\\]/g, "\\$&");
        }
        function Tree(element, options) {
            this.element = element, this.options = $.extend({
                collapseTree: !1,
                charLength: !1
            }, options), this._init();
        }
        var scrollEvents = "click.scroll mousedown.scroll wheel.scroll mousewheel.scroll keyup.scroll touchmove.scroll";
        Tree.prototype = {
            _trigger: function(ev, args) {
                $(this.element).trigger("tree:" + ev, args);
            },
            _init: function() {
                var self = this;
                this.element && (this._trigger("init", function() {
                    self.nodeEvents();
                }), $(this.element).on(scrollEvents, function() {
                    $(this).stop();
                }));
            },
            nodeEvents: function(parent) {
                var self = this;
                parent = parent || this.element, $("ul:first", parent).attr({
                    role: "tree"
                }).addClass("uk-tree").children("li").attr("aria-level", 1), $(".uk-tree", parent).on("click", function(e) {
                    var n = e.target, p = $(n).parents("li").get(0);
                    e.preventDefault(), e.stopPropagation(), $(n).hasClass("uk-icon") && (n = n.parentNode), 
                    $(n).hasClass("uk-tree-toggle") ? self.toggleNode(e, p) : self._trigger("nodeclick", [ e, p ]), 
                    $(self.element).find(".uk-tree-active").removeClass("uk-tree-active"), 
                    $(p).addClass("uk-tree-active");
                }), $("li", parent).attr({
                    role: "treeitem"
                }).attr("aria-expanded", function() {
                    return !!$(this).hasClass("uk-tree-open");
                }).attr("aria-level", function(i, v) {
                    if (!v) return parseFloat($(this.parentNode.parentNode).attr("aria-level")) + 1;
                }), $("li", parent).find(".uk-tree-row").attr("role", "presentation").prepend('<span class="uk-tree-toggle" role="presentation"><i class="uk-icon uk-icon-caret-right"></i><i class="uk-icon uk-icon-caret-down"></i></span>'), 
                $("li", parent).not(".uk-tree-root").find(".uk-tree-icon").attr("role", "presentation").append('<i class="uk-icon uk-icon-folder"></i><i class="uk-icon uk-icon-folder-open"></i>');
            },
            _hasNodes: function(parent) {
                "string" == $.type(parent) && (parent = this._findParent(parent));
                parent = $("li", parent);
                return 1 < parent.length || 1 == parent.length && !$(parent).is(":empty");
            },
            _isNode: function(id, parent) {
                return !!this._findNode(id, parent).length;
            },
            _getNode: function(parent) {
                return "string" === $.type(parent) && (parent = this._findParent(parent)), 
                $(".uk-tree-node", parent);
            },
            _resetNodes: function() {
                $("li", this.element).removeClass("uk-tree-open");
            },
            renameNode: function(id, name) {
                var parent = Wf.String.dirname(id), parent = this._findNode(id, parent);
                $(parent).attr("data-id", name), $("a:first .uk-tree-text", parent).text(Wf.String.basename(name)), 
                $('li[data-id^="' + this._escape(encodeURI(id)) + '"]', parent).each(function(n) {
                    var nt = $(n).attr("data-id");
                    $(n).attr("data-id", nt.replace(id, name));
                });
            },
            removeNode: function(id) {
                var parent = Wf.String.dirname(id), id = this._findNode(id, parent), parent = $(id).parent("ul");
                $(id).remove(), parent && !this._hasNodes(parent) && $(parent).remove();
            },
            sortNodes: function(parent) {
                var p = $(parent).parent(), list = (parent = $(parent).detach(), 
                $("li", parent).map(function() {
                    return {
                        value: $(".uk-tree-text", this).attr("title"),
                        element: this
                    };
                }).get());
                list.sort(function(a, b) {
                    a = a.value || "", b = b.value || "";
                    return a.localeCompare(b);
                }), $.each(list, function(i, item) {
                    $(parent).append(item.element);
                }), $(p).append(parent);
            },
            createNode: function(nodes, parent, sortNodes) {
                var ul, self = this;
                nodes.length && (parent = parent || Wf.String.dirname($(nodes[0]).attr("data-id") || $(nodes[0]).attr("id")), 
                "string" == $.type(parent) && (parent = this._findParent(parent)), 
                nodes = $.grep(nodes, function(node) {
                    return 0 === self._findNode(node.id, parent).length;
                }), $(this.element).find(".uk-tree-active").removeClass("uk-tree-active"), 
                nodes && nodes.length ? ((ul = $(".uk-tree-node:first", parent) || null).length || (ul = document.createElement("ul"), 
                $(ul).attr({
                    role: "group"
                }).addClass("uk-tree-node").append('<li role="treeitem" aria-expanded="false"></li>'), 
                $(parent).append(ul)), $.each(nodes, function(i, node) {
                    var name, title, url, html;
                    self._isNode(node.id, parent) ? self.toggleNodeState(parent, 1) : (title = node.name || node.id, 
                    name = Wf.String.decode(title), title = Wf.String.encode(title), 
                    url = node.url || "#", node.class || (node.class = "folder"), 
                    html = '<li data-id="' + self._escape(encodeURI(node.id)) + '" class="' + node.class + '" role="treeitem" aria-level="' + parseFloat($(parent).attr("aria-level")) + '1" aria-label="' + title + '">', 
                    html += '<div class="uk-tree-row">', 0 <= node.class.indexOf("folder") && (html += '<span class="uk-tree-toggle" role="presentation"> <i class="uk-icon uk-icon-caret-right"></i> <i class="uk-icon uk-icon-caret-down"></i></span>'), 
                    html += '<a href="' + url + '" title="' + title + '"><span class="uk-tree-icon">', 
                    0 <= node.class.indexOf("folder") ? html += '<i role="presentation" class="uk-icon uk-icon-folder"></i><i role="presentation" class="uk-icon uk-icon-folder-open"></i>' : html += '<i role="presentation" class="uk-icon uk-icon-file-text"></i>', 
                    html = html + '</span><span class="uk-tree-text uk-margin-small-left uk-text-truncate" title="' + title + '">' + name + "</span></a></div></li>", 
                    $(ul).append(html), self.toggleNodeState(parent, 1), self._trigger("nodecreate"));
                }), !1 !== sortNodes && 1 < $(ul).children().length && self.sortNodes(ul)) : this.toggleNodeState(parent, 1));
            },
            _findParent: function(el) {
                return "string" === $.type(el) ? (el = escapeRegex(el), $('li[data-id="' + el + '"]:first', this.element)) : $(el).parents("li:first");
            },
            _findNode: function(id, parent) {
                return parent && "/" !== parent || (parent = this.element), "string" === $.type(parent) && (parent = this._findParent(parent)), 
                id = escapeRegex(id = id.replace(/^\/|\/$/, "")), $(parent).find('li[data-id="' + id + '"]:first');
            },
            toggleLoader: function(node) {
                $(node).toggleClass("uk-tree-loading");
            },
            _collapseNodes: function(ex) {
                var self = this, parent = (ex || this._resetNodes(), $(ex).parent());
                $("li", parent).each(function(i, el) {
                    el !== ex && $(el).parent() !== parent && (self.toggleNodeState(el, 0), 
                    el = self._getNode(el), $(el).addClass("uk-tree-hide"));
                });
            },
            toggleNodeState: function(node, state) {
                state ? $(node).addClass("uk-tree-open").attr("aria-expanded", !0) : $(node).removeClass("uk-tree-open").attr("aria-expanded", !1), 
                state && !$(node).hasClass("uk-tree-root") && (state = $(".uk-tree-node", node), 
                $(node).hasClass("uk-tree-open") ? $(state).removeClass("uk-tree-hide") : $(state).addClass("uk-tree-hide"));
            },
            toggleNode: function(e, node) {
                if (e.shiftKey) return this._trigger("nodeload", node);
                e = this._getNode(node);
                e.length ? ($(e).toggleClass("uk-tree-hide"), this.toggleNodeState(node, !$(e).hasClass("uk-tree-hide"))) : $(node).hasClass("uk-tree-open") ? this.toggleNodeState(node, 0) : this._trigger("nodeload", node), 
                this.options.collapseTree && this._collapseNodes(node);
            },
            refreshNode: function(node) {
                node = this._findParent(node);
                return this._trigger("nodeload", node);
            },
            _escape: function(s) {
                return s.replace(/'/g, "%27");
            },
            scrollTo: function(id) {
                var padding, top, el = this.element, id = this._findNode(id);
                $(id).length && (padding = parseInt($(id).css("padding-left"), 10) + parseInt($(this.element).css("padding-left"), 10), 
                padding = $(id).get(0).offsetLeft - padding, top = $(id).get(0).offsetTop - ($(".uk-tree-row", id).outerHeight() + 2), 
                $(el).find(".uk-tree-active").removeClass("uk-tree-active"), $(el).animate({
                    scrollLeft: Math.round(padding)
                }, 500).animate({
                    scrollTop: Math.round(top)
                }, 1500, function() {
                    $(this).off(scrollEvents);
                }), $(id).addClass("uk-tree-active"));
            }
        }, $.fn.tree = function(options) {
            var inst = new Tree(this, options);
            return $(this).on("tree:createnode", function(e, node, parent, sortNodes) {
                inst.createNode(node = "string" == typeof node ? [ node ] : node, parent, sortNodes);
            }), $(this).on("tree:removenode", function(e, node) {
                inst.removeNode(node);
            }), $(this).on("tree:renamenode", function(e, node, name) {
                inst.renameNode(node, name);
            }), $(this).on("tree:togglenode", function(e, ev, node) {
                inst.toggleNode(ev, node);
            }), $(this).on("tree:togglenodestate", function(e, node, state) {
                inst.toggleNodeState(node, state);
            }), $(this).on("tree:toggleloader", function(e, node) {
                inst.toggleLoader(node);
            }), $(this).on("tree:refreshnode", function(e, node) {
                inst.refreshNode(node);
            }), $(this).on("tree:scroll", function(e, id) {
                inst.scrollTo(id);
            }), $(this).on("tree:init", function(e) {
                inst.nodeEvents();
            }), this;
        };
    }(jQuery, Wf), function($, window) {
        var counter = 0, mime = {
            jpeg: "image/jpeg",
            jpg: "image/jpeg",
            png: "image/png",
            gif: "image/gif",
            tif: "image/tiff",
            tiff: "image/tiff",
            webp: "image/webp"
        };
        function uid() {
            for (var guid = new Date().getTime().toString(32), i = 0; i < 5; i++) guid += Math.floor(65535 * Math.random()).toString(32);
            return "wf_" + guid + (counter++).toString(32);
        }
        function cancel(e) {
            e.preventDefault(), e.stopImmediatePropagation();
        }
        function Transport(options) {
            this.options = $.extend({
                callback: $.noop,
                headers: {},
                multipart: {},
                data_name: "file"
            }, options);
        }
        function Uploader(options) {
            this.events = [], this.options = $.extend({
                container: "body",
                multiple: !0,
                input_name: "file",
                drop_target: null,
                upload_button: null,
                filetypes: "*",
                max_size: 1024,
                data: {}
            }, options), this.files = [];
            options = [];
            return 1 < this.options.filetypes.length && (options = $.map(this.options.filetypes.split(","), function(val) {
                return "." + val;
            })), this.input = $('<input type="file" accept="' + options.join(",") + '" />'), 
            $(this.input).addClass("wf-uploader-element"), $(this.input).prop("multiple", this.options.multiple), 
            this;
        }
        Transport.prototype = {
            upload: function(file) {
                this.file = file, this.transport = new XMLHttpRequest(), this.xhr();
            },
            error: function(status, text) {
                (0, this.options.callback)("error", {
                    message: text || "The server returned an invalid JSON response.",
                    file: this.file,
                    code: status || 500
                });
            },
            response: function(data) {
                var r, callback = this.options.callback;
                if (data) {
                    try {
                        r = $.parseJSON(data);
                    } catch (e) {
                        return -1 !== data.indexOf("{") && (data = "The server returned an invalid JSON response."), 
                        this.error(500, data), !1;
                    }
                    if (r.error) return this.error(r.error.code, r.error.message), 
                    !1;
                    r.file = this.file, callback("uploadcomplete", r), this.file = null;
                } else this.error();
            },
            xhr: function() {
                var self = this, xhr = this.transport, o = this.options, callback = o.callback, formData = new FormData(), file = this.file;
                xhr.upload && (xhr.upload.onprogress = function(e) {
                    e.lengthComputable && (file.loaded = Math.min(file.size, e.loaded), 
                    callback("progress", file));
                }), xhr.onreadystatechange = function() {
                    4 === xhr.readyState && (200 === xhr.status ? (file.loaded = file.size, 
                    callback("progress", file), formData = null, self.response(xhr.responseText)) : self.error(xhr.status), 
                    xhr.onreadystatechange = $.noop, xhr = null);
                }, xhr.open("post", o.url, !0), $.each(o.headers, function(name, value) {
                    xhr.setRequestHeader(name, value);
                }), xhr.setRequestHeader("X-Requested-With", "XMLHttpRequest"), 
                $.each(o.multipart, function(name, value) {
                    "object" === $.type(value) ? formData.append(value.name, value.value) : formData.append(name, value);
                }), file.data && $.each(file.data, function(name, value) {
                    "object" === $.type(value) ? formData.append(value.name, value.value) : formData.append(name, value);
                }), formData.append("method", "upload"), formData.append("id", uid()), 
                formData.append(o.data_name, file), xhr.send(formData);
            },
            cleanup: function() {
                var file = this.file;
                return file && file.input && $(file.input).parent('form[target="wf_upload_iframe"]').remove(), 
                !1;
            },
            abort: function() {
                this.transport.abort(), this.transport.onreadystatechange = $.noop, 
                this.transport = null, this.cleanup();
            }
        }, Uploader.prototype = {
            _events: [],
            files: [],
            on: function(event, fn) {
                return $(document).on("upload:" + event, fn), this._events.push(event), 
                this;
            },
            fire: function(event) {
                return $(document).trigger("upload:" + event, Array.prototype.slice.call(arguments, 1)), 
                this;
            },
            init: function() {
                var btn, self = this, o = this.options;
                return o.drop_target && ($(o.drop_target).on("dragover", function(e) {
                    var dataTransfer = e.originalEvent.dataTransfer;
                    self.fire("dragover"), dataTransfer.dropEffect = "copy", cancel(e);
                }), $(o.drop_target).on("dragstart dragenter dragleave dragend", function(e) {
                    self.fire(e.type), cancel(e);
                }), $(o.drop_target).on("drop", function(e) {
                    var dataTransfer = e.originalEvent.dataTransfer;
                    self.fire("drop"), dataTransfer && dataTransfer.files && dataTransfer.files.length && ($.each(dataTransfer.files, function(i, file) {
                        self.addFile(file);
                    }), cancel(e)), !o.upload_button && self.files.length && self.start(), 
                    cancel(e);
                })), o.browse_button && (btn = o.browse_button, $(btn).addClass("wf-uploader-button").wrap('<div class="wf-uploader-container"></div>'), 
                $(this.input).on("change", function() {
                    var name;
                    this.files ? $.each(this.files, function(i, file) {
                        self.addFile(file);
                    }) : (name = this.value.replace(/\\/g, "/").replace(/\/(.+)$/, "$1"), 
                    self.addFile({
                        name: name,
                        input: this
                    }), $(this).hide().clone(!0).insertAfter(this).show()), !o.upload_button && self.files.length && self.start();
                }), $(this.input).clone(!0).insertAfter(btn)), self.fire("init"), 
                this;
            },
            addFile: function(file) {
                if (file && file.name) {
                    var name = file.name, ext = name.substring(name.length, name.lastIndexOf(".") + 1);
                    if (/\.(php|php(3|4|5)|phtml|pl|py|jsp|asp|htm|html|shtml|sh|cgi)\./i.test(file.name)) return this.fire("error", {
                        code: 800,
                        message: "FILE_INVALID_ERROR",
                        file: file
                    }), !1;
                    if ("*" !== this.options.filetypes) if (!1 === new RegExp("^(" + this.options.filetypes.split(",").join("|") + ")$", "i").test(ext)) return this.fire("error", {
                        code: 601,
                        message: "FILE_EXTENSION_ERROR",
                        file: file
                    }), !1;
                    return file.size && parseInt(file.size, 10) > 1024 * parseInt(this.options.max_size, 10) ? (this.fire("error", {
                        code: 600,
                        message: "FILE_SIZE_ERROR",
                        file: file
                    }), !1) : (file.id = uid(), file.extension = ext, file.mimetype = file.type || (/(jpg|jpeg|bmp|tiff|tif|gif|png|webp)/.test(ext) ? mime[ext] : "text/plain"), 
                    name = name.replace(/\\/g, "/").replace(/\/+/g, "/"), file.filename = name.split("/").pop(), 
                    this.fire("fileadded", file), this.fileExists(file) ? (this.fire("error", {
                        code: 700,
                        message: "FILE_EXISTS_ERROR",
                        file: file
                    }), !1) : void this.files.push(file));
                }
            },
            removeFile: function(file) {
                this.fire("fileremoved", file);
                file = this.getFileIndex(file);
                return -1 !== file && this.files.splice(file, 1), this;
            },
            getFileIndex: function(file) {
                for (var files = this.files, len = files.length, i = 0; i < len; i++) if (files[i] && files[i].id === file.id) return i;
                return -1;
            },
            fileExists: function(file) {
                for (var files = this.files, len = files.length, i = 0; i < len; i++) if (files[i] && files[i].filename === file.filename) return !0;
                return !1;
            },
            updateFile: function(file, property) {
                var self = this, i = this.getFileIndex(file);
                return -1 !== i && $.each(property, function(name, value) {
                    !1 === /^(size|type|element)$/.test(name) && (self.files[i][name] = value);
                }), this;
            },
            renameFile: function(file, name) {
                return this.updateFile(file, {
                    filename: name
                });
            },
            upload: function(file, success, error) {
                var data, self = this, o = this.options, o = ("object" === $.type(o.data) && (data = $.extend({
                    name: file.filename || ""
                }, o.data)), "array" === $.type(o.data) && (data = $.merge([ {
                    name: "name",
                    value: file.filename || ""
                } ], o.data)), {
                    url: o.url,
                    data_name: o.input_name,
                    multipart: data,
                    callback: function(ev, args) {
                        self.fire(ev, args), "uploadcomplete" !== ev && "error" !== ev || (self.transport = null, 
                        ("uploadcomplete" === ev ? success : error)(args));
                    }
                });
                return this.transport = new Transport(o), this.transport.upload(file), 
                this;
            },
            uploadFilesInBlocks: function(files, blockSize) {
                var self = this;
                function uploadFile(file) {
                    return new Promise((resolve, reject) => {
                        self.fire("uploadstart", file), self.upload(file, function(response) {
                            resolve(response), self.removeFile(file);
                        }, function(error) {
                            reject(error);
                        });
                    });
                }
                !function uploadNextBlock() {
                    var currentBlockSize;
                    0 === files.length ? self.fire("allcomplete") : (currentBlockSize = Math.min(blockSize, files.length), 
                    currentBlockSize = files.slice(0, currentBlockSize).map(uploadFile), 
                    Promise.all(currentBlockSize).then(() => {
                        setTimeout(uploadNextBlock, 500);
                    }).catch(error => {
                        console.error("An error occurred while uploading:", error);
                    }));
                }();
            },
            start: function() {
                return this.uploadFilesInBlocks(this.files, 5), this;
            },
            clear: function() {
                return this.files = [], $(this.element).val("").siblings(".wf-uploader-element").remove(), 
                this;
            },
            stop: function() {
                return this.transport && (this.transport.abort(), this.fire("abort")), 
                this;
            },
            destroy: function() {
                return this.transport && (this.transport.cleanup(), this.transport = null), 
                this.clear(), this.fire("destroy"), $.each(this._events, function(i, ev) {
                    $(document).off("upload:" + ev);
                }), this;
            }
        }, window.Uploader = Uploader;
    }(jQuery, window), function($, Wf) {
        function UploadWidget(element, options) {
            this.element = element || $("<div></div>"), this.uploader = {}, this.errors = 0, 
            this.uploading = !1, this.options = $.extend({
                field: $("input[name=file]:first"),
                max_size: !1,
                limit: 0,
                filetypes: "*",
                insert: !0,
                buttons: {},
                websafe_mode: "utf-8",
                browse_button: "#upload-browse",
                upload_button: "#upload-start",
                drop_target: "#upload-body"
            }, options), this.init();
        }
        UploadWidget.prototype = {
            FILE_SIZE_ERROR: 600,
            FILE_EXTENSION_ERROR: 601,
            FILE_EXISTS_ERROR: 700,
            FILE_INVALID_ERROR: 800,
            _trigger: function(ev, args) {
                $(this.element).trigger("uploadwidget:" + ev.toLowerCase(), args);
            },
            init: function() {
                this.uploader instanceof Uploader && this.uploader.destroy(), $(this.options.field).remove(), 
                this._createUploader();
            },
            _createUploader: function() {
                var self = this;
                $.support.xhr2 || $(this.element).addClass("wf-uploader-html4"), 
                this.uploader = new Uploader(this.options), this.uploader.on("init", function() {
                    self._createDragDrop(), self._trigger("init");
                }), this.uploader.on("fileadded", function(e, file) {
                    self._createQueue(file), self._trigger("fileadded", file);
                }), this.uploader.on("uploadstart", function(e, file) {
                    self._onStart(file);
                }), this.uploader.on("allcomplete", function() {
                    self._onAllComplete();
                }), this.uploader.on("uploadcomplete", function(e, o) {
                    self._onComplete(o);
                }), this.uploader.on("dragover", function(e, o) {
                    $(self.options.drop_target).addClass("wf-upload-dragover");
                }), this.uploader.on("dragleave", function(e, o) {
                    $(self.options.drop_target).removeClass("wf-upload-dragover");
                }), this.uploader.on("drop", function(e, o) {
                    $(self.options.drop_target).removeClass("wf-upload-dragover");
                }), this.uploader.on("close", function(e, o) {
                    self.close();
                }), this.uploader.on("error", function(up, error) {
                    var file = error.file;
                    "string" == typeof error && (error = {
                        message: error,
                        code: 500
                    }), file && (error.code < 600 ? $(file.element).removeClass("queue-item-loading").addClass("queue-item-error") : $(file.element).remove(), 
                    self._showError(error, file)), self.errors++;
                }), this.uploader.on("fileremoved", function(file) {}), this.uploader.on("progress", function(o, file) {
                    self._onProgress(file);
                }), this.uploader.init();
            },
            _showError: function(error, file) {
                var self = this, msg = (error = $.extend({
                    message: "",
                    code: 500
                }, error), "array" === $.type(error.message) && (error.message = error.message.join("\n")), 
                error.message = $("<textarea></textarea>").html(error.message).text(), 
                error.message.replace(/[^a-z_ ]/gi, "").replace(/\s+/g, "_").toLowerCase()), details = "", msg = Wf.translate(msg, error.message);
                if (msg = (msg = msg.replace(/<br[\s\/]+?>/gi, "")).replace("%s", file.name), 
                error.details) details = "<br />" + error.details; else {
                    switch (error.code) {
                      case self.FILE_EXTENSION_ERROR:
                      case self.FILE_INVALID_ERROR:
                      case self.FILE_EXISTS_ERROR:
                        details = details.replace("%s", file.name);
                        break;

                      case self.FILE_SIZE_ERROR:
                        details = details.replace(/%([fsm])/g, function($0, $1) {
                            switch ($1) {
                              case "f":
                                return file.name;

                              case "s":
                                return Wf.String.formatSize(file.size);

                              case "m":
                                return Wf.String.formatSize(1024 * self.options.max_size);
                            }
                        });
                    }
                    details && (msg += "<br />" + details);
                }
                error.code < 600 ? ($(".uk-progress", file.element).hide(), $('<div class="uk-alert uk-alert-danger uk-width-1-1 uk-text-center"></div>').html(msg).appendTo(file.element)) : (Wf.Modal.alert(msg), 
                this.errors--);
            },
            _onStart: function(file) {
                this._trigger("uploadstart", file), $(file.element).addClass("queue-item-loading").find('input[type="text"]').prop("disabled", !0);
            },
            _isError: function(err) {
                return !!err && (!$.isArray(err) || err.length);
            },
            _onComplete: function(o) {
                var file = o.file, item = ($(file.element).removeClass("queue-item-loading").addClass("queue-item-complete"), 
                {
                    name: file.name
                });
                o.result.files && o.result.files.length && (o = o.result.files[0] || {}, 
                $.extend(item, o.file || o)), this._trigger("filecomplete", [ file, item ]);
            },
            _onAllComplete: function() {
                this.uploading = !1, this._trigger("uploadcomplete", this.getErrorCount());
            },
            _setProgress: function(el, percent) {
                $(".uk-progress-bar", el).css("width", percent + "%").attr("aria-valuenow", percent + "%").text(percent + "%");
            },
            _onProgress: function(file) {
                var percent;
                file.size && (percent = Math.floor(file.loaded / file.size * 100), 
                file.size === file.loaded && (percent = 100), this._setProgress(file.element, percent));
            },
            upload: function(args) {
                return this.uploader.files.length && (this.uploading = !0, this.uploader.options.data = args || {}, 
                this.uploader.start()), !1;
            },
            refresh: function() {},
            close: function() {
                this.uploader instanceof Uploader && (this.uploading && this.uploader.stop(), 
                this.uploader.destroy()), this.errors = 0, this.uploader = {}, this.uploading = !1;
            },
            getErrorCount: function() {
                return this.errors;
            },
            isUploading: function() {
                return this.uploading;
            },
            stop: function() {
                this.uploader.stop();
            },
            start: function() {
                this.uploader.start();
            },
            setStatus: function(s) {
                var file = this.currentFile;
                file && ($(file.element).removeClass("queue-item-loading queue-item-complete queue-item-error").addClass(s.state || ""), 
                s.state) && "error" === s.state && (this.errors++, s.message) && ($(".uk-progress", file.element).hide(), 
                $('<div class="uk-alert uk-alert-danger uk-width-1-1 uk-text-center"></div>').html(s.message).appendTo(file.element));
            },
            _createDragDrop: function() {
                var self = this, msg = ($("#upload-queue-drag").remove(), $("#upload-queue").empty(), 
                Wf.translate("upload_drop_details", "%filetypes files up to %max_size in size"));
                -1 !== msg.indexOf("%") && (msg = msg.replace(/%([\w]+)/g, function(match, key) {
                    var value = self.options[key] || "";
                    return "filetypes" === key && (value = '<span class="uk-text-truncate uk-display-block">' + value + "</span>"), 
                    value = "max_size" === key ? "<strong>" + Wf.String.formatSize(1024 * value) + "</strong>" : value;
                })), $('<div id="upload-queue-drag" class="uk-flex uk-flex-center uk-flex-column uk-flex-middle uk-text-large uk-height-1-1 uk-text-large uk-comment">   <div class="uk-comment-header uk-flex">       <i class="uk-icon-cloud-upload uk-icon-medium uk-margin-right uk-text-muted uk-comment-avatar"></i><h4 class="uk-comment-title">' + Wf.translate("upload_drop", "Drop files here") + '</h4>   </div>   <p class="uk-margin-small uk-comment-meta uk-width-1-2 uk-text-center">' + msg + "</p></div>").appendTo("#upload-queue-block").show();
            },
            _renameFile: function(file, name) {
                this.uploader.renameFile(file, name), this._trigger("filerename", file);
            },
            _removeFiles: function() {
                this.uploader.splice(), this.errors = 0, $(this.element).empty();
            },
            _fileExists: function(file) {
                return this.uploader.fileExists(file);
            },
            _removeFile: function(file) {
                this._trigger("filedelete", file), $(file.element).hasClass("queue-item-error") && this.errors--, 
                $(file.element).remove(), this.uploader.removeFile(file);
            },
            _createQueue: function(file) {
                var self = this, name = Wf.String.basename(file.filename), title = (name = Wf.String.safe(name, self.options.websafe_mode, self.options.websafe_spaces), 
                file.filename = name, Wf.String.stripExt(name)), remove = (file.element = document.createElement("div"), 
                $('<button class="uk-button uk-button-link"></button>').attr({
                    title: Wf.translate("delete", "Delete")
                }).addClass("queue-item-action").on("click", function(e) {
                    return e.preventDefault(), self.uploading ? self._stop(file) : self._removeFile(file);
                }).append('<i class="uk-icon uk-icon-trash"></i>')), ext = file.extension.toLowerCase(), ext = $('<i class="uk-icon uk-icon-file-' + function(ext) {
                    return /^(flv|mp4|m4v|webm|ogg|ogv|mov|wmv|avi|mvk|webm)$/.test(ext) ? "video" : /^(mp3|ogg|oga)$/.test(ext) ? "audio" : /^(jpg|jpeg|png|gif|png|svg|bmp|tiff|webp)$/.test(ext) ? "image" : /^(txt|htm|html)$/.test(ext) ? "text" : /^(doc|docx|dot|dotx)$/.test(ext) ? "word" : /^(xls|xlsx)$/.test(ext) ? "excel" : /^(ppt|pptx)$/.test(ext) ? "powerpoint" : /^(rar|zip|tar|gz)$/.test(ext) ? "zip" : /^(html|htm)$/.test(ext) ? "code" : /^(txt|rtf|csv)$/.test(ext) ? "text" : ext;
                }(ext) + '"></i><input type="text" value="' + title + '" class="uk-width-1-1" /><span class="queue-item-extension uk-text-muted uk-icon-none">.' + file.extension + "</span>"), name = $('<div class="queue-item-name uk-width-3-4 uk-width-small-4-5 uk-form-icon uk-form-icon-both"></div>').append(ext), buttons = [ remove ], title = ($.each(self.options.buttons, function(name, props) {
                    name = $('<button class="uk-button uk-button-link" title="' + props.title || name + '"></button>').addClass(props.class).on("click", function(e) {
                        $(this).hasClass("disabled") || (props.click || $.noop).call(self, this), 
                        e.preventDefault();
                    });
                    buttons.push(name);
                }), $('<div class="queue-item-size uk-flex-item-auto uk-text-center uk-hidden-mini" title="' + Wf.String.formatSize(file.size) + '" role="presentation"></div>').html(Wf.String.formatSize(file.size))), ext = $('<div class="queue-item-actions uk-flex uk-width-1-4 uk-width-small-1-5 uk-text-right"></div>').appendTo(file.element).append(title).append(buttons), remove = $('<div class="uk-progress uk-width-1-1"><div class="uk-progress-bar"></div></div>');
                $(file.element).addClass("queue-item uk-width-1-1 uk-flex uk-flex-wrap").appendTo($(self.element)).append([ name, ext, remove ]), 
                $('input[type="text"]', file.element).on("change keyup", function(e) {
                    this.value;
                    var v = Wf.String.safe(this.value, self.options.websafe_mode, self.options.websafe_spaces);
                    $(this).toggleClass("uk-form-danger", v !== this.value), "change" === e.type && self._renameFile(file, v + "." + file.extension);
                }).trigger("change"), self._trigger("fileSelect", file);
            },
            _stop: function(file) {
                this.uploader.stop(), $(file.element).removeClass("queue-item-loading");
            }
        }, $.fn.uploader = function(options) {
            var inst = new UploadWidget(this, options);
            return $(this).on("uploadwidget:upload", function(e, data) {
                if (inst.isUploading()) return !1;
                inst.upload(data);
            }), $(this).on("uploadwidget:close", function() {
                inst.close();
            }), this;
        };
    }(jQuery, Wf), ($ = jQuery).fn.listsort = function(options) {
        options = $.extend({
            fields: {}
        }, options);
        var el = this;
        function sortDate(a, b) {
            var a = a.value, b = b.value, r = 0, re = /(\d{2})[\/](\d{2})[\/](\d{4}), (\d{2})[:](\d{2})/g, d1 = a.replace(re, "$3$2$1"), d2 = b.replace(re, "$3$2$1"), a = a.replace(re, "$4$5");
            return d2 < d1 && (r = 1), d1 < d2 && (r = -1), (d1 = b.replace(re, "$4$5")) < a && (r = 1), 
            r = a < d1 ? -1 : r;
        }
        function sortCompare(a, b) {
            return a.value < b.value ? -1 : b.value < a.value ? 1 : 0;
        }
        return $.each(options.fields, function(element, props) {
            $(element).addClass("asc").on("click", function() {
                var direction = "asc", selector = ($(this).toggleClass(function() {
                    return direction = $(this).is(".asc") ? ($(this).removeClass("asc"), 
                    "desc") : ($(this).removeClass("desc"), "asc");
                }), props.selector);
                "string" == $.type(selector) && (selector = [ selector ]), $.each(selector, function(i, s) {
                    !function(selector, type, attribute, direction) {
                        var fn;
                        fn = "date" === type ? sortDate : sortCompare;
                        selector = $(selector, el).map(function() {
                            var v = $(this).attr(attribute) || $(this).text();
                            return "number" == type && (v = parseFloat(v)), "extension" == type && (v = v.substring(v.length, v.lastIndexOf(".") + 1).toLowerCase()), 
                            {
                                value: v = "string" == type ? v.toLowerCase() : v,
                                element: this
                            };
                        }).get();
                        selector.sort(fn), "desc" != direction && "extension" != type || selector.reverse();
                        $.each(selector, function(i, item) {
                            $(el).append(item.element);
                        }), selector = null, $(el).trigger("listsort:sort", {
                            type: type,
                            direction: direction
                        });
                    }(s, $(element).data("sort-type"), props.attribute, direction);
                });
            });
        }), this;
    }, function($) {
        var specialKeyCodeMap = {
            9: "tab",
            17: "ctrl",
            18: "alt",
            27: "esc",
            37: "left",
            39: "right",
            13: "enter",
            38: "up",
            40: "down",
            91: "cmd"
        };
        function escapeRegExChars(str) {
            return str.replace(/[\-\[\]\/\{\}\(\)\*\+\?\.\\\^\$\|]/g, "\\$&");
        }
        $.fn.listfilter = function(options) {
            options = $.extend({
                list: null,
                items: null,
                clear: null,
                sort: null,
                hide: !1,
                filter: null
            }, options);
            function keyup() {
                var context = this, args = arguments, later = function() {
                    timeout = null, result = func.apply(context, args);
                }, callNow = immediate;
                return clearTimeout(timeout), timeout = setTimeout(later, wait), 
                result = callNow ? func.apply(context, args) : result;
            }
            var func, wait, immediate, timeout, result, el = this;
            $(options.clear).on("click.listfilter", function(e) {
                reset(), $(el).val(""), $(el).trigger("listfilter:clear", [ e ]);
            }), $(el).on("listfilter:filter", function(e, s) {
                !function(s) {
                    var v, x = [];
                    matcher = "." === s.charAt(0) ? (v = s.substr(1), new RegExp(".(" + escapeRegExChars(v) + "[a-z0-9]*)$", "i")) : (s = toUnicode(s), 
                    new RegExp(escapeRegExChars(s), "ui"));
                    /[\u0000-\u1FFF\.\-\s ]/i.test(s) ? $(options.selector, options.list).each(function() {
                        var title = toUnicode($(this).attr("title"));
                        matcher.test(title) ? -1 === $.inArray(this, x) && x.push(this) : -1 !== (title = $.inArray(this, x)) && x.splice(title, 1);
                    }) : x = [];
                    x && x.length ? ($(options.selector, options.list).show().not(x).hide(), 
                    scroll(x[0])) : reset();
                    $(el).trigger("listfilter:found", [ null, x ]);
                }(s);
            }), func = function(e) {
                var v;
                e.keyCode && specialKeyCodeMap[e.keyCode] || (v = $(el).val(), setTimeout(function() {
                    "" === v ? $(options.clear).trigger("click.listfilter") : (e.stopImmediatePropagation(), 
                    v.length < 3 || $(el).trigger("listfilter:find", [ v ]));
                }, 0));
            }, wait = 500;
            function toUnicode(s) {
                for (var str = "", i = 0, ln = s.length; i < ln; i++) {
                    var ch = s[i];
                    str += ch = /[^\w\.\-\s \/]/i.test(ch) ? "\\u" + ch.charCodeAt(0) : ch;
                }
                return str;
            }
            function scroll(el) {
                var el = $(el).position() || {
                    top: 0
                }, top = $(options.list).scrollTop();
                $(options.list).css("overflow", "hidden").animate({
                    scrollTop: el.top + top
                }, 1e3, function() {
                    $(options.list).css("overflow", "auto");
                });
            }
            function reset() {
                $(options.selector, options.list).show(), scroll($(options.selector, options.list).first());
            }
            return $(el).on("keyup.listfilter paste.listfilter cut.listfilter", keyup), 
            this;
        };
    }(jQuery), function($, Wf) {
        var mimeTypes = {};
        for (var y, ext, items = "video,flv|mp4|m4v|webm|ogg|ogv|mov|wmv|avi,audio,mp3|ogg|oga|webm|m4a,image,jpg|jpeg|apng|png|gif|png|svg|bmp|tiff|webp,text,txt|htm|html,word,doc|docx|dot|dotx,excel,xls|xlsx,powerpoint,ppt|pptx,zip,rar|zip|tar|gz,code,html|htm|xml,text,txt|rtf|csv".split(","), i = 0; i < items.length; i += 2) for (ext = items[i + 1].split("|"), 
        y = 0; y < ext.length; y++) mimeTypes[ext[y]] = items[i];
        function getMimeType(ext) {
            return ext = ext.toLowerCase(), ext = $.trim(ext), mimeTypes[ext] || ext;
        }
        function FileBrowser(element, options) {
            this.element = element, $.extend(this, {
                _actions: {},
                _buttons: {
                    folder: {},
                    file: {}
                },
                _modal: [],
                _returnedItems: [],
                _pasteitems: "",
                _pasteaction: "",
                _limitcount: 0,
                _limitend: 0
            }), this.options = FileBrowser.options, this.setOptions(options), this._init(), 
            this.actionTarget = null;
        }
        var scrollEvents = "click.scroll mousedown.scroll wheel.scroll mousewheel.scroll keyup.scroll touchmove.scroll";
        FileBrowser.options = {
            base: "",
            dir: "",
            source: "",
            actions: null,
            buttons: null,
            folder_tree: !0,
            details: !0,
            search: !0,
            upload: {
                max_size: 1024,
                filetypes: "*",
                overwrite: !0,
                limit: 0,
                dialog: {},
                elements: null,
                buttons: {}
            },
            folder_new: {
                dialog: null
            },
            rename: {
                dialog: null
            },
            viewable: "jpeg,jpg,gif,png,webp,avi,wmv,wm,asf,asx,wmx,wvx,mov,qt,mpg,mp3,mp4,m4v,mpeg,ogg,ogv,webm,swf,flv,f4v,xml,dcr,rm,ra,ram,divx,html,htm,txt,rtf,pdf,doc,docx,xls,xlsx,ppt,pptx",
            list_limit: 0,
            view_mode: "list",
            expandable: !0,
            websafe_mode: "utf-8",
            websafe_spaces: !1,
            websafe_textcase: "",
            date_format: "%d/%m/%Y, %H:%M",
            allow_download: !1,
            use_state_cookies: !0
        }, FileBrowser.prototype = {
            _trigger: function(ev, args) {
                $(this.element).trigger("filebrowser:" + ev.toLowerCase(), args);
            },
            setOptions: function(options) {
                this.options = $.extend(this.options, options);
            },
            getOptions: function() {
                return this.options;
            },
            getDirectoryStore: function(prefix) {
                var store = this.options.dir;
                return prefix && store[prefix] ? store[prefix] : store;
            },
            getDirectoryStoreFromPath: function(path) {
                var store = this.getDirectoryStore();
                return path ? ($.each(store, function(key, item) {
                    if (item.path && 0 === item.path.indexOf(path)) return item;
                }), null) : store;
            },
            resolvePath: function(path) {
                var parts = path.split(":");
                if (1 < parts.length) {
                    var store = this.getDirectoryStore(parts[0]);
                    if (store && store.path) return store.path + "/" + parts.slice(1).join(":");
                }
                return path;
            },
            _init: function(options) {
                var self = this, options = (this.options = $.extend(this.options, options), 
                $.each(this.options, function(k, v) {
                    "function" == typeof v && ($(self.element).on("filebrowser:" + k.toLowerCase(), v), 
                    delete self.options[k]);
                }), this._addActions(this.options.actions), this._addButtons(this.options.buttons), 
                document.createElement("ul")), grid_size = ($(options).addClass("item-list").attr({
                    id: "item-list",
                    role: "listbox"
                }).on("click.item-list", function(e) {
                    var u, n = e.target, p = n.parentNode;
                    if (!$(n).hasClass("ui-sortable-handle")) return $(n).is(".uk-icon, span, a, img") && (n = $(n).parents("li").get(0)), 
                    "LI" === (self.actionTarget = n).nodeName ? $(n).hasClass("folder") ? (u = $(n).attr("id") || self._getPreviousDir(), 
                    e.preventDefault(), self._changeDir(u)) : (e.altKey && $(n).find("a[download]").length || (e.target = n, 
                    self._setSelectedItems(e, !0), self.serializeItemData(n).then(function(data) {
                        self._trigger("onFileClick", [ n, data ]);
                    }), e.preventDefault()), !0) : "INPUT" === n.nodeName ? ($(n).is(":checked") ? (e.target = n, 
                    self._setSelectedItems(e, !0)) : self._removeSelectedItems([ p.parentNode ], !0), 
                    p = $(n).parents("li"), self.serializeItemData(p).then(function(data) {
                        data.state = $(n).is(":checked"), self._trigger("onFileToggle", [ p, data ]);
                    }), !0) : void 0;
                }).on("dblclick.item-list", function(e) {
                    var n = e.target, n = $(n).parents("li").get(0);
                    return $(n).hasClass("folder") ? e.preventDefault() : (self.serializeItemData(n).then(function(data) {
                        self._trigger("onFileInsert", [ n, data ]);
                    }), e.preventDefault()), !1;
                }).on("keydown.item-list", function(e) {
                    switch (e.which) {
                      case 13:
                        var n = $("li.selected:last", "#item-list").get(0);
                        if (!n) return;
                        self.actionTarget = n;
                        var p = $(n).parents("li");
                        if ($(n).hasClass("folder")) return p = $(p).attr("id") || self._getPreviousDir(), 
                        self._changeDir(p);
                        self._setSelectedItems(e, !0), self.serializeItemData(n).then(function(data) {
                            self._trigger("onFileClick", [ n, data ]);
                        });
                        break;

                      case 38:
                      case 40:
                        self._setSelectedItems(e);
                    }
                    e.preventDefault();
                }), this._getState("grid-size", 4)), grid_size = ($(".grid-size", "#browser").on("click", "button", function(e) {
                    e.preventDefault();
                    var e = $(e.target).closest("button"), size = $(e).parent().data("size");
                    $("#browser-list").removeClass("grid-size-1 grid-size-2 grid-size-3 grid-size-4"), 
                    size = parseInt(size, 10) || 1, e.hasClass("grid-size-minus") && (size = Math.min(size + 1, 4), 
                    $("#browser-list").addClass("grid-size-" + size), $(e).parent().data("size", size)), 
                    e.hasClass("grid-size-plus") && (size = Math.max(size - 1, 1), 
                    $("#browser-list").addClass("grid-size-" + size), $(e).parent().data("size", size)), 
                    1 === size ? $(e).parent().find(".grid-size-plus").prop("disabled", !0) : $(e).parent().find(".grid-size-plus").prop("disabled", !1), 
                    4 == size ? $(e).parent().find(".grid-size-minus").prop("disabled", !0) : $(e).parent().find(".grid-size-minus").prop("disabled", !1), 
                    window.setTimeout(function() {
                        var $selected = $("#item-list").find("li.selected:first");
                        $selected.length && ($selected = $selected.get(0).offsetTop - $selected.outerHeight() + $(".folder-up").outerHeight(), 
                        $("#browser-list").scrollTop(Math.round($selected)));
                    }, 10);
                }).data("size", parseInt(grid_size, 10)).find(".grid-size-minus").prop("disabled", !0), 
                $("#browser-list").addClass("grid-size-" + parseInt(grid_size, 10)), 
                $(".folder-up", "#browser").on("click", function(e) {
                    e.preventDefault(), self.actionTarget = null;
                    e = self._getPreviousDir();
                    return self._changeDir(e);
                }), $("#browser-list").append(options).on("scroll.browser-list", function(e) {
                    self._updateList();
                }), $(".details-nav-left, .details-nav-right", "#browser-details-nav").on("click", function(e) {
                    var $item = $("li.selected.active", "#item-list").removeClass("active");
                    $(this).hasClass("details-nav-left") && $item.prevAll("li.selected:first").addClass("active"), 
                    $(this).hasClass("details-nav-right") && $item.nextAll("li.selected:first").addClass("active"), 
                    e.preventDefault(), self._showItemDetails();
                }), self._getState("limit", this.options.list_limit, function(val) {
                    return !1 == !/([0125]+)/.test(val);
                })), options = ($("#browser-list-limit-select").val(grid_size), 
                $("#browser-list-limit-select").on("change", function() {
                    self._limitcount = 0, self._setState("limit", $(this).val()), 
                    self.refresh();
                }), $("ul li", "#browser-list-limit").on("click", function(e) {
                    e.preventDefault();
                    var e = 0, count = self._limitcount, limit = parseInt(self._limit, 10);
                    $(this).hasClass("limit-left") && (e = count - limit), $(this).hasClass("limit-right") && (e = count + limit), 
                    $(this).hasClass("limit-right-end") && (e = self._limitend), 
                    self._limitcount = e, self.refresh();
                }), $('input[type="checkbox"]', "#check-all").on("click", function(e) {
                    e = e.target, e = $(e).is(":checked");
                    $('input[type="checkbox"]', "#browser-list").prop("checked", !!e), 
                    e ? self._selectItems($("li", "#browser-list").not(".folder-up"), !0) : self._deselectItems();
                }), this._setupListSort(), $("#block-search-icon").toggle(this.options.search), 
                $("#show-details").toggle(this._treeLoaded()), $("#show-search").on("click", function() {
                    $("#searchbox").toggleClass("uk-hidden").attr("aria-hidden", function() {
                        return $(this).hasClass("uk-hidden");
                    }), $(this).toggleClass("uk-active"), $(this).hasClass("uk-active") && $("#search").trigger("focus");
                }), $("#search + .uk-icon").on("click", function() {
                    $("#search").trigger("focus");
                }), $("body").on("click", function(e) {
                    $("#searchbox").hasClass("uk-hidden") || $(e.target).is("#searchbox, #search, #show-search, #show-search .uk-icon-search, #search + .uk-icon") || ($("#show-search").removeClass("uk-active"), 
                    $("#searchbox").addClass("uk-hidden").attr("aria-hidden", !0));
                }), $("#search").listfilter({
                    list: "#item-list",
                    selector: "li",
                    clear: "#search + .uk-icon"
                }).on("listfilter:find", function(ev, s) {
                    var prefix, el = this;
                    return s ? (prefix = "", "." === s.charAt(0) && (s = s.substr(1), 
                    prefix = "."), self._setLoader(), $("#browser-list").one("load.filter", function() {
                        $(el).trigger("listfilter:found", [ null, $("li.file", "#item-list").get() ]);
                    }), self._reset(), self._searchQuery = prefix + s, self._getList("", self._searchQuery)) : (self._searchQuery = "", 
                    self.refresh()), !0;
                }).on("listfilter:clear", function(ev) {
                    self._searchQuery = "", self.refresh();
                }), $("#refresh").on("click", function(e) {
                    self.refresh(e);
                }).on("button:refresh", function(e, state) {
                    state ? ($(".uk-icon", this).addClass("uk-icon-spinner"), $(this).prop("disabled", !0)) : ($(".uk-icon", this).removeClass("uk-icon-spinner"), 
                    $(this).prop("disabled", !1));
                }), this._getState("details", 0, function(val) {
                    return 0 === (val = parseInt(val, 10)) || 1 === val;
                }));
                parseInt(options, 10) || !this._treeLoaded() ? ($("#show-details").removeClass("uk-active"), 
                $("main").addClass("uk-tree-hidden")) : ($("#show-details").addClass("uk-active"), 
                $("main").removeClass("uk-tree-hidden")), $("#show-details:visible").on("click", function(e) {
                    $(this).toggleClass("uk-active"), $("main").toggleClass("uk-tree-hidden"), 
                    self._setState("details", $("main").hasClass("uk-tree-hidden") ? 1 : 0);
                }), this.options.expandable && ($("#browser").addClass("expandable"), 
                $("#layout-full-toggle").on("click", function() {
                    $("#browser").toggleClass("full-height"), self._trigger($("#browser").hasClass("full-height") ? "onMaximise" : "onMinimise");
                })), $("#browser-list").on(scrollEvents, function() {
                    $(this).stop();
                }), this._setupDir(), this._trigger("onInit", this);
            },
            _updateList: function() {
                var self = this, top = $("#browser-list").scrollTop(), area = $("#browser-list").height() + top;
                $(".file.jpg, .file.jpeg, .file.png, .file.gif, .file.bmp", "#item-list").not("[data-width]").each(function() {
                    $(this).position().top < area && self._getDimensions(this);
                });
            },
            _getInterfaceHeight: function() {
                var ih = Math.max(0, Math.round($("#browser").offset().top) - 5), p = $("#browser").parent("form");
                return ih = $(p).next(":not(div.actionPanel)").length ? Math.round($("div.actionPanel").offset().top) - 10 - $("#browser").innerHeight() : ih;
            },
            resize: function(ih, init) {},
            _translate: function(s, ds) {
                return Wf.translate(s, ds);
            },
            _setupListSort: function() {
                var self = this;
                this._sortValue = this._getState("sort", "", function(val) {
                    return /[a-z-]+/.test(val);
                }), $("#sort-ext, #sort-name, #sort-date, #sort-size").on("click", function() {
                    $(this).siblings(".asc, .desc").removeClass("desc").addClass("asc");
                    var direction = "", direction = $(this).hasClass("asc") ? ($(this).removeClass("asc").addClass("desc"), 
                    "-") : ($(this).removeClass("desc").addClass("asc"), ""), type = $(this).data("sort");
                    self._sortValue = direction + type, self._setState("sort", self._sortValue), 
                    self.refresh();
                }).addClass(function() {
                    return -1 !== this.id.indexOf(self._sortValue) && self._sortValue && "-" === self._sortValue.charAt(0) ? "desc" : "asc";
                });
            },
            _validatePath: function(s) {
                if (/\.{2,}/.test(s) || /:\/\//.test(s) && -1 == s.indexOf(Wf.getURI(!0))) return !1;
                if (/:\/\//.test(s) && (s = Wf.URL.toRelative(s)), /[^\w\.\:\-\s \/]/i.test(s)) for (var i = 0, ln = s.length; i < ln; i++) {
                    var ch = s[i];
                    if (/[^\w\.\:\-\s \/]/i.test(ch) && function(c) {
                        for (c = c.toString(16).toUpperCase(); c.length < 4; ) c = "0" + c;
                        return "\\u" + c;
                    }(ch.charCodeAt(0)) < "\\u007F") return !1;
                }
                return !0;
            },
            _trimPath: function(path) {
                return (path = "" + path).replace(/^\//, "").replace(/\/$/, "");
            },
            _cleanPath: function(path) {
                var store;
                return path = path && (new RegExp("://").test(path) && (path = Wf.URL.toRelative(path)), 
                path = this._trimPath(path), /\.([a-z0-9]{2,}$)/i.test(path)) && (path = Wf.String.dirname(path), 
                store = this.getDirectoryStoreFromPath(path)) && store.path ? path.replace(new RegExp("^" + store.path.replace(/[.*+?^${}()|[\]\\]/g, "\\$&")), "").replace(/^[\/\\]+/, "") : path;
            },
            _setupDir: function() {
                var self = this, dir = "", src = $(this.element).val() || this.options.source || "", base = this.options.base;
                -1 !== (src = (src = src && base && 0 === src.indexOf(base) ? src.substr(base.length + 1) : src).replace(/(&amp;|\?)/g, "&")).indexOf("&") && (src = src.substr(0, src.indexOf("&"))), 
                src = this._trimPath(src), (src = (src = this._validatePath(src) ? src : "") && /:\/\//.test(src) ? Wf.URL.toRelative(src) : src) || (dir = this._getState("dir", "", function(val) {
                    return val && self._validatePath(val);
                })), this._validatePath(dir) || (dir = ""), this._setDir(Wf.String.encodeURI(dir)), 
                this.setStatus({
                    message: this._translate("loading", "Loading..."),
                    state: "load"
                }), this._treeLoaded() ? this._createTree(src) : this._getList(src);
            },
            _toggleTree: function(s) {
                $("#browser").toggleClass("full-width", !s), $("div.layout-left", "#browser").attr("aria-hidden", !s), 
                $("#sort-size, #sort-date").attr("aria-hidden", s), $("span.size, span.date", "#item-list").attr("aria-hidden", s);
            },
            _isWebSafe: function(name) {
                var safe = Wf.String.safe(name, this.options.websafe_mode, this.options.websafe_spaces, this.options.websafe_textcase);
                return name.toLowerCase() === safe.toLowerCase();
            },
            _isViewable: function(name) {
                var button = this._getButton("file", "view"), viewable = this.options.viewable;
                return button && button.restrict && (viewable = button.restrict), 
                new RegExp("\\.(" + viewable.replace(/,/g, "|") + ")$", "i").test(name);
            },
            _buildList: function(o) {
                var self = this, h = "", isRoot = ($("#item-list").empty(), this._isRoot());
                $("#browser").toggleClass("root", isRoot), isRoot ? self._hideActions([ ".upload", ".folder-new" ]) : self._showActions([ ".upload", ".folder-new" ]), 
                o.folders.length && $.each(o.folders, function(i, e) {
                    var data = [], classes = [];
                    if (!e.id) return !0;
                    $.each(e.properties, function(k, v) {
                        "" !== v && data.push("data-" + k + '="' + v + '"');
                    }), data.push('data-url="' + (e.url || e.path) + '"'), data.push('id="' + e.id + '"'), 
                    classes.push(self._isWebSafe(e.name) ? "safe" : "notsafe"), 
                    classes.push(e.writable ? "writable" : "notwritable"), e.classes && classes.push(e.classes);
                    var prefix, name = e.name;
                    o.search && (prefix = e.id.split(":")[0], name = (name = (self.getDirectoryStore(prefix).label || "") + "/" + name).replace(/^\//, "").replace(/\/$/, "")), 
                    name = name.replace(/([^\s\/]+)(\/)/g, function(m) {
                        return "<strong>" + m + "</strong>";
                    }), h = (h = (h = (h += '<li class="uk-grid uk-grid-collapse uk-flex folder ' + classes.join(" ") + '" title="' + e.name + '"' + data.join(" ") + ">") + (isRoot ? '  <label class="uk-width-0-10 uk-item-checkbox" aria-label="' + self._translate("select", "Select") + '"><input type="checkbox" disabled /></label>' : '  <label class="uk-width-0-10 uk-item-checkbox" aria-label="' + self._translate("select", "Select") + '"><input type="checkbox" /></label>')) + '  <i class="uk-width-1-10 uk-icon uk-icon-folder folder"></i>  <a class="uk-width-1-5 uk-padding-remove uk-flex-item-auto uk-text-truncate" href="#">' + name + "</a>") + '  <span class="uk-width-6-10 uk-item-date uk-hidden-mini">' + Wf.String.formatDate(e.properties.modified, self.options.date_format) + "</span></li>";
                }), o.files.length && $.each(o.files, function(i, e) {
                    var data = [], classes = [];
                    if (!e.id) return !0;
                    $.each(e.properties, function(k, v) {
                        var val;
                        "" !== v && ("attribution" == k && (val = [], v && v.name && val.push(v.name), 
                        v && v.handle && val.push(v.handle), v && v.link && val.push(v.link), 
                        v = val.join("|")), data.push("data-" + k + '="' + v + '"'));
                    }), e.url && data.push('data-url="' + e.url + '"'), data.push('id="' + e.id + '"'), 
                    classes.push(self._isWebSafe(e.name) ? "safe" : "notsafe"), 
                    classes.push(e.writable ? "writable" : "notwritable"), e.selected && (self._addReturnedItem({
                        id: e.id
                    }), classes.push("selected")), e.classes && classes.push(e.classes);
                    var prefix, ext = Wf.String.getExt(e.name), name = Wf.String.stripExt(e.name), filename = name + "." + ext, icon = ext.toLowerCase(), download = "";
                    self.options.allow_download && e.properties.preview && (download = ' download="' + filename + '"'), 
                    o.search && (prefix = (filename = e.id.split(":"))[0], filename = filename[1] || "", 
                    filename = Wf.String.dirname(filename), name = (name = (name = (self.getDirectoryStore(prefix).label || "") + "/" + filename + "/" + name).replace(/\/+/g, "/")).replace(/^\//, "").replace(/\/$/, "")), 
                    name = name.replace(/([^\s\/]+)(\/)/g, function(m) {
                        return "<strong>" + m + "</strong>";
                    }), h = (h = (h = (h = (h = (h = (h += '<li class="uk-grid uk-grid-collapse uk-flex file ' + ext.toLowerCase() + " " + classes.join(" ") + '" title="' + e.name + '"' + data.join(" ") + ">") + '  <label class="uk-width-0-10 uk-item-checkbox" aria-label="' + self._translate("select", "Select") + '"><input type="checkbox" /></label>') + '  <i class="uk-width-1-10 uk-icon uk-icon-file uk-icon-file-' + getMimeType(icon) + " file " + icon + '"></i>') + '  <a class="uk-width-1-5 uk-padding-remove uk-flex-item-auto" href="' + (e.properties.preview || "#") + '"' + download + '>      <span class="uk-item-text uk-text-truncate uk-display-inline-block">' + name + "</span>") + '      <span class="uk-item-extension uk-display-inline-block">.' + ext + "</span>  </a>") + '  <span class="uk-width-2-10 uk-item-date uk-hidden-mini">' + Wf.String.formatDate(e.properties.modified, self.options.date_format) + "</span>") + '  <span class="uk-width-4-10 uk-item-size uk-hidden-mini">' + Wf.String.formatSize(e.properties.size) + "</span></li>";
                }), $("#item-list").html(h), this._showListDetails();
            },
            _showListDetails: function() {
                var s = !$(".layout-icon", "#show-details").hasClass("tree") && this._treeLoaded();
                this._toggleTree(s);
            },
            _treeLoaded: function() {
                return this.options.folder_tree && "function" == typeof $.fn.tree;
            },
            _createTree: function(src) {
                var self = this, path = src || this._dir, path = this._cleanPath(path);
                $("#tree-body").on("tree:init", function(e, callback) {
                    Wf.JSON.request("getTree", path, function(o) {
                        $("#tree-body").html(o), "function" == typeof callback && callback(), 
                        path && path !== self._trimPath(self.options.dir) && $("#tree-body").trigger("tree:scroll", path), 
                        self._getList(src);
                    });
                }).on("tree:nodeclick", function(e, evt, node) {
                    self.actionTarget = node, self._changeDir($(node).attr("data-id"));
                }).on("tree:nodeload", function(e, node) {
                    self._refreshTree(node);
                }).tree();
            },
            _refreshTree: function(node) {
                node = node || $(".uk-tree-root", "#tree-body"), $("#tree-body").trigger("tree:toggleloader", node);
                var path = $(node).attr("data-id");
                Wf.JSON.request("getTreeItem", path, function(o) {
                    o && !o.error && ($("ul:first", node).remove(), $("#tree-body").trigger("tree:createnode", [ o.folders, node ]), 
                    $("#tree-body").trigger("tree:togglenodestate", [ node, !0 ])), 
                    $("#tree-body").trigger("tree:toggleloader", node);
                }, this);
            },
            _reset: function() {
                this._deselectItems(), this._returnedItems = [], $('input[type="checkbox"]', "#check-all").prop("checked", !1), 
                $("li", "#browser-details-nav").addClass("uk-invisible").attr("aria-hidden", !0).filter(".details-nav-text").empty(), 
                this._limit = 0;
            },
            _clearPaste: function() {
                this._pasteaction = "", this._pasteitems = "", this._hideButtons($(".paste", "#buttons"));
            },
            setStatus: function(o) {
                $("#browser-message").removeClass("load error"), $("#browser-message").toggleClass(o.state), 
                $("#refresh").trigger("button:refresh", [ o.state ]), $(".message", "#browser-message").html(o.message);
            },
            _setMessage: function(message, classname) {
                return !0;
            },
            _setLoader: function() {
                this.setStatus({
                    message: this._translate("message_load", "Loading..."),
                    state: "load"
                });
            },
            _resetMessage: function() {
                return !0;
            },
            _resetStatus: function() {
                var prefix, x, path, crumbPath, self = this, dir = decodeURIComponent(this._dir), $status = $("#browser-message"), $pathway = (this.setStatus({
                    message: "",
                    state: ""
                }), $(".uk-breadcrumb.pathway", $status)), sw = ($("li", $pathway).not(":first").remove(), 
                $status.width()), $count = ($("li:first", $pathway).on("click", function() {
                    self._changeDir("/");
                }), dir = $.trim(this._trimPath(dir)), $('<li class="count">( ' + this._foldercount + " " + this._translate("folders", "folders") + ", " + this._filecount + " " + this._translate("files", "files") + ")</li>").appendTo($pathway)), w = $pathway.outerWidth(!0), $status = self.getDirectoryStore();
                dir && (path = (dir = dir.split(":")).pop(), dir = $status[prefix = dir[0]] || {
                    path: path,
                    label: ""
                }, x = 1, path = path.split("/"), 1 < $status.length && path.unshift(dir.label), 
                crumbPath = "", $.each(path, function(i, name) {
                    if (!name) return !0;
                    crumbPath = Wf.String.path(crumbPath, name);
                    name = $('<li title="' + name + '"></li>').on("click", "a", function(e) {
                        e = $(e.target).data("path");
                        self._changeDir(e);
                    }).append('<a data-path="' + prefix + ":" + crumbPath + '">' + name + "</a>").insertBefore($count);
                    w += name.outerWidth(!0), sw < w && $("li", $pathway).eq(x++).addClass("uk-breadcrumb-truncate");
                }));
            },
            _getPreviousDir: function() {
                if (this._dir.length < 2) return this._dir;
                var parts = this._dir.split(":"), prefix = parts[0], parts = parts.pop();
                if (!parts) return "";
                for (var dirs = parts.split("/"), previous = "", i = 0; i < dirs.length - 1; i++) previous = Wf.String.path(previous, dirs[i]);
                return previous = prefix + ":" + previous;
            },
            _addReturnedItem: function(items) {
                "array" == $.type(items) ? $.merge(this._returnedItems, items) : this._returnedItems.push(items);
            },
            _returnFile: function(file) {
                this._addReturnedItem({
                    name: Wf.String.basename(file)
                }), this._changeDir(Wf.String.dirname(file));
            },
            _setDir: function(dir) {
                this._dir = "" + dir;
            },
            getBaseDir: function() {
                return this.options.dir;
            },
            getCurrentDir: function() {
                return this._dir;
            },
            _isRoot: function() {
                var s = this._dir;
                return "" === this._trimPath(s);
            },
            _changeDir: function(dir) {
                this._reset(), this._limitcount = 0, this._setDir(dir), this._setLoader(), 
                this._getList(dir);
            },
            _setState: function(name, state) {
                this.options.use_state_cookies && Wf.Storage.set("wf_" + Wf.getName() + "_" + name, state);
            },
            _getState: function(name, def, callback) {
                return this.options.use_state_cookies ? (callback = callback || function(val) {
                    return val;
                }, Wf.Storage.get("wf_" + Wf.getName() + "_" + name, def, callback)) : def;
            },
            _getList: function(src, filter) {
                var path = src || this._dir, src = (!src && "" !== this._dir || this._setState("dir", this._cleanPath(path)), 
                this._hideButtons($(".button", "#buttons")), this._limit = parseInt($("#browser-list-limit-select").val(), 10), 
                this._sortValue || ""), method = filter ? "searchItems" : "getItems";
                Wf.JSON.request(method, [ path, this._limit, this._limitcount, filter || "", src ], this._loadList, this);
            },
            clearQuery: function() {
                $("#search").val(""), this._searchQuery = "";
            },
            refresh: function(e) {
                this._reset(), this.targetElement = null, this._setLoader(), void 0 !== e && (this.clearQuery(), 
                $("form").append('<input type="hidden" name="refresh" value="1" />')), 
                this._getList("", this._searchQuery);
            },
            load: function(items) {
                var self = this, src = "";
                items && ("string" == $.type(items) && (items = [ items ]), $.each(items, function(i, item) {
                    "string" == $.type(item) && (item = {
                        name: item
                    }), self._addReturnedItem(item), 0 == i && (src = item.name);
                })), this._setLoader(), this._getList(src);
            },
            error: function(error) {
                this._raiseError(error);
            },
            startUpload: function() {
                $("#upload-queue").uploader("start");
            },
            stopUpload: function() {
                $("#upload-queue").uploader("stop");
            },
            setUploadStatus: function(o) {
                $("#upload-queue").uploader("setStatus", o);
            },
            _loadList: function(o) {
                if ($('input[name="refresh"]', "form").remove(), !o) return this.setStatus({
                    message: "",
                    state: ""
                }), !1;
                var count;
                this._foldercount = o.total.folders, this._filecount = o.total.files, 
                $(".limit-right li, .limit-left li", "#browser-list-limit").addClass("uk-invisible").attr("aria-hidden", !0), 
                this._limit && (this._limitend = o.total.folders + o.total.files - this._limit, 
                (count = this._limitcount + o.folders.length + o.files.length) < o.total.folders + o.total.files ? $(".limit-right li", "#browser-list-limit").removeClass("uk-invisible").attr("aria-hidden", !1) : $(".limit-right li", "#browser-list-limit").addClass("uk-invisible").attr("aria-hidden", !0), 
                0 < count - this._limit ? $(".limit-left li", "#browser-list-limit").removeClass("uk-invisible").attr("aria-hidden", !1) : $(".limit-left li", "#browser-list-limit").addClass("uk-invisible").attr("aria-hidden", !0)), 
                this._searchQuery || o.path && this._setDir(o.path), this._isRoot() || ($("#folder-list").append('<li class="folder-up" title="Up"><a href="#">...</a></li>'), 
                this._treeLoaded() && o.path && ($("#tree-body").trigger("tree:createnode", [ o.folders, this._dir ]), 
                !1 === $(this.actionTarget).is('[role="treeitem"]')) && $("#tree-body").trigger("tree:scroll", this._dir)), 
                this._trigger("onBeforeBuildList", null, o), this._buildList(o), 
                this._resetStatus(), this._resetMessage(), this._trigger("onAfterBuildList", null, o), 
                this._returnedItems.length && (this._findItem(this._returnedItems), 
                this._returnedItems = []), this._pasteitems && this._showPasteButton(), 
                $("#browser-list").trigger("load"), this._trigger("onListComplete");
            },
            _execute: function(name, type, evt, options) {
                var self = this, dir = this._dir, dir = this._trimPath(dir), list = this._serializeSelectedItems(), site = Wf.getURI(!0), elements = "";
                switch (this.options[name] && (elements = this.options[name].elements || ""), 
                name) {
                  case "help":
                    Wf.help();
                    break;

                  case "insert":
                    this._trigger("onFileInsert", null, $("li.selected", "#item-list").get(0));
                    break;

                  case "view":
                    var $item = $("li.selected.active:first", "#item-list"), url = $item.data("url"), url = /http(s)?:\/\//.test(url) ? url : Wf.String.path(site, url), name = ($item.data("preview") && (url = $item.data("preview")), 
                    Wf.String.basename($item.attr("title")));
                    this._isViewable(name) && (/\.(jpeg|jpg|gif|png|webp|svg|apng|avi|wmv|wm|asf|asx|wmx|wvx|mov|qt|mpg|mp3|mp4|m4v|mpeg|ogg|ogv|webm|swf|flv|f4v|xml|dcr|rm|ra|ram|divx|pdf)/i.test(name) ? ($item = {
                        width: $item.data("width") || 0,
                        height: $item.data("height") || 0
                    }, Wf.Modal.media(name, url, $item)) : Wf.Modal.iframe(name, url, {
                        onFrameLoad: function(e) {
                            var iframe = $("div.iframe-preview iframe").get(0), h = iframe.contentWindow.document.body.innerHTML, tmpDiv = document.createElement("div");
                            function toRelative(s) {
                                return (s = Wf.URL.toRelative(s)).replace(/^administrator\//, "");
                            }
                            $(tmpDiv).html(h), $("img, embed", $(tmpDiv)).each(function() {
                                var s = toRelative($(this).attr("src"));
                                /http(s)?:\/\//.test(s) || (s = Wf.String.path(site, s)), 
                                $(this).attr("src", s);
                            }), $("a, area", $(tmpDiv)).each(function() {
                                var s = toRelative($(this).attr("href"));
                                /http(s)?:\/\//.test(s) || (s = Wf.String.path(site, s)), 
                                $(this).attr("href", s);
                            }), $("object", $(tmpDiv)).each(function() {
                                $("param[name=movie], param[name=src]", this).each(function() {
                                    var s = toRelative($(this).attr("value"));
                                    /http(s)?:\/\//.test(s) || (s = Wf.String.path(site, s)), 
                                    $(this).attr("value", s);
                                });
                            }), iframe.contentWindow.document.body.innerHTML = tmpDiv.innerHTML;
                        }
                    }));
                    break;

                  case "upload":
                    this.clearQuery();
                    var uploadModal = Wf.Modal.upload($.extend({
                        elements: elements,
                        open: function() {
                            $("#upload-queue").uploader($.extend({
                                url: document.location.href,
                                field: $('input[type="file"]:first'),
                                websafe_mode: self.options.websafe_mode,
                                websafe_spaces: self.options.websafe_spaces,
                                websafe_textcase: self.options.websafe_textcase
                            }, self.options.upload)).on("uploadwidget:filerename", function(e, file) {
                                return function(file) {
                                    var found = !1, msg = self._translate("file_exists_alert", "A file with the same name exists in the target folder."), name = Wf.String.safe(file.name, self.options.websafe_mode, self.options.websafe_spaces, self.options.websafe_textcase), file = ($("li", "file-list").each(function() {
                                        name == $(this).attr("title") && (found = !0);
                                    }), file.element), span = $("span.queue-name:first", file);
                                    return found ? $(file).hasClass("exists") || ($(file).addClass("exists"), 
                                    $(span).attr("title", name + "::" + msg), $(span).tips()) : $(file).hasClass("exists") && ($(file).removeClass("exists"), 
                                    $(span).attr("title", name)), !0;
                                }(file);
                            }).on("uploadwidget:filecomplete", function(e, file, item) {
                                self._addReturnedItem(item), self._trigger("onUploadFile", null, file);
                            }).on("uploadwidget:uploadstart", function(e, file) {
                                file.data = $(":input[name]:enabled", file.element).map(function() {
                                    return {
                                        name: this.name,
                                        value: this.value
                                    };
                                }), $(":input[name]:enabled", file.element).prop("disabled", !0);
                            }).on("uploadwidget:uploadcomplete", function(e, errors) {
                                $("#upload-submit").disabled = !1, errors || (self._getList(), 
                                window.setTimeout(function() {
                                    $(uploadModal).trigger("modal.close");
                                }, 1e3), self._trigger("onUploadComplete"));
                            }), self._trigger("onUploadOpen");
                        },
                        upload: function() {
                            var serialized = $(":input[name]:enabled", "#upload-body").map(function() {
                                return {
                                    name: this.name,
                                    value: this.value
                                };
                            }), serialized = $.merge($("form > :input:enabled").serializeArray(), serialized);
                            return serialized.push({
                                name: "upload-dir",
                                value: dir
                            }), self._trigger("onUpload", null, [ serialized ]), 
                            $("#upload-queue").trigger("uploadwidget:upload", [ serialized ]), 
                            !1;
                        },
                        close: function() {
                            $("#upload-queue").trigger("uploadwidget:close");
                        }
                    }, self.options.upload.dialog));
                    break;

                  case "folder_new":
                    Wf.Modal.prompt(self._translate("folder_new", "New Folder"), function(v, args) {
                        v && (self._setLoader(), v = Wf.String.safe(v, self.options.websafe_mode, self.options.websafe_spaces, self.options.websafe_textcase), 
                        args = [ dir, v ].concat(args || []), Wf.JSON.request("folderNew", args, function(o) {
                            o && (self._isRoot() && $("#tree-body").trigger("tree:createnode", [ o.folders, self._dir ]), 
                            self._trigger("onFolderNew")), self.refresh();
                        }));
                    }, {
                        elements: elements,
                        label: {
                            confirm: self._translate("create", "Create")
                        },
                        validate: function(value) {
                            return !!value && Wf.String.safe(value, self.options.websafe_mode, self.options.websafe_spaces, self.options.websafe_textcase);
                        }
                    });
                    break;

                  case "copy":
                  case "cut":
                    if ("copy" === name && (evt.metaKey || evt.ctrlKey)) {
                        var items = this.getSelectedItems(), clip = [];
                        if ($.each(items, function() {
                            if (!$(this).hasClass("file")) return !0;
                            var url = $(this).data("url");
                            -1 === url.indexOf("://") && (url = Wf.String.path(site, url), 
                            url = Wf.URL.toAbsolute(url)), url && clip.push(url);
                        }), clip.length) {
                            $item = document.createElement("input"), url = clip.join(",");
                            if ($($item).css({
                                position: "absolute",
                                left: -9999
                            }).attr("readonly", !0).appendTo("body").val(url).focus(), 
                            $item.select) {
                                $item.select();
                                try {
                                    document.execCommand("copy");
                                } catch (err) {}
                            }
                            $($item).remove();
                        }
                        evt.preventDefault();
                    } else this._pasteaction = name, this._pasteitems = list, this._showPasteButton();
                    break;

                  case "paste":
                    this.clearQuery();
                    var fn = "copy" == this._pasteaction ? "copyItem" : "moveItem", items = (this._setLoader(), 
                    this._pasteitems.split(","));
                    function callback(o, dir) {
                        o.folders.length && self._treeLoaded() && ($.each(items, function(i, item) {
                            "moveItem" == fn && $("#tree-body").trigger("tree:removenode", [ item ]);
                        }), o = $.map(o.folders, function(item, i) {
                            item = item.name;
                            return {
                                id: item,
                                name: Wf.String.basename(item)
                            };
                        }), $("#tree-body").trigger("tree:createnode", [ o, dir ]));
                    }
                    $.each(items, function(i, item) {
                        var complete = i === items.length - 1;
                        Wf.JSON.request(fn, [ item, dir ], function(o) {
                            var confirmCallback;
                            o ? o.confirm ? (confirmCallback = function(state) {
                                Wf.JSON.request(fn, [ item, dir, state ], function(o) {
                                    o && !o.error && callback(o, dir);
                                });
                            }, Wf.Modal.confirm(self._translate("paste_item_confirm", "An item with the same name already exists in this folder. Do you want to replace it with the one you\u2019re pasting?"), confirmCallback, {
                                header: !1,
                                close: function() {
                                    complete && (self._clearPaste(), self.refresh());
                                },
                                buttons: [ {
                                    text: self._translate("cancel", "Cancel"),
                                    icon: "uk-icon-close",
                                    attributes: {
                                        class: "uk-modal-close"
                                    }
                                }, {
                                    text: self._translate("paste_keep_both", "Keep Both"),
                                    icon: "uk-icon-copy",
                                    click: function(e) {
                                        confirmCallback.call(this, "copy");
                                    },
                                    attributes: {
                                        type: "submit",
                                        class: "uk-button-success uk-modal-close"
                                    }
                                }, {
                                    text: self._translate("paste_replace", "Replace"),
                                    icon: "uk-icon-check",
                                    click: function(e) {
                                        confirmCallback.call(this, "replace");
                                    },
                                    attributes: {
                                        type: "submit",
                                        class: "uk-button-primary uk-modal-close",
                                        autofocus: !0
                                    }
                                } ]
                            })) : (callback(o, dir), complete && (self._clearPaste(), 
                            self.refresh()), o = (o.folders.length ? o.folders : o.files)[0].name, 
                            self._trigger("onPaste", [ fn, item, o ])) : complete && (self._clearPaste(), 
                            self.refresh());
                        }, self, !0);
                    });
                    break;

                  case "delete":
                    url = self._translate("delete_item_alert", "Delete Selected Item(s)");
                    Wf.Modal.confirm(url, function(state) {
                        state && (self._setLoader(), Wf.JSON.request("deleteItem", list, function(o) {
                            o && (o.folders.length && (self._treeLoaded() && $.each(o.folders, function(i, item) {
                                $("#tree-body").trigger("tree:removenode", [ item ]);
                            }), self._trigger("onFolderDelete", null, o.folders)), 
                            o.files.length) && self._trigger("onFileDelete", null, o.files), 
                            self.refresh();
                        }));
                    }, {
                        label: {
                            confirm: self._translate("delete", "Delete"),
                            cancel: self._translate("cancel", "Cancel")
                        },
                        header: !1
                    });
                    break;

                  case "rename":
                    var ext, $item = this.getSelectedItems(0), v = Wf.String.basename(list), renameModal = ($($item).hasClass("file") && (ext = Wf.String.getExt(v), 
                    v = Wf.String.filename(v)), Wf.Modal.prompt("Rename", function(name, args) {
                        if (name = Wf.String.safe(name, self.options.websafe_mode, self.options.websafe_spaces, self.options.websafe_textcase), 
                        v === name) return Wf.Modal.alert(self._translate("rename_item_name_new", "Please specify a new name for the item")), 
                        !1;
                        Wf.Modal.confirm(self._translate("rename_item_alert", "Renaming files/folders will break existing links. Continue?"), function(state) {
                            state && (self._setLoader(), args = [ list, name ].concat(args || []), 
                            Wf.JSON.request("renameItem", args, function(o) {
                                var item;
                                o && (self._reset(), item = Wf.String.path(self._dir, name), 
                                o.folders.length && (self._treeLoaded() && $("#tree-body").trigger("tree:renamenode", [ list, item ]), 
                                self._trigger("onFolderRename", [ list, item ])), 
                                ext && (item = item + "." + ext), o.files.length && self._trigger("onFileRename", [ list, item ]), 
                                item) && self._addReturnedItem({
                                    name: item
                                }), self.refresh();
                            })), $(renameModal).trigger("modal.close");
                        });
                    }, {
                        value: v,
                        header: !1,
                        label: {
                            confirm: self._translate("rename", "Rename")
                        },
                        elements: elements,
                        close_on_submit: !1,
                        validate: function(value) {
                            return !!value && Wf.String.safe(value, self.options.websafe_mode, self.options.websafe_spaces, self.options.websafe_textcase);
                        }
                    }));
                    break;

                  case "custom":
                    var url = options.dialog, action = options.action || null;
                    Wf.Modal.custom(url.title, function(args) {
                        args = [ list ].concat(args || []), Wf.JSON.request(action, args, function(o) {
                            self.refresh();
                        });
                    }, {
                        elements: url.elements
                    });
                }
            },
            _raiseError: function(error) {
                var self = this, err = "";
                "array" === $.type(error) ? (err += '<ul class="error-list">', $.each(error, function(k, v) {
                    err += "<li>" + v + "</li>";
                }), err += "</ul>") : err = error, this._dialog.alert = Wf.Modal.alert(err, {
                    close: function() {
                        self.refresh();
                    }
                });
            },
            _addActions: function(actions) {
                var self = this;
                $.each(actions, function(i, action) {
                    self._addAction(action);
                });
            },
            _addAction: function(o) {
                var icon, self = this, name = o.name || "", fn = this._execute, cls = (o.action && (fn = o.action), 
                name.replace(/_/g, "-")), action = document.createElement("button");
                $(action).addClass("action uk-button"), name && ($(action).attr({
                    id: name,
                    title: o.title,
                    "aria-label": o.title
                }).addClass(cls).append('<label id="' + name + '_label" class="uk-text uk-hidden-mini">&nbsp;' + o.title + "</label>"), 
                $.each((icon = {
                    folder_new: "folder-plus",
                    upload: "cloud-upload",
                    help: "question-circle"
                }[name] || name).split(" "), function(i, k) {
                    $(action).prepend('<i class="uk-icon uk-icon-small uk-icon-' + cls + " uk-icon-" + k + '"></i>');
                }), 0 <= icon.indexOf(" ") && ($(".uk-icon", action).first().addClass("uk-icon-stack uk-text-contrast").removeClass("uk-icon-medium"), 
                $('<span class="uk-stack uk-stack-medium"></span>').prependTo(action).append($(".uk-icon", action))), 
                o.name && $(action).on("mousedown.action", function(e) {
                    return e.preventDefault(), e.stopImmediatePropagation(), "function" == $.type(fn) ? fn.call(self, name) : self._trigger(fn, name);
                }), this._actions[name] = action), $("#browser-actions").append(action);
            },
            _getAction: function(name) {
                return this._actions[name];
            },
            _addButtons: function(buttons) {
                var self = this;
                buttons && (buttons.folder && $.each(buttons.folder, function(i, button) {
                    button && self._addButton(button, "folder");
                }), buttons.file) && $.each(buttons.file, function(i, button) {
                    button && self._addButton(button, "file");
                });
            },
            _addButton: function(o, type) {
                var name, icons, self = this, fn = this._execute, map = (o.action && (fn = o.action), 
                {
                    delete: "trash",
                    cut: "cut",
                    copy: "copy",
                    paste: "paste",
                    rename: "edit",
                    preview: "preview",
                    view: "preview",
                    "image-editor": "crop",
                    "text-editor": "file-xml"
                }), button = $("button." + o.name, $("#browser-buttons"));
                button.length || (button = document.createElement("button"), $(button).attr({
                    title: o.title,
                    "aria-label": o.title
                }), name = o.name.replace(/_/g, "-"), o.icon ? (icons = o.icon.split(" "), 
                $.each(icons, function(i, icon) {
                    $(button).append('<i class="uk-icon uk-icon-' + (map[icon] || icon) + '"></i>');
                }), 1 < icons.length && $('<span class="uk-stack"></span>').append($(".uk-icon", button)).appendTo(button)) : $(button).prepend('<i class="uk-icon uk-icon-' + (map[name] || name) + '"></i>'), 
                name && $(button).on("mousedown.button", function(evt) {
                    if (evt.preventDefault(), evt.stopPropagation(), $("li.selected", "#item-list").length || self._pasteitems) return o.sticky && $(button).toggleClass("uk-active"), 
                    o.dialog ? self._execute("custom", type, evt, o) : "function" == $.type(fn) ? fn.call(self, name, type, evt) : self._trigger(fn, type);
                }), $("#browser-buttons").append(button), $(button).addClass("uk-button uk-button-link button " + o.name + " uk-hidden")), 
                this._buttons[type][o.name] = {
                    name: o.name,
                    element: button,
                    trigger: o.trigger,
                    multiple: o.multiple,
                    single: "undefined" === $.type(o.single) || o.single,
                    restrict: o.restrict || "",
                    sticky: o.sticky
                };
            },
            _hideActions: function(actions) {
                $.each(actions, function(i, action) {
                    $(action, "#browser-actions").addClass("uk-hidden").attr("aria-hidden", !0).prop("disabled", !0);
                });
            },
            _showActions: function(actions) {
                $.each(actions, function(i, action) {
                    $(action, "#browser-actions").removeClass("uk-hidden").removeAttr("aria-hidden").removeAttr("disabled");
                });
            },
            _hideAllButtons: function() {
                var self = this;
                $(".button", "#browser-buttons").each(function() {
                    self._hideButton(this);
                });
            },
            _hideButtons: function(buttons) {
                var self = this;
                $.each(buttons, function(i, button) {
                    self._hideButton(button);
                });
            },
            _hideButton: function(button) {
                $(button).addClass("uk-hidden").attr("aria-hidden", !0).prop("disabled", !0);
            },
            _showButtons: function() {
                var buttons, filebtns, folderbtns, self = this, folder = (this._hideAllButtons(), 
                $("li.folder.selected", "#item-list")), file = $("li.file.selected", "#item-list");
                file.length && folder.length ? (buttons = {}, filebtns = this._buttons.file, 
                folderbtns = this._buttons.folder, $.each(filebtns, function(k, o) {
                    !o.trigger && o.multiple && folderbtns[k] && (buttons[k] = o);
                }), $.each(folderbtns, function(k, o) {
                    !o.trigger && o.multiple && filebtns[k] && (buttons[k] = o);
                }), $.each(buttons, function(k, o) {
                    self._showButton(o.element, o.single, !0);
                })) : (folder = file.length ? "file" : "folder", $.each(this._buttons[folder], function(k, o) {
                    var re, item;
                    o.trigger || o.restrict || self._showButton(o.element, o.single, o.multiple), 
                    o.restrict && (re = o.restrict.split(",").join("|"), item = self.getSelectedItems(0), 
                    new RegExp("\\.(" + re + ")$", "i").test($(item).attr("title"))) && self._showButton(o.element, o.single, o.multiple);
                })), this._pasteitems && this._showPasteButton();
            },
            _showButton: function(button, single, multiple) {
                var show;
                button && (show = !1, 1 < $("li.selected", "#item-list").length ? multiple && (show = !0) : single && (show = !0), 
                show ? $(button).removeClass("uk-hidden").removeAttr("aria-hidden").removeAttr("disabled") : $(button).addClass("uk-hidden").attr("aria-hidden", !1));
            },
            _getButton: function(type, name) {
                return this._buttons[type][name] || null;
            },
            _showPasteButton: function() {
                this._showButton($(".button.paste", "#browser-buttons"), !0, !0);
            },
            _isSelectedItem: function(el) {
                return $(el).is("li.selected");
            },
            _deselectItems: function() {
                $("li.selected", "#item-list").removeClass("selected active").find('input[type="checkbox"]').prop("checked", !1), 
                $("#browser-details-text, #browser-details-comment").empty(), $.each([ "#browser-details-nav-left", "#browser-details-nav-right", "#browser-details-nav-text" ], function(i, el) {
                    $(el).addClass("uk-invisible").attr("aria-hidden", !0);
                }), this._hideAllButtons(), $('input[type="checkbox"]', "#check-all").prop("checked", !1);
            },
            _selectItems: function(items, show) {
                $(items).addClass("selected").find('input[type="checkbox"]').prop("checked", !0), 
                show && this._showSelectedItems();
                show = $("#item-list");
                $("input:checked", show).length === $("li", show).length && $('input[type="checkbox"]', "#check-all").prop("checked", !0), 
                this._trigger("onSelectItems", null, items);
            },
            _removeSelectedItems: function(items, show) {
                $(items).removeClass("selected active").find('input[type="checkbox"]').prop("checked", !1), 
                show && this._showSelectedItems(), this._trigger("onRemoveItems", null, items);
            },
            getSelectedItems: function(key) {
                var $items = $("li.selected", "#item-list");
                return "number" == typeof key && $items[key] || $items;
            },
            setSelectedItems: function(items) {
                this._findItem(items);
            },
            _setSelectedItems: function(e, multiple) {
                var checkbox = !1, el = e.target, $list = $("#item-list");
                if ("keydown" === e.type) {
                    if (el = $("li.selected:last", $list).get(0), $list = $("#browser-list"), 
                    38 == e.which && (el = el.previousSibling), !(el = 40 == e.which ? el.nextSibling : el)) return;
                    (el.offsetTop > $list.innerHeight() || el.offsetTop < $list.scrollTop()) && $list.scrollTop(el.offsetTop + $(el).innerHeight() - $list.height());
                }
                $(el).is('input[type="checkbox"]') && (checkbox = multiple = !0, 
                el = $(el).parents("li").get(0)), "LI" != el.nodeName && (el = el.parentNode);
                var selected = $("li.selected", $list);
                if (this._isSelectedItem(el) && 1 === selected.length) return e.preventDefault(), 
                !1;
                var items = $("li.folder, li.file", $list), $list = e.ctrlKey || e.metaKey, e = e.shiftKey;
                if (($list || e || checkbox) && multiple) {
                    if (multiple && ($list || e || checkbox) && (($list || checkbox) && (this._isSelectedItem(el) ? this._removeSelectedItems([ el ], !0) : this._selectItems([ el ], !0)), 
                    e)) if (selected.length) {
                        var si = $(selected).index(), ci = $(el, items).index(), selection = [];
                        if (this._deselectItems(), si < ci) for (var i = ci; si <= i; i--) selection.push(items[i]); else for (i = si; ci <= i; i--) selection.push(items[i]);
                        this._selectItems(selection, !0);
                    } else this._selectItems([ el ], !0);
                } else $(el).find('input[type="checkbox"]').prop("checked", !1), 
                this._deselectItems(), this._selectItems([ el ], !0);
            },
            _showSelectedItems: function() {
                var $items = $("li.selected", "#item-list");
                $items.length ? ($items.first().addClass("active"), this._showItemDetails()) : this._reset();
            },
            _findItem: function(files, type) {
                var self = this, items = [], insert = (type = type || "file", "string" == $.type(files) && (files = [ files ]), 
                !1), $list = $("#item-list");
                $.each(files, function(i, file) {
                    var id, url, item, selectors, name;
                    file && (name = file.name || "", id = file.id || "", url = file.url || "", 
                    name = decodeURIComponent(name), $list.length) && (item = [], 
                    selectors = [], id && selectors.push("li." + type + "#" + $.escapeSelector(id)), 
                    url && selectors.push("li." + type + '[data-url="' + url + '"]'), 
                    name && selectors.push("li." + type + '[title="' + Wf.String.basename(name) + '"]'), 
                    (item = $(selectors.join(","), $list)).length) && (file.insert && (insert = !0, 
                    items = item, self.serializeItemData(item).then(function(data) {
                        self._trigger("onFileClick", [ item, data ]);
                    })), insert || $.merge(items, item));
                }), items.length && (files = $(items).first().outerHeight() + $(".folder-up").outerHeight(), 
                files = $(items).get(0).offsetTop - files, files = Math.round(files), 
                $("#browser-list").delay(100).animate({
                    scrollTop: files
                }, 1500, function() {
                    $(this).off(scrollEvents);
                })), this._selectItems(items, !0);
            },
            serializeItemData: function(item) {
                var self = this;
                return new Promise(function(resolve, reject) {
                    var path, props = {};
                    $.each([ "url", "preview", "width", "height", "description", "modified", "size" ], function(i, key) {
                        props[key] = $(item).attr("data-" + key) || "";
                    }), props.title = $(item).attr("title"), props.title = Wf.String.basename(props.title), 
                    props.url ? resolve(props) : (path = Wf.String.path(self._dir, props.title), 
                    Wf.JSON.request("getFileDetails", [ path ], function(o) {
                        o && !o.error && (props = $.extend(props, o)), resolve(props);
                    }));
                });
            },
            _serializeSelectedItems: function() {
                var self = this;
                return $("li.selected", "#item-list").map(function() {
                    return Wf.String.path(self._dir, $(this).attr("title"));
                }).get().join(",");
            },
            _showItemDetails: function() {
                var index, self = this, $items = $("li.selected", "#item-list"), n = $items.length, $nav = $("#browser-details-nav");
                1 < n ? ((index = $items.index($items.filter(".active"))) ? $(".details-nav-left", $nav).removeClass("uk-invisible").attr("aria-hidden", !1) : $(".details-nav-left", $nav).addClass("uk-invisible").attr("aria-hidden", !0), 
                index + 1 < n ? $(".details-nav-right", $nav).removeClass("uk-invisible").attr("aria-hidden", !1) : $(".details-nav-right", $nav).addClass("uk-invisible").attr("aria-hidden", !0), 
                $(".details-nav-text", $nav).removeClass("uk-invisible").html(function() {
                    return self._translate("one_of_many", "%o of %m").replace("%o", index + 1).replace("%m", n);
                })) : $("li", $nav).addClass("uk-invisible").attr("aria-hidden", !0), 
                this._showButtons(), this._getItemDetails();
            },
            _getDimensions: function(file) {
                var src, img = new Image();
                $(file).data("preview") && (src = $(file).data("preview"), $(file).addClass("loading disabled").children("span.checkbox").addClass("disabled"), 
                img.onload = function() {
                    $(file).attr({
                        "data-preview": src,
                        "data-width": img.width,
                        "data-height": img.height
                    }), $(file).removeClass("loading disabled").children("span.checkbox").removeClass("disabled");
                }, img.onerror = function() {
                    $(file).removeClass("loading disabled").children("span.checkbox").removeClass("disabled");
                }, img.src = src);
            },
            _getMediaProps: function(file) {
                return new Promise(function(resolve, reject) {
                    if (!file.type) return reject();
                    var audio, video, timer, props, image, src;
                    "video" === file.type && /\.(mp4|m4v|ogg|ogv|webm)$/i.test(file.preview) && $.support.video ? (props = {}, 
                    (video = document.createElement("video")).onloadedmetadata = function() {
                        props = {
                            duration: parseInt(video.duration / 60, 10) + ":" + parseInt(video.duration % 60, 10),
                            width: video.videoWidth,
                            height: video.videoHeight
                        }, video = null, resolve(props);
                    }, video.src = file.preview) : "audio" === file.type && /\.(mp3|oga|ogg)$/i.test(file.preview) && $.support.audio ? (props = {}, 
                    (audio = document.createElement("audio")).onloadedmetadata = function() {
                        props.duration = parseInt(audio.duration / 60, 10) + ":" + parseInt(audio.duration % 60, 10), 
                        audio = null, resolve(props);
                    }, audio.src = file.preview) : "video" === file.type && /\.(wmv|avi|mov)$/i.test(file.preview) && $.support.video ? (props = {}, 
                    video = document.createElement("video"), document.body.appendChild(video), 
                    video.style.position = "absolute", video.style.left = "-10000px", 
                    timer = setTimeout(function() {
                        video && video.clientWidth && (props.duration = "", props.width = video.clientWidth, 
                        props.height = video.clientHeight, clearTimeout(timer), 
                        document.body.removeChild(video), video = null, resolve(props));
                    }, 100), video.src = file.preview) : "image" === file.type ? (props = {}, 
                    (image = new Image()).onload = function() {
                        props.width = image.width, props.height = image.height, 
                        resolve(props);
                    }, src = Wf.String.encodeURI(file.preview) + "?" + new Date().getTime(), 
                    !/:\/\//.test(file.preview) && -1 === file.preview.indexOf("?") || (src = file.preview), 
                    image.src = src) : reject();
                });
            },
            _getItemDetails: function() {
                var mime, self = this, item = $("li.selected.active", "#item-list"), title = Wf.String.basename($(item).attr("title")), type = $(item).hasClass("folder") ? "folder" : "file", path = ($("#browser-details-text").empty().addClass("loading"), 
                Wf.String.path(this._dir, Wf.String.encodeURI(title))), name = title, ext = "", info = ($(self.element).next("span.loader").remove(), 
                "file" == type && (name = Wf.String.stripExt(title), ext = Wf.String.getExt(title)), 
                document.createElement("div")), title = ($(info).addClass("uk-comment uk-height-1-1").append('<div class="uk-comment-header"><h5 class="uk-width-1-1 uk-margin-remove uk-text-bold uk-text-truncate" title="' + name + '">' + name + '</h5><div class="uk-comment-meta">' + ext + " " + self._translate(type, Wf.String.ucfirst(type)) + '</div><div class="uk-comment-meta" id="info-properties"><div></div>'), 
                $(info).append('<div class="uk-comment-body uk-width-1-1 uk-text-center" id="info-preview"></div>'), 
                $("#browser-details-text").removeClass("loading").empty().append(info), 
                "");
                $(item).hasClass("notwritable") && (title += '<li class="comments ' + type + ' notwritable"><span class="hastip" title="' + self._translate("notwritable_desc", "Unwritable") + '">' + self._translate("notwritable", "Unwritable") + "</span></li>"), 
                $(item).data("trigger") && $.each($(item).data("trigger").split(","), function(i, v) {
                    "" !== v && (v = self._getButton(type, v)) && self._showButton(v.element, v.single, v.multiple);
                }), $(item).data("size") && $(".uk-comment-header", info).append('<div class="uk-comment-meta" id="info-size">' + tinyMCEPopup.getLang("dlg.size", "Size") + ": " + Wf.String.formatSize($(item).data("size")) + "</div>"), 
                $(item).data("modified") && $(".uk-comment-header", info).append('<div class="uk-comment-meta" id="info-modified">' + tinyMCEPopup.getLang("dlg.modified", "Modified") + ": " + Wf.String.formatDate($(item).data("modified"), self.options.date_format) + "</div>"), 
                $(item).data("permissions") && $(".uk-comment-header", info).append('<div class="uk-comment-meta" id="info-permissions">' + tinyMCEPopup.getLang("dlg.permissions", "Permissions") + ": " + $(item).data("permissions") + "</div>"), 
                title && $("#browser-details-comment").empty().append("<ul>" + title + "</ul>"), 
                $("span.hastip", $("#browser-details-comment")).tips(), "folder" == type ? self._trigger("onFolderDetails", null, item) : ($(item).data("attribution") && (name = "", 
                name = 2 < (title = $(item).data("attribution").split("|")).length && title[2] ? '<a href="' + title[2] + '" target="_blank" rel="noopener noreferrer">' + title[0] + "</a>" : title[0] || "", 
                $(".uk-comment-header", info).append('<div class="uk-comment-meta" id="info-attribution">' + tinyMCEPopup.getLang("dlg.attribution", "Attribution") + ": " + name + "</div>")), 
                self.serializeItemData(item).then(function(data) {
                    function callback(data) {
                        data.width && data.height && ($(".uk-comment-header", info).append('<div class="uk-comment-meta" id="info-dimensions">' + self._translate("dimensions", "Dimensions") + ": " + data.width + " x " + data.height + "</div>"), 
                        mime) && "image" === mime && $("#info-preview").empty().append('<img src="' + data.preview + '" alt="" />').removeClass("loading"), 
                        data.duration && $(".uk-comment-header", info).append('<div class="uk-comment-meta" id="info-duration">' + tinyMCEPopup.getLang("dlg.duration", "Duration") + ": " + data.duration + "</div>"), 
                        self._trigger("onFileDetails", [ item, data ]);
                    }
                    if ($.each(data, function(key, value) {
                        $(item).data(key, value);
                    }), (mime = getMimeType(ext)) && /^(image|video|audio)$/.test(mime)) return "image" === mime && data.width && data.height || "video" === mime && data.width && data.height && data.duration || "audio" === mime && data.duration ? callback(data) : void self._getMediaProps({
                        preview: data.preview,
                        type: mime
                    }).then(function(o) {
                        $.each(o, function(key, value) {
                            data[key] = value, $(item).data(data);
                        }), callback(data);
                    }, function() {
                        Wf.JSON.request("getDimensions", [ path ], function(o) {
                            o && !o.error && $.each(o, function(key, value) {
                                data[key] = value, $(item).data(data);
                            }), callback(data);
                        });
                    });
                }));
            }
        }, $.fn.filebrowser = function(options) {
            $(this).addClass("filebrowser");
            var instance = new FileBrowser(this, options);
            return $(this).on("filebrowser:insert", function(e, cb) {
                var selected = instance.getSelectedItems(), promises = [];
                $(selected).each(function() {
                    promises.push(instance.serializeItemData(this));
                }), Promise.all(promises).then(function(props) {
                    return "function" == typeof cb ? cb(selected, props) : props;
                });
            }), $(this).on("filebrowser:status", function(e, status) {
                instance.setStatus(status);
            }), $(this).on("filebrowser:load", function(e, url) {
                return instance.load(url);
            }), $(this).on("filebrowser:refresh", function() {
                return instance.refresh();
            }), $(this).on("filebrowser:sort", function() {
                return instance._showItemDetails();
            }), $.fn.filebrowser.getbasedir = function() {
                return instance.getBaseDir();
            }, $.fn.filebrowser.getcurrentdir = function() {
                return instance.getCurrentDir();
            }, $.fn.filebrowser.getselected = function() {
                return instance.getSelectedItems();
            }, $.fn.filebrowser.status = function(status) {
                return instance.setStatus(status);
            }, $.fn.filebrowser.load = function(url) {
                return instance.load(url);
            }, this;
        }, window.FileBrowser = FileBrowser;
    }(jQuery, Wf);
}();js/editor.min.js000060400000075563152456167170007620 0ustar00/* jce - 2.9.99.2 | 2026-04-22 | https://www.joomlacontenteditor.net | Source: https://github.com/widgetfactory/jce | Copyright (C) 2006 - 2026 Ryan Demmer. All rights reserved | GNU/GPL Version 2 or later - http://www.gnu.org/licenses/gpl-2.0.html */
function IeCursorFix() {
    return !0;
}

function jInsertEditorText(text, editor) {
    try {
        WfEditor.insert(editor, text);
    } catch (e) {}
}

!function() {
    var each = tinymce.each, extend = tinymce.extend, DOM = tinymce.DOM, Event = tinymce.dom.Event, Dispatcher = tinymce.util.Dispatcher, corePlugins = [ "core", "help", "autolink", "cleanup", "code", "format", "importcss", "colorpicker", "upload", "blobupload", "figure", "ui", "noneditable", "branding" ];
    function isHidden(el) {
        return (el = "string" == typeof el ? document.getElementById(el) : el) && "none" === el.style.display;
    }
    function getRefocusBookmarkId(ed) {
        var prefix = "wf-bookmark-{path}{query}-{id}-";
        return prefix = (prefix = (prefix = (prefix = prefix.replace(/\{path\}/g, document.location.pathname)).replace(/\{query\}/g, document.location.search)).replace(/\{id\}/g, ed.id)).replace(/\W/g, "_").replace(/_+/g, "_").replace(/^_+|_+$/g, "");
    }
    function getScriptOptions(key) {
        if (!Joomla.optionsStorage) {
            Joomla.optionsStorage = {};
            var scripts = document.querySelectorAll("script.joomla-script-options.new");
            if (!scripts) throw new Error("No Joomla options found");
            scripts.forEach(element => {
                element = element.text || element.textContent;
                try {
                    var data = JSON.parse(element);
                    data && (Joomla.optionsStorage = data);
                } catch (e) {}
            });
        }
        scripts = Joomla.getOptions ? Joomla.getOptions("plg_editor_jce", {}) : Joomla.optionsStorage.plg_editor_jce || {};
        return scripts && scripts[key] ? (scripts = scripts[key], Array.isArray(scripts) ? scripts[0] : scripts) : null;
    }
    var PlatformEditor_register = function(editor) {
        var instance = {
            getValue: function() {
                return WfEditor.getContent(editor.id);
            },
            setValue: function(value) {
                WfEditor.setContent(editor.id, value);
            },
            getSelection: function() {
                return WfEditor.getSelection(editor.id, {
                    format: "text"
                });
            },
            replaceSelection: function(value) {
                return WfEditor.insert(editor.id, value);
            },
            disable: function(disabled) {
                return editor.setMode(disabled ? "readonly" : "design");
            },
            id: editor.id,
            instance: editor,
            onSave: function() {}
        };
        if ("undefined" != typeof JceDecorator) return !0;
        Joomla.editors && (Joomla.editors.instances[editor.id] = instance);
    }, PlatformEditor_unregister = function(editor) {
        var instance, editor = editor.getElement();
        if ("undefined" != typeof JceDecorator) return !((instance = JoomlaEditor.get(editor.id)) && instance instanceof JceDecorator) || JoomlaEditor.unregister(instance);
        Joomla.editors && delete Joomla.editors.instances[editor.id];
    }, WfEditor = {
        settings: null,
        bookmark: null,
        options: {},
        getSite: function(base) {
            var u = document.location.href, host = -1 !== base.indexOf("http") ? (host = base.substr(base.indexOf("://") + 3)).substr(host.indexOf("/")) : u.substr(0, u.indexOf(base) + base.length);
            return -1 !== u.indexOf("/administrator/") && (host += "administrator/"), 
            host;
        },
        init: function(settings) {
            if (!(settings = settings || getScriptOptions("editor"))) throw new Error("Unable to initialize editor. No settings found");
            var base = settings.base_url, site = this.getSite(base), indent = (/https:\/\//.test(document.location.href) && (base = base.replace(/http:/, "https:")), 
            window.tinyMCEPreInit = {}, settings.query = function http_build_query(params, prefix) {
                var value, fullKey, queryStringParts = [];
                for (const key in params) params.hasOwnProperty(key) && (value = params[key], 
                fullKey = prefix ? `${prefix}[${key}]` : key, queryStringParts.push("object" == typeof value && null !== value ? http_build_query(value, fullKey) : encodeURIComponent(fullKey) + "=" + encodeURIComponent(value)));
                return queryStringParts.join("&");
            }(settings.query), extend(tinymce, {
                baseURL: base + "media/com_jce/editor/tinymce",
                suffix: "",
                query: settings.query
            }), "p,h1,h2,h3,h4,h5,h6,blockquote,div,title,pre,td,ul,li,area,table,thead,tfoot,tbody,tr,section,article,hgroup,aside,figure,object,video,audio");
            if (this.settings = this.settings || extend({
                document_base_url: base,
                site_url: site,
                schema: "mixed",
                convert_urls: !0,
                relative_urls: !0,
                mode: "textareas",
                entity_encoding: "raw",
                editor_selector: "wf-editor",
                editor_deselector: "wf-no-editor",
                urlconverter_callback: "WFEditor.convertURL",
                popup_css: !1,
                add_form_submit_trigger: !1,
                submit_patch: !1,
                theme: "none",
                skin_directionality: "ltr",
                invalid_elements: "applet,iframe,object,embed,script,style,body,bgsound,base,basefont,frame,frameset,head,html,id,ilayer,layer,link,meta,name,title,xml",
                plugins: "",
                external_plugins: {},
                whitespace_elements: "pre,script,style,textarea,code",
                allow_conditional_comments: !0,
                allow_event_attributes: !1,
                fix_list_elements: !0,
                indent_before: indent,
                indent_after: indent,
                update_styles: !0,
                constrain_menus: !1,
                compress: {
                    css: !1,
                    javascript: !1
                },
                language_load: !1
            }, settings), this.settings) try {
                this.settings.compress.css && extend(this.settings, {
                    content_css: !1,
                    editor_css: !1
                }), this.markLoaded(), WFEditor.load();
            } catch (e) {
                console.debug(e);
            }
        },
        markLoaded: function() {
            var s = this.settings, each = tinymce.each, suffix = s.suffix || "";
            function load(u) {
                tinymce.ScriptLoader.markDone(tinyMCE.baseURL + "/" + u);
            }
            1 == s.compress.javascript && (each(s.external_plugins, function(url, name) {
                load(url);
            }), each(s.plugins.split(","), function(n) {
                n && load("plugins/" + n + "/plugin" + suffix + ".js");
            })), each(corePlugins, function(n) {
                load("plugins/" + n + "/plugin" + suffix + ".js");
            });
        },
        setBookmark: function(ed) {
            DOM.bind(document.body, "mousedown", function(e) {
                !function(el) {
                    return DOM.getParent(el, "div.mceEditor, div.mceSplitButtonMenu, div.mceListBoxMenu, div.mceDropDown");
                }(e.target) && !function(ed) {
                    return ed.isHidden() || "hidden" == DOM.getStyle(ed.id + "_ifr", "visibility");
                }(ed) && ed.selection && (e = ed.selection.getNode(), DOM.getParent(e, "body#tinymce")) && (ed.lastSelectionBookmark = ed.selection.getBookmark(1));
            });
        },
        load: function() {
            var loaded, self = this;
            function _load() {
                loaded || (loaded = !0, self.preinit());
            }
            tinymce.settings = this.settings, tinyMCE.onAddEditor.add(function(mgr, ed) {
                var options, btns, el = ed.getElement();
                "advanced" === ed.settings.theme && (window.Joomla && (Joomla.getOptions && (options = getScriptOptions("joomla_xtd_buttons"), 
                btns = ed.settings.joomla_xtd_buttons || {}, options) && tinymce.is(options, "object") && (each(options, function(value, key) {
                    value && value.length && (btns[key] = value);
                }), ed.settings.joomla_xtd_buttons = btns), PlatformEditor_register(ed)), 
                self.settings.compress.css && ed.onPreInit.add(function() {
                    ed.dom.loadCSS(self.settings.site_url + "index.php?option=com_jce&task=editor.pack&type=css&slot=content");
                }), self.createToggle(el), self.setBookmark(ed), ed.onPreInit.add(function() {
                    self.createTabs(ed);
                }), ed.onInit.add(function() {
                    ed.onSubmit.addToTop(function() {
                        ed.initialized && ed.getElement() && (ed.isNotDirty = 1, 
                        self.getContent(ed.id));
                    }), ed.settings.refocus && window.setTimeout(function() {
                        var bookmark = function(ed) {
                            var bookmarkStore = sessionStorage.getItem("wf_refocus_bookmark"), bookmarkData = {}, bookmark = 0;
                            if (bookmarkStore) try {
                                bookmarkData = JSON.parse(bookmarkStore);
                            } catch (e) {}
                            return (bookmark = bookmarkData[getRefocusBookmarkId(ed)] || 0) && (sessionStorage.removeItem("wf_refocus_bookmark"), 
                            bookmark = parseInt(bookmark)), bookmark;
                        }(ed);
                        bookmark && self.setActiveLine(ed, bookmark);
                    }, 100);
                }), ed.onBeforeRenderUI.add(function() {
                    var n = ed.getElement().form;
                    !n || n._mceOldSubmit || n.submit.nodeType || n.submit.length || ((ed.formElement = n)._mceOldSubmit = n.submit, 
                    n.submit = function() {
                        return tinymce.each(tinymce.editors, function(e) {
                            e.initialized && e.getElement() && (e.isNotDirty = 1, 
                            self.getContent(e.id));
                        }), ed.formElement._mceOldSubmit(ed.formElement);
                    });
                }), ed.onPostRender.add(function() {
                    var el = ed.getElement(), el = self.getEditorState(el), toggle = tinymce.is(ed.settings.toggle) ? parseInt(ed.settings.toggle, 10) : 0;
                    !el && toggle && (ed.hide(), ed.plugins.source && ed.plugins.source.hide(), 
                    ed.plugins.preview) && ed.plugins.preview.hide();
                }), ed.onWfEditorChange = new Dispatcher(), ed.onWfEditorChange.add(function(ed, o) {
                    tinymce.is(o.content) && (ed.setContent(o.content, o), ed.onChange.dispatch());
                }), ed.onSaveContent.add(function() {
                    var bookmark;
                    ed === tinymce.activeEditor && (bookmark = self.getActiveLine(ed), 
                    function(ed, bookmark) {
                        var bookmarkData;
                        bookmark && ((bookmarkData = {})[getRefocusBookmarkId(ed)] = bookmark, 
                        sessionStorage.setItem("wf_refocus_bookmark", JSON.stringify(bookmarkData)));
                    }(ed, bookmark));
                }), ed.onRemove.add(function() {
                    var nodes, container = DOM.getParent(ed.getElement(), "div.wf-editor-container");
                    container && (nodes = tinymce.grep(DOM.select("div", container), function(node) {
                        return node !== ed.getElement() && node !== ed.getContainer();
                    }), DOM.remove(nodes), DOM.remove(container, 1));
                }));
            }), Event.bind(window, "load", function() {
                _load(), self.initSubformEvents();
            }), Event.bind(window, "ready", function() {
                window.setTimeout(function() {
                    _load();
                }, 1e3);
            });
        },
        initSubformEvents: function() {
            var self = this, settings = this.settings;
            function removeEditor(el) {
                el = tinymce.EditorManager.get(el.id);
                el && (el.remove(), el.destroy(!0), PlatformEditor_unregister(el));
            }
            function createEditor(el) {
                var ed = tinymce.EditorManager.get(el.id);
                ed || (self.createInstance(el), ed = new tinymce.Editor(el.id, settings)), 
                ed.render();
            }
            function rebuildEditor(row) {
                row = DOM.select(".wf-editor-container > textarea[id]", row);
                each(row, function(el) {
                    removeEditor(el), createEditor(el);
                });
            }
            window.jQuery && (jQuery("div.subform-repeatable").on("subform-row-add", function(event, row) {
                row = DOM.select(".wf-editor", row);
                each(row, function(el) {
                    createEditor(el);
                });
            }).on("subform-row-remove", function(event, row) {
                row = DOM.select(".wf-editor", row);
                each(row, function(el) {
                    removeEditor(el);
                });
            }), jQuery(document).on("editor-reinit", function(e, row) {
                rebuildEditor(row);
            }), jQuery(document).on("sortstop", function(e, ui) {
                ui.item[0] && rebuildEditor(ui.item[0]);
            })), DOM.bind(document, "subform-row-add", function(e) {
                var e = e.detail ? e.detail.row : null;
                e && (e = DOM.select(".wf-editor", e), each(e, function(el) {
                    createEditor(el);
                }));
            }), DOM.bind(document, "subform-row-remove", function(e) {
                var e = e.detail ? e.detail.row : null;
                e && (e = DOM.select(".wf-editor", e), each(e, function(el) {
                    removeEditor(el);
                }));
            }), DOM.bind(document, "sortstop", function(e) {
                e = e.detail ? e.detail.row : null;
                e && rebuildEditor(e);
            }), DOM.bind(DOM.select("joomla-field-subform.subform-repeatable"), "dragend", function(e) {
                rebuildEditor(e.target);
            });
        },
        isEditorActive: function(elm) {
            return 0 == DOM.hasClass(elm, "wf-no-editor");
        },
        canToggle: function() {
            var settings = this.settings;
            return tinymce.is(settings.toggle) ? parseInt(settings.toggle, 10) : 0;
        },
        getEditorState: function(el) {
            var state, s = this.settings;
            return null == (state = !1 !== s.use_state_cookies ? tinymce.util.Storage.get("wf_editor_state_" + el.id) : state) && (state = tinymce.is(s.toggle_state) ? s.toggle_state : 1), 
            state = parseInt(state, 10);
        },
        createInstance: function(el) {
            var s = this.settings;
            if (el = "string" == typeof el ? DOM.get(el) : el) {
                s.width && DOM.setStyle(el, "width", s.width), s.height && DOM.setStyle(el, "height", s.height);
                s = this.getEditorState(el);
                if (this.canToggle()) {
                    this.createToggle(el);
                    var header = DOM.getPrev(el, ".wf-editor-header");
                    if (!s) return DOM.addClass(el, "wf-no-editor"), DOM.hide(DOM.select(".wf-editor-tabs", header)), 
                    DOM.addClass(el.parentNode, "wf-editor-toggle-off"), !1;
                }
                return !0;
            }
        },
        create: function(elements) {
            var ed;
            return "string" == typeof elements && ((ed = tinymce.get(elements)) && tinymce.remove(ed), 
            elements = [ elements ]), this.preinit(elements);
        },
        preinit: function(elements) {
            var self = this, settings = this.settings;
            try {
                elements = elements || DOM.select(".wf-editor"), each(elements, function(elm) {
                    var editorId;
                    return !(elm = DOM.get(elm)) || (editorId = function(elm) {
                        var id = elm.id;
                        return id || (id = (id = elm.name) && !DOM.get(id) ? elm.name : DOM.uniqueId(), 
                        elm.setAttribute("id", id)), id;
                    }(elm), !!tinymce.get(editorId)) || (DOM.show(elm), "advanced" == settings.theme && self.createInstance(elm), 
                    void new tinymce.Editor(editorId, settings, tinymce.EditorManager).render());
                });
            } catch (e) {
                console.debug(e);
            }
        },
        toggleEditor: function(el) {
            var activeTab, height, ed = tinymce.get(el.id);
            if (ed) if (DOM.hasClass(el, "wf-no-editor")) switch (DOM.removeClass(el, "wf-no-editor"), 
            DOM.setStyle(DOM.select(".wf-editor-tabs", el.parentNode), "display", ""), 
            DOM.removeClass(el.parentNode, "wf-editor-toggle-off"), !1 !== this.settings.use_state_cookies && tinymce.util.Storage.set("wf_editor_state_" + el.id, 1), 
            (activeTab = !1 !== this.settings.use_state_cookies ? sessionStorage.getItem("wf-editor-tabs-" + ed.id) : activeTab) || ed.settings.active_tab, 
            DOM.hide(ed.getElement()), activeTab) {
              default:
              case "wf-editor-wysiwyg":
                ed.show();
                break;

              case "wf-editor-source":
                ed.plugins.source.toggle();
                break;

              case "wf-editor-preview":
                ed.plugins.preview.toggle();
            } else DOM.addClass(el, "wf-no-editor"), DOM.hide(DOM.select(".wf-editor-tabs", el.parentNode)), 
            DOM.addClass(el.parentNode, "wf-editor-toggle-off"), (height = !1 !== this.settings.use_state_cookies ? sessionStorage.getItem("wf-editor-container-height") : height) && !ed.getParam("fullscreen_enabled") && DOM.setStyle(ed.getElement(), "height", height), 
            !1 !== this.settings.use_state_cookies && tinymce.util.Storage.set("wf_editor_state_" + el.id, 0), 
            ed.hide(), this.getContent(ed.id), ed.plugins.source && ed.plugins.source.hide(), 
            ed.plugins.preview && ed.plugins.preview.hide(), DOM.setStyle(ed.getElement(), "display", ""); else DOM.addClass(el.parentNode, "mce-loading"), 
            DOM.removeClass(el, "wf-no-editor"), DOM.removeClass(el.parentNode, "wf-editor-toggle-off"), 
            !1 !== this.settings.use_state_cookies && tinymce.util.Storage.set("wf_editor_state_" + el.id, 1), 
            tinymce.execCommand("mceToggleEditor", !1, el.id), setTimeout(function() {
                DOM.removeClass(el.parentNode, "mce-loading");
            }, 1e3);
        },
        getActiveTab: function(ed) {
            var ed = ed.getElement().parentNode.querySelector(".wf-editor-tabs > button.active");
            return (ed = ed && ed.getAttribute("aria-controls")) ? ed.substring(10) : "wysiwyg";
        },
        getEditor: function(el) {
            var ed, win = window;
            return !win.tinymce && window.parent.tinymce && (win = window.parent), 
            !(!(ed = (ed = (el = el && ("string" == typeof el ? document.getElementById(el) : el)) && el.id ? win.tinymce.get(el.id) : ed) || win.tinymce.activeEditor) || !ed.getElement() || DOM.hasClass(ed.getElement(), "wf-no-editor")) && ("wysiwyg" == (el = this.getActiveTab(ed)) ? ed : "source" == el && ed.plugins.source);
        },
        loadContent: function(ed) {
            var code, el = ed.getElement();
            isHidden(ed.id + "_parent") && ed.plugins.source && null !== (code = ed.plugins.source.getContent()) && (/TEXTAREA|INPUT/i.test(el.nodeName) ? el.value = code : el.innerHTML = code, 
            ed.load());
        },
        createToggle: function(el) {
            var self = this, s = this.settings, header = DOM.getPrev(el, ".wf-editor-header") || this.createHeader(el);
            self.canToggle() && 0 === DOM.select("button.wf-editor-toggle", header).length && (header = DOM.add(header, "button", {
                class: "wf-editor-toggle btn btn-link",
                tabindex: "-1"
            }, '<svg version="1.1" xmlns="http://www.w3.org/2000/svg" width="16" height="16" viewBox="0 0 448 448"><title></title><g id="wf-toggle-icon" stroke="none" stroke-width="1"></g><path d="M280 64.132v59.482c15.84 6.914 30.406 16.803 42.995 29.391 26.443 26.442 41.005 61.6 41.005 98.995s-14.563 72.552-41.005 98.995c-26.442 26.442-61.599 41.005-98.995 41.005s-72.552-14.563-98.995-41.005c-26.442-26.442-41.005-61.6-41.005-98.995s14.563-72.552 41.005-98.995c12.589-12.589 27.155-22.478 42.995-29.392v-59.481c-80.959 24.097-140 99.082-140 187.868 0 108.248 87.753 196 196 196s196-87.752 196-196c0-88.786-59.041-163.77-140-187.868zM196 0h56v224h-56z"></path></svg>' + (s.toggle_label || "")), 
            DOM.bind(header, "click", function(e) {
                e.preventDefault(), self.toggleEditor(el);
            }));
        },
        setActiveLine: function(ed, pos, fromCharacterIndex) {
            var blocks = [], doc = ed.getDoc(), body = ed.getBody();
            !(pos = parseInt(pos)) || pos < 0 || (fromCharacterIndex = fromCharacterIndex ? function(position) {
                var walker = doc.createTreeWalker(body, NodeFilter.SHOW_TEXT, null, !1);
                let currentPos = 0;
                for (;walker.nextNode(); ) {
                    var node = walker.currentNode, nodeLength = node.length;
                    if (currentPos + nodeLength >= position) return node.parentNode;
                    currentPos += nodeLength;
                }
                return null;
            }(pos) : (each(ed.schema.getBlockElements(), function(value, name) {
                if (/\W/.test(name)) return !0;
                blocks.push(name.toLowerCase());
            }), ed.dom.select(blocks.join(","))[pos] || null)) && (ed.focus(), pos = fromCharacterIndex.childNodes.length, 
            ed.selection.setCursorLocation(fromCharacterIndex, pos), ed.selection.scrollIntoView(fromCharacterIndex));
        },
        getActiveLine: function(ed) {
            var blocks = [], line = 0, node = (tinymce.each(ed.schema.getBlockElements(), function(value, name) {
                if (/\W/.test(name)) return !0;
                blocks.push(name.toLowerCase());
            }), ed.selection.getNode()), nodes = ed.dom.select(blocks.join(","));
            if (node) {
                1 === node.nodeType && "bookmark" !== node.getAttribute("data-mce-type") || (node = node.parentNode);
                for (var i = 0, len = nodes.length; i < len; i++) if (nodes[i] === node) {
                    line = i;
                    break;
                }
            }
            return line;
        },
        toggleTab: function(ed, tab) {
            var h, ca, p, self = this, el = ed.getElement();
            return DOM.addClass(el.parentNode, "mce-loading"), isHidden(ed.id + "_parent") || DOM.hasClass(el.parentNode, "mce-fullscreen") || (ed.settings.container_height = ed.getContainer().offsetHeight, 
            !1 !== this.settings.use_state_cookies && sessionStorage.setItem("wf-editor-container-height", ed.settings.container_height), 
            ed.settings.container_width = ed.getContainer().offsetWidth, !1 !== this.settings.use_state_cookies && sessionStorage.setItem("wf-editor-container-width", ed.settings.container_width), 
            ed.settings.interface_height = (h = 0, ca = ed.getContentAreaContainer(), 
            p = ca.parentNode, tinymce.each(p.childNodes, function(n) {
                n !== ca && (h += n.offsetHeight);
            }), h), !1 !== this.settings.use_state_cookies && sessionStorage.setItem("wf-editor-interface-height", ed.settings.interface_height)), 
            "wf-editor-source" === tab ? (ed.hide(), DOM.hide(el), ed.plugins.preview && ed.plugins.preview.hide(), 
            ed.plugins.source.toggle()) : "wf-editor-preview" === tab ? (self.loadContent(ed), 
            ed.hide(), DOM.hide(el), ed.plugins.source && ed.plugins.source.hide(), 
            ed.onToggleTab.dispatch(ed, tab), ed.plugins.preview.toggle()) : (self.loadContent(ed), 
            ed.plugins.source && ((p = ed.plugins.source.getCursorPos()) && (ed.activeLine = p), 
            ed.plugins.source.hide()), ed.plugins.preview && ed.plugins.preview.hide(), 
            DOM.setStyle(ed.id + "_ifr", "max-width", DOM.getStyle(el.parentNode, "max-width")), 
            ed.show(), ed.activeLine && window.setTimeout(function() {
                self.setActiveLine(ed, ed.activeLine, !0);
            }, 100), void DOM.removeClass(el.parentNode, "mce-loading"));
        },
        createHeader: function(element) {
            var container = DOM.create("div", {
                class: "editor wf-editor-container"
            }, '<div class="wf-editor-header"></div>');
            return element.parentNode.insertBefore(container, element), DOM.add(container, element), 
            container.firstChild;
        },
        createTabs: function(ed) {
            var tablist, activeTab, self = this, settings = this.settings, el = ed.getElement(), header = DOM.getPrev(el, ".wf-editor-header") || this.createHeader(el);
            if (!ed.plugins.source && !ed.plugins.preview) return !1;
            function makeTabActive(tab) {
                DOM.removeClass(DOM.select("button", tablist), "active"), DOM.setAttrib(DOM.select("button", tablist), "aria-expanded", "false"), 
                DOM.addClass(tab, "active"), DOM.setAttrib(tab, "aria-expanded", "true");
            }
            DOM.select(".wf-editor-tabs", header).length || (ed.onToggleTab = new tinymce.util.Dispatcher(ed), 
            tablist = DOM.add(header, "div", {
                role: "tablist",
                class: "wf-editor-tabs nav nav-tabs"
            }), activeTab = (activeTab = !1 !== settings.use_state_cookies ? sessionStorage.getItem("wf-editor-tabs-" + ed.id) : activeTab) || ed.settings.active_tab || "wf-editor-wysiwyg", 
            ed.settings.active_tab = activeTab, makeTabActive(DOM.add(tablist, "button", {
                type: "button",
                class: "nav-item",
                "aria-controls": "wf-editor-wysiwyg"
            }, ed.getLang("tab.wysiwyg", "Editor"))), ed.plugins.source && (header = DOM.add(tablist, "button", {
                type: "button",
                class: "nav-item",
                "aria-controls": "wf-editor-source"
            }, ed.getLang("tab.code", "Code")), "wf-editor-source" === activeTab) && makeTabActive(header), 
            ed.plugins.preview && (header = DOM.add(tablist, "button", {
                type: "button",
                class: "nav-item",
                "aria-controls": "wf-editor-preview"
            }, ed.getLang("tab.preview", "Preview")), "wf-editor-preview" === activeTab) && makeTabActive(header), 
            DOM.bind(tablist, "click", function(e) {
                e.preventDefault();
                var e = DOM.getParent(e.target, "button");
                e && !DOM.hasClass(e, "active") && (makeTabActive(e), e = DOM.getAttrib(e, "aria-controls"), 
                !1 !== settings.use_state_cookies && sessionStorage.setItem("wf-editor-tabs-" + ed.id, e), 
                self.toggleTab(ed, e));
            }), activeTab = this.getEditorState(el), header = tinymce.is(settings.toggle) ? parseInt(settings.toggle, 10) : 0, 
            !activeTab && header && DOM.hide(DOM.select(".wf-editor-tabs", el.parentNode)));
        },
        textareaResize: function(el) {
            var container = DOM.getPrev(el, ".wf-editor-header").parentNode;
            DOM.bind(el, "mousedown", function(e) {
                var mm = DOM.bind(el, "mousemove", function(e) {
                    container.style.maxWidth = el.offsetWidth + "px";
                }), mu = DOM.bind(el, "mouseup", function(e) {
                    Event.remove(el, "mousemove", mm), Event.remove(el, "mouseup", mu), 
                    container.style.maxWidth = el.offsetWidth + "px";
                });
            });
        },
        wrapText: function(el, s) {
            s ? el.setAttribute("wrap", "soft") : el.removeAttribute("wrap");
        },
        setContent: function(id, html) {
            var ed = this.getEditor(id);
            ed ? ed.setContent(html) : (ed = document.getElementById(id)) && (ed.value = html);
        },
        getContent: function(id) {
            var state, ed = this.getEditor(id);
            return ed ? (id = document.getElementById(id), state = this.isEditorActive(id), 
            ed && state ? ed.save() : id ? id.value : "") : "";
        },
        getSelection: function(id, args) {
            id = this.getEditor(id);
            return id && id.getSelection ? id.getSelection(args || {}) : document.getSelection().toString();
        },
        insert: function(el, v) {
            var ed = this.getEditor(el);
            return ed ? ed.execCommand ? isHidden(ed.getElement()) ? (ed.lastSelectionBookmark && ed.selection.moveToBookmark(ed.lastSelectionBookmark), 
            ed.execCommand("mceInsertContent", !1, v)) : this.insertIntoTextarea(ed.getElement(), v) : ed.insertContent(v) : (el = "string" == typeof el ? document.getElementById(el) : el) && !isHidden(el) && this.insertIntoTextarea(el, v), 
            !0;
        },
        insertIntoTextarea: function(el, v) {
            el.focus(), document.selection ? document.selection.createRange().text = v : el.setRangeText(v, el.selectionStart, el.selectionEnd, "end");
        },
        convertURL: function(url, elm, save, name) {
            if (url) {
                var ed = tinymce.EditorManager.activeEditor;
                if (ed) {
                    var settings = ed.settings, base = settings.document_base_url;
                    if (settings.convert_urls && (!elm || "LINK" !== elm.nodeName) && 0 !== url.indexOf("file:") && url !== base && url !== base.substring(0, base.length - 1) && "/" !== url.charAt(0)) {
                        if (!settings.mixed_urls) {
                            if (settings.relative_urls) return 0 === url.indexOf(base) ? ed.documentBaseURI.toRelative(url) : url;
                            url = ed.documentBaseURI.toAbsolute(url, settings.remove_script_host);
                        }
                        settings.protocol_relative && (url = url.replace(/(http|https|ftp|ftps):\/\//, "//"));
                    }
                }
            }
            return url;
        },
        indent: function(h) {
            return h = h.replace(/\n+/g, "\n"), tinymce.trim(h);
        }
    };
    document.addEventListener("DOMContentLoaded", function handler() {
        WfEditor.init(), this.removeEventListener("DOMContentLoaded", handler), 
        Joomla.JoomlaTinyMCE = {
            setupEditors: function(form) {
                DOM.get(form) && DOM.select(".wf-editor", form).length && WfEditor.init();
            }
        };
    }), window.WfEditor = window.WFEditor = WfEditor;
}();js/editor.module.js000060400000004040152456167170010300 0ustar00/* jce - 2.9.99.2 | 2026-04-22 | https://www.joomlacontenteditor.net | Source: https://github.com/widgetfactory/jce | Copyright (C) 2006 - 2026 Ryan Demmer. All rights reserved | GNU/GPL Version 2 or later - http://www.gnu.org/licenses/gpl-2.0.html */
import {
    JoomlaEditor,
    JoomlaEditorDecorator,
    JoomlaEditorButton
} from "editor-api";

class JceDecorator extends JoomlaEditorDecorator {
    getValue() {
        return WfEditor.getContent(this.instance.id);
    }
    setValue(value) {
        return WfEditor.setContent(this.instance.id, value), this;
    }
    getSelection() {
        return WfEditor.getSelection(this.instance.id, {
            format: "text"
        });
    }
    replaceSelection(value) {
        return WfEditor.insert(this.instance.id, value), this;
    }
    disable(enable) {
        return this.instance.setMode(enable ? "design" : "readonly"), this;
    }
    toggle(show) {
        return WfEditor.toggleEditor(this.instance.getElement()), !1;
    }
    editorButton(button) {
        JoomlaEditorButton.runAction(button.action, button.options || {});
    }
}

tinyMCE.onAddEditor.add(function(mgr, editor) {
    var elm = editor.getElement(), container = elm.parentNode;
    if ("advanced" === editor.settings.theme) {
        const JceEditor = new JceDecorator(editor, "jce", elm.id);
        JoomlaEditor.register(JceEditor), mgr.editors[0] === editor && JoomlaEditor.setActive(JceEditor);
        var editorButtons = container.parentNode.querySelector(".editor-xtd-buttons");
        editorButtons && (editorButtons.addEventListener("click", function(e) {
            e.target.matches("button") && e.target.parentNode === editorButtons && (mgr.setActive(editor), 
            JoomlaEditor.setActive(JceEditor));
        }), editorButtons.querySelectorAll(".modal").forEach(function(modal) {
            document.body.appendChild(modal);
        })), editor.editorXtdButtons = function(button) {
            JceEditor.editorButton(button);
        };
    }
}), window.JceDecorator = JceDecorator, window.JoomlaEditor = JoomlaEditor;js/plugin.min.js000060400000461170152456167170007621 0ustar00/* jce - 2.9.99.2 | 2026-04-22 | https://www.joomlacontenteditor.net | Source: https://github.com/widgetfactory/jce | Copyright (C) 2006 - 2026 Ryan Demmer. All rights reserved | GNU/GPL Version 2 or later - http://www.gnu.org/licenses/gpl-2.0.html */
!function() {
    "use strict";
    (function($) {
        document.createElement("main"), document.createElement("nav");
        var s, el, $tmp = document.createElement("div");
        $.support.canvas = !!document.createElement("canvas").getContext, $.support.backgroundSize = (s = !1, 
        $.each([ "backgroundSize", "MozBackgroundSize", "WebkitBackgroundSize", "OBackgroundSize" ], function() {
            void 0 !== $tmp.style[this] && (s = !0);
        }), s), $.support.pdf = function() {
            try {
                if (!$.support.cssFloat) {
                    var control = null;
                    try {
                        control = new ActiveXObject("AcroPDF.PDF");
                    } catch (e) {}
                    if (!control) try {
                        control = new ActiveXObject("PDF.PdfCtrl");
                    } catch (e) {}
                    return !!control;
                }
                if (navigator.plugins) for (var n in navigator.plugins) {
                    if ("Adobe Acrobat" == n) return !0;
                    if (navigator.plugins[n].name && ("Adobe Acrobat" == navigator.plugins[n].name || "Chrome PDF Viewer" == navigator.plugins[n].name)) return !0;
                } else if (navigator.mimeTypes) {
                    var mime = navigator.mimeTypes["application/pdf"];
                    if (mime && mime.enabledPlugin) return !0;
                }
            } catch (e) {}
            return !1;
        }(), $.support.video = function() {
            var h264, el = document.createElement("video"), o = {};
            try {
                if (el.canPlayType) return o.ogg = el.canPlayType('video/ogg; codecs="theora"'), 
                h264 = 'video/mp4; codecs="avc1.42E01E', o.mp4 = el.canPlayType(h264 + '"') || el.canPlayType(h264 + ', mp4a.40.2"'), 
                o.webm = el.canPlayType('video/webm; codecs="vp8, vorbis"'), o;
            } catch (e) {}
            return !1;
        }(), $.support.audio = function() {
            var el = document.createElement("audio"), o = {};
            try {
                if (el.canPlayType) return o.ogg = el.canPlayType('audio/ogg; codecs="vorbis"'), 
                o.mp3 = el.canPlayType("audio/mpeg;"), o.wav = el.canPlayType('audio/wav; codecs="1"'), 
                o.m4a = el.canPlayType("audio/x-m4a;") || el.canPlayType("audio/aac;"), 
                o.webm = el.canPlayType('audio/webm; codecs="vp8, vorbis"'), o;
            } catch (e) {}
            return !1;
        }(), $.support.cssCalc = ((el = document.createElement("a")).style.cssText = "width:calc(10px);", 
        !!el.style.length);
    })(jQuery), function($) {
        $.support.canvas = !1, $.fn.tips = function(options) {
            function init(element) {
                $(element).hasClass("wf-tooltip-cancel-ondrag") && !function(element) {
                    $(element).on("mousedown", function() {
                        $(this).addClass("nohover"), end(), $(this).data("title", $(this).attr("title")).attr("title", "");
                    }).on("mouseup", function() {
                        $(this).removeClass("nohover"), $(this).attr("title", $(this).data("title"));
                    });
                }(element), $(element).on("click", function(e) {
                    if (e.preventDefault(), !("click" == options.trigger && $(this).is(options.disabled) || "A" == this.nodeName || $("a", this).length || $(this).hasClass("wf-tooltip-cancel-ondrag"))) {
                        if ("click" == options.trigger) {
                            if ($(".uk-tooltip").is(":visible")) return end();
                            start(e, element);
                        }
                        $(".uk-tooltip").hasClass("uk-tooltip-sticky") ? unpin() : function(element) {
                            $(".uk-tooltip").addClass("uk-tooltip-sticky"), $(".uk-icon-close", ".uk-tooltip").show(), 
                            $(window).on("click.tooltip-blur", function(e) {
                                var el = $(element).get(0), e = e.target;
                                e == el || "LABEL" == el.nodeName && $(el).attr("for") && e == $("#" + $(el).attr("for")).get(0) || e == $(".uk-tooltip").get(0) || 0 === $(e).parents(".uk-tooltip").length && end();
                            });
                        }(element);
                    }
                }), $(element).on("tooltip:close", function() {
                    return end(element);
                }), "hover" == options.trigger && $(element).on("mouseover", function(e) {
                    if (!$(".uk-tooltip").hasClass("uk-tooltip-sticky") && !$(this).hasClass("uk-tooltip-nohover")) return start(e, element);
                }).on("mouseout", function(e) {
                    if (!$(".uk-tooltip").hasClass("uk-tooltip-sticky") && !$(this).hasClass("uk-tooltip-nohover")) return end(element);
                });
            }
            function createTips() {
                var $tips = $(".uk-tooltip");
                $tips.get(0) || ($tips = $('<div class="uk-tooltip" role="tooltip" aria-hidden="true"><span class="close uk-icon uk-icon-close" title="Close"></span><div class="uk-tooltip-inner"></div><div class="arrow"></div></div>').appendTo(options.parent), 
                $(".uk-icon-close", $tips).on("click", function() {
                    end();
                }).hide()), $tips.addClass(options.className), $tips.hasClass("popover") && $tips.find(".arrow").addClass("popover-arrow");
            }
            function start(e, element) {
                createTips();
                var h, parts, title, text, $tips = $(".uk-tooltip");
                $(element).hasClass("hasPopover") && $tips.addClass("popover"), 
                $tips.data("source", element), options.content ? h = options.content : (h = "", 
                text = $(element).attr("title") || "", title = "", text = $(element).data("content") || text, 
                /::/.test(text) && (parts = text.split("::"), title = $.trim(parts[0]), 
                text = $.trim(parts[1])), (title = title || $(element).text()) && (h += "<h4>" + title + "</h4>"), 
                $(element).data("title", $(element).attr("title")).attr("title", ""), 
                $(element).attr("aria-describedby", "uk-tooltip"), h += '<div class="uk-tooltip-content">' + text + "</div>"), 
                $(".uk-tooltip-inner", $tips).html(h), $(element).hasClass("hasPopover") && ($(".uk-tooltip-inner > h4", $tips).addClass("popover-title popover-header"), 
                $(".uk-tooltip-inner > .uk-tooltip-content", $tips).addClass("popover-content popover-body")), 
                $tips.show().addClass("in").attr("aria-hidden", "false"), function(e) {
                    createTips();
                    var $tips = $(".uk-tooltip"), o = options.offsets, pos = $(e.target).offset(), parent = $tips.parent().position(), parent = (pos.left = pos.left - parent.left, 
                    pos.top = pos.top - parent.top, {
                        width: $tips.outerWidth(),
                        height: $tips.outerHeight()
                    }), e = (pos = $.extend(pos, {
                        width: $(e.target).outerWidth(),
                        height: $(e.target).outerHeight()
                    }), options.position), scrollTop = $(document).scrollTop();
                    e = pos.top - parent.height < 0 || pos.top < scrollTop + parent.height + o.y ? e.replace(/(top|center)\s+/, "bottom ") : e.replace(/(bottom|center)\s+/, "top ");
                    e = pos.left + parent.width > $(window).width() ? e.replace("right", "left") : e.replace("left", "right");
                    scrollTop = {
                        "top center": {
                            top: Math.max(pos.top - parent.height - o.y, 10),
                            left: Math.max(pos.left + pos.width / 2 - parent.width / 2, 5)
                        },
                        "bottom center": {
                            top: Math.max(pos.top + pos.height + o.y, 10),
                            left: Math.max(pos.left + pos.width / 2 - parent.width / 2, 5)
                        },
                        "center right": {
                            top: Math.max(pos.top - parent.height / 2 + pos.height / 2, 5),
                            left: Math.max(pos.left + pos.width, 10)
                        },
                        "center left": {
                            top: Math.max(pos.top - parent.height / 2 + pos.height / 2, 5),
                            left: Math.max(pos.left - parent.width, 10)
                        },
                        "bottom right": {
                            top: Math.max(pos.top - parent.height + o.y, 5),
                            left: Math.max(pos.left + pos.width, 10)
                        },
                        "bottom left": {
                            top: Math.max(pos.top - parent.height + pos.height + o.y, 5),
                            left: Math.max(pos.left - parent.width, 10)
                        },
                        "top right": {
                            top: Math.max(pos.top - parent.height - o.y, 10),
                            left: Math.max(pos.left + pos.width, 10)
                        },
                        "top left": {
                            top: Math.max(pos.top - parent.height - o.y, 10),
                            left: Math.max(pos.left - parent.width, 10)
                        }
                    };
                    $.each(e.split(" "), function(i, s) {
                        $tips.addClass(s).addClass("uk-tooltip-" + s), $tips.hasClass("popover") && $tips.addClass(s).addClass("bs-popover-" + s);
                    }), $tips.css(scrollTop[e]);
                }(e), $(element).trigger("tooltip:show"), window.setTimeout(function() {
                    $tips.css("visibility", "visible");
                }, 1);
            }
            function end(element) {
                var $tips = $(".uk-tooltip"), element = $tips.data("source") || element;
                $(element).data("title") && $(element).attr("title", $(element).data("title")), 
                $(element).removeAttr("aria-describedby"), $tips.css("visibility", "hidden").attr("aria-hidden", "true").hide(), 
                $(".uk-tooltip").attr("class", "uk-tooltip").removeClass("in"), 
                $(".uk-tooltip-inner").empty(), $(element).trigger("tooltip:hide"), 
                unpin();
            }
            function unpin() {
                $(".uk-tooltip").removeClass("uk-tooltip-sticky"), $(".uk-icon-close", ".uk-tooltip").hide(), 
                $(window).off("click.tooltip-blur");
            }
            return options = $.extend({
                speed: 150,
                position: "top center",
                className: "",
                offsets: {
                    x: 16,
                    y: 16
                },
                width: 200,
                fixed: !0,
                parent: "body",
                trigger: "hover",
                disabled: ":disabled, .disabled"
            }, options), this.each(function() {
                init(this);
            });
        };
    }(jQuery), function($) {
        $.fn.or = function(fallbackSelector) {
            return this.length ? this : $(fallbackSelector || "body");
        }, $.fn.borderWidget = function() {
            return $(this).on("click change", function() {
                var state = this.checked;
                $(this).parents(".uk-form-controls").find(":input").not(this).toggleClass("uk-text-muted", !state).attr("disabled", function() {
                    return !state || null;
                }), $(this).trigger("border:change");
            }).trigger("change"), this;
        }, $.fn.checkbox = function() {
            return this.each(function() {
                var self = this;
                if ($(this).hasClass("uk-form-constrain")) return this;
                $(this).wrap('<i class="uk-checkbox" />').on("click", function() {
                    $(this).parent().toggleClass("uk-icon-check", this.checked);
                }).on("checkbox:check", function() {
                    $(this).parent().toggleClass("uk-icon-check", self.checked);
                }).parent().toggleClass("uk-icon-check", self.checked).css("margin-top", $(self).parent().height() / 2);
            });
        }, $.fn.equalize = function() {
            return this.each(function() {
                var x = 0, cb = this, $elms = $(this).parents(".uk-form-equalize").find('input[type="text"]'), self = this;
                $(self).on("click", function() {
                    var state = this.checked;
                    $elms.slice(1).prop("disabled", state).prev("label").toggleClass("uk-text-muted", state), 
                    state && (state = $elms.first().val(), $elms.slice(1).val(state).trigger("change"), 
                    $(cb).trigger("equalize:change", [ $elms.addBack() ]));
                }), $elms.first().on("change", function() {
                    $(self).prop("checked") && $elms.not(this).val(this.value).trigger("change"), 
                    $(cb).trigger("equalize:change", [ $elms.addBack() ]);
                }), $(this).on("equalize:update", function() {
                    var value = $elms.first().val(), state = ($elms.each(function() {
                        $(this).val() === value && x++;
                    }), x === $elms.length);
                    $elms.slice(1).prop("disabled", state).prev("label").toggleClass("uk-text-muted", state), 
                    $(this).prop("checked", state);
                });
            });
        }, $.fn.constrain = function() {
            return this.each(function() {
                var $elms = $(this).parents(".uk-form-constrain").find('input[type="text"], input[type="number"]');
                $(this).parent("label").addClass("uk-constrain-label"), $(this).on("constrain:update", function() {
                    $(this).parents(".uk-form-constrain").find('input[type="text"], input[type="number"]').each(function() {
                        $(this).data("tmp", this.value);
                    });
                }), $(this).parent("label").toggleClass("uk-constrain-active", this.checked), 
                $(this).on("click", function() {
                    $(this).parent("label").toggleClass("uk-constrain-active", this.checked);
                }), $(this).parent().append('<i class="uk-icon-lock" role="presentation"></i><i class="uk-icon-unlocked" role="presentation"></i>'), 
                $elms.each(function() {
                    $(this).data("tmp", this.value);
                }).on("change", function(e) {
                    e.stopPropagation();
                    var e = this, $elms = $(this).parents(".uk-form-constrain").find("input"), b = $elms.not(":checkbox").not(this), cb = $elms.filter(":checkbox"), w = $(e).val(), h = $(b).val(), tw = $(e).data("tmp");
                    if (w && h && tw) {
                        if (-1 !== w.indexOf("%") || -1 !== h.indexOf("%")) return;
                        $(cb).is(":checked") && (h = (h / tw * w).toFixed(0), $(b).val(h).data("tmp", h));
                    }
                    $(e).data("tmp", w), $(cb).trigger("constrain:change", [ $elms ]);
                });
            });
        }, $.fn.repeatable = function() {
            return this.each(function() {
                var self = this;
                if ($(this).data("uk-repeatable")) return this;
                function clone() {
                    var el = $(self).clone(!0, !0);
                    $(el).find("input").val(""), $(self).trigger("repeatable:create", [ self, $(el).get(0) ]), 
                    $(el).insertAfter($(self).siblings(".uk-repeatable").add(self).last());
                }
                $(this).data("uk-repeatable", 1), $(".uk-repeatable-create", this).on("click", function(e) {
                    clone(), e.preventDefault();
                }), $(".uk-repeatable-delete", this).on("click", function(e) {
                    var $elm = $(this).parent().parent();
                    $elm.hide(), $(self).trigger("repeatable:delete", [ self, $elm.get(0) ]), 
                    e.preventDefault();
                }), $(self).on("repeatable:clone", function(e, count) {
                    for (var i = 0; i < count; i++) clone();
                });
            });
        }, $.fn.button = function(options, key, value) {
            options = options || {};
            var map = {
                "uk-icon-circle-arrow-w": "uk-icon-refresh",
                "uk-icon-arrowreturnthick-1-w": "uk-icon-undo",
                "uk-icon-circle-check": "uk-icon-check",
                "uk-icon-check": "uk-icon-check",
                "uk-icon-closethick": "uk-icon-close"
            };
            return this.each(function() {
                if ("string" == typeof options) return "option" === options && key && value && "label" === key && $(".uk-button-text", this).text(value), 
                "enable" === options && $(this).prop("disabled", !1), "disable" === options && $(this).prop("disabled", !0), 
                this;
                var icon;
                $(this).addClass("uk-button").addClass(options.classes || ""), $(this).html('<span class="uk-button-text">' + $(this).text() + "</span>"), 
                options.icons && options.icons.primary && (icon = map[options.icons.primary] || options.icons.primary || "", 
                $('<i class="uk-margin-small-right uk-icon ' + icon + '"></i>').prependTo(this));
            });
        }, $.fn.tabs = function(options, key, value) {
            return this.each(function() {
                var el = this;
                return "string" == typeof options || $(this).data("tabs") ? this : ($(this).addClass("uk-tabs"), 
                $(this).children("ul").addClass("uk-tab"), 0 === $(this).children(".uk-switcher").length && $('<div class="uk-switcher"></div>').append($(this).children("div")).appendTo(this), 
                $(this).children(".uk-switcher").addClass("uk-tabs-panel").children().first().addClass("uk-active").attr("aria-hidden", !1), 
                $(".uk-tab li", el).on("click", function(e) {
                    e.preventDefault(), $(this).find("[autofocus]").trigger("focus"), 
                    $(el).children(".uk-switcher").children().addClass("uk-tabs-hide");
                    var panel = $(el).children(".uk-switcher").children(".uk-active").get(0), tab = $(el).children(".uk-tab").children(".uk-active").get(0), panel = ($(el).trigger("tabs.beforeactivate", [ tab, panel ]), 
                    $(el).children(".uk-tab").children().removeClass("uk-active").attr("aria-selected", !1), 
                    $(el).children(".uk-switcher").children().removeClass("uk-active").attr("aria-hidden", !0), 
                    $(this).addClass("uk-active").attr("aria-selected", !0), $(el).children(".uk-switcher").children().eq($(this).index()).addClass("uk-active").removeClass("uk-tabs-hide").attr("aria-hidden", !1).get(0));
                    $(el).trigger("tabs.activate", [ this, panel ]), e.preventDefault();
                }).first().addClass("uk-active").attr("aria-selected", !0).find("button").trigger("focus"), 
                $("body").on("keydown.tabs", function(e) {
                    var $tabItems, endIndex, parent;
                    $(e.target).hasClass("uk-button-tab") && 37 <= e.keyCode && e.keyCode <= 40 && (parent = e.target.parentNode, 
                    $tabItems = $(parent).siblings().addBack(), endIndex = Math.max(0, $tabItems.length - 1), 
                    parent = $tabItems.index(parent), 37 !== e.keyCode && 38 !== e.keyCode || parent--, 
                    39 !== e.keyCode && 40 !== e.keyCode || parent++, $tabItems.eq(parent = (parent = endIndex < parent ? 0 : parent) < 0 ? endIndex : parent).trigger("click"), 
                    e.preventDefault());
                }), void $(this).data("tabs", !0));
            });
        }, $.fn.accordion = function(options, key, value) {
            var el = this;
            return "string" == typeof options ? "activate" === options && void 0 !== key && $(".uk-accordion-title", this).trigger("click") : ($(this).children("h3").addClass("uk-accordion-title").next("div").addClass("uk-accordion-content").css({
                height: 0,
                position: "relative",
                overflow: "hidden"
            }), $(".uk-accordion-title", this).on("click", function(e) {
                e.preventDefault();
                var tab = this;
                $(".uk-accordion-content", el).height(0), $(".uk-accordion-title", el).removeClass("uk-active"), 
                $(this).addClass("uk-active").next("div").css("height", function(i, v) {
                    return 0 === parseInt(v, 10) ? ($(el).trigger("accordion.activate", [ tab, this ]), 
                    "auto") : 0;
                });
            }), $.isPlainObject(options) && "function" == typeof options.beforeActivate && $(this).on("accordion:activate", function(e, tab) {
                options.beforeActivate(e, {
                    newHeader: tab
                });
            }), $(this).on("accordion:reset", function(e) {
                $(".uk-accordion-content", el).height(0), $(".uk-accordion-title", el).removeClass("uk-active");
            })), this;
        }, $.fn.clearable = function() {
            return this.each(function() {
                var el = this;
                $(this).addClass("uk-form-icon uk-form-icon-flip"), $('<button class="uk-icon uk-icon-close uk-button uk-button-link">').on("click", function() {
                    $(el).find("input").val("").trigger("change");
                }).appendTo(this);
            });
        }, $.fn.dialog = function() {
            return this;
        };
    }(jQuery), function($) {
        var specialKeyCodeMap = {
            9: "tab",
            17: "ctrl",
            18: "alt",
            27: "esc",
            32: "space",
            37: "left",
            39: "right",
            13: "enter",
            91: "cmd",
            38: "up",
            40: "down"
        };
        $.fn.datalist = function(settings) {
            return settings = $.extend({
                seperator: " ",
                loading: "Loading..."
            }, settings), this.each(function() {
                var select = this, options = [], multiple = $(this).prop("multiple"), id = $(this).attr("id");
                if ("INPUT" === this.nodeName && !this.list) return !1;
                $(this).wrap('<div class="uk-datalist-control" role="combobox" aria-autocomplete="list" aria-haspopup="true" aria-expanded="false" aria-owns="' + id + '_datalist_menu" data-label-loading="' + settings.loading + '"></div>');
                var container = $(this).parent(), input = ($(container).attr("aria-multiselectable", multiple), 
                $(this).hide().attr("aria-hidden", "true").attr("tabindex", "-1"), 
                $('<input type="text" autocomplete="off" autocapitalize="off" spellcheck="false" placeholder="..." />')), btn = $('<button type="button" class="uk-button uk-datalist-button" tabindex="-1"></button'), combobox = $('<div class="uk-datalist-combobox"></div>').appendTo(container).append([ input, btn ]), menu = ("SELECT" === this.nodeName && ($(combobox).addClass("uk-datalist-placeholder"), 
                $(input).prop("readonly", !0).attr("placeholder", "")), $('<div id="' + id + '_datalist_menu" class="uk-dropdown uk-dropdown-scrollable uk-datalist-dropdown" role="listbox" aria-multiselectable="' + !!multiple + '"><ul class="uk-nav uk-nav-dropdown"></ul></div>').appendTo(select.parentNode));
                function removeTag(tag) {
                    var values = (values = "string" == typeof (values = $(select).val()) ? values.trim().split(settings.seperator) : values).filter(function(value) {
                        if (value !== $(tag).val()) return !0;
                    });
                    $(select).val(function() {
                        return "INPUT" === this.nodeName ? values.join(settings.seperator) : values;
                    }), $(select).trigger("change", {
                        internal: !0
                    }), $(tag).remove();
                }
                function updateComboBox(data) {
                    var found;
                    settings.input || data.text || $("option", select).each(function() {
                        this.value === data.value && (data.text = $(this).attr("label") || $(this).text());
                    }), $(input).val($.trim(data.text || data.value)).trigger("datalist-input:clear"), 
                    multiple && ($(input).val(""), found = !1, $("button", container).each(function() {
                        this.value === data.value && (found = !0);
                    }), found || $('<button class="uk-button uk-datalist-tag" role="presentation" aria-label="" value="' + data.value + '"><label>' + data.value + "</label></button>").on("click", function(e) {
                        e.preventDefault(), "LABEL" !== e.target.nodeName && removeTag(this);
                    }).insertBefore(combobox));
                }
                function selectItem(data) {
                    var values = $(select).val(), value = ("string" == typeof values && (values = values.trim().split(settings.seperator)), 
                    Array.isArray(values) || (values = [ values ]), data.value || "");
                    if (multiple && -1 < $.inArray(value, values)) $(input).val("").trigger("focus"); else {
                        updateComboBox(data), multiple ? values.push(value) : values = [ value ], 
                        $(select).val(function() {
                            return "INPUT" === this.nodeName ? values.join(settings.seperator) : values;
                        });
                        for (var i = values.length; i--; ) {
                            var val = values[i];
                            $.each(options, function(x, opt) {
                                opt.value === val && values.splice(i, 1);
                            });
                        }
                        var list = select.list || select;
                        $.each(values, function(i, val) {
                            $(list).append(new Option(val, val, !1, !0));
                        }), $(select).trigger("change", {
                            internal: !0
                        });
                    }
                }
                function selectMenuItem(e) {
                    e.preventDefault();
                    e = e.target;
                    "LI" === (e = "A" === e.nodeName ? e.parentNode : e).nodeName && (selectItem({
                        text: e.title,
                        value: e.getAttribute("data-value")
                    }), hideMenu());
                }
                $(select).on("update:option", function(e, option) {
                    var $item = "optgroup" === option.type ? $('<li class="uk-nav-header" tabindex="-1">' + option.text + "</li>") : $('<li title="' + option.text + '" data-value="' + option.value + '" role="option"><a href="#" role="presentation">' + option.text + "</a></li>");
                    $.each([ "style", "class" ], function(i, attr) {
                        option[attr] && $item.attr(attr, option[attr]);
                    }), $("ul", menu).append($item), option.selected && updateComboBox(option);
                }).on("change.datalist", function(e, o) {
                    o && o.internal || $(this).trigger("datalist:update", {
                        change: !0
                    });
                }), $(menu).on("mousedown click touchstart", function(e) {
                    selectMenuItem(e);
                });
                var $items, focusIdx = -1;
                function hideMenu(e) {
                    isMenuOpen() && ($(menu).attr("aria-hidden", "true").parent().removeClass("uk-open"), 
                    focusIdx = -1, $([ container, menu ]).attr("aria-expanded", "false"), 
                    e) && $(input).trigger("focus");
                }
                function positionMenu() {
                    var ch = $(container).outerHeight(), pos = $(container).offset(), ch = pos.top + ch + 2;
                    menu.css({
                        top: ch,
                        left: pos.left,
                        width: $(container).outerWidth(),
                        maxHeight: settings.maxHeight || 160
                    }), $(menu).height() + ch > $(window).height() && $(menu).css("top", pos.top - $(menu).outerHeight() - 2);
                }
                function showMenu() {
                    menu.attr("aria-hidden", "false").parent().addClass("uk-open"), 
                    positionMenu(), $([ container, menu ]).attr("aria-expanded", "true"), 
                    $items = $("li", menu);
                    var values = $(select).val();
                    Array.isArray(values) || (values = [ values ]), $items.each(function() {
                        var val = this.getAttribute("data-value");
                        $(this).toggleClass("uk-active", -1 !== $.inArray(val, values));
                    });
                }
                function isMenuOpen() {
                    return $(menu).parent().hasClass("uk-open");
                }
                function moveFocus(dir) {
                    focusIdx += dir;
                    dir = $items.filter(":visible").filter(function() {
                        return -1 < this.getAttribute("tabindex");
                    });
                    focusIdx < 0 ? $(input).trigger("focus") : focusIdx >= dir.length || ($items.trigger("blur"), 
                    dir.eq(focusIdx).attr("tabindex", 0).trigger("focus"));
                }
                $(input).on("keydown", function(e) {
                    switch (e.keyCode) {
                      case 13:
                        e.preventDefault(), e.stopImmediatePropagation(), "" === this.value ? (showMenu(), 
                        moveFocus(1)) : (selectItem({
                            value: this.value,
                            text: ""
                        }), hideMenu(e));
                        break;

                      case 40:
                        e.preventDefault(), e.stopImmediatePropagation(), showMenu(), 
                        moveFocus(1);
                        break;

                      case 8:
                        var $tags, val;
                        this.value || ($tags = $(".uk-datalist-tag", container)).length && (val = $tags.last().val(), 
                        removeTag($tags.last()), e.preventDefault(), $(this).val(val).trigger("focus"));
                    }
                }), $(input).on("keyup paste", function(e) {
                    var matcher;
                    multiple && e.originalEvent.key === settings.seperator && (selectItem({
                        value: $.trim(this.value),
                        text: ""
                    }), hideMenu(e)), specialKeyCodeMap[e.keyCode] ? (e.preventDefault(), 
                    e.stopPropagation()) : (this.value.length ? showMenu() : hideMenu(e), 
                    matcher = new RegExp("^" + this.value.replace(/[\-\[\]\/\{\}\(\)\*\+\?\.\\\^\$\|]/g, "\\$&"), "i"), 
                    $("li", menu).each(function() {
                        $(this).toggle(matcher.test($(this).data("value")));
                    }));
                }).on("change", function(e) {
                    "" === this.value ? $(select).val("") : (multiple || selectItem({
                        text: this.value,
                        value: this.value,
                        selected: !0
                    }), e.stopPropagation());
                }).on("focus", function() {
                    $(container).addClass("uk-focus");
                }).on("blur", function(e) {
                    $(container).removeClass("uk-focus");
                }).on("datalist-input:clear", function() {
                    $("li", menu).show();
                }), $(menu).on("keydown", function(e) {
                    isMenuOpen() && (13 === e.keyCode && (selectMenuItem(e), hideMenu(e), 
                    e.preventDefault(), e.stopPropagation()), 27 === e.keyCode ? (hideMenu(e), 
                    e.preventDefault(), e.stopPropagation()) : 36 === e.keyCode ? ($(input).trigger("focus"), 
                    e.preventDefault()) : 38 !== e.keyCode && 40 !== e.keyCode || (moveFocus(e.keyCode - 39), 
                    e.preventDefault()));
                }), $(btn).on("click", function(e) {
                    e.preventDefault(), showMenu(), moveFocus(1);
                }), $("body").on("mousedown touchstart keyup", function(e) {
                    e.keyCode && 9 !== e.keyCode || (e = e.target) == btn.get(0) || e == menu.get(0) || menu.find(e).length || select.list && !container.find(e).length && ("" !== (e = input.val()) && selectItem({
                        text: e,
                        value: e,
                        select: !0
                    }), hideMenu());
                }), $(select).on("datalist:update", function(e, o) {
                    var list = select.list || select, o = ((o = o || {}).change || $("option, optgroup", list).each(function() {
                        var text = $(this).attr("label") || $(this).text(), text = ("OPTGROUP" === this.parentNode.nodeName && $(this).addClass("uk-nav-indent"), 
                        {
                            value: this.value,
                            text: text,
                            style: $(this).attr("style") || "",
                            selected: this.selected,
                            title: this.title || "",
                            class: $(this).attr("class") || "",
                            type: this.nodeName.toLowerCase()
                        });
                        $(select).trigger("update:option", text);
                    }), $(this).val());
                    o && ("string" == typeof o && (o = o.trim().split(settings.seperator)), 
                    $.each(o, function(i, value) {
                        updateComboBox({
                            value: value
                        });
                    })), $(this).trigger("datalist:disabled", this.disabled);
                }).on("datalist:disabled", function(e, state) {
                    $([ input, btn ]).each(function() {
                        state ? $(this).prop("disabled", !0) : $(this).prop("disabled", !1).removeAttr("disabled");
                    });
                }).on("datalist:position", function() {
                    positionMenu();
                }).on("datalist:loading", function() {
                    $(container).hasClass("uk-datalist-loading") ? ($(container).removeClass("uk-datalist-loading"), 
                    $(this).trigger("datalist:disabled", !1)) : ($(container).addClass("uk-datalist-loading"), 
                    $(this).trigger("datalist:disabled", !0));
                }).on("datalist:clear", function() {
                    $(input).val(), $("ul", menu).empty();
                }).trigger("datalist:disabled", select.disabled);
            });
        };
    }(jQuery), function($) {
        function ColorPicker(element, options) {
            this.options = $.extend(this.options, options), this.element = element, 
            this._init();
        }
        ColorPicker.prototype = {
            options: {
                color: "#FFFFFF",
                detail: 50,
                speed: 200,
                stylesheets: [],
                custom_colors: "",
                forcedHighContrastMode: !1,
                labels: {
                    picker: "Picker",
                    title: "Color Picker",
                    palette: "Web Colors",
                    named: "Named Colors",
                    template: "Template Colors",
                    custom: "Custom Colors",
                    color: "Color",
                    apply: "Apply",
                    name: "Name"
                },
                dialog: !1,
                parent: "body"
            },
            _strhex: "0123456789abcdef",
            _colors: [ "#000000", "#000033", "#000066", "#000099", "#0000cc", "#0000ff", "#330000", "#330033", "#330066", "#330099", "#3300cc", "#3300ff", "#660000", "#660033", "#660066", "#660099", "#6600cc", "#6600ff", "#990000", "#990033", "#990066", "#990099", "#9900cc", "#9900ff", "#cc0000", "#cc0033", "#cc0066", "#cc0099", "#cc00cc", "#cc00ff", "#ff0000", "#ff0033", "#ff0066", "#ff0099", "#ff00cc", "#ff00ff", "#003300", "#003333", "#003366", "#003399", "#0033cc", "#0033ff", "#333300", "#333333", "#333366", "#333399", "#3333cc", "#3333ff", "#663300", "#663333", "#663366", "#663399", "#6633cc", "#6633ff", "#993300", "#993333", "#993366", "#993399", "#9933cc", "#9933ff", "#cc3300", "#cc3333", "#cc3366", "#cc3399", "#cc33cc", "#cc33ff", "#ff3300", "#ff3333", "#ff3366", "#ff3399", "#ff33cc", "#ff33ff", "#006600", "#006633", "#006666", "#006699", "#0066cc", "#0066ff", "#336600", "#336633", "#336666", "#336699", "#3366cc", "#3366ff", "#666600", "#666633", "#666666", "#666699", "#6666cc", "#6666ff", "#996600", "#996633", "#996666", "#996699", "#9966cc", "#9966ff", "#cc6600", "#cc6633", "#cc6666", "#cc6699", "#cc66cc", "#cc66ff", "#ff6600", "#ff6633", "#ff6666", "#ff6699", "#ff66cc", "#ff66ff", "#009900", "#009933", "#009966", "#009999", "#0099cc", "#0099ff", "#339900", "#339933", "#339966", "#339999", "#3399cc", "#3399ff", "#669900", "#669933", "#669966", "#669999", "#6699cc", "#6699ff", "#999900", "#999933", "#999966", "#999999", "#9999cc", "#9999ff", "#cc9900", "#cc9933", "#cc9966", "#cc9999", "#cc99cc", "#cc99ff", "#ff9900", "#ff9933", "#ff9966", "#ff9999", "#ff99cc", "#ff99ff", "#00cc00", "#00cc33", "#00cc66", "#00cc99", "#00cccc", "#00ccff", "#33cc00", "#33cc33", "#33cc66", "#33cc99", "#33cccc", "#33ccff", "#66cc00", "#66cc33", "#66cc66", "#66cc99", "#66cccc", "#66ccff", "#99cc00", "#99cc33", "#99cc66", "#99cc99", "#99cccc", "#99ccff", "#cccc00", "#cccc33", "#cccc66", "#cccc99", "#cccccc", "#ccccff", "#ffcc00", "#ffcc33", "#ffcc66", "#ffcc99", "#ffcccc", "#ffccff", "#00ff00", "#00ff33", "#00ff66", "#00ff99", "#00ffcc", "#00ffff", "#33ff00", "#33ff33", "#33ff66", "#33ff99", "#33ffcc", "#33ffff", "#66ff00", "#66ff33", "#66ff66", "#66ff99", "#66ffcc", "#66ffff", "#99ff00", "#99ff33", "#99ff66", "#99ff99", "#99ffcc", "#99ffff", "#ccff00", "#ccff33", "#ccff66", "#ccff99", "#ccffcc", "#ccffff", "#ffff00", "#ffff33", "#ffff66", "#ffff99", "#ffffcc", "#ffffff" ],
            _named: {
                "#F0F8FF": "AliceBlue",
                "#FAEBD7": "AntiqueWhite",
                "#7FFFD4": "Aquamarine",
                "#F0FFFF": "Azure",
                "#F5F5DC": "Beige",
                "#FFE4C4": "Bisque",
                "#000000": "Black",
                "#FFEBCD": "BlanchedAlmond",
                "#0000FF": "Blue",
                "#8A2BE2": "BlueViolet",
                "#A52A2A": "Brown",
                "#DEB887": "BurlyWood",
                "#5F9EA0": "CadetBlue",
                "#7FFF00": "Chartreuse",
                "#D2691E": "Chocolate",
                "#FF7F50": "Coral",
                "#6495ED": "CornflowerBlue",
                "#FFF8DC": "Cornsilk",
                "#DC143C": "Crimson",
                "#00008B": "DarkBlue",
                "#008B8B": "DarkCyan",
                "#B8860B": "DarkGoldenRod",
                "#A9A9A9": "DarkGray",
                "#006400": "DarkGreen",
                "#BDB76B": "DarkKhaki",
                "#8B008B": "DarkMagenta",
                "#556B2F": "DarkOliveGreen",
                "#FF8C00": "Darkorange",
                "#9932CC": "DarkOrchid",
                "#8B0000": "DarkRed",
                "#E9967A": "DarkSalmon",
                "#8FBC8F": "DarkSeaGreen",
                "#483D8B": "DarkSlateBlue",
                "#2F4F4F": "DarkSlateGrey",
                "#00CED1": "DarkTurquoise",
                "#9400D3": "DarkViolet",
                "#FF1493": "DeepPink",
                "#00BFFF": "DeepSkyBlue",
                "#696969": "DimGrey",
                "#1E90FF": "DodgerBlue",
                "#B22222": "FireBrick",
                "#FFFAF0": "FloralWhite",
                "#228B22": "ForestGreen",
                "#DCDCDC": "Gainsboro",
                "#F8F8FF": "GhostWhite",
                "#FFD700": "Gold",
                "#DAA520": "GoldenRod",
                "#808080": "Grey",
                "#008000": "Green",
                "#ADFF2F": "GreenYellow",
                "#F0FFF0": "HoneyDew",
                "#FF69B4": "HotPink",
                "#CD5C5C": "IndianRed",
                "#4B0082": "Indigo",
                "#FFFFF0": "Ivory",
                "#F0E68C": "Khaki",
                "#E6E6FA": "Lavender",
                "#FFF0F5": "LavenderBlush",
                "#7CFC00": "LawnGreen",
                "#FFFACD": "LemonChiffon",
                "#ADD8E6": "LightBlue",
                "#F08080": "LightCoral",
                "#E0FFFF": "LightCyan",
                "#FAFAD2": "LightGoldenRodYellow",
                "#D3D3D3": "LightGrey",
                "#90EE90": "LightGreen",
                "#FFB6C1": "LightPink",
                "#FFA07A": "LightSalmon",
                "#20B2AA": "LightSeaGreen",
                "#87CEFA": "LightSkyBlue",
                "#778899": "LightSlateGrey",
                "#B0C4DE": "LightSteelBlue",
                "#FFFFE0": "LightYellow",
                "#00FF00": "Lime",
                "#32CD32": "LimeGreen",
                "#FAF0E6": "Linen",
                "#FF00FF": "Magenta",
                "#800000": "Maroon",
                "#66CDAA": "MediumAquaMarine",
                "#0000CD": "MediumBlue",
                "#BA55D3": "MediumOrchid",
                "#9370D8": "MediumPurple",
                "#3CB371": "MediumSeaGreen",
                "#7B68EE": "MediumSlateBlue",
                "#00FA9A": "MediumSpringGreen",
                "#48D1CC": "MediumTurquoise",
                "#C71585": "MediumVioletRed",
                "#191970": "MidnightBlue",
                "#F5FFFA": "MintCream",
                "#FFE4E1": "MistyRose",
                "#FFE4B5": "Moccasin",
                "#FFDEAD": "NavajoWhite",
                "#000080": "Navy",
                "#FDF5E6": "OldLace",
                "#808000": "Olive",
                "#6B8E23": "OliveDrab",
                "#FFA500": "Orange",
                "#FF4500": "OrangeRed",
                "#DA70D6": "Orchid",
                "#EEE8AA": "PaleGoldenRod",
                "#98FB98": "PaleGreen",
                "#AFEEEE": "PaleTurquoise",
                "#D87093": "PaleVioletRed",
                "#FFEFD5": "PapayaWhip",
                "#FFDAB9": "PeachPuff",
                "#CD853F": "Peru",
                "#FFC0CB": "Pink",
                "#DDA0DD": "Plum",
                "#B0E0E6": "PowderBlue",
                "#800080": "Purple",
                "#FF0000": "Red",
                "#BC8F8F": "RosyBrown",
                "#4169E1": "RoyalBlue",
                "#8B4513": "SaddleBrown",
                "#FA8072": "Salmon",
                "#F4A460": "SandyBrown",
                "#2E8B57": "SeaGreen",
                "#FFF5EE": "SeaShell",
                "#A0522D": "Sienna",
                "#C0C0C0": "Silver",
                "#87CEEB": "SkyBlue",
                "#6A5ACD": "SlateBlue",
                "#708090": "SlateGrey",
                "#FFFAFA": "Snow",
                "#00FF7F": "SpringGreen",
                "#4682B4": "SteelBlue",
                "#D2B48C": "Tan",
                "#008080": "Teal",
                "#D8BFD8": "Thistle",
                "#FF6347": "Tomato",
                "#40E0D0": "Turquoise",
                "#EE82EE": "Violet",
                "#F5DEB3": "Wheat",
                "#FFFFFF": "White",
                "#F5F5F5": "WhiteSmoke",
                "#FFFF00": "Yellow",
                "#9ACD32": "YellowGreen"
            },
            _translate: function(s, d) {
                d = this.options.labels[s] || d || "";
                return d = "undefined" != typeof tinyMCEPopup ? tinyMCEPopup.getLang("colorpicker." + s, d) : d;
            },
            _init: function() {
                var color, self = this;
                this._getStylesheetColors(), this.options.dialog ? $("#tab-content .colorpicker_generated").length || (color = $(this.element).val() || "#000000", 
                /\d/.test(color) || (color = this._namedToHex(color)), (color = /rgb/.test(color) ? this._rgbToHex(color) : color) && -1 === color.indexOf("#") && (color = "#" + color), 
                $(this.element).val(color), $("#colorpicker_color").on("change", function() {
                    var v = this.value;
                    "#" === v.substr(0, 1) && (v = v.substring(1)), self._wheel && self._wheel.setColor("#" + v), 
                    this.value = v;
                }).trigger("change"), this._createTabs(), $("#colorpicker_insert").on("click", function(e) {
                    e.preventDefault(), self._insert();
                }), self._wheel && self._wheel.setColor(color)) : (this.options.widget ? this.widget = $(this.options.widget) : (this.widget = $(this.element).parent().find(".colorpicker_widget"), 
                this.widget.length || (this.widget = $('<span class="colorpicker_widget"></span>').insertAfter(this.element))), 
                $(this.widget).css("background-color", $(this.element).val() || "#000000").tips({
                    trigger: "click",
                    position: "center right",
                    content: '<div id="colorpicker" title="Color Picker">' + self._getContent() + "</div>",
                    className: "wf-colorpicker",
                    opacity: 1,
                    parent: this.options.parent
                }).on("tooltip:show", function() {
                    var color = $(self.element).val() || "#000000";
                    "#" !== (color = /rgb/.test(color) ? this._rgbToHex(color) : color).substr(0, 1) && (color = "#" + color), 
                    $("#tab-content .colorpicker_generated").length || ($("#colorpicker_tabs").html(function(i, h) {
                        return h.replace(/\{#(\w+)\}/gi, function(a, b) {
                            return self._translate(b);
                        });
                    }), $("#colorpicker").append('<div class="modal-footer uk-modal-footer"><div id="colorpicker_preview"><div id="colorpicker_preview_text" class="uk-form-icon uk-form-icon-both"><i class="uk-icon-hashtag"></i><input type="text" id="colorpicker_color" size="8" maxlength="8" value="' + color.substring(1) + '" aria-required="true" /><span class="uk-icon-none" id="colorpicker_preview_color" style="background-color: rgb(0, 0, 0);"></span></div></div><button type="button" class="btn btn-primary uk-button uk-button-primary" id="colorpicker_insert"><i class="uk-icon-check"></i>' + self._translate("apply", "Apply") + "</button></div>"), 
                    $("#colorpicker_preview_color").css("background-color", color), 
                    $("#colorpicker_color").on("change", function() {
                        var v = this.value;
                        "#" === v.substr(0, 1) && (v = v.substring(1)), self._wheel && self._wheel.setColor("#" + v), 
                        this.value = v;
                    }).trigger("change"), $("#colorpicker_insert").on("click", function(e) {
                        e.preventDefault(), self._insert();
                    }), self._createTabs(), self._wheel && self._wheel.setColor(color));
                }));
            },
            _getContent: function() {
                var h = "", o = this.options, h = (h = (h += '<div id="colorpicker_tabs" class="uk-tabs">') + '<ul class="nav nav-tabs uk-tab">' + '<li><a href="#colorpicker_picker" aria-controls="colorpicker_picker" class="active">{#picker}</a></li>') + '<li><a href="#colorpicker_web" aria-controls="colorpicker_web">{#palette}</a></li>' + '<li><a href="#colorpicker_named" aria-controls="colorpicker_named">{#named}</a></li>';
                return o.stylesheets.length && (h += '<li><a href="#colorpicker_template" aria-controls="colorpicker_template">{#template}</a></li>'), 
                h = (h = (h += "</ul>") + '<div class="tab-content uk-switcher uk-tabs-panel">' + '<div id="colorpicker_picker" data-type="picker" class="tab-pane"></div>') + '<div id="colorpicker_web" data-type="web" class="tab-pane"></div>' + '<div id="colorpicker_named" data-type="named" class="tab-pane"></div>', 
                o.stylesheets.length && (h += '<div id="colorpicker_template" data-type="template" class="tab-pane"></div>'), 
                h = h + "</div>" + "</div>";
            },
            _createTabs: function() {
                var self = this, $tab = ($("#colorpicker_tabs").on("tabs.activate", function(e, tab, panel) {
                    var type = $(panel).data("type");
                    self["_create" + type].call(self, $(panel)), $("#colorpicker_insert").css("visibility", function() {
                        return "picker" === type ? "visible" : "hidden";
                    });
                }).tabs(), $(".uk-tab > li:visible", "#colorpicker_tabs").first());
                ($tab = $tab.length ? $tab : $(".uk-tab > li", "#colorpicker_tabs").first()).addClass("active uk-active").trigger("click");
            },
            _blur: function(e) {
                if (e) {
                    if (e.target == this.picker || e.target == this.picker.colorpicker) return !1;
                    var matched = !1;
                    $(this.picker.colorpicker).find("*").each(function() {
                        if (this == e.target) return !(matched = !0);
                    }), matched || this.close();
                }
            },
            _close: function() {
                $(this.widget).trigger("tooltip:close"), $(this.element).trigger("colorpicker:close");
            },
            _insert: function() {
                var color = $("#colorpicker_color").val();
                "#" !== color.substr(0, 1) && (color = "#" + color), $(this.element).trigger("colorpicker:insert", color), 
                color && ($(this.element).val(color).removeClass("placeholder").trigger("change"), 
                $(this.widget).css("background-color", color)), this._close();
            },
            _namedToHex: function(value) {
                var color = "";
                return $.each(this._named, function(name, hex) {
                    if (name.toLowerCase() === value.toLowerCase()) return color = hex, 
                    !0;
                }), color;
            },
            _rgbToHex: function(c) {
                var r, g, re = new RegExp("rgb\\s*\\(\\s*([0-9]+).*,\\s*([0-9]+).*,\\s*([0-9]+).*\\)", "gi");
                return c && (3 == (re = c.replace(re, "$1,$2,$3").split(",")).length ? (r = parseInt(re[0]).toString(16), 
                g = parseInt(re[1]).toString(16), re = parseInt(re[2]).toString(16), 
                "#" + (1 == r.length ? "0" + r : r) + (1 == g.length ? "0" + g : g) + (1 == re.length ? "0" + re : re)) : c);
            },
            _hexToRGB: function(c) {
                return -1 != c.indexOf("#") ? (c = c.replace(new RegExp("[^0-9A-F]", "gi"), ""), 
                {
                    r: parseInt(c.substring(0, 2), 16),
                    g: parseInt(c.substring(2, 4), 16),
                    b: parseInt(c.substring(4, 6), 16)
                }) : null;
            },
            _createpicker: function(parent) {
                var self = this;
                $(parent).hasClass("colorpicker_generated") || (self._wheel = $.farbtastic(parent, $("#colorpicker_color").val(), function(color) {
                    self._showColor(color);
                }), $(parent).addClass("colorwheel colorpicker_generated"));
            },
            _createweb: function(parent) {
                var self = this, h = "";
                $(parent).hasClass("colorpicker_generated") || (h += '<div role="listbox" aria-labelledby="colorpicker_web" tabindex="0"><ul>', 
                $.each(this._colors, function(i, v) {
                    h += '<li style="background-color:' + v + '"><span class="colorpicker_webblock" role="option" aria-labelledby="web_colors_' + i + '" title="' + v + '"></span></li>', 
                    self.options.forcedHighContrastMode && (h += '<canvas class="mceColorSwatch" data-color="' + v + '"></canvas>'), 
                    h += '<span class="mceVoiceLabel" id="web_colors_' + i + '">' + v.toUpperCase() + "</span>";
                }), h += "</ul></div>", $(parent).append(h).append('<br style="clear:both;" />').addClass("colorpicker_generated"), 
                $("span.colorpicker_webblock", parent).on("click", function() {
                    self._insert();
                }).on("mouseover", function() {
                    self._showColor($(this).attr("title"));
                }), this._paintCanvas(parent));
            },
            _createnamed: function(parent) {
                var self = this, h = "";
                $(parent).hasClass("colorpicker_generated") || (h += '<div role="listbox" aria-labelledby="colorpicker_named" tabindex="0"><ul>', 
                $.each(this._named, function(k, v) {
                    h += '<li style="background-color:' + k + '"><span class="colorpicker_namedblock" aria-labelledby="named_colors_' + k + '" title="' + self._translate(k.replace(/[^\w]/g, ""), v) + '"></span></li>', 
                    self.options.forcedHighContrastMode && (h += '<canvas class="mceColorSwatch" data-color="' + v + '"></canvas>'), 
                    h += '<span class="mceVoiceLabel" id="named_colors_' + k + '">' + v.toUpperCase() + "</span>";
                }), h += "</ul></div>", $(parent).append(h).append('<br style="clear:both;" />').addClass("colorpicker_generated").append('<div id="colorpicker_colorname">' + this.options.labels.name + "</div>"), 
                $("span.colorpicker_namedblock", parent).on("click", function() {
                    self._insert();
                }).on("mouseover", function() {
                    self._showColor($(this).parent("li").css("background-color"), $(this).attr("title"));
                }), this._paintCanvas(parent));
            },
            _createtemplate: function(parent) {
                var templateColors, self = this, h = "";
                $(parent).hasClass("colorpicker_generated") || (this.template_colors && (templateColors = this.template_colors, 
                "string" == $.type(this.template_colors) && (templateColors = templateColors.split(",")), 
                h += '<div role="listbox" aria-labelledby="colorpicker_template_label" tabindex="0"><ul>', 
                $.each(templateColors, function(i, v) {
                    4 == v.length && (v += v.substr(1)), h += '<li style="background-color:' + v + '"><span class="colorpicker_templateblock" aria-labelledby="template_colors_' + i + '" title="' + v + '"></span></li>', 
                    self.options.forcedHighContrastMode && (h += '<canvas class="mceColorSwatch" data-color="' + v + '"></canvas>'), 
                    h += '<span class="mceVoiceLabel" id="template_colors_' + i + '">' + v.toUpperCase() + "</span>";
                }), h += "</ul></div>", $(parent).append(h)), this.options.custom_colors && (h = "", 
                $(parent).append('<p id="colorpicker_custom_label">' + this.options.labels.custom + "</p>"), 
                templateColors = this.options.custom_colors.split(","), h += '<div role="listbox" aria-labelledby="colorpicker_custom_label" tabindex="0"><ul>', 
                $.each(templateColors, function(i, v) {
                    4 == v.length && (v += v.replace("#", "")), h += '<li style="background-color:' + v + '"><span class="colorpicker_templateblock" aria-labelledby="custom_colors_' + i + '" title="' + v + '"></span></li>', 
                    self.options.forcedHighContrastMode && (h += '<canvas class="mceColorSwatch" data-color="' + v + '"></canvas>'), 
                    h += '<span class="mceVoiceLabel" style="display:none;" id="custom_colors_' + i + '">' + v.toUpperCase() + "</span>", 
                    (i + 1) % 18 == 0 && (h += "</ul><ul>");
                }), h += "</div>", $(parent).append(h), this._paintCanvas(parent)), 
                $(parent).addClass("colorpicker_generated"), $("span.colorpicker_templateblock", parent).on("click", function() {
                    self._insert();
                }).on("mouseover", function() {
                    self._showColor($(this).attr("title"));
                }));
            },
            _showColor: function(color, name) {
                name && $("#colorpicker_colorname").html(this.options.labels.name + ": " + name), 
                color = color.toLowerCase(), /rgb/.test(color) && (color = this._rgbToHex(color)), 
                $("#colorpicker_preview_color").css("background-color", color), 
                $("#colorpicker_color").val(color.replace("#", ""));
            },
            _changeFinalColor: function(color) {
                color = (color = /#/.test(color) ? color : this._rgbToHex(color)).toLowerCase(), 
                $("#colorpicker_preview").css("background-color", color), $("#colorpicker_color").val(color.replace("#", ""));
            },
            _paintCanvas: function(el) {
                $("canvas.mceColorSwatch", el).each(function() {
                    var context, $canvas = $(this).get(0);
                    $canvas.getContext && (context = $canvas.getContext("2d")) && (context.fillStyle = $canvas.getAttribute("data-color"), 
                    context.fillRect(0, 0, 10, 10));
                });
            },
            _sort_colors: function(colors) {
                var sorted = [], s = [];
                return $.each(colors, function(x, color) {
                    6 == (color = color.replace("#", "").toLowerCase()).length && (condensed = "", 
                    $.each(color.split(""), function(i, c) {
                        i % 2 == 0 && (condensed += c);
                    }), color_str = condensed);
                    var condensed, color_str, v = 0;
                    $.each(color_str.split(""), function(i, c) {
                        v += parseInt(c, 16);
                    }), color && (sorted[v + x] = "#" + color);
                }), $.each(sorted, function(i, c) {
                    c && s.push(c);
                }), s;
            },
            _getStylesheetColors: function() {
                var hex, rgb, doc, el, ifr, h, self = this, o = this.options, colors = [], hexRe = /#[0-9a-f]{3,6}/gi, rgbRe = new RegExp("rgb\\s*\\(\\s*([0-9]+).*,\\s*([0-9]+).*,\\s*([0-9]+).*\\)", "gi");
                function addColor(s) {
                    -1 == $.inArray(s, colors) && colors.push(s);
                }
                function processStyleSheets(stylesheets) {
                    try {
                        $.each(stylesheets, function(i, s) {
                            !function parseCSS(s) {
                                s.imports && $.each(s.imports, function(i, r) {
                                    parseCSS(r);
                                }), $.each(s.cssRules || s.rules, function(i, r) {
                                    switch (r.type || 1) {
                                      case 1:
                                        var css = r.cssText || r.style.cssText;
                                        css && (hex = css.match(hexRe), (rgb = css.match(rgbRe)) && addColor(self._rgbToHex(rgb[0])), 
                                        hex) && addColor(hex[0]);
                                        break;

                                      case 3:
                                        -1 == r.href.indexOf("://") && parseCSS(r.styleSheet);
                                    }
                                });
                            }(s);
                        });
                    } catch (ex) {}
                    return colors;
                }
                "string" == $.type(o.stylesheets[0]) ? !document.getElementById("stylsheets_iframe") && (h = '<!DOCTYPE html><html><head><meta charset="utf-8"><meta http-equiv="X-UA-Compatible" content="IE=edge">', 
                $.each(o.stylesheets, function(i, s) {
                    h += '<link href="' + s + '" rel="stylesheet" type="text/css" />';
                }), h += "</head><body></body></html>", ifr = document.createElement("iframe"), 
                $(ifr).attr({
                    src: 'javascript:""',
                    id: "stylsheets_iframe"
                }).hide().appendTo("body").on("load", function(e) {
                    el = e.target, (doc = el.contentWindow.document) && doc.styleSheets && (self.template_colors = processStyleSheets(doc.styleSheets)), 
                    $(ifr).remove();
                }), doc = ifr.contentWindow.document) && (doc.open(), doc.write(h), 
                doc.close()) : this.template_colors = processStyleSheets(o.stylesheets);
            }
        }, $.fn.colorpicker = function(options) {
            return this.each(function() {
                new ColorPicker(this, options);
            });
        };
    }(jQuery), function($) {
        $.fn.farbtastic = function(callback) {
            return $.farbtastic(this, callback), this;
        }, $.farbtastic = function(container, color, callback) {
            return (container = $(container).get(0)).farbtastic || (container.farbtastic = new $._farbtastic(container, color, callback));
        }, $._farbtastic = function(container, color, callback) {
            var fb = this, e = ($(container).html('<div class="farbtastic"><div class="color"></div><div class="wheel"></div><div class="overlay"></div><div class="h-marker marker"></div><div class="sl-marker marker"></div></div>'), 
            $(".farbtastic", container));
            fb.wheel = $(".wheel", container).get(0), fb.radius = 84, fb.square = 100, 
            fb.width = 194, navigator.appVersion.match(/MSIE [0-6]\./) && $("*", e).each(function() {
                var image;
                "none" != this.currentStyle.backgroundImage && (image = this.currentStyle.backgroundImage, 
                image = this.currentStyle.backgroundImage.substring(5, image.length - 2), 
                $(this).css({
                    backgroundImage: "none",
                    filter: "progid:DXImageTransform.Microsoft.AlphaImageLoader(enabled=true, sizingMethod=crop, src='" + image + "')"
                }));
            }), fb.linkTo = function(callback) {
                return "object" == typeof fb.callback && $(fb.callback).off("keyup", fb.updateValue), 
                fb.color = null, "function" == typeof callback ? fb.callback = callback : "object" != typeof callback && "string" != typeof callback || (fb.callback = $(callback), 
                fb.callback.on("keyup", fb.updateValue), fb.callback.get(0).value && fb.setColor(fb.callback.get(0).value)), 
                this;
            }, fb.updateValue = function(event) {
                this.value && this.value != fb.color && fb.setColor(this.value);
            }, fb.setColor = function(color) {
                var unpack = fb.unpack(color);
                return fb.color != color && unpack && (fb.color = color, fb.rgb = unpack, 
                fb.hsl = fb.RGBToHSL(fb.rgb), fb.updateDisplay()), this;
            }, fb.setHSL = function(hsl) {
                return fb.hsl = hsl, fb.rgb = fb.HSLToRGB(hsl), fb.color = fb.pack(fb.rgb), 
                fb.updateDisplay(), this;
            }, fb.widgetCoords = function(event) {
                var el = event.target || event.srcElement, reference = fb.wheel;
                if (void 0 !== event.offsetX) {
                    for (var pos = {
                        x: event.offsetX,
                        y: event.offsetY
                    }, e = el; e; ) e.mouseX = pos.x, e.mouseY = pos.y, pos.x += e.offsetLeft, 
                    pos.y += e.offsetTop, e = e.offsetParent;
                    for (var e = reference, offset = {
                        x: 0,
                        y: 0
                    }; e; ) {
                        if (void 0 !== e.mouseX) {
                            x = e.mouseX - offset.x, y = e.mouseY - offset.y;
                            break;
                        }
                        offset.x += e.offsetLeft, offset.y += e.offsetTop, e = e.offsetParent;
                    }
                    for (e = el; e; ) e.mouseX = void 0, e.mouseY = void 0, e = e.offsetParent;
                } else var pos = fb.absolutePosition(reference), x = (event.pageX || 0 * (event.clientX + $("html").get(0).scrollLeft)) - pos.x, y = (event.pageY || 0 * (event.clientY + $("html").get(0).scrollTop)) - pos.y;
                return {
                    x: x - fb.width / 2,
                    y: y - fb.width / 2
                };
            }, fb.mousedown = function(event) {
                var pos = fb.widgetCoords(event);
                return fb.circleDrag = 2 * Math.max(Math.abs(pos.x), Math.abs(pos.y)) > fb.square, 
                fb.mousemove(event), !1;
            }, fb.touchconvert = function(e) {
                return e = e.originalEvent.touches.item(0);
            }, fb.touchmove = function(e) {
                return fb.mousemove(fb.touchconvert(e)), event.preventDefault(), 
                !1;
            }, fb.touchend = function(event) {
                return $(document).off("touchmove", fb.touchmove), $(document).off("touchend", fb.touchend), 
                document.dragging = !1, event.preventDefault(), !1;
            }, fb.mousemove = function(event) {
                var hue, event = fb.widgetCoords(event);
                return fb.circleDrag ? ((hue = Math.atan2(event.x, -event.y) / 6.28) < 0 && (hue += 1), 
                fb.setHSL([ hue, fb.hsl[1], fb.hsl[2] ])) : (hue = Math.max(0, Math.min(1, .5 - event.x / fb.square)), 
                event = Math.max(0, Math.min(1, .5 - event.y / fb.square)), fb.setHSL([ fb.hsl[0], hue, event ])), 
                !1;
            }, fb.mouseup = function() {
                $(document).off("mousemove", fb.mousemove), $(document).off("mouseup", fb.mouseup), 
                document.dragging = !1;
            }, fb.updateDisplay = function() {
                var angle = 6.28 * fb.hsl[0];
                $(".h-marker", e).css({
                    left: Math.round(Math.sin(angle) * fb.radius + fb.width / 2) + "px",
                    top: Math.round(-Math.cos(angle) * fb.radius + fb.width / 2) + "px"
                }), $(".sl-marker", e).css({
                    left: Math.round(fb.square * (.5 - fb.hsl[1]) + fb.width / 2) + "px",
                    top: Math.round(fb.square * (.5 - fb.hsl[2]) + fb.width / 2) + "px"
                }), $(".color", e).css("backgroundColor", fb.pack(fb.HSLToRGB([ fb.hsl[0], 1, .5 ]))), 
                "object" == typeof fb.callback ? ($(fb.callback).css({
                    backgroundColor: fb.color,
                    color: .5 < fb.hsl[2] ? "#000" : "#fff"
                }), $(fb.callback).each(function() {
                    this.value && this.value != fb.color && (this.value = fb.color);
                })) : "function" == typeof fb.callback && fb.callback.call(fb, fb.color);
            }, fb.absolutePosition = function(el) {
                var r = {
                    x: el.offsetLeft,
                    y: el.offsetTop
                };
                return el.offsetParent && (el = fb.absolutePosition(el.offsetParent), 
                r.x += el.x, r.y += el.y), r;
            }, fb.pack = function(rgb) {
                var r = Math.round(255 * rgb[0]), g = Math.round(255 * rgb[1]), rgb = Math.round(255 * rgb[2]);
                return "#" + (r < 16 ? "0" : "") + r.toString(16) + (g < 16 ? "0" : "") + g.toString(16) + (rgb < 16 ? "0" : "") + rgb.toString(16);
            }, fb.unpack = function(color) {
                return 7 == color.length ? [ parseInt("0x" + color.substring(1, 3)) / 255, parseInt("0x" + color.substring(3, 5)) / 255, parseInt("0x" + color.substring(5, 7)) / 255 ] : 4 == color.length ? [ parseInt("0x" + color.substring(1, 2)) / 15, parseInt("0x" + color.substring(2, 3)) / 15, parseInt("0x" + color.substring(3, 4)) / 15 ] : void 0;
            }, fb.HSLToRGB = function(hsl) {
                var h = hsl[0], s = hsl[1], hsl = hsl[2], s = hsl <= .5 ? hsl * (s + 1) : hsl + s - hsl * s, hsl = 2 * hsl - s;
                return [ this.hueToRGB(hsl, s, h + .33333), this.hueToRGB(hsl, s, h), this.hueToRGB(hsl, s, h - .33333) ];
            }, fb.hueToRGB = function(m1, m2, h) {
                return 6 * (h = h < 0 ? h + 1 : 1 < h ? h - 1 : h) < 1 ? m1 + (m2 - m1) * h * 6 : 2 * h < 1 ? m2 : 3 * h < 2 ? m1 + (m2 - m1) * (.66666 - h) * 6 : m1;
            }, fb.RGBToHSL = function(rgb) {
                var r = rgb[0], g = rgb[1], rgb = rgb[2], min = Math.min(r, Math.min(g, rgb)), max = Math.max(r, Math.max(g, rgb)), delta = max - min, min = (min + max) / 2, h = 0;
                return 0 < delta && (max == r && max != g && (h += (g - rgb) / delta), 
                max == g && max != rgb && (h += 2 + (rgb - r) / delta), max == rgb && max != r && (h += 4 + (r - g) / delta), 
                h /= 6), [ h, 0 < min && min < 1 ? delta / (min < .5 ? 2 * min : 2 - 2 * min) : 0, min ];
            }, $("*", e).on("mousedown", function(e) {
                document.dragging || ($(document).on("mousemove", fb.mousemove).on("mouseup", fb.mouseup), 
                document.dragging = !0), fb.mousedown(e);
            }), $("*", e).on("touchstart", function(e) {
                return document.dragging || ($(document).on("touchmove", fb.touchmove).on("touchend", fb.touchend), 
                document.dragging = !0), fb.mousedown(fb.touchconvert(e)), e.preventDefault(), 
                !1;
            }), fb.setColor("#000000"), callback && fb.linkTo(callback);
        };
    }(jQuery), function($) {
        var standalone = "undefined" == typeof tinyMCEPopup, Wf = {
            language: "",
            options: {
                selectChange: $.noop,
                site: "",
                root: "",
                help: $.noop,
                alerts: "",
                classes: []
            },
            getURI: function(absolute) {
                return standalone ? absolute ? this.options.root : this.options.site : tinyMCEPopup.editor.settings.base_url;
            },
            init: function(options) {
                var ed, self = this;
                function updateMedia(before, after) {
                    var basedir = $.fn.filebrowser.getbasedir();
                    before = Wf.String.path(basedir, before), after = Wf.String.path(basedir, after), 
                    ed.onUpdateMedia.dispatch(ed, {
                        before: before,
                        after: after
                    });
                }
                $.extend(this.options, options), $(".mceActionPanel, .actionPanel").addClass("uk-modal-footer"), 
                !/MSIE/.test(navigator.userAgent) && -1 === navigator.userAgent.indexOf("Trident/") && -1 === navigator.userAgent.indexOf("Edge/") || $("#jce").addClass("ie"), 
                $("button#insert, input#insert, button#update, input#update").button({
                    icons: {
                        primary: "uk-icon-check"
                    }
                }).addClass("uk-button-primary"), $("button#refresh, input#refresh").button({
                    icons: {
                        primary: "uk-icon-refresh"
                    }
                }), $("#cancel").button({
                    icons: {
                        primary: "uk-icon-cancel"
                    }
                }), standalone || (this.createClassList("classes", this.options.classes), 
                $("#apply").button({
                    icons: {
                        primary: "uk-icon-plus"
                    }
                }), $("#help").button({
                    icons: {
                        primary: "uk-icon-help"
                    }
                }).on("click", function(e) {
                    e.preventDefault(), self.help();
                }), $("#cancel").on("click", function(e) {
                    tinyMCEPopup.close(), e.preventDefault();
                }), $("#tabs").tabs(), this.createColourPickers(), this.createBrowsers(), 
                $(".uk-datalist").datalist({
                    loading: self.translate("message_load", "Loading...")
                }), $(".uk-input-clear").clearable(), $(".hastip, .tip, .tooltip").tips(), 
                $("#align, #clear, #dir").on("change", function() {
                    self.updateStyles();
                }), $('input[id^="margin_"]').on("change", function() {
                    self.updateStyles();
                }), $("#border").borderWidget().on("border:change", function() {
                    self.updateStyles();
                }), $("#border_width, #border_style, #border_color").on("change", function() {
                    self.updateStyles();
                }), $("#style").on("change", function() {
                    self.setStyles();
                }), $(".uk-constrain-checkbox").constrain(), $(".uk-equalize-checkbox").equalize(), 
                "html5-strict" === tinyMCEPopup.editor.settings.schema && tinyMCEPopup.editor.settings.validate && $(".html4").hide().find(":input").prop("disabled", !0), 
                $(".uk-repeatable").repeatable(), $("body").on("keydown.tab", function(e) {
                    var $navItems, endIndex, idx;
                    9 === e.keyCode && ($navItems = $(':input:visible:enabled, span[role="combobox"]', this).not('input[type="file"]').filter(function() {
                        return 0 <= this.getAttribute("tabindex");
                    })).length && ($navItems.attr("tabindex", 0), e.shiftKey && $navItems.reverse(), 
                    endIndex = Math.max(0, $navItems.length - 1), idx = $navItems.index(e.target) + 1, 
                    $navItems.eq(idx = endIndex < idx ? 0 : idx).trigger("focus").attr("tabindex", 1), 
                    e.preventDefault(), e.stopImmediatePropagation());
                }), $(".uk-tabs-panel").on("scroll.tabs", function(e) {
                    $("select").trigger("datalist:position", e);
                }), $("body").on("keydown.backspace", function(e) {
                    8 !== e.keyCode || !e.target || e.target && ("INPUT" === e.target.nodeName || "SELECT" === e.target.nodeName || "TEXTAREA" === e.target.nodeName) || (e.preventDefault(), 
                    e.stopImmediatePropagation());
                }), $("body").on("keyup.esc", function(e) {
                    27 === e.keyCode && (e.preventDefault(), e.stopPropagation(), 
                    $(".uk-modal-close").length ? $(".uk-modal-close").not(":submit").trigger("click") : tinyMCEPopup.close());
                }), standalone) || (ed = tinyMCEPopup.editor).onUpdateMedia && $(window).ready(function() {
                    $("[data-filebrowser]").on("filebrowser:onfilerename filebrowser:onfolderrename", function(e, before, after) {
                        updateMedia(before, after);
                    }).on("filebrowser:onpaste", function(e, type, before, after) {
                        "moveItem" == type && updateMedia(before, after);
                    });
                });
            },
            getName: function() {
                return $("body").data("plugin");
            },
            getPath: function(plugin) {
                return standalone ? this.options.site + "components/com_jce/editor/tiny_mce/plugins/" + this.getName() : tinyMCEPopup.editor.plugins[this.getName()].url;
            },
            loadLanguage: function() {
                var ed, u;
                standalone || (u = (ed = tinyMCEPopup.editor).getParam("document_base_url") + "components/com_jce/editor/tiny_mce") && ed.settings.language && !1 !== ed.settings.language_load && (u += "/langs/" + ed.settings.language + "_dlg.js", 
                tinymce.ScriptLoader.isDone(u) || (document.write('<script type="text/javascript" src="' + tinymce._addVer(u) + '"><\/script>'), 
                tinymce.ScriptLoader.markDone(u)));
            },
            help: function() {
                var ed = tinyMCEPopup.editor;
                ed.windowManager.open({
                    url: ed.getParam("site_url") + "index.php?option=com_jce&task=plugin.display&plugin=help&lang=" + ed.settings.language + "&section=editor&category=" + this.getName(),
                    title: ed.getLang("dlg.help", "Help"),
                    width: 896,
                    height: 768,
                    size: "mce-modal-landscape-full",
                    close_previous: 0
                });
            },
            createClassList: function(id, options) {
                var classes, custom, importcss_classes, seen, ed = tinyMCEPopup.editor, lst = document.getElementById(id), id = [], filter = ed.settings.class_filter, PreviewCss = tinymce.util.PreviewCss;
                lst && (options = (options = "string" == typeof options ? options.split(/[\s,]+/) : options) || [], 
                lst.list && (lst = lst.list), options.length || (classes = [], custom = ed.getParam("styleselect_custom_classes"), 
                importcss_classes = ed.settings.importcss_classes || ed.plugins.importcss && ed.plugins.importcss.get && ed.plugins.importcss.get(), 
                custom && (id = id.concat(custom.split(","))), !1 !== ed.getParam("styleselect_stylesheet") && Array.isArray(importcss_classes) && (importcss_classes.forEach(function(item) {
                    var val = item.class;
                    filter && !filter(val, val) || classes.push(item);
                }), classes.length && (id = id.concat(classes)), seen = {}, id = id.filter(function(item) {
                    item = "string" == typeof item ? item : item.class;
                    return !(!item || seen[item]) && (seen[item] = !0);
                })), id.forEach(function(item) {
                    var opt, className = (item = "string" == typeof item ? {
                        selector: item,
                        class: "",
                        style: ""
                    } : item).class;
                    className && (opt = {
                        title: item.title || className,
                        value: className,
                        style: ""
                    }, (item = item.style || PreviewCss.getCssText(ed, {
                        classes: className
                    })) && (opt.style = ed.dom.serializeStyle(ed.dom.parseStyle(item))), 
                    options.push(opt));
                }), PreviewCss.reset()), options.forEach(function(item) {
                    if ((item = "string" == typeof item ? {
                        title: item,
                        value: item
                    } : item) && item.title && item.value) {
                        for (var elm, found = !1, i = 0; i < lst.options.length; i++) if (lst.options[i].value === item.value) {
                            found = !0;
                            break;
                        }
                        found || (elm = new Option(item.title, item.value), item.style && elm.setAttribute("style", item.style), 
                        lst.appendChild(elm));
                    }
                }));
            },
            createColourPickers: function() {
                var self = this, ed = tinyMCEPopup.editor, doc = ed.getDoc();
                $("input.color, input.colour").each(function() {
                    var html, stylesheets, id = $(this).attr("id"), v = this.value, elm = this, $picker = (v && "#" === v.charAt(0) && (this.value = v.substr(1), 
                    v = this.value), $(this).siblings(":input").length && $(this).wrap("<span />"), 
                    $(this).parent(".uk-form-controls, td, span").addClass("uk-form-icon uk-form-icon-both").prepend('<i class="uk-icon-hashtag" />'), 
                    $('<button class="uk-button-link uk-icon-none uk-icon-colorpicker" title="' + self.translate("colorpicker") + '" aria-label="' + self.translate("colorpicker") + '" id="' + id + '_pick"></button>').insertAfter(this).attr("disabled", function() {
                        return !!$(elm).is(":disabled") || null;
                    })), v = ($(this).on("colorpicker:pick", function() {
                        var v = this.value;
                        "#" !== v.charAt(0) && (v = "#" + v), $(this).next(".uk-icon-colorpicker").css("background-color", v);
                    }), $(this).on("change", function(e) {
                        e.preventDefault(), e.stopPropagation();
                        e = this.value;
                        e && "#" === e.charAt(0) && $(this).val(e.substr(1)), "" === e && (e = "000000"), 
                        $(this).next(".uk-icon-colorpicker").attr("disabled", function() {
                            return !!elm.disabled || null;
                        }), $(this).trigger("colorpicker:pick", "#" + e);
                    }).trigger("change"), ed.getParam("colorpicker_custom_colors", ""));
                    "simple" === ed.getParam("colorpicker_type", "") && v.length ? ("string" == typeof v && (v = v.split(",")), 
                    html = '<div role="listbox" tabindex="0" class="wf-colorpicker-simple-colors">', 
                    $.each(v, function(i, col) {
                        4 == col.length && (col += col.substr(1)), html += '<div style="background-color:' + col + '" data-color="' + col + '" title="' + col + '"><span aria-hidden="true" aria-label="' + col + '"></span></div>';
                    }), html += "</div>", $picker.tips({
                        trigger: "click",
                        position: "bottom center",
                        content: '<div id="colorpicker" aria-label="Colorpicker" title="Color Picker">' + html + "</div>",
                        className: "wf-colorpicker wf-colorpicker-simple",
                        opacity: 1
                    }).on("tooltip:show", function() {
                        $("#colorpicker").on("click", ".wf-colorpicker-simple-colors > div", function(e) {
                            e = $(e.target).data("color");
                            e && ($(elm).val(e).trigger("change"), $picker.trigger("tooltip:close"));
                        });
                    })) : (stylesheets = [], doc.styleSheets.length && $.each(doc.styleSheets, function(i, s) {
                        s.href && -1 == s.href.indexOf("tiny_mce") && stylesheets.push(s);
                    }), id = $.extend(ColorPicker.settings, {
                        widget: $picker,
                        labels: {
                            picker_tab: "Picker",
                            title: "Color Picker",
                            palette_tab: "Palette",
                            palette: "Web Colors",
                            named_tab: "Named",
                            named: "Named Colors",
                            template_tab: "Template",
                            template: "Template Colors",
                            color: "Color",
                            apply: "Apply",
                            name: "Name"
                        },
                        stylesheets: stylesheets,
                        custom_colors: v
                    }), $(this).colorpicker(id));
                });
            },
            createBrowsers: function(el, callback, filter) {
                var self = this;
                el && $(el).addClass("browser").addClass(filter || ""), $("input.browser").add(el).each(function() {
                    var el, input = this;
                    filter = $(el = this).hasClass("image") || $(el).hasClass("images") ? "images" : $(el).hasClass("html") ? "html" : $(el).hasClass("media") ? "media" : "files", 
                    $(this).parent("td, .uk-form-controls").addClass("uk-form-icon uk-form-icon-flip");
                    $('<button class="uk-icon uk-icon-' + {
                        images: "picture",
                        html: "file-text",
                        files: "file-text",
                        media: "film"
                    }[filter] + ' uk-button uk-button-link" title="' + self.translate("browse", "Browse for Files") + '" aria-label="' + self.translate("browse", "Browse for Files") + '"></button>').on("click", function(e) {
                        return e.preventDefault(), tinyMCEPopup.execCommand("mceFileBrowser", !0, {
                            callback: callback || $(input).attr("id"),
                            value: input.value,
                            filter: $(this).attr("data-filter") || filter,
                            caller: self.getName(),
                            window: window
                        });
                    }).insertAfter(this);
                });
            },
            getLanguage: function() {
                var s;
                return this.language || (2 < (s = $("body").attr("lang") || "en").length && (s = s.substr(0, 2)), 
                this.language = s), this.language;
            },
            sizeToFit: function(o, c) {
                var x = c.width, c = c.height, w = o.width, o = o.height;
                return x / w < w / o ? (o *= x / w, w = x, c < o && (w *= c / o, 
                o = c)) : (w *= c / o, o = c, x < w && (o *= x / w, w = x)), {
                    width: Math.round(w),
                    height: Math.round(o)
                };
            },
            translate: function(s, ds) {
                return tinyMCEPopup.getLang("dlg." + s, ds || s);
            },
            Storage: {
                get: function(n, s, fn) {
                    return !window.sessionStorage || void 0 === (n = sessionStorage.getItem(n)) || null == n || fn && "function" == typeof fn && !fn(n) ? s : "null" === n ? null : "true" === n || "false" !== n && n;
                },
                set: function(n, v) {
                    window.sessionStorage && sessionStorage.setItem(n, v);
                }
            }
        };
        Wf.loadLanguage(), window.Wf = Wf, window.TinyMCE_Utils = {
            fillClassList: function(id) {
                Wf.createClassList(id);
            }
        };
    }(jQuery), void 0 === ColorPicker && (ColorPicker = {
        settings: {}
    }), function($, Wf) {
        Wf.URL = $.URL = {
            toAbsolute: function(url) {
                return "undefined" != typeof tinyMCEPopup ? tinyMCEPopup.editor.documentBaseURI.toAbsolute(url) : /http(s)?:\/\//.test(url) ? url : Wf.getURI(!0) + url.substr(0, url.indexOf("/"));
            },
            toRelative: function(url) {
                return "undefined" != typeof tinyMCEPopup ? tinyMCEPopup.editor.documentBaseURI.toRelative(url) : /http(s)?:\/\//.test(url) ? url.substr(url.indexOf("/")) : url;
            }
        };
    }(jQuery, Wf), function($, Wf) {
        var asciiMap = {
            192: "A",
            193: "A",
            194: "A",
            195: "A",
            196: "A",
            197: "A",
            198: "AE",
            199: "C",
            200: "E",
            201: "E",
            202: "E",
            203: "E",
            204: "I",
            205: "I",
            206: "I",
            207: "I",
            208: "D",
            209: "N",
            210: "O",
            211: "O",
            212: "O",
            213: "O",
            214: "O",
            216: "O",
            217: "U",
            218: "U",
            219: "U",
            220: "U",
            221: "Y",
            223: "s",
            224: "a",
            225: "a",
            226: "a",
            227: "a",
            228: "a",
            229: "a",
            230: "ae",
            231: "c",
            232: "e",
            233: "e",
            234: "e",
            235: "e",
            236: "i",
            237: "i",
            238: "i",
            239: "i",
            241: "n",
            242: "o",
            243: "o",
            244: "o",
            245: "o",
            246: "o",
            248: "o",
            249: "u",
            250: "u",
            251: "u",
            252: "u",
            253: "y",
            255: "y",
            256: "A",
            257: "a",
            258: "A",
            259: "a",
            260: "A",
            261: "a",
            262: "C",
            263: "c",
            264: "C",
            265: "c",
            266: "C",
            267: "c",
            268: "C",
            269: "c",
            270: "D",
            271: "d",
            272: "D",
            273: "d",
            274: "E",
            275: "e",
            276: "E",
            277: "e",
            278: "E",
            279: "e",
            280: "E",
            281: "e",
            282: "E",
            283: "e",
            284: "G",
            285: "g",
            286: "G",
            287: "g",
            288: "G",
            289: "g",
            290: "G",
            291: "g",
            292: "H",
            293: "h",
            294: "H",
            295: "h",
            296: "I",
            297: "i",
            298: "I",
            299: "i",
            300: "I",
            301: "i",
            302: "I",
            303: "i",
            304: "I",
            305: "i",
            306: "IJ",
            307: "ij",
            308: "J",
            309: "j",
            310: "K",
            311: "k",
            313: "L",
            314: "l",
            315: "L",
            316: "l",
            317: "L",
            318: "l",
            319: "L",
            320: "l",
            321: "l",
            322: "l",
            323: "N",
            324: "n",
            325: "N",
            326: "n",
            327: "N",
            328: "n",
            329: "n",
            332: "O",
            333: "o",
            334: "O",
            335: "o",
            336: "O",
            337: "o",
            338: "OE",
            339: "oe",
            340: "R",
            341: "r",
            342: "R",
            343: "r",
            344: "R",
            345: "r",
            346: "S",
            347: "s",
            348: "S",
            349: "s",
            350: "S",
            351: "s",
            352: "S",
            353: "s",
            354: "T",
            355: "t",
            356: "T",
            357: "t",
            358: "T",
            359: "t",
            360: "U",
            361: "u",
            362: "U",
            363: "u",
            364: "U",
            365: "u",
            366: "U",
            367: "u",
            368: "U",
            369: "u",
            370: "U",
            371: "u",
            372: "W",
            373: "w",
            374: "Y",
            375: "y",
            376: "Y",
            377: "Z",
            378: "z",
            379: "Z",
            380: "z",
            381: "Z",
            382: "z",
            383: "s",
            402: "f",
            416: "O",
            417: "o",
            431: "U",
            432: "u",
            461: "A",
            462: "a",
            463: "I",
            464: "i",
            465: "O",
            466: "o",
            467: "U",
            468: "u",
            469: "U",
            470: "u",
            471: "U",
            472: "u",
            473: "U",
            474: "u",
            475: "U",
            476: "u",
            506: "A",
            507: "a",
            508: "AE",
            509: "ae",
            510: "O",
            511: "o"
        };
        Wf.String = {
            basename: function(s) {
                return s.replace(/^.*[\/\\]/g, "");
            },
            dirname: function(s) {
                return /[\\\/]+/.test(s) ? s.replace(/\\/g, "/").replace(/\/[^\/]*\/?$/, "") : "";
            },
            filename: function(s) {
                return this.stripExt(this.basename(s));
            },
            getExt: function(s) {
                return s.substring(s.length, s.lastIndexOf(".") + 1);
            },
            stripExt: function(s) {
                return s.replace(/\.[^.]+$/i, "");
            },
            pathinfo: function(s) {
                return {
                    basename: this.basename(s),
                    dirname: this.dirname(s),
                    extension: this.getExt(s),
                    filename: this.filename(s)
                };
            },
            path: function(a, b) {
                return "array" === $.type(a) ? this.clean(a.join("/")) : this.clean(a + "/" + b);
            },
            clean: function(s) {
                var parts;
                return -1 !== s.indexOf("://") ? ((parts = s.split("://"))[1] = parts[1].replace(/\/+/g, "/"), 
                parts.join("://")) : s.replace(/\/+/g, "/");
            },
            toASCII: function(string) {
                return string.replace(/([^\w\.\-\s ])/gi, function(str) {
                    return asciiMap[str.charCodeAt(0)] || "";
                });
            },
            _toUnicode: function(s) {
                for (var c = s.toString(16).toUpperCase(); c.length < 4; ) c = "0" + c;
                return "\\u" + c;
            },
            safe: function(s, mode, spaces, textcase) {
                mode = mode || "utf-8";
                for (var r = "", i = 0, ln = (s = (s = s.replace(/[\s ]+/g, spaces = spaces || "_")).replace(/[\+\\\/\?\#%&<>"\'=\[\]\{\},;@\^\(\)\xa3\u20ac$~]/g, "")).length; i < ln; i++) {
                    var ch = s[i];
                    /[^\w\.\-\s ]/.test(ch) && this._toUnicode(ch.charCodeAt(0)) < "\\u007F" || (r += ch);
                }
                if (s = r, s = (s = (s = (s = "ascii" === mode ? this.toASCII(s) : s).replace(/(\.){2,}/g, "")).replace(/^\./, "")).replace(/\.$/, ""), 
                s = this.basename(s), textcase) switch (textcase) {
                  case "lowercase":
                    s = s.toLowerCase();
                    break;

                  case "uppercase":
                    s = s.toUpperCase();
                }
                return s;
            },
            query: function(s) {
                var p = {};
                return -1 !== (s = this.decode(s)).indexOf("=") && (/\?/.test(s) && (s = s.substring(s.indexOf("?") + 1)), 
                s = (s = /#/.test(s) ? s.substr(0, s.indexOf("#")) : s).replace(/&amp;/g, "&").split("&"), 
                $.each(s, function(i, item) {
                    item && (item = item.split("="), p[item[0]] = item[1]);
                })), p;
            },
            encode: function(s) {
                var baseEntities = {
                    '"': "&quot;",
                    "'": "&#39;",
                    "<": "&lt;",
                    ">": "&gt;",
                    "&": "&amp;"
                };
                return ("" + s).replace(/[<>&\"\']/g, function(chr) {
                    return baseEntities[chr] || chr;
                });
            },
            decode: function(s) {
                var reverseEntities = {
                    "&lt;": "<",
                    "&gt;": ">",
                    "&amp;": "&",
                    "&quot;": '"',
                    "&apos;": "'"
                };
                return s.replace(/&(#)?([\w]+);/g, function(all, numeric, value) {
                    return numeric ? String.fromCharCode(value) : reverseEntities[all];
                });
            },
            escape: function(s) {
                return encodeURI(s);
            },
            unescape: function(s) {
                return decodeURI(s);
            },
            encodeURI: function(s, preserve_urls) {
                return s && 0 === s.indexOf("file://") || (s = encodeURIComponent(decodeURIComponent(s)).replace(/%2F/g, "/"), 
                preserve_urls && (s = s.replace(/%(21|2A|27|28|29|3B|3A|40|26|3D|2B|24|2C|3F|25|23|5B|5D)/g, function(a, b) {
                    return String.fromCharCode(parseInt(b, 16));
                }))), s;
            },
            buildURI: function(s) {
                return -1 !== (s = /^\s*www\./.test(s) ? "http://" + s : s).indexOf("{") ? s : s.replace(/ /g, "%20");
            },
            toHex: function(color) {
                var r, g, re = new RegExp("rgb\\s*\\(\\s*([0-9]+).*,\\s*([0-9]+).*,\\s*([0-9]+).*\\)", "gi"), re = color.replace(re, "$1,$2,$3").split(",");
                return 3 == re.length ? (r = parseInt(re[0], 10).toString(16), g = parseInt(re[1], 10).toString(16), 
                re = parseInt(re[2], 10).toString(16), "#" + (r = 1 == r.length ? 0 + r : r) + (g = 1 == g.length ? 0 + g : g) + (re = 1 == re.length ? 0 + re : re)) : color;
            },
            toRGB: function(color) {
                return -1 != color.indexOf("#") ? (color = color.replace(new RegExp("[^0-9A-F]", "gi"), ""), 
                "rgb(" + parseInt(color.substring(0, 2), 16) + "," + parseInt(color.substring(2, 4), 16) + "," + parseInt(color.substring(4, 6), 16) + ")") : color;
            },
            ucfirst: function(s) {
                return s.charAt(0).toUpperCase() + s.substring(1);
            },
            formatSize: function(s, int) {
                var n;
                return s ? 1048576 < s ? (n = Math.round(s / 1048576 * 100) / 100, 
                int ? n : n + " " + Wf.translate("size_mb", "MB")) : 1024 < s ? (n = Math.round(s / 1024 * 100) / 100, 
                int ? n : n + " " + Wf.translate("size_kb", "KB")) : int ? s : s + " " + Wf.translate("size_bytes", "Bytes") : "";
            },
            formatDate: function(time, fmt) {
                return time ? (time = new Date(1e3 * time), (fmt = (fmt = (fmt = (fmt = (fmt = (fmt = (fmt = (fmt = (fmt = (fmt = (fmt = (fmt = fmt || "%d/%m/%Y, %H:%M").replace("%D", "%m/%d/%y")).replace("%r", "%I:%M:%S %p")).replace("%Y", "" + time.getFullYear())).replace("%y", "" + time.getYear())).replace("%m", addZeros(time.getMonth() + 1, 2))).replace("%d", addZeros(time.getDate(), 2))).replace("%H", "" + addZeros(time.getHours(), 2))).replace("%M", "" + addZeros(time.getMinutes(), 2))).replace("%S", "" + addZeros(time.getSeconds(), 2))).replace("%I", "" + ((time.getHours() + 11) % 12 + 1))).replace("%p", time.getHours() < 12 ? "AM" : "PM")).replace("%%", "%")) : "";
                function addZeros(value, len) {
                    var i;
                    if ((value = "" + value).length < len) for (i = 0; i < len - value.length; i++) value = "0" + value;
                    return value;
                }
            }
        };
    }(jQuery, Wf), function($, Wf) {
        var counter = 0;
        var instance = {};
        Wf.JSON = {
            request: function(func, data, callback, scope, multi) {
                var json = {
                    method: func,
                    id: function() {
                        for (var guid = new Date().getTime().toString(32), i = 0; i < 5; i++) guid += Math.floor(65535 * Math.random()).toString(32);
                        return "wf_" + guid + (counter++).toString(32);
                    }()
                }, multi = (instance[func] && !multi && instance[func].abort(), 
                callback = callback || $.noop, {}), fields = $(":input", "form").serialize(), data = ("string" === $.type(data) || "array" === $.type(data) ? $.extend(json, {
                    params: "string" === $.type(data) ? Wf.String.encodeURI(data) : $.map(data, function(s) {
                        return s && "string" === $.type(s) ? Wf.String.encodeURI(s) : s;
                    })
                }) : ("object" === $.type(data) && data.json && ($.extend(json, {
                    params: data.json
                }), delete data.json), $.extend(multi, data)), $.isEmptyObject(multi) || (fields += "&" + $.param(multi)), 
                document.location.href);
                function showError(e) {
                    var txt = "";
                    txt = (txt = $.isPlainObject(e) ? e.text || "" : "array" === $.type(e) ? e.join("\n") : e) && txt.replace(/<br([^>]+?)>/, ""), 
                    Wf.Modal.alert(txt);
                }
                data = data.replace(/task=plugin.display/, "task=plugin.rpc"), instance[func] = $.ajax({
                    context: scope || this,
                    url: data,
                    dataType: "text",
                    method: "post",
                    data: "json=" + JSON.stringify(json) + "&" + fields
                }).done(function(o) {
                    var r, s;
                    if (o ? ("string" === $.type(o) && /^[\],:{}\s]*$/.test(o.replace(/\\(?:["\\\/bfnrt]|u[0-9a-fA-F]{4})/g, "@").replace(/"[^"\\\n\r]*"|true|false|null|-?\d+(?:\.\d*)?(?:[eE][+\-]?\d+)?/g, "]").replace(/(?:^|:|,)(?:\s*\[)+/g, "")) && (s = JSON.parse(o)) && (o = s), 
                    $.isPlainObject(o) ? (o.error && showError(o.text || o.error.message || ""), 
                    (r = o.result || null) && r.error && r.error.length && showError(r.error || "")) : /[{}]/.test(o) ? showError("The server returned an invalid JSON response.") : showError(o)) : showError("The server returned invalid or missing data."), 
                    instance[func] = null, !$.isFunction(callback)) return r;
                    callback.call(scope || this, r);
                }).fail(function(e, status, txt) {
                    "abort" !== status && Wf.Modal.alert(status || "Server Error - " + txt), 
                    instance[func] = null;
                });
            }
        };
    }(jQuery, Wf), function($, Wf) {
        function calculateWidth(n, cw, ch) {
            var ww = $(n).width() - 60, wh = $(n).height() - 101, ww = Math.min(ww / cw, wh / ch);
            cw = Math.min(cw, Math.floor(cw * ww)), $(".uk-modal-dialog", n).css("max-width", cw + "px");
        }
        Wf.Modal = {
            counter: 0,
            _uid: function(p) {
                return (p || "wf_") + this.counter++;
            },
            dialog: function(title, data, options) {
                return this.open(title, options, data);
            },
            open: function(title, options, html) {
                var footer, div = document.createElement("div"), modal = ((options = $.extend({
                    container: $("form").first().get(0) || "body",
                    classes: "",
                    id: "dialog_" + this._uid(),
                    open: $.noop,
                    close: $.noop,
                    beforeclose: $.noop,
                    buttons: !1,
                    header: !0,
                    label: {
                        confirm: Wf.translate("yes", "Yes"),
                        cancel: Wf.translate("no", "No")
                    }
                }, options)).onOpen && (options.open = options.onOpen), options.onBeforeClose && (options.beforeclose = options.onBeforeClose), 
                options.onClose && (options.close = options.onClose), $(div).addClass("uk-modal"), 
                0 === $(".uk-modal-overlay").length && $(div).append('<div class="uk-modal-overlay uk-position-cover uk-overlay-background"></div>'), 
                $('<div class="uk-modal-dialog" role="dialog" aria-modal="true" aria-label="' + title + '"></div>').appendTo(div));
                return $(modal).addClass(options.classes), options.width && $(modal).width(options.width), 
                options.height && $(modal).height(options.height), $(modal).append('<button type="button" class="uk-modal-close uk-close" aria-label="' + Wf.translate("close", "Close") + '"></button>'), 
                options.header && $(modal).append('<div class="uk-modal-header"><h3>' + title + "</h3></div>"), 
                $('<div class="uk-modal-body uk-overflow-container" id="' + options.id + '"></div>').appendTo(modal).append(html), 
                options.elements && (html = "", html = "string" === $.type(options.elements) && options.elements ? options.elements : function(data) {
                    var html = "";
                    return $.each(data, function(key, value) {
                        value.options ? (html = (html += '<div class="uk-form-row uk-flex">') + '<label class="uk-form-label uk-width-1-5" for="' + key + '">' + (value.label || key) + '</label><div class="uk-form-controls uk-width-4-5"><select id="' + key + '" name="' + key + '">', 
                        $.each(value.options, function(optionValue, optionName) {
                            var selected = "";
                            optionValue.default && value === optionValue.default && (selected = " selected"), 
                            html += '<option value="' + optionValue + '"' + selected + ">" + optionName + "</option>";
                        }), html += "</select></div></div>") : html += '<div class="uk-form-row uk-flex"><label class="uk-form-label uk-width-1-5" for="' + key + '">' + value.label || key + '</label><div class="uk-form-controls uk-width-4-5"><input id="' + key + '" type="text" name="' + key + '" value="' + value.value || '" /></div></div>';
                    }), html;
                }(options.elements), $(".uk-modal-body", modal).append(html)), options.buttons && (footer = $('<div class="uk-modal-footer uk-text-right"></div>'), 
                $.each(options.buttons, function(i, o) {
                    var btn = $('<button class="uk-button uk-margin-small-left" id="' + options.id + "_button_" + i + '"></button>').on("click", function(e) {
                        e.preventDefault(), $.isFunction(o.click) && o.click.call(this, e);
                    }).on("submit", function(e) {
                        e.preventDefault(), e.stopImmediatePropagation();
                    });
                    $.each(o.attributes, function(k, v) {
                        "class" === k ? $(btn).addClass(v) : $(btn).attr(k, v);
                    }), o.text && $(btn).append('<label class="uk-text" for="' + options.id + "_button_" + i + '">' + o.text + "</label>"), 
                    o.icon && $(btn).prepend('<i class="uk-icon ' + o.icon + '" aria-hidden="true"></i>&nbsp;'), 
                    $(footer).append(btn);
                })), $(modal).append(footer), $(div).on("modal.open", function(ev) {
                    $("input[autofocus], button[autofocus]", div).first().trigger("focus"), 
                    options.open.call(this, ev);
                }).on("modal.close", function(e, ev) {
                    options.beforeclose.call(this, ev), $(this).off("modal.open modal.close keyup.modal").removeClass("uk-open"), 
                    $("body").off("keyup.modal"), window.setTimeout(function() {
                        $(div).hide().detach();
                    }, 500), options.close.call(this, ev);
                }), $(".uk-modal-close", div).on("click", function(e) {
                    e.preventDefault(), e.stopImmediatePropagation(), $(div).trigger("modal.close", e);
                }), $(div).on("keydown.modal", function(e) {
                    var $navItems, endIndex, idx;
                    9 === e.keyCode && ($navItems = $(":input:visible", div).not('input[type="file"]').filter(function() {
                        return 0 <= this.getAttribute("tabindex");
                    })).length && ($navItems.attr("tabindex", 0), e.shiftKey && $navItems.reverse(), 
                    endIndex = Math.max(0, $navItems.length - 1), idx = $navItems.index(e.target) + 1, 
                    $navItems.eq(idx = endIndex < idx ? 0 : idx).trigger("focus").attr("tabindex", 1), 
                    e.preventDefault(), e.stopImmediatePropagation());
                }), $(div).on("keyup.modal", function(e) {
                    13 === e.keyCode && (e.preventDefault(), e.stopPropagation(), 
                    ($("button:focus", this).length ? $(this).find(".uk-modal-dialog button:focus") : $(this).find('.uk-modal-dialog button[type="submit"]')).triggerHandler("click"), 
                    !1 !== options.close_on_submit) && $(this).trigger("modal.close");
                }), $(div).appendTo(options.container), $(div).show().scrollTop(0), 
                $(div).addClass("uk-open").trigger("modal.open").attr("aria-hidden", !1), 
                div;
            },
            confirm: function(s, cb, options) {
                s = "<p>" + s + "</p>";
                return options = $.extend(!0, {
                    label: {
                        confirm: Wf.translate("yes", "Yes"),
                        cancel: Wf.translate("no", "No")
                    }
                }, options), options = $.extend(!0, {
                    classes: "uk-modal-confirm",
                    buttons: [ {
                        text: options.label.cancel,
                        icon: "uk-icon-close",
                        click: function(e) {
                            cb.call(this, !1);
                        },
                        attributes: {
                            class: "uk-modal-close"
                        }
                    }, {
                        text: options.label.confirm,
                        icon: "uk-icon-check",
                        click: function(e) {
                            cb.call(this, !0);
                        },
                        attributes: {
                            type: "submit",
                            class: "uk-button-primary uk-modal-close",
                            autofocus: !0
                        }
                    } ]
                }, options || {}), this.open(Wf.translate("confirm", "Confirm"), options, s);
            },
            alert: function(s, options) {
                s = "<p>" + s + "</p>";
                return options = $.extend({
                    label: {
                        confirm: Wf.translate("ok", "Ok")
                    }
                }, options), options = $.extend({
                    classes: "uk-modal-alert",
                    buttons: [ {
                        text: options.label.confirm,
                        attributes: {
                            type: "submit",
                            class: "uk-modal-close",
                            autofocus: !0
                        }
                    } ]
                }, options || {}), this.open(options.title || Wf.translate("alert", "Alert"), options, s);
            },
            prompt: function(title, cb, options) {
                var html = '<div class="uk-form-row uk-grid">', onOpen = (!1 !== (options = $.extend(!0, {
                    id: "dialog-prompt",
                    value: "",
                    text: "",
                    multiline: !1,
                    elements: "",
                    label: {
                        confirm: Wf.translate("ok", "OK"),
                        cancel: Wf.translate("cancel", "Cancel")
                    }
                }, options)).input && (options.text ? html += '<label class="uk-form-label uk-width-3-10" for="' + options.id + '">' + options.text + '</label><div class="uk-form-controls uk-width-7-10 uk-margin-remove">' : html += '<div class="uk-form-controls uk-width-1-1 uk-margin-remove">', 
                options.multiline ? html += '<textarea id="' + options.id + '-input" required autofocus>' + options.value + "</textarea>" : html += '<input id="' + options.id + '-input" type="text" value="' + options.value + '" required autofocus aria-invalid="false" />'), 
                html = html + "</div>" + "</div>", options.open || function() {});
                return options = $.extend(!0, options, {
                    classes: "uk-modal-prompt",
                    buttons: [ {
                        attributes: {
                            type: "submit",
                            class: "uk-button-primary",
                            autofocus: !0
                        },
                        text: options.label.confirm,
                        icon: "uk-icon-check",
                        click: function() {
                            var args = [], $inp = $("#" + options.id + "-input"), v = $inp.val();
                            if ("" === v) return $inp.trigger("focus"), !1;
                            options.elements && $(":input", "#" + options.id).not($inp).each(function() {
                                args.push($(this).val());
                            }), cb.call(this, v, args), !1 !== options.close_on_submit && $inp.parents(".uk-modal").trigger("modal.close");
                        }
                    } ],
                    open: function() {
                        onOpen.call(this, {
                            target: this
                        });
                        var n = document.getElementById(options.id + "-input");
                        n && setTimeout(function() {
                            function validateInput(n) {
                                var stringA, value, b, isValid = !1;
                                n.value && ((value = options.validate(n.value)) && (stringA = n.value, 
                                value = value, stringA = stringA.split(""), b = value.split(""), 
                                !stringA.filter(function(i) {
                                    return !(-1 < b.indexOf(i));
                                }).join("")) && (isValid = !0), $(n).attr("aria-invalid", !isValid));
                            }
                            n.focus(), options.validate && ($(n).on("change keyup", function(e) {
                                validateInput(n);
                            }), validateInput(n)), "INPUT" === n.nodeName && n.setSelectionRange && n.value && n.setSelectionRange(n.value.length, n.value.length);
                        }, 350);
                    }
                }), this.open(title, options, html);
            },
            custom: function(title, cb, options) {
                var onOpen = (options = $.extend(!0, {
                    id: "dialog-custom",
                    value: "",
                    text: "",
                    multiline: !1,
                    elements: "",
                    label: {
                        confirm: Wf.translate("ok", "OK"),
                        cancel: Wf.translate("cancel", "Cancel")
                    }
                }, options)).open || function() {};
                return options = $.extend(!0, options, {
                    classes: "uk-modal-prompt",
                    buttons: [ {
                        attributes: {
                            type: "submit",
                            class: "uk-button-primary",
                            autofocus: !0
                        },
                        text: options.label.confirm,
                        icon: "uk-icon-check",
                        click: function() {
                            var args = [];
                            options.elements && $(":input", "#" + options.id).each(function() {
                                args.push($(this).val());
                            }), cb.call(this, args), !1 !== options.close_on_submit && $(this).parents(".uk-modal").trigger("modal.close");
                        }
                    } ],
                    open: function() {
                        onOpen.call(this, {
                            target: this
                        });
                        var n = document.getElementById(options.id + "-input");
                        n && setTimeout(function() {
                            function validateInput(n) {
                                var stringA, value, b, isValid = !1;
                                n.value && ((value = options.validate(n.value)) && (stringA = n.value, 
                                value = value, stringA = stringA.split(""), b = value.split(""), 
                                !stringA.filter(function(i) {
                                    return !(-1 < b.indexOf(i));
                                }).join("")) && (isValid = !0), $(n).attr("aria-invalid", !isValid));
                            }
                            n.focus(), options.validate && ($(n).on("change keyup", function(e) {
                                validateInput(n);
                            }), validateInput(n)), "INPUT" === n.nodeName && n.setSelectionRange && n.value && n.setSelectionRange(n.value.length, n.value.length);
                        }, 350);
                    }
                }), this.open(title, options, "");
            },
            upload: function(options) {
                var div = $('<div id="upload-body" />').append('<div id="upload-queue-block" class="uk-placeholder uk-margin-bottom">   <div id="upload-queue"></div>   <input type="file" size="40" tabindex="-1" /></div><div id="upload-options"></div>');
                return options.upload = options.upload || $.noop, options = $.extend({
                    classes: "uk-modal-dialog-full uk-modal-upload",
                    resizable: !1,
                    buttons: [ {
                        text: Wf.translate("close", "Close"),
                        icon: "uk-icon-close",
                        attributes: {
                            class: "uk-modal-close uk-hidden-small"
                        }
                    }, {
                        text: Wf.translate("browse", "Add Files"),
                        icon: "uk-icon-search",
                        attributes: {
                            id: "upload-browse",
                            class: "uk-button-success",
                            autofocus: !0
                        }
                    }, {
                        text: Wf.translate("upload", "Upload"),
                        click: function(e) {
                            return e.preventDefault(), options.upload.call();
                        },
                        attributes: {
                            id: "upload-start",
                            class: "uk-button-primary"
                        },
                        icon: "uk-icon-cloud-upload"
                    } ]
                }, options), this.open(Wf.translate("upload", "Upload"), options, div);
            },
            iframe: function(name, url, options) {
                var div = document.createElement("div");
                var w = options.width, h = options.height, name = (options = $.extend({
                    classes: "uk-modal-dialog-large uk-modal-preview",
                    open: function(e) {
                        var wh, cw, ch, iframe = document.createElement("iframe");
                        $(div).addClass("loading"), $(iframe).attr({
                            src: url,
                            scrolling: "auto",
                            frameborder: 0
                        }).on("load", function() {
                            $.isFunction(options.onFrameLoad) && options.onFrameLoad.call(this), 
                            $(div).removeClass("loading");
                        }), $(div).addClass("iframe-preview").append(iframe), iframe = e.target, 
                        e = $(".uk-modal-dialog", iframe).outerHeight(), wh = $(iframe).height(), 
                        cw = $(".uk-modal-body", iframe).width(), ch = $(".uk-modal-body", iframe).height(), 
                        e = e - $(".uk-modal-body", iframe).height() + ch, cw = Math.min(cw, Math.floor(cw * Math.min(wh / e, 1))), 
                        $(".uk-modal-dialog", iframe).css("max-width", cw - 20 + "px"), 
                        w = cw, .56 !== parseFloat((h / w).toFixed(2)) && (ch = Math.floor(h / w * 100), 
                        $(div).css("padding-bottom", "calc(" + ch + "% - 20px)"));
                    }
                }, options), name || Wf.translate("preview", "Preview"));
                return this.open(name, options, div);
            },
            media: function(name, url, options) {
                var w = (options = options || {}).width, h = options.height, div = document.createElement("div");
                return delete options.width, delete options.height, $.extend(options, {
                    classes: "uk-modal-dialog-large uk-modal-preview",
                    open: function(e) {
                        if (/\.(jpg|jpeg|gif|png|apng|svg|webp)/i.test(url)) {
                            $(div).addClass("image-preview loading");
                            var img = new Image(), loaded = !1;
                            img.onload = function() {
                                if (loaded) return !1;
                                w = w || img.width, h = h || img.height, $(".image-preview").removeClass("loading").append('<img src="' + url + '" alt="' + Wf.String.basename(url) + '" />').parent().css("max-width", w + "px"), 
                                loaded = !0, calculateWidth(e.target, w, h), $(".image-preview").on("click", function(e) {
                                    $(e.target).trigger("modal.close", e);
                                }), window.setTimeout(function() {
                                    $(".uk-modal").trigger("modal.assetloaded");
                                }, 0);
                            }, /\?/.test(url) || (url += "?" + new Date().getTime()), 
                            img.src = url;
                        } else if (/\.pdf$/i.test(url)) $(div).addClass("media-preview loading"), 
                        ($.support.pdf ? $(div).html('<object data="' + url + '" type="application/pdf"></object>') : $(div).html('<iframe src="' + url + '" frameborder="0"></iframe>')).removeClass("big-loader"), 
                        $("iframe, object", div).on("load", function() {
                            calculateWidth(e.target, w, h), $(".uk-modal").trigger("modal.assetloaded");
                        }); else {
                            $(div).addClass("media-preview loading");
                            var mimes = {};
                            !function() {
                                for (var y, ext, items = "application/x-director,dcr,application/x-mplayer2,wmv wma avi,video/divx,divx,application/x-shockwave-flash,swf swfl,audio/mpeg,mpga mpega mp2 mp3,audio/ogg,ogg spx oga,audio/x-wav,wav,video/mpeg,mpeg mpg mpe,video/mp4,mp4 m4v,video/ogg,ogg ogv,video/webm,webm,video/quicktime,qt mov,video/x-flv,flv,video/vnd.rn-realvideo,rv,video/3gpp,3gp,video/x-matroska,mkv".split(/,/), i = 0; i < items.length; i += 2) for (ext = items[i + 1].split(/ /), 
                                y = 0; y < ext.length; y++) mimes[ext[y]] = items[i];
                            }();
                            var type, props, ext = (ext = Wf.String.getExt(url)).toLowerCase(), mt = mimes[ext];
                            if ($.each({
                                flash: {
                                    classid: "clsid:d27cdb6e-ae6d-11cf-96b8-444553540000",
                                    type: "application/x-shockwave-flash",
                                    codebase: "http://download.macromedia.com/pub/shockwave/cabs/flash/swflash.cab#version=6,0,40,0"
                                },
                                shockwave: {
                                    classid: "clsid:166b1bca-3f9c-11cf-8075-444553540000",
                                    type: "application/x-director",
                                    codebase: "http://download.macromedia.com/pub/shockwave/cabs/director/sw.cab#version=8,5,1,0"
                                },
                                windowsmedia: {
                                    classid: "clsid:6bf52a52-394a-11d3-b153-00c04f79faa6",
                                    type: "application/x-mplayer2",
                                    codebase: "http://activex.microsoft.com/activex/controls/mplayer/en/nsmp2inf.cab#Version=5,1,52,701"
                                },
                                quicktime: {
                                    classid: "clsid:02bf25d5-8c17-4b23-bc80-d3488abddc6b",
                                    type: "video/quicktime",
                                    codebase: "http://www.apple.com/qtactivex/qtplugin.cab#version=6,0,2,0"
                                },
                                divx: {
                                    classid: "clsid:67dabfbf-d0ab-41fa-9c46-cc0f21721616",
                                    type: "video/divx",
                                    codebase: "http://go.divx.com/plugin/DivXBrowserPlugin.cab"
                                },
                                realmedia: {
                                    classid: "clsid:cfcdaa03-8be4-11cf-b84b-0020afbbccfa",
                                    type: "audio/x-pn-realaudio-plugin"
                                },
                                java: {
                                    classid: "clsid:8ad9c840-044e-11d1-b3e9-00805f499d93",
                                    type: "application/x-java-applet",
                                    codebase: "http://java.sun.com/products/plugin/autodl/jinstall-1_5_0-windows-i586.cab#Version=1,5,0,0"
                                },
                                silverlight: {
                                    classid: "clsid:dfeaf541-f3e1-4c24-acac-99c30715084a",
                                    type: "application/x-silverlight-2"
                                },
                                video: {
                                    type: "video/mp4"
                                },
                                audio: {
                                    type: "audio/mp3"
                                }
                            }, function(k, v) {
                                v.type && v.type == mt && (type = k, props = v);
                            }), /^(mp4|m4v|og(g|v)|webm|flv|f4v)$/i.test(ext) && (type = "video", 
                            props = {
                                type: mt
                            }), /^(mp3|oga)$/i.test(ext) && (type = "audio", props = {
                                type: mt
                            }), type && props) {
                                switch (type) {
                                  case "audio":
                                  case "video":
                                    "video" == type ? $(div).append('<video autoplay="autoplay" controls="controls" preload="none" type="' + props.type + '" src="' + url + '"></video>') : $(div).addClass("media-preview-audio").append('<audio autoplay="autoplay" controls="controls" preload="none" type="' + props.type + '" src="' + url + '"></audio>');
                                    break;

                                  case "flash":
                                    $(div).append('<object type="' + props.type + '" data="' + url + '"><param name="movie" value="' + url + '" /></object>');
                                    break;

                                  default:
                                    $(div).append('<object classid="' + props.classid + '"><param name="src" value="' + url + '" /><embed src="' + url + '" type="' + props.type + '"></embed></object>');
                                }
                                $("iframe, object, embed, video, audio", div).on("load loadedmetadata", function() {
                                    $(div).removeClass("loading"), calculateWidth(e.target, w, h), 
                                    $(".uk-modal").trigger("modal.assetloaded");
                                }).on("error", function() {
                                    $(div).removeClass("loading");
                                });
                            }
                        }
                        calculateWidth(e.target, w, h);
                    }
                }), this.open(name, options, div);
            }
        };
    }(jQuery, Wf), function($) {
        $.extend(Wf, {
            getAttrib: function(e, at) {
                var v, ed = tinyMCEPopup.editor;
                switch (at) {
                  case "width":
                  case "height":
                    -1 !== (v = ed.dom.getAttrib(e, at) || e.style[at] || "").indexOf("px") && (v = parseInt(v, 10));
                    break;

                  case "align":
                    if (v = ed.dom.getAttrib(e, "align")) return v;
                    if (v = ed.dom.getStyle(e, "float")) return v;
                    if (v = ed.dom.getStyle(e, "vertical-align")) return v;
                    if ("block" === e.style.display && "auto" === ed.dom.getStyle(e, "margin-left") && "auto" === ed.dom.getStyle(e, "margin-right")) return "center";
                    break;

                  case "margin-top":
                  case "margin-bottom":
                    if (v = ed.dom.getStyle(e, at)) return /auto|inherit/.test(v) || /[a-z%]/i.test(v) && -1 === v.indexOf("px") ? v : parseInt(v, 10);
                    if (v = ed.dom.getAttrib(e, "vspace")) return parseInt(v.replace(/[^-0-9]/g, ""), 10);
                    break;

                  case "margin-left":
                  case "margin-right":
                    if (v = ed.dom.getStyle(e, at)) return /auto|inherit/.test(v) || /[a-z%]/i.test(v) && -1 === v.indexOf("px") ? v : parseInt(v, 10);
                    if (v = ed.dom.getAttrib(e, "hspace")) return parseInt(v.replace(/[^-0-9]/g, ""), 10);
                    break;

                  case "border-width":
                  case "border-style":
                  case "border-color":
                    v = "", tinymce.each([ "top", "right", "bottom", "left" ], function(n) {
                        n = at.replace(/-/, "-" + n + "-"), n = ed.dom.getStyle(e, n);
                        ("" !== n || n != v && "" !== v) && (v = ""), n && (v = n);
                    }), "" !== v && $("#border").prop("checked", !0), "border-width" != at && "border-style" != at || "" !== v || (v = "inherit"), 
                    "border-color" == at && (v = Wf.String.toHex(v)), "border-width" == at && /[0-9][a-z]/.test(v) && (v = parseFloat(v));
                }
                return v;
            },
            setMargins: function() {},
            setBorder: function() {},
            setDimensions: function() {},
            setStyles: function() {
                var border, ed = tinyMCEPopup.editor, $img = $("#sample");
                $img.length && ($img.attr("style", $("#style").val()), $.each([ "top", "right", "bottom", "left" ], function(i, k) {
                    var v = ed.dom.getStyle($img.get(0), "margin-" + k);
                    v && -1 != v.indexOf("px") && (v = parseInt(v, 10)), $("#margin_" + k).val(v);
                }), this.setMargins(!0), border = !1, $.each([ "width", "color", "style" ], function(i, k) {
                    var v = ed.dom.getStyle($img.get(0), "border-" + k);
                    "" == v && $.each([ "top", "right", "bottom", "left" ], function(i, n) {
                        n = ed.dom.getStyle($img.get(0), "border-" + n + "-" + k);
                        ("" !== n || n != v && "" !== v) && (v = ""), n && (v = n);
                    }), "" !== v && (border = !0), "width" == k && (v = /[0-9][a-z]/.test(v) ? parseInt(v, 10) : v), 
                    "color" == k && v && "#" === (v = Wf.String.toHex(v)).charAt(0) && (v = v.substr(1)), 
                    border && ($("#border_" + k).val(v), $("#border~:input, #border~span, #border~label").attr("disabled", !1).toggleClass("uk-text-muted", !1), 
                    "color" == k && $("#border_" + k).trigger("pick"), $("#border").prop("checked", !0).trigger("change"));
                }), $("#align").val(function() {
                    var v = $img.css("float") || $img.css("vertical-align");
                    return v || ("auto" === $img.css("margin-left") && "auto" === $img.css("margin-right") && "block" === $img.css("display") ? "center" : "");
                }));
            },
            updateStyles: function() {
                var v, k, n, s, ed = tinyMCEPopup.editor, img = new Image(), preview = $("#sample"), styles = ($(img).attr("style", $("#style").val()), 
                $(img).add(preview).attr("dir", $("#dir").val()), $(img).add(preview).css("float", ""), 
                "center" == (v = $("#align").val()) ? ($(img).add(preview).css({
                    display: "block",
                    "margin-left": "auto",
                    "margin-right": "auto"
                }), $(img).add(preview).css({
                    float: "",
                    "vertical-align": ""
                }), $("#clear").attr("disabled", !0).trigger("datalist:disabled", !0), 
                $("#margin_left, #margin_right").val("auto")) : (/(top|middle|bottom)/.test(v) && $(img).add(preview).css("vertical-align", v), 
                $(img).add(preview).css("float", v).css("display", function() {
                    return "block" === this.style.display && "auto" === this.style.marginLeft && "auto" === this.style.marginRight ? "" : this.style.display;
                }), $("#margin_left, #margin_right").val(function() {
                    return "auto" === this.value ? "" : this.value;
                }), $("#margin_check").is(":checked") && $("#margin_top").siblings('input[type="text"]').val($("#margin_top").val()), 
                $("#clear").attr("disabled", !v).trigger("datalist:disabled", !v)), 
                (v = $("#clear:enabled").val()) ? ($("#sample-br").get(0) || $(img).add(preview).after('<br id="sample-br" />'), 
                $("#sample-br").css("clear", v)) : $("#sample-br").remove(), $.each([ "width", "color", "style" ], function(i, k) {
                    "inherit" == (v = $("#border").is(":checked") ? $("#border_" + k).val() : "") && (v = ""), 
                    "width" == k && /[^a-z]/i.test(v) && (v += "px"), "color" == k && "#" !== v.charAt(0) && (v = "#" + v), 
                    $(img).add(preview).css("border-" + k, v);
                }), $.each([ "top", "right", "bottom", "left" ], function(i, k) {
                    (v = $("#margin_" + k).val()) && !/[a-z%]/i.test(v) && (v += "px"), 
                    $(img).add(preview).css("margin-" + k, v);
                }), ed.dom.parseStyle($(img).attr("style")));
                for (k in n = [ "width", "style", "color", "image" ], s = [], $.each(n, function(i, k) {
                    "none" == (v = styles[k = "border-" + k]) ? delete styles[k] : v && (s.push(styles[k]), 
                    delete styles[k]);
                }), s.length && (styles.border = s.join(" ")), styles) (0 <= k.indexOf("-moz-") || 0 <= k.indexOf("-webkit-")) && delete styles[k];
                $("#style").val(ed.dom.serializeStyle(styles));
            },
            setDefaults: function(s) {
                var n, v, $elm, x = 0;
                for (n in s) n && ("default" === (v = s[n]) && (v = ""), ($elm = $("#" + (n = "direction" === n ? "dir" : n))).length ? $elm.is(":checkbox") ? $("#" + n).prop("checked", parseFloat(v)) : ($("#" + n).val(v), 
                "string" == typeof v && "#" === v.charAt(0) && $("#" + n).trigger("change")) : ($elm = $(".uk-repeatable", "#custom_attributes"), 
                0 < x && $elm.eq(0).clone(!0).appendTo($elm.parent()), ($elm = $elm.eq(x).find("input, select")).eq(0).val(n), 
                $elm.eq(1).val(v), x++));
            }
        });
    }(jQuery), function($, Wf) {
        function escapeRegex(s) {
            return s.replace(/[.*+?^${}()|[\]\\]/g, "\\$&");
        }
        function Tree(element, options) {
            this.element = element, this.options = $.extend({
                collapseTree: !1,
                charLength: !1
            }, options), this._init();
        }
        var scrollEvents = "click.scroll mousedown.scroll wheel.scroll mousewheel.scroll keyup.scroll touchmove.scroll";
        Tree.prototype = {
            _trigger: function(ev, args) {
                $(this.element).trigger("tree:" + ev, args);
            },
            _init: function() {
                var self = this;
                this.element && (this._trigger("init", function() {
                    self.nodeEvents();
                }), $(this.element).on(scrollEvents, function() {
                    $(this).stop();
                }));
            },
            nodeEvents: function(parent) {
                var self = this;
                parent = parent || this.element, $("ul:first", parent).attr({
                    role: "tree"
                }).addClass("uk-tree").children("li").attr("aria-level", 1), $(".uk-tree", parent).on("click", function(e) {
                    var n = e.target, p = $(n).parents("li").get(0);
                    e.preventDefault(), e.stopPropagation(), $(n).hasClass("uk-icon") && (n = n.parentNode), 
                    $(n).hasClass("uk-tree-toggle") ? self.toggleNode(e, p) : self._trigger("nodeclick", [ e, p ]), 
                    $(self.element).find(".uk-tree-active").removeClass("uk-tree-active"), 
                    $(p).addClass("uk-tree-active");
                }), $("li", parent).attr({
                    role: "treeitem"
                }).attr("aria-expanded", function() {
                    return !!$(this).hasClass("uk-tree-open");
                }).attr("aria-level", function(i, v) {
                    if (!v) return parseFloat($(this.parentNode.parentNode).attr("aria-level")) + 1;
                }), $("li", parent).find(".uk-tree-row").attr("role", "presentation").prepend('<span class="uk-tree-toggle" role="presentation"><i class="uk-icon uk-icon-caret-right"></i><i class="uk-icon uk-icon-caret-down"></i></span>'), 
                $("li", parent).not(".uk-tree-root").find(".uk-tree-icon").attr("role", "presentation").append('<i class="uk-icon uk-icon-folder"></i><i class="uk-icon uk-icon-folder-open"></i>');
            },
            _hasNodes: function(parent) {
                "string" == $.type(parent) && (parent = this._findParent(parent));
                parent = $("li", parent);
                return 1 < parent.length || 1 == parent.length && !$(parent).is(":empty");
            },
            _isNode: function(id, parent) {
                return !!this._findNode(id, parent).length;
            },
            _getNode: function(parent) {
                return "string" === $.type(parent) && (parent = this._findParent(parent)), 
                $(".uk-tree-node", parent);
            },
            _resetNodes: function() {
                $("li", this.element).removeClass("uk-tree-open");
            },
            renameNode: function(id, name) {
                var parent = Wf.String.dirname(id), parent = this._findNode(id, parent);
                $(parent).attr("data-id", name), $("a:first .uk-tree-text", parent).text(Wf.String.basename(name)), 
                $('li[data-id^="' + this._escape(encodeURI(id)) + '"]', parent).each(function(n) {
                    var nt = $(n).attr("data-id");
                    $(n).attr("data-id", nt.replace(id, name));
                });
            },
            removeNode: function(id) {
                var parent = Wf.String.dirname(id), id = this._findNode(id, parent), parent = $(id).parent("ul");
                $(id).remove(), parent && !this._hasNodes(parent) && $(parent).remove();
            },
            sortNodes: function(parent) {
                var p = $(parent).parent(), list = (parent = $(parent).detach(), 
                $("li", parent).map(function() {
                    return {
                        value: $(".uk-tree-text", this).attr("title"),
                        element: this
                    };
                }).get());
                list.sort(function(a, b) {
                    a = a.value || "", b = b.value || "";
                    return a.localeCompare(b);
                }), $.each(list, function(i, item) {
                    $(parent).append(item.element);
                }), $(p).append(parent);
            },
            createNode: function(nodes, parent, sortNodes) {
                var ul, self = this;
                nodes.length && (parent = parent || Wf.String.dirname($(nodes[0]).attr("data-id") || $(nodes[0]).attr("id")), 
                "string" == $.type(parent) && (parent = this._findParent(parent)), 
                nodes = $.grep(nodes, function(node) {
                    return 0 === self._findNode(node.id, parent).length;
                }), $(this.element).find(".uk-tree-active").removeClass("uk-tree-active"), 
                nodes && nodes.length ? ((ul = $(".uk-tree-node:first", parent) || null).length || (ul = document.createElement("ul"), 
                $(ul).attr({
                    role: "group"
                }).addClass("uk-tree-node").append('<li role="treeitem" aria-expanded="false"></li>'), 
                $(parent).append(ul)), $.each(nodes, function(i, node) {
                    var name, title, url, html;
                    self._isNode(node.id, parent) ? self.toggleNodeState(parent, 1) : (title = node.name || node.id, 
                    name = Wf.String.decode(title), title = Wf.String.encode(title), 
                    url = node.url || "#", node.class || (node.class = "folder"), 
                    html = '<li data-id="' + self._escape(encodeURI(node.id)) + '" class="' + node.class + '" role="treeitem" aria-level="' + parseFloat($(parent).attr("aria-level")) + '1" aria-label="' + title + '">', 
                    html += '<div class="uk-tree-row">', 0 <= node.class.indexOf("folder") && (html += '<span class="uk-tree-toggle" role="presentation"> <i class="uk-icon uk-icon-caret-right"></i> <i class="uk-icon uk-icon-caret-down"></i></span>'), 
                    html += '<a href="' + url + '" title="' + title + '"><span class="uk-tree-icon">', 
                    0 <= node.class.indexOf("folder") ? html += '<i role="presentation" class="uk-icon uk-icon-folder"></i><i role="presentation" class="uk-icon uk-icon-folder-open"></i>' : html += '<i role="presentation" class="uk-icon uk-icon-file-text"></i>', 
                    html = html + '</span><span class="uk-tree-text uk-margin-small-left uk-text-truncate" title="' + title + '">' + name + "</span></a></div></li>", 
                    $(ul).append(html), self.toggleNodeState(parent, 1), self._trigger("nodecreate"));
                }), !1 !== sortNodes && 1 < $(ul).children().length && self.sortNodes(ul)) : this.toggleNodeState(parent, 1));
            },
            _findParent: function(el) {
                return "string" === $.type(el) ? (el = escapeRegex(el), $('li[data-id="' + el + '"]:first', this.element)) : $(el).parents("li:first");
            },
            _findNode: function(id, parent) {
                return parent && "/" !== parent || (parent = this.element), "string" === $.type(parent) && (parent = this._findParent(parent)), 
                id = escapeRegex(id = id.replace(/^\/|\/$/, "")), $(parent).find('li[data-id="' + id + '"]:first');
            },
            toggleLoader: function(node) {
                $(node).toggleClass("uk-tree-loading");
            },
            _collapseNodes: function(ex) {
                var self = this, parent = (ex || this._resetNodes(), $(ex).parent());
                $("li", parent).each(function(i, el) {
                    el !== ex && $(el).parent() !== parent && (self.toggleNodeState(el, 0), 
                    el = self._getNode(el), $(el).addClass("uk-tree-hide"));
                });
            },
            toggleNodeState: function(node, state) {
                state ? $(node).addClass("uk-tree-open").attr("aria-expanded", !0) : $(node).removeClass("uk-tree-open").attr("aria-expanded", !1), 
                state && !$(node).hasClass("uk-tree-root") && (state = $(".uk-tree-node", node), 
                $(node).hasClass("uk-tree-open") ? $(state).removeClass("uk-tree-hide") : $(state).addClass("uk-tree-hide"));
            },
            toggleNode: function(e, node) {
                if (e.shiftKey) return this._trigger("nodeload", node);
                e = this._getNode(node);
                e.length ? ($(e).toggleClass("uk-tree-hide"), this.toggleNodeState(node, !$(e).hasClass("uk-tree-hide"))) : $(node).hasClass("uk-tree-open") ? this.toggleNodeState(node, 0) : this._trigger("nodeload", node), 
                this.options.collapseTree && this._collapseNodes(node);
            },
            refreshNode: function(node) {
                node = this._findParent(node);
                return this._trigger("nodeload", node);
            },
            _escape: function(s) {
                return s.replace(/'/g, "%27");
            },
            scrollTo: function(id) {
                var padding, top, el = this.element, id = this._findNode(id);
                $(id).length && (padding = parseInt($(id).css("padding-left"), 10) + parseInt($(this.element).css("padding-left"), 10), 
                padding = $(id).get(0).offsetLeft - padding, top = $(id).get(0).offsetTop - ($(".uk-tree-row", id).outerHeight() + 2), 
                $(el).find(".uk-tree-active").removeClass("uk-tree-active"), $(el).animate({
                    scrollLeft: Math.round(padding)
                }, 500).animate({
                    scrollTop: Math.round(top)
                }, 1500, function() {
                    $(this).off(scrollEvents);
                }), $(id).addClass("uk-tree-active"));
            }
        }, $.fn.tree = function(options) {
            var inst = new Tree(this, options);
            return $(this).on("tree:createnode", function(e, node, parent, sortNodes) {
                inst.createNode(node = "string" == typeof node ? [ node ] : node, parent, sortNodes);
            }), $(this).on("tree:removenode", function(e, node) {
                inst.removeNode(node);
            }), $(this).on("tree:renamenode", function(e, node, name) {
                inst.renameNode(node, name);
            }), $(this).on("tree:togglenode", function(e, ev, node) {
                inst.toggleNode(ev, node);
            }), $(this).on("tree:togglenodestate", function(e, node, state) {
                inst.toggleNodeState(node, state);
            }), $(this).on("tree:toggleloader", function(e, node) {
                inst.toggleLoader(node);
            }), $(this).on("tree:refreshnode", function(e, node) {
                inst.refreshNode(node);
            }), $(this).on("tree:scroll", function(e, id) {
                inst.scrollTo(id);
            }), $(this).on("tree:init", function(e) {
                inst.nodeEvents();
            }), this;
        };
    }(jQuery, Wf);
    window.WFExtensions = {
        types: {},
        add: function(n, o) {
            return this[n] = o, this[n];
        },
        addType: function(n) {
            this.types[n] = {};
        },
        addExtension: function(type, n, o) {
            void 0 === this.types[type] && this.addType(type), this.types[type][n] = o;
        },
        getType: function(type) {
            return this.types[type] || !1;
        },
        getExtension: function(type, ext) {
            return this.getType(type)[ext];
        }
    };
    var ColorPicker, WFAggregator = WFExtensions.add("Aggregator", {
        aggregators: {},
        add: function(name, o) {
            this.aggregators[name] = o || {};
        },
        get: function(name) {
            return this.aggregators[name] || null;
        },
        setup: function(options) {
            var self = this;
            options = options || {}, tinymce.each(this.aggregators, function(o, k) {
                return self.setParams(o, options), self._call(o, "setup");
            });
        },
        getTitle: function(name) {
            var f = this.get(name);
            return f ? f.title : name;
        },
        getType: function(name) {
            name = this.get(name);
            return name ? name.getType() : "";
        },
        getValues: function(name, data) {
            name = this.get(name);
            if (name) return this._call(name, "getValues", data);
        },
        setValues: function(name, data) {
            name = this.get(name);
            if (name) return this._call(name, "setValues", data);
        },
        getAttributes: function(name, args) {
            name = this.get(name);
            if (name) return this._call(name, "getAttributes", args);
        },
        setAttributes: function(name, args, callback) {
            var name = this.get(name);
            if (name) return name = this._call(name, "setAttributes", args), "function" == typeof callback && callback(name), 
            name;
        },
        isSupported: function(args) {
            var r, v, self = this;
            return tinymce.each(this.aggregators, function(o) {
                (v = self._call(o, "isSupported", args)) && (r = v);
            }), r;
        },
        getParam: function(name, param) {
            name = this.get(name);
            return name && name.params[param] || "";
        },
        setParams: function(name, o) {
            name = this.get(name);
            name && tinymce.extend(name.params, o);
        },
        onSelectFile: function(name) {
            name = this.get(name);
            if (name) return this._call(name, "onSelectFile");
        },
        onInsert: function(name) {
            name = this.get(name);
            if (name) return this._call(name, "onInsert");
        },
        _call: function(o, fn, vars) {
            return (o[fn] || function() {}).call(o, vars);
        }
    }), WFAggregator = (window.WFAggregator = WFAggregator, WFExtensions.add("Popups", {
        popups: {},
        popup: "",
        config: {},
        addPopup: function(n, o) {
            this.popups[n] = o, WFExtensions.addExtension("popups", n, o);
        },
        getPopups: function() {
            return this.popups;
        },
        setup: function(options) {
            var n, state, self = this, ed = tinyMCEPopup.editor, s = ed.selection;
            options = $.extend({
                remove: $.noop,
                change: $.noop
            }, options || {}), $("#popup_list").on("change", function() {
                self.selectPopup(this.value), options.change(this.value);
            }).on("popup:remove", function(e, n) {
                options.remove(n);
            }).trigger("change"), s.isCollapsed() || (n = s.getNode(), state = !0, 
            s = s.getContent({
                format: "text"
            }), function(state, v) {
                state && v ? ($("#popup_text").val(v), $("#popup_text").attr("disabled", !1)) : ($("#popup_text").val(tinyMCEPopup.getLang("dlg.element_selection", "Element Selection")), 
                $("#popup_text").attr("disabled", !0), $("#popup_text").addClass("disabled"));
            }(state = n ? 1 == (n = tinymce.grep(n.childNodes, function(node) {
                return 0 == ed.dom.is(node, "br[data-mce-bogus]");
            })).length && 3 == n[0].nodeType : state, s)), $.each(this.popups, function(k, v) {
                self._call("setup", "", v);
            });
        },
        isPopup: function(n, v) {
            return n && "A" == n.nodeName && this._call("check", n, v);
        },
        getPopup: function(n, callback, index) {
            var self = this, ed = tinyMCEPopup.editor;
            return "A" != n.nodeName && (n = ed.dom.getParent(n, "a")), $.each(this.popups, function(k, v) {
                self.isPopup(n, k) && (self.popup = k);
            }), n && this.popup ? (this.selectPopup(this.popup), this.getAttributes(n, index, callback)) : "";
        },
        setPopup: function(s) {
            this.popup = s;
        },
        setConfig: function(config) {
            $.extend(this.config, config);
        },
        setParams: function(n, p) {
            n = this.popups[n];
            n && (void 0 === n.params && (n.params = {}), $.extend(n.params, p));
        },
        getParams: function(n) {
            return this.popups[n].params || {};
        },
        getParam: function(n, p) {
            return this.getParams(n)[p] || null;
        },
        selectPopup: function(v) {
            this.popup = v, $("#popup_list").val(v).children("option").each(function() {
                this.value && $("#popup_extension_" + this.value).hide();
            }), v && ($("#popup_extension_" + v).show(), this._call("onSelect", [], v));
        },
        setAttributes: function(n, args, index) {
            var ed = tinyMCEPopup.editor;
            return this.config.map && $.each(this.config.map, function(to, from) {
                var v = args[from] || $("#" + from).val();
                ed.dom.setAttrib(n, to, v), delete args[from];
            }), this._call("setAttributes", [ n, args, index ]);
        },
        getAttributes: function(n, callback, index) {
            var data, ed = tinyMCEPopup.editor;
            return callback = callback || function(val) {
                return val;
            }, index = index || 0, data = (n = !n && "A" == n.nodeName ? n : ed.dom.getParent(n, "a")) && this.isPopup(n) ? this._call("getAttributes", [ n, index, callback ]) : data;
        },
        isEnabled: function() {
            return this.popup;
        },
        createPopup: function(n, args, index) {
            var se, self = this, ed = tinyMCEPopup.editor;
            args = args || {}, this.isEnabled() ? n && ("A" == n.nodeName || ed.dom.getParent(n, "A")) ? ("A" != n.nodeName && (n = ed.dom.getParent(n, "A")), 
            this.removePopups(n, !0), this.setAttributes(n, args, index)) : ((se = ed.selection).isCollapsed() ? ed.execCommand("mceInsertContent", !1, '<a href="#" id="__mce_tmp">' + $("#popup_text").val() + "</a>", {
                skip_undo: 1
            }) : (n = n || se.getNode(), ed.execCommand("mceInsertLink", !1, {
                href: "#",
                id: "__mce_tmp"
            }, {
                skip_undo: 1
            }), ed.dom.setAttrib(n, "style", ed.dom.getAttrib(n, "data-mce-style"))), 
            (n = ed.dom.get("__mce_tmp")) && (ed.dom.setAttrib(n, "id", null), self.setAttributes(n, args, index))) : (n = ed.dom.getParent(n, "A"), 
            $.each(this.popups, function(k, v) {
                if (self.isPopup(n, k)) return self.removePopups(n), !1;
            }));
        },
        removePopups: function(n, no_event) {
            var self = this;
            $.each(this.popups, function(k, v) {
                self._call("remove", n, k);
            }), no_event || $("#popup_list").trigger("popup:remove", n);
        },
        onSelectFile: function(args) {
            this._call("onSelectFile", args);
        },
        _call: function(fn, args, popup) {
            return "function" == typeof (fn = (popup = "string" == typeof (popup = popup || this.popup) ? this.popups[popup] || {} : popup)[fn]) && ("array" === $.type(args) ? fn.apply(popup, args) : fn.call(popup, args));
        }
    }));
    window.WFPopups = WFAggregator;
}();js/legacy.min.js000060400000002506152456167170007561 0ustar00(function($, Wf) {
    $.Plugin = Wf;
    $.String = Wf.String;
    $.Cookie = Wf.Cookie;
    $.URL = Wf.URL;
    $.JSON = Wf.JSON;
    $.Dialog = Wf.Modal;
})(jQuery, Wf);

var WFMediaPlayer = WFExtensions.add('MediaPlayer', {
    /**
     * Parameter Object
     */
    params: {
        extensions: 'flv,f4v',
        dimensions: {},
        path: ''
    },

    type: 'flash',

    init: function(o) {
        tinymce.extend(this, o);

        // return the MediaPlayer object
        return this;
    },

    setup: function() {},

    getTitle: function() {
        return this.title || this.name;
    },

    getType: function() {
        return this.type;
    },

    /**
     * Check whether a media type is supported
     */
    isSupported: function() {
        return false;
    },

    /**
     * Return a player parameter value
     * @param {String} Parameter
     */
    getParam: function(param) {
        return this.params[param] || '';
    },

    /**
     * Set Player Parameters
     * @param {Object} o Parameter Object
     */
    setParams: function(o) {
        tinymce.extend(this.params, o);
    },

    /**
     * Return the player path
     */
    getPath: function() {
        return this.getParam('path');
    },

    onSelectFile: function(file) {},

    onInsert: function() {},

    onChangeType: function() {}

});js/window.min.js000060400000020745152456167170007631 0ustar00/**
 * @package   	JCE
 * @copyright 	Copyright (c) 2009-2024 Ryan Demmer. All rights reserved.
 * @license   	GNU/GPL 2 or later - http://www.gnu.org/licenses/old-licenses/gpl-2.0.html
 * JCE is free software. This version may have been modified pursuant
 * to the GNU General Public License, and as distributed it includes or
 * is derivative of works licensed under the GNU General Public License or
 * other free or open source software licenses.
 */

/* global jQuery */

(function () {

    var tinymce = {
        settings: {
            language: "en",
            document_base_url: ""
        },

        i18n: {},

        /**
         * Adds a language pack
         *
         * @method addI18n
         * @param {String} p Prefix for the language items. For example en.myplugin
         * @param {Object} o Name/Value collection with items to add to the language group.
         * @source TinyMCE EditorManager.js
         * @copyright Copyright 2009, Moxiecode Systems AB
         * @licence GNU / LGPL 2 - http://www.gnu.org/copyleft/lesser.html
         *
         * Modified for JQuery
         */
        addI18n: function (p, o) {
            var i18n = this.i18n;

            function hasOwn(obj, prop) {
                return Object.prototype.hasOwnProperty.call(obj, prop);
            }

            function setProps(prefix, obj) {
                for (var key in obj) {
                    if (hasOwn(obj, key)) {
                        i18n[prefix + '.' + key] = obj[key];
                    }
                }
            }

            if (typeof p === 'string') {
                setProps(p, o);
            } else {
                for (var lc in p) {
                    if (hasOwn(p, lc)) {
                        var groupObj = p[lc];
                        for (var g in groupObj) {
                            if (hasOwn(groupObj, g)) {
                                var keyObj = groupObj[g];
                                for (var k in keyObj) {
                                    if (hasOwn(keyObj, k)) {
                                        var path = (g === 'common')
                                            ? lc + '.' + k
                                            : lc + '.' + g + '.' + k;
                                        i18n[path] = keyObj[k];
                                    }
                                }
                            }
                        }
                    }
                }
            }
        },

        getLang: function (n, dv) {
            return this.i18n[this.settings.language + '.' + n] || dv;
        },

        convertURL: function (src) {
            return src;
        },

        documentBaseURI: {
            toAbsolute: function (url) {
                if (/:\/\//.test(url)) {
                    return url;
                }

                // remove leading slash
                url = url.replace(/^\//, '');

                var root = tinymce.settings.document_base_url;

                // remove trailing slash
                root = root.replace(/\/$/, '');

                // join and return
                return root + '/' + url;
            },

            toRelative: function (url) {
                if (/:\/\//.test(url)) {
                    var base = tinymce.settings.document_base_url;
                    return url.replace(new RegExp('^' + base), '');
                }

                return url;
            }
        },

        windowManager: {
            params: {
                window: window.parent,
                callback: function (selected, data) {
                    var win = window.parent,
                        values = data[0],
                        url = values.url;

                    var elm = win.document.getElementById(tinymce.settings.element);

                    // Find closest .field-media-wrapper parent
                    var wrapper = elm;

                    while (wrapper && wrapper !== win.document) {
                        if (wrapper.classList && wrapper.classList.contains('field-media-wrapper')) {
                            break;
                        }
                        wrapper = wrapper.parentNode;
                    }

                    var inst = null;

                    if (wrapper) {
                        // Try dataset first
                        inst = wrapper.dataset && wrapper.dataset.fieldMedia;

                        // If dataset value is a reference to a global object, resolve it
                        if (inst && typeof win[inst] === 'object') {
                            inst = win[inst];
                        } else {
                            // Fall back to using the wrapper directly
                            inst = wrapper;
                        }
                    }

                    if (inst && typeof inst.setValue === 'function') {
                        return inst.setValue(url, values);
                    }

                    // Fallback: set value and trigger change
                    elm.value = url;

                    var event = win.document.createEvent('Event');
                    event.initEvent('change', true, true);
                    elm.dispatchEvent(event);
                }

            },

            // Open a modal window . This is only used from inside an existing modal, eg: Help or Image Editor
            open: function (args, params) {
                args.url += '&' + tinymce.settings.token + '=1&standalone=1';

                // Create wrapper div
                var div = document.createElement('div');
                div.className = 'uk-inline-help uk-modal';

                // Create HTML structure
                var html = ''
                    + '<div class="uk-modal-dialog uk-modal-dialog-blank">'
                    + '  <button class="uk-modal-close uk-close"></button>'
                    + '  <div class="uk-modal-header"><h3><strong>' + (args.title || '') + '</strong></h3></div>'
                    + '  <iframe src="' + args.url + '" frameborder="0"></iframe>'
                    + '</div>';

                // Set innerHTML
                div.innerHTML = html;

                // Handle close button click
                var closeBtn = div.querySelector('.uk-close');

                if (closeBtn) {
                    closeBtn.addEventListener('click', function (e) {
                        e.preventDefault();
                        div.classList.remove('uk-open');

                        // Delay removal to mimic animation delay
                        setTimeout(function () {
                            if (div.parentNode) {
                                div.parentNode.removeChild(div);
                            }
                        }, 150);
                    });
                }

                // Append to body and show
                document.body.appendChild(div);
                div.classList.add('uk-open');
                div.style.display = 'block';

                // Store params
                tinymce.windowManager.params = params;
            },

            // Close a modal window opened using a Joomla Modal method.
            close: function () {
                var win = window.parent;
            
                // Joomla 4+ modal
                if (win.Joomla && win.Joomla.Modal && typeof win.Joomla.Modal.getCurrent === 'function') {
                    var current = win.Joomla.Modal.getCurrent();
                    if (current && typeof current.close === 'function') {
                        return current.close();
                    }
                }
            
                // Legacy modal handlers
                if (typeof win.jModalClose === 'function') {
                    win.jModalClose();
                }
            
                if (win.SqueezeBox && typeof win.SqueezeBox.close === 'function') {
                    win.SqueezeBox.close();
                }
            
                // Joomla 3.5.x / 4.x Media Field modal fallback
                var modals = win.document.querySelectorAll('.modal.in [data-dismiss]');

                for (var i = 0; i < modals.length; i++) {
                    var event = win.document.createEvent('Event');
                    event.initEvent('click', true, true);
                    modals[i].dispatchEvent(event);
                }
            }
            
        },

        getParam: function (n, dv) {
            var v = this.settings[n];
            return (typeof v !== "undefined") ? v : dv;
        }
    };

    window.tinyMCE = window.tinymce = tinymce;
})();vendor/uikit/uikit.min.css000060400000360505152456167170011632 0ustar00progress,sub,sup{vertical-align:baseline}.uk-grid-match>*>*,[class*=uk-grid-width]>*{width:100%;box-sizing:border-box}.uk-panel,sub,sup{position:relative}html{font:400 13px/20px "Helvetica Neue",Helvetica,Arial,sans-serif;-webkit-text-size-adjust:100%;-ms-text-size-adjust:100%;background:#fff;color:#444}body{margin:0}a{background:0 0}a:active,a:hover{outline:0}.uk-link,a{color:#337ab7;text-decoration:none;cursor:pointer}.uk-link:hover,a:hover{color:#23527c;text-decoration:underline}.uk-article-title a,.uk-nav li>a,.uk-navbar-nav>li>a,.uk-panel,.uk-panel:hover,ins{text-decoration:none}abbr[title]{border-bottom:1px dotted}b,strong{font-weight:700}:not(pre)>code,:not(pre)>kbd,:not(pre)>samp{font-size:11px;font-family:Consolas,monospace,serif;color:#c7254e;white-space:nowrap;padding:0 4px;border:1px solid #ddd;border-radius:3px;background:#fafafa}.uk-navbar-nav>li>a,h1,h2,h3,h4,h5,h6{font-family:"Helvetica Neue",Helvetica,Arial,sans-serif}em,h1,h2,h3,h4,h5,h6,ins,mark,pre{color:#444}hr,img{border:0}ins{background:#ffa}mark{background:#fcf8e1}q{font-style:italic}small{font-size:80%}sub,sup{font-size:75%;line-height:0}.uk-article-title,.uk-h1,h1{font-size:34px;line-height:39px}sup{top:-.5em}sub{bottom:-.25em}audio,canvas,iframe,img,svg,video{vertical-align:middle}audio,canvas,img,svg,video{max-width:100%;height:auto;box-sizing:border-box}.uk-img-preserve,.uk-img-preserve audio,.uk-img-preserve canvas,.uk-img-preserve img,.uk-img-preserve svg,.uk-img-preserve video{max-width:none}svg:not(:root){overflow:hidden}address,blockquote,dl,fieldset,figure,ol,p,pre,ul{margin:0 0 15px}*+address,*+blockquote,*+dl,*+fieldset,*+figure,*+ol,*+p,*+pre,*+ul{margin-top:15px}h1,h2,h3,h4,h5,h6{margin:0 0 15px;font-weight:400;text-transform:none}*+h1,*+h2,*+h3,*+h4,*+h5,*+h6{margin-top:25px}.uk-h2,h2{font-size:23px;line-height:29px}.uk-h3,h3{font-size:17px;line-height:22px}.uk-h4,h4{font-size:15px;line-height:20px}.uk-h5,h5{font-size:13px;line-height:20px}.uk-h6,h6{font-size:11px;line-height:16px}ol,ul{padding-left:30px}ol>li>ol,ol>li>ul,ul>li>ol,ul>li>ul{margin:0}dt{font-weight:700}dd{margin-left:0}hr{box-sizing:content-box;height:0;margin:15px 0;border-top:1px solid #ddd}.uk-article>:last-child,.uk-block>:last-child,.uk-grid>*>:last-child,.uk-panel>:not(.uk-panel-title):last-child{margin-bottom:0}address{font-style:normal}blockquote{padding-left:15px;border-left:5px solid #ddd;font-size:15px;line-height:20px;font-style:italic}pre{padding:10px;background:#fafafa;font:11px/16px Consolas,monospace,serif;-moz-tab-size:4;tab-size:4;overflow:auto;border:1px solid #ddd;border-radius:3px}::-moz-selection{background:#337ab7;color:#fff;text-shadow:none}::selection{background:#337ab7;color:#fff;text-shadow:none}article,aside,details,figcaption,figure,footer,header,main,nav,section,summary{display:block}[hidden],audio:not([controls]),template{display:none}iframe{border:0}@media screen and (max-width:400px){@-ms-viewport{width:device-width}}.uk-grid{display:-ms-flexbox;display:-webkit-flex;display:flex;-ms-flex-wrap:wrap;-webkit-flex-wrap:wrap;flex-wrap:wrap;margin:0;padding:0;list-style:none}.uk-grid:after,.uk-grid:before{content:"";display:block;overflow:hidden}.uk-grid:after{clear:both}.uk-grid>*{-ms-flex:none;-webkit-flex:none;flex:none;margin:0;float:left;padding-left:25px}.uk-grid{margin-left:-25px}.uk-grid+.uk-grid,.uk-grid-margin,.uk-grid>*>.uk-panel+.uk-panel{margin-top:25px}@media (min-width:1220px){.uk-grid{margin-left:-35px}.uk-grid>*{padding-left:35px}.uk-grid+.uk-grid,.uk-grid-margin,.uk-grid>*>.uk-panel+.uk-panel{margin-top:35px}}.uk-grid-collapse{margin-left:0}.uk-grid-collapse>*{padding-left:0}.uk-grid-collapse+.uk-grid-collapse,.uk-grid-collapse>*>.uk-panel+.uk-panel,.uk-grid-collapse>.uk-grid-margin{margin-top:0}.uk-grid-small{margin-left:-10px}.uk-grid-small>*{padding-left:10px}.uk-grid-small+.uk-grid-small,.uk-grid-small>*>.uk-panel+.uk-panel,.uk-grid-small>.uk-grid-margin{margin-top:10px}.uk-grid-medium{margin-left:-25px}.uk-grid-medium>*{padding-left:25px}.uk-grid-medium+.uk-grid-medium,.uk-grid-medium>*>.uk-panel+.uk-panel,.uk-grid-medium>.uk-grid-margin{margin-top:25px}@media (min-width:960px){.uk-grid-large{margin-left:-35px}.uk-grid-large>*{padding-left:35px}.uk-grid-large+.uk-grid-large,.uk-grid-large-margin,.uk-grid-large>*>.uk-panel+.uk-panel{margin-top:35px}}@media (min-width:1220px){.uk-grid-large{margin-left:-50px}.uk-grid-large>*{padding-left:50px}.uk-grid-large+.uk-grid-large,.uk-grid-large-margin,.uk-grid-large>*>.uk-panel+.uk-panel{margin-top:50px}}.uk-grid-divider:not(:empty){margin-left:-25px;margin-right:-25px}.uk-grid-divider>*{padding-left:25px;padding-right:25px}.uk-grid-divider>[class*=uk-width-9-]:nth-child(n+2),.uk-grid-divider>[class*=uk-width-1-]:not(.uk-width-1-1):nth-child(n+2),.uk-grid-divider>[class*=uk-width-2-]:nth-child(n+2),.uk-grid-divider>[class*=uk-width-3-]:nth-child(n+2),.uk-grid-divider>[class*=uk-width-4-]:nth-child(n+2),.uk-grid-divider>[class*=uk-width-5-]:nth-child(n+2),.uk-grid-divider>[class*=uk-width-6-]:nth-child(n+2),.uk-grid-divider>[class*=uk-width-7-]:nth-child(n+2),.uk-grid-divider>[class*=uk-width-8-]:nth-child(n+2){border-left:1px solid #ddd}@media (min-width:768px){.uk-grid-divider>[class*=uk-width-medium-]:not(.uk-width-medium-1-1):nth-child(n+2){border-left:1px solid #ddd}}@media (min-width:960px){.uk-grid-divider>[class*=uk-width-large-]:not(.uk-width-large-1-1):nth-child(n+2){border-left:1px solid #ddd}}@media (min-width:1220px){.uk-grid-divider:not(:empty){margin-left:-35px;margin-right:-35px}.uk-grid-divider>*{padding-left:35px;padding-right:35px}.uk-grid-divider:empty{margin-top:35px;margin-bottom:35px}}.uk-grid-divider:empty{margin-top:25px;margin-bottom:25px;border-top:1px solid #ddd}.uk-grid-match>*{display:-ms-flexbox;display:-webkit-flex;display:flex;-ms-flex-wrap:wrap;-webkit-flex-wrap:wrap;flex-wrap:wrap}.uk-grid-match>*>*{-ms-flex:none;-webkit-flex:none;flex:none}.uk-grid-width-1-2>*{width:50%}.uk-grid-width-1-3>*{width:33.333%}.uk-grid-width-1-4>*{width:25%}.uk-grid-width-1-5>*{width:20%}.uk-grid-width-1-6>*{width:16.666%}.uk-grid-width-1-10>*{width:10%}.uk-grid-width-auto>*{width:auto}@media (min-width:480px){.uk-grid-width-small-1-1>*{width:100%}.uk-grid-width-small-1-2>*{width:50%}.uk-grid-width-small-1-3>*{width:33.333%}.uk-grid-width-small-1-4>*{width:25%}.uk-grid-width-small-1-5>*{width:20%}.uk-grid-width-small-1-6>*{width:16.666%}.uk-grid-width-small-1-10>*{width:10%}}@media (min-width:768px){.uk-grid-width-medium-1-1>*{width:100%}.uk-grid-width-medium-1-2>*{width:50%}.uk-grid-width-medium-1-3>*{width:33.333%}.uk-grid-width-medium-1-4>*{width:25%}.uk-grid-width-medium-1-5>*{width:20%}.uk-grid-width-medium-1-6>*{width:16.666%}.uk-grid-width-medium-1-10>*{width:10%}}@media (min-width:960px){.uk-grid-width-large-1-1>*{width:100%}.uk-grid-width-large-1-2>*{width:50%}.uk-grid-width-large-1-3>*{width:33.333%}.uk-grid-width-large-1-4>*{width:25%}.uk-grid-width-large-1-5>*{width:20%}.uk-grid-width-large-1-6>*{width:16.666%}.uk-grid-width-large-1-10>*{width:10%}}@media (min-width:1220px){.uk-grid-width-xlarge-1-1>*{width:100%}.uk-grid-width-xlarge-1-2>*{width:50%}.uk-grid-width-xlarge-1-3>*{width:33.333%}.uk-grid-width-xlarge-1-4>*{width:25%}.uk-grid-width-xlarge-1-5>*{width:20%}.uk-grid-width-xlarge-1-6>*{width:16.666%}.uk-grid-width-xlarge-1-10>*{width:10%}}[class*=uk-width]{box-sizing:border-box;width:100%}.uk-width-1-1{width:100%}.uk-width-1-2,.uk-width-2-4,.uk-width-3-6,.uk-width-5-10{width:50%}.uk-width-1-3,.uk-width-2-6{width:33.333%}.uk-width-2-3,.uk-width-4-6{width:66.666%}.uk-width-1-4{width:25%}.uk-width-3-4{width:75%}.uk-width-1-5,.uk-width-2-10{width:20%}.uk-width-2-5,.uk-width-4-10{width:40%}.uk-width-3-5,.uk-width-6-10{width:60%}.uk-width-4-5,.uk-width-8-10{width:80%}.uk-width-1-6{width:16.666%}.uk-width-5-6{width:83.333%}.uk-width-1-10{width:10%}.uk-width-3-10{width:30%}.uk-width-7-10{width:70%}.uk-width-9-10{width:90%}@media (min-width:480px){.uk-width-small-1-1{width:100%}.uk-width-small-1-2,.uk-width-small-2-4,.uk-width-small-3-6,.uk-width-small-5-10{width:50%}.uk-width-small-1-3,.uk-width-small-2-6{width:33.333%}.uk-width-small-2-3,.uk-width-small-4-6{width:66.666%}.uk-width-small-1-4{width:25%}.uk-width-small-3-4{width:75%}.uk-width-small-1-5,.uk-width-small-2-10{width:20%}.uk-width-small-2-5,.uk-width-small-4-10{width:40%}.uk-width-small-3-5,.uk-width-small-6-10{width:60%}.uk-width-small-4-5,.uk-width-small-8-10{width:80%}.uk-width-small-1-6{width:16.666%}.uk-width-small-5-6{width:83.333%}.uk-width-small-1-10{width:10%}.uk-width-small-3-10{width:30%}.uk-width-small-7-10{width:70%}.uk-width-small-9-10{width:90%}}@media (min-width:768px){.uk-width-medium-1-1{width:100%}.uk-width-medium-1-2,.uk-width-medium-2-4,.uk-width-medium-3-6,.uk-width-medium-5-10{width:50%}.uk-width-medium-1-3,.uk-width-medium-2-6{width:33.333%}.uk-width-medium-2-3,.uk-width-medium-4-6{width:66.666%}.uk-width-medium-1-4{width:25%}.uk-width-medium-3-4{width:75%}.uk-width-medium-1-5,.uk-width-medium-2-10{width:20%}.uk-width-medium-2-5,.uk-width-medium-4-10{width:40%}.uk-width-medium-3-5,.uk-width-medium-6-10{width:60%}.uk-width-medium-4-5,.uk-width-medium-8-10{width:80%}.uk-width-medium-1-6{width:16.666%}.uk-width-medium-5-6{width:83.333%}.uk-width-medium-1-10{width:10%}.uk-width-medium-3-10{width:30%}.uk-width-medium-7-10{width:70%}.uk-width-medium-9-10{width:90%}}@media (min-width:960px){.uk-width-large-1-1{width:100%}.uk-width-large-1-2,.uk-width-large-2-4,.uk-width-large-3-6,.uk-width-large-5-10{width:50%}.uk-width-large-1-3,.uk-width-large-2-6{width:33.333%}.uk-width-large-2-3,.uk-width-large-4-6{width:66.666%}.uk-width-large-1-4{width:25%}.uk-width-large-3-4{width:75%}.uk-width-large-1-5,.uk-width-large-2-10{width:20%}.uk-width-large-2-5,.uk-width-large-4-10{width:40%}.uk-width-large-3-5,.uk-width-large-6-10{width:60%}.uk-width-large-4-5,.uk-width-large-8-10{width:80%}.uk-width-large-1-6{width:16.666%}.uk-width-large-5-6{width:83.333%}.uk-width-large-1-10{width:10%}.uk-width-large-3-10{width:30%}.uk-width-large-7-10{width:70%}.uk-width-large-9-10{width:90%}}@media (min-width:1220px){.uk-width-xlarge-1-1{width:100%}.uk-width-xlarge-1-2,.uk-width-xlarge-2-4,.uk-width-xlarge-3-6,.uk-width-xlarge-5-10{width:50%}.uk-width-xlarge-1-3,.uk-width-xlarge-2-6{width:33.333%}.uk-width-xlarge-2-3,.uk-width-xlarge-4-6{width:66.666%}.uk-width-xlarge-1-4{width:25%}.uk-width-xlarge-3-4{width:75%}.uk-width-xlarge-1-5,.uk-width-xlarge-2-10{width:20%}.uk-width-xlarge-2-5,.uk-width-xlarge-4-10{width:40%}.uk-width-xlarge-3-5,.uk-width-xlarge-6-10{width:60%}.uk-width-xlarge-4-5,.uk-width-xlarge-8-10{width:80%}.uk-width-xlarge-1-6{width:16.666%}.uk-width-xlarge-5-6{width:83.333%}.uk-width-xlarge-1-10{width:10%}.uk-width-xlarge-3-10{width:30%}.uk-width-xlarge-7-10{width:70%}.uk-width-xlarge-9-10{width:90%}}@media (min-width:768px){[class*=uk-push-],[class*=uk-pull-]{position:relative}.uk-push-1-2,.uk-push-2-4,.uk-push-3-6,.uk-push-5-10{left:50%}.uk-push-1-3,.uk-push-2-6{left:33.333%}.uk-push-2-3,.uk-push-4-6{left:66.666%}.uk-push-1-4{left:25%}.uk-push-3-4{left:75%}.uk-push-1-5,.uk-push-2-10{left:20%}.uk-push-2-5,.uk-push-4-10{left:40%}.uk-push-3-5,.uk-push-6-10{left:60%}.uk-push-4-5,.uk-push-8-10{left:80%}.uk-push-1-6{left:16.666%}.uk-push-5-6{left:83.333%}.uk-push-1-10{left:10%}.uk-push-3-10{left:30%}.uk-push-7-10{left:70%}.uk-push-9-10{left:90%}.uk-pull-1-2,.uk-pull-2-4,.uk-pull-3-6,.uk-pull-5-10{left:-50%}.uk-pull-1-3,.uk-pull-2-6{left:-33.333%}.uk-pull-2-3,.uk-pull-4-6{left:-66.666%}.uk-pull-1-4{left:-25%}.uk-pull-3-4{left:-75%}.uk-pull-1-5,.uk-pull-2-10{left:-20%}.uk-pull-2-5,.uk-pull-4-10{left:-40%}.uk-pull-3-5,.uk-pull-6-10{left:-60%}.uk-pull-4-5,.uk-pull-8-10{left:-80%}.uk-pull-1-6{left:-16.666%}.uk-pull-5-6{left:-83.333%}.uk-pull-1-10{left:-10%}.uk-pull-3-10{left:-30%}.uk-pull-7-10{left:-70%}.uk-pull-9-10{left:-90%}}.uk-panel{display:block}.uk-panel:after,.uk-panel:before{content:"";display:table}.uk-panel:after{clear:both}.uk-panel-teaser,.uk-panel-title{margin-bottom:15px}.uk-panel-title{margin-top:0;font-size:17px;line-height:22px;font-weight:400;text-transform:none;color:#444}.uk-panel-badge{position:absolute;top:0;right:0;z-index:1}.uk-panel-box .uk-panel-badge,.uk-panel-hover .uk-panel-badge{top:10px;right:10px}.uk-panel-body{padding:15px}.uk-panel-box{padding:15px;background:#fafafa;color:#444;border:1px solid #ddd;border-radius:2px}.uk-panel-box .uk-panel-title,.uk-panel-box-hover:hover{color:#444}.uk-panel-box>.uk-panel-teaser{margin-top:-16px;margin-left:-16px;margin-right:-16px}.uk-panel-box>.uk-nav-side{margin:0 -15px}.uk-panel-box-primary{background-color:#ebf7fd;color:#2d7091;border-color:rgba(45,112,145,.3)}.uk-panel-box-primary .uk-panel-title,.uk-panel-box-primary-hover:hover{color:#2d7091}.uk-panel-box-secondary{background-color:#fff;color:#444}.uk-panel-box-secondary .uk-panel-title,.uk-panel-box-secondary-hover:hover{color:#444}.uk-panel-hover{padding:15px;color:#444;border:1px solid transparent;border-radius:2px}.uk-panel-hover:hover{background:#fafafa;color:#444;border-color:#ddd}.uk-panel-hover>.uk-panel-teaser{margin-top:-16px;margin-left:-16px;margin-right:-16px}.uk-panel-header .uk-panel-title{padding-bottom:10px;border-bottom:1px solid #ddd;color:#444}.uk-panel-space{padding:30px}.uk-panel-space .uk-panel-badge{top:30px;right:30px}.uk-panel+.uk-panel-divider{margin-top:50px!important}.uk-panel+.uk-panel-divider:before{content:"";display:block;position:absolute;top:-25px;left:0;right:0;border-top:1px solid #ddd}.uk-article:after,.uk-article:before,.uk-block:after,.uk-block:before,.uk-comment-header:after,.uk-comment-header:before,.uk-navbar:after,.uk-navbar:before{display:table;content:""}@media (min-width:1220px){.uk-panel+.uk-panel-divider{margin-top:70px!important}.uk-panel+.uk-panel-divider:before{top:-35px}}.uk-panel-box .uk-panel-teaser{border-top-left-radius:2px;border-top-right-radius:2px;overflow:hidden;-webkit-transform:translateZ(0)}.uk-block{position:relative;box-sizing:border-box;padding-top:20px;padding-bottom:20px}@media (min-width:768px){.uk-block{padding-top:50px;padding-bottom:50px}}.uk-block:after{clear:both}.uk-block-large{padding-top:20px;padding-bottom:20px}@media (min-width:768px){.uk-block-large{padding-top:50px;padding-bottom:50px}}@media (min-width:960px){.uk-block-large{padding-top:100px;padding-bottom:100px}}.uk-block-default{background:#fff}.uk-block-muted{background:#f9f9f9}.uk-block-primary{background:#337ab7}.uk-block-secondary{background:#222}.uk-block-default+.uk-block-default,.uk-block-muted+.uk-block-muted,.uk-block-primary+.uk-block-primary,.uk-block-secondary+.uk-block-secondary{padding-top:0}.uk-article:after{clear:both}.uk-article-title{font-weight:400;text-transform:none}.uk-article-title a{color:inherit}.uk-article-meta{font-size:11px;line-height:16px;color:#999}.uk-article-lead{color:#444;font-size:17px;line-height:22px;font-weight:400}.uk-article-divider{margin-bottom:25px;border-color:#ddd}.uk-article+.uk-article,.uk-nav-dropdown .uk-nav-divider,.uk-nav-navbar .uk-nav-divider,.uk-nav-side .uk-nav-divider{border-top:1px solid #ddd}*+.uk-article-divider{margin-top:25px}.uk-article+.uk-article{margin-top:25px;padding-top:25px}.uk-comment-header{margin-bottom:15px;padding:10px;border:1px solid #ddd;border-radius:2px;background:#fafafa}.uk-comment-header:after{clear:both}.uk-comment-avatar{margin-right:15px;float:left}.uk-comment-title{margin:5px 0 0;font-size:1.14rem;line-height:1.36rem}.uk-comment-meta,.uk-text-small{font-size:.78rem;line-height:1.49rem}.uk-comment-meta{margin:2px 0 0;color:#999}.uk-comment-body{padding-left:10px;padding-right:10px}.uk-comment-body>:last-child{margin-bottom:0}.uk-comment-list{padding:0;list-style:none}.uk-comment-list .uk-comment+ul{margin:25px 0 0;list-style:none}.uk-comment-list .uk-comment+ul>li:nth-child(n+2),.uk-comment-list>li:nth-child(n+2){margin-top:25px}@media (min-width:768px){.uk-comment-list .uk-comment+ul{padding-left:100px}}.uk-comment-primary .uk-comment-header{border-color:rgba(45,112,145,.3);background-color:#d9edf7;color:#2d7091;text-shadow:0 1px 0 #fff}.uk-cover-background{background-position:50% 50%;background-size:cover;background-repeat:no-repeat}.uk-cover{overflow:hidden}.uk-cover-object{width:auto;height:auto;min-width:100%;min-height:100%;max-width:none;position:relative;left:50%;top:50%;-webkit-transform:translate(-50%,-50%);transform:translate(-50%,-50%)}[data-uk-cover]{position:relative;left:50%;top:50%;-webkit-transform:translate(-50%,-50%);transform:translate(-50%,-50%)}.uk-nav,.uk-nav ul{margin:0;padding:0;list-style:none}.uk-nav li>a{display:block}.uk-nav>li>a{padding:5px 15px}.uk-nav ul{padding-left:15px}.uk-nav ul a{padding:2px 0}.uk-nav li>a>div{font-size:11px;line-height:16px}.uk-nav-header{padding:5px 15px;text-transform:uppercase;font-weight:700;font-size:11px}.uk-nav-header:not(:first-child){margin-top:15px}.uk-nav-divider{margin:9px 15px}ul.uk-nav-sub{padding:5px 0 5px 15px}.uk-nav-parent-icon>.uk-parent>a:after{content:"\f104";width:20px;margin-right:-10px;float:right;font-family:FontAwesome;text-align:center}.uk-nav-parent-icon>.uk-parent.uk-open>a:after{content:"\f107"}.uk-nav-side>li>a{color:#444}.uk-nav-side>li>a:focus,.uk-nav-side>li>a:hover{background:rgba(0,0,0,.03);color:#444;outline:0;box-shadow:inset 0 0 1px rgba(0,0,0,.06);text-shadow:0 -1px 0 #fff}.uk-nav-side>li.uk-active>a{background:#337ab7;color:#fff;box-shadow:inset 0 0 5px rgba(0,0,0,.05);text-shadow:0 -1px 0 rgba(0,0,0,.1)}.uk-nav-side .uk-nav-header{color:#444}.uk-nav-side .uk-nav-divider{box-shadow:0 1px 0 #fff}.uk-nav-side ul a{color:#337ab7}.uk-nav-side ul a:hover{color:#23527c}.uk-nav-dropdown>li>a{color:#444}.uk-nav-dropdown>li>a:focus,.uk-nav-dropdown>li>a:hover{background:#337ab7;color:#fff;outline:0;box-shadow:inset 0 0 5px rgba(0,0,0,.05);text-shadow:0 -1px 0 rgba(0,0,0,.1)}.uk-nav-dropdown .uk-nav-header{color:#999}.uk-nav-dropdown ul a{color:#337ab7}.uk-nav-dropdown ul a:hover{color:#23527c}.uk-nav-navbar>li>a{color:#444}.uk-nav-navbar>li>a:focus,.uk-nav-navbar>li>a:hover{background:#337ab7;color:#fff;outline:0;box-shadow:inset 0 0 5px rgba(0,0,0,.05);text-shadow:0 -1px 0 rgba(0,0,0,.1)}.uk-nav-navbar .uk-nav-header{color:#999}.uk-nav-offcanvas .uk-nav-header,.uk-nav-offcanvas>li>a{border-top:1px solid rgba(0,0,0,.3);text-shadow:0 1px 0 rgba(0,0,0,.5)}.uk-nav-navbar ul a{color:#337ab7}.uk-nav-navbar ul a:hover{color:#23527c}.uk-nav-offcanvas>li>a{color:#ccc;padding:10px 15px;box-shadow:inset 0 1px 0 rgba(255,255,255,.05)}.uk-nav-offcanvas>.uk-open>a,html:not(.uk-touch) .uk-nav-offcanvas>li>a:focus,html:not(.uk-touch) .uk-nav-offcanvas>li>a:hover{background:#404040;color:#fff;outline:0}html .uk-nav.uk-nav-offcanvas>li.uk-active>a{background:#1a1a1a;color:#fff;box-shadow:inset 0 1px 3px rgba(0,0,0,.3)}.uk-nav-offcanvas .uk-nav-header{color:#777;margin-top:0;background:#404040;box-shadow:inset 0 1px 0 rgba(255,255,255,.05)}.uk-nav-offcanvas .uk-nav-divider{border-top:1px solid rgba(255,255,255,.01);margin:0;height:4px;background:rgba(0,0,0,.2);box-shadow:inset 0 1px 3px rgba(0,0,0,.3)}.uk-nav-offcanvas ul a{color:#ccc}html:not(.uk-touch) .uk-nav-offcanvas ul a:hover{color:#fff}.uk-nav-offcanvas{border-bottom:1px solid rgba(0,0,0,.3);box-shadow:0 1px 0 rgba(255,255,255,.05)}.uk-nav-offcanvas .uk-nav-sub{border-top:1px solid rgba(0,0,0,.3);box-shadow:inset 0 1px 0 rgba(255,255,255,.05)}.uk-navbar{background:#f5f5f5;color:#444;border:1px solid rgba(0,0,0,.06);border-radius:2px}.uk-navbar:after{clear:both}.uk-navbar-nav{margin:0;padding:0;list-style:none;float:left}.uk-navbar-nav>li{float:left;position:relative}.uk-navbar-nav>li>a{display:block;box-sizing:border-box;height:41px;padding:0 15px;line-height:40px;color:#444;font-size:13px;font-weight:400;margin-top:-1px;margin-left:-1px;border:1px solid transparent;border-bottom-width:0;text-shadow:0 1px 0 #fff}.uk-navbar-nav>li.uk-active>a,.uk-navbar-nav>li.uk-open>a,.uk-navbar-nav>li:hover>a,.uk-navbar-nav>li>a:active,.uk-navbar-nav>li>a:focus{color:#444;border-left-color:rgba(0,0,0,.1);border-right-color:rgba(0,0,0,.1)}.uk-navbar-nav>li>a[href='#']{cursor:text}.uk-navbar-nav>li.uk-open>a,.uk-navbar-nav>li:hover>a,.uk-navbar-nav>li>a:focus{background-color:#fafafa;outline:0;position:relative;z-index:1;border-top-color:rgba(0,0,0,.1)}.uk-navbar-nav>li>a:active{background-color:#eee;border-top-color:rgba(0,0,0,.2)}.uk-navbar-nav>li.uk-active>a{background-color:#fafafa;border-top-color:rgba(0,0,0,.1)}.uk-navbar-nav .uk-navbar-nav-subtitle{line-height:28px}.uk-navbar-nav-subtitle>div{margin-top:-6.5px;font-size:10px;line-height:12px}.uk-navbar-brand,.uk-navbar-toggle{font-size:17px;text-decoration:none}.uk-navbar-brand,.uk-navbar-content,.uk-navbar-toggle{box-sizing:border-box;display:block;height:41px;padding:0 15px;float:left;margin-top:-1px;text-shadow:0 1px 0 #fff}.uk-navbar-brand:before,.uk-navbar-content:before,.uk-navbar-toggle:before{content:'';display:inline-block;height:100%;vertical-align:middle}.uk-navbar-content+.uk-navbar-content:not(.uk-navbar-center){padding-left:0}.uk-navbar-content>a:not([class]){color:#337ab7}.uk-navbar-content>a:not([class]):hover{color:#23527c}.uk-navbar-brand{color:#444}.uk-navbar-brand:focus,.uk-navbar-brand:hover{color:#444;text-decoration:none;outline:0}.uk-navbar-toggle{color:#444}.uk-navbar-toggle:focus,.uk-navbar-toggle:hover{color:#444;text-decoration:none;outline:0}.uk-navbar-toggle:after{content:"\f0c9";font-family:FontAwesome;vertical-align:middle}.uk-navbar-toggle-alt:after{content:"\f002"}.uk-navbar-center{float:none;text-align:center;max-width:50%;margin-left:auto;margin-right:auto}.uk-navbar-flip{float:right}.uk-navbar-nav:first-child>li:first-child>a{border-top-left-radius:2px;border-bottom-left-radius:2px}.uk-navbar-flip .uk-navbar-nav>li>a{margin-left:0;margin-right:-1px}.uk-navbar-flip .uk-navbar-nav:first-child>li:first-child>a{border-top-left-radius:0;border-bottom-left-radius:0}.uk-navbar-flip .uk-navbar-nav:last-child>li:last-child>a{border-top-right-radius:2px;border-bottom-right-radius:2px}.uk-navbar-attached{border-top-color:transparent;border-left-color:transparent;border-right-color:transparent;border-radius:0}.uk-navbar-attached .uk-navbar-nav>li>a{border-radius:0!important}.uk-subnav{display:-ms-flexbox;display:-webkit-flex;display:flex;-ms-flex-wrap:wrap;-webkit-flex-wrap:wrap;flex-wrap:wrap;margin-left:-10px;margin-top:-10px;padding:0;list-style:none}.uk-subnav>*{-ms-flex:none;-webkit-flex:none;flex:none;padding-left:10px;margin-top:10px;position:relative;float:left}.uk-subnav:after,.uk-subnav:before{content:"";display:block;overflow:hidden}.uk-subnav:after{clear:both}.uk-subnav>*>*{display:inline-block;color:#444}.uk-subnav>*>:focus,.uk-subnav>*>:hover{color:#337ab7;text-decoration:none}.uk-subnav>.uk-active>*{color:#337ab7}.uk-subnav-line>:before{content:"";display:inline-block;height:10px;vertical-align:middle}.uk-subnav-line>:nth-child(n+2):before{margin-right:10px;border-left:1px solid #ddd}.uk-subnav-pill>*>*{padding:3px 9px;border-radius:2px}.uk-subnav-pill>*>:focus,.uk-subnav-pill>*>:hover{background:#fafafa;color:#444;text-decoration:none;outline:0;box-shadow:0 0 0 1px rgba(0,0,0,.15)}.uk-subnav-pill>.uk-active>*{background:#337ab7;color:#fff;box-shadow:inset 0 0 5px rgba(0,0,0,.05)}.uk-subnav>.uk-disabled>*{background:0 0;color:#999;text-decoration:none;cursor:text;box-shadow:none}.uk-breadcrumb{padding:0;list-style:none;font-size:0}.uk-breadcrumb>li{font-size:1rem;vertical-align:top}.uk-breadcrumb>li,.uk-breadcrumb>li>a,.uk-breadcrumb>li>span{display:inline-block}.uk-breadcrumb>li:nth-child(n+2):before{content:"/";display:inline-block;margin:0 8px}.uk-pagination:after,.uk-pagination:before,.uk-tab:after,.uk-tab:before{content:"";display:table}.uk-breadcrumb>li:not(.uk-active)>span{color:#999}.uk-pagination{padding:0;list-style:none;text-align:center;font-size:0}.uk-pagination:after{clear:both}.uk-pagination>li{display:inline-block;font-size:1rem;vertical-align:top}.uk-pagination>li:nth-child(n+2){margin-left:5px}.uk-pagination>li>a,.uk-pagination>li>span{display:inline-block;min-width:16px;padding:3px 5px;line-height:20px;text-decoration:none;box-sizing:content-box;text-align:center;border:1px solid rgba(0,0,0,.06);border-radius:2px}.uk-pagination>li>a{background:#f5f5f5;color:#444;text-shadow:0 1px 0 #fff}.uk-pagination>li>a:focus,.uk-pagination>li>a:hover{background-color:#fafafa;color:#444;outline:0;border-color:rgba(0,0,0,.16)}.uk-pagination>li>a:active{background-color:#eee;color:#444}.uk-pagination>.uk-active>span{background:#337ab7;color:#fff;border-color:transparent;box-shadow:inset 0 0 5px rgba(0,0,0,.05);text-shadow:0 -1px 0 rgba(0,0,0,.1)}.uk-pagination>.uk-disabled>span{background-color:#fafafa;color:#999;border:1px solid rgba(0,0,0,.06);text-shadow:0 1px 0 #fff}.uk-pagination-previous{float:left}.uk-pagination-next{float:right}.uk-pagination-left{text-align:left}.uk-pagination-right{text-align:right}.uk-tab-center .uk-tab>li>a,.uk-tab-center .uk-tab>li>button,.uk-tab-grid>li>a,.uk-tab-grid>li>button{text-align:center}.uk-tab{margin:0;padding:0;list-style:none;border-bottom:1px solid #ddd}.uk-tab:after{clear:both}.uk-tab>li{margin-bottom:-1px;float:left;position:relative}.uk-tab>li>a,.uk-tab>li>button{display:block;padding:8px 12px;border:1px solid transparent;border-bottom-width:0;color:#337ab7;text-decoration:none;border-radius:2px 2px 0 0;text-shadow:0 1px 0 #fff}.uk-tab>li:nth-child(n+2)>a,.uk-tab>li:nth-child(n+2)>button{margin-left:5px}.uk-tab>li.uk-open>a,.uk-tab>li.uk-open>button,.uk-tab>li>a:focus,.uk-tab>li>a:hover,.uk-tab>li>button:focus,.uk-tab>li>button:hover{border-color:rgba(0,0,0,.06);background:#f5f5f5;color:#23527c;outline:0;text-decoration:none}.uk-tab>li.uk-open:not(.uk-active)>a,.uk-tab>li.uk-open:not(.uk-active)>button,.uk-tab>li:not(.uk-active)>a:focus,.uk-tab>li:not(.uk-active)>a:hover,.uk-tab>li:not(.uk-active)>button:focus,.uk-tab>li:not(.uk-active)>button:hover{margin-bottom:1px;padding-bottom:7px}.uk-tab>li.uk-active>a,.uk-tab>li.uk-active>button{border-color:#ddd #ddd transparent;background:#fff;color:#444}.uk-tab>li.uk-disabled>a,.uk-tab>li.uk-disabled>button{color:#999;cursor:text}.uk-tab>li.uk-disabled.uk-active>a,.uk-tab>li.uk-disabled.uk-active>button,.uk-tab>li.uk-disabled>a:focus,.uk-tab>li.uk-disabled>a:hover,.uk-tab>li.uk-disabled>button:focus,.uk-tab>li.uk-disabled>button:hover{background:0 0;border-color:transparent}.uk-list-striped>li,.uk-tab-center,.uk-table td,.uk-table th{border-bottom:1px solid #ddd}.uk-tab-flip>li{float:right}.uk-tab-flip>li:nth-child(n+2)>a,.uk-tab-flip>li:nth-child(n+2)>button{margin-left:0;margin-right:5px}.uk-tab>li.uk-tab-responsive>a,.uk-tab>li.uk-tab-responsive>button{margin-left:0;margin-right:0}.uk-tab-responsive>a:before,.uk-tab-responsive>button:before{content:"\f0c9\00a0";font-family:FontAwesome}.uk-tab-center-bottom{border-bottom:none;border-top:1px solid #ddd}.uk-tab-center:after,.uk-tab-center:before{content:"";display:table}.uk-tab-center:after{clear:both}.uk-tab-center .uk-tab{position:relative;right:50%;border:none;float:right}.uk-tab-center .uk-tab>li{position:relative;right:-50%}.uk-tab-bottom{border-top:1px solid #ddd;border-bottom:none}.uk-tab-bottom>li{margin-top:-1px;margin-bottom:0}.uk-tab-bottom>li>a,.uk-tab-bottom>li>button{padding-top:8px;padding-bottom:8px;border-bottom-width:1px;border-top-width:0}.uk-tab-bottom>li.uk-open:not(.uk-active)>a,.uk-tab-bottom>li.uk-open:not(.uk-active)>button,.uk-tab-bottom>li:not(.uk-active)>a:focus,.uk-tab-bottom>li:not(.uk-active)>a:hover,.uk-tab-bottom>li:not(.uk-active)>button:focus,.uk-tab-bottom>li:not(.uk-active)>button:hover{margin-bottom:0;margin-top:1px;padding-bottom:8px;padding-top:7px}.uk-tab-bottom>li.uk-active>a,.uk-tab-bottom>li.uk-active>button{border-top-color:transparent;border-bottom-color:#ddd}.uk-tab-grid{margin-left:-5px;border-bottom:none;position:relative;z-index:0}.uk-tab-grid:before{display:block;position:absolute;left:5px;right:0;bottom:-1px;border-top:1px solid #ddd;z-index:-1}.uk-tab-grid>li:first-child>a,.uk-tab-grid>li:first-child>button{margin-left:5px}.uk-tab-grid.uk-tab-bottom{border-top:none}.uk-tab-grid.uk-tab-bottom:before{top:-1px;bottom:auto}@media (min-width:768px){.uk-tab-left,.uk-tab-right{border-bottom:none}.uk-tab-left>li,.uk-tab-right>li{margin-bottom:0;float:none}.uk-tab-left>li>a,.uk-tab-right>li>a{padding-top:8px;padding-bottom:8px}.uk-tab-left>li:nth-child(n+2)>a,.uk-tab-right>li:nth-child(n+2)>a{margin-left:0;margin-top:5px}.uk-tab-left>li.uk-active>a,.uk-tab-right>li.uk-active>a{border-color:#ddd}.uk-tab-left{border-right:1px solid #ddd}.uk-tab-left>li{margin-right:-1px}.uk-tab-left>li>a{border-bottom-width:1px;border-right-width:0}.uk-tab-left>li:not(.uk-active)>a:focus,.uk-tab-left>li:not(.uk-active)>a:hover{margin-bottom:0;margin-right:1px;padding-bottom:8px;padding-right:11px}.uk-tab-left>li.uk-active>a{border-right-color:transparent}.uk-tab-right{border-left:1px solid #ddd}.uk-tab-right>li{margin-left:-1px}.uk-tab-right>li>a{border-bottom-width:1px;border-left-width:0}.uk-tab-right>li:not(.uk-active)>a:focus,.uk-tab-right>li:not(.uk-active)>a:hover{margin-bottom:0;margin-left:1px;padding-bottom:8px;padding-left:11px}.uk-tab-right>li.uk-active>a{border-left-color:transparent}}.uk-tab-bottom>li>a{border-radius:0 0 2px 2px}@media (min-width:768px){.uk-tab-left>li>a{border-radius:2px 0 0 2px}.uk-tab-right>li>a{border-radius:0 2px 2px 0}}.uk-tab>li>a:focus,.uk-tab>li>button:focus{text-decoration:underline}.uk-thumbnav{display:-ms-flexbox;display:-webkit-flex;display:flex;-ms-flex-wrap:wrap;-webkit-flex-wrap:wrap;flex-wrap:wrap;margin-left:-10px;margin-top:-10px;padding:0;list-style:none}.uk-thumbnav>*{-ms-flex:none;-webkit-flex:none;flex:none;padding-left:10px;margin-top:10px;float:left}.uk-thumbnav:after,.uk-thumbnav:before{content:"";display:block;overflow:hidden}.uk-thumbnav:after{clear:both}.uk-thumbnav>*>*{display:block;background:#fff}.uk-thumbnav>*>*>img{opacity:.7;-webkit-transition:opacity .15s linear;transition:opacity .15s linear}.uk-thumbnav>*>:focus>img,.uk-thumbnav>*>:hover>img,.uk-thumbnav>.uk-active>*>img{opacity:1}.uk-list{padding:0;list-style:none}.uk-list>li:after,.uk-list>li:before{content:"";display:table}.uk-list>li:after{clear:both}.uk-list>li>:last-child{margin-bottom:0}.uk-list ul{margin:0;padding-left:20px;list-style:none}.uk-list-line>li:nth-child(n+2){margin-top:5px;padding-top:5px;border-top:1px solid #ddd}.uk-list-striped>li{padding:5px}.uk-list-striped>li:nth-of-type(odd){background:#fafafa}.uk-list-space>li:nth-child(n+2){margin-top:10px}.uk-list-striped>li:first-child{border-top:1px solid #ddd}@media (min-width:768px){.uk-description-list-horizontal{overflow:hidden}.uk-description-list-horizontal>dt{width:160px;float:left;clear:both;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}.uk-description-list-horizontal>dd{margin-left:180px}}.uk-description-list-line>dt{font-weight:400}.uk-description-list-line>dt:nth-child(n+2){margin-top:5px;padding-top:5px;border-top:1px solid #ddd}.uk-description-list-line>dd{color:#999}.uk-table{border-collapse:collapse;border-spacing:0;width:100%;margin-bottom:15px}*+.uk-table{margin-top:15px}.uk-table td,.uk-table th{padding:8px}.uk-table th{text-align:left}.uk-table td{vertical-align:top}.uk-table thead th{vertical-align:bottom}.uk-table caption,.uk-table tfoot{font-size:11px;font-style:italic}.uk-table caption{text-align:left;color:#999}.uk-table tbody tr.uk-active{background:#f0f0f0}.uk-table-middle,.uk-table-middle td{vertical-align:middle!important}.uk-table-striped tbody tr:nth-of-type(odd){background:#fafafa}.uk-table-condensed td{padding:4px 8px}.uk-table-hover tbody tr:hover{background:#f0f0f0}.uk-form input,.uk-form select,.uk-form textarea{box-sizing:border-box;margin:0;border-radius:0;font:inherit;color:inherit}.uk-form select{text-transform:none}.uk-form optgroup{font:inherit;font-weight:700}.uk-form input::-moz-focus-inner{border:0;padding:0}.uk-form input[type=checkbox],.uk-form input[type=radio]{padding:0}.uk-form input[type=checkbox]:not(:disabled),.uk-form input[type=radio]:not(:disabled){cursor:pointer}.uk-form input:not([type]),.uk-form input[type=text],.uk-form input[type=password],.uk-form input[type=email],.uk-form input[type=url],.uk-form input[type=search],.uk-form input[type=tel],.uk-form input[type=number],.uk-form input[type=datetime],.uk-form textarea{-webkit-appearance:none}.uk-form input[type=search]::-webkit-search-cancel-button,.uk-form input[type=search]::-webkit-search-decoration{-webkit-appearance:none}.uk-form input[type=number]::-webkit-inner-spin-button,.uk-form input[type=number]::-webkit-outer-spin-button{height:auto}.uk-form fieldset{border:none;margin:0;padding:0}*+.uk-alert,.uk-form-row+.uk-form-row{margin-top:15px}.uk-form textarea{overflow:auto;vertical-align:top}.uk-button,.uk-button-group,.uk-form input:not([type=radio]):not([type=checkbox]),.uk-form select{vertical-align:middle}.uk-form :invalid{box-shadow:none}.uk-form>:last-child{margin-bottom:0}.uk-form input:not([type]),.uk-form input[type=text],.uk-form input[type=password],.uk-form input[type=email],.uk-form input[type=url],.uk-form input[type=search],.uk-form input[type=tel],.uk-form input[type=number],.uk-form input[type=datetime],.uk-form input[type=datetime-local],.uk-form input[type=date],.uk-form input[type=month],.uk-form input[type=time],.uk-form input[type=week],.uk-form input[type=color],.uk-form select,.uk-form textarea{height:32px;max-width:100%;padding:2px 3px;border:1px solid #ddd;background:#fff;color:#444;-webkit-transition:all .2s linear;-webkit-transition-property:border,background,color,box-shadow,padding;transition:all .2s linear;transition-property:border,background,color,box-shadow,padding;border-radius:2px}.uk-form input:not([type]):focus,.uk-form input[type=text]:focus,.uk-form input[type=password]:focus,.uk-form input[type=email]:focus,.uk-form input[type=url]:focus,.uk-form input[type=search]:focus,.uk-form input[type=tel]:focus,.uk-form input[type=number]:focus,.uk-form input[type=datetime]:focus,.uk-form input[type=datetime-local]:focus,.uk-form input[type=date]:focus,.uk-form input[type=month]:focus,.uk-form input[type=time]:focus,.uk-form input[type=week]:focus,.uk-form input[type=color]:focus,.uk-form select:focus,.uk-form textarea:focus{border-color:#66afe9;outline:0;background:#f5fbfe;color:#444}.uk-form input:not([type]):disabled,.uk-form input[type=text]:disabled,.uk-form input[type=password]:disabled,.uk-form input[type=email]:disabled,.uk-form input[type=url]:disabled,.uk-form input[type=search]:disabled,.uk-form input[type=tel]:disabled,.uk-form input[type=number]:disabled,.uk-form input[type=datetime]:disabled,.uk-form input[type=datetime-local]:disabled,.uk-form input[type=date]:disabled,.uk-form input[type=month]:disabled,.uk-form input[type=time]:disabled,.uk-form input[type=week]:disabled,.uk-form input[type=color]:disabled,.uk-form select:disabled,.uk-form textarea:disabled{border-color:#ddd;background-color:#fafafa;color:#999}.uk-form :-ms-input-placeholder{color:#999!important}.uk-form ::-moz-placeholder{opacity:1;color:#999}.uk-form ::-webkit-input-placeholder{color:#999}.uk-form :disabled:-ms-input-placeholder{color:#999!important}.uk-form :disabled::-moz-placeholder{color:#999}.uk-form :disabled::-webkit-input-placeholder{color:#999}.uk-form legend{width:100%;border:0;padding:0 0 15px;font-size:17px;line-height:29px}.uk-form legend:after{content:"";display:block;border-bottom:1px solid #ddd;width:100%}input:not([type]).uk-form-small,input[type].uk-form-small,select.uk-form-small,textarea.uk-form-small{height:20px;padding:2px;font-size:11px}input:not([type]).uk-form-large,input[type].uk-form-large,select.uk-form-large,textarea.uk-form-large{height:32px;padding:4px 3px;font-size:15px}.uk-form select[multiple],.uk-form select[size],.uk-form textarea{height:auto}.uk-form-danger{border-color:#a94442!important;background:#fff7f8!important;color:#d9534f!important}.uk-form-success{border-color:#3c763d!important;background:#fafff2!important;color:#5cb85c!important}.uk-form-blank{border-color:transparent!important;border-style:dashed!important;background:0 0!important}.uk-form-blank:focus{border-color:#ddd!important}input.uk-form-width-mini{width:40px}select.uk-form-width-mini{width:65px}.uk-form-width-small{width:130px}.uk-form-width-medium{width:200px}.uk-form-width-large{width:500px}.uk-form-row:after,.uk-form-row:before{content:"";display:table}.uk-form-row:after{clear:both}.uk-form-help-inline{display:inline-block;margin:0 0 0 10px}.uk-form-help-block{margin:5px 0 0}.uk-form-controls>:first-child{margin-top:0}.uk-form-controls>:last-child{margin-bottom:0}.uk-form-controls-condensed{margin:5px 0}.uk-form-stacked .uk-form-label{display:block;margin-bottom:5px;font-weight:700}@media (max-width:959px){.uk-form-horizontal .uk-form-label{display:block;margin-bottom:5px;font-weight:700}}.uk-button,.uk-button-dropdown,.uk-button-group,.uk-button-group>*,.uk-close,.uk-form-icon,.uk-icon-button,.uk-icon-spin,[class*=uk-icon-]{display:inline-block}@media (min-width:960px){.uk-form-horizontal .uk-form-label{width:200px;margin-top:5px;float:left}.uk-form-horizontal .uk-form-controls{margin-left:215px}.uk-form-horizontal .uk-form-controls-text{padding-top:5px}}.uk-form-icon{position:relative;max-width:100%}.uk-form-icon>[class*=uk-icon-]{position:absolute;top:50%;width:30px;margin-top:13px/-2;font-size:13px;color:#999;text-align:center;pointer-events:none}.uk-form-icon:not(.uk-form-icon-flip)>input{padding-left:30px!important}.uk-form-icon-flip>[class*=uk-icon-]{right:0}.uk-form-icon-flip>input{padding-right:30px!important}.uk-button::-moz-focus-inner{border:0;padding:0}.uk-button{-webkit-appearance:none;margin:0;border:none;overflow:visible;font:inherit;color:#444;text-transform:none;box-sizing:border-box;padding:0 12px;background:#f5f5f5;line-height:30px;min-height:32px;font-size:1rem;text-decoration:none;text-align:center;border:1px solid rgba(0,0,0,.06);border-radius:2px;text-shadow:0 1px 0 #fff}.uk-button:not(:disabled){cursor:pointer}.uk-button:focus,.uk-button:hover{background-color:#fafafa;color:#444;outline:0;text-decoration:none;border-color:rgba(0,0,0,.16)}.uk-button.uk-active,.uk-button:active{background-color:#eee;color:#444}.uk-button-primary{background-color:#337ab7;color:#fff}.uk-button-primary:focus,.uk-button-primary:hover{background-color:#286090;color:#fff}.uk-button-primary.uk-active,.uk-button-primary:active{background-color:#0091ca;color:#fff}.uk-button-success{background-color:#5cb85c;color:#fff}.uk-button-success:focus,.uk-button-success:hover{background-color:#449d44;color:#fff}.uk-button-success.uk-active,.uk-button-success:active{background-color:#72ae41;color:#fff}.uk-button-danger{background-color:#d9534f;color:#fff}.uk-button-danger:focus,.uk-button-danger:hover{background-color:#c9302c;color:#fff}.uk-button-danger.uk-active,.uk-button-danger:active{background-color:#c91032;color:#fff}.uk-button:disabled{background-color:#fafafa;color:#999;border-color:rgba(0,0,0,.06);box-shadow:none;text-shadow:0 1px 0 #fff}.uk-button-link,.uk-button-link.uk-active,.uk-button-link:active,.uk-button-link:disabled,.uk-button-link:focus,.uk-button-link:hover{border-color:transparent;background:0 0;box-shadow:none;text-shadow:none}.uk-button-link{color:#337ab7}.uk-button-link.uk-active,.uk-button-link:active,.uk-button-link:focus,.uk-button-link:hover{color:#23527c;text-decoration:underline}.uk-button-link:disabled,.uk-icon-hover{color:#999}.uk-button-link:focus{outline:dotted 1px}.uk-button-mini{min-height:18px;padding:0 6px;line-height:16px;font-size:10px}.uk-button-small{min-height:20px;padding:0 10px;line-height:18px;font-size:11px}.uk-button-large{min-height:32px;padding:0 15px;line-height:30px;font-size:15px;border-radius:3px}.uk-button-group{position:relative;font-size:0;white-space:nowrap}.uk-button-group .uk-button{vertical-align:top}.uk-button-dropdown{vertical-align:middle;position:relative}.uk-button-danger,.uk-button-primary,.uk-button-success{box-shadow:inset 0 0 5px rgba(0,0,0,.05);text-shadow:0 -1px 0 rgba(0,0,0,.1)}.uk-button-danger:focus,.uk-button-danger:hover,.uk-button-primary:focus,.uk-button-primary:hover,.uk-button-success:focus,.uk-button-success:hover{border-color:rgba(0,0,0,.21)}.uk-button-group>.uk-button:not(:first-child):not(:last-child),.uk-button-group>div:not(:first-child):not(:last-child) .uk-button{border-left-color:rgba(0,0,0,.1);border-right-color:rgba(0,0,0,.1);border-radius:0}.uk-button-group>.uk-button:first-child,.uk-button-group>div:first-child .uk-button{border-right-color:rgba(0,0,0,.1);border-top-right-radius:0;border-bottom-right-radius:0}.uk-button-group>.uk-button:last-child,.uk-button-group>div:last-child .uk-button{border-left-color:rgba(0,0,0,.1);border-top-left-radius:0;border-bottom-left-radius:0}.uk-button-group>.uk-button:nth-child(n+2),.uk-button-group>div:nth-child(n+2) .uk-button{margin-left:-1px}.uk-button-group .uk-button.uk-active,.uk-button-group .uk-button:active,.uk-button-group .uk-button:hover{position:relative}[class*=uk-icon-]{font-family:FontAwesome;font-weight:400;font-style:normal;line-height:1;-webkit-font-smoothing:antialiased;-moz-osx-font-smoothing:grayscale}[class*=uk-icon-],[class*=uk-icon-]:focus,[class*=uk-icon-]:hover{text-decoration:none}.uk-icon-small{font-size:150%;vertical-align:-10%}.uk-icon-medium{font-size:200%;vertical-align:-16%}.uk-icon-large{font-size:250%;vertical-align:-22%}.uk-icon-justify{width:1em;text-align:center}.uk-icon-spin{-webkit-animation:uk-rotate 2s infinite linear;animation:uk-rotate 2s infinite linear}.uk-icon-hover:hover{color:#444}.uk-icon-button{box-sizing:border-box;width:35px;height:35px;border-radius:100%;background:#f5f5f5;line-height:35px;color:#444;font-size:18px;text-align:center;border:1px solid #e7e7e7;text-shadow:0 1px 0 #fff}.uk-icon-button:focus,.uk-icon-button:hover{background-color:#fafafa;color:#444;outline:0;border-color:#d3d3d3}.uk-icon-button:active{background-color:#eee;color:#444}.uk-icon-glass:before{content:"\f000"}.uk-icon-music:before{content:"\f001"}.uk-icon-search:before,.uk-overlay-area:empty:before,.uk-overlay-icon:before{content:"\f002"}.uk-icon-envelope-o:before{content:"\f003"}.uk-icon-heart:before{content:"\f004"}.uk-icon-star:before{content:"\f005"}.uk-icon-star-o:before{content:"\f006"}.uk-icon-user:before{content:"\f007"}.uk-icon-film:before{content:"\f008"}.uk-icon-th-large:before{content:"\f009"}.uk-icon-th:before{content:"\f00a"}.uk-icon-th-list:before{content:"\f00b"}.uk-icon-check:before{content:"\f00c"}.uk-icon-close:before,.uk-icon-remove:before,.uk-icon-times:before{content:"\f00d"}.uk-icon-search-plus:before{content:"\f00e"}.uk-icon-search-minus:before{content:"\f010"}.uk-icon-power-off:before{content:"\f011"}.uk-icon-signal:before{content:"\f012"}.uk-icon-cog:before,.uk-icon-gear:before{content:"\f013"}.uk-icon-trash-o:before{content:"\f014"}.uk-icon-home:before{content:"\f015"}.uk-icon-file-o:before{content:"\f016"}.uk-icon-clock-o:before{content:"\f017"}.uk-icon-road:before{content:"\f018"}.uk-icon-download:before{content:"\f019"}.uk-icon-arrow-circle-o-down:before{content:"\f01a"}.uk-icon-arrow-circle-o-up:before{content:"\f01b"}.uk-icon-inbox:before{content:"\f01c"}.uk-icon-play-circle-o:before{content:"\f01d"}.uk-icon-repeat:before,.uk-icon-rotate-right:before{content:"\f01e"}.uk-icon-refresh:before{content:"\f021"}.uk-icon-list-alt:before{content:"\f022"}.uk-icon-lock:before{content:"\f023"}.uk-icon-flag:before{content:"\f024"}.uk-icon-headphones:before{content:"\f025"}.uk-icon-volume-off:before{content:"\f026"}.uk-icon-volume-down:before{content:"\f027"}.uk-icon-volume-up:before{content:"\f028"}.uk-icon-qrcode:before{content:"\f029"}.uk-icon-barcode:before{content:"\f02a"}.uk-icon-tag:before{content:"\f02b"}.uk-icon-tags:before{content:"\f02c"}.uk-icon-book:before{content:"\f02d"}.uk-icon-bookmark:before{content:"\f02e"}.uk-icon-print:before{content:"\f02f"}.uk-icon-camera:before{content:"\f030"}.uk-icon-font:before{content:"\f031"}.uk-icon-bold:before{content:"\f032"}.uk-icon-italic:before{content:"\f033"}.uk-icon-text-height:before{content:"\f034"}.uk-icon-text-width:before{content:"\f035"}.uk-icon-align-left:before{content:"\f036"}.uk-icon-align-center:before{content:"\f037"}.uk-icon-align-right:before{content:"\f038"}.uk-icon-align-justify:before{content:"\f039"}.uk-icon-list:before{content:"\f03a"}.uk-icon-dedent:before,.uk-icon-outdent:before{content:"\f03b"}.uk-icon-indent:before{content:"\f03c"}.uk-icon-video-camera:before{content:"\f03d"}.uk-icon-image:before,.uk-icon-photo:before,.uk-icon-picture-o:before{content:"\f03e"}.uk-icon-pencil:before{content:"\f040"}.uk-icon-map-marker:before{content:"\f041"}.uk-icon-adjust:before{content:"\f042"}.uk-icon-tint:before{content:"\f043"}.uk-icon-edit:before,.uk-icon-pencil-square-o:before{content:"\f044"}.uk-icon-share-square-o:before{content:"\f045"}.uk-icon-check-square-o:before{content:"\f046"}.uk-icon-arrows:before{content:"\f047"}.uk-icon-step-backward:before{content:"\f048"}.uk-icon-fast-backward:before{content:"\f049"}.uk-icon-backward:before{content:"\f04a"}.uk-icon-play:before{content:"\f04b"}.uk-icon-pause:before{content:"\f04c"}.uk-icon-stop:before{content:"\f04d"}.uk-icon-forward:before{content:"\f04e"}.uk-icon-fast-forward:before{content:"\f050"}.uk-icon-step-forward:before{content:"\f051"}.uk-icon-eject:before{content:"\f052"}.uk-icon-chevron-left:before{content:"\f053"}.uk-icon-chevron-right:before{content:"\f054"}.uk-icon-plus-circle:before{content:"\f055"}.uk-icon-minus-circle:before{content:"\f056"}.uk-icon-times-circle:before{content:"\f057"}.uk-icon-check-circle:before{content:"\f058"}.uk-icon-question-circle:before{content:"\f059"}.uk-icon-info-circle:before{content:"\f05a"}.uk-icon-crosshairs:before{content:"\f05b"}.uk-icon-times-circle-o:before{content:"\f05c"}.uk-icon-check-circle-o:before{content:"\f05d"}.uk-icon-ban:before{content:"\f05e"}.uk-icon-arrow-left:before{content:"\f060"}.uk-icon-arrow-right:before{content:"\f061"}.uk-icon-arrow-up:before{content:"\f062"}.uk-icon-arrow-down:before{content:"\f063"}.uk-icon-mail-forward:before,.uk-icon-share:before{content:"\f064"}.uk-icon-expand:before{content:"\f065"}.uk-icon-compress:before{content:"\f066"}.uk-icon-plus:before{content:"\f067"}.uk-icon-minus:before{content:"\f068"}.uk-icon-asterisk:before{content:"\f069"}.uk-icon-exclamation-circle:before{content:"\f06a"}.uk-icon-gift:before{content:"\f06b"}.uk-icon-leaf:before{content:"\f06c"}.uk-icon-fire:before{content:"\f06d"}.uk-icon-eye:before{content:"\f06e"}.uk-icon-eye-slash:before{content:"\f070"}.uk-icon-exclamation-triangle:before,.uk-icon-warning:before{content:"\f071"}.uk-icon-plane:before{content:"\f072"}.uk-icon-calendar:before{content:"\f073"}.uk-icon-random:before{content:"\f074"}.uk-icon-comment:before{content:"\f075"}.uk-icon-magnet:before{content:"\f076"}.uk-icon-chevron-up:before{content:"\f077"}.uk-icon-chevron-down:before{content:"\f078"}.uk-icon-retweet:before{content:"\f079"}.uk-icon-shopping-cart:before{content:"\f07a"}.uk-icon-folder:before{content:"\f07b"}.uk-icon-folder-open:before{content:"\f07c"}.uk-icon-arrows-v:before{content:"\f07d"}.uk-icon-arrows-h:before{content:"\f07e"}.uk-icon-bar-chart-o:before,.uk-icon-bar-chart:before{content:"\f080"}.uk-icon-twitter-square:before{content:"\f081"}.uk-icon-facebook-square:before{content:"\f082"}.uk-icon-camera-retro:before{content:"\f083"}.uk-icon-key:before{content:"\f084"}.uk-icon-cogs:before,.uk-icon-gears:before{content:"\f085"}.uk-icon-comments:before{content:"\f086"}.uk-icon-thumbs-o-up:before{content:"\f087"}.uk-icon-thumbs-o-down:before{content:"\f088"}.uk-icon-star-half:before{content:"\f089"}.uk-icon-heart-o:before{content:"\f08a"}.uk-icon-sign-out:before{content:"\f08b"}.uk-icon-linkedin-square:before{content:"\f08c"}.uk-icon-thumb-tack:before{content:"\f08d"}.uk-icon-external-link:before{content:"\f08e"}.uk-icon-sign-in:before{content:"\f090"}.uk-icon-trophy:before{content:"\f091"}.uk-icon-github-square:before{content:"\f092"}.uk-icon-upload:before{content:"\f093"}.uk-icon-lemon-o:before{content:"\f094"}.uk-icon-phone:before{content:"\f095"}.uk-icon-square-o:before{content:"\f096"}.uk-icon-bookmark-o:before{content:"\f097"}.uk-icon-phone-square:before{content:"\f098"}.uk-icon-twitter:before{content:"\f099"}.uk-icon-facebook-f:before,.uk-icon-facebook:before{content:"\f09a"}.uk-icon-github:before{content:"\f09b"}.uk-icon-unlock:before{content:"\f09c"}.uk-icon-credit-card:before{content:"\f09d"}.uk-icon-rss:before{content:"\f09e"}.uk-icon-hdd-o:before{content:"\f0a0"}.uk-icon-bullhorn:before{content:"\f0a1"}.uk-icon-bell:before{content:"\f0f3"}.uk-icon-certificate:before{content:"\f0a3"}.uk-icon-hand-o-right:before{content:"\f0a4"}.uk-icon-hand-o-left:before{content:"\f0a5"}.uk-icon-hand-o-up:before{content:"\f0a6"}.uk-icon-hand-o-down:before{content:"\f0a7"}.uk-icon-arrow-circle-left:before{content:"\f0a8"}.uk-icon-arrow-circle-right:before{content:"\f0a9"}.uk-icon-arrow-circle-up:before{content:"\f0aa"}.uk-icon-arrow-circle-down:before{content:"\f0ab"}.uk-icon-globe:before{content:"\f0ac"}.uk-icon-wrench:before{content:"\f0ad"}.uk-icon-tasks:before{content:"\f0ae"}.uk-icon-filter:before{content:"\f0b0"}.uk-icon-briefcase:before{content:"\f0b1"}.uk-icon-arrows-alt:before{content:"\f0b2"}.uk-icon-group:before,.uk-icon-users:before{content:"\f0c0"}.uk-icon-chain:before,.uk-icon-link:before{content:"\f0c1"}.uk-icon-cloud:before{content:"\f0c2"}.uk-icon-flask:before{content:"\f0c3"}.uk-icon-cut:before,.uk-icon-scissors:before{content:"\f0c4"}.uk-icon-copy:before,.uk-icon-files-o:before{content:"\f0c5"}.uk-icon-paperclip:before{content:"\f0c6"}.uk-icon-floppy-o:before,.uk-icon-save:before{content:"\f0c7"}.uk-icon-square:before{content:"\f0c8"}.uk-icon-bars:before,.uk-icon-navicon:before,.uk-icon-reorder:before{content:"\f0c9"}.uk-icon-list-ul:before{content:"\f0ca"}.uk-icon-list-ol:before{content:"\f0cb"}.uk-icon-strikethrough:before{content:"\f0cc"}.uk-icon-underline:before{content:"\f0cd"}.uk-icon-table:before{content:"\f0ce"}.uk-icon-magic:before{content:"\f0d0"}.uk-icon-truck:before{content:"\f0d1"}.uk-icon-pinterest:before{content:"\f0d2"}.uk-icon-pinterest-square:before{content:"\f0d3"}.uk-icon-google-plus-square:before{content:"\f0d4"}.uk-icon-google-plus:before{content:"\f0d5"}.uk-icon-money:before{content:"\f0d6"}.uk-icon-caret-down:before{content:"\f0d7"}.uk-icon-caret-up:before{content:"\f0d8"}.uk-icon-caret-left:before{content:"\f0d9"}.uk-icon-caret-right:before{content:"\f0da"}.uk-icon-columns:before{content:"\f0db"}.uk-icon-sort:before,.uk-icon-unsorted:before{content:"\f0dc"}.uk-icon-sort-desc:before,.uk-icon-sort-down:before{content:"\f0dd"}.uk-icon-sort-asc:before,.uk-icon-sort-up:before{content:"\f0de"}.uk-icon-envelope:before{content:"\f0e0"}.uk-icon-linkedin:before{content:"\f0e1"}.uk-icon-rotate-left:before,.uk-icon-undo:before{content:"\f0e2"}.uk-icon-gavel:before,.uk-icon-legal:before{content:"\f0e3"}.uk-icon-dashboard:before,.uk-icon-tachometer:before{content:"\f0e4"}.uk-icon-comment-o:before{content:"\f0e5"}.uk-icon-comments-o:before{content:"\f0e6"}.uk-icon-bolt:before,.uk-icon-flash:before{content:"\f0e7"}.uk-icon-sitemap:before{content:"\f0e8"}.uk-icon-umbrella:before{content:"\f0e9"}.uk-icon-clipboard:before,.uk-icon-paste:before{content:"\f0ea"}.uk-icon-lightbulb-o:before{content:"\f0eb"}.uk-icon-exchange:before{content:"\f0ec"}.uk-icon-cloud-download:before{content:"\f0ed"}.uk-icon-cloud-upload:before{content:"\f0ee"}.uk-icon-user-md:before{content:"\f0f0"}.uk-icon-stethoscope:before{content:"\f0f1"}.uk-icon-suitcase:before{content:"\f0f2"}.uk-icon-bell-o:before{content:"\f0a2"}.uk-icon-coffee:before{content:"\f0f4"}.uk-icon-cutlery:before{content:"\f0f5"}.uk-icon-file-text-o:before{content:"\f0f6"}.uk-icon-building-o:before{content:"\f0f7"}.uk-icon-hospital-o:before{content:"\f0f8"}.uk-icon-ambulance:before{content:"\f0f9"}.uk-icon-medkit:before{content:"\f0fa"}.uk-icon-fighter-jet:before{content:"\f0fb"}.uk-icon-beer:before{content:"\f0fc"}.uk-icon-h-square:before{content:"\f0fd"}.uk-icon-plus-square:before{content:"\f0fe"}.uk-icon-angle-double-left:before{content:"\f100"}.uk-icon-angle-double-right:before{content:"\f101"}.uk-icon-angle-double-up:before{content:"\f102"}.uk-icon-angle-double-down:before{content:"\f103"}.uk-icon-angle-left:before{content:"\f104"}.uk-icon-angle-right:before{content:"\f105"}.uk-icon-angle-up:before{content:"\f106"}.uk-icon-angle-down:before{content:"\f107"}.uk-icon-desktop:before{content:"\f108"}.uk-icon-laptop:before{content:"\f109"}.uk-icon-tablet:before{content:"\f10a"}.uk-icon-mobile-phone:before,.uk-icon-mobile:before{content:"\f10b"}.uk-icon-circle-o:before{content:"\f10c"}.uk-icon-quote-left:before{content:"\f10d"}.uk-icon-quote-right:before{content:"\f10e"}.uk-icon-spinner:before,.uk-modal-spinner:after{content:"\f110"}.uk-icon-circle:before{content:"\f111"}.uk-icon-mail-reply:before,.uk-icon-reply:before{content:"\f112"}.uk-icon-github-alt:before{content:"\f113"}.uk-icon-folder-o:before{content:"\f114"}.uk-icon-folder-open-o:before{content:"\f115"}.uk-icon-smile-o:before{content:"\f118"}.uk-icon-frown-o:before{content:"\f119"}.uk-icon-meh-o:before{content:"\f11a"}.uk-icon-gamepad:before{content:"\f11b"}.uk-icon-keyboard-o:before{content:"\f11c"}.uk-icon-flag-o:before{content:"\f11d"}.uk-icon-flag-checkered:before{content:"\f11e"}.uk-icon-terminal:before{content:"\f120"}.uk-icon-code:before{content:"\f121"}.uk-icon-mail-reply-all:before,.uk-icon-reply-all:before{content:"\f122"}.uk-icon-star-half-empty:before,.uk-icon-star-half-full:before,.uk-icon-star-half-o:before{content:"\f123"}.uk-icon-location-arrow:before{content:"\f124"}.uk-icon-crop:before{content:"\f125"}.uk-icon-code-fork:before{content:"\f126"}.uk-icon-chain-broken:before,.uk-icon-unlink:before{content:"\f127"}.uk-icon-question:before{content:"\f128"}.uk-icon-info:before{content:"\f129"}.uk-icon-exclamation:before{content:"\f12a"}.uk-icon-superscript:before{content:"\f12b"}.uk-icon-subscript:before{content:"\f12c"}.uk-icon-eraser:before{content:"\f12d"}.uk-icon-puzzle-piece:before{content:"\f12e"}.uk-icon-microphone:before{content:"\f130"}.uk-icon-microphone-slash:before{content:"\f131"}.uk-icon-shield:before{content:"\f132"}.uk-icon-calendar-o:before{content:"\f133"}.uk-icon-fire-extinguisher:before{content:"\f134"}.uk-icon-rocket:before{content:"\f135"}.uk-icon-maxcdn:before{content:"\f136"}.uk-icon-chevron-circle-left:before{content:"\f137"}.uk-icon-chevron-circle-right:before{content:"\f138"}.uk-icon-chevron-circle-up:before{content:"\f139"}.uk-icon-chevron-circle-down:before{content:"\f13a"}.uk-icon-html5:before{content:"\f13b"}.uk-icon-css3:before{content:"\f13c"}.uk-icon-anchor:before{content:"\f13d"}.uk-icon-unlock-alt:before{content:"\f13e"}.uk-icon-bullseye:before{content:"\f140"}.uk-icon-ellipsis-h:before{content:"\f141"}.uk-icon-ellipsis-v:before{content:"\f142"}.uk-icon-rss-square:before{content:"\f143"}.uk-icon-play-circle:before{content:"\f144"}.uk-icon-ticket:before{content:"\f145"}.uk-icon-minus-square:before{content:"\f146"}.uk-icon-minus-square-o:before{content:"\f147"}.uk-icon-level-up:before{content:"\f148"}.uk-icon-level-down:before{content:"\f149"}.uk-icon-check-square:before{content:"\f14a"}.uk-icon-pencil-square:before{content:"\f14b"}.uk-icon-external-link-square:before{content:"\f14c"}.uk-icon-share-square:before{content:"\f14d"}.uk-icon-compass:before{content:"\f14e"}.uk-icon-caret-square-o-down:before,.uk-icon-toggle-down:before{content:"\f150"}.uk-icon-caret-square-o-up:before,.uk-icon-toggle-up:before{content:"\f151"}.uk-icon-caret-square-o-right:before,.uk-icon-toggle-right:before{content:"\f152"}.uk-icon-eur:before,.uk-icon-euro:before{content:"\f153"}.uk-icon-gbp:before{content:"\f154"}.uk-icon-dollar:before,.uk-icon-usd:before{content:"\f155"}.uk-icon-inr:before,.uk-icon-rupee:before{content:"\f156"}.uk-icon-cny:before,.uk-icon-jpy:before,.uk-icon-rmb:before,.uk-icon-yen:before{content:"\f157"}.uk-icon-rouble:before,.uk-icon-rub:before,.uk-icon-ruble:before{content:"\f158"}.uk-icon-krw:before,.uk-icon-won:before{content:"\f159"}.uk-icon-bitcoin:before,.uk-icon-btc:before{content:"\f15a"}.uk-icon-file:before{content:"\f15b"}.uk-icon-file-text:before{content:"\f15c"}.uk-icon-sort-alpha-asc:before{content:"\f15d"}.uk-icon-sort-alpha-desc:before{content:"\f15e"}.uk-icon-sort-amount-asc:before{content:"\f160"}.uk-icon-sort-amount-desc:before{content:"\f161"}.uk-icon-sort-numeric-asc:before{content:"\f162"}.uk-icon-sort-numeric-desc:before{content:"\f163"}.uk-icon-thumbs-up:before{content:"\f164"}.uk-icon-thumbs-down:before{content:"\f165"}.uk-icon-youtube-square:before{content:"\f166"}.uk-icon-youtube:before{content:"\f167"}.uk-icon-xing:before{content:"\f168"}.uk-icon-xing-square:before{content:"\f169"}.uk-icon-youtube-play:before{content:"\f16a"}.uk-icon-dropbox:before{content:"\f16b"}.uk-icon-stack-overflow:before{content:"\f16c"}.uk-icon-instagram:before{content:"\f16d"}.uk-icon-flickr:before{content:"\f16e"}.uk-icon-adn:before{content:"\f170"}.uk-icon-bitbucket:before{content:"\f171"}.uk-icon-bitbucket-square:before{content:"\f172"}.uk-icon-tumblr:before{content:"\f173"}.uk-icon-tumblr-square:before{content:"\f174"}.uk-icon-long-arrow-down:before{content:"\f175"}.uk-icon-long-arrow-up:before{content:"\f176"}.uk-icon-long-arrow-left:before{content:"\f177"}.uk-icon-long-arrow-right:before{content:"\f178"}.uk-icon-apple:before{content:"\f179"}.uk-icon-windows:before{content:"\f17a"}.uk-icon-android:before{content:"\f17b"}.uk-icon-linux:before{content:"\f17c"}.uk-icon-dribbble:before{content:"\f17d"}.uk-icon-skype:before{content:"\f17e"}.uk-icon-foursquare:before{content:"\f180"}.uk-icon-trello:before{content:"\f181"}.uk-icon-female:before{content:"\f182"}.uk-icon-male:before{content:"\f183"}.uk-icon-gittip:before,.uk-icon-gratipay:before{content:"\f184"}.uk-icon-sun-o:before{content:"\f185"}.uk-icon-moon-o:before{content:"\f186"}.uk-icon-archive:before{content:"\f187"}.uk-icon-bug:before{content:"\f188"}.uk-icon-vk:before{content:"\f189"}.uk-icon-weibo:before{content:"\f18a"}.uk-icon-renren:before{content:"\f18b"}.uk-icon-pagelines:before{content:"\f18c"}.uk-icon-stack-exchange:before{content:"\f18d"}.uk-icon-arrow-circle-o-right:before{content:"\f18e"}.uk-icon-arrow-circle-o-left:before{content:"\f190"}.uk-icon-caret-square-o-left:before,.uk-icon-toggle-left:before{content:"\f191"}.uk-icon-dot-circle-o:before{content:"\f192"}.uk-icon-wheelchair:before{content:"\f193"}.uk-icon-vimeo-square:before{content:"\f194"}.uk-icon-try:before,.uk-icon-turkish-lira:before{content:"\f195"}.uk-icon-plus-square-o:before{content:"\f196"}.uk-icon-space-shuttle:before{content:"\f197"}.uk-icon-slack:before{content:"\f198"}.uk-icon-envelope-square:before{content:"\f199"}.uk-icon-wordpress:before{content:"\f19a"}.uk-icon-openid:before{content:"\f19b"}.uk-icon-bank:before,.uk-icon-institution:before,.uk-icon-university:before{content:"\f19c"}.uk-icon-graduation-cap:before,.uk-icon-mortar-board:before{content:"\f19d"}.uk-icon-yahoo:before{content:"\f19e"}.uk-icon-google:before{content:"\f1a0"}.uk-icon-reddit:before{content:"\f1a1"}.uk-icon-reddit-square:before{content:"\f1a2"}.uk-icon-stumbleupon-circle:before{content:"\f1a3"}.uk-icon-stumbleupon:before{content:"\f1a4"}.uk-icon-delicious:before{content:"\f1a5"}.uk-icon-digg:before{content:"\f1a6"}.uk-icon-pied-piper:before{content:"\f1a7"}.uk-icon-pied-piper-alt:before{content:"\f1a8"}.uk-icon-drupal:before{content:"\f1a9"}.uk-icon-joomla:before{content:"\f1aa"}.uk-icon-language:before{content:"\f1ab"}.uk-icon-fax:before{content:"\f1ac"}.uk-icon-building:before{content:"\f1ad"}.uk-icon-child:before{content:"\f1ae"}.uk-icon-paw:before{content:"\f1b0"}.uk-icon-spoon:before{content:"\f1b1"}.uk-icon-cube:before{content:"\f1b2"}.uk-icon-cubes:before{content:"\f1b3"}.uk-icon-behance:before{content:"\f1b4"}.uk-icon-behance-square:before{content:"\f1b5"}.uk-icon-steam:before{content:"\f1b6"}.uk-icon-steam-square:before{content:"\f1b7"}.uk-icon-recycle:before{content:"\f1b8"}.uk-icon-automobile:before,.uk-icon-car:before{content:"\f1b9"}.uk-icon-cab:before,.uk-icon-taxi:before{content:"\f1ba"}.uk-icon-tree:before{content:"\f1bb"}.uk-icon-spotify:before{content:"\f1bc"}.uk-icon-deviantart:before{content:"\f1bd"}.uk-icon-soundcloud:before{content:"\f1be"}.uk-icon-database:before{content:"\f1c0"}.uk-icon-file-pdf-o:before{content:"\f1c1"}.uk-icon-file-word-o:before{content:"\f1c2"}.uk-icon-file-excel-o:before{content:"\f1c3"}.uk-icon-file-powerpoint-o:before{content:"\f1c4"}.uk-icon-file-image-o:before,.uk-icon-file-photo-o:before,.uk-icon-file-picture-o:before{content:"\f1c5"}.uk-icon-file-archive-o:before,.uk-icon-file-zip-o:before{content:"\f1c6"}.uk-icon-file-audio-o:before,.uk-icon-file-sound-o:before{content:"\f1c7"}.uk-icon-file-movie-o:before,.uk-icon-file-video-o:before{content:"\f1c8"}.uk-icon-file-code-o:before{content:"\f1c9"}.uk-icon-vine:before{content:"\f1ca"}.uk-icon-codepen:before{content:"\f1cb"}.uk-icon-jsfiddle:before{content:"\f1cc"}.uk-icon-life-bouy:before,.uk-icon-life-buoy:before,.uk-icon-life-ring:before,.uk-icon-life-saver:before,.uk-icon-support:before{content:"\f1cd"}.uk-icon-circle-o-notch:before{content:"\f1ce"}.uk-icon-ra:before,.uk-icon-rebel:before{content:"\f1d0"}.uk-icon-empire:before,.uk-icon-ge:before{content:"\f1d1"}.uk-icon-git-square:before{content:"\f1d2"}.uk-icon-git:before{content:"\f1d3"}.uk-icon-hacker-news:before{content:"\f1d4"}.uk-icon-tencent-weibo:before{content:"\f1d5"}.uk-icon-qq:before{content:"\f1d6"}.uk-icon-wechat:before,.uk-icon-weixin:before{content:"\f1d7"}.uk-icon-paper-plane:before,.uk-icon-send:before{content:"\f1d8"}.uk-icon-paper-plane-o:before,.uk-icon-send-o:before{content:"\f1d9"}.uk-icon-history:before{content:"\f1da"}.uk-icon-circle-thin:before,.uk-icon-genderless:before{content:"\f1db"}.uk-icon-header:before{content:"\f1dc"}.uk-icon-paragraph:before{content:"\f1dd"}.uk-icon-sliders:before{content:"\f1de"}.uk-icon-share-alt:before{content:"\f1e0"}.uk-icon-share-alt-square:before{content:"\f1e1"}.uk-icon-bomb:before{content:"\f1e2"}.uk-icon-futbol-o:before,.uk-icon-soccer-ball-o:before{content:"\f1e3"}.uk-icon-tty:before{content:"\f1e4"}.uk-icon-binoculars:before{content:"\f1e5"}.uk-icon-plug:before{content:"\f1e6"}.uk-icon-slideshare:before{content:"\f1e7"}.uk-icon-twitch:before{content:"\f1e8"}.uk-icon-yelp:before{content:"\f1e9"}.uk-icon-newspaper-o:before{content:"\f1ea"}.uk-icon-wifi:before{content:"\f1eb"}.uk-icon-calculator:before{content:"\f1ec"}.uk-icon-paypal:before{content:"\f1ed"}.uk-icon-google-wallet:before{content:"\f1ee"}.uk-icon-cc-visa:before{content:"\f1f0"}.uk-icon-cc-mastercard:before{content:"\f1f1"}.uk-icon-cc-discover:before{content:"\f1f2"}.uk-icon-cc-amex:before{content:"\f1f3"}.uk-icon-cc-paypal:before{content:"\f1f4"}.uk-icon-cc-stripe:before{content:"\f1f5"}.uk-icon-bell-slash:before{content:"\f1f6"}.uk-icon-bell-slash-o:before{content:"\f1f7"}.uk-icon-trash:before{content:"\f1f8"}.uk-icon-copyright:before{content:"\f1f9"}.uk-icon-at:before{content:"\f1fa"}.uk-icon-eyedropper:before{content:"\f1fb"}.uk-icon-paint-brush:before{content:"\f1fc"}.uk-icon-birthday-cake:before{content:"\f1fd"}.uk-icon-area-chart:before{content:"\f1fe"}.uk-icon-pie-chart:before{content:"\f200"}.uk-icon-line-chart:before{content:"\f201"}.uk-icon-lastfm:before{content:"\f202"}.uk-icon-lastfm-square:before{content:"\f203"}.uk-icon-toggle-off:before{content:"\f204"}.uk-icon-toggle-on:before{content:"\f205"}.uk-icon-bicycle:before{content:"\f206"}.uk-icon-bus:before{content:"\f207"}.uk-icon-ioxhost:before{content:"\f208"}.uk-icon-angellist:before{content:"\f209"}.uk-icon-cc:before{content:"\f20a"}.uk-icon-ils:before,.uk-icon-shekel:before,.uk-icon-sheqel:before{content:"\f20b"}.uk-icon-meanpath:before{content:"\f20c"}.uk-icon-buysellads:before{content:"\f20d"}.uk-icon-connectdevelop:before{content:"\f20e"}.uk-icon-dashcube:before{content:"\f210"}.uk-icon-forumbee:before{content:"\f211"}.uk-icon-leanpub:before{content:"\f212"}.uk-icon-sellsy:before{content:"\f213"}.uk-icon-shirtsinbulk:before{content:"\f214"}.uk-icon-simplybuilt:before{content:"\f215"}.uk-icon-skyatlas:before{content:"\f216"}.uk-icon-cart-plus:before{content:"\f217"}.uk-icon-cart-arrow-down:before{content:"\f218"}.uk-icon-diamond:before{content:"\f219"}.uk-icon-ship:before{content:"\f21a"}.uk-icon-user-secret:before{content:"\f21b"}.uk-icon-motorcycle:before{content:"\f21c"}.uk-icon-street-view:before{content:"\f21d"}.uk-icon-heartbeat:before{content:"\f21e"}.uk-icon-venus:before{content:"\f221"}.uk-icon-mars:before{content:"\f222"}.uk-icon-mercury:before{content:"\f223"}.uk-icon-transgender:before{content:"\f224"}.uk-icon-transgender-alt:before{content:"\f225"}.uk-icon-venus-double:before{content:"\f226"}.uk-icon-mars-double:before{content:"\f227"}.uk-icon-venus-mars:before{content:"\f228"}.uk-icon-mars-stroke:before{content:"\f229"}.uk-icon-mars-stroke-v:before{content:"\f22a"}.uk-icon-mars-stroke-h:before{content:"\f22b"}.uk-icon-neuter:before{content:"\f22c"}.uk-icon-facebook-official:before{content:"\f230"}.uk-icon-pinterest-p:before{content:"\f231"}.uk-icon-whatsapp:before{content:"\f232"}.uk-icon-server:before{content:"\f233"}.uk-icon-user-plus:before{content:"\f234"}.uk-icon-user-times:before{content:"\f235"}.uk-icon-bed:before,.uk-icon-hotel:before{content:"\f236"}.uk-icon-viacoin:before{content:"\f237"}.uk-icon-train:before{content:"\f238"}.uk-icon-subway:before{content:"\f239"}.uk-icon-medium-logo:before{content:"\f23a"}.uk-icon-500px:before{content:"\f26e"}.uk-icon-amazon:before{content:"\f270"}.uk-icon-balance-scale:before{content:"\f24e"}.uk-icon-battery-0:before,.uk-icon-battery-empty:before{content:"\f244"}.uk-icon-battery-1:before,.uk-icon-battery-quarter:before{content:"\f243"}.uk-icon-battery-2:before,.uk-icon-battery-half:before{content:"\f242"}.uk-icon-battery-3:before,.uk-icon-battery-three-quarters:before{content:"\f241"}.uk-icon-battery-4:before,.uk-icon-battery-full:before{content:"\f240"}.uk-icon-black-tie:before{content:"\f27e"}.uk-icon-calendar-check-o:before{content:"\f274"}.uk-icon-calendar-minus-o:before{content:"\f272"}.uk-icon-calendar-plus-o:before{content:"\f271"}.uk-icon-calendar-times-o:before{content:"\f273"}.uk-icon-cc-diners-club:before{content:"\f24c"}.uk-icon-cc-jcb:before{content:"\f24b"}.uk-icon-chrome:before{content:"\f268"}.uk-icon-clone:before{content:"\f24d"}.uk-icon-commenting:before{content:"\f27a"}.uk-icon-commenting-o:before{content:"\f27b"}.uk-icon-contao:before{content:"\f26d"}.uk-icon-creative-commons:before{content:"\f25e"}.uk-icon-expeditedssl:before{content:"\f23e"}.uk-icon-firefox:before{content:"\f269"}.uk-icon-fonticons:before{content:"\f280"}.uk-icon-get-pocket:before{content:"\f265"}.uk-icon-gg:before{content:"\f260"}.uk-icon-gg-circle:before{content:"\f261"}.uk-icon-hand-lizard-o:before{content:"\f258"}.uk-icon-hand-paper-o:before,.uk-icon-hand-stop-o:before{content:"\f256"}.uk-icon-hand-peace-o:before{content:"\f25b"}.uk-icon-hand-pointer-o:before{content:"\f25a"}.uk-icon-hand-grab-o:before,.uk-icon-hand-rock-o:before{content:"\f255"}.uk-icon-hand-scissors-o:before{content:"\f257"}.uk-icon-hand-spock-o:before{content:"\f259"}.uk-icon-hourglass:before{content:"\f254"}.uk-icon-hourglass-o:before{content:"\f250"}.uk-icon-hourglass-1:before,.uk-icon-hourglass-start:before{content:"\f251"}.uk-icon-hourglass-2:before,.uk-icon-hourglass-half:before{content:"\f252"}.uk-icon-hourglass-3:before,.uk-icon-hourglass-end:before{content:"\f253"}.uk-icon-houzz:before{content:"\f27c"}.uk-icon-i-cursor:before{content:"\f246"}.uk-icon-industry:before{content:"\f275"}.uk-icon-internet-explorer:before{content:"\f26b"}.uk-icon-map:before{content:"\f279"}.uk-icon-map-o:before{content:"\f278"}.uk-icon-map-pin:before{content:"\f276"}.uk-icon-map-signs:before{content:"\f277"}.uk-icon-mouse-pointer:before{content:"\f245"}.uk-icon-object-group:before{content:"\f247"}.uk-icon-object-ungroup:before{content:"\f248"}.uk-icon-odnoklassniki:before{content:"\f263"}.uk-icon-odnoklassniki-square:before{content:"\f264"}.uk-icon-opencart:before{content:"\f23d"}.uk-icon-opera:before{content:"\f26a"}.uk-icon-optin-monster:before{content:"\f23c"}.uk-icon-registered:before{content:"\f25d"}.uk-icon-safari:before{content:"\f267"}.uk-icon-sticky-note:before{content:"\f249"}.uk-icon-sticky-note-o:before{content:"\f24a"}.uk-icon-television:before,.uk-icon-tv:before{content:"\f26c"}.uk-icon-trademark:before{content:"\f25c"}.uk-icon-tripadvisor:before{content:"\f262"}.uk-icon-vimeo:before{content:"\f27d"}.uk-icon-wikipedia-w:before{content:"\f266"}.uk-icon-y-combinator:before,.uk-icon-yc:before{content:"\f23b"}.uk-icon-y-combinator-square:before,.uk-icon-yc-square:before{content:"\f1d4"}.uk-icon-bluetooth:before{content:"\f293"}.uk-icon-bluetooth-b:before{content:"\f294"}.uk-icon-codiepie:before{content:"\f284"}.uk-icon-credit-card-alt:before{content:"\f283"}.uk-icon-edge:before{content:"\f282"}.uk-icon-fort-awesome:before{content:"\f286"}.uk-icon-hashtag:before{content:"\f292"}.uk-icon-mixcloud:before{content:"\f289"}.uk-icon-modx:before{content:"\f285"}.uk-icon-pause-circle:before{content:"\f28b"}.uk-icon-pause-circle-o:before{content:"\f28c"}.uk-icon-percent:before{content:"\f295"}.uk-icon-product-hunt:before{content:"\f288"}.uk-icon-reddit-alien:before{content:"\f281"}.uk-icon-scribd:before{content:"\f28a"}.uk-icon-shopping-bag:before{content:"\f290"}.uk-icon-shopping-basket:before{content:"\f291"}.uk-icon-stop-circle:before{content:"\f28d"}.uk-icon-stop-circle-o:before{content:"\f28e"}.uk-icon-usb:before{content:"\f287"}.uk-icon-american-sign-language-interpreting:before,.uk-icon-asl-interpreting:before{content:"\f2a3"}.uk-icon-assistive-listening-systems:before{content:"\f2a2"}.uk-icon-audio-description:before{content:"\f29e"}.uk-icon-blind:before{content:"\f29d"}.uk-icon-braille:before{content:"\f2a1"}.uk-icon-deaf:before,.uk-icon-deafness:before{content:"\f2a4"}.uk-icon-envira:before{content:"\f299"}.uk-icon-fa:before,.uk-icon-font-awesome:before{content:"\f2b4"}.uk-icon-first-order:before{content:"\f2b0"}.uk-icon-gitlab:before{content:"\f296"}.uk-icon-glide:before{content:"\f2a5"}.uk-icon-glide-g:before{content:"\f2a6"}.uk-icon-hard-of-hearing:before{content:"\f2a4"}.uk-icon-low-vision:before{content:"\f2a8"}.uk-icon-question-circle-o:before{content:"\f29c"}.uk-icon-sign-language:before,.uk-icon-signing:before{content:"\f2a7"}.uk-icon-snapchat:before{content:"\f2ab"}.uk-icon-snapchat-ghost:before{content:"\f2ac"}.uk-icon-snapchat-square:before{content:"\f2ad"}.uk-icon-themeisle:before{content:"\f2b2"}.uk-icon-universal-access:before{content:"\f29a"}.uk-icon-viadeo:before{content:"\f2a9"}.uk-icon-viadeo-square:before{content:"\f2aa"}.uk-icon-volume-control-phone:before{content:"\f2a0"}.uk-icon-wheelchair-alt:before{content:"\f29b"}.uk-icon-wpbeginner:before{content:"\f297"}.uk-icon-wpforms:before{content:"\f298"}.uk-icon-yoast:before{content:"\f2b1"}.uk-icon-adress-book:before{content:"\f2b9"}.uk-icon-adress-book-o:before{content:"\f2ba"}.uk-icon-adress-card:before{content:"\f2bb"}.uk-icon-adress-card-o:before{content:"\f2bc"}.uk-icon-bandcamp:before{content:"\f2d5"}.uk-icon-bath:before,.uk-icon-bathub:before{content:"\f2cd"}.uk-icon-drivers-license:before{content:"\f2c2"}.uk-icon-drivers-license-o:before{content:"\f2c3"}.uk-icon-eercast:before{content:"\f2da"}.uk-icon-envelope-open:before{content:"\f2b6"}.uk-icon-envelope-open-o:before{content:"\f2b7"}.uk-icon-etsy:before{content:"\f2d7"}.uk-icon-free-code-camp:before{content:"\f2c5"}.uk-icon-grav:before{content:"\f2d6"}.uk-icon-handshake-o:before{content:"\f2b5"}.uk-icon-id-badge:before{content:"\f2c1"}.uk-icon-id-card:before{content:"\f2c2"}.uk-icon-id-card-o:before{content:"\f2c3"}.uk-icon-imdb:before{content:"\f2d8"}.uk-icon-linode:before{content:"\f2b8"}.uk-icon-meetup:before{content:"\f2e0"}.uk-icon-microchip:before{content:"\f2db"}.uk-icon-podcast:before{content:"\f2ce"}.uk-icon-quora:before{content:"\f2c4"}.uk-icon-ravelry:before{content:"\f2d9"}.uk-icon-s15:before{content:"\f2cd"}.uk-icon-shower:before{content:"\f2cc"}.uk-icon-snowflake-o:before{content:"\f2dc"}.uk-icon-superpowers:before{content:"\f2dd"}.uk-icon-telegram:before{content:"\f2c6"}.uk-icon-thermometer:before{content:"\f2c7"}.uk-icon-thermometer-0:before{content:"\f2cb"}.uk-icon-thermometer-1:before{content:"\f2ca"}.uk-icon-thermometer-2:before{content:"\f2c9"}.uk-icon-thermometer-3:before{content:"\f2c8"}.uk-icon-thermometer-4:before{content:"\f2c7"}.uk-icon-thermometer-empty:before{content:"\f2cb"}.uk-icon-thermometer-full:before{content:"\f2c7"}.uk-icon-thermometer-half:before{content:"\f2c9"}.uk-icon-thermometer-quarter:before{content:"\f2ca"}.uk-icon-thermometer-three-quarters:before{content:"\f2c8"}.uk-icon-times-rectangle:before{content:"\f2d3"}.uk-icon-times-rectangle-o:before{content:"\f2d4"}.uk-icon-user-circle:before{content:"\f2bd"}.uk-icon-user-circle-o:before{content:"\f2be"}.uk-icon-user-o:before{content:"\f2c0"}.uk-icon-vcard:before{content:"\f2bb"}.uk-icon-vcard-o:before{content:"\f2bc"}.uk-icon-widow-close:before{content:"\f2d3"}.uk-icon-widow-close-o:before{content:"\f2d4"}.uk-icon-window-maximize:before{content:"\f2d0"}.uk-icon-window-minimize:before{content:"\f2d1"}.uk-icon-window-restore:before{content:"\f2d2"}.uk-icon-wpexplorer:before{content:"\f2de"}.uk-close::-moz-focus-inner{border:0;padding:0}.uk-close{-webkit-appearance:none;margin:0;border:none;overflow:visible;font:inherit;color:inherit;text-transform:none;padding:0;background:0 0;box-sizing:content-box;width:20px;line-height:20px;text-align:center;vertical-align:middle;opacity:.3}.uk-border-circle,.uk-close-alt{border-radius:50%}.uk-badge-notification,.uk-container,.uk-dropdown,.uk-dropdown-blank,.uk-modal-dialog,.uk-overlay-area-content,.uk-responsive-height,.uk-responsive-width,.uk-scrollable-box,.uk-thumbnail,[class*=uk-height]{box-sizing:border-box}.uk-close:after{display:block;content:"\f00d";font-family:FontAwesome}.uk-close:focus,.uk-close:hover{opacity:.5;outline:0;color:inherit;text-decoration:none;cursor:pointer}.uk-badge,a.uk-badge:hover{color:#fff}.uk-close-alt{padding:2px;background:#fff;opacity:1;box-shadow:0 0 0 1px rgba(0,0,0,.1),0 0 6px rgba(0,0,0,.3)}.uk-close-alt:focus,.uk-close-alt:hover{opacity:1}.uk-close-alt:after{opacity:.5}.uk-close-alt:focus:after,.uk-close-alt:hover:after{opacity:.8}.uk-badge{display:inline-block;padding:0 5px;background:#337ab7;font-size:10px;font-weight:700;line-height:14px;text-align:center;vertical-align:middle;text-transform:none;border:1px solid rgba(0,0,0,.06);border-radius:2px;text-shadow:0 1px 0 rgba(0,0,0,.1)}.uk-badge-notification{min-width:16px;border-radius:500px;font-size:11px;line-height:16px}.uk-badge-success{background-color:#5cb85c}.uk-badge-warning{background-color:#f0ad4e}.uk-badge-danger{background-color:#d9534f}.uk-alert{margin-bottom:15px;padding:10px;background:#d9edf7;color:#31708f;border:1px solid rgba(49,112,143,.3);border-radius:2px;text-shadow:0 1px 0 #fff}.uk-alert>:last-child{margin-bottom:0}.uk-alert h1,.uk-alert h2,.uk-alert h3,.uk-alert h4,.uk-alert h5,.uk-alert h6{color:inherit}.uk-alert>.uk-close:first-child{float:right}.uk-alert>.uk-close:first-child+*{margin-top:0}.uk-alert-success{background:#dff0d8;color:#3c763d;border-color:rgba(60,118,61,.3)}.uk-alert-warning{background:#fcf8e7;color:#8a6d3b;border-color:rgba(138,109,59,.3)}.uk-alert-danger{background:#f2dede;color:#a94442;border-color:rgba(169,68,66,.3)}.uk-alert-large{padding:20px}.uk-alert-large>.uk-close:first-child{margin:-10px -10px 0 0}.uk-overlay,.uk-thumbnail{margin:0;display:inline-block;max-width:100%}.uk-overlay-area-content>:last-child,.uk-overlay-panel.uk-flex>*>:last-child,.uk-overlay-panel>:last-child,.uk-overlay>:first-child{margin-bottom:0}.uk-thumbnail{padding:4px;border:1px solid #ddd;background:#fff;border-radius:2px}a.uk-thumbnail:focus,a.uk-thumbnail:hover{border-color:#aaa;background-color:#fff;text-decoration:none;outline:0}.uk-thumbnail-caption{padding-top:4px;text-align:center;color:#444}.uk-thumbnail-mini{width:150px}.uk-thumbnail-small{width:200px}.uk-thumbnail-medium{width:300px}.uk-thumbnail-large{width:400px}.uk-thumbnail-expand,.uk-thumbnail-expand>img{width:100%}.uk-overlay{position:relative;vertical-align:middle;overflow:hidden;-webkit-transform:translateZ(0)}.uk-overlay-area:empty:before,.uk-overlay-icon:before{height:50px;margin-top:-25px;margin-left:-25px;font-size:50px;line-height:1;text-align:center;font-family:FontAwesome}.uk-overlay.uk-border-circle{-webkit-mask-image:-webkit-radial-gradient(circle,#fff 100%,#000 100%)}.uk-overlay-panel{position:absolute;top:0;bottom:0;left:0;right:0;padding:20px;color:#fff}.uk-overlay-panel h1,.uk-overlay-panel h2,.uk-overlay-panel h3,.uk-overlay-panel h4,.uk-overlay-panel h5,.uk-overlay-panel h6{color:inherit}.uk-overlay-panel a:not([class]){color:inherit;text-decoration:underline}.uk-overlay-panel a[class*=uk-icon-]:not(.uk-icon-button){color:inherit}.uk-overlay-active :not(.uk-active)>.uk-overlay-panel:not(.uk-ignore),.uk-overlay-hover:not(:hover):not(.uk-hover) .uk-overlay-panel:not(.uk-ignore){opacity:0}.uk-overlay-background{background:rgba(0,0,0,.5)}.uk-overlay-image{padding:0}.uk-overlay-top{bottom:auto}.uk-overlay-bottom{top:auto}.uk-overlay-left{right:auto}.uk-overlay-right{left:auto}.uk-overlay-icon:before{position:absolute;top:50%;left:50%;width:50px;color:#fff}.uk-overlay-blur,.uk-overlay-fade,.uk-overlay-grayscale,.uk-overlay-scale,.uk-overlay-spin,[class*=uk-overlay-slide]{transition-duration:.3s;transition-timing-function:ease-out;transition-property:opacity,transform,filter}.uk-overlay-active .uk-overlay-fade,.uk-overlay-active .uk-overlay-scale,.uk-overlay-active .uk-overlay-spin,.uk-overlay-active [class*=uk-overlay-slide]{transition-duration:.8s}.uk-overlay-fade{opacity:.7}.uk-overlay-active .uk-active>.uk-overlay-fade,.uk-overlay-hover.uk-hover .uk-overlay-fade,.uk-overlay-hover:hover .uk-overlay-fade{opacity:1}.uk-overlay-scale{-webkit-transform:scale(1);transform:scale(1)}.uk-overlay-active .uk-active>.uk-overlay-scale,.uk-overlay-hover.uk-hover .uk-overlay-scale,.uk-overlay-hover:hover .uk-overlay-scale{-webkit-transform:scale(1.1);transform:scale(1.1)}.uk-overlay-spin{-webkit-transform:scale(1) rotate(0);transform:scale(1) rotate(0)}.uk-overlay-active .uk-active>.uk-overlay-spin,.uk-overlay-hover.uk-hover .uk-overlay-spin,.uk-overlay-hover:hover .uk-overlay-spin{-webkit-transform:scale(1.1) rotate(3deg);transform:scale(1.1) rotate(3deg)}.uk-overlay-grayscale{-webkit-filter:grayscale(100%);filter:grayscale(100%)}.uk-overlay-active .uk-active>.uk-overlay-grayscale,.uk-overlay-hover.uk-hover .uk-overlay-grayscale,.uk-overlay-hover:hover .uk-overlay-grayscale{-webkit-filter:grayscale(0);filter:grayscale(0)}[class*=uk-overlay-slide]{opacity:0}.uk-overlay-slide-top{-webkit-transform:translateY(-100%);transform:translateY(-100%)}.uk-overlay-slide-bottom{-webkit-transform:translateY(100%);transform:translateY(100%)}.uk-overlay-slide-left{-webkit-transform:translateX(-100%);transform:translateX(-100%)}.uk-overlay-slide-right{-webkit-transform:translateX(100%);transform:translateX(100%)}.uk-overlay-active .uk-active>[class*=uk-overlay-slide],.uk-overlay-hover.uk-hover [class*=uk-overlay-slide],.uk-overlay-hover:hover [class*=uk-overlay-slide]{opacity:1;-webkit-transform:translateX(0) translateY(0);transform:translateX(0) translateY(0)}.uk-overlay-area,.uk-overlay-caption{-webkit-transition:opacity .15s linear;-webkit-transform:translate3d(0,0,0);position:absolute;right:0;bottom:0}.uk-overlay-area{top:0;left:0;background:rgba(0,0,0,.3);opacity:0;transition:opacity .15s linear}.uk-overlay-toggle.uk-hover .uk-overlay-area,.uk-overlay-toggle:hover .uk-overlay-area,.uk-overlay.uk-hover .uk-overlay-area,.uk-overlay:hover .uk-overlay-area{opacity:1}.uk-overlay-area:empty:before{position:absolute;top:50%;left:50%;width:50px;color:#fff}.uk-overlay-area:not(:empty),.uk-vertical-align{font-size:0}.uk-overlay-area:not(:empty):before{content:'';display:inline-block;height:100%;vertical-align:middle}.uk-overlay-area-content{display:inline-block;width:100%;vertical-align:middle;font-size:1rem;text-align:center;padding:0 15px;color:#fff}.uk-overlay-area-content a:not([class]),.uk-overlay-area-content a:not([class]):hover{color:inherit}.uk-overlay-caption{left:0;padding:15px;background:rgba(0,0,0,.5);color:#fff;opacity:0;transition:opacity .15s linear}.uk-overlay-toggle.uk-hover .uk-overlay-caption,.uk-overlay-toggle:hover .uk-overlay-caption,.uk-overlay.uk-hover .uk-overlay-caption,.uk-overlay:hover .uk-overlay-caption{opacity:1}[class*=uk-column-]{-webkit-column-gap:25px;-moz-column-gap:25px;column-gap:25px}.uk-column-1-2{-webkit-column-count:2;-moz-column-count:2;column-count:2}.uk-column-1-3{-webkit-column-count:3;-moz-column-count:3;column-count:3}.uk-column-1-4{-webkit-column-count:4;-moz-column-count:4;column-count:4}.uk-column-1-5{-webkit-column-count:5;-moz-column-count:5;column-count:5}.uk-column-1-6{-webkit-column-count:6;-moz-column-count:6;column-count:6}@media (min-width:480px){.uk-column-small-1-2{-webkit-column-count:2;-moz-column-count:2;column-count:2}.uk-column-small-1-3{-webkit-column-count:3;-moz-column-count:3;column-count:3}.uk-column-small-1-4{-webkit-column-count:4;-moz-column-count:4;column-count:4}.uk-column-small-1-5{-webkit-column-count:5;-moz-column-count:5;column-count:5}.uk-column-small-1-6{-webkit-column-count:6;-moz-column-count:6;column-count:6}}@media (min-width:768px){.uk-column-medium-1-2{-webkit-column-count:2;-moz-column-count:2;column-count:2}.uk-column-medium-1-3{-webkit-column-count:3;-moz-column-count:3;column-count:3}.uk-column-medium-1-4{-webkit-column-count:4;-moz-column-count:4;column-count:4}.uk-column-medium-1-5{-webkit-column-count:5;-moz-column-count:5;column-count:5}.uk-column-medium-1-6{-webkit-column-count:6;-moz-column-count:6;column-count:6}}@media (min-width:960px){.uk-column-large-1-2{-webkit-column-count:2;-moz-column-count:2;column-count:2}.uk-column-large-1-3{-webkit-column-count:3;-moz-column-count:3;column-count:3}.uk-column-large-1-4{-webkit-column-count:4;-moz-column-count:4;column-count:4}.uk-column-large-1-5{-webkit-column-count:5;-moz-column-count:5;column-count:5}.uk-column-large-1-6{-webkit-column-count:6;-moz-column-count:6;column-count:6}}@media (min-width:1220px){.uk-column-xlarge-1-2{-webkit-column-count:2;-moz-column-count:2;column-count:2}.uk-column-xlarge-1-3{-webkit-column-count:3;-moz-column-count:3;column-count:3}.uk-column-xlarge-1-4{-webkit-column-count:4;-moz-column-count:4;column-count:4}.uk-column-xlarge-1-5{-webkit-column-count:5;-moz-column-count:5;column-count:5}.uk-column-xlarge-1-6{-webkit-column-count:6;-moz-column-count:6;column-count:6}}[class*=uk-animation-]{-webkit-animation-duration:.5s;animation-duration:.5s;-webkit-animation-timing-function:ease-out;animation-timing-function:ease-out;-webkit-animation-fill-mode:both;animation-fill-mode:both}@media screen{[data-uk-scrollspy*=uk-animation-]:not([data-uk-scrollspy*=target]){opacity:0}}.uk-animation-fade{-webkit-animation-name:uk-fade;animation-name:uk-fade;-webkit-animation-duration:.8s;animation-duration:.8s;-webkit-animation-timing-function:linear!important;animation-timing-function:linear!important}.uk-animation-scale-up{-webkit-animation-name:uk-fade-scale-02;animation-name:uk-fade-scale-02}.uk-animation-scale-down{-webkit-animation-name:uk-fade-scale-18;animation-name:uk-fade-scale-18}.uk-animation-slide-top{-webkit-animation-name:uk-fade-top;animation-name:uk-fade-top}.uk-animation-slide-bottom{-webkit-animation-name:uk-fade-bottom;animation-name:uk-fade-bottom}.uk-animation-slide-left{-webkit-animation-name:uk-fade-left;animation-name:uk-fade-left}.uk-animation-slide-right{-webkit-animation-name:uk-fade-right;animation-name:uk-fade-right}.uk-animation-scale{-webkit-animation-name:uk-scale-12;animation-name:uk-scale-12}.uk-animation-shake{-webkit-animation-name:uk-shake;animation-name:uk-shake}.uk-animation-reverse{-webkit-animation-direction:reverse;animation-direction:reverse;-webkit-animation-timing-function:ease-in;animation-timing-function:ease-in}.uk-animation-15{-webkit-animation-duration:15s;animation-duration:15s}.uk-animation-top-left{-webkit-transform-origin:0 0;transform-origin:0 0}.uk-animation-top-center{-webkit-transform-origin:50% 0;transform-origin:50% 0}.uk-animation-top-right{-webkit-transform-origin:100% 0;transform-origin:100% 0}.uk-animation-middle-left{-webkit-transform-origin:0 50%;transform-origin:0 50%}.uk-animation-middle-right{-webkit-transform-origin:100% 50%;transform-origin:100% 50%}.uk-animation-bottom-left{-webkit-transform-origin:0 100%;transform-origin:0 100%}.uk-animation-bottom-center{-webkit-transform-origin:50% 100%;transform-origin:50% 100%}.uk-animation-bottom-right{-webkit-transform-origin:100% 100%;transform-origin:100% 100%}.uk-animation-hover:not(:hover),.uk-animation-hover:not(:hover) [class*=uk-animation-],.uk-touch .uk-animation-hover:not(.uk-hover),.uk-touch .uk-animation-hover:not(.uk-hover) [class*=uk-animation-]{-webkit-animation-name:none;animation-name:none}@-webkit-keyframes uk-fade{0%{opacity:0}100%{opacity:1}}@keyframes uk-fade{0%{opacity:0}100%{opacity:1}}@-webkit-keyframes uk-fade-top{0%{opacity:0;-webkit-transform:translateY(-100%)}100%{opacity:1;-webkit-transform:translateY(0)}}@keyframes uk-fade-top{0%{opacity:0;transform:translateY(-100%)}100%{opacity:1;transform:translateY(0)}}@-webkit-keyframes uk-fade-bottom{0%{opacity:0;-webkit-transform:translateY(100%)}100%{opacity:1;-webkit-transform:translateY(0)}}@keyframes uk-fade-bottom{0%{opacity:0;transform:translateY(100%)}100%{opacity:1;transform:translateY(0)}}@-webkit-keyframes uk-fade-left{0%{opacity:0;-webkit-transform:translateX(-100%)}100%{opacity:1;-webkit-transform:translateX(0)}}@keyframes uk-fade-left{0%{opacity:0;transform:translateX(-100%)}100%{opacity:1;transform:translateX(0)}}@-webkit-keyframes uk-fade-right{0%{opacity:0;-webkit-transform:translateX(100%)}100%{opacity:1;-webkit-transform:translateX(0)}}@keyframes uk-fade-right{0%{opacity:0;transform:translateX(100%)}100%{opacity:1;transform:translateX(0)}}@-webkit-keyframes uk-fade-scale-02{0%{opacity:0;-webkit-transform:scale(.2)}100%{opacity:1;-webkit-transform:scale(1)}}@keyframes uk-fade-scale-02{0%{opacity:0;transform:scale(.2)}100%{opacity:1;transform:scale(1)}}@-webkit-keyframes uk-fade-scale-15{0%{opacity:0;-webkit-transform:scale(1.5)}100%{opacity:1;-webkit-transform:scale(1)}}@keyframes uk-fade-scale-15{0%{opacity:0;transform:scale(1.5)}100%{opacity:1;transform:scale(1)}}@-webkit-keyframes uk-fade-scale-18{0%{opacity:0;-webkit-transform:scale(1.8)}100%{opacity:1;-webkit-transform:scale(1)}}@keyframes uk-fade-scale-18{0%{opacity:0;transform:scale(1.8)}100%{opacity:1;transform:scale(1)}}@-webkit-keyframes uk-slide-left{0%{-webkit-transform:translateX(-100%)}100%{-webkit-transform:translateX(0)}}@keyframes uk-slide-left{0%{transform:translateX(-100%)}100%{transform:translateX(0)}}@-webkit-keyframes uk-slide-right{0%{-webkit-transform:translateX(100%)}100%{-webkit-transform:translateX(0)}}@keyframes uk-slide-right{0%{transform:translateX(100%)}100%{transform:translateX(0)}}@-webkit-keyframes uk-slide-left-33{0%{-webkit-transform:translateX(33%)}100%{-webkit-transform:translateX(0)}}@keyframes uk-slide-left-33{0%{transform:translateX(33%)}100%{transform:translateX(0)}}@-webkit-keyframes uk-slide-right-33{0%{-webkit-transform:translateX(-33%)}100%{-webkit-transform:translateX(0)}}@keyframes uk-slide-right-33{0%{transform:translateX(-33%)}100%{transform:translateX(0)}}@-webkit-keyframes uk-scale-12{0%{-webkit-transform:scale(1.2)}100%{-webkit-transform:scale(1)}}@keyframes uk-scale-12{0%{transform:scale(1.2)}100%{transform:scale(1)}}@-webkit-keyframes uk-rotate{0%{-webkit-transform:rotate(0)}100%{-webkit-transform:rotate(359deg)}}@keyframes uk-rotate{0%{transform:rotate(0)}100%{transform:rotate(359deg)}}@-webkit-keyframes uk-shake{0%,100%{-webkit-transform:translateX(0)}10%{-webkit-transform:translateX(-9px)}20%{-webkit-transform:translateX(8px)}30%{-webkit-transform:translateX(-7px)}40%{-webkit-transform:translateX(6px)}50%{-webkit-transform:translateX(-5px)}60%{-webkit-transform:translateX(4px)}70%{-webkit-transform:translateX(-3px)}80%{-webkit-transform:translateX(2px)}90%{-webkit-transform:translateX(-1px)}}@keyframes uk-shake{0%,100%{transform:translateX(0)}10%{transform:translateX(-9px)}20%{transform:translateX(8px)}30%{transform:translateX(-7px)}40%{transform:translateX(6px)}50%{transform:translateX(-5px)}60%{transform:translateX(4px)}70%{transform:translateX(-3px)}80%{transform:translateX(2px)}90%{transform:translateX(-1px)}}@-webkit-keyframes uk-slide-top-fixed{0%{opacity:0;-webkit-transform:translateY(-10px)}100%{opacity:1;-webkit-transform:translateY(0)}}@keyframes uk-slide-top-fixed{0%{opacity:0;transform:translateY(-10px)}100%{opacity:1;transform:translateY(0)}}@-webkit-keyframes uk-slide-bottom-fixed{0%{opacity:0;-webkit-transform:translateY(10px)}100%{opacity:1;-webkit-transform:translateY(0)}}@keyframes uk-slide-bottom-fixed{0%{opacity:0;transform:translateY(10px)}100%{opacity:1;transform:translateY(0)}}.uk-dropdown,.uk-dropdown-blank{display:none;position:absolute;z-index:1020;width:200px}.uk-dropdown{padding:15px;background:#fff;color:#444;font-size:1rem;vertical-align:top;border:1px solid #ddd;border-radius:2px}.uk-dropdown:focus{outline:0}.uk-open>.uk-dropdown,.uk-open>.uk-dropdown-blank{display:block;-webkit-animation:uk-fade .2s ease-in-out;animation:uk-fade .2s ease-in-out;-webkit-transform-origin:0 0;transform-origin:0 0}.uk-dropdown-top{margin-top:-5px}.uk-dropdown-bottom{margin-top:5px}.uk-dropdown-left{margin-left:-5px}.uk-dropdown-right{margin-left:5px}.uk-dropdown .uk-nav{margin:0 -15px}.uk-dropdown-grid>[class*=uk-width-]>.uk-panel+.uk-panel,.uk-dropdown-stack>.uk-dropdown-grid>[class*=uk-width-]:nth-child(n+2),.uk-grid .uk-dropdown-grid+.uk-dropdown-grid{margin-top:15px}@media (min-width:768px){.uk-dropdown:not(.uk-dropdown-stack)>.uk-dropdown-grid{margin-left:-15px;margin-right:-15px}.uk-dropdown:not(.uk-dropdown-stack)>.uk-dropdown-grid>[class*=uk-width-]{padding-left:15px;padding-right:15px}.uk-dropdown:not(.uk-dropdown-stack)>.uk-dropdown-grid>[class*=uk-width-]:nth-child(n+2){border-left:1px solid #ddd}.uk-dropdown-width-2:not(.uk-dropdown-stack){width:400px}.uk-dropdown-width-3:not(.uk-dropdown-stack){width:600px}.uk-dropdown-width-4:not(.uk-dropdown-stack){width:800px}.uk-dropdown-width-5:not(.uk-dropdown-stack){width:1000px}}@media (max-width:767px){.uk-dropdown-grid>[class*=uk-width-]{width:100%}.uk-dropdown-grid>[class*=uk-width-]:nth-child(n+2){margin-top:15px}}.uk-dropdown-stack>.uk-dropdown-grid>[class*=uk-width-]{width:100%}.uk-dropdown-small{min-width:150px;width:auto;padding:5px;white-space:nowrap}.uk-dropdown-small .uk-nav{margin:0 -5px}.uk-dropdown-navbar{margin-top:6px;background:#fff;color:#444;left:-1px}.uk-open>.uk-dropdown-navbar{-webkit-animation:uk-slide-top-fixed .2s ease-in-out;animation:uk-slide-top-fixed .2s ease-in-out}.uk-dropdown-scrollable{overflow-y:auto;max-height:200px}.uk-dropdown-navbar.uk-dropdown-flip{left:auto}.uk-modal{display:none;position:fixed;top:0;right:0;bottom:0;left:0;z-index:1010;overflow-y:auto;-webkit-overflow-scrolling:touch;background:rgba(0,0,0,.6);opacity:0;-webkit-transition:opacity .15s linear;transition:opacity .15s linear;touch-action:cross-slide-y pinch-zoom double-tap-zoom}.uk-modal-caption,.uk-modal-page,.uk-modal-page body,.uk-nbfc,.uk-text-truncate{overflow:hidden}.uk-modal.uk-open{opacity:1}.uk-modal-dialog{position:relative;margin:50px auto;padding:20px;width:600px;max-width:100%;max-width:calc(100% - 20px);background:#fff;opacity:0;-webkit-transform:translateY(-100px);transform:translateY(-100px);-webkit-transition:opacity .3s linear,-webkit-transform .3s ease-out;transition:opacity .3s linear,transform .3s ease-out;border-radius:2px;box-shadow:0 0 10px rgba(0,0,0,.3)}@media (max-width:767px){.uk-modal-dialog{width:auto;margin:10px auto}}.uk-open .uk-modal-dialog{opacity:1;-webkit-transform:translateY(0);transform:translateY(0)}.uk-modal-dialog>:not([class*=uk-modal-]):last-child{margin-bottom:0}.uk-modal-dialog>.uk-close:first-child{margin:-10px -10px 0 0;float:right}.uk-modal-dialog>.uk-close:first-child+:not([class*=uk-modal-]){margin-top:0}.uk-modal-dialog-lightbox{margin:15px auto;padding:0;max-width:95%;max-width:calc(100% - 30px);min-height:50px;border-radius:0}.uk-modal-dialog-lightbox>.uk-close:first-child{position:absolute;top:-12px;right:-12px;margin:0;float:none}@media (max-width:767px){.uk-modal-dialog-lightbox>.uk-close:first-child{top:-7px;right:-7px}}.uk-modal-dialog-blank{margin:0;padding:0;width:100%;max-width:100%;-webkit-transition:opacity .3s linear;transition:opacity .3s linear}.uk-modal-dialog-blank>.uk-close:first-child{position:absolute;top:20px;right:20px;z-index:1;margin:0;float:none}@media (min-width:768px){.uk-modal-dialog-large{width:930px}}@media (min-width:1220px){.uk-modal-dialog-large{width:1130px}}.uk-modal-header{margin:-20px -20px 15px;padding:20px;border-bottom:1px solid #ddd;border-radius:2px 2px 0 0;background:#fafafa}.uk-modal-footer{margin:15px -20px -20px;padding:20px;border-top:1px solid #ddd;border-radius:0 0 2px 2px;background:#fafafa}.uk-modal-footer>:last-child,.uk-modal-header>:last-child,.uk-overflow-container>:last-child,.uk-scrollable-box>:last-child{margin-bottom:0}.uk-modal-caption{position:absolute;left:0;right:0;bottom:-20px;margin-bottom:-10px;color:#fff;text-align:center;text-overflow:ellipsis;white-space:nowrap}.uk-modal-spinner{position:absolute;top:50%;left:50%;-webkit-transform:translate(-50%,-50%);transform:translate(-50%,-50%);font-size:25px;color:#ddd}.uk-offcanvas,.uk-offcanvas-bar{position:fixed;left:0;top:0;bottom:0}.uk-modal-spinner:after{display:block;font-family:FontAwesome;-webkit-animation:uk-rotate 2s infinite linear;animation:uk-rotate 2s infinite linear}.uk-clearfix:after,.uk-clearfix:before,.uk-container:after,.uk-container:before,.uk-offcanvas-bar:after{content:""}.uk-offcanvas{display:none;right:0;z-index:1000;touch-action:none;background:rgba(0,0,0,.1)}.uk-offcanvas.uk-active{display:block}.uk-offcanvas-page{position:fixed;-webkit-transition:margin-left .3s ease-in-out;transition:margin-left .3s ease-in-out;margin-left:0}.uk-offcanvas-bar{-webkit-transform:translateX(-100%);transform:translateX(-100%);z-index:1001;width:270px;max-width:100%;background:#333;overflow-y:auto;-webkit-overflow-scrolling:touch;-webkit-transition:-webkit-transform .3s ease-in-out;transition:transform .3s ease-in-out;-ms-scroll-chaining:none}.uk-offcanvas-bar-flip:after,.uk-offcanvas-bar:after{width:1px;background:rgba(0,0,0,.6);box-shadow:0 0 5px 2px rgba(0,0,0,.6)}.uk-offcanvas.uk-active .uk-offcanvas-bar.uk-offcanvas-bar-show{-webkit-transform:translateX(0);transform:translateX(0)}.uk-offcanvas-bar-flip{left:auto;right:0;-webkit-transform:translateX(100%);transform:translateX(100%)}.uk-offcanvas-bar[mode=none]{-webkit-transition:none;transition:none}.uk-offcanvas-bar[mode=reveal]{-webkit-transform:translateX(0);transform:translateX(0);clip:rect(0,0,100vh,0);-webkit-transition:-webkit-transform .3s ease-in-out,clip .3s ease-in-out;transition:transform .3s ease-in-out,clip .3s ease-in-out}.uk-offcanvas-bar-flip[mode=reveal]{clip:none;-webkit-transform:translateX(100%);transform:translateX(100%)}.uk-offcanvas-bar-flip[mode=reveal]>*{-webkit-transform:translateX(-100%);transform:translateX(-100%);-webkit-transition:-webkit-transform .3s ease-in-out;transition:transform .3s ease-in-out}.uk-offcanvas.uk-active .uk-offcanvas-bar-flip[mode=reveal].uk-offcanvas-bar-show>*{-webkit-transform:translateX(0);transform:translateX(0)}.uk-offcanvas .uk-panel{margin:20px 15px;color:#777;text-shadow:0 1px 0 rgba(0,0,0,.5)}.uk-offcanvas .uk-panel a:not([class]),.uk-offcanvas .uk-panel-title{color:#ccc}.uk-offcanvas .uk-panel a:not([class]):hover{color:#fff}.uk-offcanvas-bar:after{display:block;position:absolute;top:0;bottom:0;right:0}.uk-offcanvas-bar-flip:after{right:auto;left:0}.uk-switcher{margin:0;padding:0;list-style:none;touch-action:cross-slide-y pinch-zoom double-tap-zoom}.uk-switcher>:not(.uk-active){display:none}.uk-text-large{font-size:1.28rem;line-height:1.32rem;font-weight:400}.uk-text-bold{font-weight:700}.uk-text-muted{color:#999!important}.uk-text-primary{color:#337ab7!important}.uk-text-success{color:#5cb85c!important}.uk-text-warning{color:#f0ad4e!important}.uk-text-danger{color:#d9534f!important}.uk-text-contrast{color:#fff!important}.uk-text-left{text-align:left!important}.uk-text-right{text-align:right!important}.uk-text-center{text-align:center!important}.uk-text-justify{text-align:justify!important}.uk-text-top{vertical-align:top!important}.uk-text-middle{vertical-align:middle!important}.uk-text-bottom{vertical-align:bottom!important}@media (max-width:959px){.uk-text-center-medium{text-align:center!important}.uk-text-left-medium{text-align:left!important}}@media (max-width:767px){.uk-text-center-small{text-align:center!important}.uk-text-left-small{text-align:left!important}}.uk-text-nowrap{white-space:nowrap}.uk-text-truncate{text-overflow:ellipsis;white-space:nowrap}.uk-text-break{word-wrap:break-word;-webkit-hyphens:auto;-ms-hyphens:auto;-moz-hyphens:auto;hyphens:auto}.uk-text-capitalize{text-transform:capitalize!important}.uk-text-lowercase{text-transform:lowercase!important}.uk-text-uppercase{text-transform:uppercase!important}.uk-container{max-width:980px;padding:0 25px}@media (min-width:1220px){.uk-container{max-width:1200px;padding:0 35px}}.uk-container:after,.uk-container:before{display:table}.uk-container:after{clear:both}.uk-container-center{margin-left:auto;margin-right:auto}.uk-clearfix:before{display:table-cell}.uk-clearfix:after{display:table;clear:both}.uk-nbfc-alt{display:table-cell;width:10000px}.uk-float-left{float:left}.uk-float-right{float:right}[class*=uk-float-]{max-width:100%}[class*=uk-align-]{display:block;margin-bottom:15px}.uk-align-left{margin-right:15px;float:left}.uk-align-right{margin-left:15px;float:right}@media (min-width:768px){.uk-align-medium-left{margin-right:15px;float:left}.uk-align-medium-right{margin-left:15px;float:right}}.uk-align-center{margin-left:auto;margin-right:auto}.uk-vertical-align:before{content:'';display:inline-block;height:100%;vertical-align:middle}.uk-vertical-align-bottom,.uk-vertical-align-middle{display:inline-block;max-width:100%;font-size:1rem}.uk-vertical-align-middle{vertical-align:middle}.uk-vertical-align-bottom{vertical-align:bottom}.uk-height-1-1{height:100%}.uk-height-viewport{height:100vh;min-height:600px}.uk-responsive-width{max-width:100%!important;height:auto}.uk-responsive-height{max-height:100%;width:auto}.uk-margin{margin-bottom:15px}*+.uk-margin{margin-top:15px}.uk-margin-top{margin-top:15px!important}.uk-margin-bottom{margin-bottom:15px!important}.uk-margin-left{margin-left:15px!important}.uk-margin-right{margin-right:15px!important}.uk-margin-large{margin-bottom:50px}*+.uk-margin-large{margin-top:50px}.uk-margin-large-top{margin-top:50px!important}.uk-margin-large-bottom{margin-bottom:50px!important}.uk-margin-large-left{margin-left:50px!important}.uk-margin-large-right{margin-right:50px!important}.uk-margin-small{margin-bottom:5px}*+.uk-margin-small{margin-top:5px}.uk-margin-small-top{margin-top:5px!important}.uk-margin-small-bottom{margin-bottom:5px!important}.uk-margin-small-left{margin-left:5px!important}.uk-margin-small-right{margin-right:5px!important}.uk-margin-remove{margin:0!important}.uk-margin-top-remove{margin-top:0!important}.uk-margin-bottom-remove{margin-bottom:0!important}.uk-padding-remove{padding:0!important}.uk-padding-top-remove{padding-top:0!important}.uk-padding-bottom-remove{padding-bottom:0!important}.uk-padding-vertical-remove{padding-top:0!important;padding-bottom:0!important}.uk-border-rounded{border-radius:5px}.uk-heading-large{font-size:34px;line-height:39px}@media (min-width:768px){.uk-heading-large{font-size:48px;line-height:59px}}.uk-link-muted,.uk-link-muted a,.uk-link-muted a:hover,.uk-link-muted:hover{color:#444}.uk-link-reset,.uk-link-reset a,.uk-link-reset a:focus,.uk-link-reset a:hover,.uk-link-reset:focus,.uk-link-reset:hover{color:inherit;text-decoration:none}.uk-scrollable-text{height:300px;overflow-y:scroll;-webkit-overflow-scrolling:touch;resize:both}.uk-scrollable-box{height:170px;padding:10px;border:1px solid #ddd;overflow:auto;-webkit-overflow-scrolling:touch;resize:both;border-radius:3px}.uk-overflow-hidden{overflow:hidden}.uk-overflow-container{overflow:auto;-webkit-overflow-scrolling:touch}.uk-position-absolute,[class*=uk-position-top],[class*=uk-position-bottom]{position:absolute!important}.uk-position-top{top:0;left:0;right:0}.uk-position-bottom{bottom:0;left:0;right:0}.uk-position-top-left{top:0;left:0}.uk-position-top-right{top:0;right:0}.uk-position-bottom-left{bottom:0;left:0}.uk-position-bottom-right{bottom:0;right:0}.uk-position-cover{position:absolute;top:0;bottom:0;left:0;right:0}.uk-position-relative{position:relative!important}.uk-position-z-index{z-index:1}.uk-display-block{display:block!important}.uk-display-inline{display:inline!important}.uk-display-inline-block{display:inline-block!important;max-width:100%}@media (min-width:960px){.uk-hidden-large,.uk-visible-medium,.uk-visible-small{display:none!important}}@media (min-width:768px) and (max-width:959px){.uk-hidden-medium,.uk-visible-large,.uk-visible-small{display:none!important}}@media (max-width:767px){.uk-hidden-small,.uk-visible-large,.uk-visible-medium{display:none!important}}.uk-hidden{display:none!important;visibility:hidden!important}.uk-invisible{visibility:hidden!important}.uk-visible-hover:hover .uk-hidden,.uk-visible-hover:hover .uk-invisible{display:block!important;visibility:visible!important}.uk-visible-hover-inline:hover .uk-hidden,.uk-visible-hover-inline:hover .uk-invisible{display:inline-block!important;visibility:visible!important}.uk-notouch .uk-hidden-notouch,.uk-touch .uk-hidden-touch{display:none!important}.uk-flex{display:-ms-flexbox;display:-webkit-flex;display:flex}.uk-flex-inline{display:-ms-inline-flexbox;display:-webkit-inline-flex;display:inline-flex}.uk-flex-inline>*,.uk-flex>*{-ms-flex-negative:1}.uk-flex-top{-ms-flex-align:start;-webkit-align-items:flex-start;align-items:flex-start}.uk-flex-middle{-ms-flex-align:center;-webkit-align-items:center;align-items:center}.uk-flex-bottom{-ms-flex-align:end;-webkit-align-items:flex-end;align-items:flex-end}.uk-flex-center{-ms-flex-pack:center;-webkit-justify-content:center;justify-content:center}.uk-flex-right{-ms-flex-pack:end;-webkit-justify-content:flex-end;justify-content:flex-end}.uk-flex-space-between{-ms-flex-pack:justify;-webkit-justify-content:space-between;justify-content:space-between}.uk-flex-space-around{-ms-flex-pack:distribute;-webkit-justify-content:space-around;justify-content:space-around}.uk-flex-row-reverse{-ms-flex-direction:row-reverse;-webkit-flex-direction:row-reverse;flex-direction:row-reverse}.uk-flex-column{-ms-flex-direction:column;-webkit-flex-direction:column;flex-direction:column}.uk-flex-column-reverse{-ms-flex-direction:column-reverse;-webkit-flex-direction:column-reverse;flex-direction:column-reverse}.uk-flex-nowrap{-ms-flex-wrap:nowrap;-webkit-flex-wrap:nowrap;flex-wrap:nowrap}.uk-flex-wrap{-ms-flex-wrap:wrap;-webkit-flex-wrap:wrap;flex-wrap:wrap}.uk-flex-wrap-reverse{-ms-flex-wrap:wrap-reverse;-webkit-flex-wrap:wrap-reverse;flex-wrap:wrap-reverse}.uk-flex-wrap-top{-ms-flex-line-pack:start;-webkit-align-content:flex-start;align-content:flex-start}.uk-flex-wrap-middle{-ms-flex-line-pack:center;-webkit-align-content:center;align-content:center}.uk-flex-wrap-bottom{-ms-flex-line-pack:end;-webkit-align-content:flex-end;align-content:flex-end}.uk-flex-wrap-space-between{-ms-flex-line-pack:justify;-webkit-align-content:space-between;align-content:space-between}.uk-flex-wrap-space-around{-ms-flex-line-pack:distribute;-webkit-align-content:space-around;align-content:space-around}.uk-flex-order-first{-ms-flex-order:-1;-webkit-order:-1;order:-1}.uk-flex-order-last{-ms-flex-order:99;-webkit-order:99;order:99}@media (min-width:480px){.uk-flex-order-first-small{-ms-flex-order:-1;-webkit-order:-1;order:-1}.uk-flex-order-last-small{-ms-flex-order:99;-webkit-order:99;order:99}}@media (min-width:768px){.uk-flex-order-first-medium{-ms-flex-order:-1;-webkit-order:-1;order:-1}.uk-flex-order-last-medium{-ms-flex-order:99;-webkit-order:99;order:99}}@media (min-width:960px){.uk-flex-order-first-large{-ms-flex-order:-1;-webkit-order:-1;order:-1}.uk-flex-order-last-large{-ms-flex-order:99;-webkit-order:99;order:99}}@media (min-width:1220px){.uk-flex-order-first-xlarge{-ms-flex-order:-1;-webkit-order:-1;order:-1}.uk-flex-order-last-xlarge{-ms-flex-order:99;-webkit-order:99;order:99}}.uk-flex-item-none{-ms-flex:none;-webkit-flex:none;flex:none}.uk-flex-item-auto{-ms-flex:auto;-webkit-flex:auto;flex:auto;-ms-flex-negative:1}.uk-flex-item-1{-ms-flex:1;-webkit-flex:1;flex:1}.uk-contrast{color:#fff}.uk-contrast .uk-link,.uk-contrast a:not([class]){color:rgba(255,255,255,.7);text-decoration:none}.uk-contrast .uk-link:hover,.uk-contrast a:not([class]):hover{color:#fff;text-decoration:underline}.uk-contrast :not(pre)>code,.uk-contrast :not(pre)>kbd,.uk-contrast :not(pre)>samp{color:#fff;border-color:rgba(255,255,255,.2);background:rgba(255,255,255,.1)}.uk-contrast em,.uk-contrast h1,.uk-contrast h2,.uk-contrast h3,.uk-contrast h4,.uk-contrast h5,.uk-contrast h6{color:#fff}.uk-contrast hr{border-top-color:rgba(255,255,255,.2)}.uk-contrast .uk-nav li>a,.uk-contrast .uk-nav li>a:hover{text-decoration:none}.uk-contrast .uk-nav-side>li>a{color:#fff}.uk-contrast .uk-nav-side>li>a:focus,.uk-contrast .uk-nav-side>li>a:hover{background:rgba(255,255,255,.1);color:#fff;text-shadow:none}.uk-contrast .uk-nav-side>li.uk-active>a{background:#fff;color:#444;text-shadow:none}.uk-contrast .uk-nav-side .uk-nav-header{color:#fff}.uk-contrast .uk-nav-side .uk-nav-divider{border-top-color:rgba(255,255,255,.2)}.uk-contrast .uk-nav-side ul a{color:rgba(255,255,255,.7)}.uk-contrast .uk-nav-side ul a:hover{color:#fff}.uk-contrast .uk-subnav>*>a{color:rgba(255,255,255,.7);text-decoration:none}.uk-contrast .uk-subnav>*>a:focus,.uk-contrast .uk-subnav>*>a:hover{color:#fff;text-decoration:none}.uk-contrast .uk-subnav>.uk-active>a{color:#fff}.uk-contrast .uk-subnav-line>:nth-child(n+2):before{border-left-color:rgba(255,255,255,.2)}.uk-contrast .uk-subnav-pill>*>a:focus,.uk-contrast .uk-subnav-pill>*>a:hover{background:rgba(255,255,255,.7);color:#444;text-decoration:none}.uk-contrast .uk-subnav-pill>.uk-active>a{background:#fff;color:#444}.uk-contrast .uk-tab{border-bottom-color:rgba(255,255,255,.2)}.uk-contrast .uk-tab>li>a{border-color:transparent;color:rgba(255,255,255,.7);text-shadow:none}.uk-contrast .uk-tab>li.uk-open>a,.uk-contrast .uk-tab>li>a:focus,.uk-contrast .uk-tab>li>a:hover{border-color:rgba(255,255,255,.7);background:rgba(255,255,255,.7);color:#444;text-decoration:none}.uk-contrast .uk-tab>li.uk-active>a{border-color:rgba(255,255,255,.2);border-bottom-color:transparent;background:#fff;color:#444}.uk-contrast .uk-tab-center{border-bottom-color:rgba(255,255,255,.2)}.uk-contrast .uk-list-line>li:nth-child(n+2),.uk-contrast .uk-tab-grid:before{border-top-color:rgba(255,255,255,.2)}.uk-contrast .uk-form input:not([type]),.uk-contrast .uk-form input[type=text],.uk-contrast .uk-form input[type=password],.uk-contrast .uk-form input[type=email],.uk-contrast .uk-form input[type=url],.uk-contrast .uk-form input[type=search],.uk-contrast .uk-form input[type=tel],.uk-contrast .uk-form input[type=number],.uk-contrast .uk-form input[type=datetime],.uk-contrast .uk-form input[type=datetime-local],.uk-contrast .uk-form input[type=date],.uk-contrast .uk-form input[type=month],.uk-contrast .uk-form input[type=time],.uk-contrast .uk-form input[type=week],.uk-contrast .uk-form input[type=color],.uk-contrast .uk-form select,.uk-contrast .uk-form textarea{border-color:rgba(255,255,255,.8);background:rgba(255,255,255,.8);color:#444;background-clip:padding-box}.uk-contrast .uk-form input:not([type]):focus,.uk-contrast .uk-form input[type=text]:focus,.uk-contrast .uk-form input[type=password]:focus,.uk-contrast .uk-form input[type=email]:focus,.uk-contrast .uk-form input[type=url]:focus,.uk-contrast .uk-form input[type=search]:focus,.uk-contrast .uk-form input[type=tel]:focus,.uk-contrast .uk-form input[type=number]:focus,.uk-contrast .uk-form input[type=datetime]:focus,.uk-contrast .uk-form input[type=datetime-local]:focus,.uk-contrast .uk-form input[type=date]:focus,.uk-contrast .uk-form input[type=month]:focus,.uk-contrast .uk-form input[type=time]:focus,.uk-contrast .uk-form input[type=week]:focus,.uk-contrast .uk-form input[type=color]:focus,.uk-contrast .uk-form select:focus,.uk-contrast .uk-form textarea:focus{border-color:#fff;background:#fff;color:#444}.uk-contrast .uk-form :-ms-input-placeholder{color:rgba(68,68,68,.7)!important}.uk-contrast .uk-form ::-moz-placeholder{color:rgba(68,68,68,.7)}.uk-contrast .uk-form ::-webkit-input-placeholder{color:rgba(68,68,68,.7)}.uk-contrast .uk-button{color:#444;background:#fff;border-color:transparent}.uk-contrast .uk-button:focus,.uk-contrast .uk-button:hover{background-color:rgba(255,255,255,.8);color:#444;border-color:transparent}.uk-contrast .uk-button.uk-active,.uk-contrast .uk-button:active{background-color:rgba(255,255,255,.7);color:#444}.uk-contrast .uk-button-primary{background-color:#337ab7;color:#fff}.uk-contrast .uk-button-primary:focus,.uk-contrast .uk-button-primary:hover{background-color:#286090;color:#fff}.uk-contrast .uk-button-primary.uk-active,.uk-contrast .uk-button-primary:active{background-color:#0091ca;color:#fff}.uk-contrast .uk-icon-hover{color:rgba(255,255,255,.7)}.uk-contrast .uk-icon-hover:hover{color:#fff}.uk-contrast .uk-icon-button{background:#fff;color:#444;border-color:transparent}.uk-contrast .uk-icon-button:focus,.uk-contrast .uk-icon-button:hover{background-color:rgba(255,255,255,.8);color:#444;border-color:transparent}.uk-contrast .uk-icon-button:active{background-color:rgba(255,255,255,.7);color:#444}.uk-contrast .uk-text-muted{color:rgba(255,255,255,.6)!important}.uk-contrast .uk-text-primary{color:#337ab7!important}@media print{blockquote,img,pre,tr{page-break-inside:avoid}*,:after,:before{background:0 0!important;color:#000!important;box-shadow:none!important;text-shadow:none!important}a,a:visited{text-decoration:underline}blockquote,pre{border:1px solid #999}thead{display:table-header-group}img{max-width:100%!important}@page{margin:.5cm}h2,h3,p{orphans:3;widows:3}h2,h3{page-break-after:avoid}}.uk-dotnav{display:-ms-flexbox;display:-webkit-flex;display:flex;-ms-flex-wrap:wrap;-webkit-flex-wrap:wrap;flex-wrap:wrap;margin-left:-15px;margin-top:-15px;padding:0;list-style:none}*+.uk-placeholder,*+.uk-progress,.uk-dotnav>*{margin-top:15px}.uk-dotnav>*{-ms-flex:none;-webkit-flex:none;flex:none;padding-left:15px;float:left}.uk-dotnav:after,.uk-dotnav:before{content:"";display:block;overflow:hidden}.uk-dotnav:after{clear:both}.uk-dotnav>*>*{display:block;box-sizing:content-box;width:20px;height:20px;border-radius:50%;background:rgba(50,50,50,.1);text-indent:100%;overflow:hidden;white-space:nowrap;-webkit-transition:all .2s ease-in-out;transition:all .2s ease-in-out}.uk-progress,.uk-search-field,.uk-slidenav,.uk-tooltip{box-sizing:border-box}.uk-dotnav>*>:focus,.uk-dotnav>*>:hover{background:rgba(50,50,50,.4);outline:0}.uk-dotnav>*>:active{background:rgba(50,50,50,.6)}.uk-dotnav>.uk-active>*{background:rgba(50,50,50,.4);-webkit-transform:scale(1.3);transform:scale(1.3)}.uk-dotnav-contrast>*>*{background:rgba(255,255,255,.4)}.uk-dotnav-contrast>*>:focus,.uk-dotnav-contrast>*>:hover{background:rgba(255,255,255,.7)}.uk-dotnav-contrast>*>:active,.uk-dotnav-contrast>.uk-active>*{background:rgba(255,255,255,.9)}.uk-dotnav-vertical{-ms-flex-direction:column;-webkit-flex-direction:column;flex-direction:column}.uk-dotnav-vertical>*{float:none}.uk-slidenav{display:inline-block;width:60px;height:60px;line-height:60px;color:rgba(50,50,50,.4);font-size:60px;text-align:center}.uk-slidenav:focus,.uk-slidenav:hover{outline:0;text-decoration:none;color:rgba(50,50,50,.7);cursor:pointer}.uk-slidenav:active{color:rgba(50,50,50,.9)}.uk-slidenav-previous:before{content:"\f104";font-family:FontAwesome}.uk-slidenav-next:before{content:"\f105";font-family:FontAwesome}.uk-slidenav-position{position:relative}.uk-slidenav-position .uk-slidenav{display:none;position:absolute;top:50%;z-index:1;margin-top:-30px}.uk-slidenav-position:hover .uk-slidenav{display:block}.uk-slidenav-position .uk-slidenav-previous{left:20px}.uk-slidenav-position .uk-slidenav-next{right:20px}.uk-slidenav-contrast{color:rgba(255,255,255,.5)}.uk-slidenav-contrast:focus,.uk-slidenav-contrast:hover{color:rgba(255,255,255,.7)}.uk-slidenav-contrast:active{color:rgba(255,255,255,.9)}.uk-form input[type=checkbox],.uk-form input[type=radio]{display:inline-block;height:14px;width:14px;border:1px solid #aaa;overflow:hidden;margin-top:-4px;vertical-align:middle;-webkit-appearance:none;outline:0;background:0 0}.uk-form input[type=radio]{border-radius:50%}.uk-form input[type=checkbox]:before,.uk-form input[type=radio]:before{display:block}.uk-form input[type=radio]:checked:before{content:'';width:8px;height:8px;margin:2px auto 0;border-radius:50%;background:#337ab7}.uk-form input[type=checkbox]:checked:before,.uk-form input[type=checkbox]:indeterminate:before{content:"\f00c";font-family:FontAwesome;font-size:12px;-webkit-font-smoothing:antialiased;text-align:center;line-height:12px;color:#337ab7}.uk-form input[type=checkbox]:indeterminate:before{content:"\f068"}.uk-form input[type=checkbox]:disabled,.uk-form input[type=radio]:disabled{border-color:#ddd}.uk-form input[type=radio]:disabled:checked:before{background-color:#aaa}.uk-form input[type=checkbox]:disabled:checked:before,.uk-form input[type=checkbox]:disabled:indeterminate:before{color:#aaa}.uk-form-file{display:inline-block;vertical-align:middle;position:relative;overflow:hidden}.uk-form-file input[type=file]{position:absolute;top:0;z-index:1;width:100%;opacity:0;cursor:pointer;left:0;font-size:500px}.uk-form-password{display:inline-block;position:relative;max-width:100%}.uk-form-password-toggle{display:block;position:absolute;top:50%;right:10px;margin-top:-6px;font-size:12px;line-height:12px;color:#999}.uk-form-select,.uk-slideshow{position:relative;overflow:hidden}.uk-form-password-toggle:hover{color:#999;text-decoration:none}.uk-form-password>input{padding-right:50px!important}.uk-form-select{display:inline-block;vertical-align:middle}.uk-form-select select{position:absolute;top:0;z-index:1;width:100%;height:100%;opacity:0;cursor:pointer;left:0;-webkit-appearance:none}.uk-placeholder{margin-bottom:15px;padding:15px;border:1px dashed #ddd;background:#fafafa;color:#444}.uk-placeholder>:last-child{margin-bottom:0}.uk-placeholder-large{padding-top:80px;padding-bottom:80px}.uk-progress{height:20px;margin-bottom:15px;background:#f5f5f5;overflow:hidden;line-height:20px;box-shadow:inset 0 0 0 1px rgba(0,0,0,.06);border-radius:2px}.uk-nav-search>li.uk-active>a,.uk-progress-bar{box-shadow:inset 0 0 5px rgba(0,0,0,.05);text-shadow:0 -1px 0 rgba(0,0,0,.1)}.uk-progress-bar{width:0;height:100%;background:#337ab7;float:left;-webkit-transition:width .6s ease;transition:width .6s ease;font-size:11px;color:#fff;text-align:center}.uk-progress-mini{height:6px}.uk-progress-small{height:12px}.uk-progress-success .uk-progress-bar{background-color:#5cb85c}.uk-progress-warning .uk-progress-bar{background-color:#f0ad4e}.uk-progress-danger .uk-progress-bar{background-color:#d9534f}.uk-progress-striped .uk-progress-bar{background-image:-webkit-linear-gradient(-45deg,rgba(255,255,255,.15) 25%,transparent 25%,transparent 50%,rgba(255,255,255,.15) 50%,rgba(255,255,255,.15) 75%,transparent 75%,transparent);background-image:linear-gradient(-45deg,rgba(255,255,255,.15) 25%,transparent 25%,transparent 50%,rgba(255,255,255,.15) 50%,rgba(255,255,255,.15) 75%,transparent 75%,transparent);background-size:30px 30px}.uk-progress-striped.uk-active .uk-progress-bar{-webkit-animation:uk-progress-bar-stripes 2s linear infinite;animation:uk-progress-bar-stripes 2s linear infinite}@-webkit-keyframes uk-progress-bar-stripes{0%{background-position:0 0}100%{background-position:30px 0}}@keyframes uk-progress-bar-stripes{0%{background-position:0 0}100%{background-position:30px 0}}.uk-progress-mini,.uk-progress-small{border-radius:500px}.uk-accordion-title{margin-top:0;margin-bottom:15px;padding:5px 15px;background:#f5f5f5;font-size:17px;line-height:22px;cursor:pointer;border:1px solid #ddd;border-radius:2px}.uk-accordion-content{padding:0 15px 15px}.uk-accordion-content:after,.uk-accordion-content:before{content:"";display:table}.uk-accordion-content:after{clear:both}.uk-accordion-content>:last-child{margin-bottom:0}.uk-slideshow{z-index:0;width:100%;margin:0;padding:0;list-style:none;touch-action:pan-y}.uk-slideshow>li{position:absolute;top:0;left:0;width:100%;opacity:0}.uk-slideshow>.uk-active{z-index:10;opacity:1}.uk-slideshow>li>img{visibility:hidden}[data-uk-slideshow-slide]{cursor:pointer}.uk-slideshow-fullscreen,.uk-slideshow-fullscreen>li{height:100vh}.uk-slideshow-fade-in{-webkit-animation:uk-fade .5s linear;animation:uk-fade .5s linear}.uk-slideshow-fade-out{-webkit-animation:uk-fade .5s linear reverse;animation:uk-fade .5s linear reverse}.uk-slideshow-scroll-forward-in{-webkit-animation:uk-slide-right .5s ease-in-out;animation:uk-slide-right .5s ease-in-out}.uk-slideshow-scroll-forward-out{-webkit-animation:uk-slide-left .5s ease-in-out reverse;animation:uk-slide-left .5s ease-in-out reverse}.uk-slideshow-scroll-backward-in{-webkit-animation:uk-slide-left .5s ease-in-out;animation:uk-slide-left .5s ease-in-out}.uk-slideshow-scroll-backward-out{-webkit-animation:uk-slide-right .5s ease-in-out reverse;animation:uk-slide-right .5s ease-in-out reverse}.uk-slideshow-scale-out{-webkit-animation:uk-fade-scale-15 .5s ease-in-out reverse;animation:uk-fade-scale-15 .5s ease-in-out reverse}.uk-slideshow-swipe-forward-in{-webkit-animation:uk-slide-left-33 .5s ease-in-out;animation:uk-slide-left-33 .5s ease-in-out}.uk-slideshow-swipe-forward-out{-webkit-animation:uk-slide-left .5s ease-in-out reverse;animation:uk-slide-left .5s ease-in-out reverse}.uk-slideshow-swipe-backward-in{-webkit-animation:uk-slide-right-33 .5s ease-in-out;animation:uk-slide-right-33 .5s ease-in-out}.uk-slideshow-swipe-backward-out{-webkit-animation:uk-slide-right .5s ease-in-out reverse;animation:uk-slide-right .5s ease-in-out reverse}.uk-slideshow-swipe-backward-in:before,.uk-slideshow-swipe-forward-in:before{content:'';position:absolute;top:0;bottom:0;left:0;right:0;z-index:1;background:rgba(0,0,0,.6);-webkit-animation:uk-fade .5s ease-in-out reverse;animation:uk-fade .5s ease-in-out reverse}.uk-search{display:inline-block;position:relative;margin:0}.uk-search:before{content:"\f002";position:absolute;top:0;left:0;width:30px;line-height:32px;text-align:center;font-family:FontAwesome;font-size:14px;color:rgba(0,0,0,.2)}.uk-search-field::-moz-focus-inner{border:0;padding:0}.uk-search-field::-webkit-search-cancel-button,.uk-search-field::-webkit-search-decoration{-webkit-appearance:none}.uk-search-field::-ms-clear{display:none}.uk-search-field{margin:0;border-radius:0;font:inherit;color:#444;-webkit-appearance:none;width:120px;height:32px;padding:0 0 0 30px;border:1px solid transparent;background:rgba(0,0,0,0);-webkit-transition:all .2s linear;transition:all .2s linear;vertical-align:middle}.uk-search-field:-ms-input-placeholder{color:#999!important}.uk-search-field::-moz-placeholder{opacity:1;color:#999}.uk-search-field::-webkit-input-placeholder{color:#999}.uk-search-field:focus{outline:0}.uk-search-field:focus,.uk-search.uk-active .uk-search-field{width:180px}.uk-dropdown-search{width:300px;margin-top:0;background:#fff;color:#444}.uk-open>.uk-dropdown-search{-webkit-animation:uk-slide-top-fixed .2s ease-in-out;animation:uk-slide-top-fixed .2s ease-in-out}.uk-navbar-flip .uk-dropdown-search{margin-top:12px;margin-right:-16px}.uk-nav-search>li>a{color:#444}.uk-nav-search>li.uk-active>a{background:#337ab7;color:#fff;outline:0}.uk-nav-search .uk-nav-header{color:#999}.uk-nav-search .uk-nav-divider{border-top:1px solid #ddd}.uk-nav-search ul a{color:#337ab7}.uk-nav-search ul a:hover{color:#23527c}.uk-offcanvas .uk-search{display:block;margin:20px 15px}.uk-offcanvas .uk-search:before{color:#777}.uk-offcanvas .uk-search-field{width:100%;border-color:transparent;background:#1a1a1a;color:#ccc}.uk-offcanvas .uk-search-field:-ms-input-placeholder{color:#777!important}.uk-offcanvas .uk-search-field::-moz-placeholder{color:#777}.uk-offcanvas .uk-search-field::-webkit-input-placeholder{color:#777}[data-uk-slider]{direction:ltr}html[dir=rtl] .uk-slider>*{direction:rtl}.uk-slider{position:relative;z-index:0;touch-action:pan-y}.uk-slider:not(.uk-grid){margin:0;padding:0;list-style:none}.uk-slider>*{position:absolute;top:0;left:0}.uk-slider-container{overflow:hidden}.uk-slider:not(.uk-drag){-webkit-transition:-webkit-transform .2s linear;transition:transform .2s linear}.uk-slider.uk-drag{cursor:col-resize;-moz-user-select:none;-webkit-user-select:none;-ms-user-select:none;user-select:none}.uk-slider a,.uk-slider img{-webkit-user-drag:none;user-drag:none;-webkit-touch-callout:none}.uk-slider img{pointer-events:none}.uk-slider-fullscreen,.uk-slider-fullscreen>li{height:100vh}.uk-tooltip{display:none;position:absolute;z-index:1030;max-width:200px;padding:5px 8px;background:#333;color:rgba(255,255,255,.7);font-size:.85rem;line-height:1.46rem;border-radius:3px;text-shadow:0 1px 0 rgba(0,0,0,.5)}.uk-tooltip:after{content:"";display:block;position:absolute;width:0;height:0;border:5px dashed #333}.uk-tooltip-top-left:after,.uk-tooltip-top-right:after,.uk-tooltip-top:after{bottom:-5px;border-top-style:solid;border-bottom:none;border-left-color:transparent;border-right-color:transparent;border-top-color:#333}.uk-tooltip-bottom-left:after,.uk-tooltip-bottom-right:after,.uk-tooltip-bottom:after{top:-5px;border-bottom-style:solid;border-top:none;border-left-color:transparent;border-right-color:transparent;border-bottom-color:#333}.uk-tooltip-left:after,.uk-tooltip-right:after{top:50%;margin-top:-5px;border-bottom-color:transparent}.uk-tooltip-bottom:after,.uk-tooltip-top:after{left:50%;margin-left:-5px}.uk-tooltip-bottom-left:after,.uk-tooltip-top-left:after{left:10px}.uk-tooltip-bottom-right:after,.uk-tooltip-top-right:after{right:10px}.uk-tooltip-left:after{right:-5px;border-left-style:solid;border-right:none;border-top-color:transparent;border-left-color:#333}.uk-tooltip-right:after{left:-5px;border-right-style:solid;border-left:none;border-top-color:transparent;border-right-color:#333}vendor/jquery/css/jquery-ui.min.css000060400000005674152456167170013424 0ustar00/*! jQuery UI - v1.13.0 - 2022-01-12
* http://jqueryui.com
* Includes: draggable.css, core.css, resizable.css, sortable.css, slider.css
* Copyright jQuery Foundation and other contributors; Licensed MIT */.ui-draggable-handle{-ms-touch-action:none;touch-action:none}.ui-helper-hidden{display:none}.ui-helper-hidden-accessible{border:0;clip:rect(0 0 0 0);height:1px;margin:-1px;overflow:hidden;padding:0;position:absolute;width:1px}.ui-helper-reset{margin:0;padding:0;border:0;outline:0;line-height:1.3;text-decoration:none;font-size:100%;list-style:none}.ui-helper-clearfix:after,.ui-helper-clearfix:before{content:"";display:table;border-collapse:collapse}.ui-helper-clearfix:after{clear:both}.ui-helper-zfix{width:100%;height:100%;top:0;left:0;position:absolute;opacity:0;-ms-filter:"alpha(opacity=0)"}.ui-front{z-index:100}.ui-state-disabled{cursor:default!important;pointer-events:none}.ui-icon{display:inline-block;vertical-align:middle;margin-top:-.25em;position:relative;text-indent:-99999px;overflow:hidden;background-repeat:no-repeat}.ui-widget-icon-block{left:50%;margin-left:-8px;display:block}.ui-widget-overlay{position:fixed;top:0;left:0;width:100%;height:100%}.ui-resizable,.ui-slider{position:relative}.ui-resizable-handle{position:absolute;font-size:.1px;display:block;-ms-touch-action:none;touch-action:none}.ui-resizable-autohide .ui-resizable-handle,.ui-resizable-disabled .ui-resizable-handle{display:none}.ui-resizable-n{cursor:n-resize;height:7px;width:100%;top:-5px;left:0}.ui-resizable-s{cursor:s-resize;height:7px;width:100%;bottom:-5px;left:0}.ui-resizable-e{cursor:e-resize;width:7px;right:-5px;top:0;height:100%}.ui-resizable-w{cursor:w-resize;width:7px;left:-5px;top:0;height:100%}.ui-resizable-se{cursor:se-resize;width:12px;height:12px;right:1px;bottom:1px}.ui-resizable-sw{cursor:sw-resize;width:9px;height:9px;left:-5px;bottom:-5px}.ui-resizable-nw{cursor:nw-resize;width:9px;height:9px;left:-5px;top:-5px}.ui-resizable-ne{cursor:ne-resize;width:9px;height:9px;right:-5px;top:-5px}.ui-sortable-handle{-ms-touch-action:none;touch-action:none}.ui-slider{text-align:left}.ui-slider .ui-slider-handle{position:absolute;z-index:2;width:1.2em;height:1.2em;cursor:pointer;-ms-touch-action:none;touch-action:none}.ui-slider .ui-slider-range{position:absolute;z-index:1;font-size:.7em;display:block;border:0;background-position:0 0}.ui-slider.ui-state-disabled .ui-slider-handle,.ui-slider.ui-state-disabled .ui-slider-range{filter:inherit}.ui-slider-horizontal{height:.8em}.ui-slider-horizontal .ui-slider-handle{top:-.3em;margin-left:-.6em}.ui-slider-horizontal .ui-slider-range{top:0;height:100%}.ui-slider-horizontal .ui-slider-range-min{left:0}.ui-slider-horizontal .ui-slider-range-max{right:0}.ui-slider-vertical{width:.8em;height:100px}.ui-slider-vertical .ui-slider-handle{left:-.3em;margin-left:0;margin-bottom:-.6em}.ui-slider-vertical .ui-slider-range{left:0;width:100%}.ui-slider-vertical .ui-slider-range-min{bottom:0}.ui-slider-vertical .ui-slider-range-max{top:0}vendor/jquery/js/jquery-ui.min.js000060400000252024152456167170013065 0ustar00/*! jQuery UI - v1.14.1 - 2025-10-23
* https://jqueryui.com
* Includes: widget.js, data.js, disable-selection.js, keycode.js, scroll-parent.js, widgets/draggable.js, widgets/resizable.js, widgets/sortable.js, widgets/mouse.js, widgets/slider.js
* Copyright OpenJS Foundation and other contributors; Licensed MIT */

!function(t){"use strict";"function"==typeof define&&define.amd?define(["jquery"],t):t(jQuery)}(function(t){"use strict";t.ui=t.ui||{},t.ui.version="1.14.1";var e,i,s=0,n=Array.prototype.hasOwnProperty,o=Array.prototype.slice;e=t.cleanData,t.cleanData=function(i){var s,n,o;for(o=0;null!=(n=i[o]);o++)(s=t._data(n,"events"))&&s.remove&&t(n).triggerHandler("remove");e(i)},t.widget=function(e,i,s){var n,o,r,h={},a=e.split(".")[0];if("__proto__"===(e=e.split(".")[1])||"constructor"===e)return t.error("Invalid widget name: "+e);var l=a+"-"+e;return s||(s=i,i=t.Widget),Array.isArray(s)&&(s=t.extend.apply(null,[{}].concat(s))),t.expr.pseudos[l.toLowerCase()]=function(e){return!!t.data(e,l)},t[a]=t[a]||{},n=t[a][e],o=t[a][e]=function(t,e){if(!this||!this._createWidget)return new o(t,e);arguments.length&&this._createWidget(t,e)},t.extend(o,n,{version:s.version,_proto:t.extend({},s),_childConstructors:[]}),(r=new i).options=t.widget.extend({},r.options),t.each(s,function(t,e){if("function"!=typeof e){h[t]=e;return}h[t]=function(){function s(){return i.prototype[t].apply(this,arguments)}function n(e){return i.prototype[t].apply(this,e)}return function(){var t,i=this._super,o=this._superApply;return this._super=s,this._superApply=n,t=e.apply(this,arguments),this._super=i,this._superApply=o,t}}()}),o.prototype=t.widget.extend(r,{widgetEventPrefix:n&&r.widgetEventPrefix||e},h,{constructor:o,namespace:a,widgetName:e,widgetFullName:l}),n?(t.each(n._childConstructors,function(e,i){var s=i.prototype;t.widget(s.namespace+"."+s.widgetName,o,i._proto)}),delete n._childConstructors):i._childConstructors.push(o),t.widget.bridge(e,o),o},t.widget.extend=function(e){for(var i,s,r=o.call(arguments,1),h=0,a=r.length;h<a;h++)for(i in r[h])s=r[h][i],n.call(r[h],i)&&void 0!==s&&(t.isPlainObject(s)?e[i]=t.isPlainObject(e[i])?t.widget.extend({},e[i],s):t.widget.extend({},s):e[i]=s);return e},t.widget.bridge=function(e,i){var s=i.prototype.widgetFullName||e;t.fn[e]=function(n){var r="string"==typeof n,h=o.call(arguments,1),a=this;return r?this.length||"instance"!==n?this.each(function(){var i,o=t.data(this,s);return"instance"===n?(a=o,!1):o?"function"!=typeof o[n]||"_"===n.charAt(0)?t.error("no such method '"+n+"' for "+e+" widget instance"):(i=o[n].apply(o,h))!==o&&void 0!==i?(a=i&&i.jquery?a.pushStack(i.get()):i,!1):void 0:t.error("cannot call methods on "+e+" prior to initialization; attempted to call method '"+n+"'")}):a=void 0:(h.length&&(n=t.widget.extend.apply(null,[n].concat(h))),this.each(function(){var e=t.data(this,s);e?(e.option(n||{}),e._init&&e._init()):t.data(this,s,new i(n,this))})),a}},t.Widget=function(){},t.Widget._childConstructors=[],t.Widget.prototype={widgetName:"widget",widgetEventPrefix:"",defaultElement:"<div>",options:{classes:{},disabled:!1,create:null},_createWidget:function(e,i){i=t(i||this.defaultElement||this)[0],this.element=t(i),this.uuid=s++,this.eventNamespace="."+this.widgetName+this.uuid,this.bindings=t(),this.hoverable=t(),this.focusable=t(),this.classesElementLookup={},i!==this&&(t.data(i,this.widgetFullName,this),this._on(!0,this.element,{remove:function(t){t.target===i&&this.destroy()}}),this.document=t(i.style?i.ownerDocument:i.document||i),this.window=t(this.document[0].defaultView||this.document[0].parentWindow)),this.options=t.widget.extend({},this.options,this._getCreateOptions(),e),this._create(),this.options.disabled&&this._setOptionDisabled(this.options.disabled),this._trigger("create",null,this._getCreateEventData()),this._init()},_getCreateOptions:function(){return{}},_getCreateEventData:t.noop,_create:t.noop,_init:t.noop,destroy:function(){var e=this;this._destroy(),t.each(this.classesElementLookup,function(t,i){e._removeClass(i,t)}),this.element.off(this.eventNamespace).removeData(this.widgetFullName),this.widget().off(this.eventNamespace).removeAttr("aria-disabled"),this.bindings.off(this.eventNamespace)},_destroy:t.noop,widget:function(){return this.element},option:function(e,i){var s,n,o,r=e;if(0==arguments.length)return t.widget.extend({},this.options);if("string"==typeof e){if(r={},e=(s=e.split(".")).shift(),s.length){for(o=0,n=r[e]=t.widget.extend({},this.options[e]);o<s.length-1;o++)n[s[o]]=n[s[o]]||{},n=n[s[o]];if(e=s.pop(),1==arguments.length)return void 0===n[e]?null:n[e];n[e]=i}else{if(1==arguments.length)return void 0===this.options[e]?null:this.options[e];r[e]=i}}return this._setOptions(r),this},_setOptions:function(t){var e;for(e in t)this._setOption(e,t[e]);return this},_setOption:function(t,e){return"classes"===t&&this._setOptionClasses(e),this.options[t]=e,"disabled"===t&&this._setOptionDisabled(e),this},_setOptionClasses:function(e){var i,s,n;for(i in e)n=this.classesElementLookup[i],e[i]!==this.options.classes[i]&&n&&n.length&&(s=t(n.get()),this._removeClass(n,i),s.addClass(this._classes({element:s,keys:i,classes:e,add:!0})))},_setOptionDisabled:function(t){this._toggleClass(this.widget(),this.widgetFullName+"-disabled",null,!!t),t&&(this._removeClass(this.hoverable,null,"ui-state-hover"),this._removeClass(this.focusable,null,"ui-state-focus"))},enable:function(){return this._setOptions({disabled:!1})},disable:function(){return this._setOptions({disabled:!0})},_classes:function(e){var i=[],s=this;function n(n,o){var r,h;for(h=0;h<n.length;h++)r=s.classesElementLookup[n[h]]||t(),e.add?(function(){var i=[];e.element.each(function(e,n){t.map(s.classesElementLookup,function(t){return t}).some(function(t){return t.is(n)})||i.push(n)}),s._on(t(i),{remove:"_untrackClassesElement"})}(),r=t(t.uniqueSort(r.get().concat(e.element.get())))):r=t(r.not(e.element).get()),s.classesElementLookup[n[h]]=r,i.push(n[h]),o&&e.classes[n[h]]&&i.push(e.classes[n[h]])}return(e=t.extend({element:this.element,classes:this.options.classes||{}},e)).keys&&n(e.keys.match(/\S+/g)||[],!0),e.extra&&n(e.extra.match(/\S+/g)||[]),i.join(" ")},_untrackClassesElement:function(e){var i=this;t.each(i.classesElementLookup,function(s,n){-1!==t.inArray(e.target,n)&&(i.classesElementLookup[s]=t(n.not(e.target).get()))}),this._off(t(e.target))},_removeClass:function(t,e,i){return this._toggleClass(t,e,i,!1)},_addClass:function(t,e,i){return this._toggleClass(t,e,i,!0)},_toggleClass:function(t,e,i,s){s="boolean"==typeof s?s:i;var n="string"==typeof t||null===t,o={extra:n?e:i,keys:n?t:e,element:n?this.element:t,add:s};return o.element.toggleClass(this._classes(o),s),this},_on:function(e,i,s){var n,o=this;"boolean"!=typeof e&&(s=i,i=e,e=!1),s?(i=n=t(i),this.bindings=this.bindings.add(i)):(s=i,i=this.element,n=this.widget()),t.each(s,function(s,r){function h(){if(!(!e&&(!0===o.options.disabled||t(this).hasClass("ui-state-disabled"))))return("string"==typeof r?o[r]:r).apply(o,arguments)}"string"!=typeof r&&(h.guid=r.guid=r.guid||h.guid||t.guid++);var a=s.match(/^([\w:-]*)\s*(.*)$/),l=a[1]+o.eventNamespace,c=a[2];c?n.on(l,c,h):i.on(l,h)})},_off:function(e,i){i=(i||"").split(" ").join(this.eventNamespace+" ")+this.eventNamespace,e.off(i),this.bindings=t(this.bindings.not(e).get()),this.focusable=t(this.focusable.not(e).get()),this.hoverable=t(this.hoverable.not(e).get())},_delay:function(t,e){var i=this;return setTimeout(function(){return("string"==typeof t?i[t]:t).apply(i,arguments)},e||0)},_hoverable:function(e){this.hoverable=this.hoverable.add(e),this._on(e,{mouseenter:function(e){this._addClass(t(e.currentTarget),null,"ui-state-hover")},mouseleave:function(e){this._removeClass(t(e.currentTarget),null,"ui-state-hover")}})},_focusable:function(e){this.focusable=this.focusable.add(e),this._on(e,{focusin:function(e){this._addClass(t(e.currentTarget),null,"ui-state-focus")},focusout:function(e){this._removeClass(t(e.currentTarget),null,"ui-state-focus")}})},_trigger:function(e,i,s){var n,o,r=this.options[e];if(s=s||{},(i=t.Event(i)).type=(e===this.widgetEventPrefix?e:this.widgetEventPrefix+e).toLowerCase(),i.target=this.element[0],o=i.originalEvent)for(n in o)n in i||(i[n]=o[n]);return this.element.trigger(i,s),!("function"==typeof r&&!1===r.apply(this.element[0],[i].concat(s))||i.isDefaultPrevented())}},t.each({show:"fadeIn",hide:"fadeOut"},function(e,i){t.Widget.prototype["_"+e]=function(s,n,o){"string"==typeof n&&(n={effect:n});var r,h=n?!0===n||"number"==typeof n?i:n.effect||i:e;"number"==typeof(n=n||{})?n={duration:n}:!0===n&&(n={}),r=!t.isEmptyObject(n),n.complete=o,n.delay&&s.delay(n.delay),r&&t.effects&&t.effects.effect[h]?s[e](n):h!==e&&s[h]?s[h](n.duration,n.easing,o):s.queue(function(i){t(this)[e](),o&&o.call(s[0]),i()})}}),t.widget,t.extend(t.expr.pseudos,{data:t.expr.createPseudo(function(e){return function(i){return!!t.data(i,e)}})}),t.fn.extend({disableSelection:(i="onselectstart"in document.createElement("div")?"selectstart":"mousedown",function(){return this.on(i+".ui-disableSelection",function(t){t.preventDefault()})}),enableSelection:function(){return this.off(".ui-disableSelection")}}),t.ui.keyCode={BACKSPACE:8,COMMA:188,DELETE:46,DOWN:40,END:35,ENTER:13,ESCAPE:27,HOME:36,LEFT:37,PAGE_DOWN:34,PAGE_UP:33,PERIOD:190,RIGHT:39,SPACE:32,TAB:9,UP:38},t.fn.scrollParent=function(e){var i=this.css("position"),s="absolute"===i,n=e?/(auto|scroll|hidden)/:/(auto|scroll)/,o=this.parents().filter(function(){var e=t(this);return(!s||"static"!==e.css("position"))&&n.test(e.css("overflow")+e.css("overflow-y")+e.css("overflow-x"))}).eq(0);return"fixed"!==i&&o.length?o:t(this[0].ownerDocument||document)};var r=!1;t(document).on("mouseup",function(){r=!1}),t.widget("ui.mouse",{version:"1.14.1",options:{cancel:"input, textarea, button, select, option",distance:1,delay:0},_mouseInit:function(){var e=this;this.element.on("mousedown."+this.widgetName,function(t){return e._mouseDown(t)}).on("click."+this.widgetName,function(i){if(!0===t.data(i.target,e.widgetName+".preventClickEvent"))return t.removeData(i.target,e.widgetName+".preventClickEvent"),i.stopImmediatePropagation(),!1}),this.started=!1},_mouseDestroy:function(){this.element.off("."+this.widgetName),this._mouseMoveDelegate&&this.document.off("mousemove."+this.widgetName,this._mouseMoveDelegate).off("mouseup."+this.widgetName,this._mouseUpDelegate)},_mouseDown:function(e){if(!r){this._mouseMoved=!1,this._mouseStarted&&this._mouseUp(e),this._mouseDownEvent=e;var i=this,s=1===e.which,n="string"==typeof this.options.cancel&&t(e.target).closest(this.options.cancel).length;return!(s&&!n&&this._mouseCapture(e))||((this.mouseDelayMet=!this.options.delay,this.mouseDelayMet||(this._mouseDelayTimer=setTimeout(function(){i.mouseDelayMet=!0},this.options.delay)),this._mouseDistanceMet(e)&&this._mouseDelayMet(e)&&(this._mouseStarted=!1!==this._mouseStart(e),!this._mouseStarted))?e.preventDefault():(!0===t.data(e.target,this.widgetName+".preventClickEvent")&&t.removeData(e.target,this.widgetName+".preventClickEvent"),this._mouseMoveDelegate=function(t){return i._mouseMove(t)},this._mouseUpDelegate=function(t){return i._mouseUp(t)},this.document.on("mousemove."+this.widgetName,this._mouseMoveDelegate).on("mouseup."+this.widgetName,this._mouseUpDelegate),e.preventDefault(),r=!0),!0)}},_mouseMove:function(t){if(this._mouseMoved&&!t.which){if(t.originalEvent.altKey||t.originalEvent.ctrlKey||t.originalEvent.metaKey||t.originalEvent.shiftKey)this.ignoreMissingWhich=!0;else if(!this.ignoreMissingWhich)return this._mouseUp(t)}return((t.which||t.button)&&(this._mouseMoved=!0),this._mouseStarted)?(this._mouseDrag(t),t.preventDefault()):(this._mouseDistanceMet(t)&&this._mouseDelayMet(t)&&(this._mouseStarted=!1!==this._mouseStart(this._mouseDownEvent,t),this._mouseStarted?this._mouseDrag(t):this._mouseUp(t)),!this._mouseStarted)},_mouseUp:function(e){this.document.off("mousemove."+this.widgetName,this._mouseMoveDelegate).off("mouseup."+this.widgetName,this._mouseUpDelegate),this._mouseStarted&&(this._mouseStarted=!1,e.target===this._mouseDownEvent.target&&t.data(e.target,this.widgetName+".preventClickEvent",!0),this._mouseStop(e)),this._mouseDelayTimer&&(clearTimeout(this._mouseDelayTimer),delete this._mouseDelayTimer),this.ignoreMissingWhich=!1,r=!1,e.preventDefault()},_mouseDistanceMet:function(t){return Math.max(Math.abs(this._mouseDownEvent.pageX-t.pageX),Math.abs(this._mouseDownEvent.pageY-t.pageY))>=this.options.distance},_mouseDelayMet:function(){return this.mouseDelayMet},_mouseStart:function(){},_mouseDrag:function(){},_mouseStop:function(){},_mouseCapture:function(){return!0}}),t.ui.plugin={add:function(e,i,s){var n,o=t.ui[e].prototype;for(n in s)o.plugins[n]=o.plugins[n]||[],o.plugins[n].push([i,s[n]])},call:function(t,e,i,s){var n,o=t.plugins[e];if(o&&(s||t.element[0].parentNode&&11!==t.element[0].parentNode.nodeType))for(n=0;n<o.length;n++)t.options[o[n][0]]&&o[n][1].apply(t.element,i)}},t.widget("ui.draggable",t.ui.mouse,{version:"1.14.1",widgetEventPrefix:"drag",options:{addClasses:!0,appendTo:"parent",axis:!1,connectToSortable:!1,containment:!1,cursor:"auto",cursorAt:!1,grid:!1,handle:!1,helper:"original",iframeFix:!1,opacity:!1,refreshPositions:!1,revert:!1,revertDuration:500,scope:"default",scroll:!0,scrollSensitivity:20,scrollSpeed:20,snap:!1,snapMode:"both",snapTolerance:20,stack:!1,zIndex:!1,drag:null,start:null,stop:null},_create:function(){"original"===this.options.helper&&this._setPositionRelative(),this.options.addClasses&&this._addClass("ui-draggable"),this._setHandleClassName(),this._mouseInit()},_setOption:function(t,e){this._super(t,e),"handle"===t&&(this._removeHandleClassName(),this._setHandleClassName())},_destroy:function(){if((this.helper||this.element).is(".ui-draggable-dragging")){this.destroyOnClear=!0;return}this._removeHandleClassName(),this._mouseDestroy()},_mouseCapture:function(e){var i=this.options;return!this.helper&&!i.disabled&&!(t(e.target).closest(".ui-resizable-handle").length>0)&&(this.handle=this._getHandle(e),!!this.handle&&(this._blurActiveElement(e),this._blockFrames(!0===i.iframeFix?"iframe":i.iframeFix),!0))},_blockFrames:function(e){this.iframeBlocks=this.document.find(e).map(function(){var e=t(this);return t("<div>").css("position","absolute").appendTo(e.parent()).outerWidth(e.outerWidth()).outerHeight(e.outerHeight()).offset(e.offset())[0]})},_unblockFrames:function(){this.iframeBlocks&&(this.iframeBlocks.remove(),delete this.iframeBlocks)},_blurActiveElement:function(e){var i=this.document[0].activeElement;!t(e.target).closest(i).length&&t(i).trigger("blur")},_mouseStart:function(e){var i=this.options;return(this.helper=this._createHelper(e),this._addClass(this.helper,"ui-draggable-dragging"),this._cacheHelperProportions(),t.ui.ddmanager&&(t.ui.ddmanager.current=this),this._cacheMargins(),this.cssPosition=this.helper.css("position"),this.scrollParent=this.helper.scrollParent(!0),this.offsetParent=this.helper.offsetParent(),this.hasFixedAncestor=this.helper.parents().filter(function(){return"fixed"===t(this).css("position")}).length>0,this.positionAbs=this.element.offset(),this._refreshOffsets(e),this.originalPosition=this.position=this._generatePosition(e,!1),this.originalPageX=e.pageX,this.originalPageY=e.pageY,i.cursorAt&&this._adjustOffsetFromHelper(i.cursorAt),this._setContainment(),!1===this._trigger("start",e))?(this._clear(),!1):(this._cacheHelperProportions(),t.ui.ddmanager&&!i.dropBehaviour&&t.ui.ddmanager.prepareOffsets(this,e),this._mouseDrag(e,!0),t.ui.ddmanager&&t.ui.ddmanager.dragStart(this,e),!0)},_refreshOffsets:function(t){this.offset={top:this.positionAbs.top-this.margins.top,left:this.positionAbs.left-this.margins.left,scroll:!1,parent:this._getParentOffset(),relative:this._getRelativeOffset()},this.offset.click={left:t.pageX-this.offset.left,top:t.pageY-this.offset.top}},_mouseDrag:function(e,i){if(this.hasFixedAncestor&&(this.offset.parent=this._getParentOffset()),this.position=this._generatePosition(e,!0),this.positionAbs=this._convertPositionTo("absolute"),!i){var s=this._uiHash();if(!1===this._trigger("drag",e,s))return this._mouseUp(new t.Event("mouseup",e)),!1;this.position=s.position}return this.helper[0].style.left=this.position.left+"px",this.helper[0].style.top=this.position.top+"px",t.ui.ddmanager&&t.ui.ddmanager.drag(this,e),!1},_mouseStop:function(e){var i=this,s=!1;return t.ui.ddmanager&&!this.options.dropBehaviour&&(s=t.ui.ddmanager.drop(this,e)),this.dropped&&(s=this.dropped,this.dropped=!1),"invalid"===this.options.revert&&!s||"valid"===this.options.revert&&s||!0===this.options.revert||"function"==typeof this.options.revert&&this.options.revert.call(this.element,s)?t(this.helper).animate(this.originalPosition,parseInt(this.options.revertDuration,10),function(){!1!==i._trigger("stop",e)&&i._clear()}):!1!==this._trigger("stop",e)&&this._clear(),!1},_mouseUp:function(e){return this._unblockFrames(),t.ui.ddmanager&&t.ui.ddmanager.dragStop(this,e),this.handleElement.is(e.target)&&this.element.trigger("focus"),t.ui.mouse.prototype._mouseUp.call(this,e)},cancel:function(){return this.helper.is(".ui-draggable-dragging")?this._mouseUp(new t.Event("mouseup",{target:this.element[0]})):this._clear(),this},_getHandle:function(e){return!this.options.handle||!!t(e.target).closest(this.element.find(this.options.handle)).length},_setHandleClassName:function(){this.handleElement=this.options.handle?this.element.find(this.options.handle):this.element,this._addClass(this.handleElement,"ui-draggable-handle")},_removeHandleClassName:function(){this._removeClass(this.handleElement,"ui-draggable-handle")},_createHelper:function(e){var i=this.options,s="function"==typeof i.helper,n=s?t(i.helper.apply(this.element[0],[e])):"clone"===i.helper?this.element.clone().removeAttr("id"):this.element;return n.parents("body").length||n.appendTo("parent"===i.appendTo?this.element[0].parentNode:i.appendTo),s&&n[0]===this.element[0]&&this._setPositionRelative(),n[0]===this.element[0]||/(fixed|absolute)/.test(n.css("position"))||n.css("position","absolute"),n},_setPositionRelative:function(){/^(?:r|a|f)/.test(this.element.css("position"))||(this.element[0].style.position="relative")},_adjustOffsetFromHelper:function(t){"string"==typeof t&&(t=t.split(" ")),Array.isArray(t)&&(t={left:+t[0],top:+t[1]||0}),"left"in t&&(this.offset.click.left=t.left+this.margins.left),"right"in t&&(this.offset.click.left=this.helperProportions.width-t.right+this.margins.left),"top"in t&&(this.offset.click.top=t.top+this.margins.top),"bottom"in t&&(this.offset.click.top=this.helperProportions.height-t.bottom+this.margins.top)},_isRootNode:function(t){return/(html|body)/i.test(t.tagName)||t===this.document[0]},_getParentOffset:function(){var e=this.offsetParent.offset(),i=this.document[0];return"absolute"===this.cssPosition&&this.scrollParent[0]!==i&&t.contains(this.scrollParent[0],this.offsetParent[0])&&(e.left+=this.scrollParent.scrollLeft(),e.top+=this.scrollParent.scrollTop()),this._isRootNode(this.offsetParent[0])&&(e={top:0,left:0}),{top:e.top+(parseInt(this.offsetParent.css("borderTopWidth"),10)||0),left:e.left+(parseInt(this.offsetParent.css("borderLeftWidth"),10)||0)}},_getRelativeOffset:function(){if("relative"!==this.cssPosition)return{top:0,left:0};var t=this.element.position(),e=this._isRootNode(this.scrollParent[0]);return{top:t.top-(parseInt(this.helper.css("top"),10)||0)+(e?0:this.scrollParent.scrollTop()),left:t.left-(parseInt(this.helper.css("left"),10)||0)+(e?0:this.scrollParent.scrollLeft())}},_cacheMargins:function(){this.margins={left:parseInt(this.element.css("marginLeft"),10)||0,top:parseInt(this.element.css("marginTop"),10)||0,right:parseInt(this.element.css("marginRight"),10)||0,bottom:parseInt(this.element.css("marginBottom"),10)||0}},_cacheHelperProportions:function(){this.helperProportions={width:this.helper.outerWidth(),height:this.helper.outerHeight()}},_setContainment:function(){var e,i,s,n=this.options,o=this.document[0];if(this.relativeContainer=null,!n.containment){this.containment=null;return}if("window"===n.containment){this.containment=[t(window).scrollLeft()-this.offset.relative.left-this.offset.parent.left,t(window).scrollTop()-this.offset.relative.top-this.offset.parent.top,t(window).scrollLeft()+t(window).width()-this.helperProportions.width-this.margins.left,t(window).scrollTop()+(t(window).height()||o.body.parentNode.scrollHeight)-this.helperProportions.height-this.margins.top];return}if("document"===n.containment){this.containment=[0,0,t(o).width()-this.helperProportions.width-this.margins.left,(t(o).height()||o.body.parentNode.scrollHeight)-this.helperProportions.height-this.margins.top];return}if(n.containment.constructor===Array){this.containment=n.containment;return}"parent"===n.containment&&(n.containment=this.helper[0].parentNode),(s=(i=t(n.containment))[0])&&(e=/(scroll|auto)/.test(i.css("overflow")),this.containment=[(parseInt(i.css("borderLeftWidth"),10)||0)+(parseInt(i.css("paddingLeft"),10)||0),(parseInt(i.css("borderTopWidth"),10)||0)+(parseInt(i.css("paddingTop"),10)||0),(e?Math.max(s.scrollWidth,s.offsetWidth):s.offsetWidth)-(parseInt(i.css("borderRightWidth"),10)||0)-(parseInt(i.css("paddingRight"),10)||0)-this.helperProportions.width-this.margins.left-this.margins.right,(e?Math.max(s.scrollHeight,s.offsetHeight):s.offsetHeight)-(parseInt(i.css("borderBottomWidth"),10)||0)-(parseInt(i.css("paddingBottom"),10)||0)-this.helperProportions.height-this.margins.top-this.margins.bottom],this.relativeContainer=i)},_convertPositionTo:function(t,e){e||(e=this.position);var i="absolute"===t?1:-1,s=this._isRootNode(this.scrollParent[0]);return{top:e.top+this.offset.relative.top*i+this.offset.parent.top*i-("fixed"===this.cssPosition?-this.offset.scroll.top:s?0:this.offset.scroll.top)*i,left:e.left+this.offset.relative.left*i+this.offset.parent.left*i-("fixed"===this.cssPosition?-this.offset.scroll.left:s?0:this.offset.scroll.left)*i}},_generatePosition:function(t,e){var i,s,n,o,r=this.options,h=this._isRootNode(this.scrollParent[0]),a=t.pageX,l=t.pageY;return h&&this.offset.scroll||(this.offset.scroll={top:this.scrollParent.scrollTop(),left:this.scrollParent.scrollLeft()}),e&&(this.containment&&(this.relativeContainer?(s=this.relativeContainer.offset(),i=[this.containment[0]+s.left,this.containment[1]+s.top,this.containment[2]+s.left,this.containment[3]+s.top]):i=this.containment,t.pageX-this.offset.click.left<i[0]&&(a=i[0]+this.offset.click.left),t.pageY-this.offset.click.top<i[1]&&(l=i[1]+this.offset.click.top),t.pageX-this.offset.click.left>i[2]&&(a=i[2]+this.offset.click.left),t.pageY-this.offset.click.top>i[3]&&(l=i[3]+this.offset.click.top)),r.grid&&(n=r.grid[1]?this.originalPageY+Math.round((l-this.originalPageY)/r.grid[1])*r.grid[1]:this.originalPageY,l=i?n-this.offset.click.top>=i[1]||n-this.offset.click.top>i[3]?n:n-this.offset.click.top>=i[1]?n-r.grid[1]:n+r.grid[1]:n,o=r.grid[0]?this.originalPageX+Math.round((a-this.originalPageX)/r.grid[0])*r.grid[0]:this.originalPageX,a=i?o-this.offset.click.left>=i[0]||o-this.offset.click.left>i[2]?o:o-this.offset.click.left>=i[0]?o-r.grid[0]:o+r.grid[0]:o),"y"===r.axis&&(a=this.originalPageX),"x"===r.axis&&(l=this.originalPageY)),{top:l-this.offset.click.top-this.offset.relative.top-this.offset.parent.top+("fixed"===this.cssPosition?-this.offset.scroll.top:h?0:this.offset.scroll.top),left:a-this.offset.click.left-this.offset.relative.left-this.offset.parent.left+("fixed"===this.cssPosition?-this.offset.scroll.left:h?0:this.offset.scroll.left)}},_clear:function(){this._removeClass(this.helper,"ui-draggable-dragging"),this.helper[0]===this.element[0]||this.cancelHelperRemoval||this.helper.remove(),this.helper=null,this.cancelHelperRemoval=!1,this.destroyOnClear&&this.destroy()},_trigger:function(e,i,s){return s=s||this._uiHash(),t.ui.plugin.call(this,e,[i,s,this],!0),/^(drag|start|stop)/.test(e)&&(this.positionAbs=this._convertPositionTo("absolute"),s.offset=this.positionAbs),t.Widget.prototype._trigger.call(this,e,i,s)},plugins:{},_uiHash:function(){return{helper:this.helper,position:this.position,originalPosition:this.originalPosition,offset:this.positionAbs}}}),t.ui.plugin.add("draggable","connectToSortable",{start:function(e,i,s){var n=t.extend({},i,{item:s.element});s.sortables=[],t(s.options.connectToSortable).each(function(){var i=t(this).sortable("instance");i&&!i.options.disabled&&(s.sortables.push(i),i.refreshPositions(),i._trigger("activate",e,n))})},stop:function(e,i,s){var n=t.extend({},i,{item:s.element});s.cancelHelperRemoval=!1,t.each(s.sortables,function(){this.isOver?(this.isOver=0,s.cancelHelperRemoval=!0,this.cancelHelperRemoval=!1,this._storedCSS={position:this.placeholder.css("position"),top:this.placeholder.css("top"),left:this.placeholder.css("left")},this._mouseStop(e),this.options.helper=this.options._helper):(this.cancelHelperRemoval=!0,this._trigger("deactivate",e,n))})},drag:function(e,i,s){t.each(s.sortables,function(){var n=!1,o=this;o.positionAbs=s.positionAbs,o.helperProportions=s.helperProportions,o.offset.click=s.offset.click,o._intersectsWith(o.containerCache)&&(n=!0,t.each(s.sortables,function(){return this.positionAbs=s.positionAbs,this.helperProportions=s.helperProportions,this.offset.click=s.offset.click,this!==o&&this._intersectsWith(this.containerCache)&&t.contains(o.element[0],this.element[0])&&(n=!1),n})),n?(o.isOver||(o.isOver=1,s._parent=i.helper.parent(),o.currentItem=i.helper.appendTo(o.element).data("ui-sortable-item",!0),o.options._helper=o.options.helper,o.options.helper=function(){return i.helper[0]},e.target=o.currentItem[0],o._mouseCapture(e,!0),o._mouseStart(e,!0,!0),o.offset.click.top=s.offset.click.top,o.offset.click.left=s.offset.click.left,o.offset.parent.left-=s.offset.parent.left-o.offset.parent.left,o.offset.parent.top-=s.offset.parent.top-o.offset.parent.top,s._trigger("toSortable",e),s.dropped=o.element,t.each(s.sortables,function(){this.refreshPositions()}),s.currentItem=s.element,o.fromOutside=s),o.currentItem&&(o._mouseDrag(e),i.position=o.position)):o.isOver&&(o.isOver=0,o.cancelHelperRemoval=!0,o.options._revert=o.options.revert,o.options.revert=!1,o._trigger("out",e,o._uiHash(o)),o._mouseStop(e,!0),o.options.revert=o.options._revert,o.options.helper=o.options._helper,o.placeholder&&o.placeholder.remove(),i.helper.appendTo(s._parent),s._refreshOffsets(e),i.position=s._generatePosition(e,!0),s._trigger("fromSortable",e),s.dropped=!1,t.each(s.sortables,function(){this.refreshPositions()}))})}}),t.ui.plugin.add("draggable","cursor",{start:function(e,i,s){var n=t("body"),o=s.options;n.css("cursor")&&(o._cursor=n.css("cursor")),n.css("cursor",o.cursor)},stop:function(e,i,s){var n=s.options;n._cursor&&t("body").css("cursor",n._cursor)}}),t.ui.plugin.add("draggable","opacity",{start:function(e,i,s){var n=t(i.helper),o=s.options;n.css("opacity")&&(o._opacity=n.css("opacity")),n.css("opacity",o.opacity)},stop:function(e,i,s){var n=s.options;n._opacity&&t(i.helper).css("opacity",n._opacity)}}),t.ui.plugin.add("draggable","scroll",{start:function(t,e,i){i.scrollParentNotHidden||(i.scrollParentNotHidden=i.helper.scrollParent(!1)),i.scrollParentNotHidden[0]!==i.document[0]&&"HTML"!==i.scrollParentNotHidden[0].tagName&&(i.overflowOffset=i.scrollParentNotHidden.offset())},drag:function(e,i,s){var n=s.options,o=!1,r=s.scrollParentNotHidden[0],h=s.document[0];r!==h&&"HTML"!==r.tagName?((!n.axis||"x"!==n.axis)&&(s.overflowOffset.top+r.offsetHeight-e.pageY<n.scrollSensitivity?r.scrollTop=o=r.scrollTop+n.scrollSpeed:e.pageY-s.overflowOffset.top<n.scrollSensitivity&&(r.scrollTop=o=r.scrollTop-n.scrollSpeed)),(!n.axis||"y"!==n.axis)&&(s.overflowOffset.left+r.offsetWidth-e.pageX<n.scrollSensitivity?r.scrollLeft=o=r.scrollLeft+n.scrollSpeed:e.pageX-s.overflowOffset.left<n.scrollSensitivity&&(r.scrollLeft=o=r.scrollLeft-n.scrollSpeed))):((!n.axis||"x"!==n.axis)&&(e.pageY-t(h).scrollTop()<n.scrollSensitivity?o=t(h).scrollTop(t(h).scrollTop()-n.scrollSpeed):t(window).height()-(e.pageY-t(h).scrollTop())<n.scrollSensitivity&&(o=t(h).scrollTop(t(h).scrollTop()+n.scrollSpeed))),(!n.axis||"y"!==n.axis)&&(e.pageX-t(h).scrollLeft()<n.scrollSensitivity?o=t(h).scrollLeft(t(h).scrollLeft()-n.scrollSpeed):t(window).width()-(e.pageX-t(h).scrollLeft())<n.scrollSensitivity&&(o=t(h).scrollLeft(t(h).scrollLeft()+n.scrollSpeed)))),!1!==o&&t.ui.ddmanager&&!n.dropBehaviour&&t.ui.ddmanager.prepareOffsets(s,e)}}),t.ui.plugin.add("draggable","snap",{start:function(e,i,s){var n=s.options;s.snapElements=[],t(n.snap.constructor!==String?n.snap.items||":data(ui-draggable)":n.snap).each(function(){var e=t(this),i=e.offset();this!==s.element[0]&&s.snapElements.push({item:this,width:e.outerWidth(),height:e.outerHeight(),top:i.top,left:i.left})})},drag:function(e,i,s){var n,o,r,h,a,l,c,p,u,f,d=s.options,g=d.snapTolerance,m=i.offset.left,_=m+s.helperProportions.width,v=i.offset.top,w=v+s.helperProportions.height;for(u=s.snapElements.length-1;u>=0;u--){if(l=(a=s.snapElements[u].left-s.margins.left)+s.snapElements[u].width,p=(c=s.snapElements[u].top-s.margins.top)+s.snapElements[u].height,_<a-g||m>l+g||w<c-g||v>p+g||!t.contains(s.snapElements[u].item.ownerDocument,s.snapElements[u].item)){s.snapElements[u].snapping&&s.options.snap.release&&s.options.snap.release.call(s.element,e,t.extend(s._uiHash(),{snapItem:s.snapElements[u].item})),s.snapElements[u].snapping=!1;continue}"inner"!==d.snapMode&&(n=Math.abs(c-w)<=g,o=Math.abs(p-v)<=g,r=Math.abs(a-_)<=g,h=Math.abs(l-m)<=g,n&&(i.position.top=s._convertPositionTo("relative",{top:c-s.helperProportions.height,left:0}).top),o&&(i.position.top=s._convertPositionTo("relative",{top:p,left:0}).top),r&&(i.position.left=s._convertPositionTo("relative",{top:0,left:a-s.helperProportions.width}).left),h&&(i.position.left=s._convertPositionTo("relative",{top:0,left:l}).left)),f=n||o||r||h,"outer"!==d.snapMode&&(n=Math.abs(c-v)<=g,o=Math.abs(p-w)<=g,r=Math.abs(a-m)<=g,h=Math.abs(l-_)<=g,n&&(i.position.top=s._convertPositionTo("relative",{top:c,left:0}).top),o&&(i.position.top=s._convertPositionTo("relative",{top:p-s.helperProportions.height,left:0}).top),r&&(i.position.left=s._convertPositionTo("relative",{top:0,left:a}).left),h&&(i.position.left=s._convertPositionTo("relative",{top:0,left:l-s.helperProportions.width}).left)),!s.snapElements[u].snapping&&(n||o||r||h||f)&&s.options.snap.snap&&s.options.snap.snap.call(s.element,e,t.extend(s._uiHash(),{snapItem:s.snapElements[u].item})),s.snapElements[u].snapping=n||o||r||h||f}}}),t.ui.plugin.add("draggable","stack",{start:function(e,i,s){var n,o=s.options,r=t.makeArray(t(o.stack)).sort(function(e,i){return(parseInt(t(e).css("zIndex"),10)||0)-(parseInt(t(i).css("zIndex"),10)||0)});r.length&&(n=parseInt(t(r[0]).css("zIndex"),10)||0,t(r).each(function(e){t(this).css("zIndex",n+e)}),this.css("zIndex",n+r.length))}}),t.ui.plugin.add("draggable","zIndex",{start:function(e,i,s){var n=t(i.helper),o=s.options;n.css("zIndex")&&(o._zIndex=n.css("zIndex")),n.css("zIndex",o.zIndex)},stop:function(e,i,s){var n=s.options;n._zIndex&&t(i.helper).css("zIndex",n._zIndex)}}),t.ui.draggable,t.widget("ui.resizable",t.ui.mouse,{version:"1.14.1",widgetEventPrefix:"resize",options:{alsoResize:!1,animate:!1,animateDuration:"slow",animateEasing:"swing",aspectRatio:!1,autoHide:!1,classes:{"ui-resizable-se":"ui-icon ui-icon-gripsmall-diagonal-se"},containment:!1,ghost:!1,grid:!1,handles:"e,s,se",helper:!1,maxHeight:null,maxWidth:null,minHeight:10,minWidth:10,zIndex:90,resize:null,start:null,stop:null},_num:function(t){return parseFloat(t)||0},_isNumber:function(t){return!isNaN(parseFloat(t))},_hasScroll:function(e,i){var s,n=!1,o=t(e).css("overflow");if("hidden"===o)return!1;if("scroll"===o||e[s=i&&"left"===i?"scrollLeft":"scrollTop"]>0)return!0;try{e[s]=1,n=e[s]>0,e[s]=0}catch(t){}return n},_create:function(){var e,i=this.options,s=this;this._addClass("ui-resizable"),t.extend(this,{_aspectRatio:!!i.aspectRatio,aspectRatio:i.aspectRatio,originalElement:this.element,_proportionallyResizeElements:[],_helper:i.helper||i.ghost||i.animate?i.helper||"ui-resizable-helper":null}),this.element[0].nodeName.match(/^(canvas|textarea|input|select|button|img)$/i)&&(this.element.wrap(t("<div class='ui-wrapper'></div>").css({overflow:"hidden",position:this.element.css("position"),width:this.element.outerWidth(),height:this.element.outerHeight(),top:this.element.css("top"),left:this.element.css("left")})),this.element=this.element.parent().data("ui-resizable",this.element.resizable("instance")),this.elementIsWrapper=!0,e={marginTop:this.originalElement.css("marginTop"),marginRight:this.originalElement.css("marginRight"),marginBottom:this.originalElement.css("marginBottom"),marginLeft:this.originalElement.css("marginLeft")},this.element.css(e),this.originalResizeStyle=this.originalElement.css("resize"),this.originalElement.css("resize","none"),this._proportionallyResizeElements.push(this.originalElement.css({position:"static",zoom:1,display:"block"})),this._proportionallyResize()),this._setupHandles(),i.autoHide&&t(this.element).on("mouseenter",function(){!i.disabled&&(s._removeClass("ui-resizable-autohide"),s._handles.show())}).on("mouseleave",function(){!i.disabled&&(s.resizing||(s._addClass("ui-resizable-autohide"),s._handles.hide()))}),this._mouseInit()},_destroy:function(){this._mouseDestroy(),this._addedHandles.remove();var e,i=function(e){t(e).removeData("resizable").removeData("ui-resizable").off(".resizable")};return this.elementIsWrapper&&(i(this.element),e=this.element,this.originalElement.css({position:e.css("position"),width:e.outerWidth(),height:e.outerHeight(),top:e.css("top"),left:e.css("left")}).insertAfter(e),e.remove()),this.originalElement.css("resize",this.originalResizeStyle),i(this.originalElement),this},_setOption:function(t,e){switch(this._super(t,e),t){case"handles":this._removeHandles(),this._setupHandles();break;case"aspectRatio":this._aspectRatio=!!e}},_setupHandles:function(){var e,i,s,n,o,r=this.options,h=this;if(this.handles=r.handles||(t(".ui-resizable-handle",this.element).length?{n:".ui-resizable-n",e:".ui-resizable-e",s:".ui-resizable-s",w:".ui-resizable-w",se:".ui-resizable-se",sw:".ui-resizable-sw",ne:".ui-resizable-ne",nw:".ui-resizable-nw"}:"e,s,se"),this._handles=t(),this._addedHandles=t(),this.handles.constructor===String)for("all"===this.handles&&(this.handles="n,e,s,w,se,sw,ne,nw"),s=this.handles.split(","),this.handles={},i=0;i<s.length;i++)n="ui-resizable-"+(e=String.prototype.trim.call(s[i])),o=t("<div>"),this._addClass(o,"ui-resizable-handle "+n),o.css({zIndex:r.zIndex}),this.handles[e]=".ui-resizable-"+e,this.element.children(this.handles[e]).length||(this.element.append(o),this._addedHandles=this._addedHandles.add(o));this._renderAxis=function(e){var i,s,n,o;for(i in e=e||this.element,this.handles)this.handles[i].constructor===String?this.handles[i]=this.element.children(this.handles[i]).first().show():(this.handles[i].jquery||this.handles[i].nodeType)&&(this.handles[i]=t(this.handles[i]),this._on(this.handles[i],{mousedown:h._mouseDown})),this.elementIsWrapper&&this.originalElement[0].nodeName.match(/^(textarea|input|select|button)$/i)&&(s=t(this.handles[i],this.element),o=/sw|ne|nw|se|n|s/.test(i)?s.outerHeight():s.outerWidth(),n=["padding",/ne|nw|n/.test(i)?"Top":/se|sw|s/.test(i)?"Bottom":/^e$/.test(i)?"Right":"Left"].join(""),e.css(n,o),this._proportionallyResize()),this._handles=this._handles.add(this.handles[i])},this._renderAxis(this.element),this._handles=this._handles.add(this.element.find(".ui-resizable-handle")),this._handles.disableSelection(),this._handles.on("mouseover",function(){h.resizing||(this.className&&(o=this.className.match(/ui-resizable-(se|sw|ne|nw|n|e|s|w)/i)),h.axis=o&&o[1]?o[1]:"se")}),r.autoHide&&(this._handles.hide(),this._addClass("ui-resizable-autohide"))},_removeHandles:function(){this._addedHandles.remove()},_mouseCapture:function(e){var i,s,n=!1;for(i in this.handles)((s=t(this.handles[i])[0])===e.target||t.contains(s,e.target))&&(n=!0);return!this.options.disabled&&n},_mouseStart:function(e){var i,s,n,o,r=this.options,h=this.element;return this.resizing=!0,this._renderProxy(),i=this._num(this.helper.css("left")),s=this._num(this.helper.css("top")),r.containment&&(i+=t(r.containment).scrollLeft()||0,s+=t(r.containment).scrollTop()||0),this.offset=this.helper.offset(),this.position={left:i,top:s},this._helper||(o=this._calculateAdjustedElementDimensions(h)),this.size=this._helper?{width:this.helper.width(),height:this.helper.height()}:{width:o.width,height:o.height},this.originalSize=this._helper?{width:h.outerWidth(),height:h.outerHeight()}:{width:o.width,height:o.height},this.sizeDiff={width:h.outerWidth()-h.width(),height:h.outerHeight()-h.height()},this.originalPosition={left:i,top:s},this.originalMousePosition={left:e.pageX,top:e.pageY},this.aspectRatio="number"==typeof r.aspectRatio?r.aspectRatio:this.originalSize.width/this.originalSize.height||1,n=t(".ui-resizable-"+this.axis).css("cursor"),t("body").css("cursor","auto"===n?this.axis+"-resize":n),this._addClass("ui-resizable-resizing"),this._propagate("start",e),!0},_mouseDrag:function(e){var i,s,n=this.originalMousePosition,o=this.axis,r=e.pageX-n.left||0,h=e.pageY-n.top||0,a=this._change[o];return this._updatePrevProperties(),!!a&&(i=a.apply(this,[e,r,h]),this._updateVirtualBoundaries(e.shiftKey),(this._aspectRatio||e.shiftKey)&&(i=this._updateRatio(i,e)),i=this._respectSize(i,e),this._updateCache(i),this._propagate("resize",e),s=this._applyChanges(),!this._helper&&this._proportionallyResizeElements.length&&this._proportionallyResize(),t.isEmptyObject(s)||(this._updatePrevProperties(),this._trigger("resize",e,this.ui()),this._applyChanges()),!1)},_mouseStop:function(e){this.resizing=!1;var i,s,n,o,r,h,a,l=this.options;return this._helper&&(n=(s=(i=this._proportionallyResizeElements).length&&/textarea/i.test(i[0].nodeName))&&this._hasScroll(i[0],"left")?0:this.sizeDiff.height,o=s?0:this.sizeDiff.width,r={width:this.helper.width()-o,height:this.helper.height()-n},h=parseFloat(this.element.css("left"))+(this.position.left-this.originalPosition.left)||null,a=parseFloat(this.element.css("top"))+(this.position.top-this.originalPosition.top)||null,l.animate||this.element.css(t.extend(r,{top:a,left:h})),this.helper.height(this.size.height),this.helper.width(this.size.width),this._helper&&!l.animate&&this._proportionallyResize()),t("body").css("cursor","auto"),this._removeClass("ui-resizable-resizing"),this._propagate("stop",e),this._helper&&this.helper.remove(),!1},_updatePrevProperties:function(){this.prevPosition={top:this.position.top,left:this.position.left},this.prevSize={width:this.size.width,height:this.size.height}},_applyChanges:function(){var t={};return this.position.top!==this.prevPosition.top&&(t.top=this.position.top+"px"),this.position.left!==this.prevPosition.left&&(t.left=this.position.left+"px"),this.helper.css(t),this.size.width!==this.prevSize.width&&(t.width=this.size.width+"px",this.helper.width(t.width)),this.size.height!==this.prevSize.height&&(t.height=this.size.height+"px",this.helper.height(t.height)),t},_updateVirtualBoundaries:function(t){var e,i,s,n,o,r=this.options;o={minWidth:this._isNumber(r.minWidth)?r.minWidth:0,maxWidth:this._isNumber(r.maxWidth)?r.maxWidth:1/0,minHeight:this._isNumber(r.minHeight)?r.minHeight:0,maxHeight:this._isNumber(r.maxHeight)?r.maxHeight:1/0},(this._aspectRatio||t)&&(e=o.minHeight*this.aspectRatio,s=o.minWidth/this.aspectRatio,i=o.maxHeight*this.aspectRatio,n=o.maxWidth/this.aspectRatio,e>o.minWidth&&(o.minWidth=e),s>o.minHeight&&(o.minHeight=s),i<o.maxWidth&&(o.maxWidth=i),n<o.maxHeight&&(o.maxHeight=n)),this._vBoundaries=o},_updateCache:function(t){this.offset=this.helper.offset(),this._isNumber(t.left)&&(this.position.left=t.left),this._isNumber(t.top)&&(this.position.top=t.top),this._isNumber(t.height)&&(this.size.height=t.height),this._isNumber(t.width)&&(this.size.width=t.width)},_updateRatio:function(t){var e=this.position,i=this.size,s=this.axis;return this._isNumber(t.height)?t.width=t.height*this.aspectRatio:this._isNumber(t.width)&&(t.height=t.width/this.aspectRatio),"sw"===s&&(t.left=e.left+(i.width-t.width),t.top=null),"nw"===s&&(t.top=e.top+(i.height-t.height),t.left=e.left+(i.width-t.width)),t},_respectSize:function(t){var e=this._vBoundaries,i=this.axis,s=this._isNumber(t.width)&&e.maxWidth&&e.maxWidth<t.width,n=this._isNumber(t.height)&&e.maxHeight&&e.maxHeight<t.height,o=this._isNumber(t.width)&&e.minWidth&&e.minWidth>t.width,r=this._isNumber(t.height)&&e.minHeight&&e.minHeight>t.height,h=this.originalPosition.left+this.originalSize.width,a=this.originalPosition.top+this.originalSize.height,l=/sw|nw|w/.test(i),c=/nw|ne|n/.test(i);return o&&(t.width=e.minWidth),r&&(t.height=e.minHeight),s&&(t.width=e.maxWidth),n&&(t.height=e.maxHeight),o&&l&&(t.left=h-e.minWidth),s&&l&&(t.left=h-e.maxWidth),r&&c&&(t.top=a-e.minHeight),n&&c&&(t.top=a-e.maxHeight),t.width||t.height||t.left||!t.top?t.width||t.height||t.top||!t.left||(t.left=null):t.top=null,t},_getPaddingPlusBorderDimensions:function(t){for(var e=0,i=[],s=[t.css("borderTopWidth"),t.css("borderRightWidth"),t.css("borderBottomWidth"),t.css("borderLeftWidth")],n=[t.css("paddingTop"),t.css("paddingRight"),t.css("paddingBottom"),t.css("paddingLeft")];e<4;e++)i[e]=parseFloat(s[e])||0,i[e]+=parseFloat(n[e])||0;return{height:i[0]+i[2],width:i[1]+i[3]}},_calculateAdjustedElementDimensions:function(t){var e,i,s,n=t.get(0);return"content-box"===t.css("box-sizing")&&(this._hasScroll(n)||this._hasScroll(n,"left"))?(e=parseFloat(n.style.width),i=parseFloat(n.style.height),s=this._getPaddingPlusBorderDimensions(t),e=isNaN(e)?this._getElementTheoreticalSize(t,s,"width"):e,{height:i=isNaN(i)?this._getElementTheoreticalSize(t,s,"height"):i,width:e}):{height:parseFloat(t.css("height")),width:parseFloat(t.css("width"))}},_getElementTheoreticalSize:function(t,e,i){return Math.max(0,Math.ceil(t.get(0)["offset"+i[0].toUpperCase()+i.slice(1)]-e[i]-.5))||0},_proportionallyResize:function(){if(this._proportionallyResizeElements.length)for(var t,e=0,i=this.helper||this.element;e<this._proportionallyResizeElements.length;e++)t=this._proportionallyResizeElements[e],this.outerDimensions||(this.outerDimensions=this._getPaddingPlusBorderDimensions(t)),t.css({height:i.height()-this.outerDimensions.height||0,width:i.width()-this.outerDimensions.width||0})},_renderProxy:function(){var e=this.element,i=this.options;this.elementOffset=e.offset(),this._helper?(this.helper=this.helper||t("<div></div>").css({overflow:"hidden"}),this._addClass(this.helper,this._helper),this.helper.css({width:this.element.outerWidth(),height:this.element.outerHeight(),position:"absolute",left:this.elementOffset.left+"px",top:this.elementOffset.top+"px",zIndex:++i.zIndex}),this.helper.appendTo("body").disableSelection()):this.helper=this.element},_change:{e:function(t,e){return{width:this.originalSize.width+e}},w:function(t,e){var i=this.originalSize;return{left:this.originalPosition.left+e,width:i.width-e}},n:function(t,e,i){var s=this.originalSize;return{top:this.originalPosition.top+i,height:s.height-i}},s:function(t,e,i){return{height:this.originalSize.height+i}},se:function(e,i,s){return t.extend(this._change.s.apply(this,arguments),this._change.e.apply(this,[e,i,s]))},sw:function(e,i,s){return t.extend(this._change.s.apply(this,arguments),this._change.w.apply(this,[e,i,s]))},ne:function(e,i,s){return t.extend(this._change.n.apply(this,arguments),this._change.e.apply(this,[e,i,s]))},nw:function(e,i,s){return t.extend(this._change.n.apply(this,arguments),this._change.w.apply(this,[e,i,s]))}},_propagate:function(e,i){t.ui.plugin.call(this,e,[i,this.ui()]),"resize"!==e&&this._trigger(e,i,this.ui())},plugins:{},ui:function(){return{originalElement:this.originalElement,element:this.element,helper:this.helper,position:this.position,size:this.size,originalSize:this.originalSize,originalPosition:this.originalPosition}}}),t.ui.plugin.add("resizable","animate",{stop:function(e){var i=t(this).resizable("instance"),s=i.options,n=i._proportionallyResizeElements,o=n.length&&/textarea/i.test(n[0].nodeName),r=o&&i._hasScroll(n[0],"left")?0:i.sizeDiff.height,h=o?0:i.sizeDiff.width,a={width:i.size.width-h,height:i.size.height-r},l=parseFloat(i.element.css("left"))+(i.position.left-i.originalPosition.left)||null,c=parseFloat(i.element.css("top"))+(i.position.top-i.originalPosition.top)||null;i.element.animate(t.extend(a,c&&l?{top:c,left:l}:{}),{duration:s.animateDuration,easing:s.animateEasing,step:function(){var s={width:parseFloat(i.element.css("width")),height:parseFloat(i.element.css("height")),top:parseFloat(i.element.css("top")),left:parseFloat(i.element.css("left"))};n&&n.length&&t(n[0]).css({width:s.width,height:s.height}),i._updateCache(s),i._propagate("resize",e)}})}}),t.ui.plugin.add("resizable","containment",{start:function(){var e,i,s,n,o,r,h,a=t(this).resizable("instance"),l=a.options,c=a.element,p=l.containment,u=p instanceof t?p.get(0):/parent/.test(p)?c.parent().get(0):p;u&&(a.containerElement=t(u),/document/.test(p)||p===document?(a.containerOffset={left:0,top:0},a.containerPosition={left:0,top:0},a.parentData={element:t(document),left:0,top:0,width:t(document).width(),height:t(document).height()||document.body.parentNode.scrollHeight}):(e=t(u),i=[],t(["Top","Right","Left","Bottom"]).each(function(t,s){i[t]=a._num(e.css("padding"+s))}),a.containerOffset=e.offset(),a.containerPosition=e.position(),a.containerSize={height:e.innerHeight()-i[3],width:e.innerWidth()-i[1]},s=a.containerOffset,n=a.containerSize.height,o=a.containerSize.width,r=a._hasScroll(u,"left")?u.scrollWidth:o,h=a._hasScroll(u)?u.scrollHeight:n,a.parentData={element:u,left:s.left,top:s.top,width:r,height:h}))},resize:function(e){var i,s,n,o,r=t(this).resizable("instance"),h=r.options,a=r.containerOffset,l=r.position,c=r._aspectRatio||e.shiftKey,p={top:0,left:0},u=r.containerElement,f=!0;u[0]!==document&&/static/.test(u.css("position"))&&(p=a),l.left<(r._helper?a.left:0)&&(r.size.width=r.size.width+(r._helper?r.position.left-a.left:r.position.left-p.left),c&&(r.size.height=r.size.width/r.aspectRatio,f=!1),r.position.left=h.helper?a.left:0),l.top<(r._helper?a.top:0)&&(r.size.height=r.size.height+(r._helper?r.position.top-a.top:r.position.top),c&&(r.size.width=r.size.height*r.aspectRatio,f=!1),r.position.top=r._helper?a.top:0),n=r.containerElement.get(0)===r.element.parent().get(0),o=/relative|absolute/.test(r.containerElement.css("position")),n&&o?(r.offset.left=r.parentData.left+r.position.left,r.offset.top=r.parentData.top+r.position.top):(r.offset.left=r.element.offset().left,r.offset.top=r.element.offset().top),i=Math.abs(r.sizeDiff.width+(r._helper?r.offset.left-p.left:r.offset.left-a.left)),s=Math.abs(r.sizeDiff.height+(r._helper?r.offset.top-p.top:r.offset.top-a.top)),i+r.size.width>=r.parentData.width&&(r.size.width=r.parentData.width-i,c&&(r.size.height=r.size.width/r.aspectRatio,f=!1)),s+r.size.height>=r.parentData.height&&(r.size.height=r.parentData.height-s,c&&(r.size.width=r.size.height*r.aspectRatio,f=!1)),f||(r.position.left=r.prevPosition.left,r.position.top=r.prevPosition.top,r.size.width=r.prevSize.width,r.size.height=r.prevSize.height)},stop:function(){var e=t(this).resizable("instance"),i=e.options,s=e.containerOffset,n=e.containerPosition,o=e.containerElement,r=t(e.helper),h=r.offset(),a=r.outerWidth()-e.sizeDiff.width,l=r.outerHeight()-e.sizeDiff.height;e._helper&&!i.animate&&/relative/.test(o.css("position"))&&t(this).css({left:h.left-n.left-s.left,width:a,height:l}),e._helper&&!i.animate&&/static/.test(o.css("position"))&&t(this).css({left:h.left-n.left-s.left,width:a,height:l})}}),t.ui.plugin.add("resizable","alsoResize",{start:function(){var e=t(this).resizable("instance");t(e.options.alsoResize).each(function(){var i=t(this),s=e._calculateAdjustedElementDimensions(i);i.data("ui-resizable-alsoresize",{width:s.width,height:s.height,left:parseFloat(i.css("left")),top:parseFloat(i.css("top"))})})},resize:function(e,i){var s=t(this).resizable("instance"),n=s.options,o=s.originalSize,r=s.originalPosition,h={height:s.size.height-o.height||0,width:s.size.width-o.width||0,top:s.position.top-r.top||0,left:s.position.left-r.left||0};t(n.alsoResize).each(function(){var e=t(this),s=t(this).data("ui-resizable-alsoresize"),n={},o=e.parents(i.originalElement[0]).length?["width","height"]:["width","height","top","left"];t.each(o,function(t,e){var i=(s[e]||0)+(h[e]||0);i&&i>=0&&(n[e]=i||null)}),e.css(n)})},stop:function(){t(this).removeData("ui-resizable-alsoresize")}}),t.ui.plugin.add("resizable","ghost",{start:function(){var e=t(this).resizable("instance"),i=e.size;e.ghost=e.originalElement.clone(),e.ghost.css({opacity:.25,display:"block",position:"relative",height:i.height,width:i.width,margin:0,left:0,top:0}),e._addClass(e.ghost,"ui-resizable-ghost"),!0===t.uiBackCompat&&"string"==typeof e.options.ghost&&e.ghost.addClass(this.options.ghost),e.ghost.appendTo(e.helper)},resize:function(){var e=t(this).resizable("instance");e.ghost&&e.ghost.css({position:"relative",height:e.size.height,width:e.size.width})},stop:function(){var e=t(this).resizable("instance");e.ghost&&e.helper&&e.helper.get(0).removeChild(e.ghost.get(0))}}),t.ui.plugin.add("resizable","grid",{resize:function(){var e,i=t(this).resizable("instance"),s=i.options,n=i.size,o=i.originalSize,r=i.originalPosition,h=i.axis,a="number"==typeof s.grid?[s.grid,s.grid]:s.grid,l=a[0]||1,c=a[1]||1,p=Math.round((n.width-o.width)/l)*l,u=Math.round((n.height-o.height)/c)*c,f=o.width+p,d=o.height+u,g=s.maxWidth&&s.maxWidth<f,m=s.maxHeight&&s.maxHeight<d,_=s.minWidth&&s.minWidth>f,v=s.minHeight&&s.minHeight>d;s.grid=a,_&&(f+=l),v&&(d+=c),g&&(f-=l),m&&(d-=c),/^(se|s|e)$/.test(h)?(i.size.width=f,i.size.height=d):/^(ne)$/.test(h)?(i.size.width=f,i.size.height=d,i.position.top=r.top-u):/^(sw)$/.test(h)?(i.size.width=f,i.size.height=d,i.position.left=r.left-p):((d-c<=0||f-l<=0)&&(e=i._getPaddingPlusBorderDimensions(this)),d-c>0?(i.size.height=d,i.position.top=r.top-u):(d=c-e.height,i.size.height=d,i.position.top=r.top+o.height-d),f-l>0?(i.size.width=f,i.position.left=r.left-p):(f=l-e.width,i.size.width=f,i.position.left=r.left+o.width-f))}}),t.ui.resizable,t.widget("ui.sortable",t.ui.mouse,{version:"1.14.1",widgetEventPrefix:"sort",ready:!1,options:{appendTo:"parent",axis:!1,connectWith:!1,containment:!1,cursor:"auto",cursorAt:!1,dropOnEmpty:!0,forcePlaceholderSize:!1,forceHelperSize:!1,grid:!1,handle:!1,helper:"original",items:"> *",opacity:!1,placeholder:!1,revert:!1,scroll:!0,scrollSensitivity:20,scrollSpeed:20,scope:"default",tolerance:"intersect",zIndex:1e3,activate:null,beforeStop:null,change:null,deactivate:null,out:null,over:null,receive:null,remove:null,sort:null,start:null,stop:null,update:null},_isOverAxis:function(t,e,i){return t>=e&&t<e+i},_isFloating:function(t){return/left|right/.test(t.css("float"))||/inline|table-cell/.test(t.css("display"))},_create:function(){this.containerCache={},this._addClass("ui-sortable"),this.refresh(),this.offset=this.element.offset(),this._mouseInit(),this._setHandleClassName(),this.ready=!0},_setOption:function(t,e){this._super(t,e),"handle"===t&&this._setHandleClassName()},_setHandleClassName:function(){var e=this;this._removeClass(this.element.find(".ui-sortable-handle"),"ui-sortable-handle"),t.each(this.items,function(){e._addClass(this.instance.options.handle?this.item.find(this.instance.options.handle):this.item,"ui-sortable-handle")})},_destroy:function(){this._mouseDestroy();for(var t=this.items.length-1;t>=0;t--)this.items[t].item.removeData(this.widgetName+"-item");return this},_mouseCapture:function(e,i){var s=null,n=!1,o=this;return!this.reverting&&!this.options.disabled&&"static"!==this.options.type&&(this._refreshItems(e),t(e.target).parents().each(function(){if(t.data(this,o.widgetName+"-item")===o)return s=t(this),!1}),t.data(e.target,o.widgetName+"-item")===o&&(s=t(e.target)),!!s&&(!this.options.handle||!!i||(t(this.options.handle,s).find("*").addBack().each(function(){this===e.target&&(n=!0)}),!!n))&&(this.currentItem=s,this._removeCurrentsFromItems(),!0))},_mouseStart:function(e,i,s){var n,o,r=this.options;if(this.currentContainer=this,this.refreshPositions(),this.appendTo=t("parent"!==r.appendTo?r.appendTo:this.currentItem.parent()),this.helper=this._createHelper(e),this._cacheHelperProportions(),this._cacheMargins(),this.offset=this.currentItem.offset(),this.offset={top:this.offset.top-this.margins.top,left:this.offset.left-this.margins.left},t.extend(this.offset,{click:{left:e.pageX-this.offset.left,top:e.pageY-this.offset.top},relative:this._getRelativeOffset()}),this.helper.css("position","absolute"),this.cssPosition=this.helper.css("position"),r.cursorAt&&this._adjustOffsetFromHelper(r.cursorAt),this.domPosition={prev:this.currentItem.prev()[0],parent:this.currentItem.parent()[0]},this.helper[0]!==this.currentItem[0]&&this.currentItem.hide(),this._createPlaceholder(),this.scrollParent=this.placeholder.scrollParent(),t.extend(this.offset,{parent:this._getParentOffset()}),r.containment&&this._setContainment(),r.cursor&&"auto"!==r.cursor&&(o=this.document.find("body"),this._storedStylesheet=t("<style>*{ cursor: "+r.cursor+" !important; }</style>").appendTo(o)),r.zIndex&&(this.helper.css("zIndex")&&(this._storedZIndex=this.helper.css("zIndex")),this.helper.css("zIndex",r.zIndex)),r.opacity&&(this.helper.css("opacity")&&(this._storedOpacity=this.helper.css("opacity")),this.helper.css("opacity",r.opacity)),this.scrollParent[0]!==this.document[0]&&"HTML"!==this.scrollParent[0].tagName&&(this.overflowOffset=this.scrollParent.offset()),this._trigger("start",e,this._uiHash()),this._preserveHelperProportions||this._cacheHelperProportions(),!s)for(n=this.containers.length-1;n>=0;n--)this.containers[n]._trigger("activate",e,this._uiHash(this));return t.ui.ddmanager&&(t.ui.ddmanager.current=this),t.ui.ddmanager&&!r.dropBehaviour&&t.ui.ddmanager.prepareOffsets(this,e),this.dragging=!0,this._addClass(this.helper,"ui-sortable-helper"),this.helper.parent().is(this.appendTo)||(this.helper.detach().appendTo(this.appendTo),this.offset.parent=this._getParentOffset()),this.position=this.originalPosition=this._generatePosition(e),this.originalPageX=e.pageX,this.originalPageY=e.pageY,this.lastPositionAbs=this.positionAbs=this._convertPositionTo("absolute"),this._mouseDrag(e),!0},_scroll:function(t){var e=this.options,i=!1;return this.scrollParent[0]!==this.document[0]&&"HTML"!==this.scrollParent[0].tagName?(this.overflowOffset.top+this.scrollParent[0].offsetHeight-t.pageY<e.scrollSensitivity?this.scrollParent[0].scrollTop=i=this.scrollParent[0].scrollTop+e.scrollSpeed:t.pageY-this.overflowOffset.top<e.scrollSensitivity&&(this.scrollParent[0].scrollTop=i=this.scrollParent[0].scrollTop-e.scrollSpeed),this.overflowOffset.left+this.scrollParent[0].offsetWidth-t.pageX<e.scrollSensitivity?this.scrollParent[0].scrollLeft=i=this.scrollParent[0].scrollLeft+e.scrollSpeed:t.pageX-this.overflowOffset.left<e.scrollSensitivity&&(this.scrollParent[0].scrollLeft=i=this.scrollParent[0].scrollLeft-e.scrollSpeed)):(t.pageY-this.document.scrollTop()<e.scrollSensitivity?i=this.document.scrollTop(this.document.scrollTop()-e.scrollSpeed):this.window.height()-(t.pageY-this.document.scrollTop())<e.scrollSensitivity&&(i=this.document.scrollTop(this.document.scrollTop()+e.scrollSpeed)),t.pageX-this.document.scrollLeft()<e.scrollSensitivity?i=this.document.scrollLeft(this.document.scrollLeft()-e.scrollSpeed):this.window.width()-(t.pageX-this.document.scrollLeft())<e.scrollSensitivity&&(i=this.document.scrollLeft(this.document.scrollLeft()+e.scrollSpeed))),i},_mouseDrag:function(e){var i,s,n,o,r=this.options;for(this.position=this._generatePosition(e),this.positionAbs=this._convertPositionTo("absolute"),this.options.axis&&"y"===this.options.axis||(this.helper[0].style.left=this.position.left+"px"),this.options.axis&&"x"===this.options.axis||(this.helper[0].style.top=this.position.top+"px"),r.scroll&&!1!==this._scroll(e)&&(this._refreshItemPositions(!0),t.ui.ddmanager&&!r.dropBehaviour&&t.ui.ddmanager.prepareOffsets(this,e)),this.dragDirection={vertical:this._getDragVerticalDirection(),horizontal:this._getDragHorizontalDirection()},i=this.items.length-1;i>=0;i--)if(n=(s=this.items[i]).item[0],(o=this._intersectsWithPointer(s))&&s.instance===this.currentContainer&&n!==this.currentItem[0]&&this.placeholder[1===o?"next":"prev"]()[0]!==n&&!t.contains(this.placeholder[0],n)&&("semi-dynamic"!==this.options.type||!t.contains(this.element[0],n))){if(this.direction=1===o?"down":"up","pointer"===this.options.tolerance||this._intersectsWithSides(s))this._rearrange(e,s);else break;this._trigger("change",e,this._uiHash());break}return this._contactContainers(e),t.ui.ddmanager&&t.ui.ddmanager.drag(this,e),this._trigger("sort",e,this._uiHash()),this.lastPositionAbs=this.positionAbs,!1},_mouseStop:function(e,i){if(e){if(t.ui.ddmanager&&!this.options.dropBehaviour&&t.ui.ddmanager.drop(this,e),this.options.revert){var s=this,n=this.placeholder.offset(),o=this.options.axis,r={};o&&"x"!==o||(r.left=n.left-this.offset.parent.left-this.margins.left+(this.offsetParent[0]===this.document[0].body?0:this.offsetParent[0].scrollLeft)),o&&"y"!==o||(r.top=n.top-this.offset.parent.top-this.margins.top+(this.offsetParent[0]===this.document[0].body?0:this.offsetParent[0].scrollTop)),this.reverting=!0,t(this.helper).animate(r,parseInt(this.options.revert,10)||500,function(){s._clear(e)})}else this._clear(e,i);return!1}},cancel:function(){if(this.dragging){this._mouseUp(new t.Event("mouseup",{target:null})),"original"===this.options.helper?(this.currentItem.css(this._storedCSS),this._removeClass(this.currentItem,"ui-sortable-helper")):this.currentItem.show();for(var e=this.containers.length-1;e>=0;e--)this.containers[e]._trigger("deactivate",null,this._uiHash(this)),this.containers[e].containerCache.over&&(this.containers[e]._trigger("out",null,this._uiHash(this)),this.containers[e].containerCache.over=0)}return this.placeholder&&(this.placeholder[0].parentNode&&this.placeholder[0].parentNode.removeChild(this.placeholder[0]),"original"!==this.options.helper&&this.helper&&this.helper[0].parentNode&&this.helper.remove(),t.extend(this,{helper:null,dragging:!1,reverting:!1,_noFinalSort:null}),this.domPosition.prev?t(this.domPosition.prev).after(this.currentItem):t(this.domPosition.parent).prepend(this.currentItem)),this},serialize:function(e){var i=this._getItemsAsjQuery(e&&e.connected),s=[];return e=e||{},t(i).each(function(){var i=(t(e.item||this).attr(e.attribute||"id")||"").match(e.expression||/(.+)[\-=_](.+)/);i&&s.push((e.key||i[1]+"[]")+"="+(e.key&&e.expression?i[1]:i[2]))}),!s.length&&e.key&&s.push(e.key+"="),s.join("&")},toArray:function(e){var i=this._getItemsAsjQuery(e&&e.connected),s=[];return e=e||{},i.each(function(){s.push(t(e.item||this).attr(e.attribute||"id")||"")}),s},_intersectsWith:function(t){var e=this.positionAbs.left,i=e+this.helperProportions.width,s=this.positionAbs.top,n=s+this.helperProportions.height,o=t.left,r=o+t.width,h=t.top,a=h+t.height,l=this.offset.click.top,c=this.offset.click.left,p="x"===this.options.axis||s+l>h&&s+l<a,u="y"===this.options.axis||e+c>o&&e+c<r;return"pointer"===this.options.tolerance||this.options.forcePointerForContainers||"pointer"!==this.options.tolerance&&this.helperProportions[this.floating?"width":"height"]>t[this.floating?"width":"height"]?p&&u:o<e+this.helperProportions.width/2&&i-this.helperProportions.width/2<r&&h<s+this.helperProportions.height/2&&n-this.helperProportions.height/2<a},_intersectsWithPointer:function(t){var e,i,s="x"===this.options.axis||this._isOverAxis(this.positionAbs.top+this.offset.click.top,t.top,t.height),n="y"===this.options.axis||this._isOverAxis(this.positionAbs.left+this.offset.click.left,t.left,t.width);return!!s&&!!n&&(e=this.dragDirection.vertical,i=this.dragDirection.horizontal,this.floating?"right"===i||"down"===e?2:1:e&&("down"===e?2:1))},_intersectsWithSides:function(t){var e=this._isOverAxis(this.positionAbs.top+this.offset.click.top,t.top+t.height/2,t.height),i=this._isOverAxis(this.positionAbs.left+this.offset.click.left,t.left+t.width/2,t.width),s=this.dragDirection.vertical,n=this.dragDirection.horizontal;return this.floating&&n?"right"===n&&i||"left"===n&&!i:s&&("down"===s&&e||"up"===s&&!e)},_getDragVerticalDirection:function(){var t=this.positionAbs.top-this.lastPositionAbs.top;return 0!==t&&(t>0?"down":"up")},_getDragHorizontalDirection:function(){var t=this.positionAbs.left-this.lastPositionAbs.left;return 0!==t&&(t>0?"right":"left")},refresh:function(t){return this._refreshItems(t),this._setHandleClassName(),this.refreshPositions(),this},_connectWith:function(){var t=this.options;return t.connectWith.constructor===String?[t.connectWith]:t.connectWith},_getItemsAsjQuery:function(e){var i,s,n,o,r=[],h=[],a=this._connectWith();if(a&&e)for(i=a.length-1;i>=0;i--)for(s=(n=t(a[i],this.document[0])).length-1;s>=0;s--)(o=t.data(n[s],this.widgetFullName))&&o!==this&&!o.options.disabled&&h.push(["function"==typeof o.options.items?o.options.items.call(o.element):t(o.options.items,o.element).not(".ui-sortable-helper").not(".ui-sortable-placeholder"),o]);function l(){r.push(this)}for(h.push(["function"==typeof this.options.items?this.options.items.call(this.element,null,{options:this.options,item:this.currentItem}):t(this.options.items,this.element).not(".ui-sortable-helper").not(".ui-sortable-placeholder"),this]),i=h.length-1;i>=0;i--)h[i][0].each(l);return t(r)},_removeCurrentsFromItems:function(){var e=this.currentItem.find(":data("+this.widgetName+"-item)");this.items=t.grep(this.items,function(t){for(var i=0;i<e.length;i++)if(e[i]===t.item[0])return!1;return!0})},_refreshItems:function(e){this.items=[],this.containers=[this];var i,s,n,o,r,h,a,l,c=this.items,p=[["function"==typeof this.options.items?this.options.items.call(this.element[0],e,{item:this.currentItem}):t(this.options.items,this.element),this]],u=this._connectWith();if(u&&this.ready)for(i=u.length-1;i>=0;i--)for(s=(n=t(u[i],this.document[0])).length-1;s>=0;s--)(o=t.data(n[s],this.widgetFullName))&&o!==this&&!o.options.disabled&&(p.push(["function"==typeof o.options.items?o.options.items.call(o.element[0],e,{item:this.currentItem}):t(o.options.items,o.element),o]),this.containers.push(o));for(i=p.length-1;i>=0;i--)for(s=0,r=p[i][1],l=(h=p[i][0]).length;s<l;s++)(a=t(h[s])).data(this.widgetName+"-item",r),c.push({item:a,instance:r,width:0,height:0,left:0,top:0})},_refreshItemPositions:function(e){var i,s,n,o;for(i=this.items.length-1;i>=0;i--)s=this.items[i],(!this.currentContainer||s.instance===this.currentContainer||s.item[0]===this.currentItem[0])&&(n=this.options.toleranceElement?t(this.options.toleranceElement,s.item):s.item,e||(s.width=n.outerWidth(),s.height=n.outerHeight()),s.left=(o=n.offset()).left,s.top=o.top)},refreshPositions:function(t){var e,i;if(this.floating=!!this.items.length&&("x"===this.options.axis||this._isFloating(this.items[0].item)),this.offsetParent&&this.helper&&(this.offset.parent=this._getParentOffset()),this._refreshItemPositions(t),this.options.custom&&this.options.custom.refreshContainers)this.options.custom.refreshContainers.call(this);else for(e=this.containers.length-1;e>=0;e--)i=this.containers[e].element.offset(),this.containers[e].containerCache.left=i.left,this.containers[e].containerCache.top=i.top,this.containers[e].containerCache.width=this.containers[e].element.outerWidth(),this.containers[e].containerCache.height=this.containers[e].element.outerHeight();return this},_createPlaceholder:function(e){var i,s,n=(e=e||this).options;n.placeholder&&n.placeholder.constructor!==String||(i=n.placeholder,s=e.currentItem[0].nodeName.toLowerCase(),n.placeholder={element:function(){var n=t("<"+s+">",e.document[0]);return e._addClass(n,"ui-sortable-placeholder",i||e.currentItem[0].className)._removeClass(n,"ui-sortable-helper"),"tbody"===s?e._createTrPlaceholder(e.currentItem.find("tr").eq(0),t("<tr>",e.document[0]).appendTo(n)):"tr"===s?e._createTrPlaceholder(e.currentItem,n):"img"===s&&n.attr("src",e.currentItem.attr("src")),i||n.css("visibility","hidden"),n},update:function(t,o){(!i||n.forcePlaceholderSize)&&((!o.height()||n.forcePlaceholderSize&&("tbody"===s||"tr"===s))&&o.height(e.currentItem.innerHeight()-parseInt(e.currentItem.css("paddingTop")||0,10)-parseInt(e.currentItem.css("paddingBottom")||0,10)),o.width()||o.width(e.currentItem.innerWidth()-parseInt(e.currentItem.css("paddingLeft")||0,10)-parseInt(e.currentItem.css("paddingRight")||0,10)))}}),e.placeholder=t(n.placeholder.element.call(e.element,e.currentItem)),e.currentItem.after(e.placeholder),n.placeholder.update(e,e.placeholder)},_createTrPlaceholder:function(e,i){var s=this;e.children().each(function(){t("<td>&#160;</td>",s.document[0]).attr("colspan",t(this).attr("colspan")||1).appendTo(i)})},_contactContainers:function(e){var i,s,n,o,r,h,a,l,c,p,u=null,f=null;for(i=this.containers.length-1;i>=0;i--)if(!t.contains(this.currentItem[0],this.containers[i].element[0])){if(this._intersectsWith(this.containers[i].containerCache)){if(u&&t.contains(this.containers[i].element[0],u.element[0]))continue;u=this.containers[i],f=i}else this.containers[i].containerCache.over&&(this.containers[i]._trigger("out",e,this._uiHash(this)),this.containers[i].containerCache.over=0)}if(u){if(1===this.containers.length)this.containers[f].containerCache.over||(this.containers[f]._trigger("over",e,this._uiHash(this)),this.containers[f].containerCache.over=1);else{for(n=1e4,o=null,r=(c=u.floating||this._isFloating(this.currentItem))?"left":"top",h=c?"width":"height",p=c?"pageX":"pageY",s=this.items.length-1;s>=0;s--)t.contains(this.containers[f].element[0],this.items[s].item[0])&&this.items[s].item[0]!==this.currentItem[0]&&(a=this.items[s].item.offset()[r],l=!1,e[p]-a>this.items[s][h]/2&&(l=!0),Math.abs(e[p]-a)<n&&(n=Math.abs(e[p]-a),o=this.items[s],this.direction=l?"up":"down"));if(!o&&!this.options.dropOnEmpty)return;if(this.currentContainer===this.containers[f]){this.currentContainer.containerCache.over||(this.containers[f]._trigger("over",e,this._uiHash()),this.currentContainer.containerCache.over=1);return}o?this._rearrange(e,o,null,!0):this._rearrange(e,null,this.containers[f].element,!0),this._trigger("change",e,this._uiHash()),this.containers[f]._trigger("change",e,this._uiHash(this)),this.currentContainer=this.containers[f],this.options.placeholder.update(this.currentContainer,this.placeholder),this.scrollParent=this.placeholder.scrollParent(),this.scrollParent[0]!==this.document[0]&&"HTML"!==this.scrollParent[0].tagName&&(this.overflowOffset=this.scrollParent.offset()),this.containers[f]._trigger("over",e,this._uiHash(this)),this.containers[f].containerCache.over=1}}},_createHelper:function(e){var i=this.options,s="function"==typeof i.helper?t(i.helper.apply(this.element[0],[e,this.currentItem])):"clone"===i.helper?this.currentItem.clone():this.currentItem;return s.parents("body").length||this.appendTo[0].appendChild(s[0]),s[0]===this.currentItem[0]&&(this._storedCSS={width:this.currentItem[0].style.width,height:this.currentItem[0].style.height,position:this.currentItem.css("position"),top:this.currentItem.css("top"),left:this.currentItem.css("left")}),(!s[0].style.width||i.forceHelperSize)&&s.width(this.currentItem.width()),(!s[0].style.height||i.forceHelperSize)&&s.height(this.currentItem.height()),s},_adjustOffsetFromHelper:function(t){"string"==typeof t&&(t=t.split(" ")),Array.isArray(t)&&(t={left:+t[0],top:+t[1]||0}),"left"in t&&(this.offset.click.left=t.left+this.margins.left),"right"in t&&(this.offset.click.left=this.helperProportions.width-t.right+this.margins.left),"top"in t&&(this.offset.click.top=t.top+this.margins.top),"bottom"in t&&(this.offset.click.top=this.helperProportions.height-t.bottom+this.margins.top)},_getParentOffset:function(){this.offsetParent=this.helper.offsetParent();var e=this.offsetParent.offset();return"absolute"===this.cssPosition&&this.scrollParent[0]!==this.document[0]&&t.contains(this.scrollParent[0],this.offsetParent[0])&&(e.left+=this.scrollParent.scrollLeft(),e.top+=this.scrollParent.scrollTop()),this.offsetParent[0]===this.document[0].body&&(e={top:0,left:0}),{top:e.top+(parseInt(this.offsetParent.css("borderTopWidth"),10)||0),left:e.left+(parseInt(this.offsetParent.css("borderLeftWidth"),10)||0)}},_getRelativeOffset:function(){if("relative"!==this.cssPosition)return{top:0,left:0};var t=this.currentItem.position();return{top:t.top-(parseInt(this.helper.css("top"),10)||0)+this.scrollParent.scrollTop(),left:t.left-(parseInt(this.helper.css("left"),10)||0)+this.scrollParent.scrollLeft()}},_cacheMargins:function(){this.margins={left:parseInt(this.currentItem.css("marginLeft"),10)||0,top:parseInt(this.currentItem.css("marginTop"),10)||0}},_cacheHelperProportions:function(){this.helperProportions={width:this.helper.outerWidth(),height:this.helper.outerHeight()}},_setContainment:function(){var e,i,s,n=this.options;"parent"===n.containment&&(n.containment=this.helper[0].parentNode),("document"===n.containment||"window"===n.containment)&&(this.containment=[0-this.offset.relative.left-this.offset.parent.left,0-this.offset.relative.top-this.offset.parent.top,"document"===n.containment?this.document.width():this.window.width()-this.helperProportions.width-this.margins.left,("document"===n.containment?this.document.height()||document.body.parentNode.scrollHeight:this.window.height()||this.document[0].body.parentNode.scrollHeight)-this.helperProportions.height-this.margins.top]),/^(document|window|parent)$/.test(n.containment)||(e=t(n.containment)[0],i=t(n.containment).offset(),s="hidden"!==t(e).css("overflow"),this.containment=[i.left+(parseInt(t(e).css("borderLeftWidth"),10)||0)+(parseInt(t(e).css("paddingLeft"),10)||0)-this.margins.left,i.top+(parseInt(t(e).css("borderTopWidth"),10)||0)+(parseInt(t(e).css("paddingTop"),10)||0)-this.margins.top,i.left+(s?Math.max(e.scrollWidth,e.offsetWidth):e.offsetWidth)-(parseInt(t(e).css("borderLeftWidth"),10)||0)-(parseInt(t(e).css("paddingRight"),10)||0)-this.helperProportions.width-this.margins.left,i.top+(s?Math.max(e.scrollHeight,e.offsetHeight):e.offsetHeight)-(parseInt(t(e).css("borderTopWidth"),10)||0)-(parseInt(t(e).css("paddingBottom"),10)||0)-this.helperProportions.height-this.margins.top])},_convertPositionTo:function(e,i){i||(i=this.position);var s="absolute"===e?1:-1,n="absolute"!==this.cssPosition||this.scrollParent[0]!==this.document[0]&&t.contains(this.scrollParent[0],this.offsetParent[0])?this.scrollParent:this.offsetParent,o=/(html|body)/i.test(n[0].tagName);return{top:i.top+this.offset.relative.top*s+this.offset.parent.top*s-("fixed"===this.cssPosition?-this.scrollParent.scrollTop():o?0:n.scrollTop())*s,left:i.left+this.offset.relative.left*s+this.offset.parent.left*s-("fixed"===this.cssPosition?-this.scrollParent.scrollLeft():o?0:n.scrollLeft())*s}},_generatePosition:function(e){var i,s,n=this.options,o=e.pageX,r=e.pageY,h="absolute"!==this.cssPosition||this.scrollParent[0]!==this.document[0]&&t.contains(this.scrollParent[0],this.offsetParent[0])?this.scrollParent:this.offsetParent,a=/(html|body)/i.test(h[0].tagName);return"relative"===this.cssPosition&&(this.scrollParent[0]===this.document[0]||this.scrollParent[0]===this.offsetParent[0])&&(this.offset.relative=this._getRelativeOffset()),this.originalPosition&&(this.containment&&(e.pageX-this.offset.click.left<this.containment[0]&&(o=this.containment[0]+this.offset.click.left),e.pageY-this.offset.click.top<this.containment[1]&&(r=this.containment[1]+this.offset.click.top),e.pageX-this.offset.click.left>this.containment[2]&&(o=this.containment[2]+this.offset.click.left),e.pageY-this.offset.click.top>this.containment[3]&&(r=this.containment[3]+this.offset.click.top)),n.grid&&(i=this.originalPageY+Math.round((r-this.originalPageY)/n.grid[1])*n.grid[1],r=this.containment?i-this.offset.click.top>=this.containment[1]&&i-this.offset.click.top<=this.containment[3]?i:i-this.offset.click.top>=this.containment[1]?i-n.grid[1]:i+n.grid[1]:i,s=this.originalPageX+Math.round((o-this.originalPageX)/n.grid[0])*n.grid[0],o=this.containment?s-this.offset.click.left>=this.containment[0]&&s-this.offset.click.left<=this.containment[2]?s:s-this.offset.click.left>=this.containment[0]?s-n.grid[0]:s+n.grid[0]:s)),{top:r-this.offset.click.top-this.offset.relative.top-this.offset.parent.top+("fixed"===this.cssPosition?-this.scrollParent.scrollTop():a?0:h.scrollTop()),left:o-this.offset.click.left-this.offset.relative.left-this.offset.parent.left+("fixed"===this.cssPosition?-this.scrollParent.scrollLeft():a?0:h.scrollLeft())}},_rearrange:function(t,e,i,s){i?i[0].appendChild(this.placeholder[0]):e.item[0].parentNode.insertBefore(this.placeholder[0],"down"===this.direction?e.item[0]:e.item[0].nextSibling),this.counter=this.counter?++this.counter:1;var n=this.counter;this._delay(function(){n===this.counter&&this.refreshPositions(!s)})},_clear:function(t,e){this.reverting=!1;var i,s=[];if(!this._noFinalSort&&this.currentItem.parent().length&&this.placeholder.before(this.currentItem),this._noFinalSort=null,this.helper[0]===this.currentItem[0]){for(i in this._storedCSS)("auto"===this._storedCSS[i]||"static"===this._storedCSS[i])&&(this._storedCSS[i]="");this.currentItem.css(this._storedCSS),this._removeClass(this.currentItem,"ui-sortable-helper")}else this.currentItem.show();function n(t,e,i){return function(s){i._trigger(t,s,e._uiHash(e))}}for(this.fromOutside&&!e&&s.push(function(t){this._trigger("receive",t,this._uiHash(this.fromOutside))}),(this.fromOutside||this.domPosition.prev!==this.currentItem.prev().not(".ui-sortable-helper")[0]||this.domPosition.parent!==this.currentItem.parent()[0])&&!e&&s.push(function(t){this._trigger("update",t,this._uiHash())}),this===this.currentContainer||e||(s.push(function(t){this._trigger("remove",t,this._uiHash())}),s.push((function(t){return function(e){t._trigger("receive",e,this._uiHash(this))}}).call(this,this.currentContainer)),s.push((function(t){return function(e){t._trigger("update",e,this._uiHash(this))}}).call(this,this.currentContainer))),i=this.containers.length-1;i>=0;i--)e||s.push(n("deactivate",this,this.containers[i])),this.containers[i].containerCache.over&&(s.push(n("out",this,this.containers[i])),this.containers[i].containerCache.over=0);if(this._storedStylesheet&&(this._storedStylesheet.remove(),this._storedStylesheet=null),this._storedOpacity&&this.helper.css("opacity",this._storedOpacity),this._storedZIndex&&this.helper.css("zIndex","auto"===this._storedZIndex?"":this._storedZIndex),this.dragging=!1,e||this._trigger("beforeStop",t,this._uiHash()),this.placeholder[0].parentNode.removeChild(this.placeholder[0]),this.cancelHelperRemoval||(this.helper[0]!==this.currentItem[0]&&this.helper.remove(),this.helper=null),!e){for(i=0;i<s.length;i++)s[i].call(this,t);this._trigger("stop",t,this._uiHash())}return this.fromOutside=!1,!this.cancelHelperRemoval},_trigger:function(){!1===t.Widget.prototype._trigger.apply(this,arguments)&&this.cancel()},_uiHash:function(e){var i=e||this;return{helper:i.helper,placeholder:i.placeholder||t([]),position:i.position,originalPosition:i.originalPosition,offset:i.positionAbs,item:i.currentItem,sender:e?e.element:null}}}),t.widget("ui.slider",t.ui.mouse,{version:"1.14.1",widgetEventPrefix:"slide",options:{animate:!1,classes:{"ui-slider":"ui-corner-all","ui-slider-handle":"ui-corner-all","ui-slider-range":"ui-corner-all ui-widget-header"},distance:0,max:100,min:0,orientation:"horizontal",range:!1,step:1,value:0,values:null,change:null,slide:null,start:null,stop:null},numPages:5,_create:function(){this._keySliding=!1,this._mouseSliding=!1,this._animateOff=!0,this._handleIndex=null,this._detectOrientation(),this._mouseInit(),this._calculateNewMax(),this._addClass("ui-slider ui-slider-"+this.orientation,"ui-widget ui-widget-content"),this._refresh(),this._animateOff=!1},_refresh:function(){this._createRange(),this._createHandles(),this._setupEvents(),this._refreshValue()},_createHandles:function(){var e,i,s=this.options,n=this.element.find(".ui-slider-handle"),o=[];for(i=s.values&&s.values.length||1,n.length>i&&(n.slice(i).remove(),n=n.slice(0,i)),e=n.length;e<i;e++)o.push("<span tabindex='0'></span>");this.handles=n.add(t(o.join("")).appendTo(this.element)),this._addClass(this.handles,"ui-slider-handle","ui-state-default"),this.handle=this.handles.eq(0),this.handles.each(function(e){t(this).data("ui-slider-handle-index",e).attr("tabIndex",0)})},_createRange:function(){var e=this.options;e.range?(!0===e.range&&(e.values?e.values.length&&2!==e.values.length?e.values=[e.values[0],e.values[0]]:Array.isArray(e.values)&&(e.values=e.values.slice(0)):e.values=[this._valueMin(),this._valueMin()]),this.range&&this.range.length?(this._removeClass(this.range,"ui-slider-range-min ui-slider-range-max"),this.range.css({left:"",bottom:""})):(this.range=t("<div>").appendTo(this.element),this._addClass(this.range,"ui-slider-range")),("min"===e.range||"max"===e.range)&&this._addClass(this.range,"ui-slider-range-"+e.range)):(this.range&&this.range.remove(),this.range=null)},_setupEvents:function(){this._off(this.handles),this._on(this.handles,this._handleEvents),this._hoverable(this.handles),this._focusable(this.handles)},_destroy:function(){this.handles.remove(),this.range&&this.range.remove(),this._mouseDestroy()},_mouseCapture:function(e){var i,s,n,o,r,h,a,l=this,c=this.options;return!c.disabled&&(this.elementSize={width:this.element.outerWidth(),height:this.element.outerHeight()},this.elementOffset=this.element.offset(),i={x:e.pageX,y:e.pageY},s=this._normValueFromMouse(i),n=this._valueMax()-this._valueMin()+1,this.handles.each(function(e){var i=Math.abs(s-l.values(e));(n>i||n===i&&(e===l._lastChangedValue||l.values(e)===c.min))&&(n=i,o=t(this),r=e)}),!1!==this._start(e,r)&&(this._mouseSliding=!0,this._handleIndex=r,this._addClass(o,null,"ui-state-active"),o.trigger("focus"),h=o.offset(),a=!t(e.target).parents().addBack().is(".ui-slider-handle"),this._clickOffset=a?{left:0,top:0}:{left:e.pageX-h.left-o.width()/2,top:e.pageY-h.top-o.height()/2-(parseInt(o.css("borderTopWidth"),10)||0)-(parseInt(o.css("borderBottomWidth"),10)||0)+(parseInt(o.css("marginTop"),10)||0)},this.handles.hasClass("ui-state-hover")||this._slide(e,r,s),this._animateOff=!0,!0))},_mouseStart:function(){return!0},_mouseDrag:function(t){var e={x:t.pageX,y:t.pageY},i=this._normValueFromMouse(e);return this._slide(t,this._handleIndex,i),!1},_mouseStop:function(t){return this._removeClass(this.handles,null,"ui-state-active"),this._mouseSliding=!1,this._stop(t,this._handleIndex),this._change(t,this._handleIndex),this._handleIndex=null,this._clickOffset=null,this._animateOff=!1,!1},_detectOrientation:function(){this.orientation="vertical"===this.options.orientation?"vertical":"horizontal"},_normValueFromMouse:function(t){var e,i,s,n,o;return"horizontal"===this.orientation?(e=this.elementSize.width,i=t.x-this.elementOffset.left-(this._clickOffset?this._clickOffset.left:0)):(e=this.elementSize.height,i=t.y-this.elementOffset.top-(this._clickOffset?this._clickOffset.top:0)),(s=i/e)>1&&(s=1),s<0&&(s=0),"vertical"===this.orientation&&(s=1-s),n=this._valueMax()-this._valueMin(),o=this._valueMin()+s*n,this._trimAlignValue(o)},_uiHash:function(t,e,i){var s={handle:this.handles[t],handleIndex:t,value:void 0!==e?e:this.value()};return this._hasMultipleValues()&&(s.value=void 0!==e?e:this.values(t),s.values=i||this.values()),s},_hasMultipleValues:function(){return this.options.values&&this.options.values.length},_start:function(t,e){return this._trigger("start",t,this._uiHash(e))},_slide:function(t,e,i){var s,n=this.value(),o=this.values();this._hasMultipleValues()&&(s=this.values(+!e),n=this.values(e),2===this.options.values.length&&!0===this.options.range&&(i=0===e?Math.min(s,i):Math.max(s,i)),o[e]=i),i!==n&&!1!==this._trigger("slide",t,this._uiHash(e,i,o))&&(this._hasMultipleValues()?this.values(e,i):this.value(i))},_stop:function(t,e){this._trigger("stop",t,this._uiHash(e))},_change:function(t,e){this._keySliding||this._mouseSliding||(this._lastChangedValue=e,this._trigger("change",t,this._uiHash(e)))},value:function(t){if(arguments.length){this.options.value=this._trimAlignValue(t),this._refreshValue(),this._change(null,0);return}return this._value()},values:function(t,e){var i,s,n;if(arguments.length>1){this.options.values[t]=this._trimAlignValue(e),this._refreshValue(),this._change(null,t);return}if(!arguments.length)return this._values();if(!Array.isArray(arguments[0]))return this._hasMultipleValues()?this._values(t):this.value();for(n=0,i=this.options.values,s=arguments[0];n<i.length;n+=1)i[n]=this._trimAlignValue(s[n]),this._change(null,n);this._refreshValue()},_setOption:function(t,e){var i,s=0;switch("range"===t&&!0===this.options.range&&("min"===e?(this.options.value=this._values(0),this.options.values=null):"max"===e&&(this.options.value=this._values(this.options.values.length-1),this.options.values=null)),Array.isArray(this.options.values)&&(s=this.options.values.length),this._super(t,e),t){case"orientation":this._detectOrientation(),this._removeClass("ui-slider-horizontal ui-slider-vertical")._addClass("ui-slider-"+this.orientation),this._refreshValue(),this.options.range&&this._refreshRange(e),this.handles.css("horizontal"===e?"bottom":"left","");break;case"value":this._animateOff=!0,this._refreshValue(),this._change(null,0),this._animateOff=!1;break;case"values":for(this._animateOff=!0,this._refreshValue(),i=s-1;i>=0;i--)this._change(null,i);this._animateOff=!1;break;case"step":case"min":case"max":this._animateOff=!0,this._calculateNewMax(),this._refreshValue(),this._animateOff=!1;break;case"range":this._animateOff=!0,this._refresh(),this._animateOff=!1}},_setOptionDisabled:function(t){this._super(t),this._toggleClass(null,"ui-state-disabled",!!t)},_value:function(){var t=this.options.value;return this._trimAlignValue(t)},_values:function(t){var e,i,s;if(arguments.length)return e=this.options.values[t],e=this._trimAlignValue(e);if(!this._hasMultipleValues())return[];for(s=0,i=this.options.values.slice();s<i.length;s+=1)i[s]=this._trimAlignValue(i[s]);return i},_trimAlignValue:function(t){if(t<=this._valueMin())return this._valueMin();if(t>=this._valueMax())return this._valueMax();var e=this.options.step>0?this.options.step:1,i=(t-this._valueMin())%e,s=t-i;return 2*Math.abs(i)>=e&&(s+=i>0?e:-e),parseFloat(s.toFixed(5))},_calculateNewMax:function(){var t=this.options.max,e=this._valueMin(),i=this.options.step;(t=Math.round((t-e)/i)*i+e)>this.options.max&&(t-=i),this.max=parseFloat(t.toFixed(this._precision()))},_precision:function(){var t=this._precisionOf(this.options.step);return null!==this.options.min&&(t=Math.max(t,this._precisionOf(this.options.min))),t},_precisionOf:function(t){var e=t.toString(),i=e.indexOf(".");return -1===i?0:e.length-i-1},_valueMin:function(){return this.options.min},_valueMax:function(){return this.max},_refreshRange:function(t){"vertical"===t&&this.range.css({width:"",left:""}),"horizontal"===t&&this.range.css({height:"",bottom:""})},_refreshValue:function(){var e,i,s,n,o,r=this.options.range,h=this.options,a=this,l=!this._animateOff&&h.animate,c={};this._hasMultipleValues()?this.handles.each(function(s){i=(a.values(s)-a._valueMin())/(a._valueMax()-a._valueMin())*100,c["horizontal"===a.orientation?"left":"bottom"]=i+"%",t(this).stop(1,1)[l?"animate":"css"](c,h.animate),!0===a.options.range&&("horizontal"===a.orientation?(0===s&&a.range.stop(1,1)[l?"animate":"css"]({left:i+"%"},h.animate),1===s&&a.range[l?"animate":"css"]({width:i-e+"%"},{queue:!1,duration:h.animate})):(0===s&&a.range.stop(1,1)[l?"animate":"css"]({bottom:i+"%"},h.animate),1===s&&a.range[l?"animate":"css"]({height:i-e+"%"},{queue:!1,duration:h.animate}))),e=i}):(s=this.value(),n=this._valueMin(),i=(o=this._valueMax())!==n?(s-n)/(o-n)*100:0,c["horizontal"===this.orientation?"left":"bottom"]=i+"%",this.handle.stop(1,1)[l?"animate":"css"](c,h.animate),"min"===r&&"horizontal"===this.orientation&&this.range.stop(1,1)[l?"animate":"css"]({width:i+"%"},h.animate),"max"===r&&"horizontal"===this.orientation&&this.range.stop(1,1)[l?"animate":"css"]({width:100-i+"%"},h.animate),"min"===r&&"vertical"===this.orientation&&this.range.stop(1,1)[l?"animate":"css"]({height:i+"%"},h.animate),"max"===r&&"vertical"===this.orientation&&this.range.stop(1,1)[l?"animate":"css"]({height:100-i+"%"},h.animate))},_handleEvents:{keydown:function(e){var i,s,n,o=t(e.target).data("ui-slider-handle-index");switch(e.keyCode){case t.ui.keyCode.HOME:case t.ui.keyCode.END:case t.ui.keyCode.PAGE_UP:case t.ui.keyCode.PAGE_DOWN:case t.ui.keyCode.UP:case t.ui.keyCode.RIGHT:case t.ui.keyCode.DOWN:case t.ui.keyCode.LEFT:if(e.preventDefault(),!this._keySliding&&(this._keySliding=!0,this._addClass(t(e.target),null,"ui-state-active"),!1===this._start(e,o)))return}switch(n=this.options.step,i=s=this._hasMultipleValues()?this.values(o):this.value(),e.keyCode){case t.ui.keyCode.HOME:s=this._valueMin();break;case t.ui.keyCode.END:s=this._valueMax();break;case t.ui.keyCode.PAGE_UP:s=this._trimAlignValue(i+(this._valueMax()-this._valueMin())/this.numPages);break;case t.ui.keyCode.PAGE_DOWN:s=this._trimAlignValue(i-(this._valueMax()-this._valueMin())/this.numPages);break;case t.ui.keyCode.UP:case t.ui.keyCode.RIGHT:if(i===this._valueMax())return;s=this._trimAlignValue(i+n);break;case t.ui.keyCode.DOWN:case t.ui.keyCode.LEFT:if(i===this._valueMin())return;s=this._trimAlignValue(i-n)}this._slide(e,o,s)},keyup:function(e){var i=t(e.target).data("ui-slider-handle-index");this._keySliding&&(this._keySliding=!1,this._stop(e,i),this._change(e,i),this._removeClass(t(e.target),null,"ui-state-active"))}}})});

/*!
 * jQuery UI Touch Punch 0.2.3
 *
 * Copyright 2011–2014, Dave Furfero
 * Dual licensed under the MIT or GPL Version 2 licenses.
 *
 * Depends:
 *  jquery.ui.widget.js
 *  jquery.ui.mouse.js
 */
!function(a){function f(a,b){if(!(a.originalEvent.touches.length>1)){a.preventDefault();var c=a.originalEvent.changedTouches[0],d=document.createEvent("MouseEvents");d.initMouseEvent(b,!0,!0,window,1,c.screenX,c.screenY,c.clientX,c.clientY,!1,!1,!1,!1,0,null),a.target.dispatchEvent(d)}}if(a.support.touch="ontouchend"in document,a.support.touch){var e,b=a.ui.mouse.prototype,c=b._mouseInit,d=b._mouseDestroy;b._touchStart=function(a){var b=this;!e&&b._mouseCapture(a.originalEvent.changedTouches[0])&&(e=!0,b._touchMoved=!1,f(a,"mouseover"),f(a,"mousemove"),f(a,"mousedown"))},b._touchMove=function(a){e&&(this._touchMoved=!0,f(a,"mousemove"))},b._touchEnd=function(a){e&&(f(a,"mouseup"),f(a,"mouseout"),this._touchMoved||f(a,"click"),e=!1)},b._mouseInit=function(){var b=this;b.element.bind({touchstart:a.proxy(b,"_touchStart"),touchmove:a.proxy(b,"_touchMove"),touchend:a.proxy(b,"_touchEnd")}),c.call(b)},b._mouseDestroy=function(){var b=this;b.element.unbind({touchstart:a.proxy(b,"_touchStart"),touchmove:a.proxy(b,"_touchMove"),touchend:a.proxy(b,"_touchEnd")}),d.call(b)}}}(jQuery);vendor/jquery/js/jquery.min.js000060400000252754152456167170012464 0ustar00/*! jQuery v3.7.1 | (c) OpenJS Foundation and other contributors | jquery.org/license */
!function(e,t){"use strict";"object"==typeof module&&"object"==typeof module.exports?module.exports=e.document?t(e,!0):function(e){if(!e.document)throw new Error("jQuery requires a window with a document");return t(e)}:t(e)}("undefined"!=typeof window?window:this,function(ie,e){"use strict";var oe=[],r=Object.getPrototypeOf,ae=oe.slice,g=oe.flat?function(e){return oe.flat.call(e)}:function(e){return oe.concat.apply([],e)},s=oe.push,se=oe.indexOf,n={},i=n.toString,ue=n.hasOwnProperty,o=ue.toString,a=o.call(Object),le={},v=function(e){return"function"==typeof e&&"number"!=typeof e.nodeType&&"function"!=typeof e.item},y=function(e){return null!=e&&e===e.window},C=ie.document,u={type:!0,src:!0,nonce:!0,noModule:!0};function m(e,t,n){var r,i,o=(n=n||C).createElement("script");if(o.text=e,t)for(r in u)(i=t[r]||t.getAttribute&&t.getAttribute(r))&&o.setAttribute(r,i);n.head.appendChild(o).parentNode.removeChild(o)}function x(e){return null==e?e+"":"object"==typeof e||"function"==typeof e?n[i.call(e)]||"object":typeof e}var t="3.7.1",l=/HTML$/i,ce=function(e,t){return new ce.fn.init(e,t)};function c(e){var t=!!e&&"length"in e&&e.length,n=x(e);return!v(e)&&!y(e)&&("array"===n||0===t||"number"==typeof t&&0<t&&t-1 in e)}function fe(e,t){return e.nodeName&&e.nodeName.toLowerCase()===t.toLowerCase()}ce.fn=ce.prototype={jquery:t,constructor:ce,length:0,toArray:function(){return ae.call(this)},get:function(e){return null==e?ae.call(this):e<0?this[e+this.length]:this[e]},pushStack:function(e){var t=ce.merge(this.constructor(),e);return t.prevObject=this,t},each:function(e){return ce.each(this,e)},map:function(n){return this.pushStack(ce.map(this,function(e,t){return n.call(e,t,e)}))},slice:function(){return this.pushStack(ae.apply(this,arguments))},first:function(){return this.eq(0)},last:function(){return this.eq(-1)},even:function(){return this.pushStack(ce.grep(this,function(e,t){return(t+1)%2}))},odd:function(){return this.pushStack(ce.grep(this,function(e,t){return t%2}))},eq:function(e){var t=this.length,n=+e+(e<0?t:0);return this.pushStack(0<=n&&n<t?[this[n]]:[])},end:function(){return this.prevObject||this.constructor()},push:s,sort:oe.sort,splice:oe.splice},ce.extend=ce.fn.extend=function(){var e,t,n,r,i,o,a=arguments[0]||{},s=1,u=arguments.length,l=!1;for("boolean"==typeof a&&(l=a,a=arguments[s]||{},s++),"object"==typeof a||v(a)||(a={}),s===u&&(a=this,s--);s<u;s++)if(null!=(e=arguments[s]))for(t in e)r=e[t],"__proto__"!==t&&a!==r&&(l&&r&&(ce.isPlainObject(r)||(i=Array.isArray(r)))?(n=a[t],o=i&&!Array.isArray(n)?[]:i||ce.isPlainObject(n)?n:{},i=!1,a[t]=ce.extend(l,o,r)):void 0!==r&&(a[t]=r));return a},ce.extend({expando:"jQuery"+(t+Math.random()).replace(/\D/g,""),isReady:!0,error:function(e){throw new Error(e)},noop:function(){},isPlainObject:function(e){var t,n;return!(!e||"[object Object]"!==i.call(e))&&(!(t=r(e))||"function"==typeof(n=ue.call(t,"constructor")&&t.constructor)&&o.call(n)===a)},isEmptyObject:function(e){var t;for(t in e)return!1;return!0},globalEval:function(e,t,n){m(e,{nonce:t&&t.nonce},n)},each:function(e,t){var n,r=0;if(c(e)){for(n=e.length;r<n;r++)if(!1===t.call(e[r],r,e[r]))break}else for(r in e)if(!1===t.call(e[r],r,e[r]))break;return e},text:function(e){var t,n="",r=0,i=e.nodeType;if(!i)while(t=e[r++])n+=ce.text(t);return 1===i||11===i?e.textContent:9===i?e.documentElement.textContent:3===i||4===i?e.nodeValue:n},makeArray:function(e,t){var n=t||[];return null!=e&&(c(Object(e))?ce.merge(n,"string"==typeof e?[e]:e):s.call(n,e)),n},inArray:function(e,t,n){return null==t?-1:se.call(t,e,n)},isXMLDoc:function(e){var t=e&&e.namespaceURI,n=e&&(e.ownerDocument||e).documentElement;return!l.test(t||n&&n.nodeName||"HTML")},merge:function(e,t){for(var n=+t.length,r=0,i=e.length;r<n;r++)e[i++]=t[r];return e.length=i,e},grep:function(e,t,n){for(var r=[],i=0,o=e.length,a=!n;i<o;i++)!t(e[i],i)!==a&&r.push(e[i]);return r},map:function(e,t,n){var r,i,o=0,a=[];if(c(e))for(r=e.length;o<r;o++)null!=(i=t(e[o],o,n))&&a.push(i);else for(o in e)null!=(i=t(e[o],o,n))&&a.push(i);return g(a)},guid:1,support:le}),"function"==typeof Symbol&&(ce.fn[Symbol.iterator]=oe[Symbol.iterator]),ce.each("Boolean Number String Function Array Date RegExp Object Error Symbol".split(" "),function(e,t){n["[object "+t+"]"]=t.toLowerCase()});var pe=oe.pop,de=oe.sort,he=oe.splice,ge="[\\x20\\t\\r\\n\\f]",ve=new RegExp("^"+ge+"+|((?:^|[^\\\\])(?:\\\\.)*)"+ge+"+$","g");ce.contains=function(e,t){var n=t&&t.parentNode;return e===n||!(!n||1!==n.nodeType||!(e.contains?e.contains(n):e.compareDocumentPosition&&16&e.compareDocumentPosition(n)))};var f=/([\0-\x1f\x7f]|^-?\d)|^-$|[^\x80-\uFFFF\w-]/g;function p(e,t){return t?"\0"===e?"\ufffd":e.slice(0,-1)+"\\"+e.charCodeAt(e.length-1).toString(16)+" ":"\\"+e}ce.escapeSelector=function(e){return(e+"").replace(f,p)};var ye=C,me=s;!function(){var e,b,w,o,a,T,r,C,d,i,k=me,S=ce.expando,E=0,n=0,s=W(),c=W(),u=W(),h=W(),l=function(e,t){return e===t&&(a=!0),0},f="checked|selected|async|autofocus|autoplay|controls|defer|disabled|hidden|ismap|loop|multiple|open|readonly|required|scoped",t="(?:\\\\[\\da-fA-F]{1,6}"+ge+"?|\\\\[^\\r\\n\\f]|[\\w-]|[^\0-\\x7f])+",p="\\["+ge+"*("+t+")(?:"+ge+"*([*^$|!~]?=)"+ge+"*(?:'((?:\\\\.|[^\\\\'])*)'|\"((?:\\\\.|[^\\\\\"])*)\"|("+t+"))|)"+ge+"*\\]",g=":("+t+")(?:\\((('((?:\\\\.|[^\\\\'])*)'|\"((?:\\\\.|[^\\\\\"])*)\")|((?:\\\\.|[^\\\\()[\\]]|"+p+")*)|.*)\\)|)",v=new RegExp(ge+"+","g"),y=new RegExp("^"+ge+"*,"+ge+"*"),m=new RegExp("^"+ge+"*([>+~]|"+ge+")"+ge+"*"),x=new RegExp(ge+"|>"),j=new RegExp(g),A=new RegExp("^"+t+"$"),D={ID:new RegExp("^#("+t+")"),CLASS:new RegExp("^\\.("+t+")"),TAG:new RegExp("^("+t+"|[*])"),ATTR:new RegExp("^"+p),PSEUDO:new RegExp("^"+g),CHILD:new RegExp("^:(only|first|last|nth|nth-last)-(child|of-type)(?:\\("+ge+"*(even|odd|(([+-]|)(\\d*)n|)"+ge+"*(?:([+-]|)"+ge+"*(\\d+)|))"+ge+"*\\)|)","i"),bool:new RegExp("^(?:"+f+")$","i"),needsContext:new RegExp("^"+ge+"*[>+~]|:(even|odd|eq|gt|lt|nth|first|last)(?:\\("+ge+"*((?:-\\d)?\\d*)"+ge+"*\\)|)(?=[^-]|$)","i")},N=/^(?:input|select|textarea|button)$/i,q=/^h\d$/i,L=/^(?:#([\w-]+)|(\w+)|\.([\w-]+))$/,H=/[+~]/,O=new RegExp("\\\\[\\da-fA-F]{1,6}"+ge+"?|\\\\([^\\r\\n\\f])","g"),P=function(e,t){var n="0x"+e.slice(1)-65536;return t||(n<0?String.fromCharCode(n+65536):String.fromCharCode(n>>10|55296,1023&n|56320))},M=function(){V()},R=J(function(e){return!0===e.disabled&&fe(e,"fieldset")},{dir:"parentNode",next:"legend"});try{k.apply(oe=ae.call(ye.childNodes),ye.childNodes),oe[ye.childNodes.length].nodeType}catch(e){k={apply:function(e,t){me.apply(e,ae.call(t))},call:function(e){me.apply(e,ae.call(arguments,1))}}}function I(t,e,n,r){var i,o,a,s,u,l,c,f=e&&e.ownerDocument,p=e?e.nodeType:9;if(n=n||[],"string"!=typeof t||!t||1!==p&&9!==p&&11!==p)return n;if(!r&&(V(e),e=e||T,C)){if(11!==p&&(u=L.exec(t)))if(i=u[1]){if(9===p){if(!(a=e.getElementById(i)))return n;if(a.id===i)return k.call(n,a),n}else if(f&&(a=f.getElementById(i))&&I.contains(e,a)&&a.id===i)return k.call(n,a),n}else{if(u[2])return k.apply(n,e.getElementsByTagName(t)),n;if((i=u[3])&&e.getElementsByClassName)return k.apply(n,e.getElementsByClassName(i)),n}if(!(h[t+" "]||d&&d.test(t))){if(c=t,f=e,1===p&&(x.test(t)||m.test(t))){(f=H.test(t)&&U(e.parentNode)||e)==e&&le.scope||((s=e.getAttribute("id"))?s=ce.escapeSelector(s):e.setAttribute("id",s=S)),o=(l=Y(t)).length;while(o--)l[o]=(s?"#"+s:":scope")+" "+Q(l[o]);c=l.join(",")}try{return k.apply(n,f.querySelectorAll(c)),n}catch(e){h(t,!0)}finally{s===S&&e.removeAttribute("id")}}}return re(t.replace(ve,"$1"),e,n,r)}function W(){var r=[];return function e(t,n){return r.push(t+" ")>b.cacheLength&&delete e[r.shift()],e[t+" "]=n}}function F(e){return e[S]=!0,e}function $(e){var t=T.createElement("fieldset");try{return!!e(t)}catch(e){return!1}finally{t.parentNode&&t.parentNode.removeChild(t),t=null}}function B(t){return function(e){return fe(e,"input")&&e.type===t}}function _(t){return function(e){return(fe(e,"input")||fe(e,"button"))&&e.type===t}}function z(t){return function(e){return"form"in e?e.parentNode&&!1===e.disabled?"label"in e?"label"in e.parentNode?e.parentNode.disabled===t:e.disabled===t:e.isDisabled===t||e.isDisabled!==!t&&R(e)===t:e.disabled===t:"label"in e&&e.disabled===t}}function X(a){return F(function(o){return o=+o,F(function(e,t){var n,r=a([],e.length,o),i=r.length;while(i--)e[n=r[i]]&&(e[n]=!(t[n]=e[n]))})})}function U(e){return e&&"undefined"!=typeof e.getElementsByTagName&&e}function V(e){var t,n=e?e.ownerDocument||e:ye;return n!=T&&9===n.nodeType&&n.documentElement&&(r=(T=n).documentElement,C=!ce.isXMLDoc(T),i=r.matches||r.webkitMatchesSelector||r.msMatchesSelector,r.msMatchesSelector&&ye!=T&&(t=T.defaultView)&&t.top!==t&&t.addEventListener("unload",M),le.getById=$(function(e){return r.appendChild(e).id=ce.expando,!T.getElementsByName||!T.getElementsByName(ce.expando).length}),le.disconnectedMatch=$(function(e){return i.call(e,"*")}),le.scope=$(function(){return T.querySelectorAll(":scope")}),le.cssHas=$(function(){try{return T.querySelector(":has(*,:jqfake)"),!1}catch(e){return!0}}),le.getById?(b.filter.ID=function(e){var t=e.replace(O,P);return function(e){return e.getAttribute("id")===t}},b.find.ID=function(e,t){if("undefined"!=typeof t.getElementById&&C){var n=t.getElementById(e);return n?[n]:[]}}):(b.filter.ID=function(e){var n=e.replace(O,P);return function(e){var t="undefined"!=typeof e.getAttributeNode&&e.getAttributeNode("id");return t&&t.value===n}},b.find.ID=function(e,t){if("undefined"!=typeof t.getElementById&&C){var n,r,i,o=t.getElementById(e);if(o){if((n=o.getAttributeNode("id"))&&n.value===e)return[o];i=t.getElementsByName(e),r=0;while(o=i[r++])if((n=o.getAttributeNode("id"))&&n.value===e)return[o]}return[]}}),b.find.TAG=function(e,t){return"undefined"!=typeof t.getElementsByTagName?t.getElementsByTagName(e):t.querySelectorAll(e)},b.find.CLASS=function(e,t){if("undefined"!=typeof t.getElementsByClassName&&C)return t.getElementsByClassName(e)},d=[],$(function(e){var t;r.appendChild(e).innerHTML="<a id='"+S+"' href='' disabled='disabled'></a><select id='"+S+"-\r\\' disabled='disabled'><option selected=''></option></select>",e.querySelectorAll("[selected]").length||d.push("\\["+ge+"*(?:value|"+f+")"),e.querySelectorAll("[id~="+S+"-]").length||d.push("~="),e.querySelectorAll("a#"+S+"+*").length||d.push(".#.+[+~]"),e.querySelectorAll(":checked").length||d.push(":checked"),(t=T.createElement("input")).setAttribute("type","hidden"),e.appendChild(t).setAttribute("name","D"),r.appendChild(e).disabled=!0,2!==e.querySelectorAll(":disabled").length&&d.push(":enabled",":disabled"),(t=T.createElement("input")).setAttribute("name",""),e.appendChild(t),e.querySelectorAll("[name='']").length||d.push("\\["+ge+"*name"+ge+"*="+ge+"*(?:''|\"\")")}),le.cssHas||d.push(":has"),d=d.length&&new RegExp(d.join("|")),l=function(e,t){if(e===t)return a=!0,0;var n=!e.compareDocumentPosition-!t.compareDocumentPosition;return n||(1&(n=(e.ownerDocument||e)==(t.ownerDocument||t)?e.compareDocumentPosition(t):1)||!le.sortDetached&&t.compareDocumentPosition(e)===n?e===T||e.ownerDocument==ye&&I.contains(ye,e)?-1:t===T||t.ownerDocument==ye&&I.contains(ye,t)?1:o?se.call(o,e)-se.call(o,t):0:4&n?-1:1)}),T}for(e in I.matches=function(e,t){return I(e,null,null,t)},I.matchesSelector=function(e,t){if(V(e),C&&!h[t+" "]&&(!d||!d.test(t)))try{var n=i.call(e,t);if(n||le.disconnectedMatch||e.document&&11!==e.document.nodeType)return n}catch(e){h(t,!0)}return 0<I(t,T,null,[e]).length},I.contains=function(e,t){return(e.ownerDocument||e)!=T&&V(e),ce.contains(e,t)},I.attr=function(e,t){(e.ownerDocument||e)!=T&&V(e);var n=b.attrHandle[t.toLowerCase()],r=n&&ue.call(b.attrHandle,t.toLowerCase())?n(e,t,!C):void 0;return void 0!==r?r:e.getAttribute(t)},I.error=function(e){throw new Error("Syntax error, unrecognized expression: "+e)},ce.uniqueSort=function(e){var t,n=[],r=0,i=0;if(a=!le.sortStable,o=!le.sortStable&&ae.call(e,0),de.call(e,l),a){while(t=e[i++])t===e[i]&&(r=n.push(i));while(r--)he.call(e,n[r],1)}return o=null,e},ce.fn.uniqueSort=function(){return this.pushStack(ce.uniqueSort(ae.apply(this)))},(b=ce.expr={cacheLength:50,createPseudo:F,match:D,attrHandle:{},find:{},relative:{">":{dir:"parentNode",first:!0}," ":{dir:"parentNode"},"+":{dir:"previousSibling",first:!0},"~":{dir:"previousSibling"}},preFilter:{ATTR:function(e){return e[1]=e[1].replace(O,P),e[3]=(e[3]||e[4]||e[5]||"").replace(O,P),"~="===e[2]&&(e[3]=" "+e[3]+" "),e.slice(0,4)},CHILD:function(e){return e[1]=e[1].toLowerCase(),"nth"===e[1].slice(0,3)?(e[3]||I.error(e[0]),e[4]=+(e[4]?e[5]+(e[6]||1):2*("even"===e[3]||"odd"===e[3])),e[5]=+(e[7]+e[8]||"odd"===e[3])):e[3]&&I.error(e[0]),e},PSEUDO:function(e){var t,n=!e[6]&&e[2];return D.CHILD.test(e[0])?null:(e[3]?e[2]=e[4]||e[5]||"":n&&j.test(n)&&(t=Y(n,!0))&&(t=n.indexOf(")",n.length-t)-n.length)&&(e[0]=e[0].slice(0,t),e[2]=n.slice(0,t)),e.slice(0,3))}},filter:{TAG:function(e){var t=e.replace(O,P).toLowerCase();return"*"===e?function(){return!0}:function(e){return fe(e,t)}},CLASS:function(e){var t=s[e+" "];return t||(t=new RegExp("(^|"+ge+")"+e+"("+ge+"|$)"))&&s(e,function(e){return t.test("string"==typeof e.className&&e.className||"undefined"!=typeof e.getAttribute&&e.getAttribute("class")||"")})},ATTR:function(n,r,i){return function(e){var t=I.attr(e,n);return null==t?"!="===r:!r||(t+="","="===r?t===i:"!="===r?t!==i:"^="===r?i&&0===t.indexOf(i):"*="===r?i&&-1<t.indexOf(i):"$="===r?i&&t.slice(-i.length)===i:"~="===r?-1<(" "+t.replace(v," ")+" ").indexOf(i):"|="===r&&(t===i||t.slice(0,i.length+1)===i+"-"))}},CHILD:function(d,e,t,h,g){var v="nth"!==d.slice(0,3),y="last"!==d.slice(-4),m="of-type"===e;return 1===h&&0===g?function(e){return!!e.parentNode}:function(e,t,n){var r,i,o,a,s,u=v!==y?"nextSibling":"previousSibling",l=e.parentNode,c=m&&e.nodeName.toLowerCase(),f=!n&&!m,p=!1;if(l){if(v){while(u){o=e;while(o=o[u])if(m?fe(o,c):1===o.nodeType)return!1;s=u="only"===d&&!s&&"nextSibling"}return!0}if(s=[y?l.firstChild:l.lastChild],y&&f){p=(a=(r=(i=l[S]||(l[S]={}))[d]||[])[0]===E&&r[1])&&r[2],o=a&&l.childNodes[a];while(o=++a&&o&&o[u]||(p=a=0)||s.pop())if(1===o.nodeType&&++p&&o===e){i[d]=[E,a,p];break}}else if(f&&(p=a=(r=(i=e[S]||(e[S]={}))[d]||[])[0]===E&&r[1]),!1===p)while(o=++a&&o&&o[u]||(p=a=0)||s.pop())if((m?fe(o,c):1===o.nodeType)&&++p&&(f&&((i=o[S]||(o[S]={}))[d]=[E,p]),o===e))break;return(p-=g)===h||p%h==0&&0<=p/h}}},PSEUDO:function(e,o){var t,a=b.pseudos[e]||b.setFilters[e.toLowerCase()]||I.error("unsupported pseudo: "+e);return a[S]?a(o):1<a.length?(t=[e,e,"",o],b.setFilters.hasOwnProperty(e.toLowerCase())?F(function(e,t){var n,r=a(e,o),i=r.length;while(i--)e[n=se.call(e,r[i])]=!(t[n]=r[i])}):function(e){return a(e,0,t)}):a}},pseudos:{not:F(function(e){var r=[],i=[],s=ne(e.replace(ve,"$1"));return s[S]?F(function(e,t,n,r){var i,o=s(e,null,r,[]),a=e.length;while(a--)(i=o[a])&&(e[a]=!(t[a]=i))}):function(e,t,n){return r[0]=e,s(r,null,n,i),r[0]=null,!i.pop()}}),has:F(function(t){return function(e){return 0<I(t,e).length}}),contains:F(function(t){return t=t.replace(O,P),function(e){return-1<(e.textContent||ce.text(e)).indexOf(t)}}),lang:F(function(n){return A.test(n||"")||I.error("unsupported lang: "+n),n=n.replace(O,P).toLowerCase(),function(e){var t;do{if(t=C?e.lang:e.getAttribute("xml:lang")||e.getAttribute("lang"))return(t=t.toLowerCase())===n||0===t.indexOf(n+"-")}while((e=e.parentNode)&&1===e.nodeType);return!1}}),target:function(e){var t=ie.location&&ie.location.hash;return t&&t.slice(1)===e.id},root:function(e){return e===r},focus:function(e){return e===function(){try{return T.activeElement}catch(e){}}()&&T.hasFocus()&&!!(e.type||e.href||~e.tabIndex)},enabled:z(!1),disabled:z(!0),checked:function(e){return fe(e,"input")&&!!e.checked||fe(e,"option")&&!!e.selected},selected:function(e){return e.parentNode&&e.parentNode.selectedIndex,!0===e.selected},empty:function(e){for(e=e.firstChild;e;e=e.nextSibling)if(e.nodeType<6)return!1;return!0},parent:function(e){return!b.pseudos.empty(e)},header:function(e){return q.test(e.nodeName)},input:function(e){return N.test(e.nodeName)},button:function(e){return fe(e,"input")&&"button"===e.type||fe(e,"button")},text:function(e){var t;return fe(e,"input")&&"text"===e.type&&(null==(t=e.getAttribute("type"))||"text"===t.toLowerCase())},first:X(function(){return[0]}),last:X(function(e,t){return[t-1]}),eq:X(function(e,t,n){return[n<0?n+t:n]}),even:X(function(e,t){for(var n=0;n<t;n+=2)e.push(n);return e}),odd:X(function(e,t){for(var n=1;n<t;n+=2)e.push(n);return e}),lt:X(function(e,t,n){var r;for(r=n<0?n+t:t<n?t:n;0<=--r;)e.push(r);return e}),gt:X(function(e,t,n){for(var r=n<0?n+t:n;++r<t;)e.push(r);return e})}}).pseudos.nth=b.pseudos.eq,{radio:!0,checkbox:!0,file:!0,password:!0,image:!0})b.pseudos[e]=B(e);for(e in{submit:!0,reset:!0})b.pseudos[e]=_(e);function G(){}function Y(e,t){var n,r,i,o,a,s,u,l=c[e+" "];if(l)return t?0:l.slice(0);a=e,s=[],u=b.preFilter;while(a){for(o in n&&!(r=y.exec(a))||(r&&(a=a.slice(r[0].length)||a),s.push(i=[])),n=!1,(r=m.exec(a))&&(n=r.shift(),i.push({value:n,type:r[0].replace(ve," ")}),a=a.slice(n.length)),b.filter)!(r=D[o].exec(a))||u[o]&&!(r=u[o](r))||(n=r.shift(),i.push({value:n,type:o,matches:r}),a=a.slice(n.length));if(!n)break}return t?a.length:a?I.error(e):c(e,s).slice(0)}function Q(e){for(var t=0,n=e.length,r="";t<n;t++)r+=e[t].value;return r}function J(a,e,t){var s=e.dir,u=e.next,l=u||s,c=t&&"parentNode"===l,f=n++;return e.first?function(e,t,n){while(e=e[s])if(1===e.nodeType||c)return a(e,t,n);return!1}:function(e,t,n){var r,i,o=[E,f];if(n){while(e=e[s])if((1===e.nodeType||c)&&a(e,t,n))return!0}else while(e=e[s])if(1===e.nodeType||c)if(i=e[S]||(e[S]={}),u&&fe(e,u))e=e[s]||e;else{if((r=i[l])&&r[0]===E&&r[1]===f)return o[2]=r[2];if((i[l]=o)[2]=a(e,t,n))return!0}return!1}}function K(i){return 1<i.length?function(e,t,n){var r=i.length;while(r--)if(!i[r](e,t,n))return!1;return!0}:i[0]}function Z(e,t,n,r,i){for(var o,a=[],s=0,u=e.length,l=null!=t;s<u;s++)(o=e[s])&&(n&&!n(o,r,i)||(a.push(o),l&&t.push(s)));return a}function ee(d,h,g,v,y,e){return v&&!v[S]&&(v=ee(v)),y&&!y[S]&&(y=ee(y,e)),F(function(e,t,n,r){var i,o,a,s,u=[],l=[],c=t.length,f=e||function(e,t,n){for(var r=0,i=t.length;r<i;r++)I(e,t[r],n);return n}(h||"*",n.nodeType?[n]:n,[]),p=!d||!e&&h?f:Z(f,u,d,n,r);if(g?g(p,s=y||(e?d:c||v)?[]:t,n,r):s=p,v){i=Z(s,l),v(i,[],n,r),o=i.length;while(o--)(a=i[o])&&(s[l[o]]=!(p[l[o]]=a))}if(e){if(y||d){if(y){i=[],o=s.length;while(o--)(a=s[o])&&i.push(p[o]=a);y(null,s=[],i,r)}o=s.length;while(o--)(a=s[o])&&-1<(i=y?se.call(e,a):u[o])&&(e[i]=!(t[i]=a))}}else s=Z(s===t?s.splice(c,s.length):s),y?y(null,t,s,r):k.apply(t,s)})}function te(e){for(var i,t,n,r=e.length,o=b.relative[e[0].type],a=o||b.relative[" "],s=o?1:0,u=J(function(e){return e===i},a,!0),l=J(function(e){return-1<se.call(i,e)},a,!0),c=[function(e,t,n){var r=!o&&(n||t!=w)||((i=t).nodeType?u(e,t,n):l(e,t,n));return i=null,r}];s<r;s++)if(t=b.relative[e[s].type])c=[J(K(c),t)];else{if((t=b.filter[e[s].type].apply(null,e[s].matches))[S]){for(n=++s;n<r;n++)if(b.relative[e[n].type])break;return ee(1<s&&K(c),1<s&&Q(e.slice(0,s-1).concat({value:" "===e[s-2].type?"*":""})).replace(ve,"$1"),t,s<n&&te(e.slice(s,n)),n<r&&te(e=e.slice(n)),n<r&&Q(e))}c.push(t)}return K(c)}function ne(e,t){var n,v,y,m,x,r,i=[],o=[],a=u[e+" "];if(!a){t||(t=Y(e)),n=t.length;while(n--)(a=te(t[n]))[S]?i.push(a):o.push(a);(a=u(e,(v=o,m=0<(y=i).length,x=0<v.length,r=function(e,t,n,r,i){var o,a,s,u=0,l="0",c=e&&[],f=[],p=w,d=e||x&&b.find.TAG("*",i),h=E+=null==p?1:Math.random()||.1,g=d.length;for(i&&(w=t==T||t||i);l!==g&&null!=(o=d[l]);l++){if(x&&o){a=0,t||o.ownerDocument==T||(V(o),n=!C);while(s=v[a++])if(s(o,t||T,n)){k.call(r,o);break}i&&(E=h)}m&&((o=!s&&o)&&u--,e&&c.push(o))}if(u+=l,m&&l!==u){a=0;while(s=y[a++])s(c,f,t,n);if(e){if(0<u)while(l--)c[l]||f[l]||(f[l]=pe.call(r));f=Z(f)}k.apply(r,f),i&&!e&&0<f.length&&1<u+y.length&&ce.uniqueSort(r)}return i&&(E=h,w=p),c},m?F(r):r))).selector=e}return a}function re(e,t,n,r){var i,o,a,s,u,l="function"==typeof e&&e,c=!r&&Y(e=l.selector||e);if(n=n||[],1===c.length){if(2<(o=c[0]=c[0].slice(0)).length&&"ID"===(a=o[0]).type&&9===t.nodeType&&C&&b.relative[o[1].type]){if(!(t=(b.find.ID(a.matches[0].replace(O,P),t)||[])[0]))return n;l&&(t=t.parentNode),e=e.slice(o.shift().value.length)}i=D.needsContext.test(e)?0:o.length;while(i--){if(a=o[i],b.relative[s=a.type])break;if((u=b.find[s])&&(r=u(a.matches[0].replace(O,P),H.test(o[0].type)&&U(t.parentNode)||t))){if(o.splice(i,1),!(e=r.length&&Q(o)))return k.apply(n,r),n;break}}}return(l||ne(e,c))(r,t,!C,n,!t||H.test(e)&&U(t.parentNode)||t),n}G.prototype=b.filters=b.pseudos,b.setFilters=new G,le.sortStable=S.split("").sort(l).join("")===S,V(),le.sortDetached=$(function(e){return 1&e.compareDocumentPosition(T.createElement("fieldset"))}),ce.find=I,ce.expr[":"]=ce.expr.pseudos,ce.unique=ce.uniqueSort,I.compile=ne,I.select=re,I.setDocument=V,I.tokenize=Y,I.escape=ce.escapeSelector,I.getText=ce.text,I.isXML=ce.isXMLDoc,I.selectors=ce.expr,I.support=ce.support,I.uniqueSort=ce.uniqueSort}();var d=function(e,t,n){var r=[],i=void 0!==n;while((e=e[t])&&9!==e.nodeType)if(1===e.nodeType){if(i&&ce(e).is(n))break;r.push(e)}return r},h=function(e,t){for(var n=[];e;e=e.nextSibling)1===e.nodeType&&e!==t&&n.push(e);return n},b=ce.expr.match.needsContext,w=/^<([a-z][^\/\0>:\x20\t\r\n\f]*)[\x20\t\r\n\f]*\/?>(?:<\/\1>|)$/i;function T(e,n,r){return v(n)?ce.grep(e,function(e,t){return!!n.call(e,t,e)!==r}):n.nodeType?ce.grep(e,function(e){return e===n!==r}):"string"!=typeof n?ce.grep(e,function(e){return-1<se.call(n,e)!==r}):ce.filter(n,e,r)}ce.filter=function(e,t,n){var r=t[0];return n&&(e=":not("+e+")"),1===t.length&&1===r.nodeType?ce.find.matchesSelector(r,e)?[r]:[]:ce.find.matches(e,ce.grep(t,function(e){return 1===e.nodeType}))},ce.fn.extend({find:function(e){var t,n,r=this.length,i=this;if("string"!=typeof e)return this.pushStack(ce(e).filter(function(){for(t=0;t<r;t++)if(ce.contains(i[t],this))return!0}));for(n=this.pushStack([]),t=0;t<r;t++)ce.find(e,i[t],n);return 1<r?ce.uniqueSort(n):n},filter:function(e){return this.pushStack(T(this,e||[],!1))},not:function(e){return this.pushStack(T(this,e||[],!0))},is:function(e){return!!T(this,"string"==typeof e&&b.test(e)?ce(e):e||[],!1).length}});var k,S=/^(?:\s*(<[\w\W]+>)[^>]*|#([\w-]+))$/;(ce.fn.init=function(e,t,n){var r,i;if(!e)return this;if(n=n||k,"string"==typeof e){if(!(r="<"===e[0]&&">"===e[e.length-1]&&3<=e.length?[null,e,null]:S.exec(e))||!r[1]&&t)return!t||t.jquery?(t||n).find(e):this.constructor(t).find(e);if(r[1]){if(t=t instanceof ce?t[0]:t,ce.merge(this,ce.parseHTML(r[1],t&&t.nodeType?t.ownerDocument||t:C,!0)),w.test(r[1])&&ce.isPlainObject(t))for(r in t)v(this[r])?this[r](t[r]):this.attr(r,t[r]);return this}return(i=C.getElementById(r[2]))&&(this[0]=i,this.length=1),this}return e.nodeType?(this[0]=e,this.length=1,this):v(e)?void 0!==n.ready?n.ready(e):e(ce):ce.makeArray(e,this)}).prototype=ce.fn,k=ce(C);var E=/^(?:parents|prev(?:Until|All))/,j={children:!0,contents:!0,next:!0,prev:!0};function A(e,t){while((e=e[t])&&1!==e.nodeType);return e}ce.fn.extend({has:function(e){var t=ce(e,this),n=t.length;return this.filter(function(){for(var e=0;e<n;e++)if(ce.contains(this,t[e]))return!0})},closest:function(e,t){var n,r=0,i=this.length,o=[],a="string"!=typeof e&&ce(e);if(!b.test(e))for(;r<i;r++)for(n=this[r];n&&n!==t;n=n.parentNode)if(n.nodeType<11&&(a?-1<a.index(n):1===n.nodeType&&ce.find.matchesSelector(n,e))){o.push(n);break}return this.pushStack(1<o.length?ce.uniqueSort(o):o)},index:function(e){return e?"string"==typeof e?se.call(ce(e),this[0]):se.call(this,e.jquery?e[0]:e):this[0]&&this[0].parentNode?this.first().prevAll().length:-1},add:function(e,t){return this.pushStack(ce.uniqueSort(ce.merge(this.get(),ce(e,t))))},addBack:function(e){return this.add(null==e?this.prevObject:this.prevObject.filter(e))}}),ce.each({parent:function(e){var t=e.parentNode;return t&&11!==t.nodeType?t:null},parents:function(e){return d(e,"parentNode")},parentsUntil:function(e,t,n){return d(e,"parentNode",n)},next:function(e){return A(e,"nextSibling")},prev:function(e){return A(e,"previousSibling")},nextAll:function(e){return d(e,"nextSibling")},prevAll:function(e){return d(e,"previousSibling")},nextUntil:function(e,t,n){return d(e,"nextSibling",n)},prevUntil:function(e,t,n){return d(e,"previousSibling",n)},siblings:function(e){return h((e.parentNode||{}).firstChild,e)},children:function(e){return h(e.firstChild)},contents:function(e){return null!=e.contentDocument&&r(e.contentDocument)?e.contentDocument:(fe(e,"template")&&(e=e.content||e),ce.merge([],e.childNodes))}},function(r,i){ce.fn[r]=function(e,t){var n=ce.map(this,i,e);return"Until"!==r.slice(-5)&&(t=e),t&&"string"==typeof t&&(n=ce.filter(t,n)),1<this.length&&(j[r]||ce.uniqueSort(n),E.test(r)&&n.reverse()),this.pushStack(n)}});var D=/[^\x20\t\r\n\f]+/g;function N(e){return e}function q(e){throw e}function L(e,t,n,r){var i;try{e&&v(i=e.promise)?i.call(e).done(t).fail(n):e&&v(i=e.then)?i.call(e,t,n):t.apply(void 0,[e].slice(r))}catch(e){n.apply(void 0,[e])}}ce.Callbacks=function(r){var e,n;r="string"==typeof r?(e=r,n={},ce.each(e.match(D)||[],function(e,t){n[t]=!0}),n):ce.extend({},r);var i,t,o,a,s=[],u=[],l=-1,c=function(){for(a=a||r.once,o=i=!0;u.length;l=-1){t=u.shift();while(++l<s.length)!1===s[l].apply(t[0],t[1])&&r.stopOnFalse&&(l=s.length,t=!1)}r.memory||(t=!1),i=!1,a&&(s=t?[]:"")},f={add:function(){return s&&(t&&!i&&(l=s.length-1,u.push(t)),function n(e){ce.each(e,function(e,t){v(t)?r.unique&&f.has(t)||s.push(t):t&&t.length&&"string"!==x(t)&&n(t)})}(arguments),t&&!i&&c()),this},remove:function(){return ce.each(arguments,function(e,t){var n;while(-1<(n=ce.inArray(t,s,n)))s.splice(n,1),n<=l&&l--}),this},has:function(e){return e?-1<ce.inArray(e,s):0<s.length},empty:function(){return s&&(s=[]),this},disable:function(){return a=u=[],s=t="",this},disabled:function(){return!s},lock:function(){return a=u=[],t||i||(s=t=""),this},locked:function(){return!!a},fireWith:function(e,t){return a||(t=[e,(t=t||[]).slice?t.slice():t],u.push(t),i||c()),this},fire:function(){return f.fireWith(this,arguments),this},fired:function(){return!!o}};return f},ce.extend({Deferred:function(e){var o=[["notify","progress",ce.Callbacks("memory"),ce.Callbacks("memory"),2],["resolve","done",ce.Callbacks("once memory"),ce.Callbacks("once memory"),0,"resolved"],["reject","fail",ce.Callbacks("once memory"),ce.Callbacks("once memory"),1,"rejected"]],i="pending",a={state:function(){return i},always:function(){return s.done(arguments).fail(arguments),this},"catch":function(e){return a.then(null,e)},pipe:function(){var i=arguments;return ce.Deferred(function(r){ce.each(o,function(e,t){var n=v(i[t[4]])&&i[t[4]];s[t[1]](function(){var e=n&&n.apply(this,arguments);e&&v(e.promise)?e.promise().progress(r.notify).done(r.resolve).fail(r.reject):r[t[0]+"With"](this,n?[e]:arguments)})}),i=null}).promise()},then:function(t,n,r){var u=0;function l(i,o,a,s){return function(){var n=this,r=arguments,e=function(){var e,t;if(!(i<u)){if((e=a.apply(n,r))===o.promise())throw new TypeError("Thenable self-resolution");t=e&&("object"==typeof e||"function"==typeof e)&&e.then,v(t)?s?t.call(e,l(u,o,N,s),l(u,o,q,s)):(u++,t.call(e,l(u,o,N,s),l(u,o,q,s),l(u,o,N,o.notifyWith))):(a!==N&&(n=void 0,r=[e]),(s||o.resolveWith)(n,r))}},t=s?e:function(){try{e()}catch(e){ce.Deferred.exceptionHook&&ce.Deferred.exceptionHook(e,t.error),u<=i+1&&(a!==q&&(n=void 0,r=[e]),o.rejectWith(n,r))}};i?t():(ce.Deferred.getErrorHook?t.error=ce.Deferred.getErrorHook():ce.Deferred.getStackHook&&(t.error=ce.Deferred.getStackHook()),ie.setTimeout(t))}}return ce.Deferred(function(e){o[0][3].add(l(0,e,v(r)?r:N,e.notifyWith)),o[1][3].add(l(0,e,v(t)?t:N)),o[2][3].add(l(0,e,v(n)?n:q))}).promise()},promise:function(e){return null!=e?ce.extend(e,a):a}},s={};return ce.each(o,function(e,t){var n=t[2],r=t[5];a[t[1]]=n.add,r&&n.add(function(){i=r},o[3-e][2].disable,o[3-e][3].disable,o[0][2].lock,o[0][3].lock),n.add(t[3].fire),s[t[0]]=function(){return s[t[0]+"With"](this===s?void 0:this,arguments),this},s[t[0]+"With"]=n.fireWith}),a.promise(s),e&&e.call(s,s),s},when:function(e){var n=arguments.length,t=n,r=Array(t),i=ae.call(arguments),o=ce.Deferred(),a=function(t){return function(e){r[t]=this,i[t]=1<arguments.length?ae.call(arguments):e,--n||o.resolveWith(r,i)}};if(n<=1&&(L(e,o.done(a(t)).resolve,o.reject,!n),"pending"===o.state()||v(i[t]&&i[t].then)))return o.then();while(t--)L(i[t],a(t),o.reject);return o.promise()}});var H=/^(Eval|Internal|Range|Reference|Syntax|Type|URI)Error$/;ce.Deferred.exceptionHook=function(e,t){ie.console&&ie.console.warn&&e&&H.test(e.name)&&ie.console.warn("jQuery.Deferred exception: "+e.message,e.stack,t)},ce.readyException=function(e){ie.setTimeout(function(){throw e})};var O=ce.Deferred();function P(){C.removeEventListener("DOMContentLoaded",P),ie.removeEventListener("load",P),ce.ready()}ce.fn.ready=function(e){return O.then(e)["catch"](function(e){ce.readyException(e)}),this},ce.extend({isReady:!1,readyWait:1,ready:function(e){(!0===e?--ce.readyWait:ce.isReady)||(ce.isReady=!0)!==e&&0<--ce.readyWait||O.resolveWith(C,[ce])}}),ce.ready.then=O.then,"complete"===C.readyState||"loading"!==C.readyState&&!C.documentElement.doScroll?ie.setTimeout(ce.ready):(C.addEventListener("DOMContentLoaded",P),ie.addEventListener("load",P));var M=function(e,t,n,r,i,o,a){var s=0,u=e.length,l=null==n;if("object"===x(n))for(s in i=!0,n)M(e,t,s,n[s],!0,o,a);else if(void 0!==r&&(i=!0,v(r)||(a=!0),l&&(a?(t.call(e,r),t=null):(l=t,t=function(e,t,n){return l.call(ce(e),n)})),t))for(;s<u;s++)t(e[s],n,a?r:r.call(e[s],s,t(e[s],n)));return i?e:l?t.call(e):u?t(e[0],n):o},R=/^-ms-/,I=/-([a-z])/g;function W(e,t){return t.toUpperCase()}function F(e){return e.replace(R,"ms-").replace(I,W)}var $=function(e){return 1===e.nodeType||9===e.nodeType||!+e.nodeType};function B(){this.expando=ce.expando+B.uid++}B.uid=1,B.prototype={cache:function(e){var t=e[this.expando];return t||(t={},$(e)&&(e.nodeType?e[this.expando]=t:Object.defineProperty(e,this.expando,{value:t,configurable:!0}))),t},set:function(e,t,n){var r,i=this.cache(e);if("string"==typeof t)i[F(t)]=n;else for(r in t)i[F(r)]=t[r];return i},get:function(e,t){return void 0===t?this.cache(e):e[this.expando]&&e[this.expando][F(t)]},access:function(e,t,n){return void 0===t||t&&"string"==typeof t&&void 0===n?this.get(e,t):(this.set(e,t,n),void 0!==n?n:t)},remove:function(e,t){var n,r=e[this.expando];if(void 0!==r){if(void 0!==t){n=(t=Array.isArray(t)?t.map(F):(t=F(t))in r?[t]:t.match(D)||[]).length;while(n--)delete r[t[n]]}(void 0===t||ce.isEmptyObject(r))&&(e.nodeType?e[this.expando]=void 0:delete e[this.expando])}},hasData:function(e){var t=e[this.expando];return void 0!==t&&!ce.isEmptyObject(t)}};var _=new B,z=new B,X=/^(?:\{[\w\W]*\}|\[[\w\W]*\])$/,U=/[A-Z]/g;function V(e,t,n){var r,i;if(void 0===n&&1===e.nodeType)if(r="data-"+t.replace(U,"-$&").toLowerCase(),"string"==typeof(n=e.getAttribute(r))){try{n="true"===(i=n)||"false"!==i&&("null"===i?null:i===+i+""?+i:X.test(i)?JSON.parse(i):i)}catch(e){}z.set(e,t,n)}else n=void 0;return n}ce.extend({hasData:function(e){return z.hasData(e)||_.hasData(e)},data:function(e,t,n){return z.access(e,t,n)},removeData:function(e,t){z.remove(e,t)},_data:function(e,t,n){return _.access(e,t,n)},_removeData:function(e,t){_.remove(e,t)}}),ce.fn.extend({data:function(n,e){var t,r,i,o=this[0],a=o&&o.attributes;if(void 0===n){if(this.length&&(i=z.get(o),1===o.nodeType&&!_.get(o,"hasDataAttrs"))){t=a.length;while(t--)a[t]&&0===(r=a[t].name).indexOf("data-")&&(r=F(r.slice(5)),V(o,r,i[r]));_.set(o,"hasDataAttrs",!0)}return i}return"object"==typeof n?this.each(function(){z.set(this,n)}):M(this,function(e){var t;if(o&&void 0===e)return void 0!==(t=z.get(o,n))?t:void 0!==(t=V(o,n))?t:void 0;this.each(function(){z.set(this,n,e)})},null,e,1<arguments.length,null,!0)},removeData:function(e){return this.each(function(){z.remove(this,e)})}}),ce.extend({queue:function(e,t,n){var r;if(e)return t=(t||"fx")+"queue",r=_.get(e,t),n&&(!r||Array.isArray(n)?r=_.access(e,t,ce.makeArray(n)):r.push(n)),r||[]},dequeue:function(e,t){t=t||"fx";var n=ce.queue(e,t),r=n.length,i=n.shift(),o=ce._queueHooks(e,t);"inprogress"===i&&(i=n.shift(),r--),i&&("fx"===t&&n.unshift("inprogress"),delete o.stop,i.call(e,function(){ce.dequeue(e,t)},o)),!r&&o&&o.empty.fire()},_queueHooks:function(e,t){var n=t+"queueHooks";return _.get(e,n)||_.access(e,n,{empty:ce.Callbacks("once memory").add(function(){_.remove(e,[t+"queue",n])})})}}),ce.fn.extend({queue:function(t,n){var e=2;return"string"!=typeof t&&(n=t,t="fx",e--),arguments.length<e?ce.queue(this[0],t):void 0===n?this:this.each(function(){var e=ce.queue(this,t,n);ce._queueHooks(this,t),"fx"===t&&"inprogress"!==e[0]&&ce.dequeue(this,t)})},dequeue:function(e){return this.each(function(){ce.dequeue(this,e)})},clearQueue:function(e){return this.queue(e||"fx",[])},promise:function(e,t){var n,r=1,i=ce.Deferred(),o=this,a=this.length,s=function(){--r||i.resolveWith(o,[o])};"string"!=typeof e&&(t=e,e=void 0),e=e||"fx";while(a--)(n=_.get(o[a],e+"queueHooks"))&&n.empty&&(r++,n.empty.add(s));return s(),i.promise(t)}});var G=/[+-]?(?:\d*\.|)\d+(?:[eE][+-]?\d+|)/.source,Y=new RegExp("^(?:([+-])=|)("+G+")([a-z%]*)$","i"),Q=["Top","Right","Bottom","Left"],J=C.documentElement,K=function(e){return ce.contains(e.ownerDocument,e)},Z={composed:!0};J.getRootNode&&(K=function(e){return ce.contains(e.ownerDocument,e)||e.getRootNode(Z)===e.ownerDocument});var ee=function(e,t){return"none"===(e=t||e).style.display||""===e.style.display&&K(e)&&"none"===ce.css(e,"display")};function te(e,t,n,r){var i,o,a=20,s=r?function(){return r.cur()}:function(){return ce.css(e,t,"")},u=s(),l=n&&n[3]||(ce.cssNumber[t]?"":"px"),c=e.nodeType&&(ce.cssNumber[t]||"px"!==l&&+u)&&Y.exec(ce.css(e,t));if(c&&c[3]!==l){u/=2,l=l||c[3],c=+u||1;while(a--)ce.style(e,t,c+l),(1-o)*(1-(o=s()/u||.5))<=0&&(a=0),c/=o;c*=2,ce.style(e,t,c+l),n=n||[]}return n&&(c=+c||+u||0,i=n[1]?c+(n[1]+1)*n[2]:+n[2],r&&(r.unit=l,r.start=c,r.end=i)),i}var ne={};function re(e,t){for(var n,r,i,o,a,s,u,l=[],c=0,f=e.length;c<f;c++)(r=e[c]).style&&(n=r.style.display,t?("none"===n&&(l[c]=_.get(r,"display")||null,l[c]||(r.style.display="")),""===r.style.display&&ee(r)&&(l[c]=(u=a=o=void 0,a=(i=r).ownerDocument,s=i.nodeName,(u=ne[s])||(o=a.body.appendChild(a.createElement(s)),u=ce.css(o,"display"),o.parentNode.removeChild(o),"none"===u&&(u="block"),ne[s]=u)))):"none"!==n&&(l[c]="none",_.set(r,"display",n)));for(c=0;c<f;c++)null!=l[c]&&(e[c].style.display=l[c]);return e}ce.fn.extend({show:function(){return re(this,!0)},hide:function(){return re(this)},toggle:function(e){return"boolean"==typeof e?e?this.show():this.hide():this.each(function(){ee(this)?ce(this).show():ce(this).hide()})}});var xe,be,we=/^(?:checkbox|radio)$/i,Te=/<([a-z][^\/\0>\x20\t\r\n\f]*)/i,Ce=/^$|^module$|\/(?:java|ecma)script/i;xe=C.createDocumentFragment().appendChild(C.createElement("div")),(be=C.createElement("input")).setAttribute("type","radio"),be.setAttribute("checked","checked"),be.setAttribute("name","t"),xe.appendChild(be),le.checkClone=xe.cloneNode(!0).cloneNode(!0).lastChild.checked,xe.innerHTML="<textarea>x</textarea>",le.noCloneChecked=!!xe.cloneNode(!0).lastChild.defaultValue,xe.innerHTML="<option></option>",le.option=!!xe.lastChild;var ke={thead:[1,"<table>","</table>"],col:[2,"<table><colgroup>","</colgroup></table>"],tr:[2,"<table><tbody>","</tbody></table>"],td:[3,"<table><tbody><tr>","</tr></tbody></table>"],_default:[0,"",""]};function Se(e,t){var n;return n="undefined"!=typeof e.getElementsByTagName?e.getElementsByTagName(t||"*"):"undefined"!=typeof e.querySelectorAll?e.querySelectorAll(t||"*"):[],void 0===t||t&&fe(e,t)?ce.merge([e],n):n}function Ee(e,t){for(var n=0,r=e.length;n<r;n++)_.set(e[n],"globalEval",!t||_.get(t[n],"globalEval"))}ke.tbody=ke.tfoot=ke.colgroup=ke.caption=ke.thead,ke.th=ke.td,le.option||(ke.optgroup=ke.option=[1,"<select multiple='multiple'>","</select>"]);var je=/<|&#?\w+;/;function Ae(e,t,n,r,i){for(var o,a,s,u,l,c,f=t.createDocumentFragment(),p=[],d=0,h=e.length;d<h;d++)if((o=e[d])||0===o)if("object"===x(o))ce.merge(p,o.nodeType?[o]:o);else if(je.test(o)){a=a||f.appendChild(t.createElement("div")),s=(Te.exec(o)||["",""])[1].toLowerCase(),u=ke[s]||ke._default,a.innerHTML=u[1]+ce.htmlPrefilter(o)+u[2],c=u[0];while(c--)a=a.lastChild;ce.merge(p,a.childNodes),(a=f.firstChild).textContent=""}else p.push(t.createTextNode(o));f.textContent="",d=0;while(o=p[d++])if(r&&-1<ce.inArray(o,r))i&&i.push(o);else if(l=K(o),a=Se(f.appendChild(o),"script"),l&&Ee(a),n){c=0;while(o=a[c++])Ce.test(o.type||"")&&n.push(o)}return f}var De=/^([^.]*)(?:\.(.+)|)/;function Ne(){return!0}function qe(){return!1}function Le(e,t,n,r,i,o){var a,s;if("object"==typeof t){for(s in"string"!=typeof n&&(r=r||n,n=void 0),t)Le(e,s,n,r,t[s],o);return e}if(null==r&&null==i?(i=n,r=n=void 0):null==i&&("string"==typeof n?(i=r,r=void 0):(i=r,r=n,n=void 0)),!1===i)i=qe;else if(!i)return e;return 1===o&&(a=i,(i=function(e){return ce().off(e),a.apply(this,arguments)}).guid=a.guid||(a.guid=ce.guid++)),e.each(function(){ce.event.add(this,t,i,r,n)})}function He(e,r,t){t?(_.set(e,r,!1),ce.event.add(e,r,{namespace:!1,handler:function(e){var t,n=_.get(this,r);if(1&e.isTrigger&&this[r]){if(n)(ce.event.special[r]||{}).delegateType&&e.stopPropagation();else if(n=ae.call(arguments),_.set(this,r,n),this[r](),t=_.get(this,r),_.set(this,r,!1),n!==t)return e.stopImmediatePropagation(),e.preventDefault(),t}else n&&(_.set(this,r,ce.event.trigger(n[0],n.slice(1),this)),e.stopPropagation(),e.isImmediatePropagationStopped=Ne)}})):void 0===_.get(e,r)&&ce.event.add(e,r,Ne)}ce.event={global:{},add:function(t,e,n,r,i){var o,a,s,u,l,c,f,p,d,h,g,v=_.get(t);if($(t)){n.handler&&(n=(o=n).handler,i=o.selector),i&&ce.find.matchesSelector(J,i),n.guid||(n.guid=ce.guid++),(u=v.events)||(u=v.events=Object.create(null)),(a=v.handle)||(a=v.handle=function(e){return"undefined"!=typeof ce&&ce.event.triggered!==e.type?ce.event.dispatch.apply(t,arguments):void 0}),l=(e=(e||"").match(D)||[""]).length;while(l--)d=g=(s=De.exec(e[l])||[])[1],h=(s[2]||"").split(".").sort(),d&&(f=ce.event.special[d]||{},d=(i?f.delegateType:f.bindType)||d,f=ce.event.special[d]||{},c=ce.extend({type:d,origType:g,data:r,handler:n,guid:n.guid,selector:i,needsContext:i&&ce.expr.match.needsContext.test(i),namespace:h.join(".")},o),(p=u[d])||((p=u[d]=[]).delegateCount=0,f.setup&&!1!==f.setup.call(t,r,h,a)||t.addEventListener&&t.addEventListener(d,a)),f.add&&(f.add.call(t,c),c.handler.guid||(c.handler.guid=n.guid)),i?p.splice(p.delegateCount++,0,c):p.push(c),ce.event.global[d]=!0)}},remove:function(e,t,n,r,i){var o,a,s,u,l,c,f,p,d,h,g,v=_.hasData(e)&&_.get(e);if(v&&(u=v.events)){l=(t=(t||"").match(D)||[""]).length;while(l--)if(d=g=(s=De.exec(t[l])||[])[1],h=(s[2]||"").split(".").sort(),d){f=ce.event.special[d]||{},p=u[d=(r?f.delegateType:f.bindType)||d]||[],s=s[2]&&new RegExp("(^|\\.)"+h.join("\\.(?:.*\\.|)")+"(\\.|$)"),a=o=p.length;while(o--)c=p[o],!i&&g!==c.origType||n&&n.guid!==c.guid||s&&!s.test(c.namespace)||r&&r!==c.selector&&("**"!==r||!c.selector)||(p.splice(o,1),c.selector&&p.delegateCount--,f.remove&&f.remove.call(e,c));a&&!p.length&&(f.teardown&&!1!==f.teardown.call(e,h,v.handle)||ce.removeEvent(e,d,v.handle),delete u[d])}else for(d in u)ce.event.remove(e,d+t[l],n,r,!0);ce.isEmptyObject(u)&&_.remove(e,"handle events")}},dispatch:function(e){var t,n,r,i,o,a,s=new Array(arguments.length),u=ce.event.fix(e),l=(_.get(this,"events")||Object.create(null))[u.type]||[],c=ce.event.special[u.type]||{};for(s[0]=u,t=1;t<arguments.length;t++)s[t]=arguments[t];if(u.delegateTarget=this,!c.preDispatch||!1!==c.preDispatch.call(this,u)){a=ce.event.handlers.call(this,u,l),t=0;while((i=a[t++])&&!u.isPropagationStopped()){u.currentTarget=i.elem,n=0;while((o=i.handlers[n++])&&!u.isImmediatePropagationStopped())u.rnamespace&&!1!==o.namespace&&!u.rnamespace.test(o.namespace)||(u.handleObj=o,u.data=o.data,void 0!==(r=((ce.event.special[o.origType]||{}).handle||o.handler).apply(i.elem,s))&&!1===(u.result=r)&&(u.preventDefault(),u.stopPropagation()))}return c.postDispatch&&c.postDispatch.call(this,u),u.result}},handlers:function(e,t){var n,r,i,o,a,s=[],u=t.delegateCount,l=e.target;if(u&&l.nodeType&&!("click"===e.type&&1<=e.button))for(;l!==this;l=l.parentNode||this)if(1===l.nodeType&&("click"!==e.type||!0!==l.disabled)){for(o=[],a={},n=0;n<u;n++)void 0===a[i=(r=t[n]).selector+" "]&&(a[i]=r.needsContext?-1<ce(i,this).index(l):ce.find(i,this,null,[l]).length),a[i]&&o.push(r);o.length&&s.push({elem:l,handlers:o})}return l=this,u<t.length&&s.push({elem:l,handlers:t.slice(u)}),s},addProp:function(t,e){Object.defineProperty(ce.Event.prototype,t,{enumerable:!0,configurable:!0,get:v(e)?function(){if(this.originalEvent)return e(this.originalEvent)}:function(){if(this.originalEvent)return this.originalEvent[t]},set:function(e){Object.defineProperty(this,t,{enumerable:!0,configurable:!0,writable:!0,value:e})}})},fix:function(e){return e[ce.expando]?e:new ce.Event(e)},special:{load:{noBubble:!0},click:{setup:function(e){var t=this||e;return we.test(t.type)&&t.click&&fe(t,"input")&&He(t,"click",!0),!1},trigger:function(e){var t=this||e;return we.test(t.type)&&t.click&&fe(t,"input")&&He(t,"click"),!0},_default:function(e){var t=e.target;return we.test(t.type)&&t.click&&fe(t,"input")&&_.get(t,"click")||fe(t,"a")}},beforeunload:{postDispatch:function(e){void 0!==e.result&&e.originalEvent&&(e.originalEvent.returnValue=e.result)}}}},ce.removeEvent=function(e,t,n){e.removeEventListener&&e.removeEventListener(t,n)},ce.Event=function(e,t){if(!(this instanceof ce.Event))return new ce.Event(e,t);e&&e.type?(this.originalEvent=e,this.type=e.type,this.isDefaultPrevented=e.defaultPrevented||void 0===e.defaultPrevented&&!1===e.returnValue?Ne:qe,this.target=e.target&&3===e.target.nodeType?e.target.parentNode:e.target,this.currentTarget=e.currentTarget,this.relatedTarget=e.relatedTarget):this.type=e,t&&ce.extend(this,t),this.timeStamp=e&&e.timeStamp||Date.now(),this[ce.expando]=!0},ce.Event.prototype={constructor:ce.Event,isDefaultPrevented:qe,isPropagationStopped:qe,isImmediatePropagationStopped:qe,isSimulated:!1,preventDefault:function(){var e=this.originalEvent;this.isDefaultPrevented=Ne,e&&!this.isSimulated&&e.preventDefault()},stopPropagation:function(){var e=this.originalEvent;this.isPropagationStopped=Ne,e&&!this.isSimulated&&e.stopPropagation()},stopImmediatePropagation:function(){var e=this.originalEvent;this.isImmediatePropagationStopped=Ne,e&&!this.isSimulated&&e.stopImmediatePropagation(),this.stopPropagation()}},ce.each({altKey:!0,bubbles:!0,cancelable:!0,changedTouches:!0,ctrlKey:!0,detail:!0,eventPhase:!0,metaKey:!0,pageX:!0,pageY:!0,shiftKey:!0,view:!0,"char":!0,code:!0,charCode:!0,key:!0,keyCode:!0,button:!0,buttons:!0,clientX:!0,clientY:!0,offsetX:!0,offsetY:!0,pointerId:!0,pointerType:!0,screenX:!0,screenY:!0,targetTouches:!0,toElement:!0,touches:!0,which:!0},ce.event.addProp),ce.each({focus:"focusin",blur:"focusout"},function(r,i){function o(e){if(C.documentMode){var t=_.get(this,"handle"),n=ce.event.fix(e);n.type="focusin"===e.type?"focus":"blur",n.isSimulated=!0,t(e),n.target===n.currentTarget&&t(n)}else ce.event.simulate(i,e.target,ce.event.fix(e))}ce.event.special[r]={setup:function(){var e;if(He(this,r,!0),!C.documentMode)return!1;(e=_.get(this,i))||this.addEventListener(i,o),_.set(this,i,(e||0)+1)},trigger:function(){return He(this,r),!0},teardown:function(){var e;if(!C.documentMode)return!1;(e=_.get(this,i)-1)?_.set(this,i,e):(this.removeEventListener(i,o),_.remove(this,i))},_default:function(e){return _.get(e.target,r)},delegateType:i},ce.event.special[i]={setup:function(){var e=this.ownerDocument||this.document||this,t=C.documentMode?this:e,n=_.get(t,i);n||(C.documentMode?this.addEventListener(i,o):e.addEventListener(r,o,!0)),_.set(t,i,(n||0)+1)},teardown:function(){var e=this.ownerDocument||this.document||this,t=C.documentMode?this:e,n=_.get(t,i)-1;n?_.set(t,i,n):(C.documentMode?this.removeEventListener(i,o):e.removeEventListener(r,o,!0),_.remove(t,i))}}}),ce.each({mouseenter:"mouseover",mouseleave:"mouseout",pointerenter:"pointerover",pointerleave:"pointerout"},function(e,i){ce.event.special[e]={delegateType:i,bindType:i,handle:function(e){var t,n=e.relatedTarget,r=e.handleObj;return n&&(n===this||ce.contains(this,n))||(e.type=r.origType,t=r.handler.apply(this,arguments),e.type=i),t}}}),ce.fn.extend({on:function(e,t,n,r){return Le(this,e,t,n,r)},one:function(e,t,n,r){return Le(this,e,t,n,r,1)},off:function(e,t,n){var r,i;if(e&&e.preventDefault&&e.handleObj)return r=e.handleObj,ce(e.delegateTarget).off(r.namespace?r.origType+"."+r.namespace:r.origType,r.selector,r.handler),this;if("object"==typeof e){for(i in e)this.off(i,t,e[i]);return this}return!1!==t&&"function"!=typeof t||(n=t,t=void 0),!1===n&&(n=qe),this.each(function(){ce.event.remove(this,e,n,t)})}});var Oe=/<script|<style|<link/i,Pe=/checked\s*(?:[^=]|=\s*.checked.)/i,Me=/^\s*<!\[CDATA\[|\]\]>\s*$/g;function Re(e,t){return fe(e,"table")&&fe(11!==t.nodeType?t:t.firstChild,"tr")&&ce(e).children("tbody")[0]||e}function Ie(e){return e.type=(null!==e.getAttribute("type"))+"/"+e.type,e}function We(e){return"true/"===(e.type||"").slice(0,5)?e.type=e.type.slice(5):e.removeAttribute("type"),e}function Fe(e,t){var n,r,i,o,a,s;if(1===t.nodeType){if(_.hasData(e)&&(s=_.get(e).events))for(i in _.remove(t,"handle events"),s)for(n=0,r=s[i].length;n<r;n++)ce.event.add(t,i,s[i][n]);z.hasData(e)&&(o=z.access(e),a=ce.extend({},o),z.set(t,a))}}function $e(n,r,i,o){r=g(r);var e,t,a,s,u,l,c=0,f=n.length,p=f-1,d=r[0],h=v(d);if(h||1<f&&"string"==typeof d&&!le.checkClone&&Pe.test(d))return n.each(function(e){var t=n.eq(e);h&&(r[0]=d.call(this,e,t.html())),$e(t,r,i,o)});if(f&&(t=(e=Ae(r,n[0].ownerDocument,!1,n,o)).firstChild,1===e.childNodes.length&&(e=t),t||o)){for(s=(a=ce.map(Se(e,"script"),Ie)).length;c<f;c++)u=e,c!==p&&(u=ce.clone(u,!0,!0),s&&ce.merge(a,Se(u,"script"))),i.call(n[c],u,c);if(s)for(l=a[a.length-1].ownerDocument,ce.map(a,We),c=0;c<s;c++)u=a[c],Ce.test(u.type||"")&&!_.access(u,"globalEval")&&ce.contains(l,u)&&(u.src&&"module"!==(u.type||"").toLowerCase()?ce._evalUrl&&!u.noModule&&ce._evalUrl(u.src,{nonce:u.nonce||u.getAttribute("nonce")},l):m(u.textContent.replace(Me,""),u,l))}return n}function Be(e,t,n){for(var r,i=t?ce.filter(t,e):e,o=0;null!=(r=i[o]);o++)n||1!==r.nodeType||ce.cleanData(Se(r)),r.parentNode&&(n&&K(r)&&Ee(Se(r,"script")),r.parentNode.removeChild(r));return e}ce.extend({htmlPrefilter:function(e){return e},clone:function(e,t,n){var r,i,o,a,s,u,l,c=e.cloneNode(!0),f=K(e);if(!(le.noCloneChecked||1!==e.nodeType&&11!==e.nodeType||ce.isXMLDoc(e)))for(a=Se(c),r=0,i=(o=Se(e)).length;r<i;r++)s=o[r],u=a[r],void 0,"input"===(l=u.nodeName.toLowerCase())&&we.test(s.type)?u.checked=s.checked:"input"!==l&&"textarea"!==l||(u.defaultValue=s.defaultValue);if(t)if(n)for(o=o||Se(e),a=a||Se(c),r=0,i=o.length;r<i;r++)Fe(o[r],a[r]);else Fe(e,c);return 0<(a=Se(c,"script")).length&&Ee(a,!f&&Se(e,"script")),c},cleanData:function(e){for(var t,n,r,i=ce.event.special,o=0;void 0!==(n=e[o]);o++)if($(n)){if(t=n[_.expando]){if(t.events)for(r in t.events)i[r]?ce.event.remove(n,r):ce.removeEvent(n,r,t.handle);n[_.expando]=void 0}n[z.expando]&&(n[z.expando]=void 0)}}}),ce.fn.extend({detach:function(e){return Be(this,e,!0)},remove:function(e){return Be(this,e)},text:function(e){return M(this,function(e){return void 0===e?ce.text(this):this.empty().each(function(){1!==this.nodeType&&11!==this.nodeType&&9!==this.nodeType||(this.textContent=e)})},null,e,arguments.length)},append:function(){return $e(this,arguments,function(e){1!==this.nodeType&&11!==this.nodeType&&9!==this.nodeType||Re(this,e).appendChild(e)})},prepend:function(){return $e(this,arguments,function(e){if(1===this.nodeType||11===this.nodeType||9===this.nodeType){var t=Re(this,e);t.insertBefore(e,t.firstChild)}})},before:function(){return $e(this,arguments,function(e){this.parentNode&&this.parentNode.insertBefore(e,this)})},after:function(){return $e(this,arguments,function(e){this.parentNode&&this.parentNode.insertBefore(e,this.nextSibling)})},empty:function(){for(var e,t=0;null!=(e=this[t]);t++)1===e.nodeType&&(ce.cleanData(Se(e,!1)),e.textContent="");return this},clone:function(e,t){return e=null!=e&&e,t=null==t?e:t,this.map(function(){return ce.clone(this,e,t)})},html:function(e){return M(this,function(e){var t=this[0]||{},n=0,r=this.length;if(void 0===e&&1===t.nodeType)return t.innerHTML;if("string"==typeof e&&!Oe.test(e)&&!ke[(Te.exec(e)||["",""])[1].toLowerCase()]){e=ce.htmlPrefilter(e);try{for(;n<r;n++)1===(t=this[n]||{}).nodeType&&(ce.cleanData(Se(t,!1)),t.innerHTML=e);t=0}catch(e){}}t&&this.empty().append(e)},null,e,arguments.length)},replaceWith:function(){var n=[];return $e(this,arguments,function(e){var t=this.parentNode;ce.inArray(this,n)<0&&(ce.cleanData(Se(this)),t&&t.replaceChild(e,this))},n)}}),ce.each({appendTo:"append",prependTo:"prepend",insertBefore:"before",insertAfter:"after",replaceAll:"replaceWith"},function(e,a){ce.fn[e]=function(e){for(var t,n=[],r=ce(e),i=r.length-1,o=0;o<=i;o++)t=o===i?this:this.clone(!0),ce(r[o])[a](t),s.apply(n,t.get());return this.pushStack(n)}});var _e=new RegExp("^("+G+")(?!px)[a-z%]+$","i"),ze=/^--/,Xe=function(e){var t=e.ownerDocument.defaultView;return t&&t.opener||(t=ie),t.getComputedStyle(e)},Ue=function(e,t,n){var r,i,o={};for(i in t)o[i]=e.style[i],e.style[i]=t[i];for(i in r=n.call(e),t)e.style[i]=o[i];return r},Ve=new RegExp(Q.join("|"),"i");function Ge(e,t,n){var r,i,o,a,s=ze.test(t),u=e.style;return(n=n||Xe(e))&&(a=n.getPropertyValue(t)||n[t],s&&a&&(a=a.replace(ve,"$1")||void 0),""!==a||K(e)||(a=ce.style(e,t)),!le.pixelBoxStyles()&&_e.test(a)&&Ve.test(t)&&(r=u.width,i=u.minWidth,o=u.maxWidth,u.minWidth=u.maxWidth=u.width=a,a=n.width,u.width=r,u.minWidth=i,u.maxWidth=o)),void 0!==a?a+"":a}function Ye(e,t){return{get:function(){if(!e())return(this.get=t).apply(this,arguments);delete this.get}}}!function(){function e(){if(l){u.style.cssText="position:absolute;left:-11111px;width:60px;margin-top:1px;padding:0;border:0",l.style.cssText="position:relative;display:block;box-sizing:border-box;overflow:scroll;margin:auto;border:1px;padding:1px;width:60%;top:1%",J.appendChild(u).appendChild(l);var e=ie.getComputedStyle(l);n="1%"!==e.top,s=12===t(e.marginLeft),l.style.right="60%",o=36===t(e.right),r=36===t(e.width),l.style.position="absolute",i=12===t(l.offsetWidth/3),J.removeChild(u),l=null}}function t(e){return Math.round(parseFloat(e))}var n,r,i,o,a,s,u=C.createElement("div"),l=C.createElement("div");l.style&&(l.style.backgroundClip="content-box",l.cloneNode(!0).style.backgroundClip="",le.clearCloneStyle="content-box"===l.style.backgroundClip,ce.extend(le,{boxSizingReliable:function(){return e(),r},pixelBoxStyles:function(){return e(),o},pixelPosition:function(){return e(),n},reliableMarginLeft:function(){return e(),s},scrollboxSize:function(){return e(),i},reliableTrDimensions:function(){var e,t,n,r;return null==a&&(e=C.createElement("table"),t=C.createElement("tr"),n=C.createElement("div"),e.style.cssText="position:absolute;left:-11111px;border-collapse:separate",t.style.cssText="box-sizing:content-box;border:1px solid",t.style.height="1px",n.style.height="9px",n.style.display="block",J.appendChild(e).appendChild(t).appendChild(n),r=ie.getComputedStyle(t),a=parseInt(r.height,10)+parseInt(r.borderTopWidth,10)+parseInt(r.borderBottomWidth,10)===t.offsetHeight,J.removeChild(e)),a}}))}();var Qe=["Webkit","Moz","ms"],Je=C.createElement("div").style,Ke={};function Ze(e){var t=ce.cssProps[e]||Ke[e];return t||(e in Je?e:Ke[e]=function(e){var t=e[0].toUpperCase()+e.slice(1),n=Qe.length;while(n--)if((e=Qe[n]+t)in Je)return e}(e)||e)}var et=/^(none|table(?!-c[ea]).+)/,tt={position:"absolute",visibility:"hidden",display:"block"},nt={letterSpacing:"0",fontWeight:"400"};function rt(e,t,n){var r=Y.exec(t);return r?Math.max(0,r[2]-(n||0))+(r[3]||"px"):t}function it(e,t,n,r,i,o){var a="width"===t?1:0,s=0,u=0,l=0;if(n===(r?"border":"content"))return 0;for(;a<4;a+=2)"margin"===n&&(l+=ce.css(e,n+Q[a],!0,i)),r?("content"===n&&(u-=ce.css(e,"padding"+Q[a],!0,i)),"margin"!==n&&(u-=ce.css(e,"border"+Q[a]+"Width",!0,i))):(u+=ce.css(e,"padding"+Q[a],!0,i),"padding"!==n?u+=ce.css(e,"border"+Q[a]+"Width",!0,i):s+=ce.css(e,"border"+Q[a]+"Width",!0,i));return!r&&0<=o&&(u+=Math.max(0,Math.ceil(e["offset"+t[0].toUpperCase()+t.slice(1)]-o-u-s-.5))||0),u+l}function ot(e,t,n){var r=Xe(e),i=(!le.boxSizingReliable()||n)&&"border-box"===ce.css(e,"boxSizing",!1,r),o=i,a=Ge(e,t,r),s="offset"+t[0].toUpperCase()+t.slice(1);if(_e.test(a)){if(!n)return a;a="auto"}return(!le.boxSizingReliable()&&i||!le.reliableTrDimensions()&&fe(e,"tr")||"auto"===a||!parseFloat(a)&&"inline"===ce.css(e,"display",!1,r))&&e.getClientRects().length&&(i="border-box"===ce.css(e,"boxSizing",!1,r),(o=s in e)&&(a=e[s])),(a=parseFloat(a)||0)+it(e,t,n||(i?"border":"content"),o,r,a)+"px"}function at(e,t,n,r,i){return new at.prototype.init(e,t,n,r,i)}ce.extend({cssHooks:{opacity:{get:function(e,t){if(t){var n=Ge(e,"opacity");return""===n?"1":n}}}},cssNumber:{animationIterationCount:!0,aspectRatio:!0,borderImageSlice:!0,columnCount:!0,flexGrow:!0,flexShrink:!0,fontWeight:!0,gridArea:!0,gridColumn:!0,gridColumnEnd:!0,gridColumnStart:!0,gridRow:!0,gridRowEnd:!0,gridRowStart:!0,lineHeight:!0,opacity:!0,order:!0,orphans:!0,scale:!0,widows:!0,zIndex:!0,zoom:!0,fillOpacity:!0,floodOpacity:!0,stopOpacity:!0,strokeMiterlimit:!0,strokeOpacity:!0},cssProps:{},style:function(e,t,n,r){if(e&&3!==e.nodeType&&8!==e.nodeType&&e.style){var i,o,a,s=F(t),u=ze.test(t),l=e.style;if(u||(t=Ze(s)),a=ce.cssHooks[t]||ce.cssHooks[s],void 0===n)return a&&"get"in a&&void 0!==(i=a.get(e,!1,r))?i:l[t];"string"===(o=typeof n)&&(i=Y.exec(n))&&i[1]&&(n=te(e,t,i),o="number"),null!=n&&n==n&&("number"!==o||u||(n+=i&&i[3]||(ce.cssNumber[s]?"":"px")),le.clearCloneStyle||""!==n||0!==t.indexOf("background")||(l[t]="inherit"),a&&"set"in a&&void 0===(n=a.set(e,n,r))||(u?l.setProperty(t,n):l[t]=n))}},css:function(e,t,n,r){var i,o,a,s=F(t);return ze.test(t)||(t=Ze(s)),(a=ce.cssHooks[t]||ce.cssHooks[s])&&"get"in a&&(i=a.get(e,!0,n)),void 0===i&&(i=Ge(e,t,r)),"normal"===i&&t in nt&&(i=nt[t]),""===n||n?(o=parseFloat(i),!0===n||isFinite(o)?o||0:i):i}}),ce.each(["height","width"],function(e,u){ce.cssHooks[u]={get:function(e,t,n){if(t)return!et.test(ce.css(e,"display"))||e.getClientRects().length&&e.getBoundingClientRect().width?ot(e,u,n):Ue(e,tt,function(){return ot(e,u,n)})},set:function(e,t,n){var r,i=Xe(e),o=!le.scrollboxSize()&&"absolute"===i.position,a=(o||n)&&"border-box"===ce.css(e,"boxSizing",!1,i),s=n?it(e,u,n,a,i):0;return a&&o&&(s-=Math.ceil(e["offset"+u[0].toUpperCase()+u.slice(1)]-parseFloat(i[u])-it(e,u,"border",!1,i)-.5)),s&&(r=Y.exec(t))&&"px"!==(r[3]||"px")&&(e.style[u]=t,t=ce.css(e,u)),rt(0,t,s)}}}),ce.cssHooks.marginLeft=Ye(le.reliableMarginLeft,function(e,t){if(t)return(parseFloat(Ge(e,"marginLeft"))||e.getBoundingClientRect().left-Ue(e,{marginLeft:0},function(){return e.getBoundingClientRect().left}))+"px"}),ce.each({margin:"",padding:"",border:"Width"},function(i,o){ce.cssHooks[i+o]={expand:function(e){for(var t=0,n={},r="string"==typeof e?e.split(" "):[e];t<4;t++)n[i+Q[t]+o]=r[t]||r[t-2]||r[0];return n}},"margin"!==i&&(ce.cssHooks[i+o].set=rt)}),ce.fn.extend({css:function(e,t){return M(this,function(e,t,n){var r,i,o={},a=0;if(Array.isArray(t)){for(r=Xe(e),i=t.length;a<i;a++)o[t[a]]=ce.css(e,t[a],!1,r);return o}return void 0!==n?ce.style(e,t,n):ce.css(e,t)},e,t,1<arguments.length)}}),((ce.Tween=at).prototype={constructor:at,init:function(e,t,n,r,i,o){this.elem=e,this.prop=n,this.easing=i||ce.easing._default,this.options=t,this.start=this.now=this.cur(),this.end=r,this.unit=o||(ce.cssNumber[n]?"":"px")},cur:function(){var e=at.propHooks[this.prop];return e&&e.get?e.get(this):at.propHooks._default.get(this)},run:function(e){var t,n=at.propHooks[this.prop];return this.options.duration?this.pos=t=ce.easing[this.easing](e,this.options.duration*e,0,1,this.options.duration):this.pos=t=e,this.now=(this.end-this.start)*t+this.start,this.options.step&&this.options.step.call(this.elem,this.now,this),n&&n.set?n.set(this):at.propHooks._default.set(this),this}}).init.prototype=at.prototype,(at.propHooks={_default:{get:function(e){var t;return 1!==e.elem.nodeType||null!=e.elem[e.prop]&&null==e.elem.style[e.prop]?e.elem[e.prop]:(t=ce.css(e.elem,e.prop,""))&&"auto"!==t?t:0},set:function(e){ce.fx.step[e.prop]?ce.fx.step[e.prop](e):1!==e.elem.nodeType||!ce.cssHooks[e.prop]&&null==e.elem.style[Ze(e.prop)]?e.elem[e.prop]=e.now:ce.style(e.elem,e.prop,e.now+e.unit)}}}).scrollTop=at.propHooks.scrollLeft={set:function(e){e.elem.nodeType&&e.elem.parentNode&&(e.elem[e.prop]=e.now)}},ce.easing={linear:function(e){return e},swing:function(e){return.5-Math.cos(e*Math.PI)/2},_default:"swing"},ce.fx=at.prototype.init,ce.fx.step={};var st,ut,lt,ct,ft=/^(?:toggle|show|hide)$/,pt=/queueHooks$/;function dt(){ut&&(!1===C.hidden&&ie.requestAnimationFrame?ie.requestAnimationFrame(dt):ie.setTimeout(dt,ce.fx.interval),ce.fx.tick())}function ht(){return ie.setTimeout(function(){st=void 0}),st=Date.now()}function gt(e,t){var n,r=0,i={height:e};for(t=t?1:0;r<4;r+=2-t)i["margin"+(n=Q[r])]=i["padding"+n]=e;return t&&(i.opacity=i.width=e),i}function vt(e,t,n){for(var r,i=(yt.tweeners[t]||[]).concat(yt.tweeners["*"]),o=0,a=i.length;o<a;o++)if(r=i[o].call(n,t,e))return r}function yt(o,e,t){var n,a,r=0,i=yt.prefilters.length,s=ce.Deferred().always(function(){delete u.elem}),u=function(){if(a)return!1;for(var e=st||ht(),t=Math.max(0,l.startTime+l.duration-e),n=1-(t/l.duration||0),r=0,i=l.tweens.length;r<i;r++)l.tweens[r].run(n);return s.notifyWith(o,[l,n,t]),n<1&&i?t:(i||s.notifyWith(o,[l,1,0]),s.resolveWith(o,[l]),!1)},l=s.promise({elem:o,props:ce.extend({},e),opts:ce.extend(!0,{specialEasing:{},easing:ce.easing._default},t),originalProperties:e,originalOptions:t,startTime:st||ht(),duration:t.duration,tweens:[],createTween:function(e,t){var n=ce.Tween(o,l.opts,e,t,l.opts.specialEasing[e]||l.opts.easing);return l.tweens.push(n),n},stop:function(e){var t=0,n=e?l.tweens.length:0;if(a)return this;for(a=!0;t<n;t++)l.tweens[t].run(1);return e?(s.notifyWith(o,[l,1,0]),s.resolveWith(o,[l,e])):s.rejectWith(o,[l,e]),this}}),c=l.props;for(!function(e,t){var n,r,i,o,a;for(n in e)if(i=t[r=F(n)],o=e[n],Array.isArray(o)&&(i=o[1],o=e[n]=o[0]),n!==r&&(e[r]=o,delete e[n]),(a=ce.cssHooks[r])&&"expand"in a)for(n in o=a.expand(o),delete e[r],o)n in e||(e[n]=o[n],t[n]=i);else t[r]=i}(c,l.opts.specialEasing);r<i;r++)if(n=yt.prefilters[r].call(l,o,c,l.opts))return v(n.stop)&&(ce._queueHooks(l.elem,l.opts.queue).stop=n.stop.bind(n)),n;return ce.map(c,vt,l),v(l.opts.start)&&l.opts.start.call(o,l),l.progress(l.opts.progress).done(l.opts.done,l.opts.complete).fail(l.opts.fail).always(l.opts.always),ce.fx.timer(ce.extend(u,{elem:o,anim:l,queue:l.opts.queue})),l}ce.Animation=ce.extend(yt,{tweeners:{"*":[function(e,t){var n=this.createTween(e,t);return te(n.elem,e,Y.exec(t),n),n}]},tweener:function(e,t){v(e)?(t=e,e=["*"]):e=e.match(D);for(var n,r=0,i=e.length;r<i;r++)n=e[r],yt.tweeners[n]=yt.tweeners[n]||[],yt.tweeners[n].unshift(t)},prefilters:[function(e,t,n){var r,i,o,a,s,u,l,c,f="width"in t||"height"in t,p=this,d={},h=e.style,g=e.nodeType&&ee(e),v=_.get(e,"fxshow");for(r in n.queue||(null==(a=ce._queueHooks(e,"fx")).unqueued&&(a.unqueued=0,s=a.empty.fire,a.empty.fire=function(){a.unqueued||s()}),a.unqueued++,p.always(function(){p.always(function(){a.unqueued--,ce.queue(e,"fx").length||a.empty.fire()})})),t)if(i=t[r],ft.test(i)){if(delete t[r],o=o||"toggle"===i,i===(g?"hide":"show")){if("show"!==i||!v||void 0===v[r])continue;g=!0}d[r]=v&&v[r]||ce.style(e,r)}if((u=!ce.isEmptyObject(t))||!ce.isEmptyObject(d))for(r in f&&1===e.nodeType&&(n.overflow=[h.overflow,h.overflowX,h.overflowY],null==(l=v&&v.display)&&(l=_.get(e,"display")),"none"===(c=ce.css(e,"display"))&&(l?c=l:(re([e],!0),l=e.style.display||l,c=ce.css(e,"display"),re([e]))),("inline"===c||"inline-block"===c&&null!=l)&&"none"===ce.css(e,"float")&&(u||(p.done(function(){h.display=l}),null==l&&(c=h.display,l="none"===c?"":c)),h.display="inline-block")),n.overflow&&(h.overflow="hidden",p.always(function(){h.overflow=n.overflow[0],h.overflowX=n.overflow[1],h.overflowY=n.overflow[2]})),u=!1,d)u||(v?"hidden"in v&&(g=v.hidden):v=_.access(e,"fxshow",{display:l}),o&&(v.hidden=!g),g&&re([e],!0),p.done(function(){for(r in g||re([e]),_.remove(e,"fxshow"),d)ce.style(e,r,d[r])})),u=vt(g?v[r]:0,r,p),r in v||(v[r]=u.start,g&&(u.end=u.start,u.start=0))}],prefilter:function(e,t){t?yt.prefilters.unshift(e):yt.prefilters.push(e)}}),ce.speed=function(e,t,n){var r=e&&"object"==typeof e?ce.extend({},e):{complete:n||!n&&t||v(e)&&e,duration:e,easing:n&&t||t&&!v(t)&&t};return ce.fx.off?r.duration=0:"number"!=typeof r.duration&&(r.duration in ce.fx.speeds?r.duration=ce.fx.speeds[r.duration]:r.duration=ce.fx.speeds._default),null!=r.queue&&!0!==r.queue||(r.queue="fx"),r.old=r.complete,r.complete=function(){v(r.old)&&r.old.call(this),r.queue&&ce.dequeue(this,r.queue)},r},ce.fn.extend({fadeTo:function(e,t,n,r){return this.filter(ee).css("opacity",0).show().end().animate({opacity:t},e,n,r)},animate:function(t,e,n,r){var i=ce.isEmptyObject(t),o=ce.speed(e,n,r),a=function(){var e=yt(this,ce.extend({},t),o);(i||_.get(this,"finish"))&&e.stop(!0)};return a.finish=a,i||!1===o.queue?this.each(a):this.queue(o.queue,a)},stop:function(i,e,o){var a=function(e){var t=e.stop;delete e.stop,t(o)};return"string"!=typeof i&&(o=e,e=i,i=void 0),e&&this.queue(i||"fx",[]),this.each(function(){var e=!0,t=null!=i&&i+"queueHooks",n=ce.timers,r=_.get(this);if(t)r[t]&&r[t].stop&&a(r[t]);else for(t in r)r[t]&&r[t].stop&&pt.test(t)&&a(r[t]);for(t=n.length;t--;)n[t].elem!==this||null!=i&&n[t].queue!==i||(n[t].anim.stop(o),e=!1,n.splice(t,1));!e&&o||ce.dequeue(this,i)})},finish:function(a){return!1!==a&&(a=a||"fx"),this.each(function(){var e,t=_.get(this),n=t[a+"queue"],r=t[a+"queueHooks"],i=ce.timers,o=n?n.length:0;for(t.finish=!0,ce.queue(this,a,[]),r&&r.stop&&r.stop.call(this,!0),e=i.length;e--;)i[e].elem===this&&i[e].queue===a&&(i[e].anim.stop(!0),i.splice(e,1));for(e=0;e<o;e++)n[e]&&n[e].finish&&n[e].finish.call(this);delete t.finish})}}),ce.each(["toggle","show","hide"],function(e,r){var i=ce.fn[r];ce.fn[r]=function(e,t,n){return null==e||"boolean"==typeof e?i.apply(this,arguments):this.animate(gt(r,!0),e,t,n)}}),ce.each({slideDown:gt("show"),slideUp:gt("hide"),slideToggle:gt("toggle"),fadeIn:{opacity:"show"},fadeOut:{opacity:"hide"},fadeToggle:{opacity:"toggle"}},function(e,r){ce.fn[e]=function(e,t,n){return this.animate(r,e,t,n)}}),ce.timers=[],ce.fx.tick=function(){var e,t=0,n=ce.timers;for(st=Date.now();t<n.length;t++)(e=n[t])()||n[t]!==e||n.splice(t--,1);n.length||ce.fx.stop(),st=void 0},ce.fx.timer=function(e){ce.timers.push(e),ce.fx.start()},ce.fx.interval=13,ce.fx.start=function(){ut||(ut=!0,dt())},ce.fx.stop=function(){ut=null},ce.fx.speeds={slow:600,fast:200,_default:400},ce.fn.delay=function(r,e){return r=ce.fx&&ce.fx.speeds[r]||r,e=e||"fx",this.queue(e,function(e,t){var n=ie.setTimeout(e,r);t.stop=function(){ie.clearTimeout(n)}})},lt=C.createElement("input"),ct=C.createElement("select").appendChild(C.createElement("option")),lt.type="checkbox",le.checkOn=""!==lt.value,le.optSelected=ct.selected,(lt=C.createElement("input")).value="t",lt.type="radio",le.radioValue="t"===lt.value;var mt,xt=ce.expr.attrHandle;ce.fn.extend({attr:function(e,t){return M(this,ce.attr,e,t,1<arguments.length)},removeAttr:function(e){return this.each(function(){ce.removeAttr(this,e)})}}),ce.extend({attr:function(e,t,n){var r,i,o=e.nodeType;if(3!==o&&8!==o&&2!==o)return"undefined"==typeof e.getAttribute?ce.prop(e,t,n):(1===o&&ce.isXMLDoc(e)||(i=ce.attrHooks[t.toLowerCase()]||(ce.expr.match.bool.test(t)?mt:void 0)),void 0!==n?null===n?void ce.removeAttr(e,t):i&&"set"in i&&void 0!==(r=i.set(e,n,t))?r:(e.setAttribute(t,n+""),n):i&&"get"in i&&null!==(r=i.get(e,t))?r:null==(r=ce.find.attr(e,t))?void 0:r)},attrHooks:{type:{set:function(e,t){if(!le.radioValue&&"radio"===t&&fe(e,"input")){var n=e.value;return e.setAttribute("type",t),n&&(e.value=n),t}}}},removeAttr:function(e,t){var n,r=0,i=t&&t.match(D);if(i&&1===e.nodeType)while(n=i[r++])e.removeAttribute(n)}}),mt={set:function(e,t,n){return!1===t?ce.removeAttr(e,n):e.setAttribute(n,n),n}},ce.each(ce.expr.match.bool.source.match(/\w+/g),function(e,t){var a=xt[t]||ce.find.attr;xt[t]=function(e,t,n){var r,i,o=t.toLowerCase();return n||(i=xt[o],xt[o]=r,r=null!=a(e,t,n)?o:null,xt[o]=i),r}});var bt=/^(?:input|select|textarea|button)$/i,wt=/^(?:a|area)$/i;function Tt(e){return(e.match(D)||[]).join(" ")}function Ct(e){return e.getAttribute&&e.getAttribute("class")||""}function kt(e){return Array.isArray(e)?e:"string"==typeof e&&e.match(D)||[]}ce.fn.extend({prop:function(e,t){return M(this,ce.prop,e,t,1<arguments.length)},removeProp:function(e){return this.each(function(){delete this[ce.propFix[e]||e]})}}),ce.extend({prop:function(e,t,n){var r,i,o=e.nodeType;if(3!==o&&8!==o&&2!==o)return 1===o&&ce.isXMLDoc(e)||(t=ce.propFix[t]||t,i=ce.propHooks[t]),void 0!==n?i&&"set"in i&&void 0!==(r=i.set(e,n,t))?r:e[t]=n:i&&"get"in i&&null!==(r=i.get(e,t))?r:e[t]},propHooks:{tabIndex:{get:function(e){var t=ce.find.attr(e,"tabindex");return t?parseInt(t,10):bt.test(e.nodeName)||wt.test(e.nodeName)&&e.href?0:-1}}},propFix:{"for":"htmlFor","class":"className"}}),le.optSelected||(ce.propHooks.selected={get:function(e){var t=e.parentNode;return t&&t.parentNode&&t.parentNode.selectedIndex,null},set:function(e){var t=e.parentNode;t&&(t.selectedIndex,t.parentNode&&t.parentNode.selectedIndex)}}),ce.each(["tabIndex","readOnly","maxLength","cellSpacing","cellPadding","rowSpan","colSpan","useMap","frameBorder","contentEditable"],function(){ce.propFix[this.toLowerCase()]=this}),ce.fn.extend({addClass:function(t){var e,n,r,i,o,a;return v(t)?this.each(function(e){ce(this).addClass(t.call(this,e,Ct(this)))}):(e=kt(t)).length?this.each(function(){if(r=Ct(this),n=1===this.nodeType&&" "+Tt(r)+" "){for(o=0;o<e.length;o++)i=e[o],n.indexOf(" "+i+" ")<0&&(n+=i+" ");a=Tt(n),r!==a&&this.setAttribute("class",a)}}):this},removeClass:function(t){var e,n,r,i,o,a;return v(t)?this.each(function(e){ce(this).removeClass(t.call(this,e,Ct(this)))}):arguments.length?(e=kt(t)).length?this.each(function(){if(r=Ct(this),n=1===this.nodeType&&" "+Tt(r)+" "){for(o=0;o<e.length;o++){i=e[o];while(-1<n.indexOf(" "+i+" "))n=n.replace(" "+i+" "," ")}a=Tt(n),r!==a&&this.setAttribute("class",a)}}):this:this.attr("class","")},toggleClass:function(t,n){var e,r,i,o,a=typeof t,s="string"===a||Array.isArray(t);return v(t)?this.each(function(e){ce(this).toggleClass(t.call(this,e,Ct(this),n),n)}):"boolean"==typeof n&&s?n?this.addClass(t):this.removeClass(t):(e=kt(t),this.each(function(){if(s)for(o=ce(this),i=0;i<e.length;i++)r=e[i],o.hasClass(r)?o.removeClass(r):o.addClass(r);else void 0!==t&&"boolean"!==a||((r=Ct(this))&&_.set(this,"__className__",r),this.setAttribute&&this.setAttribute("class",r||!1===t?"":_.get(this,"__className__")||""))}))},hasClass:function(e){var t,n,r=0;t=" "+e+" ";while(n=this[r++])if(1===n.nodeType&&-1<(" "+Tt(Ct(n))+" ").indexOf(t))return!0;return!1}});var St=/\r/g;ce.fn.extend({val:function(n){var r,e,i,t=this[0];return arguments.length?(i=v(n),this.each(function(e){var t;1===this.nodeType&&(null==(t=i?n.call(this,e,ce(this).val()):n)?t="":"number"==typeof t?t+="":Array.isArray(t)&&(t=ce.map(t,function(e){return null==e?"":e+""})),(r=ce.valHooks[this.type]||ce.valHooks[this.nodeName.toLowerCase()])&&"set"in r&&void 0!==r.set(this,t,"value")||(this.value=t))})):t?(r=ce.valHooks[t.type]||ce.valHooks[t.nodeName.toLowerCase()])&&"get"in r&&void 0!==(e=r.get(t,"value"))?e:"string"==typeof(e=t.value)?e.replace(St,""):null==e?"":e:void 0}}),ce.extend({valHooks:{option:{get:function(e){var t=ce.find.attr(e,"value");return null!=t?t:Tt(ce.text(e))}},select:{get:function(e){var t,n,r,i=e.options,o=e.selectedIndex,a="select-one"===e.type,s=a?null:[],u=a?o+1:i.length;for(r=o<0?u:a?o:0;r<u;r++)if(((n=i[r]).selected||r===o)&&!n.disabled&&(!n.parentNode.disabled||!fe(n.parentNode,"optgroup"))){if(t=ce(n).val(),a)return t;s.push(t)}return s},set:function(e,t){var n,r,i=e.options,o=ce.makeArray(t),a=i.length;while(a--)((r=i[a]).selected=-1<ce.inArray(ce.valHooks.option.get(r),o))&&(n=!0);return n||(e.selectedIndex=-1),o}}}}),ce.each(["radio","checkbox"],function(){ce.valHooks[this]={set:function(e,t){if(Array.isArray(t))return e.checked=-1<ce.inArray(ce(e).val(),t)}},le.checkOn||(ce.valHooks[this].get=function(e){return null===e.getAttribute("value")?"on":e.value})});var Et=ie.location,jt={guid:Date.now()},At=/\?/;ce.parseXML=function(e){var t,n;if(!e||"string"!=typeof e)return null;try{t=(new ie.DOMParser).parseFromString(e,"text/xml")}catch(e){}return n=t&&t.getElementsByTagName("parsererror")[0],t&&!n||ce.error("Invalid XML: "+(n?ce.map(n.childNodes,function(e){return e.textContent}).join("\n"):e)),t};var Dt=/^(?:focusinfocus|focusoutblur)$/,Nt=function(e){e.stopPropagation()};ce.extend(ce.event,{trigger:function(e,t,n,r){var i,o,a,s,u,l,c,f,p=[n||C],d=ue.call(e,"type")?e.type:e,h=ue.call(e,"namespace")?e.namespace.split("."):[];if(o=f=a=n=n||C,3!==n.nodeType&&8!==n.nodeType&&!Dt.test(d+ce.event.triggered)&&(-1<d.indexOf(".")&&(d=(h=d.split(".")).shift(),h.sort()),u=d.indexOf(":")<0&&"on"+d,(e=e[ce.expando]?e:new ce.Event(d,"object"==typeof e&&e)).isTrigger=r?2:3,e.namespace=h.join("."),e.rnamespace=e.namespace?new RegExp("(^|\\.)"+h.join("\\.(?:.*\\.|)")+"(\\.|$)"):null,e.result=void 0,e.target||(e.target=n),t=null==t?[e]:ce.makeArray(t,[e]),c=ce.event.special[d]||{},r||!c.trigger||!1!==c.trigger.apply(n,t))){if(!r&&!c.noBubble&&!y(n)){for(s=c.delegateType||d,Dt.test(s+d)||(o=o.parentNode);o;o=o.parentNode)p.push(o),a=o;a===(n.ownerDocument||C)&&p.push(a.defaultView||a.parentWindow||ie)}i=0;while((o=p[i++])&&!e.isPropagationStopped())f=o,e.type=1<i?s:c.bindType||d,(l=(_.get(o,"events")||Object.create(null))[e.type]&&_.get(o,"handle"))&&l.apply(o,t),(l=u&&o[u])&&l.apply&&$(o)&&(e.result=l.apply(o,t),!1===e.result&&e.preventDefault());return e.type=d,r||e.isDefaultPrevented()||c._default&&!1!==c._default.apply(p.pop(),t)||!$(n)||u&&v(n[d])&&!y(n)&&((a=n[u])&&(n[u]=null),ce.event.triggered=d,e.isPropagationStopped()&&f.addEventListener(d,Nt),n[d](),e.isPropagationStopped()&&f.removeEventListener(d,Nt),ce.event.triggered=void 0,a&&(n[u]=a)),e.result}},simulate:function(e,t,n){var r=ce.extend(new ce.Event,n,{type:e,isSimulated:!0});ce.event.trigger(r,null,t)}}),ce.fn.extend({trigger:function(e,t){return this.each(function(){ce.event.trigger(e,t,this)})},triggerHandler:function(e,t){var n=this[0];if(n)return ce.event.trigger(e,t,n,!0)}});var qt=/\[\]$/,Lt=/\r?\n/g,Ht=/^(?:submit|button|image|reset|file)$/i,Ot=/^(?:input|select|textarea|keygen)/i;function Pt(n,e,r,i){var t;if(Array.isArray(e))ce.each(e,function(e,t){r||qt.test(n)?i(n,t):Pt(n+"["+("object"==typeof t&&null!=t?e:"")+"]",t,r,i)});else if(r||"object"!==x(e))i(n,e);else for(t in e)Pt(n+"["+t+"]",e[t],r,i)}ce.param=function(e,t){var n,r=[],i=function(e,t){var n=v(t)?t():t;r[r.length]=encodeURIComponent(e)+"="+encodeURIComponent(null==n?"":n)};if(null==e)return"";if(Array.isArray(e)||e.jquery&&!ce.isPlainObject(e))ce.each(e,function(){i(this.name,this.value)});else for(n in e)Pt(n,e[n],t,i);return r.join("&")},ce.fn.extend({serialize:function(){return ce.param(this.serializeArray())},serializeArray:function(){return this.map(function(){var e=ce.prop(this,"elements");return e?ce.makeArray(e):this}).filter(function(){var e=this.type;return this.name&&!ce(this).is(":disabled")&&Ot.test(this.nodeName)&&!Ht.test(e)&&(this.checked||!we.test(e))}).map(function(e,t){var n=ce(this).val();return null==n?null:Array.isArray(n)?ce.map(n,function(e){return{name:t.name,value:e.replace(Lt,"\r\n")}}):{name:t.name,value:n.replace(Lt,"\r\n")}}).get()}});var Mt=/%20/g,Rt=/#.*$/,It=/([?&])_=[^&]*/,Wt=/^(.*?):[ \t]*([^\r\n]*)$/gm,Ft=/^(?:GET|HEAD)$/,$t=/^\/\//,Bt={},_t={},zt="*/".concat("*"),Xt=C.createElement("a");function Ut(o){return function(e,t){"string"!=typeof e&&(t=e,e="*");var n,r=0,i=e.toLowerCase().match(D)||[];if(v(t))while(n=i[r++])"+"===n[0]?(n=n.slice(1)||"*",(o[n]=o[n]||[]).unshift(t)):(o[n]=o[n]||[]).push(t)}}function Vt(t,i,o,a){var s={},u=t===_t;function l(e){var r;return s[e]=!0,ce.each(t[e]||[],function(e,t){var n=t(i,o,a);return"string"!=typeof n||u||s[n]?u?!(r=n):void 0:(i.dataTypes.unshift(n),l(n),!1)}),r}return l(i.dataTypes[0])||!s["*"]&&l("*")}function Gt(e,t){var n,r,i=ce.ajaxSettings.flatOptions||{};for(n in t)void 0!==t[n]&&((i[n]?e:r||(r={}))[n]=t[n]);return r&&ce.extend(!0,e,r),e}Xt.href=Et.href,ce.extend({active:0,lastModified:{},etag:{},ajaxSettings:{url:Et.href,type:"GET",isLocal:/^(?:about|app|app-storage|.+-extension|file|res|widget):$/.test(Et.protocol),global:!0,processData:!0,async:!0,contentType:"application/x-www-form-urlencoded; charset=UTF-8",accepts:{"*":zt,text:"text/plain",html:"text/html",xml:"application/xml, text/xml",json:"application/json, text/javascript"},contents:{xml:/\bxml\b/,html:/\bhtml/,json:/\bjson\b/},responseFields:{xml:"responseXML",text:"responseText",json:"responseJSON"},converters:{"* text":String,"text html":!0,"text json":JSON.parse,"text xml":ce.parseXML},flatOptions:{url:!0,context:!0}},ajaxSetup:function(e,t){return t?Gt(Gt(e,ce.ajaxSettings),t):Gt(ce.ajaxSettings,e)},ajaxPrefilter:Ut(Bt),ajaxTransport:Ut(_t),ajax:function(e,t){"object"==typeof e&&(t=e,e=void 0),t=t||{};var c,f,p,n,d,r,h,g,i,o,v=ce.ajaxSetup({},t),y=v.context||v,m=v.context&&(y.nodeType||y.jquery)?ce(y):ce.event,x=ce.Deferred(),b=ce.Callbacks("once memory"),w=v.statusCode||{},a={},s={},u="canceled",T={readyState:0,getResponseHeader:function(e){var t;if(h){if(!n){n={};while(t=Wt.exec(p))n[t[1].toLowerCase()+" "]=(n[t[1].toLowerCase()+" "]||[]).concat(t[2])}t=n[e.toLowerCase()+" "]}return null==t?null:t.join(", ")},getAllResponseHeaders:function(){return h?p:null},setRequestHeader:function(e,t){return null==h&&(e=s[e.toLowerCase()]=s[e.toLowerCase()]||e,a[e]=t),this},overrideMimeType:function(e){return null==h&&(v.mimeType=e),this},statusCode:function(e){var t;if(e)if(h)T.always(e[T.status]);else for(t in e)w[t]=[w[t],e[t]];return this},abort:function(e){var t=e||u;return c&&c.abort(t),l(0,t),this}};if(x.promise(T),v.url=((e||v.url||Et.href)+"").replace($t,Et.protocol+"//"),v.type=t.method||t.type||v.method||v.type,v.dataTypes=(v.dataType||"*").toLowerCase().match(D)||[""],null==v.crossDomain){r=C.createElement("a");try{r.href=v.url,r.href=r.href,v.crossDomain=Xt.protocol+"//"+Xt.host!=r.protocol+"//"+r.host}catch(e){v.crossDomain=!0}}if(v.data&&v.processData&&"string"!=typeof v.data&&(v.data=ce.param(v.data,v.traditional)),Vt(Bt,v,t,T),h)return T;for(i in(g=ce.event&&v.global)&&0==ce.active++&&ce.event.trigger("ajaxStart"),v.type=v.type.toUpperCase(),v.hasContent=!Ft.test(v.type),f=v.url.replace(Rt,""),v.hasContent?v.data&&v.processData&&0===(v.contentType||"").indexOf("application/x-www-form-urlencoded")&&(v.data=v.data.replace(Mt,"+")):(o=v.url.slice(f.length),v.data&&(v.processData||"string"==typeof v.data)&&(f+=(At.test(f)?"&":"?")+v.data,delete v.data),!1===v.cache&&(f=f.replace(It,"$1"),o=(At.test(f)?"&":"?")+"_="+jt.guid+++o),v.url=f+o),v.ifModified&&(ce.lastModified[f]&&T.setRequestHeader("If-Modified-Since",ce.lastModified[f]),ce.etag[f]&&T.setRequestHeader("If-None-Match",ce.etag[f])),(v.data&&v.hasContent&&!1!==v.contentType||t.contentType)&&T.setRequestHeader("Content-Type",v.contentType),T.setRequestHeader("Accept",v.dataTypes[0]&&v.accepts[v.dataTypes[0]]?v.accepts[v.dataTypes[0]]+("*"!==v.dataTypes[0]?", "+zt+"; q=0.01":""):v.accepts["*"]),v.headers)T.setRequestHeader(i,v.headers[i]);if(v.beforeSend&&(!1===v.beforeSend.call(y,T,v)||h))return T.abort();if(u="abort",b.add(v.complete),T.done(v.success),T.fail(v.error),c=Vt(_t,v,t,T)){if(T.readyState=1,g&&m.trigger("ajaxSend",[T,v]),h)return T;v.async&&0<v.timeout&&(d=ie.setTimeout(function(){T.abort("timeout")},v.timeout));try{h=!1,c.send(a,l)}catch(e){if(h)throw e;l(-1,e)}}else l(-1,"No Transport");function l(e,t,n,r){var i,o,a,s,u,l=t;h||(h=!0,d&&ie.clearTimeout(d),c=void 0,p=r||"",T.readyState=0<e?4:0,i=200<=e&&e<300||304===e,n&&(s=function(e,t,n){var r,i,o,a,s=e.contents,u=e.dataTypes;while("*"===u[0])u.shift(),void 0===r&&(r=e.mimeType||t.getResponseHeader("Content-Type"));if(r)for(i in s)if(s[i]&&s[i].test(r)){u.unshift(i);break}if(u[0]in n)o=u[0];else{for(i in n){if(!u[0]||e.converters[i+" "+u[0]]){o=i;break}a||(a=i)}o=o||a}if(o)return o!==u[0]&&u.unshift(o),n[o]}(v,T,n)),!i&&-1<ce.inArray("script",v.dataTypes)&&ce.inArray("json",v.dataTypes)<0&&(v.converters["text script"]=function(){}),s=function(e,t,n,r){var i,o,a,s,u,l={},c=e.dataTypes.slice();if(c[1])for(a in e.converters)l[a.toLowerCase()]=e.converters[a];o=c.shift();while(o)if(e.responseFields[o]&&(n[e.responseFields[o]]=t),!u&&r&&e.dataFilter&&(t=e.dataFilter(t,e.dataType)),u=o,o=c.shift())if("*"===o)o=u;else if("*"!==u&&u!==o){if(!(a=l[u+" "+o]||l["* "+o]))for(i in l)if((s=i.split(" "))[1]===o&&(a=l[u+" "+s[0]]||l["* "+s[0]])){!0===a?a=l[i]:!0!==l[i]&&(o=s[0],c.unshift(s[1]));break}if(!0!==a)if(a&&e["throws"])t=a(t);else try{t=a(t)}catch(e){return{state:"parsererror",error:a?e:"No conversion from "+u+" to "+o}}}return{state:"success",data:t}}(v,s,T,i),i?(v.ifModified&&((u=T.getResponseHeader("Last-Modified"))&&(ce.lastModified[f]=u),(u=T.getResponseHeader("etag"))&&(ce.etag[f]=u)),204===e||"HEAD"===v.type?l="nocontent":304===e?l="notmodified":(l=s.state,o=s.data,i=!(a=s.error))):(a=l,!e&&l||(l="error",e<0&&(e=0))),T.status=e,T.statusText=(t||l)+"",i?x.resolveWith(y,[o,l,T]):x.rejectWith(y,[T,l,a]),T.statusCode(w),w=void 0,g&&m.trigger(i?"ajaxSuccess":"ajaxError",[T,v,i?o:a]),b.fireWith(y,[T,l]),g&&(m.trigger("ajaxComplete",[T,v]),--ce.active||ce.event.trigger("ajaxStop")))}return T},getJSON:function(e,t,n){return ce.get(e,t,n,"json")},getScript:function(e,t){return ce.get(e,void 0,t,"script")}}),ce.each(["get","post"],function(e,i){ce[i]=function(e,t,n,r){return v(t)&&(r=r||n,n=t,t=void 0),ce.ajax(ce.extend({url:e,type:i,dataType:r,data:t,success:n},ce.isPlainObject(e)&&e))}}),ce.ajaxPrefilter(function(e){var t;for(t in e.headers)"content-type"===t.toLowerCase()&&(e.contentType=e.headers[t]||"")}),ce._evalUrl=function(e,t,n){return ce.ajax({url:e,type:"GET",dataType:"script",cache:!0,async:!1,global:!1,converters:{"text script":function(){}},dataFilter:function(e){ce.globalEval(e,t,n)}})},ce.fn.extend({wrapAll:function(e){var t;return this[0]&&(v(e)&&(e=e.call(this[0])),t=ce(e,this[0].ownerDocument).eq(0).clone(!0),this[0].parentNode&&t.insertBefore(this[0]),t.map(function(){var e=this;while(e.firstElementChild)e=e.firstElementChild;return e}).append(this)),this},wrapInner:function(n){return v(n)?this.each(function(e){ce(this).wrapInner(n.call(this,e))}):this.each(function(){var e=ce(this),t=e.contents();t.length?t.wrapAll(n):e.append(n)})},wrap:function(t){var n=v(t);return this.each(function(e){ce(this).wrapAll(n?t.call(this,e):t)})},unwrap:function(e){return this.parent(e).not("body").each(function(){ce(this).replaceWith(this.childNodes)}),this}}),ce.expr.pseudos.hidden=function(e){return!ce.expr.pseudos.visible(e)},ce.expr.pseudos.visible=function(e){return!!(e.offsetWidth||e.offsetHeight||e.getClientRects().length)},ce.ajaxSettings.xhr=function(){try{return new ie.XMLHttpRequest}catch(e){}};var Yt={0:200,1223:204},Qt=ce.ajaxSettings.xhr();le.cors=!!Qt&&"withCredentials"in Qt,le.ajax=Qt=!!Qt,ce.ajaxTransport(function(i){var o,a;if(le.cors||Qt&&!i.crossDomain)return{send:function(e,t){var n,r=i.xhr();if(r.open(i.type,i.url,i.async,i.username,i.password),i.xhrFields)for(n in i.xhrFields)r[n]=i.xhrFields[n];for(n in i.mimeType&&r.overrideMimeType&&r.overrideMimeType(i.mimeType),i.crossDomain||e["X-Requested-With"]||(e["X-Requested-With"]="XMLHttpRequest"),e)r.setRequestHeader(n,e[n]);o=function(e){return function(){o&&(o=a=r.onload=r.onerror=r.onabort=r.ontimeout=r.onreadystatechange=null,"abort"===e?r.abort():"error"===e?"number"!=typeof r.status?t(0,"error"):t(r.status,r.statusText):t(Yt[r.status]||r.status,r.statusText,"text"!==(r.responseType||"text")||"string"!=typeof r.responseText?{binary:r.response}:{text:r.responseText},r.getAllResponseHeaders()))}},r.onload=o(),a=r.onerror=r.ontimeout=o("error"),void 0!==r.onabort?r.onabort=a:r.onreadystatechange=function(){4===r.readyState&&ie.setTimeout(function(){o&&a()})},o=o("abort");try{r.send(i.hasContent&&i.data||null)}catch(e){if(o)throw e}},abort:function(){o&&o()}}}),ce.ajaxPrefilter(function(e){e.crossDomain&&(e.contents.script=!1)}),ce.ajaxSetup({accepts:{script:"text/javascript, application/javascript, application/ecmascript, application/x-ecmascript"},contents:{script:/\b(?:java|ecma)script\b/},converters:{"text script":function(e){return ce.globalEval(e),e}}}),ce.ajaxPrefilter("script",function(e){void 0===e.cache&&(e.cache=!1),e.crossDomain&&(e.type="GET")}),ce.ajaxTransport("script",function(n){var r,i;if(n.crossDomain||n.scriptAttrs)return{send:function(e,t){r=ce("<script>").attr(n.scriptAttrs||{}).prop({charset:n.scriptCharset,src:n.url}).on("load error",i=function(e){r.remove(),i=null,e&&t("error"===e.type?404:200,e.type)}),C.head.appendChild(r[0])},abort:function(){i&&i()}}});var Jt,Kt=[],Zt=/(=)\?(?=&|$)|\?\?/;ce.ajaxSetup({jsonp:"callback",jsonpCallback:function(){var e=Kt.pop()||ce.expando+"_"+jt.guid++;return this[e]=!0,e}}),ce.ajaxPrefilter("json jsonp",function(e,t,n){var r,i,o,a=!1!==e.jsonp&&(Zt.test(e.url)?"url":"string"==typeof e.data&&0===(e.contentType||"").indexOf("application/x-www-form-urlencoded")&&Zt.test(e.data)&&"data");if(a||"jsonp"===e.dataTypes[0])return r=e.jsonpCallback=v(e.jsonpCallback)?e.jsonpCallback():e.jsonpCallback,a?e[a]=e[a].replace(Zt,"$1"+r):!1!==e.jsonp&&(e.url+=(At.test(e.url)?"&":"?")+e.jsonp+"="+r),e.converters["script json"]=function(){return o||ce.error(r+" was not called"),o[0]},e.dataTypes[0]="json",i=ie[r],ie[r]=function(){o=arguments},n.always(function(){void 0===i?ce(ie).removeProp(r):ie[r]=i,e[r]&&(e.jsonpCallback=t.jsonpCallback,Kt.push(r)),o&&v(i)&&i(o[0]),o=i=void 0}),"script"}),le.createHTMLDocument=((Jt=C.implementation.createHTMLDocument("").body).innerHTML="<form></form><form></form>",2===Jt.childNodes.length),ce.parseHTML=function(e,t,n){return"string"!=typeof e?[]:("boolean"==typeof t&&(n=t,t=!1),t||(le.createHTMLDocument?((r=(t=C.implementation.createHTMLDocument("")).createElement("base")).href=C.location.href,t.head.appendChild(r)):t=C),o=!n&&[],(i=w.exec(e))?[t.createElement(i[1])]:(i=Ae([e],t,o),o&&o.length&&ce(o).remove(),ce.merge([],i.childNodes)));var r,i,o},ce.fn.load=function(e,t,n){var r,i,o,a=this,s=e.indexOf(" ");return-1<s&&(r=Tt(e.slice(s)),e=e.slice(0,s)),v(t)?(n=t,t=void 0):t&&"object"==typeof t&&(i="POST"),0<a.length&&ce.ajax({url:e,type:i||"GET",dataType:"html",data:t}).done(function(e){o=arguments,a.html(r?ce("<div>").append(ce.parseHTML(e)).find(r):e)}).always(n&&function(e,t){a.each(function(){n.apply(this,o||[e.responseText,t,e])})}),this},ce.expr.pseudos.animated=function(t){return ce.grep(ce.timers,function(e){return t===e.elem}).length},ce.offset={setOffset:function(e,t,n){var r,i,o,a,s,u,l=ce.css(e,"position"),c=ce(e),f={};"static"===l&&(e.style.position="relative"),s=c.offset(),o=ce.css(e,"top"),u=ce.css(e,"left"),("absolute"===l||"fixed"===l)&&-1<(o+u).indexOf("auto")?(a=(r=c.position()).top,i=r.left):(a=parseFloat(o)||0,i=parseFloat(u)||0),v(t)&&(t=t.call(e,n,ce.extend({},s))),null!=t.top&&(f.top=t.top-s.top+a),null!=t.left&&(f.left=t.left-s.left+i),"using"in t?t.using.call(e,f):c.css(f)}},ce.fn.extend({offset:function(t){if(arguments.length)return void 0===t?this:this.each(function(e){ce.offset.setOffset(this,t,e)});var e,n,r=this[0];return r?r.getClientRects().length?(e=r.getBoundingClientRect(),n=r.ownerDocument.defaultView,{top:e.top+n.pageYOffset,left:e.left+n.pageXOffset}):{top:0,left:0}:void 0},position:function(){if(this[0]){var e,t,n,r=this[0],i={top:0,left:0};if("fixed"===ce.css(r,"position"))t=r.getBoundingClientRect();else{t=this.offset(),n=r.ownerDocument,e=r.offsetParent||n.documentElement;while(e&&(e===n.body||e===n.documentElement)&&"static"===ce.css(e,"position"))e=e.parentNode;e&&e!==r&&1===e.nodeType&&((i=ce(e).offset()).top+=ce.css(e,"borderTopWidth",!0),i.left+=ce.css(e,"borderLeftWidth",!0))}return{top:t.top-i.top-ce.css(r,"marginTop",!0),left:t.left-i.left-ce.css(r,"marginLeft",!0)}}},offsetParent:function(){return this.map(function(){var e=this.offsetParent;while(e&&"static"===ce.css(e,"position"))e=e.offsetParent;return e||J})}}),ce.each({scrollLeft:"pageXOffset",scrollTop:"pageYOffset"},function(t,i){var o="pageYOffset"===i;ce.fn[t]=function(e){return M(this,function(e,t,n){var r;if(y(e)?r=e:9===e.nodeType&&(r=e.defaultView),void 0===n)return r?r[i]:e[t];r?r.scrollTo(o?r.pageXOffset:n,o?n:r.pageYOffset):e[t]=n},t,e,arguments.length)}}),ce.each(["top","left"],function(e,n){ce.cssHooks[n]=Ye(le.pixelPosition,function(e,t){if(t)return t=Ge(e,n),_e.test(t)?ce(e).position()[n]+"px":t})}),ce.each({Height:"height",Width:"width"},function(a,s){ce.each({padding:"inner"+a,content:s,"":"outer"+a},function(r,o){ce.fn[o]=function(e,t){var n=arguments.length&&(r||"boolean"!=typeof e),i=r||(!0===e||!0===t?"margin":"border");return M(this,function(e,t,n){var r;return y(e)?0===o.indexOf("outer")?e["inner"+a]:e.document.documentElement["client"+a]:9===e.nodeType?(r=e.documentElement,Math.max(e.body["scroll"+a],r["scroll"+a],e.body["offset"+a],r["offset"+a],r["client"+a])):void 0===n?ce.css(e,t,i):ce.style(e,t,n,i)},s,n?e:void 0,n)}})}),ce.each(["ajaxStart","ajaxStop","ajaxComplete","ajaxError","ajaxSuccess","ajaxSend"],function(e,t){ce.fn[t]=function(e){return this.on(t,e)}}),ce.fn.extend({bind:function(e,t,n){return this.on(e,null,t,n)},unbind:function(e,t){return this.off(e,null,t)},delegate:function(e,t,n,r){return this.on(t,e,n,r)},undelegate:function(e,t,n){return 1===arguments.length?this.off(e,"**"):this.off(t,e||"**",n)},hover:function(e,t){return this.on("mouseenter",e).on("mouseleave",t||e)}}),ce.each("blur focus focusin focusout resize scroll click dblclick mousedown mouseup mousemove mouseover mouseout mouseenter mouseleave change select submit keydown keypress keyup contextmenu".split(" "),function(e,n){ce.fn[n]=function(e,t){return 0<arguments.length?this.on(n,null,e,t):this.trigger(n)}});var en=/^[\s\uFEFF\xA0]+|([^\s\uFEFF\xA0])[\s\uFEFF\xA0]+$/g;ce.proxy=function(e,t){var n,r,i;if("string"==typeof t&&(n=e[t],t=e,e=n),v(e))return r=ae.call(arguments,2),(i=function(){return e.apply(t||this,r.concat(ae.call(arguments)))}).guid=e.guid=e.guid||ce.guid++,i},ce.holdReady=function(e){e?ce.readyWait++:ce.ready(!0)},ce.isArray=Array.isArray,ce.parseJSON=JSON.parse,ce.nodeName=fe,ce.isFunction=v,ce.isWindow=y,ce.camelCase=F,ce.type=x,ce.now=Date.now,ce.isNumeric=function(e){var t=ce.type(e);return("number"===t||"string"===t)&&!isNaN(e-parseFloat(e))},ce.trim=function(e){return null==e?"":(e+"").replace(en,"$1")},"function"==typeof define&&define.amd&&define("jquery",[],function(){return ce});var tn=ie.jQuery,nn=ie.$;return ce.noConflict=function(e){return ie.$===ce&&(ie.$=nn),e&&ie.jQuery===ce&&(ie.jQuery=tn),ce},"undefined"==typeof e&&(ie.jQuery=ie.$=ce),ce});fonts/wfeditor.woff000060400000076010152456167170010421 0ustar00wOFF|{�GSUBNN��OS/2l``�cmap��;�ygasp�glyf�__[�*headt�66*�
�hheau$$	hmtxu@LL���locax���0"maxpz4  ��namezT���_�post{�  
,latnliga
8nz�p�J�B ,	J	�

FZ�
$��Np
 !"#$%��	 0DXr������"2@�  %!
�	  %#�	  %#
�  % "�  % "
�  %"�  %"
�  %%�  %%
�  	�  �  �  � �	(>F� � 	
�
# !��	% &0<JXdpz�����"2B�#"�#	� !!� !!� !!z'�	�k} | �  ""��	 ��	��$0<Rjz
#"�%�%
a
 " ' " '
~ " '&8J�'	�&�$� �!DVf���������(6DR`r�����
8J`v�� % ~  #!a � !"lq
�		�	�	yxpwvu
tsrv(w&�	% u
$r
"&"y! !"x !""q	#!s"# �t
#!�
&p
"'Z" 	 � {� 	"@#!@�		4Tt������! """�" !�" !j!e!h	id�!�m'(0<FThr~����������" ���#o	n��!"	�!"�
!"# �	���"�"
�"�#`' !�!""6P\hx��$#�	$%�#! �#	�#_  ��
 �%"�!
&6�#"�"!�"!�0BPhz�������.<J\~����� " � "�#! �' 	�' �' �' � %j	"# !e	"# !h"# 	i"# d"# S}!"|!"m!!% �   "�  "�  #!"'�  " �	 �  .�#"!"Z#	�	#!"		*8DTbp|�"�"
�"�"�"�"�$��"":Nbn|�����8BP`�# ! "�	#! "�	" #`"{ ��� "� "# !� "# !� "!� "!� "n# � �	!! !8DP� !� !!!�k�&.@P���
o���%!l(<Pdx������,@Th|��	'!%'	�	'!%'	
�	'!%'		�	'!%'	�	'!%'	�	'!%'	�	'!%'�	'!%'�	'!%'�	'!%'�	'!%'�	'!%'�	'!%'�	'!%'�	'!%'�	'!%'�	'!%'
S "_ "	���������3	@�����@�@� ���8 -9z����!�(�3���+���$�.�0�:�<�C�N�^����������������������2�G�f�~������+�3�;�c����U�W�_�j�n�������V�]�i�n�q���������F�O�x����������6�9���� -0a����!�(�2��
�*���$�.�0�9�<�>�N�^����������������������2�F�f�~������+�3�;�c����U�W�_�j�n�������V�\�i�l�q���������F�L�x����������6�8��������� )    �-,=?;21)('����������������N;����tb[T-��x?>7-*���ID975���ojB8��������79���79���79���79���79���79���79���79���79���79���79���79���79���79���79���79���79���79���79���79���79���79���79���79���79���79���79���79���79���79���79���79���79���79���79���79���79���79���79���79���!!!3#!3!3��������@@K5�������@5��@�			!�@@@����@�����%
���#'!5!!5!5#!5!!%!!5!!!!5!����@����������������@��������������������!!�����7COk"327>7654'.'&"'.'&547>7632#"&54632#"&5463227>767#"'.'&'j]^�((((�^]jj]^�((((�^]jYOOu""""uOOYYOOu""""uOO�%%%%�%%%%�501R!!U76==67U!!R10�((�^]jj]^�((((�^]jj]^�((�P""uOOYYOOu""""uOOYYOOu""p%%%%%%%%��

"@78QQ87@"

���+12#5267>54&'.#"3367>76!3@]QRz####zRQ]G�225522�GG�2&2	���''vLK���##zRQ]]QRz##`522�GG�22552&_4�QGFg���@���@�#'+/37;3#3#3#3#'3#3#'3#3#3#3#3#'3#'3#'3#'3#@@�@@@@@@�@@@@�@@�@@@@@@@@�@@�@@�@@�@@�@@@@@@@�@@@@@@@@@@@@@@@@@@@@@����	''� ������������!!5!5#!55!!!!5!����@��������������������������	���#!!5!5#!5!!%!!5!!!!5!����@����������������������������������!!5!5!5!!5!5!5!!5!5!5!5!5!�@��@��@��������@��@��@�@��@�@�@����!!!5#!5!!5!!!��@���@��������������@���������������%5#53533#!!!!5!5!5!5!5!@��V���j����@@�����Z��Z��������@�@�@����3##5#535%!!5!5!5!5!5!!!���V�����@������@��Z��Z��������@�@��@����##5#53533!!5!!5!!5!5!!��F��F��M�@�@�@�������C��@����������=����3533##5#!!!%!!!!5!5!M�F��F��������������C��C������������=����'!!!!5!5!5!5!5!!!5!5!''7'77���@������@�`=��=��=��=���������@�@��@�@���=��=��=��=����!!!!''7'77�=��}�`��`��`��`�����@���`��`��`��`����!!5!5!5!5!5!!5!5!5!5!5!�����@������@��@�@��@�@�@����!!5!5!5!!5!5!5!!5!5!5!�@��@��@�����@��@��@�@��@�@����$''7'77!#3#3!5!7!5!'!5!v��M��M��M��I��@@VZ@��6@��s@���=��M��J��M��MC�����@�@��@�@����%155!!'5!'5!!57!57!'77'7@@@@@@����
3�3
�#0��M��L��M���@
@�M@�@����3
4ZZ4
3�@v#ss0S�j��M��M��M�����!!!3#����@��@@�����@�����	5	!!!�������r��s���s����� ���7!!!!!!55!!!@��������������������@��
���
)7EUlptx|��32654&+"732654&+"32654&+"!2654&#!"7!2654&#!"!"3!2654&!546;"&54632#323#7!!!!%3#3#3#`�

�

�

�

�

�
�M@

��

@

��
M��

@
-�%@%%%%@%�@@@@������������



�



�



�



�




��

@
��@%%%%%%��@@@@�@�@�$���#'+/37;?CGKOSW[_cgkosw{����3#13##531#53#51#5531533#%3#53533#3#5335373#53533#3#3#53353353'3#!533#3#3#3#3#5335353353@��@@���@@@@��@@�@@�@@�@�����@@�@@�@��@@�����@@@@�@@�@�@�@�@@@���@@@@@@�@@@@�@�@����@��@@��@@@��@@�@��@@���@@��@@@����@@@@���@@��@@@�@����@@@@@@��@@����@�@�@��@@@@��@@@@���!!!3#3#����@��@@��@@�����@��������!!!'73#3#3#����@�[��[=��[=[�Ô@@@@@@@�������[��[=[[��[=O����������!!!3#'5!3#����@�`������@@�������@���������3#3#%3#3#%3#3#%3#3#@��������������������������������������!!!3#����@�@@@�����@�����!!!3#����@��@@�����@�����!!!3#3#3#����@��@@�@@�@@�����@�����������!!!3#3#����@��@@@@�����@��������!!!3#3#����@��@@�@@�����@��������!!!3#3#����@��@@@@�����@��������!!!3#3#����@��@@@@@�����@���������":I|�.'.'.#!"3!2654&''#5#!"&546303:321;6?>'&7#"&/.546?>327.#"326?>'7'.#"7.546?>32#"&'326?64'�-3')�!//!�!/�%
�)o	� 		MN�MN
�,��EH

,H
	

H,



H�+


GG+G	
G�3-/!��!//!p)'6)�
%��		`	�
����
G+G

G9+



G3�,



H3
H,

H	
H8���!!!3#����@��@@�����@�����!!!3#����@��@@�����@�����!!!3#3#3#����@��@@�@@�@@�����@�����������!!7!"3!26534&'��`��(88(�(8 ���`X��0�0�����8(�@(88(����`HX��0�0���!!!3#3#����@��@@@@�����@��������!!!3#����@��@@�����@�����!!!3#3#����@�@@@�@@�����@��������!!!3#����@��@@�����@�����!!!3#����@�@@@�����@�����!!!3#����@�@@�����@������[47>76767>76767>76767>763226323:323#"1
2  ##K((++.-^002
@))2
	9IO21<
	8A610f::K"5	@788l44/.++P$%"!334	C,-4;:.]���!!!#375!#3@���@������@@@@�������@��������!!!3#3#����@��@@�@@�����@��������!!!3#3#����@��@@�@@�����@��������!!!3#3#����@��@@�@@�����@�������� $(,048<.'.#"3267%>7>''!5!!5!!5!7!5!!5!7!5!�<&(R&2�5�		��!�������80��0��p��x0��X0x���(L !�5�W	��!]6������00p00���
	
%	7%	7��V�����g��g��g��g���������3�3�3�3����
%!!!@������ ���@��@�����3!26=4&#!"
�

�@
 �

�
���#!4&+"!"3!;265!26=4&�
�
��

`
�
`
@`

��
�
��

`
�
���!-48181!8181!5!"3!2654&##"&54632!537������&&�&&�8((88((8@��@�@�@&�&&&�(88((88�����������,=IP#54&#!";3!2654&#8181!81!"81!8181!81#"&54632!537@@&��&&@&�&&�&@��&�����8((88((8@��@�@@&&�&@&&&@��@&��`(88((88�����������-=J#54&#!";3!2654&#8181!81!"181!8181!81''7'77@@&��&&@&�&&�&@��&�����R��R��R��R��@@&&�&@&&&@��@&���R��R��R��R�����!!!!!3#''7'77�������� K��K��K��K�@�������KK��K��K��K����''!2#!"&5463%!"3!2654&#`�� 

��

@��(88(@(88(@��`�
�@

�
@8(�@(88(�(8���
'!!!%!!%!3#@@�����@����������@��@���@��������!!'!!'!!�@����.����9�P����[��I�w0P����!=%'3"327>7654'.'&"'.'&547>7632�Ӏ��j]^�((((�^]jj]^�((((�^]jPEFiiFEPPEFiiFE����((�^]jj]^�((((�^]jj]^�((��iFEPPEFiiFEPPEFi
���#'+/3!3#'3#'3#'3#!!#53#53#53#53#535!!5#53��������������������������������@�����@�������@�����������@@����'3";5353537327>7654'.'&"&54632�B;:W�{%@���S6B;:WW:;(88((88�W:;B�{�%@��S	
W:;BB;:W��8((88((8��@�##54&+"#"3!2654&%46;2!qO�Oq �\&�&� �OqqO�� ��&&�����#2#54&+"32#!"&5463!5463Oq�&�&���qO�qO��&&�� ��Oq����!9.'.'.#!"3!2654&''#5#!"&546303:321;�-3')�!//!�!/�%
�)�	� 		MN�MN
��3-/!��!//!p)'6)�
%��		`	�
���7@L.'.'.#!"3!2654&#!"&546303:321;326=4&'5##5##3353�-3')�!//!�

�p		MN�MN
�

�)%
�@�������3-/!��!/

	`	�
�

�)'�
%)����������!9GUc.'.'.#!"3!2654&''#5#!"&546303:321;!"&5463!2'!"&5463!2'!"&5463!2�-3')�!//!�!/�%
�)�	� 		MN�MN
�@

�

�@

�

�@

�
�3-/!��!//!p)'6)�
%��		`	�
�



�



�



����+3K%!575#"&546327.'.'.#!"3!2654&''#5#!"&546303:321;@����8((88((8V-3')�!//!�!/�%
�)�	� 		MN�MN
�@�@����(88((88�3-/!��!//!p)'6)�
%��		`	�
����#;c.'.'.#!"3!2654&'1'#5#!"&546303:321;..#"326=%.#"32654&'�-3')�!//!�!/�%
�)o	� 		MN�MN
���!5KK55K!5KK55K�3-/!��!//!p)'6)�
%��		`	�
G@�8((88(�3�8((88(@
����%=AE.'.'.#!"3!2654&'9'#51#!"&546303:321;!!%7'�-3')�!//!�!/�%
�)o	� 		MN�MN
�@��@���3-/!��!//!p)'6)�
%��		`	�
��������
����%=AEIMQUY]lp.'.'.#!"3!2654&'9'#51#!"&546303:321;3#;##3#;##3#;##3#;#;26=4&+5##5�-3')�!//!�!/�%
�)o	� 		MN�MN
��������������������������P����3-/!��!//!p)'6)�
%��		`	�
@@@@@@@@���@�@@����&/G'7'7'.'.'.#!"3!2654&'1'#5#!"&546303:321;�@��@��@��@��-3')�!//!�!/�%
�)o	� 		MN�MN
��@��@��@��@��3-/!��!//!p)'6)�
%��		`	�
����!<E]3#3#3#%3#"&546772#5>7.'.'.#!"3!2654&'1'#5#!"&546303:321;���������X:B^I7`B^��-3')�!//!�!/�%
�)o	� 		MN�MN
��@@@@@�7I^B:XC^B��3-/!��!//!p)'6)�
%��		`	�

����%=AEIMQUY.'.'.#!"3!2654&'9'#51#!"&546303:321;!#535#53#535#53#535#53�-3')�!//!�!/�%
�)o	� 		MN�MN
�@��@���������������3-/!��!//!p)'6)�
%��		`	�
��@����@����@����@����!!!%#35!#!35!��@�����e�@��e��@������e������ee�������$-4@LS[alw}�����"327>7654'.'&>73##>73!#53'5#'>7>7#>7#>73.'373#..'.'.'53'537.'3#7#.'%>7#>3.'.>73�cXW�%&&%�WXccXW�%&&%�WX��
p���
p�	���
&��&
�u�	���
�1��	�
&P&
���	Qp
�@`& :�{: &`)`& :y: &`�&%�WXccXW�%&&%�WXccXW�%&��A!!@@A!!@@!�@�+)R+�)��!@��@!!A��@��+)R+�)��!@�!A@!�,M)#F)M,#�
,M)#3)M,#���&*-354&+54&+"#"3!!781381#55!537#!!@
�&�&�

 ��������e�����
@&&@
��
��@@�@@�[e@�@���*59=373#35#335'54&+54&+"#"3!!81381#55!!!  @0�0@  @
�&�&�

 ���������@�@@@���
@&&@
��
��@@�@@�@@���!!����B��@@���'!!##5#53533@��@��������������@��������!"3!2654&%5%���&&�&&Z������@&��&&�&�.��.�c������
"&*.33'3#73#73#3#73#73#'3#%3##5%!!�@���� ``�``�@@�@@```�``�@@@@���@�����@@@@@`�`@@@@�`@`��@������
"&*.##7#5%!!3#73#73#3#73#73#'3#%3#@��������@��``�``�@@�@@```�``�@@@@@��������@���@@@@`�`@@@@�`@`���#'!!!";!32654&"&54632!!����&&��&&��%%%%%�����@&��&�&@&�%%%%�@@����
!!!'!'7�@����@ @�@��`�����@���@��@���`�������/"#7#47>7632#27>7654'.'&#`PEFi����J229922JJ229PEFiiFEP@iFEP��922JJ229922JniFEPPEFi����/23'34'.'&#"3"'.'&547>763�PEFi����J229922JJ229PEFiiFEP@iFEP��922JJ229922JniFEPPEFi���!!�@��@�����!)@��@������7So627'..#"7'&47%4&#"&7627>'>56&/"/732654&'%"'&4?'32676?'
Ee+r8L38Q=..�e��Q84M:y.�e�Fe.2Eu,�e�Fe/z;	K29PD2���Ee,-<P91J8s,�e�f+
1BP91K
:z.�e�F�9PD2.�e�Ff.x:N4��8s+�e�Fe./?P94M��Fe,u8J19P=-,�e����676&'&	6�+8UV�����qrF('@M[[�32����NN슉����5	5&&'&676@����VU8+i'(Frq�������23�[[Mr���NN���&M2#"'.'&5'47>763">!2#"'.'&5'47>763">�.))==))..))=##zRQ]@u-	I.))==))..))=##zRQ]@u-	=))..))==)). ]QRz##�0.
=))..))==)). ]QRz##�0.
���)7ES!!%!!#!!!#"3!26533!2654&#"&546;2#"&546;2#"&546;2@������x8���8**0*�*0**�����@

@
o���@@@���*��**x��**0*��



�



�@



����(D%'.>54'.'&#"326776&"'.'&547>7632��'+1iFEPPEFiiFEPG�2�K��5/.FF./55/.FF./Y�2�GPEFiiFEPPEFi1+'�KF./55/.FF./55/.F���
!7')'7''77'7�`��`����`�������`����`�����`�������`����`��`�`��`�����#'7''#'7377'7"&54632␈������␈������PppPPpp ����␈������␈�`pPPppPPp����$:&"';2677'764'#"&'.'.'%.=%�6�C��:

&$%**]214 �oC��(M%�� *��
�}���Co� 412]**%$&

ƀC�6�[
]�� ��%M(�}�.����	
-13!265#3#3#3#3#54&+"#"!54&!#53�&@&�@@�@@�@@�@@����@������&&�����@��@��@�@PPPP?����#',048<@DHLQUX]#3'3'/3#/3/3/!%'!%'!%'5!%5!%5!%5!%5!%5!%5!%53'53'53#=3'5-
��(���BHrZ/������1��a�����������������M�������^|#@���||�����8��;�u0                 ��������)%!!!!!!'#5#53#575#53#535#535#5�����������@@@�����������������@��2@�<2@��@@@@@���#/!!!!!!4632#"&4632#"&4632#"&������������K55KK55KK55KK55KK55KK55K������@5KK55KK��5KK55KK��5KK55KK���!!!!!!!!��@@��@����@@��@��@��@��@��@����!!!!!!@����������@�@���`�!!!!!!75'�������������@�@�@��@�����	#!!#3!265�``���8(@(8@`����������`(88(�����
@r67>'&7#"&/.546?>327.#"326?>''.#"7.546?>32#"&'326?64@
'<

'���
	�


	c
		
�	
A19�..c9:�*#A�c9:�*#A
	�


	c
		
�	
A19�.
<'

��'
	�
		
c	

	�	
A�.�-c�*u.Ac�*u.A
	�
		
c	

	�	
A�-����2eimquy}#"&/.546?>327.#"326?>''.#"7.546?>32#"&'326?64''773#3#'3#3#�
	�


	c
		
�	
A19�..c9:�*#A�c9:�*#A
	�	

	c
		
�	
A19�..��.�i@@�����.��@@��
	�
		
c	

	�	
A�-�-d�*u.Ac�*u.A
	�
		
c	

	�	
A�-�-��.��@��.�)��@���7C35'>54&#"13&'.'&'5#327>76=##"&54632�$$Q-,0��8HpPPpH8��0,-Q$$�,,�\\``\\�,,���%%%%��1{@Kb?PppP?bK@��1�@0BBx****xBB0@�%%%%���'Q|"327>767&'.'&2#"&546#"&'.'.'>7>732654&'&'.'&#">767>76325.'OII�88,,88�IIOOII�88,,88�II�%%%%a? "D##D" ?/U##U/2pPPp2/U##U()*+W--..--W+*),R%*a5&&'P*)**)*P'&&5a*%R,�C/0::0/CC/0::0/C�%%%%��A((A
6PppP6
A((A�9!m,II,m!9����+.#!.#"!"27%3267>'%>'�
��k

k��
j	
	j*
E

��

��
��
E�
���'Y"327>7654'.'&"&54632#"&=467>7>54&'.#"'.7>7>32j]^�((((�^]jj]^�((((�^]j%%%%O!#.'A#
(B$*M #K�((�^]jj]^�((((�^]jj]^�((��%%%%H
  -
0%#!9E(>D���7C"327>7654'.'&"'.'&547>7632##5#53533j]^�((((�^]jj]^�((((�^]jPEFiiFEPPEFiiFE��������((�^]jj]^�((((�^]jj]^�((��iFEPPEFiiFEPPEFi@��������7;"327>7654'.'&"'.'&547>7632!!j]^�((((�^]jj]^�((((�^]jPEFiiFEPPEFiiFE����((�^]jj]^�((((�^]jj]^�((��iFEPPEFiiFEPPEFi������S%81	81>76&/.81	81.'&81	817>781	816?>'.���7�	���	�7���	77	��77	���7�	���	�7���	���	'	`� ���@� �����}�'			7}Z���Z"��Z##Z���Z��"Z���Z"��Z#��
�''7'77
Z��Z��Z��Z��
Z��Z��Z��Z������
048>334&+"33#%5#";5#54&+326=4&#26#535#53	7��@&�&@��@�&&���&��&@�����`�R�`���&&�����@&��&@@``&�@&`&&ƀ@���@ F�.����@@���� ��@�@@��`��`�%��@``@�����@������73��@@����@��@��@�@@��@������#������@@@�`��@�����@��`���!B&'.'&#"347>7632!#"'.'&'7!7327>765z#+*`558j]^�((`! qLLV.,+O"#�`�&! qLLV.,+O"#����#+*`558j]^�((&+((�^]jVLLq !
	$ �`���VLLq !
	$ ����&+((�^]j���!	!3!5	5!#���������������������� �	 ���@ ������%	� ��  �� �	�  @�� ����	��� �������	!!� ����������	!!!�  � �� ����!! ����  � ����!!!����@������
!5!5!!'7�@�����@��@����`��������%@D%##7!"&'&47#"&5463!232#.#"326?37>'%7#@������	��

	��

]�		�		7�7	��LL�����	N

	��

n�

��		nn	�������%@C%##7!"&'&47#"&5463!232#.#"326?37>'%7@������	��

	��

]�		�		7�7	��LL����@	N

	��

���

��		nn	�������26%##7"&5#"&546;2#";#";2654&3#@�����
 

@
3�

��

�
�������@
`


��
�
�
�


�
@�����26%##7"&5#"&546;2#";#";2654&3#@�����
 

@
3�

��

�
�������
`


��

�
�


�
@����7'!5##3!3535#!@�@��@�������@��@@��@�����������@@������Eam�&'."'>'./.'&#&676776767>'&81'.'&67>7>"&54632&'81.'.7>76�! F""P�
��
�P""F !""F !��! F""�@44�


s44'| 0'��T'0��|''))K'��'K))Q$$6#$6 



��$$6$#6���C%!7!567>7654'.'&#"!!5&'.'&547>7632�@��1))<`@@II@@`<))1��@F;;U((�^]jj]^�((U;;F@���$$_88>PFFggFFP>88_$$��!)*l@@G]QRz####zRQ]G@@l*)���#53533##%!3!�������@����������������#3#73#%3#73#%3#!3!!#!������������� ��@ ���@@@@@@@@@@�@��������@������3#575#53#'#	373�����܈����������2@�<2@�n����������%3#575#53#'#	373�����܈���������22@�<2@�R���������"!#!!3!%3#'3#%3#73#%@����@��@���������������@���@����@�����@@@@@@@�����7!!!#!5!''7'77@����ѷ�����"��>��>��>��@���@�����>��>��>�����#'/37?CH3#73#%#535#53#73#%3#33#73#%#535#53#73#%3#3!!1!������@��@�@�������@��@�����@��@�@�������@������@�@@@@�@�@�@@@��@@��@@@@�@�@�@@@��@@@��������!####"'.'&547>76�����5/.FF./�������F./55/.F���"333335	5/.FF./5�������F./55/.F�������@���"333335	5/.FF./5������F./55/.F������������!!!!!!!!!!�����������@���@������!!!!!!!!!!�������������@���@������!!!!!!!!!!��������������@���@������!!!!!!!!!!�������@�@�@�@����!!!!!!!!!!����������������@�@�@�@������!!!!!!!!!!%�����������������@�@�@�@���������%	%'	7''@`@��`�`��@`��F�F�`@@`��`����`�i�@����KUbs����.'".'.'>706'4&/.+""3267>73267>7>'4&'>7>72.5063>7>71%#"&'>32.'.'.#!"3!2654&'1'#5#!"&546303:321;J
-#8

/

 ,8M2;�:,d"
��,"	#1

O	*3Y'�0 
Y-3')�!//!�!/�%
�)o	� 		MN�MN
�s


I)�
$lF ?3	9	RX

�8	83f*#40�K#7 5
�3-/!��!//!p)'6)�
%��		`	�
����*3K3##33#%.'.'.#!"3!2654&'1'#5#!"&546303:321;�,3BkM:oqmLDe��-3')�!//!�!/�%
�)o	� 		MN�MN
���>��>�/��\�3-/!��!//!p)'6)�
%��		`	�
����)2J#'#35#7377.'.'.#!"3!2654&'1'#5#!"&546303:321;�``����22o����-3')�!//!�!/�%
�)o	� 		MN�MN
�@����\K��3-/!��!//!p)'6)�
%��		`	�
��I�O4&/.#";;26=3265#!"'.'&54674&547>7632>32���
�n�
n<((-��5/.FPCP55=,**F1<VK_������.((;E/.5K} =56O

0!")V=(xL���79�N%_<��Ic'�Ic'��`�������`������I
(2<FPZdnx�������������",6@JT^hr|����&�p���8p��T��6v��
2���	$	N	�	�	�	�


,
P
tp���
.Jn���
J
t
�
�
�L����6��4t��.��8����x�v�d�.v���,z�
8�������X�<r�^>����  �!�!�"�"�#p#�$4$�$�$�$�%Z%p%�%�%�&*&P&^&l&z&�&�&�&�&�&�'b'�((h(�)l)�)�*6*`*�*�*�+f+�+�+�,,>,h,�,�,�-.*.�//x/���$�i9~Q
�		p	A	�	#	Y	
4�wfeditorwfeditorVersion 1.0Version 1.0wfeditorwfeditorwfeditorwfeditorRegularRegularwfeditorwfeditorFont generated by IcoMoon.Font generated by IcoMoon.fonts/fonts.css000060400000023602152456167170007555 0ustar00@font-face{font-family:wfeditor;src:url(../fonts/wfeditor.woff) format('woff');font-weight:400;font-style:normal}.uk-close:after,[class*=uk-icon-]{font-family:wfeditor;font-style:normal;font-weight:400;font-variant:normal;text-transform:none;line-height:1;-webkit-font-smoothing:antialiased;-moz-osx-font-smoothing:grayscale;font-size:1rem;vertical-align:middle}.uk-icon-xsmall{font-size:.5rem}.uk-icon-small{font-size:.75rem}.uk-icon-medium{font-size:1.25rem}.uk-icon-large{font-size:1.5rem}.uk-icon-bold:before,.uk-icon-italic:before,.uk-icon-strikethrough:before,.uk-icon-underline:before{font-family:"times new roman,times";font-size:1.25rem;line-height:1.25rem}.uk-icon-strikethrough:before{content:"S";text-decoration:line-through}.uk-icon-underline:before{content:"U";text-decoration:underline}.uk-icon-bold:before{content:"B";font-weight:800}.uk-icon-italic:before{content:"I";font-style:italic}.mce-toolbar .uk-icon-backcolor,.mce-toolbar .uk-icon-forecolor{line-height:1em}.uk-icon-backcolor:before,.uk-icon-forecolor:before{content:"A";font-family:"Helvetica Neue",Helvetica,Arial,sans-serif;font-size:1rem;font-weight:700}.uk-icon-selectall::before{content:"";padding:.5rem;display:inline-block;background-color:#eee;border:1px dashed #aaa}.uk-icon-style:after,.uk-icon-style:before{content:"A";font-weight:700}.uk-icon-style{position:relative}.uk-icon-style:before{font-family:"Helvetica Neue",Helvetica,Arial,sans-serif;font-size:.75em;position:absolute;top:0;left:0}.uk-icon-style:after{font-family:georgia,palatino,serif;font-size:1.25em;color:#666;font-style:italic;position:absolute;right:0;bottom:0}.uk-icon-code-search-matchcase:before,.uk-icon-code-search-regex:before,.uk-icon-code-search-wholeword:before{font-family:Tahoma,Arial,sans-serif;font-size:14px;line-height:1}.uk-icon-visualblocks:before{content:"P";font-size:.625rem;position:absolute;top:.375rem;left:.375rem;border:1px dashed #444;width:.75rem;height:.75rem;text-align:left;padding:.125rem;line-height:.5rem;color:#444;font-weight:700}.uk-icon-hashtag:before{content:"#";font-family:Tahoma,Arial,sans-serif;font-weight:700;line-height:2em}.uk-icon-microdata:before{content:"\ec1b"}.uk-icon-iframe:before{content:"\ead6"}.uk-icon-arrow-up:before{content:"\edcc"}.uk-icon-arrow-down:before{content:"\edd0"}.uk-icon-columns:before{content:"\e900"}.uk-icon-checkbox:before{content:"\e033"}.uk-icon-file-text:before,.uk-icon-file:before,.uk-icon-filemanager:before,.uk-icon-files:before{content:"\e9ad"}.uk-icon-file-aiff:before,.uk-icon-file-audio:before,.uk-icon-file-mp3:before,.uk-icon-file-oga:before,.uk-icon-file-wav:before,.uk-icon-file-wma:before{content:"\e9b1"}.uk-icon-file-avi:before,.uk-icon-file-m4v:before,.uk-icon-file-mov:before,.uk-icon-file-mp4:before,.uk-icon-file-ogg:before,.uk-icon-file-ogv:before,.uk-icon-file-video:before,.uk-icon-file-webm:before{content:"\e9b5"}.uk-icon-email:before{content:"\ea32"}.uk-icon-backward:before{content:"\ed88"}.uk-icon-forward:before{content:"\ed89"}.uk-icon-first:before{content:"\ed8a"}.uk-icon-last:before{content:"\ed8b"}.uk-icon-sort-alpha-asc:before{content:"\ee4c"}.uk-icon-sort-alpha-desc:before{content:"\ee4d"}.uk-icon-sort-numeric-asc:before{content:"\ee4e"}.uk-icon-sort-numeric-desc:before{content:"\ee4f"}.uk-icon-thumbnail-create:before,.uk-icon-thumbnail-delete:before,.uk-icon-thumbnail:before{content:"\e93e"}.uk-icon-upload:before{content:"\ec7f"}.uk-icon-star:before{content:"\ece2"}.uk-icon-remove:before{content:"\ed6d"}.uk-icon-remove-small:before{content:"\ed6e"}.uk-icon-folder-open:before{content:"\e930"}.uk-icon-home:before{content:"\e901"}.uk-icon-edit:before{content:"\e914"}.uk-icon-quill:before{content:"\e91b"}.uk-icon-image:before,.uk-icon-picture:before{content:"\e93c"}.uk-icon-file-media:before,.uk-icon-file-video:before,.uk-icon-film:before,.uk-icon-media:before{content:"\e95e"}.uk-icon-file-empty:before{content:"\e99d"}.uk-icon-file-plus:before{content:"\e9a1"}.uk-icon-file-apng:before,.uk-icon-file-avif:before,.uk-icon-file-bmp:before,.uk-icon-file-gif:before,.uk-icon-file-image:before,.uk-icon-file-jpeg:before,.uk-icon-file-jpg:before,.uk-icon-file-picture:before,.uk-icon-file-png:before,.uk-icon-file-svg:before,.uk-icon-file-tiff:before{content:"\e9af"}.uk-icon-file-gz:before,.uk-icon-file-rar:before,.uk-icon-file-tar:before,.uk-icon-file-zip:before{content:"\e9b9"}.uk-icon-file-xml:before{content:"\e9bb"}.uk-icon-file-ppt:before,.uk-icon-file-pptx:before,.uk-icon-file-presentation:before{content:"\e9bf"}.uk-icon-file-spreadsheet:before,.uk-icon-file-xls:before,.uk-icon-file-xlsx:before{content:"\e9c5"}.uk-icon-copy:before{content:"\e9c7"}.uk-icon-paste:before{content:"\e9ca"}.uk-icon-pastetext:before{content:"\e9cb"}.uk-icon-folder:before{content:"\e9db"}.uk-icon-folder-plus:before{content:"\e9df"}.uk-icon-print:before{content:"\ea66"}.uk-icon-undo:before{content:"\eabc"}.uk-icon-redo:before{content:"\eabd"}.uk-icon-blockquote:before{content:"\eb18"}.uk-icon-searchreplace:before{content:"\eb2b"}.uk-icon-search:before{content:"\eb33"}.uk-icon-fullscreen:before{content:"\eb3b"}.uk-icon-cog:before,.uk-icon-gear:before{content:"\eb63"}.uk-icon-cleanup:before{content:"\ebf8"}.uk-icon-trash:before{content:"\ebfa"}.uk-icon-numlist:before{content:"\ec55"}.uk-icon-bullist:before{content:"\ec57"}.uk-icon-grid:before{content:"\ec5f"}.uk-icon-list:before{content:"\ec6a"}.uk-icon-link:before{content:"\ec98"}.uk-icon-unlink:before{content:"\ec99"}.uk-icon-anchor:before{content:"\eca0"}.uk-icon-preview:before{content:"\ecb3"}.uk-icon-help:before{content:"\ed56"}.uk-icon-plus-circle:before{content:"\ed5c"}.uk-icon-minus-circle:before{content:"\ed5d"}.uk-close:after,.uk-icon-cancel:before,.uk-icon-close:before,.uk-icon-cross:before{content:"\ed69";font-size:.75em;line-height:1.25em}.uk-icon-check:before,.uk-icon-checkmark:before{content:"\ed6c"}.uk-icon-spellchecker:before{content:"\ed71"}.uk-icon-refresh:before{content:"\eda7"}.uk-icon-caret-up:before{content:"\edc4"}.uk-icon-caret-right:before{content:"\edc5"}.uk-icon-caret-down:before{content:"\edc6"}.uk-icon-caret-left:before{content:"\edc7"}.uk-icon-arrow-right:before{content:"\edcb"}.uk-icon-arrow-left:before{content:"\edcf"}.uk-icon-cut:before{content:"\ee83"}.uk-icon-charmap:before{content:"\ee9e"}.uk-icon-nonbreaking:before{content:"\eea0"}.uk-icon-readmore:before{content:"\eea2"}.uk-icon-superscript:before{content:"\eea3"}.uk-icon-subscript:before{content:"\eea4"}.uk-icon-pagebreak:before{content:"\eea9"}.uk-icon-removeformat:before{content:"\eeaa"}.uk-icon-template:before,.uk-icon-templatemanager:before{content:"\eead"}.uk-icon-visualchars:before{content:"\eeae"}.uk-icon-ltr:before{content:"\eeaf"}.uk-icon-rtl:before{content:"\eeb0"}.uk-icon-alignleft:before{content:"\eeb8"}.uk-icon-aligncenter:before{content:"\eeb9"}.uk-icon-alignright:before{content:"\eeba"}.uk-icon-alignjustify:before{content:"\eebb"}.uk-icon-indent:before{content:"\eebc"}.uk-icon-outdent:before{content:"\eebd"}.uk-icon-code:before{content:"\eeca"}.uk-icon-file-pdf:before{content:"\ef36"}.uk-icon-file-openoffice:before{content:"\ef37"}.uk-icon-file-word:before{content:"\ef38"}.uk-icon-file-excel:before{content:"\ef39"}.uk-icon-hr:before{content:"\e01c"}.uk-icon-emotions:before{content:"\e021"}.uk-icon-restoredraft:before{content:"\e028"}.uk-icon-resize:before{content:"\e032"}.uk-icon-table:before,.uk-icon-tableprops:before{content:"\e01b"}.uk-icon-tablerowprops:before{content:"\e604"}.uk-icon-tablecellprops:before{content:"\e605"}.uk-icon-table-2:before{content:"\e606"}.uk-icon-tablemergecells:before{content:"\e607"}.uk-icon-tableinsertcolbefore:before{content:"\e608"}.uk-icon-tableinsertcolafter:before{content:"\e609"}.uk-icon-tableinsertrowbefore:before{content:"\e60a"}.uk-icon-tableinsertrowafter:before{content:"\e60b"}.uk-icon-tablesplitcells:before{content:"\e60d"}.uk-icon-tabledelete:before{content:"\e60e"}.uk-icon-tableleftheader:before{content:"\e62a"}.uk-icon-tabletopheader:before{content:"\e62b"}.uk-icon-tabledeleterow:before{content:"\e800"}.uk-icon-tabledeletecol:before{content:"\e801"}.uk-icon-drag:before{content:"\e908"}.uk-icon-minus:before{content:"\e939"}.uk-icon-plus:before{content:"\e93a"}.uk-icon-rotateleft:before{content:"\eaa8"}.uk-icon-rotateright:before{content:"\eaa9"}.uk-icon-flipv:before{content:"\eaaa"}.uk-icon-fliph:before{content:"\eaac"}.uk-icon-crop:before{content:"\ee78"}.uk-icon-save:before{content:"\e000"}.uk-icon-tag:before{content:"\e013"}.uk-icon-cloud-upload:before{content:"\f0ee"}.uk-icon-lightbox:before{content:"\eecb"}.uk-icon-lightbulb:before{content:"\ebfb";border:1px solid #bbb;padding:1px;margin:-1px 0 0 -2px}.uk-icon-loop:before{content:"\eda8"}.uk-icon-exchange:before{content:"\ee46"}.uk-icon-cross-small:before{content:"\ed6f"}.uk-icon-thumbnail-remove:before{content:"\e93f"}.uk-icon-caption-add:before{content:"\e942"}.uk-icon-caption-delete:before{content:"\e940"}.uk-icon-multiple-images:before{content:"\e943"}.uk-icon-lock:before{content:"\e98f"}.uk-icon-unlocked:before{content:"\e990"}.uk-icon-code-highlight:before{content:"\e924"}.uk-icon-code-linenumbers:before{content:"\ec55"}.uk-icon-code-search-next:before{content:"\edcb"}.uk-icon-code-search-previous:before{content:"\edcf"}.uk-icon-code-format:before{content:"\eebc"}.uk-icon-code-replace-all:before{content:"\eda8"}.uk-icon-code-replace:before{content:"\ee46"}.uk-icon-code-wrap:before{content:"\e902"}.uk-icon-key:before{content:"\e98d"}.uk-icon-code-search-regex:before{content:".*";font-weight:700}.uk-icon-code-search-matchcase:before{content:"Aa"}.uk-icon-code-search-wholeword:before{content:"ab";text-decoration:underline}.uk-icon-spinner::before{content:"";border:.25rem solid rgba(0,0,0,.1);border-left-color:#888;border-radius:50%;width:1.25em;height:1.25em;animation:donut-spin 1.2s linear infinite;box-sizing:border-box;display:inline-block;vertical-align:middle;line-height:1}@keyframes donut-spin{0%{transform:rotate(0)}100%{transform:rotate(360deg)}}@keyframes pulsate{0%{transform:scale(.1);opacity:0}50%{opacity:.8}100%{transform:scale(1.2);opacity:0}}.uk-close:after{font-size:.75em}tinymce/tinymce.popup.js000060400000010471152456167170011401 0ustar00/* This file includes original and modified code from various versions of TinyMCE, relicensed under GPL v2+ per LGPL 2.1 §3 where applicable. Source: https://github.com/widgetfactory/tinymce-muon; Copyright (c) Tiny Technologies, Inc. All rights reserved.; Copyright (c) 1999–2015 Ephox Corp. All rights reserved.; Copyright (c) 2009       Moxiecode Systems AB. All rights reserved.; Copyright (c) 2009–2025  Ryan Demmer. All rights reserved.; For a detailed history of modifications, refer to the Git commit history.; Licensed under the GNU General Public License version 2 or later (GPL v2+): https://www.gnu.org/licenses/gpl-2.0.html */
var tinymce, tinyMCEPopup = {
    init: function() {
        var self = this, win = this.getWin();
        tinymce = tinyMCE = win.tinymce, this.editor = tinymce.EditorManager.activeEditor, 
        this.params = this.editor.windowManager.params, this.features = this.editor.windowManager.features, 
        this.dom = this.editor.windowManager.createInstance("tinymce.dom.DOMUtils", document, {
            ownEvents: !0,
            proxy: tinyMCEPopup._eventProxy
        }), this.dom.bind(window, "ready", this._onDOMLoaded, this), this.listeners = [], 
        this.onInit = {
            add: function(fn, scope) {
                self.listeners.push({
                    func: fn,
                    scope: scope
                });
            }
        }, this.isWindow = !1, this.id = this.getWindowArg("mce_window_id"), this.editor.windowManager.onOpen.dispatch(this.editor.windowManager, window);
    },
    getWin: function() {
        return !window.frameElement && window.dialogArguments || opener || parent || top;
    },
    getWindowArg: function(name, defaultValue) {
        return name = this.params[name], tinymce.is(name) ? name : defaultValue;
    },
    getParam: function(name, defaultValue) {
        return this.editor.getParam(name, defaultValue);
    },
    getLang: function(name, defaultValue) {
        return this.editor.getLang(name, defaultValue);
    },
    execCommand: function(cmd, ui, val, a) {
        return (a = a || {}).skip_focus = 1, this.restoreSelection(), this.editor.execCommand(cmd, ui, val, a);
    },
    resizeToInnerSize: function() {},
    storeSelection: function() {
        this.editor.windowManager.bookmark = tinyMCEPopup.editor.selection.getBookmark(1);
    },
    restoreSelection: function() {
        !this.isWindow && tinymce.isIE && this.editor.selection.moveToBookmark(this.editor.windowManager.bookmark);
    },
    pickColor: function(e, element_id) {
        this.execCommand("mceColorPicker", !0, {
            color: document.getElementById(element_id).value,
            func: function(color) {
                document.getElementById(element_id).value = color;
                try {
                    document.getElementById(element_id).onchange();
                } catch (ex) {}
            }
        });
    },
    openBrowser: function(args) {
        tinyMCEPopup.restoreSelection(), this.editor.execCallback("file_browser_callback", args, window);
    },
    confirm: function(title, callback, scope) {
        this.editor.windowManager.confirm(title, callback, scope, window);
    },
    alert: function(title, callback, scope) {
        this.editor.windowManager.alert(title, callback, scope, window);
    },
    close: function() {
        this.editor && (this.editor.windowManager.close(window), tinymce = tinyMCE = this.editor = this.params = this.dom = this.dom.doc = null);
    },
    _restoreSelection: function(e) {
        "INPUT" != (e = e && e.target).nodeName || "submit" != e.type && "button" != e.type || tinyMCEPopup.restoreSelection();
    },
    _onDOMLoaded: function() {
        var editor = this.editor, dom = this.dom, title = document.title;
        document.body.style.display = "", this.restoreSelection(), this.resizeToInnerSize(), 
        this.isWindow ? window.focus() : editor.windowManager.setTitle(window, title), 
        tinymce.isIE || this.isWindow || dom.bind(document, "focus", function() {
            editor.windowManager.focus(this.id);
        }), tinymce.each(this.listeners, function(o) {
            o.func.call(o.scope, editor);
        }), window.focus();
    },
    _eventProxy: function(id) {
        return function(evt) {
            tinyMCEPopup.dom.events.callNativeHandler(id, evt);
        };
    }
};

tinyMCEPopup.init();tinymce/tinymce.js000060400003641457152456167170010260 0ustar00/* This file includes original and modified code from various versions of TinyMCE, relicensed under GPL v2+ per LGPL 2.1 §3 where applicable. Source: https://github.com/widgetfactory/tinymce-muon; Copyright (c) Tiny Technologies, Inc. All rights reserved.; Copyright (c) 1999–2015 Ephox Corp. All rights reserved.; Copyright (c) 2009       Moxiecode Systems AB. All rights reserved.; Copyright (c) 2009–2025  Ryan Demmer. All rights reserved.; For a detailed history of modifications, refer to the Git commit history.; Licensed under the GNU General Public License version 2 or later (GPL v2+): https://www.gnu.org/licenses/gpl-2.0.html */
!function() {
    "use strict";
    !function(win) {
        var whiteSpaceRe = /^\s*|\s*$/g, slice = [].slice, tinymce = {
            _init: function() {
                var i, nl, base, p, v, self = this, doc = document;
                for (self.suffix = "", nl = doc.getElementsByTagName("base"), i = 0; i < nl.length; i++) (v = nl[i].href) && (/^https?:\/\/[^\/]+$/.test(v) && (v += "/"), 
                base = v ? v.match(/.*\//)[0] : "");
                function getBase(n) {
                    return n.src && /tinymce(|_gzip|_jquery|_prototype|_full)(_dev|_src)?.js/.test(n.src) && (/_(src|dev)\.js/g.test(n.src) && (self.suffix = "_src"), 
                    -1 != (p = n.src.indexOf("?")) && (self.query = n.src.substring(p + 1)), 
                    self.baseURL = n.src.substring(0, n.src.lastIndexOf("/")), base && -1 == self.baseURL.indexOf("://") && 0 !== self.baseURL.indexOf("/") && (self.baseURL = base + self.baseURL), 
                    self.baseURL);
                }
                for (nl = doc.getElementsByTagName("script"), i = 0; i < nl.length; i++) if (getBase(nl[i])) return;
                if (doc = doc.getElementsByTagName("head")[0]) for (nl = doc.getElementsByTagName("script"), 
                i = 0; i < nl.length; i++) if (getBase(nl[i])) return;
            },
            is: function(o, t) {
                return t ? !("array" != t || !tinymce.isArray(o)) || typeof o == t : void 0 !== o;
            },
            isArray: Array.isArray || function(obj) {
                return "[object Array]" === Object.prototype.toString.call(obj);
            },
            makeMap: function(items, delim, map) {
                var i;
                for (delim = delim || ",", map = map || {}, i = (items = "string" == typeof (items = items || []) ? items.split(delim) : items).length; i--; ) map[items[i]] = {};
                return map;
            },
            each: function(o, cb, s) {
                var n, l;
                if (!o) return 0;
                if (s = s || o, void 0 !== o.length) {
                    for (n = 0, l = o.length; n < l; n++) if (!1 === cb.call(s, o[n], n, o)) return 0;
                } else for (n in o) if (o.hasOwnProperty(n) && !1 === cb.call(s, o[n], n, o)) return 0;
                return 1;
            },
            map: function(a, f) {
                var o = [];
                return tinymce.each(a, function(v) {
                    o.push(f(v));
                }), o;
            },
            grep: function(a, f) {
                var o = [];
                return tinymce.each(a, function(v) {
                    f && !f(v) || o.push(v);
                }), o;
            },
            inArray: function(a, v) {
                var i, l;
                if (a) for (i = 0, l = a.length; i < l; i++) if (a[i] === v) return i;
                return -1;
            },
            toArray: function(obj) {
                var i, l, array = obj;
                if (!tinymce.isArray(obj)) for (array = [], i = 0, l = obj.length; i < l; i++) array[i] = obj[i];
                return array;
            },
            extend: function(obj, ext) {
                for (var name, value, args = arguments, i = 1, l = args.length; i < l; i++) for (name in ext = args[i]) ext.hasOwnProperty(name) && void 0 !== (value = ext[name]) && (obj[name] = value);
                return obj;
            },
            trim: function(s) {
                return (s ? "" + s : "").replace(whiteSpaceRe, "");
            },
            create: function(s, p, root) {
                var sp, ns, cn, scn, c, de = 0;
                s = /^((static) )?([\w.]+)(:([\w.]+))?/.exec(s), cn = s[3].match(/(^|\.)(\w+)$/i)[2], 
                (ns = this.createNS(s[3].replace(/\.\w+$/, ""), root))[cn] || ("static" == s[2] ? (ns[cn] = p, 
                this.onCreate && this.onCreate(s[2], s[3], ns[cn])) : (p[cn] || (p[cn] = function() {}, 
                de = 1), ns[cn] = p[cn], this.extend(ns[cn].prototype, p), s[5] && (sp = this.resolve(s[5]).prototype, 
                scn = s[5].match(/\.(\w+)$/i)[1], c = ns[cn], ns[cn] = de ? function() {
                    return sp[scn].apply(this, arguments);
                } : function() {
                    return this._super = sp[scn], c.apply(this, arguments);
                }, ns[cn].prototype[cn] = ns[cn], this.each(sp, function(f, n) {
                    ns[cn].prototype[n] = sp[n];
                }), this.each(p, function(f, n) {
                    sp[n] ? ns[cn].prototype[n] = function() {
                        return this._super = sp[n], f.apply(this, arguments);
                    } : n != cn && (ns[cn].prototype[n] = f);
                })), this.each(p.static, function(f, n) {
                    ns[cn][n] = f;
                })));
            },
            walk: function(o, f, n, s) {
                s = s || this, o && (n && (o = o[n]), tinymce.each(o, function(o, i) {
                    if (!1 === f.call(s, o, i, n)) return !1;
                    tinymce.walk(o, f, n, s);
                }));
            },
            createNS: function(n, o) {
                var i, v;
                for (o = o || win, n = n.split("."), i = 0; i < n.length; i++) o[v = n[i]] || (o[v] = {}), 
                o = o[v];
                return o;
            },
            resolve: function(n, o) {
                var i, l;
                for (o = o || win, i = 0, l = (n = n.split(".")).length; i < l && (o = o[n[i]]); i++);
                return o;
            },
            addUnload: function(f, s) {
                var unload;
                function fakeUnload() {
                    var doc = document;
                    function stop() {
                        doc.detachEvent("onstop", stop), unload && unload(), doc = 0;
                    }
                    "interactive" == doc.readyState && (doc && doc.attachEvent("onstop", stop), 
                    win.setTimeout(function() {
                        doc && doc.detachEvent("onstop", stop);
                    }, 0));
                }
                return unload = function() {
                    var o, n, li = self.unloads;
                    if (li) {
                        for (n in li) (o = li[n]) && o.func && o.func.call(o.scope, 1);
                        win.detachEvent ? (win.detachEvent("onbeforeunload", fakeUnload), 
                        win.detachEvent("onunload", unload)) : win.removeEventListener && win.removeEventListener("unload", unload, !1), 
                        self.unloads = o = li = unload = 0, win.CollectGarbage && CollectGarbage();
                    }
                }, f = {
                    func: f,
                    scope: s || this
                }, self.unloads ? self.unloads.push(f) : (win.attachEvent ? (win.attachEvent("onunload", unload), 
                win.attachEvent("onbeforeunload", fakeUnload)) : win.addEventListener && win.addEventListener("unload", unload, !1), 
                self.unloads = [ f ]), f;
            },
            removeUnload: function(f) {
                var u = this.unloads, r = null;
                return tinymce.each(u, function(o, i) {
                    if (o && o.func == f) return u.splice(i, 1), r = f, !1;
                }), r;
            },
            explode: function(s, d) {
                return !s || tinymce.is(s, "array") ? s : tinymce.map(s.split(d || ","), tinymce.trim);
            },
            curry: function(fn) {
                var args = slice.call(arguments);
                return args.length - 1 >= fn.length ? fn.apply(this, args.slice(1)) : function() {
                    var tempArgs = args.concat([].slice.call(arguments));
                    return tinymce.curry.apply(this, tempArgs);
                };
            },
            _addVer: function(u) {
                var v;
                return this.query ? (v = (-1 == u.indexOf("?") ? "?" : "&") + this.query, 
                -1 == u.indexOf("#") ? u + v : u.replace("#", v + "#")) : u;
            }
        };
        tinymce._init(), (win.tinymce = win.tinyMCE = tinymce).dom = {}, tinymce.geom = {}, 
        tinymce.text = {}, tinymce.caret = {}, tinymce.clipboard = {}, tinymce.html = {}, 
        tinymce.ui = {}, tinymce.util = {}, tinymce.file = {}, tinymce.plugins = {};
    }(window);
    var userAgent = (nav = navigator).userAgent;
    function matchMediaQuery(query) {
        return "matchMedia" in window && matchMedia(query).matches;
    }
    var func, isTouchEnabled = 1 < navigator.maxTouchPoints, opera = window.opera && window.opera.buildNumber, android = /Android/.test(userAgent), nav = !(webkit = /WebKit/.test(userAgent)) && !opera && /MSIE/gi.test(userAgent) && /Explorer/gi.test(nav.appName) && /MSIE (\w+)\./.exec(userAgent)[1] && !webkit, gecko = !webkit && !nav && /Gecko/.test(userAgent), mac = -1 != userAgent.indexOf("Mac"), isIOS = /(iPad|iPhone)/.test(userAgent) || (isIOS = /iPad/.test(userAgent), 
    hasMacLikeUserAgent = /Macintosh/.test(userAgent), isIOS) || isTouchEnabled && hasMacLikeUserAgent, hasMacLikeUserAgent = "FormData" in window && "FileReader" in window && "URL" in window && !!URL.createObjectURL, phone = matchMediaQuery("only screen and (max-device-width: 480px)") && (android || isIOS), tablet = matchMediaQuery("only screen and (min-width: 800px)") && (android || isIOS), windowsPhone = -1 != userAgent.indexOf("Windows Phone"), contentEditable = !isIOS || hasMacLikeUserAgent || 534 <= userAgent.match(/AppleWebKit\/(\d*)/)[1], count = (tinymce.util.Env = {
        opera: opera,
        webkit: webkit,
        ie: nav,
        gecko: gecko,
        mac: mac,
        ios: isIOS,
        android: android,
        contentEditable: contentEditable,
        transparentSrc: "data:image/gif;base64,R0lGODlhAQABAIAAAAAAAP///yH5BAEAAAAALAAAAAABAAEAAAIBRAA7",
        caretAfter: !0,
        range: window.getSelection && "Range" in window,
        fileApi: hasMacLikeUserAgent,
        ceFalse: !0,
        canHaveCSP: !0,
        desktop: !phone && !tablet,
        windowsPhone: windowsPhone,
        touchEnabled: isTouchEnabled
    }, tinymce.isOpera = opera, tinymce.isWebKit = webkit, tinymce.isIE = nav, tinymce.isIE11 = nav && /Trident\/7.0/.test(userAgent) && /rv:11.0/.test(userAgent), 
    tinymce.isIE12 = -1 != userAgent.indexOf("Edge/") && !nav && 12, tinymce.isIE12 && (tinymce.isWebKit = !1), 
    tinymce.isGecko = gecko, tinymce.isMac = mac, tinymce.isIDevice = isIOS, tinymce.isAndroid = android, 
    tinymce.isIOS = isIOS, tinymce.isIOS5 = isIOS && 534 <= userAgent.match(/AppleWebKit\/(\d*)/)[1], 
    tinymce.touchEnabled = isTouchEnabled, 0), Arr = (tinymce.util.Uuid = {
        uuid: function(prefix) {
            return prefix + count++ + ("s" + new Date().getTime().toString(36) + rnd() + rnd() + rnd());
            function rnd() {
                return Math.round(4294967295 * Math.random()).toString(36);
            }
        }
    }, function(tinymce) {
        var requestAnimationFramePromise;
        function wrappedSetTimeout(callback, time) {
            return "number" != typeof time && (time = 0), setTimeout(callback, time);
        }
        function wrappedSetInterval(callback, time) {
            return "number" != typeof time && (time = 1), setInterval(callback, time);
        }
        function debounce(callback, time) {
            function func() {
                var args = arguments;
                clearTimeout(timer), timer = wrappedSetTimeout(function() {
                    callback.apply(this, args);
                }, time);
            }
            var timer;
            return func.stop = function() {
                clearTimeout(timer);
            }, func;
        }
        tinymce.util.Delay = {
            requestAnimationFrame: function(callback, element) {
                requestAnimationFramePromise ? requestAnimationFramePromise.then(callback) : requestAnimationFramePromise = new Promise(function(resolve) {
                    !function(callback, element) {
                        for (var requestAnimationFrameFunc = window.requestAnimationFrame, vendors = [ "ms", "moz", "webkit" ], i = 0; i < vendors.length && !requestAnimationFrameFunc; i++) requestAnimationFrameFunc = window[vendors[i] + "RequestAnimationFrame"];
                        (requestAnimationFrameFunc = requestAnimationFrameFunc || function(callback) {
                            window.setTimeout(callback, 0);
                        })(callback, element);
                    }(resolve, element = element || document.body);
                }).then(callback);
            },
            setTimeout: wrappedSetTimeout,
            setInterval: wrappedSetInterval,
            setEditorTimeout: function(editor, callback, time) {
                return wrappedSetTimeout(function() {
                    editor.removed || callback();
                }, time);
            },
            setEditorInterval: function(editor, callback, time) {
                var timer = wrappedSetInterval(function() {
                    editor.removed ? clearInterval(timer) : callback();
                }, time);
                return timer;
            },
            debounce: debounce,
            throttle: debounce,
            clearInterval: function(id) {
                return clearInterval(id);
            },
            clearTimeout: function(id) {
                return clearTimeout(id);
            }
        };
    }(tinymce), tinymce.util.Dispatcher = function(scope) {
        this.scope = scope || this, this.listeners = [], this.inDispatch = !1;
    }, tinymce.util.Dispatcher.prototype = {
        add: function(callback, scope) {
            return this.listeners.push({
                cb: callback,
                scope: scope || this.scope
            }), callback;
        },
        addToTop: function(callback, scope) {
            return scope = {
                cb: callback,
                scope: scope || this.scope
            }, this.inDispatch ? this.listeners = [ scope ].concat(this.listeners) : this.listeners.unshift(scope), 
            callback;
        },
        remove: function(callback) {
            var listeners = this.listeners, output = null;
            return tinymce.each(listeners, function(listener, i) {
                if (callback == listener.cb) return output = listener, listeners.splice(i, 1), 
                !1;
            }), output;
        },
        dispatch: function() {
            var returnValue, i, listener, args = arguments, listeners = this.listeners;
            for (this.inDispatch = !0, i = 0; i < listeners.length && !1 !== (returnValue = (listener = listeners[i]).cb.apply(listener.scope, 0 < args.length ? args : [ listener.scope ])); i++);
            return this.inDispatch = !1, returnValue;
        }
    }, function(tinymce) {
        var each = tinymce.each, trim = tinymce.trim, queryParts = "source protocol authority userInfo user password host port relative path directory file query anchor".split(" "), DEFAULT_PORTS = {
            ftp: 21,
            http: 80,
            https: 443,
            mailto: 25
        }, safeSvgDataUrlElements = [ "img", "video" ];
        tinymce.util.URI = function(url, settings) {
            var baseUri, base_url, isProtocolRelative, self = this;
            url = trim(url), baseUri = (settings = self.settings = settings || {}).base_uri, 
            /^([\w\-]+):([^\/]{2})/i.test(url) || /^\s*#/.test(url) ? self.source = url : (isProtocolRelative = 0 === url.indexOf("//"), 
            0 !== url.indexOf("/") || isProtocolRelative || (url = (baseUri && baseUri.protocol || "http") + "://mce_host" + url), 
            /^[\w\-]*:?\/\//.test(url) || (base_url = settings.base_uri ? settings.base_uri.path : new tinymce.util.URI(location.href).directory, 
            url = "" === settings.base_uri.protocol ? "//mce_host" + self.toAbsPath(base_url, url) : (url = /([^#?]*)([#?]?.*)/.exec(url), 
            (baseUri && baseUri.protocol || "http") + "://mce_host" + self.toAbsPath(base_url, url[1]) + url[2])), 
            url = url.replace(/@@/g, "(mce_at)"), url = /^(?:(?![^:@]+:[^:@\/]*@)([^:\/?#.]+):)?(?:\/\/)?((?:(([^:@\/]*):?([^:@\/]*))?@)?([^:\/?#]*)(?::(\d*))?)(((\/(?:[^?#](?![^?#\/]*\.[^?#\/.]+(?:[?#]|$)))*\/?)?([^?#\/]*))(?:\?([^#]*))?(?:#(.*))?)/.exec(url), 
            each(queryParts, function(v, i) {
                i = (i = url[i]) && i.replace(/\(mce_at\)/g, "@@"), self[v] = i;
            }), baseUri && (self.protocol || (self.protocol = baseUri.protocol), 
            self.userInfo || (self.userInfo = baseUri.userInfo), self.port || "mce_host" !== self.host || (self.port = baseUri.port), 
            self.host && "mce_host" !== self.host || (self.host = baseUri.host), 
            self.source = ""), isProtocolRelative && (self.protocol = ""));
        }, tinymce.util.URI.prototype = {
            setPath: function(path) {
                path = /^(.*?)\/?(\w+)?$/.exec(path), this.path = path[0], this.directory = path[1], 
                this.file = path[2], this.source = "", this.getURI();
            },
            toRelative: function(uri) {
                var tu, uu;
                return "./" === uri ? uri : "mce_host" != (uri = new tinymce.util.URI(uri, {
                    base_uri: this
                })).host && this.host != uri.host && uri.host || this.port != uri.port || this.protocol != uri.protocol && "" !== uri.protocol ? uri.getURI() : (tu = this.getURI()) == (uu = uri.getURI()) || "/" == tu.charAt(tu.length - 1) && tu.substr(0, tu.length - 1) == uu ? tu : (uu = this.toRelPath(this.path, uri.path), 
                uri.query && (uu += "?" + uri.query), uri.anchor && (uu += "#" + uri.anchor), 
                uu);
            },
            toAbsolute: function(uri, noHost) {
                return (uri = new tinymce.util.URI(uri, {
                    base_uri: this
                })).getURI(noHost && this.isSameOrigin(uri));
            },
            isSameOrigin: function(uri) {
                if (this.host == uri.host && this.protocol == uri.protocol) {
                    if (this.port == uri.port) return !0;
                    var defaultPort = DEFAULT_PORTS[this.protocol];
                    if (defaultPort && (this.port || defaultPort) == (uri.port || defaultPort)) return !0;
                }
                return !1;
            },
            toRelPath: function(base, path) {
                var items, i, l, breakPoint = 0, out = "";
                if (base = (base = base.substring(0, base.lastIndexOf("/"))).split("/"), 
                items = path.split("/"), base.length >= items.length) for (i = 0, 
                l = base.length; i < l; i++) if (i >= items.length || base[i] != items[i]) {
                    breakPoint = i + 1;
                    break;
                }
                if (base.length < items.length) for (i = 0, l = items.length; i < l; i++) if (i >= base.length || base[i] != items[i]) {
                    breakPoint = i + 1;
                    break;
                }
                if (1 === breakPoint) return path;
                for (i = 0, l = base.length - (breakPoint - 1); i < l; i++) out += "../";
                for (i = breakPoint - 1, l = items.length; i < l; i++) out += i != breakPoint - 1 ? "/" + items[i] : items[i];
                return out;
            },
            toAbsPath: function(base, path) {
                var i, nb = 0, o = [], tr = /\/$/.test(path) ? "/" : "";
                for (base = base.split("/"), path = path.split("/"), each(base, function(k) {
                    k && o.push(k);
                }), base = o, i = path.length - 1, o = []; 0 <= i; i--) 0 !== path[i].length && "." !== path[i] && (".." === path[i] ? nb++ : 0 < nb ? nb-- : o.push(path[i]));
                return 0 !== (base = (i = base.length - nb) <= 0 ? o.reverse().join("/") : base.slice(0, i).join("/") + "/" + o.reverse().join("/")).indexOf("/") && (base = "/" + base), 
                tr && base.lastIndexOf("/") !== base.length - 1 && (base += tr), 
                base;
            },
            getURI: function(noProtoHost) {
                var s;
                return this.source && !noProtoHost || (s = "", noProtoHost || (this.protocol ? s += this.protocol + "://" : s += "//", 
                this.userInfo && (s += this.userInfo + "@"), this.host && (s += this.host), 
                this.port && (s += ":" + this.port)), this.path && (s += this.path), 
                this.query && (s += "?" + this.query), this.anchor && (s += "#" + this.anchor), 
                this.source = s), this.source;
            }
        }, tinymce.util.URI.parseDataUri = function(uri) {
            var type, matches;
            return uri = decodeURIComponent(uri).split(","), {
                type: type = (matches = /data:([^;]+)/.exec(uri[0])) ? matches[1] : type,
                data: uri[1]
            };
        }, tinymce.util.URI.getDocumentBaseUrl = function(loc) {
            return loc = 0 !== loc.protocol.indexOf("http") && "file:" !== loc.protocol ? loc.href : loc.protocol + "//" + loc.host + loc.pathname, 
            /^[^:]+:\/\/\/?[^\/]+\//.test(loc) && (loc = loc.replace(/[\?#].*$/, "").replace(/[\/\\][^\/]+$/, ""), 
            /[\/\\]$/.test(loc) || (loc += "/")), loc;
        }, tinymce.util.URI.isDomSafe = function(uri, context, options) {
            if (options.allow_script_urls) return !0;
            {
                let decodedUri = tinymce.html.Entities.decode(uri).replace(/[\s\u0000-\u001F]+/g, "");
                try {
                    decodedUri = decodeURIComponent(decodedUri);
                } catch (ex) {
                    decodedUri = unescape(decodedUri);
                }
                return !/((java|vb)script|mhtml):/i.test(decodedUri) && !function(settings, uri, tagName) {
                    return uri = function(encodedUri) {
                        try {
                            return decodeURIComponent(encodedUri);
                        } catch (ex) {
                            return unescape(encodedUri);
                        }
                    }(uri).replace(/\s/g, ""), !settings.allow_script_urls && (/((java|vb)script|mhtml):/i.test(uri) || !settings.allow_html_data_urls && (/^data:image\//i.test(uri) ? function(allowSvgDataUrls, tagName) {
                        return null != allowSvgDataUrls ? !allowSvgDataUrls : null == tagName || -1 == tinymce.inArray(safeSvgDataUrlElements, tagName);
                    }(settings.allow_svg_data_urls, tagName) && /^data:image\/svg\+xml/i.test(uri) : /^data:/i.test(uri)));
                }(options, decodedUri, context);
            }
        };
    }(tinymce), function(tinymce) {
        tinymce.util.Storage = {
            getHash: function(n) {
                var h;
                if (n = this.get(n)) try {
                    h = JSON.parse(n);
                } catch (e) {}
                return h;
            },
            setHash: function(n, v) {
                this.set(n, JSON.stringify(v));
            },
            get: function(n, s) {
                return window.sessionStorage ? (n = sessionStorage.getItem(n), tinymce.is(n) && null != n ? "true" === n || "false" !== n && ("null" === n ? null : n) : s) : null;
            },
            set: function(n, v) {
                window.sessionStorage && sessionStorage.setItem(n, v);
            }
        }, tinymce.util.Cookie = {
            getHash: function(n) {
                return tinymce.util.Storage.getHash(n);
            },
            setHash: function(n, v) {
                return tinymce.util.Storage.setHash(n, v);
            },
            get: function(n, s) {
                return tinymce.util.Storage.get(n, s);
            },
            set: function(n, v) {
                return tinymce.util.Storage.set(n, v);
            }
        };
    }(tinymce), function(tinymce) {
        tinymce.util.JSON = {
            serialize: function(obj) {
                try {
                    return JSON.stringify(obj);
                } catch (ex) {}
            },
            parse: function(str) {
                try {
                    return JSON.parse(str);
                } catch (ex) {}
            }
        };
    }(tinymce), tinymce.util.JSOP = {
        callbacks: {},
        count: 0,
        send: function(o) {
            var self = this, dom = tinymce.DOM, count = (void 0 !== o.count ? o : this).count, id = "tinymce_jsonp_" + count;
            this.callbacks[count] = function(json) {
                dom.remove(id), delete self.callbacks[count], o.callback(json);
            }, dom.add(dom.doc.body, "script", {
                id: id,
                src: o.url,
                type: "text/javascript"
            }), this.count++;
        }
    }, tinymce.util.XHR = {
        send: function(o) {
            var xhr, c = 0;
            function ready() {
                !o.async || 4 == xhr.readyState || 1e4 < c++ ? (o.success && c < 1e4 && 200 == xhr.status ? o.success.call(o.success_scope, "" + xhr.responseText, xhr, o) : o.error && o.error.call(o.error_scope, 1e4 < c ? "TIMED_OUT" : "GENERAL", xhr, o), 
                xhr = null) : window.setTimeout(ready, 10);
            }
            if (o.scope = o.scope || this, o.success_scope = o.success_scope || o.scope, 
            o.error_scope = o.error_scope || o.scope, o.async = !1 !== o.async, 
            o.data = o.data || "", xhr = new XMLHttpRequest()) {
                if (xhr.overrideMimeType && xhr.overrideMimeType(o.content_type), 
                xhr.open(o.type || (o.data ? "POST" : "GET"), o.url, o.async), o.content_type && xhr.setRequestHeader("Content-Type", o.content_type), 
                xhr.setRequestHeader("X-Requested-With", "XMLHttpRequest"), xhr.send(o.data), 
                !o.async) return ready();
                window.setTimeout(ready, 10);
            }
        }
    }, function(tinymce) {
        var extend = tinymce.extend, JSON = tinymce.util.JSON, XHR = tinymce.util.XHR;
        tinymce.util.JSONRequest = function(settings) {
            this.settings = extend({}, settings), this.count = 0;
        }, tinymce.util.JSONRequest.prototype = {
            send: function(o) {
                var ecb = o.error, scb = o.success;
                (o = extend(this.settings, o)).success = function(c, x) {
                    (c = void 0 === (c = JSON.parse(c)) ? {
                        error: "JSON Parse error."
                    } : c).error ? ecb.call(o.error_scope || o.scope, c.error, x) : scb.call(o.success_scope || o.scope, c.result);
                }, o.error = function(ty, x) {
                    ecb && ecb.call(o.error_scope || o.scope, ty, x);
                }, o.data = JSON.serialize({
                    id: o.id || "c" + this.count++,
                    method: o.method,
                    params: o.params
                }), o.content_type = "application/json", XHR.send(o);
            }
        }, tinymce.util.JSONRequest.sendRPC = function(o) {
            return new tinymce.util.JSONRequest().send(o);
        };
    }(tinymce), function(tinymce) {
        tinymce.VK = {
            BACKSPACE: 8,
            DELETE: 46,
            DOWN: 40,
            ENTER: 13,
            LEFT: 37,
            RIGHT: 39,
            SPACEBAR: 32,
            TAB: 9,
            UP: 38,
            modifierPressed: function(e) {
                return e.shiftKey || e.ctrlKey || e.altKey || this.metaKeyPressed(e);
            },
            metaKeyPressed: function(e) {
                return tinymce.isMac ? e.metaKey : e.ctrlKey && !e.altKey;
            }
        };
    }(tinymce), tinymce.util.Quirks = function(editor) {
        var marker, Zwsp, CaretPosition, CaretContainer, CaretWalker, VK = tinymce.VK, BACKSPACE = VK.BACKSPACE, DELETE = VK.DELETE, dom = editor.dom, selection = editor.selection, settings = editor.settings, parser = editor.parser, each = tinymce.each, RangeUtils = tinymce.dom.RangeUtils, TreeWalker = tinymce.dom.TreeWalker, mceInternalDataType = tinymce.isIE ? "Text" : "URL";
        function setEditorCommandState(cmd, state) {
            try {
                editor.getDoc().execCommand(cmd, !1, state);
            } catch (ex) {}
        }
        function isDefaultPrevented(e) {
            return e.isDefaultPrevented();
        }
        function selectAll() {
            editor.onKeyDown.add(function(editor, e) {
                !isDefaultPrevented(e) && 65 == e.keyCode && VK.metaKeyPressed(e) && (e.preventDefault(), 
                editor.execCommand("SelectAll"));
            });
        }
        function disableBackspaceIntoATable() {
            editor.onKeyDown.add(function(editor, e) {
                if (!isDefaultPrevented(e) && e.keyCode === BACKSPACE && selection.isCollapsed() && 0 === selection.getRng(!0).startOffset) {
                    var previousSibling = selection.getNode().previousSibling;
                    if (previousSibling && previousSibling.nodeName && "table" === previousSibling.nodeName.toLowerCase()) return e.preventDefault(), 
                    !1;
                }
            });
        }
        function bodyHeight() {
            editor.inline || (editor.contentStyles.push("body {min-height: 150px}"), 
            editor.onClick.add(function(editor, e) {
                "HTML" == e.target.nodeName && (tinymce.isIE12 ? editor.getBody().focus() : (e = editor.selection.getRng(), 
                editor.getBody().focus(), editor.selection.setRng(e), editor.selection.normalize(), 
                editor.nodeChanged()));
            }));
        }
        function selectControlElements() {
            editor.onClick.add(function(editor, e) {
                var target = e.target;
                function selectElm(e) {
                    e.preventDefault(), selection.select(target), editor.nodeChanged();
                }
                /^(IMG|HR)$/.test(target.nodeName) && "false" !== dom.getContentEditableParent(target) && selectElm(e), 
                "A" == target.nodeName && dom.hasClass(target, "mce-item-anchor") && selectElm(e);
            });
        }
        function normalize(e) {
            65 == e.keyCode && VK.metaKeyPressed(e) || selection.normalize();
        }
        function serializeRng(rng) {
            var body = dom.create("body"), rng = rng.cloneContents();
            return body.appendChild(rng), selection.serializer.serialize(body, {
                format: "html"
            });
        }
        function allContentsSelected(rng) {
            var selection, allRng;
            return rng.setStart ? (selection = serializeRng(rng), (allRng = dom.createRng()).selectNode(editor.getBody()), 
            selection === serializeRng(allRng)) : !rng.item && ((selection = rng.duplicate()).moveToElementText(editor.getBody()), 
            RangeUtils.compareRanges(rng, selection));
        }
        function normalizePos(pos, forEnd) {
            var container = pos.container(), offset = pos.offset();
            if (3 == container.nodeType) {
                if (!forEnd && CaretContainer.startsWithCaretContainer(container) && 1 === offset) return new CaretPosition(container, 0);
                if (forEnd && CaretContainer.endsWithCaretContainer(container) && offset === container.data.length - 1) return new CaretPosition(container, container.data.length);
            }
            return pos;
        }
        function isCursorAtStart(rng, container, node) {
            if (node) return pos = normalizePos(CaretPosition.fromRangeStart(rng), !1), 
            null === new CaretWalker(node).prev(pos) ? node : null;
            if (3 == container.nodeType && rng.startOffset >= container.data.length) {
                var pos = container.nextSibling;
                if (pos && "A" === pos.nodeName) return pos;
            } else if (1 == container.nodeType && (node = container.childNodes[rng.startOffset]) && "A" === node.nodeName) return node;
            return null;
        }
        function isCursorAtEnd(rng, container, node) {
            return rng = normalizePos(CaretPosition.fromRangeStart(rng), !0), null === new CaretWalker(node).next(rng);
        }
        function relocateCursorOutOfInline(selector) {
            var node, rng = selection.getRng(), container = rng.startContainer;
            return (node = container.parentNode) && node != editor.dom.getRoot() && (node = (node = dom.getParent(node, selector)) || 1 != container.nodeType ? node : dom.getParent(container, selector)) && isCursorAtEnd(rng, 0, node) ? (marker = dom.create("span", {
                "data-mce-type": "caret"
            }, "\ufeff"), (container = function(node) {
                return node && 1 == node.nodeType && "BR" == node.nodeName;
            }((container = node).nextSibling) && node.nextSibling == node.parentNode.lastChild ? node.nextSibling : container).insertAdjacentElement("afterend", marker), 
            (selector = dom.createRng()).setStartAfter(marker), selector.setEndAfter(marker), 
            selector.collapse(), selection.setRng(selector), dom.remove(marker), 
            dom.setAttrib(node, "data-mce-selected", null), 1) : void 0;
        }
        function relocateCursorBeforeInline(selector) {
            var node, rng = selection.getRng(), container = rng.startContainer;
            return (node = container.parentNode) && node != editor.dom.getRoot() && (node = (node = dom.getParent(node, selector)) || 1 != container.nodeType ? node : dom.getParent(container, selector)) && isCursorAtStart(rng, container, node) ? (marker = dom.create("span", {
                "data-mce-type": "caret"
            }, "\ufeff"), node.insertAdjacentElement("beforebegin", marker), (selector = dom.createRng()).setStartBefore(marker), 
            selector.setEndBefore(marker), selection.setRng(selector), dom.remove(marker), 
            dom.setAttrib(node, "data-mce-selected", null), 1) : void 0;
        }
        function ensureZwspAtAnchorStart() {
            var rng = selection.getRng();
            if (rng && rng.collapsed) {
                var container = rng.startContainer, anchor = dom.getParent(container, "a"), container = anchor || isCursorAtStart(rng, container, null);
                if (container && (!anchor || (rng = normalizePos(CaretPosition.fromRangeStart(rng), !1), 
                null === new CaretWalker(anchor).prev(rng)))) {
                    for (var current, firstText = null, walker = new TreeWalker(container, container); current = walker.next(); ) if (3 == current.nodeType) {
                        firstText = current;
                        break;
                    }
                    firstText && (Zwsp.isZwsp(firstText.data[0]) || (firstText.data = Zwsp.ZWSP + firstText.data), 
                    anchor) && ((rng = dom.createRng()).setStart(firstText, 1), 
                    rng.setEnd(firstText, 1), selection.setRng(rng));
                }
            }
        }
        function removeRuntimeStyle(node) {
            var style = node.attr("style");
            style && "color:inherit;font-family:inherit;font-size:1rem;" === (style = style.replace(/\s/g, "")) && node.unwrap();
        }
        function fixLinks() {
            each(dom.select("a"), function(node) {
                var parentNode = node.parentNode, root = dom.getRoot();
                if (parentNode.lastChild === node) {
                    for (;parentNode && !dom.isBlock(parentNode); ) {
                        if (parentNode.parentNode.lastChild !== parentNode || parentNode === root) return;
                        parentNode = parentNode.parentNode;
                    }
                    dom.add(parentNode, "br", {
                        "data-mce-bogus": 1
                    });
                }
            });
        }
        function setOpts() {
            setEditorCommandState("StyleWithCSS", !1), setEditorCommandState("enableInlineTableEditing", !1), 
            settings.object_resizing || setEditorCommandState("enableObjectResizing", !1);
        }
        function getAttributeApplyFunction() {
            var template = dom.getAttribs(selection.getStart().cloneNode(!1));
            return function() {
                var target = selection.getStart();
                target !== dom.getRoot() && (dom.setAttrib(target, "style", null), 
                each(template, function(attr) {
                    target.setAttributeNode(attr.cloneNode(!0));
                }));
            };
        }
        function isSelectionAcrossElements() {
            return !selection.isCollapsed() && dom.getParent(selection.getStart(), dom.isBlock) != dom.getParent(selection.getEnd(), dom.isBlock);
        }
        editor.onKeyUp.addToTop(normalize), editor.onMouseUp.addToTop(normalize), 
        editor.onKeyDown.add(function(editor, e) {
            var container, offset, root, parent;
            if (!isDefaultPrevented(e) && e.keyCode == VK.BACKSPACE && (container = (e = selection.getRng()).startContainer, 
            offset = e.startOffset, root = dom.getRoot(), parent = container, e.collapsed) && 0 === offset) {
                for (;parent && parent.parentNode && parent.parentNode.firstChild == parent && parent.parentNode != root; ) parent = parent.parentNode;
                "BLOCKQUOTE" === parent.tagName && (editor.formatter.toggle("blockquote", null, parent), 
                (e = dom.createRng()).setStart(container, 0), e.setEnd(container, 0), 
                selection.setRng(e));
            }
        }), editor.onKeyDown.add(function(editor, e) {
            var root, keyCode = e.keyCode;
            isDefaultPrevented(e) || keyCode != DELETE && keyCode != BACKSPACE || (keyCode = editor.selection.isCollapsed(), 
            root = dom.getRoot(), keyCode && !dom.isEmpty(root)) || (keyCode || allContentsSelected(editor.selection.getRng())) && (e.preventDefault(), 
            editor.setContent(""), root.firstChild && dom.isBlock(root.firstChild) ? editor.selection.setCursorLocation(root.firstChild, 0) : editor.selection.setCursorLocation(root, 0), 
            editor.nodeChanged());
        }), Zwsp = tinymce.text.Zwsp, CaretPosition = tinymce.caret.CaretPosition, 
        CaretContainer = tinymce.caret.CaretContainer, CaretWalker = tinymce.caret.CaretWalker, 
        editor.onKeyDown.addToTop(function(editor, e) {
            switch (dom.remove(marker), e.keyCode) {
              case VK.RIGHT:
                relocateCursorOutOfInline('a,span[data-mce-item="font"]') && (e.preventDefault(), 
                editor.nodeChanged());
                break;

              case VK.LEFT:
                relocateCursorBeforeInline('a,span[data-mce-item="font"]') && (e.preventDefault(), 
                editor.nodeChanged());
                break;

              case VK.ENTER:
                relocateCursorOutOfInline('a,span[data-mce-item="font"]') && editor.nodeChanged();
            }
        }), editor.onMouseUp.add(function(editor, e) {
            dom.remove(marker), ensureZwspAtAnchorStart(), relocateCursorOutOfInline('span[data-mce-item="font"]') && editor.nodeChanged();
        }), tinymce.isWebKit && editor.onBeforeInput.add(function(editor, e) {
            if ("insertText" === e.inputType && (e = selection.getRng()) && e.collapsed) {
                var container = e.startContainer, anchor = dom.getParent(container, "a");
                if (container = isCursorAtStart(e, container, anchor)) anchor = container; else if (!anchor) return;
                var current, anchorOffset, textNode = null, walker = new TreeWalker(anchor, anchor);
                if (isCursorAtEnd(e, 0, anchor)) {
                    for (;current = walker.next(); ) 3 == current.nodeType && (textNode = current);
                    if (!textNode) return;
                    0 !== textNode.data.length && textNode.data[textNode.data.length - 1] === Zwsp.ZWSP || (textNode.data += Zwsp.ZWSP), 
                    anchorOffset = textNode.data.length - 1;
                }
                textNode && ((container = dom.createRng()).setStart(textNode, anchorOffset), 
                container.setEnd(textNode, anchorOffset), selection.setRng(container));
            }
        }), editor.onKeyUp.add(function(_editor, e) {
            e.keyCode !== VK.LEFT && e.keyCode !== VK.RIGHT || (ensureZwspAtAnchorStart(), 
            e = selection.getStart(!0), dom.getParent(e, 'a,span[data-mce-item="font"]')) || each(dom.select('[data-mce-selected="inline-boundary"]', dom.getRoot()), function(el) {
                dom.setAttrib(el, "data-mce-selected", null);
            });
        }), editor.onNodeChange.add(function(editor, cm, node) {
            var inlineNode = dom.getParent(node, 'a,span[data-mce-item="font"]');
            tinymce.isWebKit && each(dom.select('a[data-mce-selected="inline-boundary"]', dom.getRoot()), function(el) {
                if (el !== inlineNode) {
                    for (var current, walker = new TreeWalker(el, el), firstText = null, lastText = null; current = walker.next(); ) 3 == current.nodeType && (firstText = firstText || current, 
                    lastText = current);
                    firstText && firstText.data && (firstText.data = Zwsp.trim(firstText.data)), 
                    lastText && lastText.data && (lastText.data = Zwsp.trim(lastText.data));
                }
            }), each(dom.select('[data-mce-selected="inline-boundary"]', dom.getRoot()), function(el) {
                dom.setAttrib(el, "data-mce-selected", null);
            }), inlineNode && dom.setAttrib(inlineNode, "data-mce-selected", "inline-boundary");
        }), tinymce.isWebKit && (function() {
            var dom = editor.dom, selection = editor.selection, MutationObserver = window.MutationObserver;
            function isSiblingsIgnoreWhiteSpace(node1, node2) {
                for (var node = node1.nextSibling; node && node != node2; node = node.nextSibling) if ((3 != node.nodeType || 0 !== tinymce.trim(node.data).length) && node !== node2) return;
                return node === node2;
            }
            function findCaretNode(node, forward, startNode) {
                var walker, current, nonEmptyElements, rootNode = dom.getRoot();
                if (dom.isChildOf(node, rootNode)) for (nonEmptyElements = dom.schema.getNonEmptyElements(), 
                walker = new TreeWalker(startNode || node, node); current = walker[forward ? "next" : "prev"](); ) {
                    if (nonEmptyElements[current.nodeName] && !function(node) {
                        var blockElements = dom.schema.getBlockElements(), rootNode = dom.getRoot();
                        if ("BR" == node.nodeName) {
                            for (;node != rootNode && !blockElements[node.nodeName]; node = node.parentNode) if (node.nextSibling) return;
                            return 1;
                        }
                    }(current)) return current;
                    if (3 == current.nodeType && 0 < current.data.length) return current;
                }
            }
            function handleLastBlockCharacterDelete(isForward, rng) {
                var blockElm, newBlockElm, clonedBlockElm, sibling, container, offset, br, currentFormatNodes;
                function cloneTextBlockWithFormats(blockElm, node) {
                    return currentFormatNodes = dom.getParents(node, function(n) {
                        return !!editor.schema.getTextInlineElements()[n.nodeName];
                    }), newBlockElm = blockElm.cloneNode(!1), (currentFormatNodes = tinymce.map(currentFormatNodes, function(formatNode) {
                        return formatNode = formatNode.cloneNode(!1), newBlockElm.hasChildNodes() && formatNode.appendChild(newBlockElm.firstChild), 
                        newBlockElm.appendChild(formatNode), newBlockElm.appendChild(formatNode), 
                        formatNode;
                    })).length ? (br = dom.create("br"), currentFormatNodes[0].appendChild(br), 
                    dom.replace(newBlockElm, blockElm), rng.setStartBefore(br), 
                    rng.setEndBefore(br), editor.selection.setRng(rng), br) : null;
                }
                function isTextBlock(node) {
                    return node && editor.schema.getTextBlockElements()[node.tagName];
                }
                if (rng.collapsed && (container = rng.startContainer, offset = rng.startOffset, 
                isTextBlock(blockElm = dom.getParent(container, dom.isBlock)))) {
                    if (1 == container.nodeType) return (!(container = container.childNodes[offset]) || "BR" == container.tagName) && (sibling = isForward ? blockElm.nextSibling : blockElm.previousSibling, 
                    dom.isEmpty(blockElm)) && isTextBlock(sibling) && dom.isEmpty(sibling) && cloneTextBlockWithFormats(blockElm, container) && (dom.remove(sibling), 
                    1);
                    if (3 == container.nodeType) {
                        if (sibling = function(rootNode, targetNode) {
                            for (var path = []; targetNode && targetNode != rootNode; targetNode = targetNode.parentNode) path.push(tinymce.DOM.nodeIndex(targetNode, void 0));
                            return path;
                        }(blockElm, container), container = function(path) {
                            for (var children, node = clonedBlockElm, i = path.length - 1; 0 <= i; i--) {
                                if (children = node.childNodes, path[i] > children.length - 1) return null;
                                node = children[path[i]];
                            }
                            return node;
                        }((clonedBlockElm = blockElm.cloneNode(!0), sibling)), isForward) {
                            if (offset >= container.data.length) return;
                            container.deleteData(offset, 1);
                        } else {
                            if (offset <= 0) return;
                            container.deleteData(offset - 1, 1);
                        }
                        return dom.isEmpty(clonedBlockElm) && cloneTextBlockWithFormats(blockElm, container);
                    }
                }
            }
            function customDelete(isForward) {
                var mutationObserver, rng, caretElement, rootNode = editor.dom.getRoot();
                !function(isForward) {
                    return !(isForward = function(rng, isForward) {
                        var container;
                        if (rng.collapsed) {
                            if (container = rng.startContainer, offset = rng.startOffset, 
                            3 == container.nodeType) if (isForward) {
                                if (offset < container.data.length) return rng;
                            } else if (0 < offset) return rng;
                            var caretNode = RangeUtils.getNode(container, offset), textBlock = dom.getParent(caretNode, dom.isBlock), targetCaretNode = findCaretNode(editor.getBody(), isForward, caretNode), targetTextBlock = dom.getParent(targetCaretNode, dom.isBlock), offset = 1 === container.nodeType && offset > container.childNodes.length - 1;
                            if (caretNode && targetCaretNode && targetTextBlock && textBlock != targetTextBlock) if (isForward) {
                                if (!isSiblingsIgnoreWhiteSpace(textBlock, targetTextBlock)) return rng;
                                1 == caretNode.nodeType ? "BR" == caretNode.nodeName ? rng.setStartBefore(caretNode) : rng.setStartAfter(caretNode) : rng.setStart(caretNode, caretNode.data.length), 
                                1 == targetCaretNode.nodeType ? rng.setEnd(targetCaretNode, 0) : rng.setEndBefore(targetCaretNode);
                            } else {
                                if (!isSiblingsIgnoreWhiteSpace(targetTextBlock, textBlock)) return rng;
                                1 == targetCaretNode.nodeType ? "BR" == targetCaretNode.nodeName ? rng.setStartBefore(targetCaretNode) : rng.setStartAfter(targetCaretNode) : rng.setStart(targetCaretNode, targetCaretNode.data.length), 
                                1 == caretNode.nodeType && offset ? rng.setEndAfter(caretNode) : rng.setEndBefore(caretNode);
                            }
                        }
                        return rng;
                    }(selection.getRng(), isForward)).collapsed && (startBlock = dom.getParent(RangeUtils.getNode(isForward.startContainer, isForward.startOffset), dom.isBlock), 
                    endBlock = dom.getParent(RangeUtils.getNode(isForward.endContainer, isForward.endOffset), dom.isBlock), 
                    textBlockElements = editor.schema.getTextBlockElements(), startBlock != endBlock) && textBlockElements[startBlock.nodeName] && textBlockElements[endBlock.nodeName] && "false" !== dom.getContentEditable(startBlock) && "false" !== dom.getContentEditable(endBlock) && (isForward.deleteContents(), 
                    textBlockElements = findCaretNode(startBlock, !1), caretNodeAfter = findCaretNode(endBlock, !0), 
                    textBlockElements && caretNodeAfter && (dom.isEmpty(endBlock) || (nodes = tinymce.toArray(endBlock.childNodes), 
                    each(nodes, function(node) {
                        node && node.nodeType && startBlock.appendChild(node);
                    })), dom.remove(endBlock)), each([ startBlock, endBlock ], function(node) {
                        dom.isEmpty(node) && dom.remove(node);
                    }), textBlockElements ? 1 == textBlockElements.nodeType ? "BR" == textBlockElements.nodeName ? (isForward.setStartBefore(textBlockElements), 
                    isForward.setEndBefore(textBlockElements)) : (isForward.setStartAfter(textBlockElements), 
                    isForward.setEndAfter(textBlockElements)) : (isForward.setStart(textBlockElements, textBlockElements.data.length), 
                    isForward.setEnd(textBlockElements, textBlockElements.data.length)) : caretNodeAfter && (1 == caretNodeAfter.nodeType ? (isForward.setStartBefore(caretNodeAfter), 
                    isForward.setEndBefore(caretNodeAfter)) : (isForward.setStart(caretNodeAfter, 0), 
                    isForward.setEnd(caretNodeAfter, 0))), selection.setRng(isForward), 
                    1);
                    var caretNodeAfter, nodes, startBlock, endBlock, textBlockElements;
                }(isForward) && (tinymce.each(rootNode.getElementsByTagName("*"), function(elm) {
                    "SPAN" == elm.tagName && elm.setAttribute("data-mce-marked", 1), 
                    !elm.hasAttribute("data-mce-style") && elm.hasAttribute("style") && editor.dom.setAttrib(elm, "style", editor.dom.getAttrib(elm, "style"));
                }), (mutationObserver = new MutationObserver(function() {})).observe(editor.getDoc(), {
                    childList: !0,
                    attributes: !0,
                    subtree: !0,
                    attributeFilter: [ "style" ]
                }), editor.getDoc().execCommand(isForward ? "ForwardDelete" : "Delete", !1, null), 
                rng = editor.selection.getRng(), caretElement = rng.startContainer.parentNode, 
                tinymce.each(mutationObserver.takeRecords(), function(record) {
                    var oldValue;
                    dom.isChildOf(record.target, rootNode) && ("style" == record.attributeName && ((oldValue = record.target.getAttribute("data-mce-style")) ? record.target.setAttribute("style", oldValue) : record.target.removeAttribute("style")), 
                    tinymce.each(record.addedNodes, function(node) {
                        if (1 !== node.nodeType) return !0;
                        var offset, container;
                        node.getAttribute("style") && !node.getAttribute("data-mce-style") && node.removeAttribute("style"), 
                        "SPAN" != node.nodeName || node.getAttribute("data-mce-marked") || (node == caretElement && (offset = rng.startOffset, 
                        container = node.firstChild), dom.remove(node, !0), container && (rng.setStart(container, offset), 
                        rng.setEnd(container, offset), editor.selection.setRng(rng)));
                    }));
                }), mutationObserver.disconnect(), tinymce.each(editor.dom.select("span[data-mce-marked]", editor.dom.getRoot()), function(span) {
                    span.removeAttribute("data-mce-marked");
                }));
            }
            editor.onKeyDown.add(function(editor, e) {
                var rng, container, offset, isForward = e.keyCode == DELETE, isMetaOrCtrl = e.ctrlKey || e.metaKey;
                isDefaultPrevented(e) || !isForward && e.keyCode != BACKSPACE || (container = (rng = editor.selection.getRng()).startContainer, 
                offset = rng.startOffset, isForward && e.shiftKey) || (handleLastBlockCharacterDelete(isForward, rng) ? e.preventDefault() : !isMetaOrCtrl && rng.collapsed && 3 == container.nodeType && (isForward ? offset < container.data.length : 0 < offset) || (e.preventDefault(), 
                isMetaOrCtrl && editor.selection.getSel().modify("extend", isForward ? "forward" : "backward", e.metaKey ? "lineboundary" : "word"), 
                customDelete(isForward)));
            }), editor.addCommand("Delete", function() {
                customDelete();
            }), editor.addCommand("ForwardDelete", function() {
                customDelete(!0);
            });
        }(), editor.settings.content_editable || dom.bind(editor.getDoc(), "mousedown mouseup", function(e) {
            var rng;
            e.target == editor.getDoc().documentElement && (rng = selection.getRng(), 
            editor.getBody().focus(), "mousedown" == e.type ? selection.placeCaretAt(e.clientX, e.clientY) : selection.setRng(rng));
        }), settings.forced_root_block && editor.onInit.add(function() {
            setEditorCommandState("DefaultParagraphSeparator", settings.forced_root_block);
        }), editor.onInit.add(function() {
            editor.dom.bind(editor.getBody(), "submit", function(e) {
                e.preventDefault();
            });
        }), disableBackspaceIntoATable(), parser.addNodeFilter("br", function(nodes) {
            for (var i = nodes.length; i--; ) "Apple-interchange-newline" == nodes[i].attr("class") && nodes[i].remove();
        }), editor.onBeforeExecCommand.add(function(ed, cmd) {
            "mceInsertLink" == cmd && (cmd = ed.selection.getNode()) && "IMG" == cmd.nodeName && (ed.dom.setAttrib(cmd, "data-mce-style", cmd.style.cssText), 
            cmd.style.cssText = null);
        }), editor.onExecCommand.add(function(ed, cmd) {
            "mceInsertLink" == cmd && (cmd = ed.selection.getNode(), tinymce.each(ed.dom.select("img[data-mce-style]", cmd), function(el) {
                "A" != el.parentNode.nodeName || el.style.cssText || (el.style.cssText = ed.dom.getAttrib(el, "data-mce-style"));
            }));
        }), selectControlElements(), editor.parser.addNodeFilter("span", function(nodes) {
            for (var i = nodes.length; i--; ) removeRuntimeStyle(nodes[i]);
        }), editor.serializer.addNodeFilter("span", function(nodes) {
            for (var i = nodes.length; i--; ) removeRuntimeStyle(nodes[i]);
        }), tinymce.isIOS ? (editor.onKeyDown.add(function() {
            document.activeElement == document.body && editor.getWin().focus();
        }), bodyHeight(), editor.onClick.add(function(editor, e) {
            var elm = e.target;
            do {
                if ("A" === elm.tagName) return void e.preventDefault();
            } while (elm = elm.parentNode);
        }), editor.contentStyles.push(".mce-content-body {-webkit-touch-callout: none}")) : selectAll()), 
        tinymce.isIE && (bodyHeight(), selectAll(), setEditorCommandState("AutoUrlDetect", !1), 
        editor.dom.bind("dragstart", function(e) {
            !function(e) {
                var selectionHtml;
                e.dataTransfer && (editor.selection.isCollapsed() && "IMG" == e.target.tagName && selection.select(e.target), 
                0 < (selectionHtml = editor.selection.getContent()).length) && (selectionHtml = "data:text/mce-internal," + escape(editor.id) + "," + escape(selectionHtml), 
                e.dataTransfer.setData(mceInternalDataType, selectionHtml));
            }(e);
        }), editor.dom.bind("dragstart", function(e) {
            var internalContent;
            isDefaultPrevented(e) || (internalContent = function(e) {
                return e.dataTransfer && (e = e.dataTransfer.getData(mceInternalDataType)) && 0 <= e.indexOf("data:text/mce-internal,") ? (e = e.substr("data:text/mce-internal,".length).split(","), 
                {
                    id: unescape(e[0]),
                    html: unescape(e[1])
                }) : null;
            }(e)) && internalContent.id != editor.id && (e.preventDefault(), e = RangeUtils.getCaretRangeFromPoint(e.x, e.y, editor.getDoc()), 
            selection.setRng(e), e = internalContent.html, editor.queryCommandSupported("mceInsertClipboardContent") ? editor.execCommand("mceInsertClipboardContent", !1, {
                content: e
            }) : editor.execCommand("mceInsertContent", !1, e));
        })), 11 <= tinymce.isIE && disableBackspaceIntoATable(), tinymce.isGecko && (editor.onKeyDown.add(function(editor, e) {
            var previousSibling;
            isDefaultPrevented(e) || e.keyCode !== BACKSPACE || editor.getBody().getElementsByTagName("hr").length && selection.isCollapsed() && 0 === selection.getRng(!0).startOffset && (previousSibling = (editor = selection.getNode()).previousSibling, 
            "HR" == editor.nodeName ? (dom.remove(editor), e.preventDefault()) : previousSibling && previousSibling.nodeName && "hr" === previousSibling.nodeName.toLowerCase() && (dom.remove(previousSibling), 
            e.preventDefault()));
        }), editor.onKeyPress.add(function(editor, e) {
            var applyAttributes;
            if (!isDefaultPrevented(e) && (8 == e.keyCode || 46 == e.keyCode) && isSelectionAcrossElements()) return applyAttributes = getAttributeApplyFunction(), 
            editor.getDoc().execCommand("delete", !1, null), applyAttributes(), 
            e.preventDefault(), !1;
        }), dom.bind(editor.getDoc(), "cut", function(e) {
            var applyAttributes;
            !isDefaultPrevented(e) && isSelectionAcrossElements() && (applyAttributes = getAttributeApplyFunction(), 
            setTimeout(function() {
                applyAttributes();
            }, 0));
        }), settings.readonly || (editor.onBeforeExecCommand.add(setOpts), editor.onMouseDown.add(setOpts)), 
        editor.onExecCommand.add(function(editor, cmd) {
            "mceInsertLink" === cmd && fixLinks();
        }), editor.onSetContent.add(selection.onSetContent.add(fixLinks)), editor.contentStyles.push("img:-moz-broken {-moz-force-broken-image-icon:1;min-width:24px;min-height:24px}"), 
        tinymce.isMac && editor.onKeyDown.add(function(editor, e) {
            !VK.metaKeyPressed(e) || e.shiftKey || 37 != e.keyCode && 39 != e.keyCode || (e.preventDefault(), 
            editor.selection.getSel().modify("move", 37 == e.keyCode ? "backward" : "forward", "lineboundary"));
        }), disableBackspaceIntoATable(), selectControlElements());
    }, function(tinymce) {
        var previewElm, each = tinymce.each, extend = tinymce.extend, rgba = {}, luma = {};
        function getRGBA(val) {
            var r, b, g, a, values, match;
            return rgba[val] || (g = b = r = 0, -(a = 1) !== val.indexOf("#") ? (3 === (val = val.substr(1)).length && (val += val), 
            r = parseInt(val.substring(0, 2), 16), g = parseInt(val.substring(2, 4), 16), 
            b = parseInt(val.substring(4, 6), 16), 6 < val.length && (a = +((a = parseInt(val.substring(6, 8), 16)) / 255).toFixed(2))) : (val = val.replace(/\s/g, ""), 
            (values = (match = /^(?:rgb|rgba)\(([^\)]*)\)$/.exec(val)) ? match[1].split(",").map(function(x) {
                return parseFloat(x);
            }) : values) && (r = values[0], g = values[1], b = values[2], 4 === values.length) && (a = values[3] || 1)), 
            rgba[val] = {
                r: r,
                g: g,
                b: b,
                a: a
            }), rgba[val];
        }
        function getLuminance(val) {
            var RsRGB, GsRGB, col;
            return luma[val] || (RsRGB = (col = getRGBA(val)).r / 255, GsRGB = col.g / 255, 
            col = col.b / 255, RsRGB = RsRGB <= .03928 ? RsRGB / 12.92 : Math.pow((.055 + RsRGB) / 1.055, 2.4), 
            GsRGB = GsRGB <= .03928 ? GsRGB / 12.92 : Math.pow((.055 + GsRGB) / 1.055, 2.4), 
            col = col <= .03928 ? col / 12.92 : Math.pow((.055 + col) / 1.055, 2.4), 
            luma[val] = .2126 * RsRGB + .7152 * GsRGB + .0722 * col), luma[val];
        }
        function isReadable(color1, color2) {
            return color1 = getLuminance(color1), color2 = getLuminance(color2), 
            2 <= (Math.max(color1, color2) + .05) / (Math.min(color1, color2) + .05);
        }
        function hslToRgb(h, s, l) {
            function hue2rgb(p, q, t) {
                return t < 0 && (t += 1), 1 < t && --t, t < 1 / 6 ? p + 6 * (q - p) * t : t < .5 ? q : t < 2 / 3 ? p + (q - p) * (2 / 3 - t) * 6 : p;
            }
            var r, g, b;
            return h /= 360, 0 === s ? r = g = b = l : (r = hue2rgb(s = 2 * l - (l = l < .5 ? l * (1 + s) : l + s - l * s), l, h + 1 / 3), 
            g = hue2rgb(s, l, h), b = hue2rgb(s, l, h - 1 / 3)), [ Math.round(255 * r), Math.round(255 * g), Math.round(255 * b) ];
        }
        function getContrastRatio(c1, c2) {
            return c1 = getLuminance(c1), c2 = getLuminance(c2), (Math.max(c1, c2) + .05) / (Math.min(c1, c2) + .05);
        }
        function resetElm() {
            previewElm && previewElm.parentNode && (previewElm.parentNode.removeChild(previewElm), 
            previewElm = null);
        }
        tinymce.util.PreviewCss = {
            getCssText: function(ed, fmt, reset) {
                var name, dom = ed.dom, previewCss = {}, previewStyles = (fmt = extend({
                    styles: [],
                    attributes: [],
                    classes: ""
                }, fmt), ed.settings.preview_styles);
                if (!1 === previewStyles) return "";
                function removeVars(val) {
                    return val && "string" == typeof val ? val.replace(/%(\w+)/g, "") : val;
                }
                previewStyles = previewStyles || "font-family font-size font-weight text-decoration text-transform background-color color", 
                name = fmt.block || fmt.inline || "div", previewElm && previewElm.nodeName == name.toUpperCase() || (previewElm = dom.create(name), 
                ed.getBody().appendChild(previewElm)), dom.removeAllAttribs(previewElm), 
                each(fmt.styles, function(value, name) {
                    (value = removeVars(value)) && dom.setStyle(previewElm, name, value);
                }), each(fmt.attributes, function(value, name) {
                    (value = removeVars(value)) && dom.setAttrib(previewElm, name, value);
                }), each(fmt.classes, function(value) {
                    value = removeVars(value), dom.addClass(previewElm, value);
                }), dom.setStyles(previewElm, {
                    position: "absolute",
                    left: -65535
                }), previewElm.setAttribute("data-mce-type", "temp");
                for (var bodybg = dom.getStyle(ed.getBody(), "background-color", !0), elmbg = dom.getStyle(previewElm, "background-color", !0), styles = previewStyles.split(" "), css = "", i = 0, len = styles.length; i < len; i++) {
                    var key = styles[i], value = dom.getStyle(previewElm, key, !0);
                    previewCss[key] || (value = ("color" != key || isReadable(value, elmbg = /transparent|rgba\s*\([^)]+,\s*0\)/.test(elmbg) ? "rgb(255, 255, 255)" : elmbg) ? value : value && isReadable(value, bodybg) ? bodybg : function(fgColor, bgColor, targetContrast, iterations) {
                        if (null == iterations && (iterations = 20), getContrastRatio(fgColor, bgColor) >= targetContrast) return fgColor;
                        for (var r = (col = getRGBA(fgColor)).r, g = col.g, col = col.b, lighten = getLuminance(fgColor) > getLuminance(bgColor), h = (fgColor = function(r, g, b) {
                            r /= 255, g /= 255, b /= 255;
                            var max = Math.max(r, g, b), l = (max + (min = Math.min(r, g, b))) / 2, d = max - min, h = 0, min = 0;
                            if (0 != d) {
                                switch (max) {
                                  case r:
                                    h = (g - b) / d + (g < b ? 6 : 0);
                                    break;

                                  case g:
                                    h = (b - r) / d + 2;
                                    break;

                                  case b:
                                    h = (r - g) / d + 4;
                                }
                                h *= 60, min = d / (1 - Math.abs(2 * l - 1));
                            }
                            return [ h, min, l ];
                        }(r, g, col))[0], s = fgColor[1], origL = fgColor[2], low = 0, high = 1, bestL = origL, i = 0; i < iterations; i++) {
                            var mid = (low + high) / 2, testL = lighten ? origL + mid * (1 - origL) : origL - mid * origL, rgb = hslToRgb(h, s, testL);
                            getContrastRatio("#" + ("0" + rgb[0].toString(16)).slice(-2) + ("0" + rgb[1].toString(16)).slice(-2) + ("0" + rgb[2].toString(16)).slice(-2), bgColor) >= targetContrast ? (bestL = testL, 
                            high = mid) : low = mid;
                        }
                        return "#" + ("0" + (r = hslToRgb(h, s, bestL))[0].toString(16)).slice(-2) + ("0" + r[1].toString(16)).slice(-2) + ("0" + r[2].toString(16)).slice(-2);
                    }(value, elmbg, 2)) || "inherit", "font-size" == key && 0 === parseInt(value, 10) && (value = "inherit"), 
                    css += key + ":" + (previewCss[key] = value) + ";");
                }
                return reset && resetElm(), css;
            },
            reset: resetElm
        };
    }(tinymce), function(tinymce) {
        var isArray = Array.isArray || function(obj) {
            return "[object Array]" === Object.prototype.toString.call(obj);
        };
        function each(o, cb, s) {
            var n, l;
            if (!o) return 0;
            if (s = s || o, void 0 !== o.length) {
                for (n = 0, l = o.length; n < l; n++) if (!1 === cb.call(s, o[n], n, o)) return 0;
            } else for (n in o) if (o.hasOwnProperty(n) && !1 === cb.call(s, o[n], n, o)) return 0;
            return 1;
        }
        function map(array, callback) {
            var out = [];
            return each(array, function(item, index) {
                out.push(callback(item, index, array));
            }), out;
        }
        function indexOf(a, v) {
            var i, l;
            if (a) for (i = 0, l = a.length; i < l; i++) if (a[i] === v) return i;
            return -1;
        }
        function findIndex(array, predicate, thisArg) {
            for (var i = 0, l = array.length; i < l; i++) if (predicate.call(thisArg, array[i], i, array)) return i;
            return -1;
        }
        function flat(arr) {
            for (var out = [], i = 0, l = arr.length; i < l; i++) isArray(arr[i]) && Array.prototype.push.apply(out, arr[i]);
            return out;
        }
        function flatMap(array, callback) {
            return flat(map(array, callback));
        }
        tinymce.util.Arr = {
            isArray: isArray,
            toArray: function(obj) {
                var i, l, array = obj;
                if (!isArray(obj)) for (array = [], i = 0, l = obj.length; i < l; i++) array[i] = obj[i];
                return array;
            },
            each: each,
            map: map,
            filter: function(a, f) {
                var o = [];
                return each(a, function(v, index) {
                    f && !f(v, index, a) || o.push(v);
                }), o;
            },
            indexOf: indexOf,
            reduce: function(collection, iteratee, accumulator, thisArg) {
                var i = 0;
                for (arguments.length < 3 && (accumulator = collection[0]); i < collection.length; i++) accumulator = iteratee.call(thisArg, accumulator, collection[i], i);
                return accumulator;
            },
            findIndex: findIndex,
            find: function(array, predicate, thisArg) {
                if (-1 !== (predicate = findIndex(array, predicate, thisArg))) return array[predicate];
            },
            last: function(collection) {
                return collection[collection.length - 1];
            },
            toObject: function(array, callback) {
                for (var object = {}, i = 0, l = array.length; i < l; i++) {
                    var x = array[i];
                    object[x] = callback(x, i);
                }
                return object;
            },
            flat: flat,
            flatMap: flatMap,
            bind: flatMap,
            contains: function(a, v) {
                return -1 < indexOf(a, v);
            },
            forall: function(xs, pred) {
                for (var i = 0, len = xs.length; i < len; ++i) if (!0 !== pred(xs[i], i)) return !1;
                return !0;
            }
        };
    }(tinymce), function(tinymce) {
        var slice = [].slice;
        function curry(fn) {
            var args = slice.call(arguments);
            return args.length - 1 >= fn.length ? fn.apply(this, args.slice(1)) : function() {
                var tempArgs = args.concat([].slice.call(arguments));
                return curry.apply(this, tempArgs);
            };
        }
        tinymce.util.Fun = {
            constant: function(value) {
                return function() {
                    return value;
                };
            },
            negate: function(predicate) {
                return function(x) {
                    return !predicate(x);
                };
            },
            and: function() {
                var args = slice.call(arguments);
                return function(x) {
                    for (var i = 0; i < args.length; i++) if (!args[i](x)) return !1;
                    return !0;
                };
            },
            or: function() {
                var args = slice.call(arguments);
                return function(x) {
                    for (var i = 0; i < args.length; i++) if (args[i](x)) return !0;
                    return !1;
                };
            },
            curry: curry,
            compose: function(f, g) {
                return function(x) {
                    return f(g(x));
                };
            },
            noop: function() {}
        };
    }(tinymce), function(tinymce) {
        var extendingChars = new RegExp("[\u0300-\u036f\u0483-\u0487\u0488-\u0489\u0591-\u05bd\u05bf\u05c1-\u05c2\u05c4-\u05c5\u05c7\u0610-\u061a\u064b-\u065f\u0670\u06d6-\u06dc\u06df-\u06e4\u06e7-\u06e8\u06ea-\u06ed\u0711\u0730-\u074a\u07a6-\u07b0\u07eb-\u07f3\u0816-\u0819\u081b-\u0823\u0825-\u0827\u0829-\u082d\u0859-\u085b\u08e3-\u0902\u093a\u093c\u0941-\u0948\u094d\u0951-\u0957\u0962-\u0963\u0981\u09bc\u09be\u09c1-\u09c4\u09cd\u09d7\u09e2-\u09e3\u0a01-\u0a02\u0a3c\u0a41-\u0a42\u0a47-\u0a48\u0a4b-\u0a4d\u0a51\u0a70-\u0a71\u0a75\u0a81-\u0a82\u0abc\u0ac1-\u0ac5\u0ac7-\u0ac8\u0acd\u0ae2-\u0ae3\u0b01\u0b3c\u0b3e\u0b3f\u0b41-\u0b44\u0b4d\u0b56\u0b57\u0b62-\u0b63\u0b82\u0bbe\u0bc0\u0bcd\u0bd7\u0c00\u0c3e-\u0c40\u0c46-\u0c48\u0c4a-\u0c4d\u0c55-\u0c56\u0c62-\u0c63\u0c81\u0cbc\u0cbf\u0cc2\u0cc6\u0ccc-\u0ccd\u0cd5-\u0cd6\u0ce2-\u0ce3\u0d01\u0d3e\u0d41-\u0d44\u0d4d\u0d57\u0d62-\u0d63\u0dca\u0dcf\u0dd2-\u0dd4\u0dd6\u0ddf\u0e31\u0e34-\u0e3a\u0e47-\u0e4e\u0eb1\u0eb4-\u0eb9\u0ebb-\u0ebc\u0ec8-\u0ecd\u0f18-\u0f19\u0f35\u0f37\u0f39\u0f71-\u0f7e\u0f80-\u0f84\u0f86-\u0f87\u0f8d-\u0f97\u0f99-\u0fbc\u0fc6\u102d-\u1030\u1032-\u1037\u1039-\u103a\u103d-\u103e\u1058-\u1059\u105e-\u1060\u1071-\u1074\u1082\u1085-\u1086\u108d\u109d\u135d-\u135f\u1712-\u1714\u1732-\u1734\u1752-\u1753\u1772-\u1773\u17b4-\u17b5\u17b7-\u17bd\u17c6\u17c9-\u17d3\u17dd\u180b-\u180d\u18a9\u1920-\u1922\u1927-\u1928\u1932\u1939-\u193b\u1a17-\u1a18\u1a1b\u1a56\u1a58-\u1a5e\u1a60\u1a62\u1a65-\u1a6c\u1a73-\u1a7c\u1a7f\u1ab0-\u1abd\u1abe\u1b00-\u1b03\u1b34\u1b36-\u1b3a\u1b3c\u1b42\u1b6b-\u1b73\u1b80-\u1b81\u1ba2-\u1ba5\u1ba8-\u1ba9\u1bab-\u1bad\u1be6\u1be8-\u1be9\u1bed\u1bef-\u1bf1\u1c2c-\u1c33\u1c36-\u1c37\u1cd0-\u1cd2\u1cd4-\u1ce0\u1ce2-\u1ce8\u1ced\u1cf4\u1cf8-\u1cf9\u1dc0-\u1df5\u1dfc-\u1dff\u200c-\u200d\u20d0-\u20dc\u20dd-\u20e0\u20e1\u20e2-\u20e4\u20e5-\u20f0\u2cef-\u2cf1\u2d7f\u2de0-\u2dff\u302a-\u302d\u302e-\u302f\u3099-\u309a\ua66f\ua670-\ua672\ua674-\ua67d\ua69e-\ua69f\ua6f0-\ua6f1\ua802\ua806\ua80b\ua825-\ua826\ua8c4\ua8e0-\ua8f1\ua926-\ua92d\ua947-\ua951\ua980-\ua982\ua9b3\ua9b6-\ua9b9\ua9bc\ua9e5\uaa29-\uaa2e\uaa31-\uaa32\uaa35-\uaa36\uaa43\uaa4c\uaa7c\uaab0\uaab2-\uaab4\uaab7-\uaab8\uaabe-\uaabf\uaac1\uaaec-\uaaed\uaaf6\uabe5\uabe8\uabed\ufb1e\ufe00-\ufe0f\ufe20-\ufe2f\uff9e-\uff9f]");
        tinymce.text.ExtendingChar = {
            isExtendingChar: function(ch) {
                return "string" == typeof ch && 768 <= ch.charCodeAt(0) && extendingChars.test(ch);
            }
        };
    }(tinymce), function(tinymce) {
        tinymce.text.Zwsp = {
            isZwsp: function(chr) {
                return "\ufeff" === chr;
            },
            ZWSP: "\ufeff",
            trim: function(text) {
                return text.replace(new RegExp("\ufeff", "g"), "");
            }
        };
    }(tinymce), tinymce.util.Arr), contentEditable = tinymce.util.Fun, Uuid = tinymce.util.Uuid, cache = [], constant = contentEditable.constant;
    function get(id) {
        return findFirst(function(cachedBlobInfo) {
            return cachedBlobInfo.id() === id;
        });
    }
    function findFirst(predicate) {
        return Arr.filter(cache, predicate)[0];
    }
    function parseDataUri(uri) {
        var type, matches;
        return uri = decodeURIComponent(uri).split(","), {
            type: type = (matches = /data:([^;]+)/.exec(uri[0])) ? matches[1] : type,
            data: uri[1]
        };
    }
    tinymce.file.BlobCache = {
        create: function(o, blob, base64, filename) {
            return function(o) {
                var id, name;
                if (o.blob && o.base64) return id = o.id || Uuid.uuid("blobid"), 
                name = o.name || id, {
                    id: constant(id),
                    name: constant(name),
                    filename: constant(name + "." + ({
                        "image/jpeg": "jpg",
                        "image/jpg": "jpg",
                        "image/gif": "gif",
                        "image/png": "png"
                    }[o.blob.type.toLowerCase()] || "dat")),
                    blob: constant(o.blob),
                    base64: constant(o.base64),
                    blobUri: constant(o.blobUri || URL.createObjectURL(o.blob)),
                    uri: constant(o.uri)
                };
                throw "blob and base64 representations of the image are required for BlobInfo to be created";
            }("object" == typeof o ? o : {
                id: o,
                name: filename,
                blob: blob,
                base64: base64
            });
        },
        add: function(blobInfo) {
            get(blobInfo.id()) || cache.push(blobInfo);
        },
        get: get,
        getByUri: function(blobUri) {
            return findFirst(function(blobInfo) {
                return blobInfo.blobUri() == blobUri;
            });
        },
        findFirst: findFirst,
        removeByUri: function(blobUri) {
            cache = Arr.filter(cache, function(blobInfo) {
                return blobInfo.blobUri() !== blobUri || (URL.revokeObjectURL(blobInfo.blobUri()), 
                !1);
            });
        },
        destroy: function() {
            Arr.each(cache, function(cachedBlobInfo) {
                URL.revokeObjectURL(cachedBlobInfo.blobUri());
            }), cache = [];
        }
    }, tinymce.file.Conversions = {
        uriToBlob: function(url) {
            var uri;
            return 0 === url.indexOf("blob:") ? function(url) {
                return new Promise(function(resolve, reject) {
                    function rejectWithError() {
                        reject("Cannot convert " + url + " to Blob. Resource might not exist or is inaccessible.");
                    }
                    try {
                        var xhr = new XMLHttpRequest();
                        xhr.open("GET", url, !0), xhr.responseType = "blob", xhr.onload = function() {
                            200 == this.status ? resolve(this.response) : rejectWithError();
                        }, xhr.onerror = rejectWithError, xhr.send();
                    } catch (ex) {
                        rejectWithError();
                    }
                });
            }(url) : 0 === url.indexOf("data:") ? (uri = url, new Promise(function(resolve) {
                var str, arr, i;
                uri = parseDataUri(uri);
                try {
                    str = atob(uri.data);
                } catch (e) {
                    return void resolve(new Blob([]));
                }
                for (arr = new Uint8Array(str.length), i = 0; i < arr.length; i++) arr[i] = str.charCodeAt(i);
                resolve(new Blob([ arr ], {
                    type: uri.type
                }));
            })) : null;
        },
        blobToDataUri: function(blob) {
            return new Promise(function(resolve) {
                var reader = new FileReader();
                reader.onloadend = function() {
                    resolve(reader.result);
                }, reader.readAsDataURL(blob);
            });
        },
        parseDataUri: parseDataUri
    }, function(tinymce) {
        var namedEntities, baseEntities, reverseEntities, attrsCharsRegExp = /[&<>\"\u0060\u007E-\uD7FF\uE000-\uFFEF]|[\uD800-\uDBFF][\uDC00-\uDFFF]/g, textCharsRegExp = /[<>&\u007E-\uD7FF\uE000-\uFFEF]|[\uD800-\uDBFF][\uDC00-\uDFFF]/g, rawCharsRegExp = /[<>&\"\']/g, entityRegExp = /&#([a-z0-9]+);?|&([a-z0-9]+);/gi, asciiMap = {
            128: "\u20ac",
            130: "\u201a",
            131: "\u0192",
            132: "\u201e",
            133: "\u2026",
            134: "\u2020",
            135: "\u2021",
            136: "\u02c6",
            137: "\u2030",
            138: "\u0160",
            139: "\u2039",
            140: "\u0152",
            142: "\u017d",
            145: "\u2018",
            146: "\u2019",
            147: "\u201c",
            148: "\u201d",
            149: "\u2022",
            150: "\u2013",
            151: "\u2014",
            152: "\u02dc",
            153: "\u2122",
            154: "\u0161",
            155: "\u203a",
            156: "\u0153",
            158: "\u017e",
            159: "\u0178"
        };
        function buildEntitiesLookup(items, radix) {
            var i, chr, entity, lookup = {};
            if (items) {
                for (items = items.split(","), radix = radix || 10, i = 0; i < items.length; i += 2) chr = String.fromCharCode(parseInt(items[i], radix)), 
                baseEntities[chr] || (entity = "&" + items[i + 1] + ";", lookup[chr] = entity, 
                lookup[entity] = chr);
                return lookup;
            }
        }
        baseEntities = {
            '"': "&quot;",
            "'": "&#39;",
            "<": "&lt;",
            ">": "&gt;",
            "&": "&amp;",
            "`": "&#96;"
        }, reverseEntities = {
            "&lt;": "<",
            "&gt;": ">",
            "&amp;": "&",
            "&quot;": '"',
            "&apos;": "'"
        }, namedEntities = buildEntitiesLookup("50,nbsp,51,iexcl,52,cent,53,pound,54,curren,55,yen,56,brvbar,57,sect,58,uml,59,copy,5a,ordf,5b,laquo,5c,not,5d,shy,5e,reg,5f,macr,5g,deg,5h,plusmn,5i,sup2,5j,sup3,5k,acute,5l,micro,5m,para,5n,middot,5o,cedil,5p,sup1,5q,ordm,5r,raquo,5s,frac14,5t,frac12,5u,frac34,5v,iquest,60,Agrave,61,Aacute,62,Acirc,63,Atilde,64,Auml,65,Aring,66,AElig,67,Ccedil,68,Egrave,69,Eacute,6a,Ecirc,6b,Euml,6c,Igrave,6d,Iacute,6e,Icirc,6f,Iuml,6g,ETH,6h,Ntilde,6i,Ograve,6j,Oacute,6k,Ocirc,6l,Otilde,6m,Ouml,6n,times,6o,Oslash,6p,Ugrave,6q,Uacute,6r,Ucirc,6s,Uuml,6t,Yacute,6u,THORN,6v,szlig,70,agrave,71,aacute,72,acirc,73,atilde,74,auml,75,aring,76,aelig,77,ccedil,78,egrave,79,eacute,7a,ecirc,7b,euml,7c,igrave,7d,iacute,7e,icirc,7f,iuml,7g,eth,7h,ntilde,7i,ograve,7j,oacute,7k,ocirc,7l,otilde,7m,ouml,7n,divide,7o,oslash,7p,ugrave,7q,uacute,7r,ucirc,7s,uuml,7t,yacute,7u,thorn,7v,yuml,ci,fnof,sh,Alpha,si,Beta,sj,Gamma,sk,Delta,sl,Epsilon,sm,Zeta,sn,Eta,so,Theta,sp,Iota,sq,Kappa,sr,Lambda,ss,Mu,st,Nu,su,Xi,sv,Omicron,t0,Pi,t1,Rho,t3,Sigma,t4,Tau,t5,Upsilon,t6,Phi,t7,Chi,t8,Psi,t9,Omega,th,alpha,ti,beta,tj,gamma,tk,delta,tl,epsilon,tm,zeta,tn,eta,to,theta,tp,iota,tq,kappa,tr,lambda,ts,mu,tt,nu,tu,xi,tv,omicron,u0,pi,u1,rho,u2,sigmaf,u3,sigma,u4,tau,u5,upsilon,u6,phi,u7,chi,u8,psi,u9,omega,uh,thetasym,ui,upsih,um,piv,812,bull,816,hellip,81i,prime,81j,Prime,81u,oline,824,frasl,88o,weierp,88h,image,88s,real,892,trade,89l,alefsym,8cg,larr,8ch,uarr,8ci,rarr,8cj,darr,8ck,harr,8dl,crarr,8eg,lArr,8eh,uArr,8ei,rArr,8ej,dArr,8ek,hArr,8g0,forall,8g2,part,8g3,exist,8g5,empty,8g7,nabla,8g8,isin,8g9,notin,8gb,ni,8gf,prod,8gh,sum,8gi,minus,8gn,lowast,8gq,radic,8gt,prop,8gu,infin,8h0,ang,8h7,and,8h8,or,8h9,cap,8ha,cup,8hb,int,8hk,there4,8hs,sim,8i5,cong,8i8,asymp,8j0,ne,8j1,equiv,8j4,le,8j5,ge,8k2,sub,8k3,sup,8k4,nsub,8k6,sube,8k7,supe,8kl,oplus,8kn,otimes,8l5,perp,8m5,sdot,8o8,lceil,8o9,rceil,8oa,lfloor,8ob,rfloor,8p9,lang,8pa,rang,9ea,loz,9j0,spades,9j3,clubs,9j5,hearts,9j6,diams,ai,OElig,aj,oelig,b0,Scaron,b1,scaron,bo,Yuml,m6,circ,ms,tilde,802,ensp,803,emsp,809,thinsp,80c,zwnj,80d,zwj,80e,lrm,80f,rlm,80j,ndash,80k,mdash,80o,lsquo,80p,rsquo,80q,sbquo,80s,ldquo,80t,rdquo,80u,bdquo,810,dagger,811,Dagger,81g,permil,81p,lsaquo,81q,rsaquo,85c,euro", 32), 
        tinymce.html = tinymce.html || {}, tinymce.html.Entities = {
            encodeRaw: function(text, attr) {
                return text.replace(attr ? attrsCharsRegExp : textCharsRegExp, function(chr) {
                    return baseEntities[chr] || chr;
                });
            },
            encodeAllRaw: function(text) {
                return ("" + text).replace(rawCharsRegExp, function(chr) {
                    return baseEntities[chr] || chr;
                });
            },
            encodeNumeric: function(text, attr) {
                return text.replace(attr ? attrsCharsRegExp : textCharsRegExp, function(chr) {
                    return 1 < chr.length ? "&#" + (1024 * (chr.charCodeAt(0) - 55296) + (chr.charCodeAt(1) - 56320) + 65536) + ";" : baseEntities[chr] || "&#" + chr.charCodeAt(0) + ";";
                });
            },
            encodeNamed: function(text, attr, entities) {
                return entities = entities || namedEntities, text.replace(attr ? attrsCharsRegExp : textCharsRegExp, function(chr) {
                    return baseEntities[chr] || entities[chr] || chr;
                });
            },
            getEncodeFunc: function(name, entities) {
                var Entities = tinymce.html.Entities;
                return entities = buildEntitiesLookup(entities) || namedEntities, 
                (name = tinymce.makeMap(name.replace(/\+/g, ","))).named && name.numeric ? function(text, attr) {
                    return text.replace(attr ? attrsCharsRegExp : textCharsRegExp, function(chr) {
                        return baseEntities[chr] || entities[chr] || "&#" + chr.charCodeAt(0) + ";" || chr;
                    });
                } : name.named ? entities ? function(text, attr) {
                    return Entities.encodeNamed(text, attr, entities);
                } : Entities.encodeNamed : name.numeric ? Entities.encodeNumeric : Entities.encodeRaw;
            },
            decode: function(text) {
                return text.replace(entityRegExp, function(all, numeric) {
                    return numeric ? 65535 < (numeric = "x" === numeric.charAt(0).toLowerCase() ? parseInt(numeric.substr(1), 16) : parseInt(numeric, 10)) ? (numeric -= 65536, 
                    String.fromCharCode(55296 + (numeric >> 10), 56320 + (1023 & numeric))) : asciiMap[numeric] || String.fromCharCode(numeric) : reverseEntities[all] || namedEntities[all] || (numeric = all, 
                    (all = document.createElement("div")).innerHTML = numeric, all.textContent) || all.innerText || numeric;
                });
            }
        };
    }(tinymce), tinymce.html.Styles = function(settings, schema) {
        var i, encodingItems, validStyles, invalidStyles, rgbRegExp = /rgb\s*\(\s*([0-9]+)\s*,\s*([0-9]+)\s*,\s*([0-9]+)\s*\)/gi, urlOrStrRegExp = /(?:url(?:(?:\(\s*\"([^\"]+)\"\s*\))|(?:\(\s*\'([^\']+)\'\s*\))|(?:\(\s*([^)\s]+)\s*\))))|(?:\'([^\']+)\')|(?:\"([^\"]+)\")/gi, styleRegExp = /\s*([^:]+):\s*([^;]+);?/g, trimRightRegExp = /\s+$/, encodingLookup = {};
        for (settings = settings || {}, schema && (validStyles = schema.getValidStyles(), 
        invalidStyles = schema.getInvalidStyles()), encodingItems = "\\\" \\' \\; \\: ; : \ufeff".split(" "), 
        i = 0; i < encodingItems.length; i++) encodingLookup[encodingItems[i]] = "\ufeff" + i, 
        encodingLookup["\ufeff" + i] = encodingItems[i];
        function toHex(match, r, g, b) {
            function hex(val) {
                return 1 < (val = parseInt(val, 10).toString(16)).length ? val : "0" + val;
            }
            return "#" + hex(r) + hex(g) + hex(b);
        }
        return {
            toHex: function(color) {
                return color.replace(rgbRegExp, toHex);
            },
            parse: function(css) {
                var matches, name, value, isEncoded, a, b, c, styles = {}, urlConverter = settings.url_converter, urlConverterScope = settings.url_converter_scope || this;
                function compress(prefix, suffix, noJoin) {
                    var right, bottom, left, top = styles[prefix + "-top" + suffix];
                    if (top && (right = styles[prefix + "-right" + suffix]) && (bottom = styles[prefix + "-bottom" + suffix]) && (left = styles[prefix + "-left" + suffix])) {
                        var box = [ top, right, bottom, left ];
                        for (i = box.length - 1; i-- && box[i] === box[i + 1]; );
                        -1 < i && noJoin || (styles[prefix + suffix] = -1 == i ? box[0] : box.join(" "), 
                        delete styles[prefix + "-top" + suffix], delete styles[prefix + "-right" + suffix], 
                        delete styles[prefix + "-bottom" + suffix], delete styles[prefix + "-left" + suffix]);
                    }
                }
                function canCompress(key) {
                    var i, value = styles[key];
                    if (value) {
                        for (i = (value = value.split(" ")).length; i--; ) if (value[i] !== value[0]) return;
                        return styles[key] = value[0], 1;
                    }
                }
                function encode(str) {
                    return isEncoded = !0, encodingLookup[str];
                }
                function decode(str, keep_slashes) {
                    return isEncoded && (str = str.replace(/\uFEFF[0-9]/g, function(str) {
                        return encodingLookup[str];
                    })), keep_slashes ? str : str.replace(/\\([\'\";:])/g, "$1");
                }
                function processUrl(match, url, url2, url3, str, str2) {
                    if (str = str || str2) return "'" + (str = decode(str)).replace(/\'/g, "\\'") + "'";
                    if (url = decode(url || url2 || url3), !settings.allow_script_urls) {
                        if (str2 = url.replace(/[\s\r\n]+/, ""), /(java|vb)script:/i.test(str2)) return "";
                        if (!settings.allow_svg_data_urls && /^data:image\/svg/i.test(str2)) return "";
                    }
                    return "url('" + (url = urlConverter ? urlConverter.call(urlConverterScope, url, "style") : url).replace(/\'/g, "\\'") + "')";
                }
                if (css) {
                    for (css = (css = css.replace(/[\u0000-\u001F]/g, "")).replace(/\\[\"\';:\uFEFF]/g, encode).replace(/\"[^\"]+\"|\'[^\']+\'/g, function(str) {
                        return str.replace(/[;:]/g, encode);
                    }); matches = styleRegExp.exec(css); ) {
                        if (name = matches[1].replace(trimRightRegExp, "").toLowerCase(), 
                        value = (value = matches[2].replace(trimRightRegExp, "")).replace(/\\[0-9a-f]+/g, function(e) {
                            return String.fromCharCode(parseInt(e.substr(1), 16));
                        }), name && 0 < value.length) {
                            if (!settings.allow_script_urls && ("behavior" == name || /expression\s*\(|\/\*|\*\//.test(value))) continue;
                            "font-weight" === name && "700" === value ? value = "bold" : "color" !== name && "background-color" !== name || (value = value.toLowerCase()), 
                            value = (value = value.replace(rgbRegExp, toHex)).replace(urlOrStrRegExp, processUrl), 
                            styles[name] = isEncoded ? decode(value, !0) : value;
                        }
                        styleRegExp.lastIndex = matches.index + matches[0].length;
                    }
                    compress("border", "", !0), compress("border", "-width"), compress("border", "-color"), 
                    compress("border", "-style"), compress("padding", ""), compress("margin", ""), 
                    b = "border-style", c = "border-color", canCompress(a = "border-width") && canCompress(b) && canCompress(c) && (styles.border = styles[a] + " " + styles[b] + " " + styles[c], 
                    delete styles[a], delete styles[b], delete styles[c]), "medium none" === styles.border && delete styles.border, 
                    "none" === styles["border-image"] && delete styles["border-image"];
                }
                return styles;
            },
            serialize: function(styles, elementName) {
                var name, value, css = "";
                function serializeStyles(name) {
                    var i, l, value, styleList = validStyles[name];
                    if (styleList) for (i = 0, l = styleList.length; i < l; i++) name = styleList[i], 
                    void 0 !== (value = styles[name]) && 0 < value.length && (css += (0 < css.length ? " " : "") + name + ": " + value + ";");
                }
                if (elementName && validStyles) serializeStyles("*"), serializeStyles(elementName); else for (name in styles) void 0 !== (value = styles[name]) && 0 < value.length && (invalidStyles && !function(name, elementName) {
                    var styleMap = invalidStyles["*"];
                    return !(styleMap && styleMap[name] || (styleMap = invalidStyles[elementName]) && styleMap[name]);
                }(name, elementName) || (css += (0 < css.length ? " " : "") + name + ": " + value + ";"));
                return css;
            }
        };
    }, function(tinymce) {
        var mapCache = {}, dummyObj = {}, makeMap = tinymce.makeMap, each = tinymce.each, extend = tinymce.extend, explode = tinymce.explode, inArray = tinymce.inArray;
        function split(items, delim) {
            return items ? items.split(delim || " ") : [];
        }
        function compileElementMap(value, mode) {
            var styles;
            return value && (styles = {}, each(value = "string" == typeof value ? {
                "*": value
            } : value, function(value, key) {
                styles[key] = styles[key.toUpperCase()] = ("map" == mode ? makeMap : explode)(value, /[, ]/);
            })), styles;
        }
        tinymce.html.Schema = function(settings) {
            var validStyles, invalidStyles, schemaItems, whiteSpaceElementsMap, selfClosingElementsMap, shortEndedElementsMap, boolAttrMap, validClasses, blockElementsMap, nonEmptyElementsMap, moveCaretBeforeOnEnterElementsMap, textBlockElementsMap, textInlineElementsMap, transparentElementsMap, type, globalAttributes, phrasingContent, flowContent, transparentContent, microdataAttributes, schema, elements = {}, children = {}, patternElements = [], customElementsMap = {}, specialElements = {};
            function createLookupTable(option, default_value, extendWith) {
                var value = settings[option];
                return value ? value = makeMap(value, /[, ]/, makeMap(value.toUpperCase(), /[, ]/)) : (value = mapCache[option]) || (value = makeMap(default_value, " ", makeMap(default_value.toUpperCase(), " ")), 
                value = extend(value, extendWith), mapCache[option] = value), value;
            }
            function add(name, attributes, children) {
                var i, args = arguments;
                function arrayToMap(array, obj) {
                    for (var map = {}, i = 0, l = array.length; i < l; i++) map[array[i]] = obj || {};
                    return map;
                }
                for (attributes = attributes || "", children = "string" == typeof children ? split(children) : Array.isArray(children) ? children.slice() : [], 
                i = 3; i < args.length; i++) {
                    var extra = args[i];
                    if (extra) {
                        if ("string" == typeof extra) extra = split(extra); else {
                            if (!Array.isArray(extra)) continue;
                            extra = extra.slice();
                        }
                        children = children.concat(extra);
                    }
                }
                for (var attributesOrder, attributes = split(attributes), baseAttrs = arrayToMap(attributesOrder = [].concat(attributes, globalAttributes)), names = split(name), ni = names.length; ni--; ) schema[names[ni]] = {
                    attributes: baseAttrs,
                    attributesOrder: attributesOrder,
                    children: arrayToMap(children, dummyObj)
                };
            }
            function addAttrs(name, attributes) {
                var schemaItem, i, l, ni = (name = split(name)).length;
                for (attributes = split(attributes); ni--; ) for (schemaItem = schema[name[ni]], 
                i = 0, l = attributes.length; i < l; i++) schemaItem.attributes[attributes[i]] || (schemaItem.attributes[attributes[i]] = {}, 
                schemaItem.attributesOrder.push(attributes[i]));
            }
            function patternToRegExp(str) {
                return new RegExp("^" + str.replace(/([?+*])/g, ".$1") + "$");
            }
            function addValidElements(validElements) {
                var ei, el, ai, al, matches, element, attr, attrData, elementName, attrName, attrType, attributes, attributesOrder, prefix, outputName, globalAttributes, globalAttributesOrder, key, value, elementRuleRegExp = /^([#+\-])?([^\[!\/]+)(?:\/([^\[!]+))?(?:(!?)\[([^\]]+)\])?$/, attrRuleRegExp = /^([!\-])?(\w+::\w+|[^=:<]+)?(?:([=:<])(.*))?$/, hasPatternsRegExp = /[*?+]/;
                if (validElements) for (validElements = split(validElements, ","), 
                elements["@"] && (globalAttributes = elements["@"].attributes, globalAttributesOrder = elements["@"].attributesOrder), 
                ei = 0, el = validElements.length; ei < el; ei++) if (matches = elementRuleRegExp.exec(validElements[ei])) {
                    if (prefix = matches[1], elementName = matches[2], outputName = matches[3], 
                    attrData = matches[5], element = {
                        attributes: attributes = {},
                        attributesOrder: attributesOrder = []
                    }, "#" === prefix && (element.paddEmpty = !0), "-" === prefix && (element.removeEmpty = !0), 
                    "!" === matches[4] && (element.removeEmptyAttrs = !0), globalAttributes) {
                        for (key in globalAttributes) attributes[key] = globalAttributes[key];
                        attributesOrder.push.apply(attributesOrder, globalAttributesOrder);
                    }
                    if (attrData) for (ai = 0, al = (attrData = split(attrData, "|")).length; ai < al; ai++) (matches = attrRuleRegExp.exec(attrData[ai])) && (attr = {}, 
                    attrType = matches[1], attrName = matches[2].replace(/::/g, ":"), 
                    prefix = matches[3], value = matches[4], "!" === attrType && (element.attributesRequired = element.attributesRequired || [], 
                    element.attributesRequired.push(attrName), attr.required = !0), 
                    "-" === attrType ? (delete attributes[attrName], attributesOrder.splice(inArray(attributesOrder, attrName), 1)) : (prefix && ("=" === prefix && (element.attributesDefault = element.attributesDefault || [], 
                    element.attributesDefault.push({
                        name: attrName,
                        value: value
                    }), attr.defaultValue = value), ":" === prefix && (element.attributesForced = element.attributesForced || [], 
                    element.attributesForced.push({
                        name: attrName,
                        value: value
                    }), attr.forcedValue = value), "<" === prefix) && (attr.validValues = makeMap(value, "?")), 
                    hasPatternsRegExp.test(attrName) ? (element.attributePatterns = element.attributePatterns || [], 
                    attr.pattern = patternToRegExp(attrName), element.attributePatterns.push(attr)) : (attributes[attrName] || attributesOrder.push(attrName), 
                    attributes[attrName] = attr)));
                    globalAttributes || "@" != elementName || (globalAttributes = attributes, 
                    globalAttributesOrder = attributesOrder), outputName && (element.outputName = elementName, 
                    elements[outputName] = element), hasPatternsRegExp.test(elementName) ? (element.pattern = patternToRegExp(elementName), 
                    patternElements.push(element)) : elements[elementName] = element;
                }
            }
            function setValidElements(validElements) {
                elements = {}, patternElements = [], addValidElements(validElements), 
                each(schemaItems, function(element, name) {
                    children[name] = element.children;
                });
            }
            function addCustomElements(customElements) {
                var customElementRegExp = /^(~)?(.+)$/;
                customElements && (mapCache.text_block_elements = mapCache.block_elements = null, 
                each(split(customElements, ","), function(rule) {
                    var inline = "~" === (rule = customElementRegExp.exec(rule))[1], cloneName = inline ? "span" : "div", name = rule[2];
                    children[name] = children[cloneName], customElementsMap[name] = cloneName, 
                    inline || (blockElementsMap[name.toUpperCase()] = {}, blockElementsMap[name] = {}), 
                    elements[name] || (rule = elements[cloneName], delete (rule = extend({}, rule)).removeEmptyAttrs, 
                    delete rule.removeEmpty, elements[name] = rule), each(children, function(element, elmName) {
                        element[cloneName] && (children[elmName] = element = extend({}, children[elmName]), 
                        element[name] = element[cloneName]);
                    });
                }));
            }
            function addValidChildren(validChildren) {
                var childRuleRegExp = /^([+\-]?)(\w+)\[([^\]]+)\]$/;
                validChildren && each(split(validChildren, ","), function(rule) {
                    var parent, prefix, matches = childRuleRegExp.exec(rule);
                    matches && (prefix = matches[1], parent = prefix ? children[matches[2]] : children[matches[2]] = {
                        "#comment": {}
                    }, parent = children[matches[2]], each(split(matches[3], "|"), function(child) {
                        "-" === prefix ? (children[matches[2]] = parent = extend({}, children[matches[2]]), 
                        delete parent[child]) : parent[child] = {};
                    }));
                });
            }
            function getElementRule(name) {
                var i, element = elements[name];
                if (element) return element;
                for (i = patternElements.length; i--; ) if ((element = patternElements[i]).pattern.test(name)) return element;
            }
            type = (settings = settings || {}).schema, schema = {}, schemaItems = mapCache[type] || (globalAttributes = split("id accesskey class dir lang style tabindex title"), 
            microdataAttributes = split("itemprop itemscope itemtype itemid itemref"), 
            globalAttributes.push.apply(globalAttributes, microdataAttributes), 
            microdataAttributes = split("onclick ondblclick onmousedown onmouseup onmouseover onmousemove onmouseout onkeypress onkeydown onkeyup"), 
            "html4" != type && microdataAttributes.push.apply(microdataAttributes, split("onabort onblur oncancel oncanplay oncanplaythrough onchange onclose oncontextmenu oncuechange ondrag ondragend ondragenter ondragleave ondragover ondragstart ondrop ondurationchange onemptied onended onerror onfocus oninput oninvalid onload onloadeddata onloadedmetadata onloadstart onmouseenter onmouseleave onmousewheel onpause onplay onplaying onprogress onratechange onreset onscroll onseeked onseeking onseeking onselect onshow onstalled onsubmit onsuspend ontimeupdate onvolumechange onwaiting onwheel")), 
            globalAttributes.push.apply(globalAttributes, microdataAttributes), 
            globalAttributes.push.apply(globalAttributes, split("role")), microdataAttributes = split("address blockquote div dl fieldset form h1 h2 h3 h4 h5 h6 hr menu ol p pre table ul template"), 
            phrasingContent = split("a abbr b bdo br button cite code del dfn em embed i iframe img input ins kbd label map noscript object q s samp script select small span strong sub sup textarea u var link style #text #comment"), 
            transparentContent = split("a ins del canvas map"), "html4" != type && (globalAttributes.push.apply(globalAttributes, split("contenteditable contextmenu draggable dropzone hidden spellcheck translate")), 
            microdataAttributes.push.apply(microdataAttributes, split("article aside details dialog figure header footer hgroup section nav")), 
            microdataAttributes.push.apply(microdataAttributes, transparentContent), 
            phrasingContent.push.apply(phrasingContent, split("audio canvas command datalist mark meter output picture progress time wbr video ruby bdi keygen"))), 
            "html5-strict" != type && (globalAttributes.push("xml:lang"), transparentContent = split("acronym applet basefont big font strike tt"), 
            phrasingContent.push.apply(phrasingContent, transparentContent), each(transparentContent, function(name) {
                add(name, "", phrasingContent);
            }), transparentContent = split("center dir isindex noframes"), microdataAttributes.push.apply(microdataAttributes, transparentContent), 
            flowContent = [].concat(microdataAttributes, phrasingContent), each(transparentContent, function(name) {
                add(name, "", flowContent);
            })), flowContent = flowContent || [].concat(microdataAttributes, phrasingContent), 
            add("html", "manifest", "head body"), add("head", "", "base command link meta noscript script style title"), 
            add("title hr noscript br"), add("base", "href target"), add("link", "href rel media hreflang type sizes"), 
            add("meta", "name http-equiv content charset"), add("style", "media type scoped"), 
            add("script", "src async defer type charset"), add("body", "onafterprint onbeforeprint onbeforeunload onblur onerror onfocus onhashchange onload onmessage onoffline ononline onpagehide onpageshow onpopstate onresize onscroll onstorage onunload", flowContent), 
            add("address dt dd div caption", "", flowContent), add("h1 h2 h3 h4 h5 h6 pre p abbr code var samp kbd sub sup i b u bdo span legend em strong small s cite dfn", "", phrasingContent), 
            add("blockquote", "cite", flowContent), add("ol", "reversed start type", "li"), 
            add("ul", "", "li"), add("li", "value", flowContent), add("dl", "", "dt dd"), 
            add("a", "href target rel media hreflang type", phrasingContent), add("q", "cite", phrasingContent), 
            add("ins del", "cite datetime", flowContent), add("img", "src sizes srcset alt usemap ismap width height"), 
            add("iframe", "src name width height", flowContent), add("embed", "src type width height"), 
            add("object", "data type typemustmatch name usemap form width height", flowContent.concat([ "param" ]).join(" ")), 
            add("param", "name value"), add("map", "name", flowContent.concat([ "area" ]).join(" ")), 
            add("area", "alt coords shape href target rel media hreflang type"), 
            add("table", "border", "caption colgroup thead tfoot tbody tr" + ("html4" == type ? " col" : "")), 
            add("colgroup", "span", "col"), add("col", "span"), add("tbody thead tfoot", "", "tr"), 
            add("tr", "", "td th"), add("td", "colspan rowspan headers", flowContent), 
            add("th", "colspan rowspan headers scope abbr", flowContent), add("form", "accept-charset action autocomplete enctype method name novalidate target", flowContent), 
            add("fieldset", "disabled form name", flowContent.concat([ "legend" ]).join(" ")), 
            add("label", "form for", phrasingContent), add("input", "accept alt autocomplete checked dirname disabled form formaction formenctype formmethod formnovalidate formtarget height list max maxlength min multiple name pattern readonly required size src step type value width"), 
            add("button", "disabled form formaction formenctype formmethod formnovalidate formtarget name type value", "html4" == type ? flowContent : phrasingContent), 
            add("select", "disabled form multiple name required size", "option optgroup"), 
            add("optgroup", "disabled label", "option"), add("option", "disabled label selected value"), 
            add("textarea", "cols dirname disabled form maxlength name readonly required rows wrap"), 
            add("menu", "type label", flowContent, "li"), add("noscript", "", flowContent), 
            add("code", "", phrasingContent), "html4" != type && (add("wbr"), add("ruby", "", phrasingContent.concat([ "rt", "rp" ]).join(" ")), 
            add("figcaption", "", flowContent), add("mark rt rp summary bdi", "", phrasingContent), 
            add("canvas", "width height", flowContent), add("video", "src crossorigin poster preload autoplay mediagroup loop muted controls width height buffered controlslist playsinline", flowContent.concat([ "track", "source" ]).join(" ")), 
            add("audio", "src crossorigin preload autoplay mediagroup loop muted controls buffered volume controlslist", flowContent.concat([ "track", "source" ]).join(" ")), 
            add("picture", "", "img source"), add("source", "src srcset type media sizes"), 
            add("track", "kind src srclang label default"), add("datalist", "", phrasingContent.concat([ "option" ]).join(" ")), 
            add("article section nav aside header footer", "", flowContent), add("hgroup", "", "h1 h2 h3 h4 h5 h6"), 
            add("figure", "", flowContent.concat([ "figcaption" ]).join(" ")), add("time", "datetime", phrasingContent), 
            add("dialog", "open", flowContent), add("command", "type label icon disabled checked radiogroup command"), 
            add("output", "for form name", phrasingContent), add("progress", "value max", phrasingContent), 
            add("meter", "value min max low high optimum", phrasingContent), add("details", "open", flowContent.concat([ "summary" ]).join(" ")), 
            add("keygen", "autofocus challenge disabled form keytype name"), add("a", "href target rel media hreflang type", flowContent)), 
            addAttrs("form", "onblur onchange onfocus onselect onsubmit"), "html5-strict" != type && (addAttrs("script", "language xml:space"), 
            addAttrs("style", "xml:space"), addAttrs("object", "declare classid code codebase codetype archive standby align border hspace vspace"), 
            addAttrs("embed", "align name hspace vspace"), addAttrs("param", "valuetype type"), 
            addAttrs("a", "charset name rev shape coords"), addAttrs("br", "clear"), 
            addAttrs("applet", "codebase archive code object alt name width height align hspace vspace"), 
            addAttrs("img", "name longdesc align border hspace vspace"), addAttrs("iframe", "longdesc frameborder marginwidth marginheight scrolling align"), 
            addAttrs("font basefont", "size color face"), addAttrs("input", "usemap align"), 
            addAttrs("select", "onchange"), addAttrs("textarea"), addAttrs("h1 h2 h3 h4 h5 h6 div p legend caption", "align"), 
            addAttrs("ul", "type compact"), addAttrs("li", "type"), addAttrs("ol dl menu dir", "compact"), 
            addAttrs("pre", "width xml:space"), addAttrs("hr", "align noshade size width"), 
            addAttrs("isindex", "prompt"), addAttrs("table", "summary width frame rules cellspacing cellpadding align bgcolor"), 
            addAttrs("col", "width align char charoff valign"), addAttrs("colgroup", "width align char charoff valign"), 
            addAttrs("thead", "align char charoff valign"), addAttrs("tr", "align char charoff valign bgcolor"), 
            addAttrs("th", "axis align char charoff valign nowrap bgcolor width height"), 
            addAttrs("form", "accept"), addAttrs("td", "abbr axis scope align char charoff valign nowrap bgcolor width height"), 
            addAttrs("tfoot", "align char charoff valign"), addAttrs("tbody", "align char charoff valign"), 
            addAttrs("area", "nohref"), addAttrs("body", "background bgcolor text link vlink alink"), 
            addAttrs("form", "onreset")), "html4" != type && (addAttrs("input button select textarea", "autofocus"), 
            addAttrs("input textarea", "placeholder"), addAttrs("a", "download referrerpolicy"), 
            addAttrs("link script img", "crossorigin"), addAttrs("iframe", "sandbox seamless allowfullscreen allow loading"), 
            addAttrs("a img iframe", "referrerpolicy"), addAttrs("img", "loading decoding elementtiming fetchpriority"), 
            addAttrs("link", "as disabled imagesizes imagesrcset title"), addAttrs("form", "oncontextmenu onformchange onforminput oninput oninvalid"), 
            addAttrs("video audio", "onabort oncanplay oncanplaythrough ondurationchange onemptied onended onerror onloadeddata onloadedmetadata onloadstart onpause onplay onplaying onprogress onratechange onreadystatechange onseeked onseeking onstalled onsuspend ontimeupdate onvolumechange onwaiting")), 
            each(split("a form meter progress dfn"), function(name) {
                schema[name] && delete schema[name].children[name];
            }), delete schema.caption.children.table, mapCache[type] = schema), 
            !1 === settings.verify_html && (settings.valid_elements = "*[*]"), validStyles = compileElementMap(settings.valid_styles), 
            invalidStyles = compileElementMap(settings.invalid_styles, "map"), validClasses = compileElementMap(settings.valid_classes, "map"), 
            whiteSpaceElementsMap = createLookupTable("whitespace_elements", "pre script noscript style textarea video audio iframe object code"), 
            selfClosingElementsMap = createLookupTable("self_closing_elements", "colgroup dd dt li option p td tfoot th thead tr"), 
            shortEndedElementsMap = createLookupTable("short_ended_elements", "area base basefont br col frame hr img input isindex link meta param embed source wbr track"), 
            boolAttrMap = createLookupTable("boolean_attributes", "async checked compact declare defer disabled ismap multiple nohref noresize noshade nowrap readonly selected autoplay loop controls itemscope playsinline spellcheck contextmenu draggable hidden allowfullscreen muted"), 
            nonEmptyElementsMap = createLookupTable("non_empty_elements", "td th iframe video audio object script pre code", shortEndedElementsMap), 
            moveCaretBeforeOnEnterElementsMap = createLookupTable("move_caret_before_on_enter_elements", "table", nonEmptyElementsMap), 
            textBlockElementsMap = createLookupTable("text_block_elements", "h1 h2 h3 h4 h5 h6 p div address pre form blockquote center dir fieldset header footer article section hgroup aside main nav figure"), 
            blockElementsMap = createLookupTable("block_elements", "hr table tbody thead tfoot th tr td li ol ul caption dl dt dd noscript menu isindex option datalist select optgroup figcaption details summary", textBlockElementsMap), 
            textInlineElementsMap = createLookupTable("text_inline_elements", "span strong b em i font s strike u var citedfn code mark q sup sub samp"), 
            transparentElementsMap = createLookupTable("transparent_elements", "a ins del canvas map"), 
            each((settings.special || "script noscript iframe noframes noembed title style textarea xmp").split(" "), function(name) {
                specialElements[name] = new RegExp("</" + name + "[^>]*>", "gi");
            }), settings.valid_elements ? setValidElements(settings.valid_elements) : (each(schemaItems, function(element, name) {
                elements[name] = {
                    attributes: element.attributes,
                    attributesOrder: element.attributesOrder
                }, children[name] = element.children;
            }), "html4" !== settings.schema && !settings.prefer_strong_and_em || each(split("strong/b em/i"), function(item) {
                item = split(item, "/"), elements[item[1]].outputName = item[0];
            }), !1 !== settings.img_default_alt_attribute && (elements.img.attributesDefault = [ {
                name: "alt",
                value: ""
            } ]), each(textInlineElementsMap, function(_val, name) {
                elements[name] && (settings.padd_empty_block_inline_children && (elements[name].paddInEmptyBlock = !0), 
                elements[name].removeEmpty = !0);
            }), each(split("ol ul blockquote a table tbody"), function(name) {
                elements[name] && (elements[name].removeEmpty = !0);
            }), each(split("p h1 h2 h3 h4 h5 h6 th td pre div address caption li summary"), function(name) {
                elements[name] && (elements[name].paddEmpty = !0);
            }), !1 === settings.allow_empty_spans && each(split("span"), function(name) {
                elements[name].removeEmptyAttrs = !0;
            })), addCustomElements(settings.custom_elements), addValidChildren(settings.valid_children), 
            addValidElements(settings.extended_valid_elements), addValidChildren("+ol[ul|ol],+ul[ul|ol]"), 
            settings.invalid_elements && each(explode(settings.invalid_elements), function(item) {
                elements[item] && delete elements[item];
            }), getElementRule("span") || addValidElements("span[!data-mce-type|*]"), 
            this.children = children, this.getValidStyles = function() {
                return validStyles;
            }, this.getInvalidStyles = function() {
                return invalidStyles;
            }, this.getValidClasses = function() {
                return validClasses;
            }, this.getBoolAttrs = function() {
                return boolAttrMap;
            }, this.getBlockElements = function() {
                return blockElementsMap;
            }, this.getTextBlockElements = function() {
                return textBlockElementsMap;
            }, this.getTextRootBlockElements = function() {
                return makeMap("td th li dt dd figcaption caption details summary", textBlockElementsMap);
            }, this.getTextInlineElements = function() {
                return textInlineElementsMap;
            }, this.getShortEndedElements = function() {
                return shortEndedElementsMap;
            }, this.getSelfClosingElements = function() {
                return selfClosingElementsMap;
            }, this.getNonEmptyElements = function() {
                return nonEmptyElementsMap;
            }, this.getMoveCaretBeforeOnEnterElements = function() {
                return moveCaretBeforeOnEnterElementsMap;
            }, this.getWhiteSpaceElements = function() {
                return whiteSpaceElementsMap;
            }, this.getSpecialElements = function() {
                return specialElements;
            }, this.getTransparentElements = function() {
                return transparentElementsMap;
            }, this.isValidChild = function(name, child) {
                return !(!(name = children[name]) || !name[child]);
            }, this.isValid = function(name, attr) {
                var attrPatterns, i, rule = getElementRule(name);
                if (rule) {
                    if (!attr) return !0;
                    if (rule.attributes[attr]) return !0;
                    if (attrPatterns = rule.attributePatterns) for (i = attrPatterns.length; i--; ) if (attrPatterns[i].pattern.test(name)) return !0;
                }
                return !1;
            }, this.getElementRule = getElementRule, this.getCustomElements = function() {
                return customElementsMap;
            }, this.addValidElements = addValidElements, this.setValidElements = setValidElements, 
            this.getValidElements = function() {
                return elements;
            }, this.addCustomElements = addCustomElements, this.addValidChildren = addValidChildren, 
            this.elements = elements;
        };
    }(tinymce), function(tinymce) {
        var cachedDocument, each = tinymce.each, Entities = tinymce.html.Entities, filteredClobberElements = tinymce.makeMap("button,fieldset,form,iframe,img,image,input,object,output,select,textarea");
        cachedDocument = null;
        tinymce.html.SaxParser = function(settings, schema) {
            var self = this, doc = cachedDocument = cachedDocument || document.implementation.createHTMLDocument("parser"), form = doc.createElement("form");
            function noop() {}
            settings = settings || {}, self.schema = schema = schema || new tinymce.html.Schema(), 
            !1 !== settings.fix_self_closing && (settings.fix_self_closing = !0), 
            !0 !== settings.allow_event_attributes && (settings.allow_event_attributes = !1), 
            !1 !== settings.preserve_cdata && (settings.preserve_cdata = !0), each("comment cdata text start end pi doctype".split(" "), function(name) {
                name && (self[name] = settings[name] || noop);
            }), self.findEndTag = function(schema, html, startIndex) {
                var index, matches, count = 1, shortEndedElements = schema.getShortEndedElements(), tokenRegExp = /<([!?\/])?([A-Za-z0-9\-_\:\.]+)((?:\s+[^"\'>]+(?:(?:"[^"]*")|(?:\'[^\']*\')|[^>]*))*|\/|\s+)>/g;
                for (tokenRegExp.lastIndex = index = startIndex; matches = tokenRegExp.exec(html); ) {
                    if (index = tokenRegExp.lastIndex, "/" === matches[1]) count--; else if (!matches[1]) {
                        if (matches[2] in shortEndedElements) continue;
                        count++;
                    }
                    if (0 === count) break;
                }
                return index;
            }, self.parse = function(html, format) {
                var matches, value, attrList, i, text, name, isInternalElement, removeInternalElements, shortEndedElements, fillAttrsMap, isShortEnded, validate, elementRule, isValidElement, attr, attribsValue, validAttributesMap, validAttributePatterns, attributesRequired, attributesDefault, attributesForced, selfClosing, tokenRegExp, attrRegExp, specialElements, attrValue, fixSelfClosing, processHtml, self = this, index = 0, stack = [], idCount = 0, decode = Entities.decode, filteredUrlAttrs = tinymce.makeMap("src,href,data,background,formaction,poster,xlink:href");
                function processEndTag(name) {
                    for (var i, pos = stack.length; pos-- && stack[pos].name !== name; );
                    if (0 <= pos) {
                        for (i = stack.length - 1; pos <= i; i--) (name = stack[i]).valid && self.end(name.name);
                        stack.length = pos;
                    }
                }
                function isFilterdUrlAttribute(name) {
                    return name in filteredUrlAttrs;
                }
                function processComment(value) {
                    return "" === value || (">" === value.charAt(0) && (value = " " + value), 
                    settings.allow_conditional_comments) || "[if" !== value.substr(0, 3).toLowerCase() ? value : " " + value;
                }
                function trimComments(text) {
                    for (var sanitizedText = text; /<!--|--!?>/g.test(sanitizedText); ) sanitizedText = sanitizedText.replace(/<!--|--!?>/g, "");
                    return sanitizedText;
                }
                for (format = format || "html", tokenRegExp = new RegExp("<(?:(?:!--([\\w\\W]*?)--!?>)|(?:!\\[CDATA\\[([\\w\\W]*?)\\]\\]>)|(?:![Dd][Oo][Cc][Tt][Yy][Pp][Ee]([\\w\\W]*?)>)|(?:\\?([^\\s\\/<>]+) ?([\\w\\W]*?)[?/]>)|(?:\\/([A-Za-z][A-Za-z0-9\\-_\\:\\.]*)>)|(?:([A-Za-z][A-Za-z0-9\\-_\\:\\.]*)((?:\\s+[^\"'>]+(?:(?:\"[^\"]*\")|(?:'[^']*')|[^>]*))*|\\/|\\s+)>))", "g"), 
                attrRegExp = /([\w:\-]+)(?:\s*=\s*(?:(?:\"((?:[^\"])*)\")|(?:\'((?:[^\'])*)\')|([^>\s]+)))?/g, 
                shortEndedElements = schema.getShortEndedElements(), selfClosing = settings.self_closing_elements || schema.getSelfClosingElements(), 
                fillAttrsMap = schema.getBoolAttrs(), validate = settings.validate, 
                removeInternalElements = settings.remove_internals, fixSelfClosing = settings.fix_self_closing, 
                specialElements = schema.getSpecialElements(), processHtml = html + ">"; matches = tokenRegExp.exec(processHtml); ) {
                    if (index < matches.index && self.text(decode(html.substr(index, matches.index - index))), 
                    value = matches[6]) processEndTag(value = ":" === (value = value.toLowerCase()).charAt(0) ? value.substr(1) : value); else if (value = matches[7]) {
                        if (matches.index + matches[0].length > html.length) {
                            self.text(decode(html.substr(matches.index))), index = matches.index + matches[0].length;
                            continue;
                        }
                        isShortEnded = (value = ":" === (value = value.toLowerCase()).charAt(0) ? value.substr(1) : value) in shortEndedElements, 
                        fixSelfClosing && selfClosing[value] && 0 < stack.length && stack[stack.length - 1].name === value && processEndTag(value);
                        var attrString, regExp = attrRegExp, attrString = matches[8];
                        if (null !== (attrString = (regExp = regExp.exec(attrString)) && (attrString = regExp[1], 
                        regExp = regExp[2], "string" == typeof attrString) && "data-mce-bogus" === attrString.toLowerCase() ? regExp : null)) {
                            if ("all" === attrString) {
                                index = self.findEndTag(schema, html, tokenRegExp.lastIndex), 
                                tokenRegExp.lastIndex = index;
                                continue;
                            }
                            isValidElement = !1;
                        }
                        if (!validate || (elementRule = schema.getElementRule(value))) {
                            if (isValidElement = !0, validate && (validAttributesMap = elementRule.attributes, 
                            validAttributePatterns = elementRule.attributePatterns), 
                            (attribsValue = matches[8]) ? ((isInternalElement = -1 !== attribsValue.indexOf("data-mce-type")) && removeInternalElements && (isValidElement = !1), 
                            (attrList = []).map = {}, attribsValue.replace(attrRegExp, (match, name, val, val2, val3) => (function(tagName, name, value, val2, val3) {
                                var attrRule, i;
                                if (value = (name = name.toLowerCase()) in fillAttrsMap ? name : decode(value || val2 || val3 || ""), 
                                validate && !isInternalElement && !(0 < name.indexOf("-")) && 0 !== name.indexOf("aria-")) {
                                    if (!settings.allow_event_attributes && 0 == name.indexOf("on")) return;
                                    if (!(attrRule = validAttributesMap[name]) && validAttributePatterns) {
                                        for (i = validAttributePatterns.length; i-- && !(attrRule = validAttributePatterns[i]).pattern.test(name); );
                                        -1 === i && (attrRule = null);
                                    }
                                    if (!attrRule) return;
                                    if (attrRule.validValues && !(value in attrRule.validValues)) return;
                                }
                                if (!(("name" === name || "id" === name) && tagName in filteredClobberElements && (value in doc || value in form)) && (!isFilterdUrlAttribute(name) || tinymce.util.URI.isDomSafe(value, tagName, settings))) {
                                    if (isInternalElement) {
                                        if (isFilterdUrlAttribute(name)) return;
                                        if (0 == name.indexOf("on") && !settings.allow_event_attributes) return;
                                    }
                                    attrList.map[name] = value, attrList.push({
                                        name: name,
                                        value: value
                                    });
                                }
                            }(value, name, val, val2, val3), ""))) : (attrList = []).map = {}, 
                            validate && !isInternalElement) {
                                if (attributesRequired = elementRule.attributesRequired, 
                                attributesDefault = elementRule.attributesDefault, 
                                attributesForced = elementRule.attributesForced, 
                                elementRule.removeEmptyAttrs && !attrList.length && (isValidElement = !1), 
                                attributesForced) for (i = attributesForced.length; i--; ) name = (attr = attributesForced[i]).name, 
                                "{$uid}" === (attrValue = attr.value) && (attrValue = "mce_" + idCount++), 
                                attrList.map[name] = attrValue, attrList.push({
                                    name: name,
                                    value: attrValue
                                });
                                if (attributesDefault) for (i = attributesDefault.length; i--; ) (name = (attr = attributesDefault[i]).name) in attrList.map || ("{$uid}" === (attrValue = attr.value) && (attrValue = "mce_" + idCount++), 
                                attrList.map[name] = attrValue, attrList.push({
                                    name: name,
                                    value: attrValue
                                }));
                                if (attributesRequired) {
                                    for (i = attributesRequired.length; i-- && !(attributesRequired[i] in attrList.map); );
                                    -1 === i && (isValidElement = !1);
                                }
                                if (attr = attrList.map["data-mce-bogus"]) {
                                    if ("all" === attr) {
                                        index = self.findEndTag(schema, html, tokenRegExp.lastIndex), 
                                        tokenRegExp.lastIndex = index;
                                        continue;
                                    }
                                    isValidElement = !1;
                                }
                            }
                            isValidElement && self.start(value, attrList, isShortEnded);
                        } else isValidElement = !1;
                        if ((regExp = specialElements[value]) && "title" != value && "textarea" != value) {
                            regExp.lastIndex = index = matches.index + matches[0].length, 
                            index = (matches = regExp.exec(html)) ? (isValidElement && (text = html.substr(index, matches.index - index)), 
                            matches.index + matches[0].length) : (text = html.substr(index), 
                            html.length), isValidElement && (0 < text.length && self.text(text, !0), 
                            self.end(value)), tokenRegExp.lastIndex = index;
                            continue;
                        }
                        isShortEnded || (attribsValue && attribsValue.indexOf("/") == attribsValue.length - 1 ? isValidElement && self.end(value) : stack.push({
                            name: value,
                            valid: isValidElement
                        }));
                    } else if (value = matches[1]) self.comment(trimComments(processComment(value))); else if (value = matches[2]) {
                        if (!("xml" === format || settings.preserve_cdata || 0 < stack.length && schema.isValidChild(stack[stack.length - 1].name, "#cdata"))) {
                            index = function(value, startIndex) {
                                var startTag = value || "", isBogus = 0 !== startTag.indexOf("--"), endIndex = function(html, isBogus, startIndex) {
                                    var endIfIndex, lcHtml = html.toLowerCase();
                                    return -1 !== lcHtml.indexOf("[if ", startIndex) && function(html, startIndex) {
                                        return /^\s*\[if [\w\W]+\]>.*<!\[endif\](--!?)?>/.test(html.substr(startIndex));
                                    }(lcHtml, startIndex) ? (endIfIndex = lcHtml.indexOf("[endif]", startIndex), 
                                    lcHtml.indexOf(">", endIfIndex)) : isBogus ? -1 !== (endIfIndex = lcHtml.indexOf(">", startIndex)) ? endIfIndex : lcHtml.length : ((isBogus = /--!?>/).lastIndex = startIndex, 
                                    (endIfIndex = isBogus.exec(html)) ? endIfIndex.index + endIfIndex[0].length : lcHtml.length);
                                }(value, isBogus, startIndex);
                                return value = value.substr(startIndex, endIndex - startIndex), 
                                value = processComment(isBogus ? startTag + value : value), 
                                endIndex + 1;
                            }("", matches.index + 2), tokenRegExp.lastIndex = index;
                            continue;
                        }
                        self.cdata(trimComments(value));
                    } else (value = matches[3]) ? self.doctype(value) : (value = matches[4]) && self.pi(value, matches[5]);
                    index = matches.index + matches[0].length;
                }
                for (index < html.length && self.text(decode(html.substr(index))), 
                i = stack.length - 1; 0 <= i; i--) (value = stack[i]).valid && self.end(value.name);
            };
        };
    }(tinymce), function(tinymce) {
        var whiteSpaceRegExp = /^[ \t\r\n]*$/, typeLookup = {
            "#text": 3,
            "#comment": 8,
            "#cdata": 4,
            "#pi": 7,
            "#doctype": 10,
            "#document-fragment": 11
        };
        function isNonEmptyElement(node) {
            var isNamedAnchor = "a" === node.name && !node.attr("href") && node.attr("id");
            return node.attr("name") || node.attr("id") && !node.firstChild || node.attr("data-mce-bookmark") || isNamedAnchor;
        }
        function isWhitespaceText(text) {
            return whiteSpaceRegExp.test(text);
        }
        function walk(node, root_node, prev) {
            var sibling, parent, startName = prev ? "lastChild" : "firstChild", siblingName = prev ? "prev" : "next";
            if (node[startName]) return node[startName];
            if (node !== root_node) {
                if (sibling = node[siblingName]) return sibling;
                for (parent = node.parent; parent && parent !== root_node; parent = parent.parent) if (sibling = parent[siblingName]) return sibling;
            }
        }
        function Node(name, type) {
            this.name = name, 1 === (this.type = type) && (this.attributes = [], 
            this.attributes.map = {});
        }
        tinymce.extend(Node.prototype, {
            replace: function(node) {
                return node.parent && node.remove(), this.insert(node, this), this.remove(), 
                this;
            },
            attr: function(name, value) {
                var attrs, i;
                if ("string" != typeof name) {
                    for (i in name) this.attr(i, name[i]);
                    return this;
                }
                if (attrs = this.attributes) {
                    if (void 0 === value) return attrs.map[name];
                    if (null === value) {
                        if (name in attrs.map) for (delete attrs.map[name], i = attrs.length; i--; ) if (attrs[i].name === name) return attrs = attrs.splice(i, 1), 
                        this;
                    } else {
                        if (name in attrs.map) {
                            for (value = "" + value, i = attrs.length; i--; ) if (attrs[i].name === name) {
                                attrs[i].value = value;
                                break;
                            }
                        } else attrs.push({
                            name: name,
                            value: value
                        });
                        attrs.map[name] = value;
                    }
                    return this;
                }
            },
            addClass: function(str) {
                var self = this, cls = self.attr("class") || "";
                return str ? -1 === str.indexOf(" ") ? (self.hasClass(str) || (cls = tinymce.trim(cls + " " + str), 
                self.attr("class", cls)), cls) : void tinymce.each(str.split(" "), function(val) {
                    self.addClass(val);
                }) : cls;
            },
            hasClass: function(str) {
                return -1 !== (" " + (this.attr("class") || "") + " ").indexOf(" " + str + " ");
            },
            removeClass: function(str) {
                var self = this, cls = self.attr("class") || "";
                return str ? -1 === str.indexOf(" ") ? (self.hasClass(str) && ((cls = tinymce.trim((" " + cls + " ").replace(" " + str + " ", " "))) ? self.attr("class", cls) : self.attr("class", null)), 
                cls) : void tinymce.each(str.split(" "), function(val) {
                    self.removeClass(val);
                }) : cls;
            },
            clone: function(deep) {
                var i, l, selfAttrs, selfAttr, cloneAttrs, node, next, clone = new Node(this.name, this.type);
                if (selfAttrs = this.attributes) {
                    for ((cloneAttrs = []).map = {}, i = 0, l = selfAttrs.length; i < l; i++) "id" !== (selfAttr = selfAttrs[i]).name && (cloneAttrs[cloneAttrs.length] = {
                        name: selfAttr.name,
                        value: selfAttr.value
                    }, cloneAttrs.map[selfAttr.name] = selfAttr.value);
                    clone.attributes = cloneAttrs;
                }
                if (clone.value = this.value, clone.shortEnded = this.shortEnded, 
                deep) for (node = this.firstChild; node; ) next = node.next, clone.append(node), 
                node = next;
                return clone;
            },
            wrap: function(wrapper) {
                return this.parent.insert(wrapper, this), wrapper.append(this), 
                this;
            },
            unwrap: function() {
                for (var next, node = this.firstChild; node; ) next = node.next, 
                this.insert(node, this, !0), node = next;
                this.remove();
            },
            remove: function() {
                var parent = this.parent, next = this.next, prev = this.prev;
                return parent && (parent.firstChild === this ? (parent.firstChild = next) && (next.prev = null) : prev.next = next, 
                parent.lastChild === this ? (parent.lastChild = prev) && (prev.next = null) : next.prev = prev, 
                this.parent = this.next = this.prev = null), this;
            },
            append: function(node) {
                var last;
                return node.parent && node.remove(), (last = this.lastChild) ? ((last.next = node).prev = last, 
                this.lastChild = node) : this.lastChild = this.firstChild = node, 
                node.parent = this, node;
            },
            insert: function(node, ref_node, before) {
                var parent;
                return node.parent && node.remove(), parent = ref_node.parent || this, 
                before ? (ref_node === parent.firstChild ? parent.firstChild = node : ref_node.prev.next = node, 
                node.prev = ref_node.prev, (node.next = ref_node).prev = node) : (ref_node === parent.lastChild ? parent.lastChild = node : ref_node.next.prev = node, 
                node.next = ref_node.next, (node.prev = ref_node).next = node), 
                node.parent = parent, node;
            },
            getAll: function(name) {
                for (var collection = [], node = this.firstChild; node; node = walk(node, this)) node.name === name && collection.push(node);
                return collection;
            },
            children: function() {
                for (var collection = [], node = this.firstChild; node; node = node.next) collection.push(node);
                return collection;
            },
            empty: function() {
                var nodes, i, node;
                if (this.firstChild) {
                    for (nodes = [], node = this.firstChild; node; node = walk(node, this)) nodes.push(node);
                    for (i = nodes.length; i--; ) (node = nodes[i]).parent = node.firstChild = node.lastChild = node.next = node.prev = null;
                }
                return this.firstChild = this.lastChild = null, this;
            },
            isEmpty: function(elements, whitespace) {
                var i, node = this.firstChild;
                if (isNonEmptyElement(this)) return !1;
                function isValidAttribute(name) {
                    return "name" == name || "id" == name || "class" == name || -1 != name.indexOf("-") && ("data-mce-bookmark" == name || -1 == name.indexOf("data-mce-"));
                }
                if (1 === this.type) {
                    if (elements && elements[this.name]) return !1;
                    if (this.attributes && this.attributes.length) for (i = this.attributes.length; i--; ) if (isValidAttribute(this.attributes[i].name)) return !1;
                }
                if (node) do {
                    if (1 === node.type) {
                        if (node.attr("data-mce-bogus")) continue;
                        if (elements[node.name]) return !1;
                        if (isNonEmptyElement(node)) return !1;
                        for (i = node.attributes.length; i--; ) if (isValidAttribute(node.attributes[i].name)) return !1;
                    }
                    if (8 === node.type) return !1;
                    if (3 === node.type && !function(node) {
                        var text = node.value || "";
                        return !(!isWhitespaceText(text) || (node = node.parent) && ("span" !== node.name || node.attr("style")) && /^[ ]+$/.test(text));
                    }(node)) return !1;
                    if (whitespace && 3 === node.type && node.parent && whitespace[node.parent.name] && isWhitespaceText(node.value || "")) return !1;
                } while (node = walk(node, this));
                return !0;
            },
            walk: function(prev) {
                return walk(this, null, prev);
            }
        }), tinymce.extend(Node, {
            create: function(name, attrs) {
                var attrName, node = new Node(name, typeLookup[name] || 1);
                if (attrs) {
                    for (attrName in attrs) node.attr(attrName, attrs[attrName]);
                    return node;
                }
            }
        }), tinymce.html.Node = Node;
    }(tinymce), function(tinymce) {
        var each = tinymce.each, Arr = tinymce.util.Arr;
        function tagName(el) {
            return el && el.nodeName ? el.nodeName.toLowerCase() : "";
        }
        function trimEdge(el, leftSide) {
            for (var childPropertyName = leftSide ? "lastChild" : "firstChild", child = el[childPropertyName]; child; ) {
                if (isEmptyElement(child)) return child.parentNode && child.parentNode.removeChild(child);
                child = child[childPropertyName];
            }
        }
        function isEmptyElement(el) {
            if (el && 1 === el.nodeType) {
                for (var node = el.firstChild; node; ) {
                    if (1 === node.nodeType) return;
                    if (3 === node.nodeType && /\S/.test(node.nodeValue)) return;
                    node = node.nextSibling;
                }
                return 1;
            }
        }
        function makeSelectorFromSchemaMap(map) {
            return (map = function(map) {
                return Arr.filter(Object.keys(map || {}), function(key) {
                    return !/[A-Z]/.test(key);
                });
            }(map)).length ? map.join(",") : "";
        }
        function updateBlockStateOnChildren(schema, elm) {
            var transparentSelector = makeSelectorFromSchemaMap(schema.getTransparentElements()), blocksSelector = makeSelectorFromSchemaMap(schema.getBlockElements());
            return transparentSelector ? (schema = elm.querySelectorAll(transparentSelector), 
            Arr.filter(schema, function(transparent) {
                return function(blocksSelector, transparent) {
                    return null !== transparent.querySelector(blocksSelector) ? (transparent.setAttribute("data-mce-block", "true"), 
                    "inline-boundary" === transparent.getAttribute("data-mce-selected") && transparent.removeAttribute("data-mce-selected"), 
                    !0) : (transparent.removeAttribute("data-mce-block"), !1);
                }(blocksSelector, transparent);
            })) : [];
        }
        function isTransparentElement(schema, node) {
            var tag = tagName(node);
            return 1 === node.nodeType && tag in schema.getTransparentElements();
        }
        function isTransparentBlock(schema, node) {
            return isTransparentElement(schema, node) && !!node.hasAttribute("data-mce-block");
        }
        function isTransparentInline(schema, node) {
            return isTransparentElement(schema, node) && !node.hasAttribute("data-mce-block");
        }
        tinymce.html.TransparentElements = {
            updateChildren: function(schema, scope) {
                var transparentBlocks = updateBlockStateOnChildren(schema, scope);
                !function(schema, scope, transparentBlocks) {
                    var blockMap = schema.getBlockElements();
                    function isBlock(el) {
                        return el && 1 === el.nodeType && blockMap[tagName(el)];
                    }
                    function closestBlock(el) {
                        for (var n = el; n && n !== scope; ) {
                            if (isBlock(n)) return n;
                            n = n.parentElement;
                        }
                        return null;
                    }
                    for (var beforeFragment, range, parentNode, t = 0; t < transparentBlocks.length; t++) {
                        var parentBlock = closestBlock(transparentBlock = transparentBlocks[t]);
                        if (parentBlock) {
                            for (var kids = transparentBlock.children, invalidChildren = [], i = 0; i < kids.length; i++) {
                                var child = kids[i];
                                isBlock(child) && !schema.isValidChild(tagName(parentBlock), tagName(child)) && invalidChildren.push(child);
                            }
                            if (invalidChildren.length) {
                                for (var transparentBlock = parentBlock.parentElement, j = 0; j < invalidChildren.length; j++) {
                                    var childBlock = invalidChildren[j], ancestorBlock = closestBlock(childBlock);
                                    ancestorBlock && (ancestorBlock = ancestorBlock, 
                                    childBlock = childBlock, parentNode = range = beforeFragment = void 0, 
                                    range = document.createRange(), parentNode = ancestorBlock.parentNode) && (range.setStartBefore(ancestorBlock), 
                                    range.setEndBefore(childBlock), trimEdge(beforeFragment = range.extractContents(), !0), 
                                    range.setStartAfter(childBlock), range.setEndAfter(ancestorBlock), 
                                    trimEdge(range = range.extractContents(), !1), 
                                    isEmptyElement(beforeFragment) || parentNode.insertBefore(beforeFragment, ancestorBlock), 
                                    isEmptyElement(childBlock) || parentNode.insertBefore(childBlock, ancestorBlock), 
                                    isEmptyElement(range) || parentNode.insertBefore(range, ancestorBlock), 
                                    parentNode.removeChild(ancestorBlock));
                                }
                                transparentBlock && updateBlockStateOnChildren(schema, transparentBlock);
                            }
                        }
                    }
                }(schema, scope, transparentBlocks), function(schema, scope, transparentBlocks) {
                    transparentBlocks = [].concat(transparentBlocks, isTransparentBlock(schema, scope) ? [ scope ] : []), 
                    each(transparentBlocks, function(block) {
                        block = block.querySelectorAll(block.nodeName.toLowerCase()), 
                        each(block, function(elm) {
                            isTransparentInline(schema, elm) && !function(elm) {
                                var parent = elm && elm.parentNode;
                                if (parent) {
                                    for (;elm.firstChild; ) parent.insertBefore(elm.firstChild, elm);
                                    parent.removeChild(elm);
                                }
                            }(elm);
                        });
                    });
                }(schema, scope, transparentBlocks);
            },
            isTransparentBlock: isTransparentBlock,
            isTransparentInline: isTransparentInline
        };
    }(tinymce), function(tinymce) {
        var each = tinymce.each, extend = tinymce.extend;
        function runFilters(matches, args) {
            function run(matchRecord, isAttributeFilter) {
                each(matchRecord, function(match) {
                    for (var originalNodes = match.nodes, filterName = match.filter.name, callbacks = match.filter.callbacks, nodes = originalNodes.slice(), ci = 0; ci < callbacks.length; ci++) {
                        for (var callback = callbacks[ci], validNodes = [], i = 0; i < nodes.length; i++) {
                            var node = nodes[i];
                            (isAttributeFilter ? void 0 !== node.attr(filterName) : node.name === filterName) && null != node.parent && validNodes.push(node);
                        }
                        0 < validNodes.length && callback(validNodes, filterName, args);
                    }
                });
            }
            args = extend({}, args), run(matches.nodes, !1), run(matches.attributes, !0);
        }
        function traverse(root, fn) {
            for (var node = root; node = node.walk(); ) fn(node);
        }
        function matchNode(nodeFilters, attributeFilters, node, matches) {
            for (var name = node.name, ni = 0, nl = nodeFilters.length; ni < nl; ni++) (filter = nodeFilters[ni]).name === name && ((match = matches.nodes[name]) ? match.nodes.push(node) : matches.nodes[name] = {
                filter: filter,
                nodes: [ node ]
            });
            if (node.attributes) for (var ai = 0, al = attributeFilters.length; ai < al; ai++) {
                var filter, match, attrName = (filter = attributeFilters[ai]).name;
                attrName in node.attributes.map && ((match = matches.attributes[attrName]) ? match.nodes.push(node) : matches.attributes[attrName] = {
                    filter: filter,
                    nodes: [ node ]
                });
            }
        }
        function findMatchingNodes(nodeFilters, attributeFilters, node) {
            var matches = {
                nodes: {},
                attributes: {}
            };
            return node.firstChild && traverse(node, function(childNode) {
                matchNode(nodeFilters, attributeFilters, childNode, matches);
            }), matches;
        }
        tinymce.html.FilterNode = {
            runFilters: runFilters,
            matchNode: matchNode,
            findMatchingNodes: findMatchingNodes,
            filter: function(nodeFilters, attributeFilters, node, args) {
                runFilters(findMatchingNodes(nodeFilters, attributeFilters, node), args || {});
            },
            traverse: traverse
        };
    }(tinymce), function(tinymce) {
        var makeMap = tinymce.makeMap, Node = tinymce.html.Node;
        tinymce.html.InvalidNodes = {
            cleanInvalidNodes: function(nodes, schema, rootNode, onCreate) {
                for (var node, parent, parents, newParent, currentNode, tempNode, childNode, i, sibling, nextNode, wrapper, nonSplitableElements = makeMap("tr,td,th,tbody,thead,tfoot,table"), nonEmptyElements = schema.getNonEmptyElements(), textBlockElements = schema.getTextBlockElements(), specialElements = schema.getSpecialElements(), whitespaceElements = schema.getWhiteSpaceElements(), removeOrUnwrapInvalidNode = (onCreate = onCreate || function() {}, 
                function(node, originalNodeParent) {
                    if (specialElements[node.name]) node.empty().remove(); else {
                        var childNode;
                        for (childNode of node.children()) schema.isValidChild(originalNodeParent.name, childNode.name) || removeOrUnwrapInvalidNode(childNode, originalNodeParent);
                        node.unwrap();
                    }
                }), ni = 0; ni < nodes.length; ni++) if ((node = nodes[ni]).parent && !node.fixed) if (textBlockElements[node.name] && "li" == node.parent.name) {
                    for (sibling = node.next; sibling && textBlockElements[sibling.name]; ) sibling.name = "li", 
                    sibling.fixed = !0, node.parent.insert(sibling, node.parent), 
                    sibling = sibling.next;
                    node.unwrap(node);
                } else {
                    for (parents = [ node ], parent = node.parent; parent && !schema.isValidChild(parent.name, node.name) && !nonSplitableElements[parent.name]; parent = parent.parent) parents.push(parent);
                    if (parent && 1 < parents.length) if (schema.isValidChild(parent.name, node.name)) {
                        for (parents.reverse(), onCreate(newParent = currentNode = parents[0].clone()), 
                        i = 0; i < parents.length - 1; i++) {
                            for (schema.isValidChild(currentNode.name, parents[i].name) ? (onCreate(tempNode = parents[i].clone()), 
                            currentNode.append(tempNode)) : tempNode = currentNode, 
                            childNode = parents[i].firstChild; childNode && childNode != parents[i + 1]; ) nextNode = childNode.next, 
                            tempNode.append(childNode), childNode = nextNode;
                            currentNode = tempNode;
                        }
                        newParent.isEmpty(nonEmptyElements, whitespaceElements) ? parent.insert(node, parents[0], !0) : (parent.insert(newParent, parents[0], !0), 
                        parent.insert(node, newParent)), ((parent = parents[0]).isEmpty(nonEmptyElements, whitespaceElements) || function(node) {
                            var child = node.firstChild;
                            return child && child === node.lastChild && "br" === child.name;
                        }(parent)) && parent.empty().remove();
                    } else removeOrUnwrapInvalidNode(node, node.parent); else node.parent && ("li" === node.name ? !(sibling = node.prev) || "ul" !== sibling.name && "ol" !== sibling.name ? !(sibling = node.next) || "ul" !== sibling.name && "ol" !== sibling.name ? (onCreate(wrapper = new Node("ul", 1)), 
                    node.wrap(wrapper)) : sibling.insert(node, sibling.firstChild, !0) : sibling.append(node) : schema.isValidChild(node.parent.name, "div") && schema.isValidChild("div", node.name) ? (onCreate(wrapper = new Node("div", 1)), 
                    node.wrap(wrapper)) : removeOrUnwrapInvalidNode(node, node.parent));
                }
            },
            isInvalid: function(schema, node, parent) {
                return !(!(parent = parent || node.parent) || (!schema.children[node.name] || schema.isValidChild(parent.name, node.name)) && ("a" !== node.name || !function() {
                    for (var tempNode = parent; tempNode; ) {
                        if ("a" === tempNode.name) return 1;
                        tempNode = tempNode.parent;
                    }
                }()) && ("summary" != parent.name || ![ "h1", "h2", "h3", "h4", "h5", "h6" ].includes(node.name) || parent.firstChild === node && parent.lastChild === node));
            }
        };
    }(tinymce);
    const {
        entries,
        setPrototypeOf,
        isFrozen,
        getPrototypeOf,
        getOwnPropertyDescriptor
    } = Object;
    let {
        freeze,
        seal,
        create: create$1
    } = Object, {
        apply,
        construct
    } = "undefined" != typeof Reflect && Reflect;
    freeze = freeze || function(x) {
        return x;
    }, seal = seal || function(x) {
        return x;
    }, apply = apply || function(fun, thisValue, args) {
        return fun.apply(thisValue, args);
    }, construct = construct || function(Func, args) {
        return new Func(...args);
    };
    function typeErrorCreate() {
        for (var _len2 = arguments.length, args = new Array(_len2), _key2 = 0; _key2 < _len2; _key2++) args[_key2] = arguments[_key2];
        return construct(func, args);
    }
    const arrayForEach = unapply(Array.prototype.forEach), arrayLastIndexOf = unapply(Array.prototype.lastIndexOf), arrayPop = unapply(Array.prototype.pop), arrayPush = unapply(Array.prototype.push), arraySplice = unapply(Array.prototype.splice), stringToLowerCase = unapply(String.prototype.toLowerCase), stringToString = unapply(String.prototype.toString), stringMatch = unapply(String.prototype.match), stringReplace = unapply(String.prototype.replace), stringIndexOf = unapply(String.prototype.indexOf), stringTrim = unapply(String.prototype.trim), objectHasOwnProperty = unapply(Object.prototype.hasOwnProperty), regExpTest = unapply(RegExp.prototype.test);
    func = TypeError;
    function unapply(func) {
        return function(thisArg) {
            thisArg instanceof RegExp && (thisArg.lastIndex = 0);
            for (var _len = arguments.length, args = new Array(1 < _len ? _len - 1 : 0), _key = 1; _key < _len; _key++) args[_key - 1] = arguments[_key];
            return apply(func, thisArg, args);
        };
    }
    function addToSet(set, array, argument_2) {
        var lcElement, transformCaseFunc = 2 < arguments.length && void 0 !== argument_2 ? argument_2 : stringToLowerCase;
        setPrototypeOf && setPrototypeOf(set, null);
        let l = array.length;
        for (;l--; ) {
            let element = array[l];
            "string" == typeof element && (lcElement = transformCaseFunc(element)) !== element && (isFrozen(array) || (array[l] = lcElement), 
            element = lcElement), set[element] = !0;
        }
        return set;
    }
    function clone(object) {
        var property, value, newObject = create$1(null);
        for ([ property, value ] of entries(object)) objectHasOwnProperty(object, property) && (Array.isArray(value) ? newObject[property] = function(array) {
            for (let index = 0; index < array.length; index++) objectHasOwnProperty(array, index) || (array[index] = null);
            return array;
        }(value) : value && "object" == typeof value && value.constructor === Object ? newObject[property] = clone(value) : newObject[property] = value);
        return newObject;
    }
    function lookupGetter(object, prop) {
        for (;null !== object; ) {
            var desc = getOwnPropertyDescriptor(object, prop);
            if (desc) {
                if (desc.get) return unapply(desc.get);
                if ("function" == typeof desc.value) return unapply(desc.value);
            }
            object = getPrototypeOf(object);
        }
        return function() {
            return null;
        };
    }
    const html$1 = freeze([ "a", "abbr", "acronym", "address", "area", "article", "aside", "audio", "b", "bdi", "bdo", "big", "blink", "blockquote", "body", "br", "button", "canvas", "caption", "center", "cite", "code", "col", "colgroup", "content", "data", "datalist", "dd", "decorator", "del", "details", "dfn", "dialog", "dir", "div", "dl", "dt", "element", "em", "fieldset", "figcaption", "figure", "font", "footer", "form", "h1", "h2", "h3", "h4", "h5", "h6", "head", "header", "hgroup", "hr", "html", "i", "img", "input", "ins", "kbd", "label", "legend", "li", "main", "map", "mark", "marquee", "menu", "menuitem", "meter", "nav", "nobr", "ol", "optgroup", "option", "output", "p", "picture", "pre", "progress", "q", "rp", "rt", "ruby", "s", "samp", "section", "select", "shadow", "small", "source", "spacer", "span", "strike", "strong", "style", "sub", "summary", "sup", "table", "tbody", "td", "template", "textarea", "tfoot", "th", "thead", "time", "tr", "track", "tt", "u", "ul", "var", "video", "wbr" ]), svg$1 = freeze([ "svg", "a", "altglyph", "altglyphdef", "altglyphitem", "animatecolor", "animatemotion", "animatetransform", "circle", "clippath", "defs", "desc", "ellipse", "filter", "font", "g", "glyph", "glyphref", "hkern", "image", "line", "lineargradient", "marker", "mask", "metadata", "mpath", "path", "pattern", "polygon", "polyline", "radialgradient", "rect", "stop", "style", "switch", "symbol", "text", "textpath", "title", "tref", "tspan", "view", "vkern" ]), svgFilters = freeze([ "feBlend", "feColorMatrix", "feComponentTransfer", "feComposite", "feConvolveMatrix", "feDiffuseLighting", "feDisplacementMap", "feDistantLight", "feDropShadow", "feFlood", "feFuncA", "feFuncB", "feFuncG", "feFuncR", "feGaussianBlur", "feImage", "feMerge", "feMergeNode", "feMorphology", "feOffset", "fePointLight", "feSpecularLighting", "feSpotLight", "feTile", "feTurbulence" ]), svgDisallowed = freeze([ "animate", "color-profile", "cursor", "discard", "font-face", "font-face-format", "font-face-name", "font-face-src", "font-face-uri", "foreignobject", "hatch", "hatchpath", "mesh", "meshgradient", "meshpatch", "meshrow", "missing-glyph", "script", "set", "solidcolor", "unknown", "use" ]), mathMl$1 = freeze([ "math", "menclose", "merror", "mfenced", "mfrac", "mglyph", "mi", "mlabeledtr", "mmultiscripts", "mn", "mo", "mover", "mpadded", "mphantom", "mroot", "mrow", "ms", "mspace", "msqrt", "mstyle", "msub", "msup", "msubsup", "mtable", "mtd", "mtext", "mtr", "munder", "munderover", "mprescripts" ]), mathMlDisallowed = freeze([ "maction", "maligngroup", "malignmark", "mlongdiv", "mscarries", "mscarry", "msgroup", "mstack", "msline", "msrow", "semantics", "annotation", "annotation-xml", "mprescripts", "none" ]), text = freeze([ "#text" ]), html = freeze([ "accept", "action", "align", "alt", "autocapitalize", "autocomplete", "autopictureinpicture", "autoplay", "background", "bgcolor", "border", "capture", "cellpadding", "cellspacing", "checked", "cite", "class", "clear", "color", "cols", "colspan", "controls", "controlslist", "coords", "crossorigin", "datetime", "decoding", "default", "dir", "disabled", "disablepictureinpicture", "disableremoteplayback", "download", "draggable", "enctype", "enterkeyhint", "face", "for", "headers", "height", "hidden", "high", "href", "hreflang", "id", "inputmode", "integrity", "ismap", "kind", "label", "lang", "list", "loading", "loop", "low", "max", "maxlength", "media", "method", "min", "minlength", "multiple", "muted", "name", "nonce", "noshade", "novalidate", "nowrap", "open", "optimum", "pattern", "placeholder", "playsinline", "popover", "popovertarget", "popovertargetaction", "poster", "preload", "pubdate", "radiogroup", "readonly", "rel", "required", "rev", "reversed", "role", "rows", "rowspan", "spellcheck", "scope", "selected", "shape", "size", "sizes", "span", "srclang", "start", "src", "srcset", "step", "style", "summary", "tabindex", "title", "translate", "type", "usemap", "valign", "value", "width", "wrap", "xmlns", "slot" ]), svg = freeze([ "accent-height", "accumulate", "additive", "alignment-baseline", "amplitude", "ascent", "attributename", "attributetype", "azimuth", "basefrequency", "baseline-shift", "begin", "bias", "by", "class", "clip", "clippathunits", "clip-path", "clip-rule", "color", "color-interpolation", "color-interpolation-filters", "color-profile", "color-rendering", "cx", "cy", "d", "dx", "dy", "diffuseconstant", "direction", "display", "divisor", "dur", "edgemode", "elevation", "end", "exponent", "fill", "fill-opacity", "fill-rule", "filter", "filterunits", "flood-color", "flood-opacity", "font-family", "font-size", "font-size-adjust", "font-stretch", "font-style", "font-variant", "font-weight", "fx", "fy", "g1", "g2", "glyph-name", "glyphref", "gradientunits", "gradienttransform", "height", "href", "id", "image-rendering", "in", "in2", "intercept", "k", "k1", "k2", "k3", "k4", "kerning", "keypoints", "keysplines", "keytimes", "lang", "lengthadjust", "letter-spacing", "kernelmatrix", "kernelunitlength", "lighting-color", "local", "marker-end", "marker-mid", "marker-start", "markerheight", "markerunits", "markerwidth", "maskcontentunits", "maskunits", "max", "mask", "media", "method", "mode", "min", "name", "numoctaves", "offset", "operator", "opacity", "order", "orient", "orientation", "origin", "overflow", "paint-order", "path", "pathlength", "patterncontentunits", "patterntransform", "patternunits", "points", "preservealpha", "preserveaspectratio", "primitiveunits", "r", "rx", "ry", "radius", "refx", "refy", "repeatcount", "repeatdur", "restart", "result", "rotate", "scale", "seed", "shape-rendering", "slope", "specularconstant", "specularexponent", "spreadmethod", "startoffset", "stddeviation", "stitchtiles", "stop-color", "stop-opacity", "stroke-dasharray", "stroke-dashoffset", "stroke-linecap", "stroke-linejoin", "stroke-miterlimit", "stroke-opacity", "stroke", "stroke-width", "style", "surfacescale", "systemlanguage", "tabindex", "tablevalues", "targetx", "targety", "transform", "transform-origin", "text-anchor", "text-decoration", "text-rendering", "textlength", "type", "u1", "u2", "unicode", "values", "viewbox", "visibility", "version", "vert-adv-y", "vert-origin-x", "vert-origin-y", "width", "word-spacing", "wrap", "writing-mode", "xchannelselector", "ychannelselector", "x", "x1", "x2", "xmlns", "y", "y1", "y2", "z", "zoomandpan" ]), mathMl = freeze([ "accent", "accentunder", "align", "bevelled", "close", "columnsalign", "columnlines", "columnspan", "denomalign", "depth", "dir", "display", "displaystyle", "encoding", "fence", "frame", "height", "href", "id", "largeop", "length", "linethickness", "lspace", "lquote", "mathbackground", "mathcolor", "mathsize", "mathvariant", "maxsize", "minsize", "movablelimits", "notation", "numalign", "open", "rowalign", "rowlines", "rowspacing", "rowspan", "rspace", "rquote", "scriptlevel", "scriptminsize", "scriptsizemultiplier", "selection", "separator", "separators", "stretchy", "subscriptshift", "supscriptshift", "symmetric", "voffset", "width", "xmlns" ]), xml = freeze([ "xlink:href", "xml:id", "xlink:title", "xml:space", "xmlns:xlink" ]);
    var phone = seal(/\{\{[\w\W]*|[\w\W]*\}\}/gm), tablet = seal(/<%[\w\W]*|[\w\W]*%>/gm), windowsPhone = seal(/\$\{[\w\W]*/gm), opera = seal(/^data-[\-\w.\u00B7-\uFFFF]+$/), webkit = seal(/^aria-[\-\w]+$/);
    const IS_ALLOWED_URI = seal(/^(?:(?:(?:f|ht)tps?|mailto|tel|callto|sms|cid|xmpp|matrix):|[^a-z]|[a-z+.\-]+(?:[^a-z+.\-:]|$))/i), DOCTYPE_NAME = (nav = seal(/^(?:\w+script|data):/i), 
    gecko = seal(/[\u0000-\u0020\u00A0\u1680\u180E\u2000-\u2029\u205F\u3000]/g), 
    seal(/^html$/i));
    var mac = seal(/^[a-z][.\w]*(-[.\w]+)+$/i), EXPRESSIONS = Object.freeze({
        __proto__: null,
        ARIA_ATTR: webkit,
        ATTR_WHITESPACE: gecko,
        CUSTOM_ELEMENT: mac,
        DATA_ATTR: opera,
        DOCTYPE_NAME: DOCTYPE_NAME,
        ERB_EXPR: tablet,
        IS_ALLOWED_URI: IS_ALLOWED_URI,
        IS_SCRIPT_OR_DATA: nav,
        MUSTACHE_EXPR: phone,
        TMPLIT_EXPR: windowsPhone
    });
    function _createHooksMap() {
        return {
            afterSanitizeAttributes: [],
            afterSanitizeElements: [],
            afterSanitizeShadowDOM: [],
            beforeSanitizeAttributes: [],
            beforeSanitizeElements: [],
            beforeSanitizeShadowDOM: [],
            uponSanitizeAttribute: [],
            uponSanitizeElement: [],
            uponSanitizeShadowNode: []
        };
    }
    const NODE_TYPE = {
        element: 1,
        attribute: 2,
        text: 3,
        cdataSection: 4,
        entityReference: 5,
        entityNode: 6,
        progressingInstruction: 7,
        comment: 8,
        document: 9,
        documentType: 10,
        documentFragment: 11,
        notation: 12
    };
    var mouseEventRe, deprecated, purify = function createDOMPurify(argument_0) {
        argument_0 = 0 < arguments.length && void 0 !== argument_0 ? argument_0 : "undefined" == typeof window ? null : window;
        const DOMPurify = root => createDOMPurify(root);
        if (DOMPurify.version = "3.2.6", DOMPurify.removed = [], !argument_0 || !argument_0.document || argument_0.document.nodeType !== NODE_TYPE.document || !argument_0.Element) return DOMPurify.isSupported = !1, 
        DOMPurify;
        let document = argument_0.document;
        const originalDocument = document, currentScript = originalDocument.currentScript, {
            DocumentFragment,
            HTMLTemplateElement,
            Node,
            Element,
            NodeFilter,
            NamedNodeMap = argument_0.NamedNodeMap || argument_0.MozNamedAttrMap,
            HTMLFormElement,
            DOMParser,
            trustedTypes
        } = argument_0, cloneNode = lookupGetter(argument_0 = Element.prototype, "cloneNode"), remove = lookupGetter(argument_0, "remove"), getNextSibling = lookupGetter(argument_0, "nextSibling"), getChildNodes = lookupGetter(argument_0, "childNodes"), getParentNode = lookupGetter(argument_0, "parentNode");
        "function" == typeof HTMLTemplateElement && (argument_0 = document.createElement("template")).content && argument_0.content.ownerDocument && (document = argument_0.content.ownerDocument);
        let trustedTypesPolicy, emptyHTML = "";
        const {
            implementation,
            createNodeIterator,
            createDocumentFragment,
            getElementsByTagName
        } = document, importNode = originalDocument.importNode;
        let hooks = _createHooksMap();
        DOMPurify.isSupported = "function" == typeof entries && "function" == typeof getParentNode && implementation && void 0 !== implementation.createHTMLDocument;
        const {
            MUSTACHE_EXPR,
            ERB_EXPR,
            TMPLIT_EXPR,
            DATA_ATTR,
            ARIA_ATTR,
            IS_SCRIPT_OR_DATA,
            ATTR_WHITESPACE,
            CUSTOM_ELEMENT
        } = EXPRESSIONS;
        let IS_ALLOWED_URI$1 = EXPRESSIONS.IS_ALLOWED_URI, ALLOWED_TAGS = null;
        const DEFAULT_ALLOWED_TAGS = addToSet({}, [ ...html$1, ...svg$1, ...svgFilters, ...mathMl$1, ...text ]);
        let ALLOWED_ATTR = null;
        const DEFAULT_ALLOWED_ATTR = addToSet({}, [ ...html, ...svg, ...mathMl, ...xml ]);
        let CUSTOM_ELEMENT_HANDLING = Object.seal(create$1(null, {
            tagNameCheck: {
                writable: !0,
                configurable: !1,
                enumerable: !0,
                value: null
            },
            attributeNameCheck: {
                writable: !0,
                configurable: !1,
                enumerable: !0,
                value: null
            },
            allowCustomizedBuiltInElements: {
                writable: !0,
                configurable: !1,
                enumerable: !0,
                value: !1
            }
        })), FORBID_TAGS = null, FORBID_ATTR = null, ALLOW_ARIA_ATTR = !0, ALLOW_DATA_ATTR = !0, ALLOW_UNKNOWN_PROTOCOLS = !1, ALLOW_SELF_CLOSE_IN_ATTR = !0, SAFE_FOR_TEMPLATES = !1, SAFE_FOR_XML = !0, WHOLE_DOCUMENT = !1, SET_CONFIG = !1, FORCE_BODY = !1, RETURN_DOM = !1, RETURN_DOM_FRAGMENT = !1, RETURN_TRUSTED_TYPE = !1, SANITIZE_DOM = !0, SANITIZE_NAMED_PROPS = !1, KEEP_CONTENT = !0, IN_PLACE = !1, USE_PROFILES = {}, FORBID_CONTENTS = null;
        const DEFAULT_FORBID_CONTENTS = addToSet({}, [ "annotation-xml", "audio", "colgroup", "desc", "foreignobject", "head", "iframe", "math", "mi", "mn", "mo", "ms", "mtext", "noembed", "noframes", "noscript", "plaintext", "script", "style", "svg", "template", "thead", "title", "video", "xmp" ]);
        let DATA_URI_TAGS = null;
        const DEFAULT_DATA_URI_TAGS = addToSet({}, [ "audio", "video", "img", "source", "image", "track" ]);
        let URI_SAFE_ATTRIBUTES = null;
        const DEFAULT_URI_SAFE_ATTRIBUTES = addToSet({}, [ "alt", "class", "for", "id", "label", "name", "pattern", "placeholder", "role", "summary", "title", "value", "style", "xmlns" ]), MATHML_NAMESPACE = "http://www.w3.org/1998/Math/MathML", SVG_NAMESPACE = "http://www.w3.org/2000/svg", HTML_NAMESPACE = "http://www.w3.org/1999/xhtml";
        let NAMESPACE = HTML_NAMESPACE, IS_EMPTY_INPUT, ALLOWED_NAMESPACES = null;
        const DEFAULT_ALLOWED_NAMESPACES = addToSet({}, [ MATHML_NAMESPACE, SVG_NAMESPACE, HTML_NAMESPACE ], stringToString);
        let MATHML_TEXT_INTEGRATION_POINTS = addToSet({}, [ "mi", "mo", "mn", "ms", "mtext" ]), HTML_INTEGRATION_POINTS = addToSet({}, [ "annotation-xml" ]);
        const COMMON_SVG_AND_HTML_ELEMENTS = addToSet({}, [ "title", "style", "font", "a", "script" ]);
        let PARSER_MEDIA_TYPE = null;
        const SUPPORTED_PARSER_MEDIA_TYPES = [ "application/xhtml+xml", "text/html" ];
        let transformCaseFunc = null, CONFIG = null;
        function isRegexOrFunction(testValue) {
            return testValue instanceof RegExp || testValue instanceof Function;
        }
        function _parseConfig(argument_0) {
            argument_0 = 0 < arguments.length && void 0 !== argument_0 ? argument_0 : {};
            if (!CONFIG || CONFIG !== argument_0) {
                if (argument_0 = clone(argument_0 && "object" == typeof argument_0 ? argument_0 : {}), 
                PARSER_MEDIA_TYPE = -1 === SUPPORTED_PARSER_MEDIA_TYPES.indexOf(argument_0.PARSER_MEDIA_TYPE) ? "text/html" : argument_0.PARSER_MEDIA_TYPE, 
                transformCaseFunc = "application/xhtml+xml" === PARSER_MEDIA_TYPE ? stringToString : stringToLowerCase, 
                ALLOWED_TAGS = objectHasOwnProperty(argument_0, "ALLOWED_TAGS") ? addToSet({}, argument_0.ALLOWED_TAGS, transformCaseFunc) : DEFAULT_ALLOWED_TAGS, 
                ALLOWED_ATTR = objectHasOwnProperty(argument_0, "ALLOWED_ATTR") ? addToSet({}, argument_0.ALLOWED_ATTR, transformCaseFunc) : DEFAULT_ALLOWED_ATTR, 
                ALLOWED_NAMESPACES = objectHasOwnProperty(argument_0, "ALLOWED_NAMESPACES") ? addToSet({}, argument_0.ALLOWED_NAMESPACES, stringToString) : DEFAULT_ALLOWED_NAMESPACES, 
                URI_SAFE_ATTRIBUTES = objectHasOwnProperty(argument_0, "ADD_URI_SAFE_ATTR") ? addToSet(clone(DEFAULT_URI_SAFE_ATTRIBUTES), argument_0.ADD_URI_SAFE_ATTR, transformCaseFunc) : DEFAULT_URI_SAFE_ATTRIBUTES, 
                DATA_URI_TAGS = objectHasOwnProperty(argument_0, "ADD_DATA_URI_TAGS") ? addToSet(clone(DEFAULT_DATA_URI_TAGS), argument_0.ADD_DATA_URI_TAGS, transformCaseFunc) : DEFAULT_DATA_URI_TAGS, 
                FORBID_CONTENTS = objectHasOwnProperty(argument_0, "FORBID_CONTENTS") ? addToSet({}, argument_0.FORBID_CONTENTS, transformCaseFunc) : DEFAULT_FORBID_CONTENTS, 
                FORBID_TAGS = objectHasOwnProperty(argument_0, "FORBID_TAGS") ? addToSet({}, argument_0.FORBID_TAGS, transformCaseFunc) : clone({}), 
                FORBID_ATTR = objectHasOwnProperty(argument_0, "FORBID_ATTR") ? addToSet({}, argument_0.FORBID_ATTR, transformCaseFunc) : clone({}), 
                USE_PROFILES = !!objectHasOwnProperty(argument_0, "USE_PROFILES") && argument_0.USE_PROFILES, 
                ALLOW_ARIA_ATTR = !1 !== argument_0.ALLOW_ARIA_ATTR, ALLOW_DATA_ATTR = !1 !== argument_0.ALLOW_DATA_ATTR, 
                ALLOW_UNKNOWN_PROTOCOLS = argument_0.ALLOW_UNKNOWN_PROTOCOLS || !1, 
                ALLOW_SELF_CLOSE_IN_ATTR = !1 !== argument_0.ALLOW_SELF_CLOSE_IN_ATTR, 
                SAFE_FOR_TEMPLATES = argument_0.SAFE_FOR_TEMPLATES || !1, SAFE_FOR_XML = !1 !== argument_0.SAFE_FOR_XML, 
                WHOLE_DOCUMENT = argument_0.WHOLE_DOCUMENT || !1, RETURN_DOM = argument_0.RETURN_DOM || !1, 
                RETURN_DOM_FRAGMENT = argument_0.RETURN_DOM_FRAGMENT || !1, RETURN_TRUSTED_TYPE = argument_0.RETURN_TRUSTED_TYPE || !1, 
                FORCE_BODY = argument_0.FORCE_BODY || !1, SANITIZE_DOM = !1 !== argument_0.SANITIZE_DOM, 
                SANITIZE_NAMED_PROPS = argument_0.SANITIZE_NAMED_PROPS || !1, KEEP_CONTENT = !1 !== argument_0.KEEP_CONTENT, 
                IN_PLACE = argument_0.IN_PLACE || !1, IS_ALLOWED_URI$1 = argument_0.ALLOWED_URI_REGEXP || IS_ALLOWED_URI, 
                NAMESPACE = argument_0.NAMESPACE || HTML_NAMESPACE, MATHML_TEXT_INTEGRATION_POINTS = argument_0.MATHML_TEXT_INTEGRATION_POINTS || MATHML_TEXT_INTEGRATION_POINTS, 
                HTML_INTEGRATION_POINTS = argument_0.HTML_INTEGRATION_POINTS || HTML_INTEGRATION_POINTS, 
                CUSTOM_ELEMENT_HANDLING = argument_0.CUSTOM_ELEMENT_HANDLING || {}, 
                argument_0.CUSTOM_ELEMENT_HANDLING && isRegexOrFunction(argument_0.CUSTOM_ELEMENT_HANDLING.tagNameCheck) && (CUSTOM_ELEMENT_HANDLING.tagNameCheck = argument_0.CUSTOM_ELEMENT_HANDLING.tagNameCheck), 
                argument_0.CUSTOM_ELEMENT_HANDLING && isRegexOrFunction(argument_0.CUSTOM_ELEMENT_HANDLING.attributeNameCheck) && (CUSTOM_ELEMENT_HANDLING.attributeNameCheck = argument_0.CUSTOM_ELEMENT_HANDLING.attributeNameCheck), 
                argument_0.CUSTOM_ELEMENT_HANDLING && "boolean" == typeof argument_0.CUSTOM_ELEMENT_HANDLING.allowCustomizedBuiltInElements && (CUSTOM_ELEMENT_HANDLING.allowCustomizedBuiltInElements = argument_0.CUSTOM_ELEMENT_HANDLING.allowCustomizedBuiltInElements), 
                SAFE_FOR_TEMPLATES && (ALLOW_DATA_ATTR = !1), RETURN_DOM_FRAGMENT && (RETURN_DOM = !0), 
                USE_PROFILES && (ALLOWED_TAGS = addToSet({}, text), ALLOWED_ATTR = [], 
                !0 === USE_PROFILES.html && (addToSet(ALLOWED_TAGS, html$1), addToSet(ALLOWED_ATTR, html)), 
                !0 === USE_PROFILES.svg && (addToSet(ALLOWED_TAGS, svg$1), addToSet(ALLOWED_ATTR, svg), 
                addToSet(ALLOWED_ATTR, xml)), !0 === USE_PROFILES.svgFilters && (addToSet(ALLOWED_TAGS, svgFilters), 
                addToSet(ALLOWED_ATTR, svg), addToSet(ALLOWED_ATTR, xml)), !0 === USE_PROFILES.mathMl) && (addToSet(ALLOWED_TAGS, mathMl$1), 
                addToSet(ALLOWED_ATTR, mathMl), addToSet(ALLOWED_ATTR, xml)), argument_0.ADD_TAGS && addToSet(ALLOWED_TAGS = ALLOWED_TAGS === DEFAULT_ALLOWED_TAGS ? clone(ALLOWED_TAGS) : ALLOWED_TAGS, argument_0.ADD_TAGS, transformCaseFunc), 
                argument_0.ADD_ATTR && addToSet(ALLOWED_ATTR = ALLOWED_ATTR === DEFAULT_ALLOWED_ATTR ? clone(ALLOWED_ATTR) : ALLOWED_ATTR, argument_0.ADD_ATTR, transformCaseFunc), 
                argument_0.ADD_URI_SAFE_ATTR && addToSet(URI_SAFE_ATTRIBUTES, argument_0.ADD_URI_SAFE_ATTR, transformCaseFunc), 
                argument_0.FORBID_CONTENTS && addToSet(FORBID_CONTENTS = FORBID_CONTENTS === DEFAULT_FORBID_CONTENTS ? clone(FORBID_CONTENTS) : FORBID_CONTENTS, argument_0.FORBID_CONTENTS, transformCaseFunc), 
                KEEP_CONTENT && (ALLOWED_TAGS["#text"] = !0), WHOLE_DOCUMENT && addToSet(ALLOWED_TAGS, [ "html", "head", "body" ]), 
                ALLOWED_TAGS.table && (addToSet(ALLOWED_TAGS, [ "tbody" ]), delete FORBID_TAGS.tbody), 
                argument_0.TRUSTED_TYPES_POLICY) {
                    if ("function" != typeof argument_0.TRUSTED_TYPES_POLICY.createHTML) throw typeErrorCreate('TRUSTED_TYPES_POLICY configuration option must provide a "createHTML" hook.');
                    if ("function" != typeof argument_0.TRUSTED_TYPES_POLICY.createScriptURL) throw typeErrorCreate('TRUSTED_TYPES_POLICY configuration option must provide a "createScriptURL" hook.');
                    trustedTypesPolicy = argument_0.TRUSTED_TYPES_POLICY, emptyHTML = trustedTypesPolicy.createHTML("");
                } else null !== (trustedTypesPolicy = void 0 === trustedTypesPolicy ? function(trustedTypes, purifyHostElement) {
                    if ("object" != typeof trustedTypes || "function" != typeof trustedTypes.createPolicy) return null;
                    var suffix;
                    purifyHostElement = "dompurify" + ((suffix = purifyHostElement && purifyHostElement.hasAttribute("data-tt-policy-suffix") ? purifyHostElement.getAttribute("data-tt-policy-suffix") : null) ? "#" + suffix : "");
                    try {
                        return trustedTypes.createPolicy(purifyHostElement, {
                            createHTML(html) {
                                return html;
                            },
                            createScriptURL(scriptUrl) {
                                return scriptUrl;
                            }
                        });
                    } catch (_) {
                        return console.warn("TrustedTypes policy " + purifyHostElement + " could not be created."), 
                        null;
                    }
                }(trustedTypes, currentScript) : trustedTypesPolicy) && "string" == typeof emptyHTML && (emptyHTML = trustedTypesPolicy.createHTML(""));
                freeze && freeze(argument_0), CONFIG = argument_0;
            }
        }
        function _removeAttribute(name, element) {
            try {
                arrayPush(DOMPurify.removed, {
                    attribute: element.getAttributeNode(name),
                    from: element
                });
            } catch (_) {
                arrayPush(DOMPurify.removed, {
                    attribute: null,
                    from: element
                });
            }
            if (element.removeAttribute(name), "is" === name) if (RETURN_DOM || RETURN_DOM_FRAGMENT) try {
                _forceRemove(element);
            } catch (_) {} else try {
                element.setAttribute(name, "");
            } catch (_) {}
        }
        function _initDocument(dirty) {
            let doc = null, leadingWhitespace = null;
            FORCE_BODY ? dirty = "<remove></remove>" + dirty : (matches = stringMatch(dirty, /^[\r\n\t ]+/), 
            leadingWhitespace = matches && matches[0]), "application/xhtml+xml" === PARSER_MEDIA_TYPE && NAMESPACE === HTML_NAMESPACE && (dirty = '<html xmlns="http://www.w3.org/1999/xhtml"><head></head><body>' + dirty + "</body></html>");
            var matches = trustedTypesPolicy ? trustedTypesPolicy.createHTML(dirty) : dirty;
            if (NAMESPACE === HTML_NAMESPACE) try {
                doc = new DOMParser().parseFromString(matches, PARSER_MEDIA_TYPE);
            } catch (_) {}
            if (!doc || !doc.documentElement) {
                doc = implementation.createDocument(NAMESPACE, "template", null);
                try {
                    doc.documentElement.innerHTML = IS_EMPTY_INPUT ? emptyHTML : matches;
                } catch (_) {}
            }
            return matches = doc.body || doc.documentElement, dirty && leadingWhitespace && matches.insertBefore(document.createTextNode(leadingWhitespace), matches.childNodes[0] || null), 
            NAMESPACE === HTML_NAMESPACE ? getElementsByTagName.call(doc, WHOLE_DOCUMENT ? "html" : "body")[0] : WHOLE_DOCUMENT ? doc.documentElement : matches;
        }
        function _createNodeIterator(root) {
            return createNodeIterator.call(root.ownerDocument || root, root, NodeFilter.SHOW_ELEMENT | NodeFilter.SHOW_COMMENT | NodeFilter.SHOW_TEXT | NodeFilter.SHOW_PROCESSING_INSTRUCTION | NodeFilter.SHOW_CDATA_SECTION, null);
        }
        function _isClobbered(element) {
            return element instanceof HTMLFormElement && ("string" != typeof element.nodeName || "string" != typeof element.textContent || "function" != typeof element.removeChild || !(element.attributes instanceof NamedNodeMap) || "function" != typeof element.removeAttribute || "function" != typeof element.setAttribute || "string" != typeof element.namespaceURI || "function" != typeof element.insertBefore || "function" != typeof element.hasChildNodes);
        }
        function _isNode(value) {
            return "function" == typeof Node && value instanceof Node;
        }
        const formElement = document.createElement("form"), ALL_SVG_TAGS = addToSet({}, [ ...svg$1, ...svgFilters, ...svgDisallowed ]), ALL_MATHML_TAGS = addToSet({}, [ ...mathMl$1, ...mathMlDisallowed ]), _forceRemove = function(node) {
            arrayPush(DOMPurify.removed, {
                element: node
            });
            try {
                getParentNode(node).removeChild(node);
            } catch (_) {
                remove(node);
            }
        };
        function _executeHooks(hooks, currentNode, data) {
            arrayForEach(hooks, hook => {
                hook.call(DOMPurify, currentNode, data, CONFIG);
            });
        }
        function _sanitizeElements(currentNode) {
            let content = null;
            if (_executeHooks(hooks.beforeSanitizeElements, currentNode, null), 
            !_isClobbered(currentNode)) {
                var tagName = transformCaseFunc(currentNode.nodeName);
                if (_executeHooks(hooks.uponSanitizeElement, currentNode, {
                    tagName: tagName,
                    allowedTags: ALLOWED_TAGS
                }), !(SAFE_FOR_XML && currentNode.hasChildNodes() && !_isNode(currentNode.firstElementChild) && regExpTest(/<[/\w!]/g, currentNode.innerHTML) && regExpTest(/<[/\w!]/g, currentNode.textContent) || currentNode.nodeType === NODE_TYPE.progressingInstruction || SAFE_FOR_XML && currentNode.nodeType === NODE_TYPE.comment && regExpTest(/<[/\w]/g, currentNode.data))) {
                    if (ALLOWED_TAGS[tagName] && !FORBID_TAGS[tagName]) return currentNode instanceof Element && !function(element) {
                        let parent = getParentNode(element);
                        parent && parent.tagName || (parent = {
                            namespaceURI: NAMESPACE,
                            tagName: "template"
                        });
                        var tagName = stringToLowerCase(element.tagName), parentTagName = stringToLowerCase(parent.tagName);
                        return ALLOWED_NAMESPACES[element.namespaceURI] && (element.namespaceURI === SVG_NAMESPACE ? parent.namespaceURI === HTML_NAMESPACE ? "svg" === tagName : parent.namespaceURI === MATHML_NAMESPACE ? "svg" === tagName && ("annotation-xml" === parentTagName || MATHML_TEXT_INTEGRATION_POINTS[parentTagName]) : Boolean(ALL_SVG_TAGS[tagName]) : element.namespaceURI === MATHML_NAMESPACE ? parent.namespaceURI === HTML_NAMESPACE ? "math" === tagName : parent.namespaceURI === SVG_NAMESPACE ? "math" === tagName && HTML_INTEGRATION_POINTS[parentTagName] : Boolean(ALL_MATHML_TAGS[tagName]) : element.namespaceURI === HTML_NAMESPACE ? !(parent.namespaceURI === SVG_NAMESPACE && !HTML_INTEGRATION_POINTS[parentTagName] || parent.namespaceURI === MATHML_NAMESPACE && !MATHML_TEXT_INTEGRATION_POINTS[parentTagName] || ALL_MATHML_TAGS[tagName]) && (COMMON_SVG_AND_HTML_ELEMENTS[tagName] || !ALL_SVG_TAGS[tagName]) : "application/xhtml+xml" === PARSER_MEDIA_TYPE && ALLOWED_NAMESPACES[element.namespaceURI]);
                    }(currentNode) || ("noscript" === tagName || "noembed" === tagName || "noframes" === tagName) && regExpTest(/<\/no(script|embed|frames)/i, currentNode.innerHTML) ? _forceRemove(currentNode) : (SAFE_FOR_TEMPLATES && currentNode.nodeType === NODE_TYPE.text && (content = currentNode.textContent, 
                    arrayForEach([ MUSTACHE_EXPR, ERB_EXPR, TMPLIT_EXPR ], expr => {
                        content = stringReplace(content, expr, " ");
                    }), currentNode.textContent !== content) && (arrayPush(DOMPurify.removed, {
                        element: currentNode.cloneNode()
                    }), currentNode.textContent = content), _executeHooks(hooks.afterSanitizeElements, currentNode, null));
                    if (!FORBID_TAGS[tagName] && _isBasicCustomElement(tagName)) {
                        if (CUSTOM_ELEMENT_HANDLING.tagNameCheck instanceof RegExp && regExpTest(CUSTOM_ELEMENT_HANDLING.tagNameCheck, tagName)) return;
                        if (CUSTOM_ELEMENT_HANDLING.tagNameCheck instanceof Function && CUSTOM_ELEMENT_HANDLING.tagNameCheck(tagName)) return;
                    }
                    if (KEEP_CONTENT && !FORBID_CONTENTS[tagName]) {
                        var parentNode = getParentNode(currentNode) || currentNode.parentNode, childNodes = getChildNodes(currentNode) || currentNode.childNodes;
                        if (childNodes && parentNode) for (let i = childNodes.length - 1; 0 <= i; --i) {
                            var childClone = cloneNode(childNodes[i], !0);
                            childClone.__removalCount = (currentNode.__removalCount || 0) + 1, 
                            parentNode.insertBefore(childClone, getNextSibling(currentNode));
                        }
                    }
                }
            }
            _forceRemove(currentNode);
        }
        function _isValidAttribute(lcTag, lcName, value) {
            if (SANITIZE_DOM && ("id" === lcName || "name" === lcName) && (value in document || value in formElement)) return !1;
            if ((!ALLOW_DATA_ATTR || FORBID_ATTR[lcName] || !regExpTest(DATA_ATTR, lcName)) && (!ALLOW_ARIA_ATTR || !regExpTest(ARIA_ATTR, lcName))) if (!ALLOWED_ATTR[lcName] || FORBID_ATTR[lcName]) {
                if (!(_isBasicCustomElement(lcTag) && (CUSTOM_ELEMENT_HANDLING.tagNameCheck instanceof RegExp && regExpTest(CUSTOM_ELEMENT_HANDLING.tagNameCheck, lcTag) || CUSTOM_ELEMENT_HANDLING.tagNameCheck instanceof Function && CUSTOM_ELEMENT_HANDLING.tagNameCheck(lcTag)) && (CUSTOM_ELEMENT_HANDLING.attributeNameCheck instanceof RegExp && regExpTest(CUSTOM_ELEMENT_HANDLING.attributeNameCheck, lcName) || CUSTOM_ELEMENT_HANDLING.attributeNameCheck instanceof Function && CUSTOM_ELEMENT_HANDLING.attributeNameCheck(lcName)) || "is" === lcName && CUSTOM_ELEMENT_HANDLING.allowCustomizedBuiltInElements && (CUSTOM_ELEMENT_HANDLING.tagNameCheck instanceof RegExp && regExpTest(CUSTOM_ELEMENT_HANDLING.tagNameCheck, value) || CUSTOM_ELEMENT_HANDLING.tagNameCheck instanceof Function && CUSTOM_ELEMENT_HANDLING.tagNameCheck(value)))) return !1;
            } else if (!URI_SAFE_ATTRIBUTES[lcName] && !regExpTest(IS_ALLOWED_URI$1, stringReplace(value, ATTR_WHITESPACE, "")) && ("src" !== lcName && "xlink:href" !== lcName && "href" !== lcName || "script" === lcTag || 0 !== stringIndexOf(value, "data:") || !DATA_URI_TAGS[lcTag]) && (!ALLOW_UNKNOWN_PROTOCOLS || regExpTest(IS_SCRIPT_OR_DATA, stringReplace(value, ATTR_WHITESPACE, ""))) && value) return !1;
            return !0;
        }
        function _sanitizeAttributes(currentNode) {
            _executeHooks(hooks.beforeSanitizeAttributes, currentNode, null);
            var attributes = currentNode.attributes;
            if (attributes && !_isClobbered(currentNode)) {
                var hookEvent = {
                    attrName: "",
                    attrValue: "",
                    keepAttr: !0,
                    allowedAttributes: ALLOWED_ATTR,
                    forceKeepAttr: void 0
                };
                let l = attributes.length;
                for (;l--; ) {
                    var {
                        name,
                        namespaceURI,
                        value: attrValue
                    } = attributes[l], lcName = transformCaseFunc(name);
                    let value = "value" === name ? attrValue : stringTrim(attrValue);
                    if (hookEvent.attrName = lcName, hookEvent.attrValue = value, 
                    hookEvent.keepAttr = !0, hookEvent.forceKeepAttr = void 0, _executeHooks(hooks.uponSanitizeAttribute, currentNode, hookEvent), 
                    value = hookEvent.attrValue, !SANITIZE_NAMED_PROPS || "id" !== lcName && "name" !== lcName || (_removeAttribute(name, currentNode), 
                    value = "user-content-" + value), SAFE_FOR_XML && regExpTest(/((--!?|])>)|<\/(style|title)/i, value)) _removeAttribute(name, currentNode); else if (!hookEvent.forceKeepAttr) if (hookEvent.keepAttr) if (!ALLOW_SELF_CLOSE_IN_ATTR && regExpTest(/\/>/i, value)) _removeAttribute(name, currentNode); else {
                        SAFE_FOR_TEMPLATES && arrayForEach([ MUSTACHE_EXPR, ERB_EXPR, TMPLIT_EXPR ], expr => {
                            value = stringReplace(value, expr, " ");
                        });
                        var lcTag = transformCaseFunc(currentNode.nodeName);
                        if (_isValidAttribute(lcTag, lcName, value)) {
                            if (trustedTypesPolicy && "object" == typeof trustedTypes && "function" == typeof trustedTypes.getAttributeType && !namespaceURI) switch (trustedTypes.getAttributeType(lcTag, lcName)) {
                              case "TrustedHTML":
                                value = trustedTypesPolicy.createHTML(value);
                                break;

                              case "TrustedScriptURL":
                                value = trustedTypesPolicy.createScriptURL(value);
                            }
                            if (value !== attrValue) try {
                                namespaceURI ? currentNode.setAttributeNS(namespaceURI, name, value) : currentNode.setAttribute(name, value), 
                                _isClobbered(currentNode) ? _forceRemove(currentNode) : arrayPop(DOMPurify.removed);
                            } catch (_) {
                                _removeAttribute(name, currentNode);
                            }
                        } else _removeAttribute(name, currentNode);
                    } else _removeAttribute(name, currentNode);
                }
                _executeHooks(hooks.afterSanitizeAttributes, currentNode, null);
            }
        }
        const _isBasicCustomElement = function(tagName) {
            return "annotation-xml" !== tagName && stringMatch(tagName, CUSTOM_ELEMENT);
        };
        return DOMPurify.sanitize = function(dirty) {
            var currentNode, cfg = 1 < arguments.length && void 0 !== arguments[1] ? arguments[1] : {};
            let body = null, returnNode = null;
            if ("string" != typeof (dirty = (IS_EMPTY_INPUT = !dirty) ? "\x3c!--\x3e" : dirty) && !_isNode(dirty)) {
                if ("function" != typeof dirty.toString) throw typeErrorCreate("toString is not a function");
                if ("string" != typeof (dirty = dirty.toString())) throw typeErrorCreate("dirty is not a string, aborting");
            }
            if (!DOMPurify.isSupported) return dirty;
            if (SET_CONFIG || _parseConfig(cfg), DOMPurify.removed = [], IN_PLACE = "string" != typeof dirty && IN_PLACE) {
                if (dirty.nodeName && (cfg = transformCaseFunc(dirty.nodeName), 
                !ALLOWED_TAGS[cfg] || FORBID_TAGS[cfg])) throw typeErrorCreate("root node is forbidden and cannot be sanitized in-place");
            } else if (dirty instanceof Node) (cfg = (body = _initDocument("\x3c!----\x3e")).ownerDocument.importNode(dirty, !0)).nodeType === NODE_TYPE.element && "BODY" === cfg.nodeName || "HTML" === cfg.nodeName ? body = cfg : body.appendChild(cfg); else {
                if (!RETURN_DOM && !SAFE_FOR_TEMPLATES && !WHOLE_DOCUMENT && -1 === dirty.indexOf("<")) return trustedTypesPolicy && RETURN_TRUSTED_TYPE ? trustedTypesPolicy.createHTML(dirty) : dirty;
                if (!(body = _initDocument(dirty))) return RETURN_DOM ? null : RETURN_TRUSTED_TYPE ? emptyHTML : "";
            }
            body && FORCE_BODY && _forceRemove(body.firstChild);
            for (var nodeIterator = _createNodeIterator(IN_PLACE ? dirty : body); currentNode = nodeIterator.nextNode(); ) _sanitizeElements(currentNode), 
            _sanitizeAttributes(currentNode), currentNode.content instanceof DocumentFragment && function _sanitizeShadowDOM(fragment) {
                var shadowNode, shadowIterator = _createNodeIterator(fragment);
                for (_executeHooks(hooks.beforeSanitizeShadowDOM, fragment, null); shadowNode = shadowIterator.nextNode(); ) _executeHooks(hooks.uponSanitizeShadowNode, shadowNode, null), 
                _sanitizeElements(shadowNode), _sanitizeAttributes(shadowNode), 
                shadowNode.content instanceof DocumentFragment && _sanitizeShadowDOM(shadowNode.content);
                _executeHooks(hooks.afterSanitizeShadowDOM, fragment, null);
            }(currentNode.content);
            if (IN_PLACE) return dirty;
            if (RETURN_DOM) {
                if (RETURN_DOM_FRAGMENT) for (returnNode = createDocumentFragment.call(body.ownerDocument); body.firstChild; ) returnNode.appendChild(body.firstChild); else returnNode = body;
                return returnNode = ALLOWED_ATTR.shadowroot || ALLOWED_ATTR.shadowrootmode ? importNode.call(originalDocument, returnNode, !0) : returnNode;
            }
            let serializedHTML = WHOLE_DOCUMENT ? body.outerHTML : body.innerHTML;
            return WHOLE_DOCUMENT && ALLOWED_TAGS["!doctype"] && body.ownerDocument && body.ownerDocument.doctype && body.ownerDocument.doctype.name && regExpTest(DOCTYPE_NAME, body.ownerDocument.doctype.name) && (serializedHTML = "<!DOCTYPE " + body.ownerDocument.doctype.name + ">\n" + serializedHTML), 
            SAFE_FOR_TEMPLATES && arrayForEach([ MUSTACHE_EXPR, ERB_EXPR, TMPLIT_EXPR ], expr => {
                serializedHTML = stringReplace(serializedHTML, expr, " ");
            }), trustedTypesPolicy && RETURN_TRUSTED_TYPE ? trustedTypesPolicy.createHTML(serializedHTML) : serializedHTML;
        }, DOMPurify.setConfig = function() {
            _parseConfig(0 < arguments.length && void 0 !== arguments[0] ? arguments[0] : {}), 
            SET_CONFIG = !0;
        }, DOMPurify.clearConfig = function() {
            CONFIG = null, SET_CONFIG = !1;
        }, DOMPurify.isValidAttribute = function(tag, attr, value) {
            return CONFIG || _parseConfig({}), _isValidAttribute(tag = transformCaseFunc(tag), attr = transformCaseFunc(attr), value);
        }, DOMPurify.addHook = function(entryPoint, hookFunction) {
            "function" == typeof hookFunction && arrayPush(hooks[entryPoint], hookFunction);
        }, DOMPurify.removeHook = function(entryPoint, hookFunction) {
            return void 0 !== hookFunction ? -1 === (hookFunction = arrayLastIndexOf(hooks[entryPoint], hookFunction)) ? void 0 : arraySplice(hooks[entryPoint], hookFunction, 1)[0] : arrayPop(hooks[entryPoint]);
        }, DOMPurify.removeHooks = function(entryPoint) {
            hooks[entryPoint] = [];
        }, DOMPurify.removeAllHooks = function() {
            hooks = _createHooksMap();
        }, DOMPurify;
    }();
    function addEvent(target, name, callback, capture) {
        target.addEventListener(name, callback, capture || !1);
    }
    function removeEvent(target, name, callback, capture) {
        target.removeEventListener(name, callback, capture || !1);
    }
    function fix(originalEvent, data) {
        var name, doc, event = data || {};
        function returnFalse() {
            return !1;
        }
        function returnTrue() {
            return !0;
        }
        for (name in originalEvent) deprecated[name] || (event[name] = originalEvent[name]);
        return event.target || (event.target = event.srcElement || document), originalEvent && mouseEventRe.test(originalEvent.type) && void 0 === originalEvent.pageX && void 0 !== originalEvent.clientX && (doc = (data = event.target.ownerDocument || document).documentElement, 
        data = data.body, event.pageX = originalEvent.clientX + (doc && doc.scrollLeft || data && data.scrollLeft || 0) - (doc && doc.clientLeft || data && data.clientLeft || 0), 
        event.pageY = originalEvent.clientY + (doc && doc.scrollTop || data && data.scrollTop || 0) - (doc && doc.clientTop || data && data.clientTop || 0)), 
        event.preventDefault = function() {
            event.isDefaultPrevented = returnTrue, originalEvent && originalEvent.preventDefault();
        }, event.stopPropagation = function() {
            event.isPropagationStopped = returnTrue, originalEvent && originalEvent.stopPropagation();
        }, event.stopImmediatePropagation = function() {
            event.isImmediatePropagationStopped = returnTrue, event.stopPropagation();
        }, event.isDefaultPrevented || (event.isDefaultPrevented = returnFalse, 
        event.isPropagationStopped = returnFalse, event.isImmediatePropagationStopped = returnFalse), 
        event;
    }
    function EventUtils() {
        var count, expando, hasFocusIn, hasMouseEnterLeave, mouseEnterLeave, self = this, events = {};
        function executeHandlers(evt, id) {
            var i, l, callback, callbackList = (id = events[id]) && id[evt.type];
            if (callbackList) for (i = 0, l = callbackList.length; i < l; i++) if ((callback = callbackList[i]) && !1 === callback.func.call(callback.scope, evt) && evt.preventDefault(), 
            evt.isImmediatePropagationStopped()) return;
        }
        expando = "mce-data-" + (+new Date()).toString(32), hasMouseEnterLeave = "onmouseenter" in document.documentElement, 
        hasFocusIn = "onfocusin" in document.documentElement, count = 1, self.domLoaded = !(mouseEnterLeave = {
            mouseenter: "mouseover",
            mouseleave: "mouseout"
        }), self.events = events, self.bind = function(target, names, callback, scope) {
            var id, callbackList, i, name, fakeName, nativeHandler, capture, win = window;
            function defaultNativeHandler(evt) {
                executeHandlers(fix(evt || win.event), id);
            }
            if (target && 3 !== target.nodeType && 8 !== target.nodeType) {
                for (target[expando] ? id = target[expando] : (id = count++, target[expando] = id, 
                events[id] = {}), scope = scope || target, i = (names = names.split(" ")).length; i--; ) nativeHandler = defaultNativeHandler, 
                fakeName = capture = !1, "DOMContentLoaded" === (name = names[i]) && (name = "ready"), 
                self.domLoaded && "ready" === name && "complete" == target.readyState ? callback.call(scope, fix({
                    type: name
                })) : (hasMouseEnterLeave || (fakeName = mouseEnterLeave[name]) && (nativeHandler = function(evt) {
                    var current = evt.currentTarget, related = evt.relatedTarget;
                    if (related && current.contains) related = current.contains(related); else for (;related && related !== current; ) related = related.parentNode;
                    related || ((evt = fix(evt || win.event)).type = "mouseout" === evt.type ? "mouseleave" : "mouseenter", 
                    evt.target = current, executeHandlers(evt, id));
                }), hasFocusIn || "focusin" !== name && "focusout" !== name || (capture = !0, 
                fakeName = "focusin" === name ? "focus" : "blur", nativeHandler = function(evt) {
                    (evt = fix(evt || win.event)).type = "focus" === evt.type ? "focusin" : "focusout", 
                    executeHandlers(evt, id);
                }), (callbackList = events[id][name]) ? "ready" === name && self.domLoaded ? callback({
                    type: name
                }) : callbackList.push({
                    func: callback,
                    scope: scope
                }) : (events[id][name] = callbackList = [ {
                    func: callback,
                    scope: scope
                } ], callbackList.fakeName = fakeName, callbackList.capture = capture, 
                callbackList.nativeHandler = nativeHandler, "ready" === name ? function(win, callback, eventUtils) {
                    var doc = win.document, event = {
                        type: "ready"
                    };
                    function readyHandler() {
                        eventUtils.domLoaded || (eventUtils.domLoaded = !0, callback(event));
                    }
                    eventUtils.domLoaded ? callback(event) : ("complete" === doc.readyState ? readyHandler() : addEvent(win, "DOMContentLoaded", readyHandler), 
                    addEvent(win, "load", readyHandler));
                }(target, nativeHandler, self) : addEvent(target, fakeName || name, nativeHandler, capture)));
                return target = callbackList = 0, callback;
            }
        }, self.unbind = function(target, names, callback) {
            var id, i, ci, name, eventMap, nativeHandler, fakeName, capture, callbackList;
            if (target && 3 !== target.nodeType && 8 !== target.nodeType && (id = target[expando])) {
                if (eventMap = events[id], names) {
                    for (i = (names = names.split(" ")).length; i--; ) if (callbackList = eventMap[name = names[i]]) {
                        if (callback) for (ci = callbackList.length; ci--; ) callbackList[ci].func === callback && (nativeHandler = callbackList.nativeHandler, 
                        fakeName = callbackList.fakeName, capture = callbackList.capture, 
                        (callbackList = callbackList.slice(0, ci).concat(callbackList.slice(ci + 1))).nativeHandler = nativeHandler, 
                        callbackList.fakeName = fakeName, callbackList.capture = capture, 
                        eventMap[name] = callbackList);
                        callback && 0 !== callbackList.length || (delete eventMap[name], 
                        removeEvent(target, callbackList.fakeName || name, callbackList.nativeHandler, callbackList.capture));
                    }
                } else {
                    for (name in eventMap) removeEvent(target, (callbackList = eventMap[name]).fakeName || name, callbackList.nativeHandler, callbackList.capture);
                    eventMap = {};
                }
                for (name in eventMap) return self;
                delete events[id];
                try {
                    delete target[expando];
                } catch (ex) {
                    target[expando] = null;
                }
            }
            return self;
        }, self.fire = function(target, name, args) {
            var id;
            if (target && 3 !== target.nodeType && 8 !== target.nodeType) {
                for ((args = fix(null, args)).type = name, args.target = target; (id = target[expando]) && executeHandlers(args, id), 
                (target = target.parentNode || target.ownerDocument || target.defaultView || target.parentWindow) && !args.isPropagationStopped(); );
                self.args = args;
            }
            return self;
        }, self.clean = function(target) {
            var i, children, unbind = self.unbind;
            if (target && 3 !== target.nodeType && 8 !== target.nodeType && (target[expando] && unbind(target), 
            target = target.getElementsByTagName ? target : target.document) && target.getElementsByTagName) for (unbind(target), 
            i = (children = target.getElementsByTagName("*")).length; i--; ) (target = children[i])[expando] && unbind(target);
            return self;
        }, self.destroy = function() {
            events = {};
        }, self.cancel = function(e) {
            return e && (e.preventDefault(), e.stopImmediatePropagation()), !1;
        }, self.add = function(target, events, func, scope) {
            if (!((target = "string" == typeof target ? document.getElementById(target) : target) && target instanceof Array)) return self.bind(target, (events = "init" === events ? "ready" : events) instanceof Array ? events.join(" ") : events, func, scope);
            for (var i = target.length; i--; ) self.add(target[i], events, func, scope);
        }, self.remove = function(target, events, func, scope) {
            if (!target) return self;
            if ((target = "string" == typeof target ? document.getElementById(target) : target) instanceof Array) {
                for (var i = target.length; i--; ) self.remove(target[i], events, func, scope);
                return self;
            }
            return self.unbind(target, events instanceof Array ? events.join(" ") : events, func);
        }, self.clear = function(target) {
            return "string" == typeof target && (target = document.getElementById(target)), 
            self.clean(target);
        }, self.preventDefault = function(e) {
            e && e.preventDefault();
        }, self.isDefaultPrevented = function(e) {
            return e.isDefaultPrevented();
        };
    }
    !function(tinymce) {
        var each = tinymce.each, isDomSafe = tinymce.util.URI.isDomSafe, filteredUrlAttrs = tinymce.makeMap("src,href,data,background,action,formaction,poster,xlink:href");
        tinymce.html.Sanitizer = function(settings, schema) {
            var special = schema.getSpecialElements(), uid = 0;
            function isBooleanAttribute(name) {
                var boolAttrMap = schema.getBoolAttrs();
                return boolAttrMap[name] || boolAttrMap[name.toLowerCase()];
            }
            function shouldKeepAttribute(attrName, attrValue, tagName) {
                return attrName = attrName.toLowerCase(), tagName = tagName.toLowerCase(), 
                !(attrName in filteredUrlAttrs && !isDomSafe(attrValue, tagName, settings) || settings.validate && !/-/.test(attrName) && (/^on[a-z]+/i.test(attrName) && !settings.allow_event_attributes || !schema.isValid(tagName, attrName)));
            }
            function processNode(node, evt) {
                if (1 === node.nodeType) {
                    var tag = node.tagName.toLowerCase();
                    if ("body" !== tag) if (node.hasAttribute("data-mce-root")) evt && (evt.allowedTags[tag] = !0); else if (node.hasAttribute("data-mce-type")) evt && (evt.allowedTags[tag] = !0); else if (node.hasAttribute("data-mce-bogus")) removeNode(node); else {
                        var rule = schema.getElementRule(tag);
                        if (settings.validate && !rule) tag in special ? removeNode(node) : removeNode(node, !0); else if (evt && (evt.allowedTags[tag] = !0), 
                        settings.validate && rule) if (each(rule.attributesForced, function(attr) {
                            node.setAttribute(attr.name, "{$uid}" === attr.value ? "mce_" + uid++ : attr.value);
                        }), each(rule.attributesDefault, function(attr) {
                            node.hasAttribute(attr.name) || node.setAttribute(attr.name, "{$uid}" === attr.value ? "mce_" + uid++ : attr.value);
                        }), rule.attributesRequired && !rule.attributesRequired.some(function(attr) {
                            return node.hasAttribute(attr.name);
                        })) removeNode(node, !0); else if (rule.removeEmptyAttrs && 0 === node.attributes.length) removeNode(node, !0); else if (rule.outputName && rule.outputName !== tag) {
                            for (var newNode = document.createElement(rule.outputName); node.firstChild; ) newNode.appendChild(node.firstChild);
                            node.parentNode.replaceChild(newNode, node), node = newNode;
                        }
                    }
                }
            }
            function removeNode(node, unwrap) {
                var parent = node.parentNode;
                if (parent) {
                    if (special[node.tagName.toLowerCase()] && (unwrap = !1), unwrap = !(!node.hasAttribute("data-mce-bogus") || "all" == node.getAttribute("data-mce-bogus")) || unwrap) {
                        for (var frag = document.createDocumentFragment(); node.firstChild; ) frag.appendChild(node.firstChild);
                        parent.insertBefore(frag, node);
                    }
                    parent.removeChild(node);
                }
            }
            this.sanitize = function(body, mimeType) {
                if (!1 !== settings.sanitize_html) return function(body, mimeType) {
                    var purifier = purify(), mimeType = (purifier.removeAllHooks(), 
                    purifier.addHook("uponSanitizeElement", function(node, data) {
                        processNode(node, data);
                    }), purifier.addHook("uponSanitizeAttribute", function(node, data) {
                        var attrName = data.attrName.toLowerCase(), attrValue = data.attrValue, tag = node.tagName.toLowerCase();
                        data.keepAttr = shouldKeepAttribute(attrName, attrValue, tag), 
                        data.keepAttr ? settings.allow_svg_data_urls && data.attrValue.startsWith("data:image/svg+xml") ? data.forceKeepAttr = !0 : (isBooleanAttribute(attrName) && (data.attrValue = attrName), 
                        data.allowedAttributes[attrName] = !0) : node.hasAttribute("data-mce-type") && [ "id", "class", "style" ].includes(attrName) && (data.forceKeepAttr = !0);
                    }), function(mimeType) {
                        var config = {
                            IN_PLACE: !0,
                            ALLOW_UNKNOWN_PROTOCOLS: !0,
                            ALLOWED_TAGS: [ "#comment", "#cdata-section", "body" ],
                            ALLOWED_ATTR: [],
                            PARSER_MEDIA_TYPE: mimeType,
                            SAFE_FOR_XML: !0
                        };
                        return settings.allow_script_urls ? config.ALLOWED_URI_REGEXP = /.*/ : settings.allow_html_data_urls && (config.ALLOWED_URI_REGEXP = /^(?!(\w+script|mhtml):)/i), 
                        (schema.isValid("script") || schema.isValid("style")) && (config.FORCE_BODY = !0), 
                        each(schema.getValidElements(), function(rule, tag) {
                            config.ALLOWED_TAGS.push(tag);
                        }), config;
                    }(mimeType));
                    return "string" == typeof body && (mimeType.RETURN_DOM = !1), 
                    purifier.sanitize(body, mimeType), purifier.removed = [], body;
                }(body, mimeType);
                for (var node, iterator = document.createNodeIterator(body, NodeFilter.SHOW_ELEMENT | NodeFilter.SHOW_COMMENT | NodeFilter.SHOW_TEXT); node = iterator.nextNode(); ) processNode(node), 
                1 === node.nodeType && function(node) {
                    for (var attrs = node.attributes, tag = node.tagName.toLowerCase(), i = attrs.length - 1; 0 <= i; i--) {
                        var name = attrs[i].name;
                        if (!shouldKeepAttribute(name, attrs[i].value, tag)) {
                            if (node.hasAttribute("data-mce-type") && [ "id", "class", "style" ].includes(name)) continue;
                            node.removeAttribute(name);
                        }
                        isBooleanAttribute(name) && node.setAttribute(name, name);
                    }
                }(node);
                return body;
            };
        };
    }(tinymce), function(tinymce) {
        var Node = tinymce.html.Node, each = tinymce.each, explode = tinymce.explode, extend = tinymce.extend, makeMap = tinymce.makeMap;
        tinymce.html.DomParser = function(settings, schema) {
            var self = this, nodeFilters = {}, attributeFilters = [], matchedNodes = {}, matchedAttributes = {}, Sanitizer = ((settings = settings || {}).validate = !("validate" in settings) || settings.validate, 
            settings.root_name = settings.root_name || "body", self.schema = schema = schema || new tinymce.html.Schema(), 
            settings.sanitize_html = !("sanitize_html" in settings) || settings.sanitize_html, 
            new tinymce.html.Sanitizer(settings, schema));
            self.filterNode = function(node) {
                var i, name, list;
                name in nodeFilters && ((list = matchedNodes[name]) ? list.push(node) : matchedNodes[name] = [ node ]), 
                i = attributeFilters.length;
                for (;i--; ) (name = attributeFilters[i].name) in node.attributes.map && ((list = matchedAttributes[name]) ? list.push(node) : matchedAttributes[name] = [ node ]);
                return node;
            }, self.addNodeFilter = function(name, callback) {
                each(explode(name), function(name) {
                    var list = nodeFilters[name];
                    list || (nodeFilters[name] = list = []), list.push(callback);
                });
            }, self.addAttributeFilter = function(name, callback) {
                each(explode(name), function(name) {
                    for (var i = 0; i < attributeFilters.length; i++) if (attributeFilters[i].name === name) return void attributeFilters[i].callbacks.push(callback);
                    attributeFilters.push({
                        name: name,
                        callbacks: [ callback ]
                    });
                });
            }, self.parse = function(html, args) {
                var parser, rootNode, node, nodes, i, l, fi, fl, list, name, validate, blockElements, startWhiteSpaceRegExp, isInWhiteSpacePreservedElement, endWhiteSpaceRegExp, allWhiteSpaceRegExp, isAllWhiteSpaceRegExp, whiteSpaceElements, children, nonEmptyElements, rootBlockName, invalidChildren = [];
                function createNode(name, type) {
                    var list, type = new Node(name, type);
                    return name in nodeFilters && ((list = matchedNodes[name]) ? list.push(type) : matchedNodes[name] = [ type ]), 
                    type;
                }
                function removeWhitespaceBefore(node) {
                    for (var textVal, blockElements = schema.getBlockElements(), textNode = node.prev; textNode && 3 === textNode.type; ) {
                        if (0 < (textVal = textNode.value.replace(endWhiteSpaceRegExp, "")).length) return textNode.value = textVal;
                        if (textVal = textNode.next) {
                            if (3 == textVal.type && textVal.value.length) {
                                textNode = textNode.prev;
                                continue;
                            }
                            if (!blockElements[textVal.name] && "script" != textVal.name && "style" != textVal.name) {
                                textNode = textNode.prev;
                                continue;
                            }
                        }
                        textVal = textNode.prev, textNode.remove(), textNode = textVal;
                    }
                }
                if (args = args || {}, matchedNodes = {}, matchedAttributes = {}, 
                blockElements = extend(makeMap("script,style,head,html,body,title,meta,param"), schema.getBlockElements()), 
                nonEmptyElements = schema.getNonEmptyElements(), children = schema.children, 
                validate = settings.validate, rootBlockName = ("forced_root_block" in args ? args : settings).forced_root_block, 
                whiteSpaceElements = schema.getWhiteSpaceElements(), startWhiteSpaceRegExp = /^[ \t\r\n]+/, 
                endWhiteSpaceRegExp = /[ \t\r\n]+$/, allWhiteSpaceRegExp = /[ \t\r\n]+/g, 
                isAllWhiteSpaceRegExp = /^[ \t\r\n]+$/, parser = new tinymce.html.SaxParser({
                    validate: validate,
                    allow_script_urls: settings.allow_script_urls,
                    allow_conditional_comments: settings.allow_conditional_comments,
                    allow_event_attributes: settings.allow_event_attributes,
                    self_closing_elements: function(input) {
                        var name, output = {};
                        for (name in input) "li" !== name && "p" != name && (output[name] = input[name]);
                        return output;
                    }(schema.getSelfClosingElements()),
                    cdata: function(text) {
                        node.append(createNode("#cdata", 4)).value = text;
                    },
                    text: function(text, raw) {
                        var textNode;
                        isInWhiteSpacePreservedElement || (text = text.replace(allWhiteSpaceRegExp, " "), 
                        node.lastChild && blockElements[node.lastChild.name] && (text = text.replace(startWhiteSpaceRegExp, ""))), 
                        0 !== text.length && ((textNode = createNode("#text", 3)).raw = !!raw, 
                        node.append(textNode).value = text);
                    },
                    comment: function(text) {
                        node.append(createNode("#comment", 8)).value = text;
                    },
                    pi: function(name, text) {
                        node.append(createNode(name, 7)).value = text, removeWhitespaceBefore(node);
                    },
                    doctype: function(text) {
                        node.append(createNode("#doctype", 10)).value = text, removeWhitespaceBefore(node);
                    },
                    start: function(name, attrs, empty) {
                        var newNode, attrFiltersLen, attrName, elementRule = validate ? schema.getElementRule(name) : {};
                        if (elementRule) {
                            for ((newNode = createNode(elementRule.outputName || name, 1)).attributes = attrs, 
                            newNode.shortEnded = empty, node.append(newNode), (elementRule = children[node.name]) && children[newNode.name] && !elementRule[newNode.name] && invalidChildren.push(newNode), 
                            attrFiltersLen = attributeFilters.length; attrFiltersLen--; ) (attrName = attributeFilters[attrFiltersLen].name) in attrs.map && ((list = matchedAttributes[attrName]) ? list.push(newNode) : matchedAttributes[attrName] = [ newNode ]);
                            blockElements[name] && removeWhitespaceBefore(newNode), 
                            empty || (node = newNode), !isInWhiteSpacePreservedElement && whiteSpaceElements[name] && (isInWhiteSpacePreservedElement = !0);
                        }
                    },
                    end: function(name) {
                        var textNode, text, sibling, elementRule = validate ? schema.getElementRule(name) : {};
                        if (elementRule) {
                            if (blockElements[name] && !isInWhiteSpacePreservedElement) {
                                if ((textNode = node.firstChild) && 3 === textNode.type) if (0 < (text = textNode.value.replace(startWhiteSpaceRegExp, "")).length) textNode.value = text, 
                                textNode = textNode.next; else for (sibling = textNode.next, 
                                textNode.remove(), textNode = sibling; textNode && 3 === textNode.type; ) text = textNode.value, 
                                sibling = textNode.next, 0 !== text.length && !isAllWhiteSpaceRegExp.test(text) || (textNode.remove(), 
                                textNode = sibling), textNode = sibling;
                                if ((textNode = node.lastChild) && 3 === textNode.type) if (0 < (text = textNode.value.replace(endWhiteSpaceRegExp, "")).length) textNode.value = text, 
                                textNode = textNode.prev; else for (sibling = textNode.prev, 
                                textNode.remove(), textNode = sibling; textNode && 3 === textNode.type; ) text = textNode.value, 
                                sibling = textNode.prev, 0 !== text.length && !isAllWhiteSpaceRegExp.test(text) || (textNode.remove(), 
                                textNode = sibling), textNode = sibling;
                            }
                            if (isInWhiteSpacePreservedElement && whiteSpaceElements[name] && (isInWhiteSpacePreservedElement = !1), 
                            (elementRule.removeEmpty || elementRule.paddEmpty) && node.isEmpty(nonEmptyElements)) if (elementRule.paddEmpty) node.empty().append(new Node("#text", "3")).value = "\xa0"; else if (!node.attributes.map.name && !node.attributes.map.id) return name = node.parent, 
                            blockElements[node.name] ? node.empty().remove() : node.unwrap(), 
                            void (node = name);
                            node = node.parent;
                        }
                    }
                }, schema), !1 !== settings.sanitize_html && (html = Sanitizer.sanitize(html, "text/html")), 
                rootNode = node = new Node(args.context || settings.root_name, 11), 
                parser.parse(html), validate && invalidChildren.length && (args.context ? args.invalid = !0 : function(nodes) {
                    for (var node, parent, parents, newParent, currentNode, tempNode, childNode, i, sibling, nextNode, nonSplitableElements = makeMap("tr,td,th,tbody,thead,tfoot,table"), nonEmptyElements = schema.getNonEmptyElements(), textBlockElements = schema.getTextBlockElements(), specialElements = schema.getSpecialElements(), removeOrUnwrapInvalidNode = function(node, originalNodeParent) {
                        if (specialElements[node.name]) node.empty().remove(); else {
                            var childNode;
                            for (childNode of node.children()) schema.isValidChild(originalNodeParent.name, childNode.name) || removeOrUnwrapInvalidNode(childNode, originalNodeParent);
                            node.unwrap();
                        }
                    }, ni = 0; ni < nodes.length; ni++) if ((node = nodes[ni]).parent && !node.fixed) if (textBlockElements[node.name] && "li" == node.parent.name) {
                        for (sibling = node.next; sibling && textBlockElements[sibling.name]; ) sibling.name = "li", 
                        sibling.fixed = !0, node.parent.insert(sibling, node.parent), 
                        sibling = sibling.next;
                        node.unwrap(node);
                    } else {
                        for (parents = [ node ], parent = node.parent; parent && !schema.isValidChild(parent.name, node.name) && !nonSplitableElements[parent.name]; parent = parent.parent) parents.push(parent);
                        if (parent && 1 < parents.length) if (schema.isValidChild(parent.name, node.name)) {
                            for (parents.reverse(), newParent = currentNode = self.filterNode(parents[0].clone()), 
                            i = 0; i < parents.length - 1; i++) {
                                for (schema.isValidChild(currentNode.name, parents[i].name) ? (tempNode = self.filterNode(parents[i].clone()), 
                                currentNode.append(tempNode)) : tempNode = currentNode, 
                                childNode = parents[i].firstChild; childNode && childNode != parents[i + 1]; ) nextNode = childNode.next, 
                                tempNode.append(childNode), childNode = nextNode;
                                currentNode = tempNode;
                            }
                            newParent.isEmpty(nonEmptyElements) ? parent.insert(node, parents[0], !0) : (parent.insert(newParent, parents[0], !0), 
                            parent.insert(node, newParent)), ((parent = parents[0]).isEmpty(nonEmptyElements) || parent.firstChild === parent.lastChild && "br" === parent.firstChild.name) && parent.empty().remove();
                        } else removeOrUnwrapInvalidNode(node, node.parent); else node.parent && ("li" === node.name ? !(sibling = node.prev) || "ul" !== sibling.name && "ol" !== sibling.name ? !(sibling = node.next) || "ul" !== sibling.name && "ol" !== sibling.name ? node.wrap(self.filterNode(new Node("ul", 1))) : sibling.insert(node, sibling.firstChild, !0) : sibling.append(node) : schema.isValidChild(node.parent.name, "div") && schema.isValidChild("div", node.name) ? node.wrap(self.filterNode(new Node("div", 1))) : removeOrUnwrapInvalidNode(node, node.parent));
                    }
                }(invalidChildren)), rootBlockName && ("body" == rootNode.name || args.isRootContent) && function() {
                    var next, rootBlockNode, node = rootNode.firstChild;
                    function trim(rootBlockNode) {
                        rootBlockNode && ((node = rootBlockNode.firstChild) && 3 == node.type && (node.value = node.value.replace(startWhiteSpaceRegExp, "")), 
                        node = rootBlockNode.lastChild) && 3 == node.type && (node.value = node.value.replace(endWhiteSpaceRegExp, ""));
                    }
                    if (schema.isValidChild(rootNode.name, rootBlockName.toLowerCase())) {
                        for (;node; ) next = node.next, 3 == node.type && tinymce.trim(node.value) || 1 == node.type && "p" !== node.name && !blockElements[node.name] && !node.attr("data-mce-type") ? (rootBlockNode || ((rootBlockNode = createNode(rootBlockName, 1)).attr(settings.forced_root_block_attrs), 
                        rootNode.insert(rootBlockNode, node)), rootBlockNode.append(node)) : (trim(rootBlockNode), 
                        rootBlockNode = null), node = next;
                        trim(rootBlockNode);
                    }
                }(), !args.invalid) {
                    for (name in matchedNodes) {
                        for (list = nodeFilters[name], fi = (nodes = matchedNodes[name]).length; fi--; ) nodes[fi].parent || nodes.splice(fi, 1);
                        for (i = 0, l = list.length; i < l; i++) list[i](nodes, name, args);
                    }
                    for (i = 0, l = attributeFilters.length; i < l; i++) if ((list = attributeFilters[i]).name in matchedAttributes) {
                        for (fi = (nodes = matchedAttributes[list.name]).length; fi--; ) nodes[fi].parent || nodes.splice(fi, 1);
                        for (fi = 0, fl = list.callbacks.length; fi < fl; fi++) list.callbacks[fi](nodes, list.name, args);
                    }
                }
                return rootNode;
            }, settings.remove_trailing_brs && self.addNodeFilter("br", function(nodes) {
                var i, node, parent, lastParent, prev, prevName, elementRule, l = nodes.length, blockElements = extend({}, schema.getBlockElements()), nonEmptyElements = schema.getNonEmptyElements();
                for (blockElements.body = 1, i = 0; i < l; i++) if (parent = (node = nodes[i]).parent, 
                blockElements[node.parent.name] && node === parent.lastChild) {
                    for (prev = node.prev; prev; ) {
                        if ("span" !== (prevName = prev.name) || "bookmark" !== prev.attr("data-mce-type")) {
                            if ("br" !== prevName) break;
                            if ("br" === prevName) {
                                node = null;
                                break;
                            }
                        }
                        prev = prev.prev;
                    }
                    !node || node.attributes.length && "data-mce-bogus" !== node.attributes[0].name || (node.remove(), 
                    parent.isEmpty(nonEmptyElements) && (elementRule = schema.getElementRule(parent.name)) && (elementRule.removeEmpty ? parent.remove() : elementRule.paddEmpty && (parent.empty().append(new Node("#text", 3)).value = "\xa0")));
                } else {
                    for (lastParent = node; parent && parent.firstChild === lastParent && parent.lastChild === lastParent && !blockElements[(lastParent = parent).name]; ) parent = parent.parent;
                    lastParent === parent && ((elementRule = new Node("#text", 3)).value = "\xa0", 
                    node.replace(elementRule));
                }
            }), self.addAttributeFilter("href", function(nodes) {
                var node, i = nodes.length;
                if (!settings.allow_unsafe_link_target) for (;i--; ) "a" === (node = nodes[i]).name && "_blank" === node.attr("target") && /:\/\//.test(node.attr("href")) && node.attr("rel", (node = (node = node.attr("rel")) ? tinymce.trim(node) : "", 
                /\b(noopener)\b/g.test(node) ? node : function(rel) {
                    return rel.split(" ").filter(function(p) {
                        return 0 < p.length;
                    }).concat([ "noopener" ]).sort().join(" ");
                }(node)));
            }), settings.allow_html_in_named_anchor || self.addAttributeFilter("id,name", function(nodes) {
                for (var sibling, prevSibling, parent, node, i = nodes.length; i--; ) if ("a" === (node = nodes[i]).name && node.firstChild && !node.attr("href")) for (parent = node.parent, 
                sibling = node.lastChild; prevSibling = sibling.prev, parent.insert(sibling, node), 
                sibling = prevSibling; );
            }), settings.validate && schema.getValidClasses() && self.addAttributeFilter("class", function(nodes) {
                for (var node, classList, ci, className, classValue, validClassesMap, valid, i = nodes.length, validClasses = schema.getValidClasses(); i--; ) {
                    for (classList = (node = nodes[i]).attr("class").split(" "), 
                    classValue = "", ci = 0; ci < classList.length; ci++) className = classList[ci], 
                    valid = !1, (validClassesMap = validClasses["*"]) && validClassesMap[className] && (valid = !0), 
                    validClassesMap = validClasses[node.name], (valid = !(valid || !validClassesMap || !validClassesMap[className]) || valid) && (classValue && (classValue += " "), 
                    classValue += className);
                    classValue.length || (classValue = null), node.attr("class", classValue);
                }
            }), self.getNodeFilters = function() {
                return nodeFilters;
            }, self.getAttributeFilters = function() {
                return attributeFilters;
            };
        };
    }(tinymce), function(tinymce) {
        var Node = tinymce.html.Node, TransparentElements = tinymce.html.TransparentElements, InvalidNodes = tinymce.html.InvalidNodes, FilterNode = tinymce.html.FilterNode, each = tinymce.each, explode = tinymce.explode, extend = tinymce.extend, makeMap = tinymce.makeMap;
        tinymce.html.DomParser = function(settings, schema) {
            var nodeFilters = [], attributeFilters = [], Sanitizer = ((settings = settings || {}).validate = !("validate" in settings) || settings.validate, 
            settings.root_name = settings.root_name || "body", this.schema = schema = schema || new tinymce.html.Schema(), 
            settings.sanitize_html = !("sanitize_html" in settings) || settings.sanitize_html, 
            new tinymce.html.Sanitizer(settings, schema)), DomParser = new DOMParser();
            this.addNodeFilter = function(name, callback) {
                each(explode(name), function(name) {
                    for (var i = 0; i < nodeFilters.length; i++) if (nodeFilters[i].name === name) return void nodeFilters[i].callbacks.push(callback);
                    nodeFilters.push({
                        name: name,
                        callbacks: [ callback ]
                    });
                });
            }, this.addAttributeFilter = function(name, callback) {
                each(explode(name), function(name) {
                    for (var i = 0; i < attributeFilters.length; i++) if (attributeFilters[i].name === name) return void attributeFilters[i].callbacks.push(callback);
                    attributeFilters.push({
                        name: name,
                        callbacks: [ callback ]
                    });
                });
            }, this.parse = function(html, args) {
                var rootNode, invalidChildren = [];
                function hasWhitespaceParent(node) {
                    for (var temp = node.parent; temp; ) {
                        if (whitespaceElements[temp.name]) return 1;
                        temp = temp.parent;
                    }
                }
                function isBlock(node) {
                    return node.name in blockElements || TransparentElements.isTransparentBlock(schema, node);
                }
                function isAtEdgeOfBlock(node, start) {
                    return (start ? !node.prev : !node.next) && node.parent && isBlock(node.parent) && (node.parent !== rootNode || !0 === args.isRootContent);
                }
                function paddEmptyNode(node) {
                    var newNode;
                    (settings.pad_empty_with_br || args.insert) && isBlock(node) ? ((newNode = new Node("br", 1)).shortEnded = !0, 
                    args.insert && newNode.attr("data-mce-bogus", "1")) : (newNode = new Node("#text", 3)).value = "\xa0", 
                    node.empty().append(newNode);
                }
                function isEmpty(node) {
                    return node.isEmpty(nonEmptyElements, whitespaceElements);
                }
                function matchFinder(node) {
                    FilterNode.matchNode(nodeFilters, attributeFilters, node, matches);
                }
                args = args || {};
                var blockElements = extend(makeMap("script,style,head,html,body,title,meta,param"), schema.getBlockElements()), nonEmptyElements = schema.getNonEmptyElements(), shortEndedElements = schema.getShortEndedElements(), validate = settings.validate, rootBlockName = ("forced_root_block" in args ? args : settings).forced_root_block, whitespaceElements = schema.getWhiteSpaceElements(), textRootBlockElements = schema.getTextRootBlockElements(), startWhiteSpaceRegExp = /^[ \t\r\n]+/, endWhiteSpaceRegExp = /[ \t\r\n]+$/, allWhiteSpaceRegExp = /[ \t\r\n]+/g, html = function(html, rootName, format) {
                    var mimeType = "xhtml" === format ? "application/xhtml+xml" : "text/html", isSpecialRoot = !!schema.getSpecialElements()[rootName.toLowerCase()], rootName = isSpecialRoot ? `<${rootName}>${html}</${rootName}>` : html, format = DomParser.parseFromString("xhtml" === format ? `<html xmlns="http://www.w3.org/1999/xhtml"><head></head><body>${rootName}</body></html>` : /^[\s]*<head/i.test(html) || /^[\s]*<html/i.test(html) || /^[\s]*<!DOCTYPE/i.test(html) ? `<html>${rootName}</html>` : `<body>${rootName}</body>`, mimeType).body, format = Sanitizer.sanitize(format, mimeType);
                    return isSpecialRoot ? format.firstChild : format;
                }(html, rootName = (args.context || settings.root_name).toLowerCase(), args.format), [ rootName, html ] = (TransparentElements.updateChildren(schema, html), 
                function transferChildren(parent, nativeParent, specialElements) {
                    for (var parentName = parent.name, isSpecial = (parentName in specialElements && "title" !== parentName && "textarea" !== parentName && "noscript" !== parentName), childNodes = nativeParent.childNodes, ni = 0, nl = childNodes.length; ni < nl; ni++) {
                        var nativeChild = childNodes[ni], nodeType = nativeChild.nodeType, nodeName = nativeChild.nodeName.toLowerCase(), newNode = new Node(nodeName, nodeType);
                        if (1 == nodeType) {
                            var attributes = Array.from(nativeChild.attributes);
                            settings.sanitize_html;
                            for (var ai = 0, al = attributes.length; ai < al; ai++) {
                                var attr = attributes[ai];
                                newNode.attr(attr.name, attr.value);
                            }
                            if (newNode.shortEnded = nodeName in shortEndedElements || !1, 
                            "template" === nodeName) {
                                transferChildren(newNode, nativeChild.content, specialElements), 
                                parent.append(newNode);
                                continue;
                            }
                        }
                        3 == nodeType && (newNode.value = nativeChild.data, isSpecial) && (newNode.raw = !0), 
                        8 != nodeType && 4 != nodeType && 7 != nodeType && 11 != nodeType || (nodeName = nativeChild.data, 
                        8 != nodeType || settings.allow_conditional_comments || 0 !== nodeName.toLowerCase().indexOf("[if") || (nodeName = " " + nodeName), 
                        newNode.value = nodeName), transferChildren(newNode, nativeChild, specialElements), 
                        parent.append(newNode);
                    }
                }(rootNode = new Node(rootName, 11), html, schema.getSpecialElements()), 
                html.innerHTML = "", [ function(node) {
                    var text;
                    3 !== node.type || hasWhitespaceParent(node) || (text = (text = node.value || "").replace(allWhiteSpaceRegExp, " "), 
                    0 === (text = function(node, isBlock) {
                        return node && (isBlock(node) || "br" === node.name);
                    }(node.prev, isBlock) || isAtEdgeOfBlock(node, !0) ? text.replace(startWhiteSpaceRegExp, "") : text).length ? node.remove() : node.value = text);
                }, function(node) {
                    var isNodeEmpty, elementRule;
                    1 === node.type ? (elementRule = schema.getElementRule(node.name), 
                    validate && elementRule && (isNodeEmpty = isEmpty(node), elementRule.paddInEmptyBlock && isNodeEmpty && function(node) {
                        for (var tempNode = node; tempNode; ) {
                            if (textRootBlockElements[tempNode.name]) return isEmpty(tempNode);
                            tempNode = tempNode.parent;
                        }
                    }(node) ? paddEmptyNode(node) : elementRule.removeEmpty && isNodeEmpty ? isBlock(node) ? node.remove() : node.unwrap() : elementRule.paddEmpty && (isNodeEmpty || function(node) {
                        return function(node) {
                            var firstChild = node.firstChild;
                            return firstChild && firstChild === node.lastChild && "#text" === firstChild.name;
                        }(node) && node.firstChild && "\xa0" === node.firstChild.value;
                    }(node)) && paddEmptyNode(node))) : 3 !== node.type || hasWhitespaceParent(node) || (elementRule = node.value || "", 
                    0 === (elementRule = node.next && isBlock(node.next) || isAtEdgeOfBlock(node, !1) ? elementRule.replace(endWhiteSpaceRegExp, "") : elementRule).length ? node.remove() : node.value = elementRule);
                } ]), matches = {
                    nodes: {},
                    attributes: {}
                };
                if (function(root, preprocessors, postprocessors) {
                    for (var traverseOrder = [], node = root, lastNode = root; node; ) {
                        for (var tempNode = node, i = 0; i < preprocessors.length; i++) preprocessors[i](tempNode);
                        tempNode.parent || tempNode === root ? traverseOrder.push(tempNode) : node = lastNode, 
                        node = (lastNode = node).walk();
                    }
                    for (i = traverseOrder.length - 1; 0 <= i; i--) for (var postNode = traverseOrder[i], j = 0; j < postprocessors.length; j++) postprocessors[j](postNode);
                }(rootNode, [ rootName, matchFinder ], [ html, validate ? function(node) {
                    !function(node, invalids) {
                        InvalidNodes.isInvalid(schema, node) && invalids.push(node);
                    }(node, invalidChildren);
                } : function() {} ]), invalidChildren.reverse(), validate && invalidChildren.length) if (args.context) {
                    for (var topLevelChildren = [], otherChildren = [], i = 0; i < invalidChildren.length; i++) {
                        var child = invalidChildren[i];
                        (child.parent === rootNode ? topLevelChildren : otherChildren).push(child);
                    }
                    InvalidNodes.cleanInvalidNodes(otherChildren, schema, rootNode, matchFinder), 
                    args.invalid = 0 < topLevelChildren.length;
                } else InvalidNodes.cleanInvalidNodes(invalidChildren, schema, rootNode, matchFinder);
                return rootBlockName && ("body" == rootNode.name || args.isRootContent) && function(rootNode, rootBlockName) {
                    var node = rootNode.firstChild, rootBlockNode = null;
                    function trim(rootBlock) {
                        rootBlock && ((node = rootBlock.firstChild) && 3 === node.type && (node.value = node.value.replace(startWhiteSpaceRegExp, "")), 
                        node = rootBlock.lastChild) && 3 === node.type && (node.value = node.value.replace(endWhiteSpaceRegExp, ""));
                    }
                    if (schema.isValidChild(rootNode.name, rootBlockName.toLowerCase())) {
                        for (;node; ) {
                            var next = node.next;
                            !function(node) {
                                return 3 === node.type ? tinymce.trim(node.value) : 1 === node.type && "template" !== node.name && "p" !== node.name && !blockElements[node.name] && !node.attr("data-mce-type") && "false" !== node.attr("contenteditable");
                            }(node) ? (trim(rootBlockNode), rootBlockNode = null) : (rootBlockNode || ((rootBlockNode = new Node(rootBlockName, 1)).attr(settings.forced_root_block_attrs), 
                            rootNode.insert(rootBlockNode, node)), rootBlockNode.append(node)), 
                            node = next;
                        }
                        trim(rootBlockNode);
                    }
                }(rootNode, rootBlockName), args.invalid || FilterNode.runFilters(matches, args), 
                rootNode;
            }, settings.remove_trailing_brs && this.addNodeFilter("br", function(nodes) {
                var i, node, parent, prev, prevName, elementRule, l = nodes.length, blockElements = extend({}, schema.getBlockElements()), nonEmptyElements = schema.getNonEmptyElements(), whitespaceElements = schema.getWhiteSpaceElements(), transparentElements = schema.getTransparentElements();
                for (blockElements.body = 1, i = 0; i < l; i++) if ((parent = (node = nodes[i]).parent) && function(node) {
                    return node.name in blockElements || node.name in transparentElements;
                }(parent) && node === parent.lastChild) {
                    for (prev = node.prev; prev; ) {
                        if ("span" !== (prevName = prev.name) || "bookmark" !== prev.attr("data-mce-type")) {
                            "br" === prevName && (node = null);
                            break;
                        }
                        prev = prev.prev;
                    }
                    !node || node.attributes.length && "data-mce-bogus" !== node.attributes[0].name || (node.remove(), 
                    parent.isEmpty(nonEmptyElements, whitespaceElements) && (elementRule = schema.getElementRule(parent.name)) && (elementRule.removeEmpty ? parent.remove() : elementRule.paddEmpty && (parent.empty().append(new Node("#text", 3)).value = "\xa0")));
                } else {
                    let lastParent = node;
                    for (;parent && parent.firstChild === lastParent && parent.lastChild === lastParent && (lastParent = parent, 
                    !blockElements[parent.name]); ) parent = parent.parent;
                    lastParent === parent && ((elementRule = new Node("#text", 3)).value = "\xa0", 
                    node.replace(elementRule));
                }
            }), settings.fix_list_elements && this.addNodeFilter("ul,ol", function(nodes) {
                let i = nodes.length, node, parentNode;
                for (;i--; ) {
                    var li;
                    !(parentNode = (node = nodes[i]).parent) || "ul" !== parentNode.name && "ol" !== parentNode.name || (node.prev && "li" === node.prev.name ? node.prev.append(node) : ((li = new Node("li", 1)).attr("style", "list-style-type: none"), 
                    node.wrap(li)));
                }
            }), this.addAttributeFilter("href", function(nodes) {
                var node, i = nodes.length;
                if (!settings.allow_unsafe_link_target) for (;i--; ) "a" === (node = nodes[i]).name && "_blank" === node.attr("target") && /:\/\//.test(node.attr("href")) && node.attr("rel", (node = (node = node.attr("rel")) ? tinymce.trim(node) : "", 
                /\b(noopener)\b/g.test(node) ? node : function(rel) {
                    return rel.split(" ").filter(function(p) {
                        return 0 < p.length;
                    }).concat([ "noopener" ]).sort().join(" ");
                }(node)));
            }), settings.allow_html_in_named_anchor || this.addAttributeFilter("id,name", function(nodes) {
                for (var sibling, prevSibling, parent, node, i = nodes.length; i--; ) if ("a" === (node = nodes[i]).name && node.firstChild && !node.attr("href")) for (parent = node.parent, 
                sibling = node.lastChild; prevSibling = sibling.prev, parent.insert(sibling, node), 
                sibling = prevSibling; );
            }), settings.validate && schema.getValidClasses() && this.addAttributeFilter("class", function(nodes) {
                for (var node, classList, ci, className, classValue, validClassesMap, valid, i = nodes.length, validClasses = schema.getValidClasses(); i--; ) {
                    for (classList = (node = nodes[i]).attr("class").split(" "), 
                    classValue = "", ci = 0; ci < classList.length; ci++) className = classList[ci], 
                    valid = !1, (validClassesMap = validClasses["*"]) && validClassesMap[className] && (valid = !0), 
                    validClassesMap = validClasses[node.name], (valid = !(valid || !validClassesMap || !validClassesMap[className]) || valid) && (classValue && (classValue += " "), 
                    classValue += className);
                    classValue.length || (classValue = null), node.attr("class", classValue);
                }
            }), this.getAttributeFilters = function() {
                return attributeFilters;
            }, this.getNodeFilters = function() {
                return nodeFilters;
            };
        };
    }(tinymce), function(tinymce) {
        tinymce.html.Serializer = function(settings, schema) {
            var writer = new tinymce.html.Writer(settings, schema), boolAttrMap = ((settings = settings || {}).validate = !("validate" in settings) || settings.validate, 
            this.schema = schema = schema || new tinymce.html.Schema(), this.writer = writer, 
            schema.getBoolAttrs());
            this.serialize = function(node) {
                var handlers, validate;
                function walk(node) {
                    var isEmpty, attrs, attrName, attrValue, sortedAttrs, i, l, elementRule, handler = handlers[node.type];
                    if (handler) handler(node); else {
                        if (handler = node.name, isEmpty = node.shortEnded, attrs = node.attributes, 
                        validate && attrs && 1 < attrs.length) {
                            if ((sortedAttrs = []).map = {}, !(elementRule = schema.getElementRule(node.name))) return;
                            for (i = 0, l = elementRule.attributesOrder.length; i < l; i++) (attrName = elementRule.attributesOrder[i]) in attrs.map && (attrValue = attrs.map[attrName], 
                            sortedAttrs.map[attrName] = attrValue, sortedAttrs.push({
                                name: attrName,
                                value: attrValue
                            }));
                            for (i = 0, l = attrs.length; i < l; i++) (attrName = attrs[i].name) in sortedAttrs.map || (attrValue = attrs.map[attrName], 
                            sortedAttrs.map[attrName] = attrValue, sortedAttrs.push({
                                name: attrName,
                                value: attrValue
                            }));
                            attrs = sortedAttrs;
                        }
                        if (attrs) for (i = 0, l = attrs.length; i < l; i++) attrs[i].boolean = attrs[i].name in boolAttrMap;
                        if (writer.start(node.name, attrs, isEmpty), !isEmpty) {
                            var child = node.firstChild;
                            if (child) for ("pre" !== handler && "textarea" !== handler || 3 !== child.type || !child.value || "\n" !== child.value.charAt(0) || writer.text("\n", !0); walk(child), 
                            child = child.next; );
                            writer.end(handler);
                        }
                    }
                }
                return validate = settings.validate, handlers = {
                    3: function(node) {
                        writer.text(node.value || "", node.raw);
                    },
                    8: function(node) {
                        writer.comment(node.value || "");
                    },
                    7: function(node) {
                        writer.pi(node.name, node.value);
                    },
                    10: function(node) {
                        writer.doctype(node.value || "");
                    },
                    4: function(node) {
                        writer.cdata(node.value || "");
                    },
                    11: function(node) {
                        if (node = node.firstChild) for (;walk(node), node = node.next; );
                    }
                }, writer.reset(), 1 !== node.type || settings.inner ? 3 === node.type ? handlers[3](node) : handlers[11](node) : walk(node), 
                writer.getContent();
            };
        };
    }(tinymce), tinymce.html.Writer = function(settings, schema) {
        var html = [], makeMap = tinymce.makeMap, Entities = tinymce.html.Entities, indent = (settings = settings || {}).indent, indentBefore = makeMap(settings.indent_before || ""), indentAfter = makeMap(settings.indent_after || ""), encode = Entities.getEncodeFunc(settings.entity_encoding || "raw", settings.entities), htmlOutput = "html" == settings.element_format;
        return {
            start: function(name, attrs, empty) {
                var i, l, attr, value;
                if (indent && indentBefore[name] && 0 < html.length && 0 < (value = html[html.length - 1]).length && "\n" !== value && html.push("\n"), 
                html.push("<", name), attrs) for (i = 0, l = attrs.length; i < l; i++) (attr = attrs[i]).name == attr.value && (attr.boolean = !0), 
                attr.boolean ? "html5-strict" == settings.schema ? html.push(" ", attr.name) : html.push(" ", attr.name, '="', encode("" + attr.name, !0), '"') : html.push(" ", attr.name, '="', encode("" + attr.value, !0), '"');
                !empty || htmlOutput || "html5-strict" == settings.schema ? html[html.length] = ">" : html[html.length] = " />", 
                empty && indent && indentAfter[name] && 0 < html.length && 0 < (value = html[html.length - 1]).length && "\n" !== value && html.push("\n");
            },
            end: function(name) {
                html.push("</", name, ">"), indent && indentAfter[name] && 0 < html.length && 0 < (name = html[html.length - 1]).length && "\n" !== name && html.push("\n");
            },
            text: function(text, raw) {
                0 < text.length && (html[html.length] = raw ? text : encode(text));
            },
            cdata: function(text) {
                html.push("<![CDATA[", text, "]]>");
            },
            comment: function(text) {
                html.push("\x3c!--", text, "--\x3e");
            },
            pi: function(name, text) {
                text ? html.push("<?", name, " ", encode(text), "?>") : html.push("<?", name, "?>"), 
                indent && html.push("\n");
            },
            doctype: function(text) {
                html.push("<!DOCTYPE", text, ">", indent ? "\n" : "");
            },
            reset: function() {
                html.length = 0;
            },
            getContent: function() {
                return html.join("").replace(/\n$/, "");
            }
        };
    }, function(tinymce) {
        function clone(rect) {
            return rect ? {
                left: round(rect.left),
                top: round(rect.top),
                bottom: round(rect.bottom),
                right: round(rect.right),
                width: round(rect.width),
                height: round(rect.height)
            } : {
                left: 0,
                top: 0,
                bottom: 0,
                right: 0,
                width: 0,
                height: 0
            };
        }
        function isValidOverflow(overflowY, clientRect1, clientRect2) {
            return 0 <= overflowY && overflowY <= Math.min(clientRect1.height, clientRect2.height) / 2;
        }
        function isAbove(clientRect1, clientRect2) {
            return clientRect1.bottom - clientRect1.height / 2 < clientRect2.top || !(clientRect1.top > clientRect2.bottom) && isValidOverflow(clientRect2.top - clientRect1.bottom, clientRect1, clientRect2);
        }
        function isBelow(clientRect1, clientRect2) {
            return clientRect1.top > clientRect2.bottom || !(clientRect1.bottom < clientRect2.top) && isValidOverflow(clientRect2.bottom - clientRect1.top, clientRect1, clientRect2);
        }
        function isLeft(clientRect1, clientRect2) {
            return clientRect1.left < clientRect2.left;
        }
        function isRight(clientRect1, clientRect2) {
            return clientRect1.right > clientRect2.right;
        }
        var round = Math.round;
        tinymce.geom.ClientRect = {
            clone: clone,
            collapse: function(clientRect, toStart) {
                return clientRect = clone(clientRect), toStart || (clientRect.left = clientRect.left + clientRect.width), 
                clientRect.right = clientRect.left, clientRect.width = 0, clientRect;
            },
            isEqual: function(rect1, rect2) {
                return rect1.left === rect2.left && rect1.top === rect2.top && rect1.bottom === rect2.bottom && rect1.right === rect2.right;
            },
            isAbove: isAbove,
            isBelow: isBelow,
            isLeft: isLeft,
            isRight: isRight,
            compare: function(clientRect1, clientRect2) {
                return isAbove(clientRect1, clientRect2) ? -1 : isBelow(clientRect1, clientRect2) ? 1 : isLeft(clientRect1, clientRect2) ? -1 : isRight(clientRect1, clientRect2) ? 1 : 0;
            },
            containsXY: function(clientRect, clientX, clientY) {
                return clientX >= clientRect.left && clientX <= clientRect.right && clientY >= clientRect.top && clientY <= clientRect.bottom;
            }
        };
    }(tinymce), function(tinymce) {
        function relativePosition(rect, targetRect, rel) {
            var x = targetRect.x, y = targetRect.y, w = rect.w, rect = rect.h, targetW = targetRect.w, targetRect = targetRect.h;
            return "b" === (rel = (rel || "").split(""))[0] && (y += targetRect), 
            "r" === rel[1] && (x += targetW), "c" === rel[0] && (y += round(targetRect / 2)), 
            "c" === rel[1] && (x += round(targetW / 2)), "b" === rel[3] && (y -= rect), 
            "r" === rel[4] && (x -= w), "c" === rel[3] && (y -= round(rect / 2)), 
            "c" === rel[4] && (x -= round(w / 2)), create(x, y, w, rect);
        }
        function create(x, y, w, h) {
            return {
                x: x,
                y: y,
                w: w,
                h: h
            };
        }
        var min = Math.min, max = Math.max, round = Math.round;
        tinymce.geom.Rect = {
            inflate: function(rect, w, h) {
                return create(rect.x - w, rect.y - h, rect.w + 2 * w, rect.h + 2 * h);
            },
            relativePosition: relativePosition,
            findBestRelativePosition: function(rect, targetRect, constrainRect, rels) {
                for (var pos, i = 0; i < rels.length; i++) if ((pos = relativePosition(rect, targetRect, rels[i])).x >= constrainRect.x && pos.x + pos.w <= constrainRect.w + constrainRect.x && pos.y >= constrainRect.y && pos.y + pos.h <= constrainRect.h + constrainRect.y) return rels[i];
                return null;
            },
            intersect: function(rect, cropRect) {
                var x1 = max(rect.x, cropRect.x), y1 = max(rect.y, cropRect.y), x2 = min(rect.x + rect.w, cropRect.x + cropRect.w), rect = min(rect.y + rect.h, cropRect.y + cropRect.h);
                return x2 - x1 < 0 || rect - y1 < 0 ? null : create(x1, y1, x2 - x1, rect - y1);
            },
            clamp: function(rect, clampRect, fixedSize) {
                var x1 = rect.x, y1 = rect.y, x2 = rect.x + rect.w, rect = rect.y + rect.h, cx2 = clampRect.x + clampRect.w, cy2 = clampRect.y + clampRect.h, underflowX1 = max(0, clampRect.x - x1), clampRect = max(0, clampRect.y - y1), cx2 = max(0, x2 - cx2), cy2 = max(0, rect - cy2);
                return x1 += underflowX1, y1 += clampRect, fixedSize && (x2 += underflowX1, 
                rect += clampRect, x1 -= cx2, y1 -= cy2), create(x1, y1, (x2 -= cx2) - x1, (rect -= cy2) - y1);
            },
            create: create,
            fromClientRect: function(clientRect) {
                return create(clientRect.left, clientRect.top, clientRect.width, clientRect.height);
            }
        };
    }(tinymce), tinymce.dom = {}, android = tinymce.dom, mouseEventRe = /^(?:mouse|contextmenu)|click/, 
    deprecated = {
        keyLocation: 1,
        layerX: 1,
        layerY: 1,
        returnValue: 1,
        webkitMovementX: 1,
        webkitMovementY: 1,
        keyIdentifier: 1,
        mozPressure: 1,
        path: 1
    }, android.EventUtils = EventUtils, android.Event = new EventUtils(), android.Event.bind(window, "ready", function() {}), 
    tinymce.dom.TreeWalker = function(startNode, rootNode) {
        var node = startNode;
        function findSibling(node, startName, siblingName, shallow) {
            var sibling, parent;
            if (node) {
                if (!shallow && node[startName]) return node[startName];
                if (node != rootNode) {
                    if (sibling = node[siblingName]) return sibling;
                    for (parent = node.parentNode; parent && parent != rootNode; parent = parent.parentNode) if (sibling = parent[siblingName]) return sibling;
                }
            }
        }
        this.current = function() {
            return node;
        }, this.next = function(shallow) {
            return node = findSibling(node, "firstChild", "nextSibling", shallow);
        }, this.prev = function(shallow) {
            return node = findSibling(node, "lastChild", "previousSibling", shallow);
        }, this.prev2 = function(shallow) {
            return node = function(node, siblingName, shallow) {
                var child;
                if (node && (siblingName = node[siblingName], !rootNode || siblingName !== rootNode)) {
                    if (siblingName) {
                        if (!shallow) for (child = siblingName.lastChild; child; child = child.lastChild) if (!child.lastChild) return child;
                        return siblingName;
                    }
                    return (shallow = node.parentNode) && shallow !== rootNode ? shallow : void 0;
                }
            }(node, "previousSibling", shallow);
        };
    }, function(tinymce) {
        var each = tinymce.each, is = tinymce.is, isWebKit = tinymce.isWebKit, isIE = tinymce.isIE, Entities = tinymce.html.Entities, simpleSelectorRe = /^([a-z0-9],?)+$/i, whiteSpaceRegExp = /^[ \t\r\n]*$/;
        function stringToArray(value) {
            return Array.isArray(value) ? value : "string" == typeof value ? value.split(" ") : [];
        }
        tinymce.dom.DOMUtils = function(d, s) {
            var blockElementsMap;
            this.doc = d, this.win = window, this.files = {}, this.cssFlicker = !1, 
            this.counter = 0, this.stdMode = !tinymce.isIE || 8 <= d.documentMode, 
            this.boxModel = !tinymce.isIE || "CSS1Compat" == d.compatMode || this.stdMode, 
            this.hasOuterHTML = "outerHTML" in d.createElement("a"), this.settings = s = tinymce.extend({
                keep_values: !1,
                hex_colors: 1
            }, s), this.schema = s.schema, this.styles = new tinymce.html.Styles({
                url_converter: s.url_converter,
                url_converter_scope: s.url_converter_scope
            }, s.schema), this.events = s.ownEvents ? new tinymce.dom.EventUtils(s.proxy) : tinymce.dom.Event, 
            tinymce.addUnload(this.destroy, this), blockElementsMap = s.schema ? s.schema.getBlockElements() : {}, 
            this.isBlock = function(node) {
                var type;
                return !(!node || ((type = node.nodeType) ? 1 !== type || !blockElementsMap[node.nodeName] : !blockElementsMap[node]));
            };
        }, tinymce.dom.DOMUtils.prototype = {
            doc: null,
            root: null,
            files: null,
            pixelStyles: /^(top|left|bottom|right|width|height|maxWidth|maxHeight|minWidth|minHeight|borderWidth)$/,
            props: {
                for: "htmlFor",
                class: "className",
                className: "className",
                checked: "checked",
                disabled: "disabled",
                maxlength: "maxLength",
                readonly: "readOnly",
                selected: "selected",
                value: "value",
                id: "id",
                name: "name",
                type: "type"
            },
            clone: function(node, deep) {
                var clone, doc, self = this;
                return !isIE || tinymce.isIE11 || 1 !== node.nodeType || deep ? node.cloneNode(deep) : (doc = self.doc, 
                deep ? clone.firstChild : (clone = doc.createElement(node.nodeName), 
                each(self.getAttribs(node), function(attr) {
                    self.setAttrib(clone, attr.nodeName, self.getAttrib(node, attr.nodeName));
                }), clone));
            },
            getRoot: function() {
                var s = this.settings;
                return s && this.get(s.root_element) || this.doc.body;
            },
            getViewPort: function(w) {
                var d = (w = w || this.win).document, d = this.boxModel ? d.documentElement : d.body;
                return {
                    x: w.pageXOffset || d.scrollLeft,
                    y: w.pageYOffset || d.scrollTop,
                    w: w.innerWidth || d.clientWidth,
                    h: w.innerHeight || d.clientHeight
                };
            },
            getRect: function(e) {
                var p;
                return e = this.get(e), p = this.getPos(e), e = this.getSize(e), 
                {
                    x: p.x,
                    y: p.y,
                    w: e.w,
                    h: e.h
                };
            },
            getSize: function(e) {
                var w, h;
                return e = this.get(e), w = this.getStyle(e, "width"), h = this.getStyle(e, "height"), 
                -1 === w.indexOf("px") && (w = 0), -1 === h.indexOf("px") && (h = 0), 
                {
                    w: parseInt(w, 10) || e.offsetWidth || e.clientWidth,
                    h: parseInt(h, 10) || e.offsetHeight || e.clientHeight
                };
            },
            getParent: function(n, f, r) {
                return this.getParents(n, f, r, !1);
            },
            getParents: function(n, f, r, c) {
                var na, self = this, se = self.settings, o = [];
                for (n = self.get(n), c = void 0 === c, se.strict_root && (r = r || self.getRoot()), 
                is(f, "string") && (f = "*" === (na = f) ? function(n) {
                    return 1 == n.nodeType;
                } : function(n) {
                    return self.is(n, na);
                }); n && n != r && n.nodeType && 9 !== n.nodeType; ) {
                    if (!f || f(n)) {
                        if (!c) return n;
                        o.push(n);
                    }
                    n = n.parentNode;
                }
                return c ? o : null;
            },
            get: function(e) {
                var n;
                return e && this.doc && "string" == typeof e && (n = e, e = this.doc.getElementById(e)) && e.id !== n ? this.doc.getElementsByName(n)[1] : e;
            },
            getNext: function(node, selector) {
                return this._findSib(node, selector, "nextSibling");
            },
            getPrev: function(node, selector) {
                return this._findSib(node, selector, "previousSibling");
            },
            select: function(selector, scope) {
                return tinymce.dom.Sizzle(selector, this.get(scope) || this.get(this.settings.root_element) || this.doc, []);
            },
            unique: function(arr) {
                return tinymce.dom.Sizzle.uniqueSort(arr);
            },
            is: function(elm, selector) {
                var i, elms;
                if (void 0 === elm.length) {
                    if ("*" === selector) return 1 == elm.nodeType;
                    if (simpleSelectorRe.test(selector)) {
                        for (selector = selector.toLowerCase().split(/,/), elm = elm.nodeName.toLowerCase(), 
                        i = selector.length - 1; 0 <= i; i--) if (selector[i] == elm) return !0;
                        return !1;
                    }
                }
                return (!elm.nodeType || 1 == elm.nodeType) && (elms = elm.nodeType ? [ elm ] : elm, 
                0 < tinymce.dom.Sizzle(selector, elms[0].ownerDocument || elms[0], null, elms).length);
            },
            closest: function(n, selector) {
                for (var result = []; n; ) {
                    if ("string" == typeof selector && this.is(n, selector)) {
                        result.push(n);
                        break;
                    }
                    if (n === selector) {
                        result.push(n);
                        break;
                    }
                    n = n.parentNode;
                }
                return result;
            },
            contains: function(context, elm) {
                return tinymce.dom.Sizzle.contains(context, elm);
            },
            add: function(p, n, a, h, c) {
                var self = this;
                return this.run(p, function(p) {
                    var e = is(n, "string") ? self.doc.createElement(n) : n;
                    return self.setAttribs(e, a), h && (h.nodeType ? e.appendChild(h) : self.setHTML(e, h)), 
                    c ? e : p.appendChild(e);
                });
            },
            create: function(n, a, h) {
                return this.add(this.doc.createElement(n), n, a, h, 1);
            },
            wrap: function(elements, wrapper, all) {
                var lastParent, newWrapper;
                return wrapper = this.get(wrapper), this.run(elements, function(elm) {
                    all && lastParent == elm.parentNode || (lastParent = elm.parentNode, 
                    newWrapper = wrapper.cloneNode(!1), elm.parentNode.insertBefore(newWrapper, elm)), 
                    newWrapper.appendChild(elm);
                });
            },
            createHTML: function(n, a, h) {
                var k, o = "";
                for (k in o += "<" + n, a) a.hasOwnProperty(k) && "" != a[k] && (o += " " + k + '="' + this.encode(a[k]) + '"');
                return void 0 !== h ? o + ">" + h + "</" + n + ">" : o + " />";
            },
            createFragment: function(html) {
                var node, doc = this.doc, container = doc.createElement("div"), frag = doc.createDocumentFragment();
                for (frag.appendChild(container), html && (container.innerHTML = html); node = container.firstChild; ) frag.appendChild(node);
                return frag.removeChild(container), frag;
            },
            remove: function(node, keep_children) {
                return this.run(node, function(node) {
                    var child, parent = node.parentNode;
                    if (!parent) return null;
                    if (keep_children) for (;child = node.firstChild; ) !tinymce.isIE || 3 !== child.nodeType || child.nodeValue ? parent.insertBefore(child, node) : node.removeChild(child);
                    return parent.removeChild(node);
                });
            },
            empty: function(node) {
                return this.run(node, function(node) {
                    for (var n, i = node.length; i--; ) for (n = node[i]; n.firstChild; ) n.removeChild(n.firstChild);
                    return !0;
                });
            },
            setStyle: function(n, na, v) {
                var self = this;
                return self.run(n, function(e) {
                    var s = e.style;
                    na = na.replace(/-(\D)/g, function(a, b) {
                        return b.toUpperCase();
                    }), self.pixelStyles.test(na) && (tinymce.is(v, "number") || /^[\-0-9\.]+$/.test(v)) && (v += "px"), 
                    s[na = "float" == na ? tinymce.isIE && tinymce.isIE < 12 ? "styleFloat" : "cssFloat" : na] = v || "", 
                    self.settings.update_styles && (v = self.serializeStyle(self.parseStyle(e.style.cssText), e.nodeName), 
                    self.setAttrib(e, "data-mce-style", v));
                });
            },
            getStyle: function(n, na, c) {
                if (n = this.get(n)) {
                    if (this.doc.defaultView && c) {
                        na = na.replace(/[A-Z]/g, function(a) {
                            return "-" + a;
                        });
                        try {
                            return this.doc.defaultView.getComputedStyle(n, null).getPropertyValue(na);
                        } catch (ex) {
                            return null;
                        }
                    }
                    return "float" == (na = na.replace(/-(\D)/g, function(a, b) {
                        return b.toUpperCase();
                    })) && (na = "cssFloat"), n.currentStyle && c ? n.currentStyle[na] : n.style ? n.style[na] : void 0;
                }
            },
            setStyles: function(e, o) {
                var v, self = this, s = self.settings, ol = s.update_styles;
                s.update_styles = 0, this.run(e, function(e) {
                    each(o, function(v, n) {
                        self.setStyle(e, n, v);
                    }), ol && (v = self.serializeStyle(self.parseStyle(e.style.cssText), e.nodeName), 
                    self.setAttrib(e, "data-mce-style", v));
                }), s.update_styles = ol;
            },
            removeAllAttribs: function(e) {
                return this.run(e, function(e) {
                    for (var attrs = e.attributes, i = attrs.length - 1; 0 <= i; i--) e.removeAttributeNode(attrs.item(i));
                });
            },
            removeAttrib: function(e, n) {
                if (e && n) return this.settings.strict && (n = n.toLowerCase()), 
                this.run(e, function(e) {
                    e.removeAttribute(n, 2);
                });
            },
            setAttrib: function(e, n, v) {
                var self = this;
                if (e && n) return self.settings.strict && (n = n.toLowerCase()), 
                this.run(e, function(e) {
                    var s = self.settings, originalValue = e.getAttribute(n);
                    if (null !== v) switch (n) {
                      case "style":
                        if (!is(v, "string")) return void each(v, function(v, n) {
                            self.setStyle(e, n, v);
                        });
                        s.keep_values && (v && !self._isRes(v) ? e.setAttribute("data-mce-style", v, 2) : e.removeAttribute("data-mce-style", 2)), 
                        e.style.cssText = v;
                        break;

                      case "class":
                        e.className = v || "";
                        break;

                      case "src":
                      case "href":
                        s.keep_values && (s.url_converter && (v = s.url_converter.call(s.url_converter_scope || self, v, n, e)), 
                        self.setAttrib(e, "data-mce-" + n, v, 2));
                        break;

                      case "shape":
                        e.setAttribute("data-mce-style", v);
                    }
                    is(v) && null !== v && 0 !== v.length ? e.setAttribute(n, "" + v, 2) : e.removeAttribute(n, 2), 
                    tinymce.activeEditor && originalValue != v && (originalValue = tinymce.activeEditor).onSetAttrib.dispatch(originalValue, e, n, v);
                });
            },
            setAttribs: function(e, o) {
                var self = this;
                return this.run(e, function(e) {
                    each(o, function(v, n) {
                        self.setAttrib(e, n, v);
                    });
                });
            },
            getAttrib: function(e, n, dv) {
                var v;
                if (!(e = this.get(e)) || 1 !== e.nodeType) return void 0 !== dv && dv;
                if (is(dv) || (dv = ""), /^(src|href|style|coords|shape)$/.test(n) && (v = e.getAttribute("data-mce-" + n))) return v;
                if (v = (v = isIE && this.props[n] && (v = e[this.props[n]]) && v.nodeValue ? v.nodeValue : v) || e.getAttribute(n, 2), 
                /^(checked|compact|declare|defer|disabled|ismap|multiple|nohref|noshade|nowrap|readonly|selected)$/.test(n)) return !0 === e[this.props[n]] && "" === v || v ? n : "";
                if ("FORM" === e.nodeName && e.getAttributeNode(n)) return e.getAttributeNode(n).nodeValue;
                if ("style" === n && (v = v || e.style.cssText) && (v = this.serializeStyle(this.parseStyle(v), e.nodeName), 
                this.settings.keep_values) && !this._isRes(v) && e.setAttribute("data-mce-style", v), 
                isWebKit && "class" === n && (v = v && v.replace(/(apple|webkit)\-[a-z\-]+/gi, "")), 
                isIE) switch (n) {
                  case "rowspan":
                  case "colspan":
                    1 === v && (v = "");
                    break;

                  case "size":
                    "+0" !== v && 20 !== v && 0 !== v || (v = "");
                    break;

                  case "width":
                  case "height":
                  case "vspace":
                  case "checked":
                  case "disabled":
                  case "readonly":
                    0 === v && (v = "");
                    break;

                  case "hspace":
                    -1 === v && (v = "");
                    break;

                  case "maxlength":
                  case "tabindex":
                    32768 !== v && 2147483647 !== v && "32768" !== v || (v = "");
                    break;

                  case "multiple":
                  case "compact":
                  case "noshade":
                  case "nowrap":
                    return 65535 === v ? n : dv;

                  case "shape":
                    v = v.toLowerCase();
                    break;

                  default:
                    0 === n.indexOf("on") && (v = v && (v = "" + v).replace(/^function\s+\w+\(\)\s+\{\s+(.*)\s+\}$/, "$1"));
                }
                return null != v && "" !== v ? "" + v : dv;
            },
            setValue: function(n, value) {
                if (!(n = this.get(n)) || 1 !== n.nodeType) return null;
                "SELECT" === n.nodeName ? each(this.select('option[value="' + value + '"]', n), function(elm) {
                    elm.selected = !0;
                }) : n.value = value;
            },
            getValue: function(n) {
                return (n = this.get(n)) && 1 === n.nodeType ? "SELECT" === n.nodeName ? null == n.options || -1 === n.selectedIndex ? "" : n.options[n.selectedIndex].value : n.value : null;
            },
            getPos: function(n, ro) {
                var r, x = 0, y = 0, d = this.doc, body = d.body;
                if (ro = ro || body, n = this.get(n)) {
                    if (ro === body && n.getBoundingClientRect && "static" === this.getStyle(body, "position")) return n = n.getBoundingClientRect(), 
                    body = this.boxModel ? d.documentElement : d.body, {
                        x: x = n.left + (d.documentElement.scrollLeft || d.body.scrollLeft) - body.clientTop,
                        y: y = n.top + (d.documentElement.scrollTop || d.body.scrollTop) - body.clientLeft
                    };
                    for (r = n; r && r != ro && r.nodeType; ) x += r.offsetLeft || 0, 
                    y += r.offsetTop || 0, r = r.offsetParent;
                    for (r = n.parentNode; r && r != ro && r.nodeType; ) x -= r.scrollLeft || 0, 
                    y -= r.scrollTop || 0, r = r.parentNode;
                }
                return {
                    x: x,
                    y: y
                };
            },
            parseStyle: function(st) {
                return this.styles.parse(st);
            },
            serializeStyle: function(o, name) {
                return this.styles.serialize(o, name);
            },
            addStyle: function(cssText) {
                var head, doc = this.doc, styleElm = doc.getElementById("mceDefaultStyles");
                styleElm || ((styleElm = doc.createElement("style")).id = "mceDefaultStyles", 
                styleElm.type = "text/css", (head = doc.getElementsByTagName("head")[0]).firstChild ? head.insertBefore(styleElm, head.firstChild) : head.appendChild(styleElm)), 
                styleElm.styleSheet ? styleElm.styleSheet.cssText += cssText : styleElm.appendChild(doc.createTextNode(cssText));
            },
            loadCSS: function(u) {
                var head, self = this, d = self.doc;
                u = u || "", head = d.getElementsByTagName("head")[0], each(u.split(","), function(u) {
                    self.files[u] || (self.files[u] = !0, u = self.create("link", {
                        rel: "stylesheet",
                        "data-cfasync": !1,
                        href: tinymce._addVer(u)
                    }), head.appendChild(u));
                });
            },
            addClass: function(e, c) {
                var values;
                return c ? (values = stringToArray(c), this.run(e, function(e) {
                    return each(values, function(cls) {
                        if (cls.trim(), !cls) return !0;
                        e.classList.add(cls);
                    }), e.className;
                })) : "";
            },
            removeClass: function(e, c) {
                var values;
                return c ? (values = stringToArray(c), this.run(e, function(e) {
                    return each(values, function(cls) {
                        if (cls.trim(), !cls) return !0;
                        e.classList.remove(cls);
                    }), e.className || (e.removeAttribute("class"), e.removeAttribute("className")), 
                    e.className;
                })) : "";
            },
            hasClass: function(n, c) {
                return !(!(n = this.get(n)) || !c) && n.classList && n.classList.contains(c);
            },
            toggleClass: function(n, c) {
                return !(!(n = this.get(n)) || !c) && (this.hasClass(n, c) ? this.removeClass(n, c) : this.addClass(n, c));
            },
            show: function(e) {
                return this.setStyle(e, "display", "block");
            },
            hide: function(e) {
                return this.setStyle(e, "display", "none");
            },
            isHidden: function(e) {
                return !(e = this.get(e)) || "none" == e.style.display || "none" == this.getStyle(e, "display");
            },
            uniqueId: function(p) {
                return (p || "mce_") + this.counter++;
            },
            setHTML: function(element, html) {
                var self = this;
                return self.run(element, function(element) {
                    if (isIE) {
                        for (;element.firstChild; ) element.removeChild(element.firstChild);
                        try {
                            element.innerHTML = "<br />" + html, element.removeChild(element.firstChild);
                        } catch (ex) {
                            var newElement = self.create("div");
                            newElement.innerHTML = "<br />" + html, each(tinymce.grep(newElement.childNodes), function(node, i) {
                                i && element.canHaveHTML && element.appendChild(node);
                            });
                        }
                    } else element.innerHTML = html;
                    return html;
                });
            },
            getOuterHTML: function(elm) {
                var doc;
                return (elm = this.get(elm)) ? 1 === elm.nodeType ? elm.outerHTML : ((doc = (elm.ownerDocument || this.doc).createElement("body")).appendChild(elm.cloneNode(!0)), 
                doc.innerHTML) : null;
            },
            setOuterHTML: function(e, h, d) {
                var self = this;
                function setHTML(e, h, d) {
                    var n;
                    for ((d = d.createElement("body")).innerHTML = h, n = d.lastChild; n; ) self.insertAfter(n.cloneNode(!0), e), 
                    n = n.previousSibling;
                    self.remove(e);
                }
                return this.run(e, function(e) {
                    if (1 == (e = self.get(e)).nodeType) if (d = d || e.ownerDocument || self.doc, 
                    isIE) try {
                        isIE && 1 == e.nodeType ? e.outerHTML = h : setHTML(e, h, d);
                    } catch (ex) {
                        setHTML(e, h, d);
                    } else setHTML(e, h, d);
                });
            },
            decode: Entities.decode,
            encode: Entities.encodeAllRaw,
            insertAfter: function(node, reference_node) {
                return reference_node = this.get(reference_node), this.run(node, function(node) {
                    var parent = reference_node.parentNode, nextSibling = reference_node.nextSibling;
                    return nextSibling ? parent.insertBefore(node, nextSibling) : parent.appendChild(node), 
                    node;
                });
            },
            insertBefore: function(node, reference_node) {
                return reference_node = this.get(reference_node), this.run(node, function(node) {
                    return reference_node.parentNode.insertBefore(node, reference_node), 
                    node;
                });
            },
            replace: function(n, o, k) {
                return is(o, "array") && (n = n.cloneNode(!0)), this.run(o, function(o) {
                    return k && each(tinymce.grep(o.childNodes), function(c) {
                        n.appendChild(c);
                    }), o.parentNode.replaceChild(n, o);
                });
            },
            rename: function(elm, name) {
                var newElm, self = this;
                return elm.nodeName != name.toUpperCase() && (newElm = self.create(name), 
                each(self.getAttribs(elm), function(attr_node) {
                    self.setAttrib(newElm, attr_node.nodeName, self.getAttrib(elm, attr_node.nodeName));
                }), self.replace(newElm, elm, 1)), newElm || elm;
            },
            findCommonAncestor: function(a, b) {
                for (var pe, ps = a; ps; ) {
                    for (pe = b; pe && ps != pe; ) pe = pe.parentNode;
                    if (ps == pe) break;
                    ps = ps.parentNode;
                }
                return !ps && a.ownerDocument ? a.ownerDocument.documentElement : ps;
            },
            toHex: function(s) {
                var c = (s = s.replace(/\s/g, "").replace(/(rgb|rgba)\(/i, "").replace(/\)/, "").replace(/\s/g, "")).split(",");
                function hex(s) {
                    return 1 < (s = parseInt(s, 10).toString(16)).length ? s : "0" + s;
                }
                return 3 <= c.length ? "#" + hex(c[0]) + hex(c[1]) + hex(c[2]) : s;
            },
            getClasses: function() {
                var ov, cl = [], lo = {}, f = this.settings.class_filter;
                if (this.classes) return this.classes;
                try {
                    each(this.doc.styleSheets, function addClasses(s) {
                        each(s.imports, function(r) {
                            addClasses(r);
                        }), each(s.cssRules || s.rules, function(r) {
                            switch (r.type || 1) {
                              case 1:
                                r.selectorText && each(r.selectorText.split(","), function(v) {
                                    v = v.replace(/^\s*|\s*$|^\s\./g, ""), /\.mce/.test(v) || !/\.[\w\-]+$/.test(v) || (v = (ov = v).replace(/.*\.([a-z0-9_\-]+).*/i, "$1"), 
                                    f && !(v = f(v, ov))) || lo[v] || (cl.push({
                                        class: v
                                    }), lo[v] = 1);
                                });
                                break;

                              case 3:
                                try {
                                    addClasses(r.styleSheet);
                                } catch (ex) {}
                            }
                        });
                    });
                } catch (ex) {}
                return 0 < cl.length && (this.classes = cl), cl;
            },
            run: function(e, f, s) {
                var o, self = this;
                return !!(e = self.doc && "string" == typeof e ? self.get(e) : e) && (s = s || this, 
                e.nodeType || !e.length && 0 !== e.length ? f.call(s, e) : (o = [], 
                each(e, function(e, i) {
                    e && ("string" == typeof e && (e = self.doc.getElementById(e)), 
                    o.push(f.call(s, e, i)));
                }), o));
            },
            getAttribs: function(n) {
                var o;
                return (n = this.get(n)) ? isIE && (o = [], "OBJECT" != n.nodeName) ? ("OPTION" === n.nodeName && this.getAttrib(n, "selected") && o.push({
                    specified: 1,
                    nodeName: "selected"
                }), n.cloneNode(!1).outerHTML.replace(/<\/?[\w:\-]+ ?|=[\"][^\"]+\"|=\'[^\']+\'|=[\w\-]+|>/gi, "").replace(/[\w:\-]+/gi, function(a) {
                    o.push({
                        specified: 1,
                        nodeName: a
                    });
                }), o) : n.attributes : [];
            },
            isEmpty: function(node, elements) {
                var i, attributes, type, whitespace, walker, name, brCount = 0;
                if (node = node.firstChild) {
                    walker = new tinymce.dom.TreeWalker(node, node.parentNode), 
                    elements = elements || (this.schema ? this.schema.getNonEmptyElements() : null), 
                    whitespace = this.schema ? this.schema.getWhiteSpaceElements() : {};
                    do {
                        if (1 === (type = node.nodeType)) {
                            var bogusVal = node.getAttribute("data-mce-bogus");
                            if (bogusVal) {
                                node = walker.next("all" === bogusVal);
                                continue;
                            }
                            if (name = node.nodeName.toLowerCase(), elements && elements[name]) {
                                if ("br" !== name) return !1;
                                brCount++, node = walker.next();
                                continue;
                            }
                            for (i = (attributes = this.getAttribs(node)).length; i--; ) if (function(name) {
                                return "name" == name || "id" == name || "class" == name || -1 != name.indexOf("-") && ("data-mce-bookmark" == name || -1 == name.indexOf("data-mce-"));
                            }(name = attributes[i].nodeName)) return !1;
                        }
                        if (8 == type) return !1;
                        if (3 === type && !whiteSpaceRegExp.test(node.nodeValue)) return !1;
                        if (3 === type && node.parentNode && whitespace[node.parentNode.nodeName] && whiteSpaceRegExp.test(node.nodeValue)) return !1;
                        node = walker.next();
                    } while (node);
                }
                return brCount <= 1;
            },
            destroy: function(s) {
                this.win = this.doc = this.root = this.events = this.frag = null, 
                s || tinymce.removeUnload(this.destroy);
            },
            createRng: function() {
                return this.doc.createRange();
            },
            nodeIndex: function(node, normalized) {
                var lastNodeType, nodeType, idx = 0;
                if (node) for (lastNodeType = node.nodeType, node = node.previousSibling; node; node = node.previousSibling) nodeType = node.nodeType, 
                (!normalized || 3 != nodeType || nodeType != lastNodeType && node.nodeValue.length) && (idx++, 
                lastNodeType = nodeType);
                return idx;
            },
            split: function(pe, e, re) {
                var bef, pa, self = this, r = self.createRng();
                function trim(node) {
                    var i, children = node.childNodes, type = node.nodeType;
                    if (1 != type || "bookmark" != node.getAttribute("data-mce-type")) {
                        for (i = children.length - 1; 0 <= i; i--) trim(children[i]);
                        if (9 != type) {
                            if (3 == type && 0 < node.nodeValue.length) {
                                var trimmedLength = tinymce.trim(node.nodeValue).length;
                                if (!self.isBlock(node.parentNode) || 0 < trimmedLength || 0 === trimmedLength && function(node) {
                                    var previousIsSpan = node.previousSibling && "SPAN" == node.previousSibling.nodeName, node = node.nextSibling && "SPAN" == node.nextSibling.nodeName;
                                    return previousIsSpan && node;
                                }(node)) return;
                            } else if (1 == type && (1 == (children = node.childNodes).length && children[0] && 1 == children[0].nodeType && "bookmark" == children[0].getAttribute("data-mce-type") && node.parentNode.insertBefore(children[0], node), 
                            children.length || /^(br|hr|input|img)$/i.test(node.nodeName))) return;
                            self.remove(node);
                        }
                        return node;
                    }
                }
                if (pe && e) return r.setStart(pe.parentNode, self.nodeIndex(pe)), 
                r.setEnd(e.parentNode, self.nodeIndex(e)), bef = r.extractContents(), 
                (r = self.createRng()).setStart(e.parentNode, self.nodeIndex(e) + 1), 
                r.setEnd(pe.parentNode, self.nodeIndex(pe) + 1), r = r.extractContents(), 
                (pa = pe.parentNode).insertBefore(trim(bef), pe), re ? pa.replaceChild(re, e) : pa.insertBefore(e, pe), 
                pa.insertBefore(trim(r), pe), self.remove(pe), re || e;
            },
            bind: function(target, name, func, scope) {
                return this.events.add(target, name, func, scope || this);
            },
            unbind: function(target, name, func) {
                return this.events.remove(target, name, func);
            },
            fire: function(target, name, evt) {
                return this.events.fire(target, name, evt);
            },
            getContentEditable: function(node) {
                var contentEditable;
                return node && 1 == node.nodeType ? (contentEditable = node.getAttribute("data-mce-contenteditable")) && "inherit" !== contentEditable ? contentEditable : "inherit" !== node.contentEditable ? node.contentEditable : null : null;
            },
            getContentEditableParent: function(node) {
                for (var root = this.getRoot(), state = null; node && node !== root && null === (state = this.getContentEditable(node)); node = node.parentNode);
                return state;
            },
            isChildOf: function(node, parent) {
                for (;node; ) {
                    if (parent === node) return !0;
                    node = node.parentNode;
                }
                return !1;
            },
            dumpRng: function(r) {
                return "startContainer: " + r.startContainer.nodeName + ", startOffset: " + r.startOffset + ", endContainer: " + r.endContainer.nodeName + ", endOffset: " + r.endOffset;
            },
            _findSib: function(node, selector, name) {
                var self = this, f = selector;
                if (node) for (is(f, "string") && (f = function(node) {
                    return self.is(node, selector);
                }), node = node[name]; node; node = node[name]) if (f(node)) return node;
                return null;
            },
            _isRes: function(c) {
                return /^(top|left|bottom|right|width|height)/i.test(c) || /;\s*(top|left|bottom|right|width|height)/i.test(c);
            }
        }, tinymce.DOM = new tinymce.dom.DOMUtils(document, {
            process_html: 0
        });
    }(tinymce), function(tinymce) {
        function getTemporaryNodeSelector(tempAttrs) {
            return (0 === tempAttrs.length ? "" : tempAttrs.map(function(attr) {
                return "[" + attr + "]";
            }).join(",") + ",") + '[data-mce-bogus="all"]';
        }
        function createCommentWalker(body) {
            return document.createTreeWalker(body, NodeFilter.SHOW_COMMENT, null, !1);
        }
        function hasComments(body) {
            return null !== createCommentWalker(body).nextNode();
        }
        function hasTemporaryNodes(body, tempAttrs) {
            return null !== body.querySelector(getTemporaryNodeSelector(tempAttrs));
        }
        function trimTemporaryNodes(body, tempAttrs) {
            tinymce.each(function(body, tempAttrs) {
                return body.querySelectorAll(getTemporaryNodeSelector(tempAttrs));
            }(body, tempAttrs), function(elm) {
                "all" === elm.getAttribute("data-mce-bogus") ? elm && elm.parentNode && elm.parentNode.removeChild(elm) : tinymce.each(tempAttrs, function(attr) {
                    elm.hasAttribute(attr) && elm.removeAttribute(attr);
                });
            });
        }
        function removeCommentsContainingZwsp(body) {
            for (var walker = createCommentWalker(body), nextNode = walker.nextNode(); null !== nextNode; ) {
                var comment = walker.currentNode, nextNode = walker.nextNode();
                "string" == typeof comment.nodeValue && -1 !== comment.nodeValue.indexOf("\ufeff") && comment && comment.parentNode && comment.parentNode.removeChild(comment);
            }
        }
        function deepClone(body) {
            return body.cloneNode(!0);
        }
        tinymce.dom.TrimBody = {
            trim: function(body, tempAttrs) {
                var trimmed = body;
                return hasComments(body) ? (removeCommentsContainingZwsp(trimmed = deepClone(body)), 
                hasTemporaryNodes(trimmed, tempAttrs) && trimTemporaryNodes(trimmed, tempAttrs)) : hasTemporaryNodes(body, tempAttrs) && trimTemporaryNodes(trimmed = deepClone(body), tempAttrs), 
                trimmed;
            },
            hasComments: hasComments,
            hasTemporaryNodes: hasTemporaryNodes,
            trimTemporaryNodes: trimTemporaryNodes,
            removeCommentsContainingZwsp: removeCommentsContainingZwsp
        };
    }(tinymce), function(tinymce) {
        function isNodeType(type) {
            return function(node) {
                return !!node && node.nodeType == type;
            };
        }
        var isElement = isNodeType(1);
        function matchNodeNames(names) {
            return names = names.toLowerCase().split(" "), function(node) {
                var i, name;
                if (node && node.nodeType) for (name = node.nodeName.toLowerCase(), 
                i = 0; i < names.length; i++) if (name === names[i]) return !0;
                return !1;
            };
        }
        function isBogus(node) {
            return isElement(node) && node.hasAttribute("data-mce-bogus");
        }
        function isBookmark(node) {
            return isElement(node) && "bookmark" == node.getAttribute("data-mce-type");
        }
        function hasContentEditableState(value) {
            return function(node) {
                if (isElement(node)) {
                    if (node.hasAttribute("data-mce-contenteditable")) return node.getAttribute("data-mce-contenteditable") === value;
                    if (node.contentEditable === value) return !0;
                }
                return !1;
            };
        }
        tinymce.dom.NodeType = {
            isText: isNodeType(3),
            isElement: isElement,
            isComment: isNodeType(8),
            isDocument: isNodeType(9),
            isDocumentFragment: isNodeType(11),
            isBr: matchNodeNames("br"),
            isContentEditableTrue: hasContentEditableState("true"),
            isContentEditableFalse: hasContentEditableState("false"),
            matchNodeNames: matchNodeNames,
            hasPropValue: function(propName, propValue) {
                return function(node) {
                    return isElement(node) && node[propName] === propValue;
                };
            },
            hasAttributeValue: function(attrName, attrValue) {
                return function(node) {
                    return isElement(node) && node.getAttribute(attrName) === attrValue;
                };
            },
            matchStyleValues: function(name, values) {
                return values = values.toLowerCase().split(" "), function(node) {
                    var i;
                    if (isElement(node)) for (i = 0; i < values.length; i++) if (node.ownerDocument.defaultView.getComputedStyle(node, null).getPropertyValue(name) === values[i]) return !0;
                    return !1;
                };
            },
            isBogus: isBogus,
            isBookmark: isBookmark,
            isInternal: function(node) {
                return isBogus(node) || isBookmark(node) || function(node) {
                    return isElement(node) && "_mce_caret" === node.id;
                }(node);
            }
        };
    }(tinymce), function(tinymce) {
        var NodeType = tinymce.dom.NodeType, Arr = tinymce.util.Arr, ClientRect = tinymce.geom.ClientRect;
        tinymce.dom.Dimensions = {
            getClientRects: function getClientRects(node) {
                function toArrayWithNode(clientRects) {
                    return Arr.map(clientRects, function(clientRect) {
                        return (clientRect = ClientRect.clone(clientRect)).node = node, 
                        clientRect;
                    });
                }
                var rng;
                return Arr.isArray(node) ? Arr.reduce(node, function(result, node) {
                    return result.concat(getClientRects(node));
                }, []) : NodeType.isElement(node) ? toArrayWithNode(node.getClientRects()) : NodeType.isText(node) ? ((rng = node.ownerDocument.createRange()).setStart(node, 0), 
                rng.setEnd(node, node.data.length), toArrayWithNode(rng.getClientRects())) : void 0;
            }
        };
    }(tinymce), function(tinymce) {
        function getAbsolutePosition(elm) {
            var clientRect = elm.getBoundingClientRect(), docElem = (elm = elm.ownerDocument).documentElement, elm = elm.defaultView;
            return {
                top: clientRect.top + elm.pageYOffset - docElem.clientTop,
                left: clientRect.left + elm.pageXOffset - docElem.clientLeft
            };
        }
        tinymce.dom.MousePosition = {
            calc: function(editor, event) {
                return bodyPosition = function(editor) {
                    return editor.inline ? getAbsolutePosition(editor.getBody()) : {
                        left: 0,
                        top: 0
                    };
                }(editor), scrollPosition = function(editor) {
                    var body = editor.getBody();
                    return editor.inline ? {
                        left: body.scrollLeft,
                        top: body.scrollTop
                    } : {
                        left: 0,
                        top: 0
                    };
                }(editor), {
                    pageX: (editor = function(editor, event) {
                        var iframePosition;
                        return event.target.ownerDocument !== editor.getDoc() ? (iframePosition = getAbsolutePosition(editor.getContentAreaContainer()), 
                        editor = function(editor) {
                            var body = editor.getBody(), docElm = editor.getDoc().documentElement, inlineScroll = {
                                left: body.scrollLeft,
                                top: body.scrollTop
                            }, body = {
                                left: body.scrollLeft || docElm.scrollLeft,
                                top: body.scrollTop || docElm.scrollTop
                            };
                            return editor.inline ? inlineScroll : body;
                        }(editor), {
                            left: event.pageX - iframePosition.left + editor.left,
                            top: event.pageY - iframePosition.top + editor.top
                        }) : {
                            left: event.pageX,
                            top: event.pageY
                        };
                    }(editor, event)).left - bodyPosition.left + scrollPosition.left,
                    pageY: editor.top - bodyPosition.top + scrollPosition.top
                };
                var bodyPosition, scrollPosition;
            }
        };
    }(tinymce), function(tinymce) {
        var NodeType = tinymce.dom.NodeType, DOMUtils = tinymce.DOM, Fun = tinymce.util.Fun, Arr = tinymce.util.Arr, isText = NodeType.isText, isBogus = NodeType.isBogus, nodeIndex = DOMUtils.nodeIndex;
        function getChildNodes(node) {
            return node ? Arr.reduce(node.childNodes, function(result, node) {
                return isBogus(node) && "BR" != node.nodeName ? result = result.concat(getChildNodes(node)) : result.push(node), 
                result;
            }, []) : [];
        }
        function equal(targetValue) {
            return function(value) {
                return targetValue === value;
            };
        }
        function createPathItem(node) {
            return (isText(node) ? "text()" : node.nodeName.toLowerCase()) + "[" + function(node) {
                var nodes = getChildNodes(function normalizedParent(node) {
                    return node = node.parentNode, isBogus(node) ? normalizedParent(node) : node;
                }(node)), index = Arr.findIndex(nodes, equal(node), node), nodes = nodes.slice(0, index + 1), index = Arr.reduce(nodes, function(result, node, i) {
                    return isText(node) && isText(nodes[i - 1]) && result++, result;
                }, 0);
                return nodes = Arr.filter(nodes, NodeType.matchNodeNames(node.nodeName)), 
                Arr.findIndex(nodes, equal(node), node) - index;
            }(node) + "]";
        }
        tinymce.caret.CaretBookmark = {
            create: function(rootNode, caretPosition) {
                var outputOffset, childNodes, path = [], container = caretPosition.container(), caretPosition = caretPosition.offset();
                return isText(container) ? outputOffset = function(textNode, offset) {
                    for (;(textNode = textNode.previousSibling) && isText(textNode); ) offset += textNode.data.length;
                    return offset;
                }(container, caretPosition) : (caretPosition >= (childNodes = container.childNodes).length ? (outputOffset = "after", 
                caretPosition = childNodes.length - 1) : outputOffset = "before", 
                container = childNodes[caretPosition]), path.push(createPathItem(container)), 
                childNodes = function(rootNode, node) {
                    var parents = [];
                    for (node = node.parentNode; node != rootNode; node = node.parentNode) parents.push(node);
                    return parents;
                }(rootNode, container), childNodes = Arr.filter(childNodes, Fun.negate(NodeType.isBogus)), 
                (path = path.concat(Arr.map(childNodes, createPathItem))).reverse().join("/") + "," + outputOffset;
            },
            resolve: function(rootNode, path) {
                var parts;
                {
                    if (path && (path = (parts = path.split(","))[0].split("/"), 
                    parts = 1 < parts.length ? parts[1] : "before", path = Arr.reduce(path, function(result, value) {
                        return (value = /([\w\-\(\)]+)\[([0-9]+)\]/.exec(value)) ? ("text()" === value[1] && (value[1] = "#text"), 
                        name = value[1], value = parseInt(value[2], 10), nodes = getChildNodes(result), 
                        nodes = Arr.filter(nodes, function(node, index) {
                            return !isText(node) || !isText(nodes[index - 1]);
                        }), (nodes = Arr.filter(nodes, NodeType.matchNodeNames(name)))[value]) : null;
                        var name, nodes;
                    }, rootNode))) {
                        if (isText(path)) {
                            for (var container = path, offset = parseInt(parts, 10), dataLen, node = container, targetOffset = 0; isText(node); ) {
                                if (dataLen = node.data.length, targetOffset <= offset && offset <= targetOffset + dataLen) {
                                    container = node, offset -= targetOffset;
                                    break;
                                }
                                if (!isText(node.nextSibling)) {
                                    container = node, offset = dataLen;
                                    break;
                                }
                                targetOffset += dataLen, node = node.nextSibling;
                            }
                            return offset > container.data.length && (offset = container.data.length), 
                            new tinymce.caret.CaretPosition(container, offset);
                        }
                        return parts = "after" === parts ? nodeIndex(path) + 1 : nodeIndex(path), 
                        new tinymce.caret.CaretPosition(path.parentNode, parts);
                    }
                    return null;
                }
            }
        };
    }(tinymce), function(tinymce) {
        var NodeType = tinymce.dom.NodeType, Zwsp = tinymce.text.Zwsp, isElement = NodeType.isElement, isText = NodeType.isText;
        function isCaretContainerBlock(node) {
            return isText(node) && (node = node.parentNode), isElement(node) && node.hasAttribute("data-mce-caret");
        }
        function isCaretContainerInline(node) {
            return isText(node) && Zwsp.isZwsp(node.data);
        }
        function isCaretContainer(node) {
            return isCaretContainerBlock(node) || isCaretContainerInline(node);
        }
        function startsWithCaretContainer(node) {
            return isText(node) && node.data[0] == Zwsp.ZWSP;
        }
        function endsWithCaretContainer(node) {
            return isText(node) && node.data[node.data.length - 1] == Zwsp.ZWSP;
        }
        tinymce.caret.CaretContainer = {
            isCaretContainer: isCaretContainer,
            isCaretContainerBlock: isCaretContainerBlock,
            isCaretContainerInline: isCaretContainerInline,
            showCaretContainerBlock: function(caretContainer) {
                var elm;
                return caretContainer && caretContainer.hasAttribute("data-mce-caret") ? (elm = (elm = (elm = caretContainer).getElementsByTagName("br"))[elm.length - 1], 
                NodeType.isBogus(elm) && elm.parentNode.removeChild(elm), caretContainer.removeAttribute("data-mce-caret"), 
                caretContainer.removeAttribute("data-mce-bogus"), caretContainer.removeAttribute("style"), 
                caretContainer.removeAttribute("_moz_abspos"), caretContainer) : null;
            },
            insertInline: function(node, before) {
                var sibling, textNode = node.ownerDocument.createTextNode(Zwsp.ZWSP), parentNode = node.parentNode;
                if (before) {
                    if (sibling = node.previousSibling, isText(sibling)) {
                        if (isCaretContainer(sibling)) return sibling;
                        if (endsWithCaretContainer(sibling)) return sibling.splitText(sibling.data.length - 1);
                    }
                    parentNode.insertBefore(textNode, node);
                } else {
                    if (sibling = node.nextSibling, isText(sibling)) {
                        if (isCaretContainer(sibling)) return sibling;
                        if (startsWithCaretContainer(sibling)) return sibling.splitText(1), 
                        sibling;
                    }
                    node.nextSibling ? parentNode.insertBefore(textNode, node.nextSibling) : parentNode.appendChild(textNode);
                }
                return textNode;
            },
            insertBlock: function(blockName, node, before) {
                var br;
                return (blockName = node.ownerDocument.createElement(blockName)).setAttribute("data-mce-caret", before ? "before" : "after"), 
                blockName.setAttribute("data-mce-bogus", "all"), blockName.appendChild(((br = document.createElement("br")).setAttribute("data-mce-bogus", "1"), 
                br)), br = node.parentNode, before ? br.insertBefore(blockName, node) : node.nextSibling ? br.insertBefore(blockName, node.nextSibling) : br.appendChild(blockName), 
                blockName;
            },
            hasContent: function(node) {
                return node.firstChild !== node.lastChild || !NodeType.isBr(node.firstChild);
            },
            startsWithCaretContainer: startsWithCaretContainer,
            endsWithCaretContainer: endsWithCaretContainer
        };
    }(tinymce), function(tinymce) {
        var NodeType = tinymce.dom.NodeType, CaretContainer = tinymce.caret.CaretContainer, Arr = tinymce.util.Arr, isContentEditableTrue = NodeType.isContentEditableTrue, isContentEditableFalse = NodeType.isContentEditableFalse, isBr = NodeType.isBr, isText = NodeType.isText, isInvalidTextElement = NodeType.matchNodeNames("script style textarea"), isAtomicInline = NodeType.matchNodeNames("img input textarea hr iframe video audio object"), isTable = NodeType.matchNodeNames("table"), isCaretContainer = CaretContainer.isCaretContainer;
        function isCaretCandidate(node) {
            return !isCaretContainer(node) && (isText(node) ? !isInvalidTextElement(node.parentNode) : isAtomicInline(node) || isBr(node) || isTable(node) || isContentEditableFalse(node));
        }
        function isInEditable(node, rootNode) {
            for (node = node.parentNode; node && node != rootNode; node = node.parentNode) {
                if (isContentEditableFalse(node)) return !1;
                if (isContentEditableTrue(node)) return !0;
            }
            return !0;
        }
        tinymce.caret.CaretCandidate = {
            isCaretCandidate: isCaretCandidate,
            isInEditable: isInEditable,
            isAtomic: function(node) {
                return isAtomicInline(node) || function(node) {
                    return !!isContentEditableFalse(node) && !0 !== Arr.reduce(node.getElementsByTagName("*"), function(result, elm) {
                        return result || isContentEditableTrue(elm);
                    }, !1);
                }(node);
            },
            isEditableCaretCandidate: function(node, rootNode) {
                return isCaretCandidate(node) && isInEditable(node, rootNode);
            }
        };
    }(tinymce), function(tinymce) {
        function setNodeValue(node, text) {
            0 === text.length ? removeNode(node) : node.nodeValue = text;
        }
        function trimCount(text) {
            var trimmedText = Zwsp.trim(text);
            return {
                count: text.length - trimmedText.length,
                text: trimmedText
            };
        }
        function remove(caretContainerNode) {
            isElement(caretContainerNode) && CaretContainer.isCaretContainer(caretContainerNode) && (CaretContainer.hasContent(caretContainerNode) ? caretContainerNode.removeAttribute("data-mce-caret") : removeNode(caretContainerNode)), 
            isText(caretContainerNode) && setNodeValue(caretContainerNode, Zwsp.trim(function(node) {
                try {
                    return node.nodeValue;
                } catch (ex) {
                    return "";
                }
            }(caretContainerNode)));
        }
        var NodeType = tinymce.dom.NodeType, Zwsp = tinymce.text.Zwsp, CaretContainer = tinymce.caret.CaretContainer, CaretPosition = tinymce.caret.CaretPosition, Arr = tinymce.util.Arr, isElement = NodeType.isElement, isText = NodeType.isText, removeNode = function(node) {
            var parentNode = node.parentNode;
            parentNode && parentNode.removeChild(node);
        }, removeUnchanged = function(caretContainer, pos) {
            return remove(caretContainer), pos;
        };
        tinymce.caret.CaretContainerRemove = {
            removeAndReposition: function(container, pos) {
                return (CaretPosition.isTextPosition(pos) ? function(caretContainer, pos) {
                    return (pos.container() === caretContainer ? function(caretContainer, pos) {
                        var before = trimCount(caretContainer.data.substr(0, pos.offset())), after = trimCount(caretContainer.data.substr(pos.offset()));
                        return 0 < (after = before.text + after.text).length ? (setNodeValue(caretContainer, after), 
                        new CaretPosition(caretContainer, pos.offset() - before.count)) : pos;
                    } : removeUnchanged)(caretContainer, pos);
                } : function(caretContainer, pos) {
                    return (pos.container() === caretContainer.parentNode ? function(caretContainer, pos) {
                        var parentNode = pos.container(), newPosition = Arr.indexOf(parentNode.childNodes, caretContainer).map(function(index) {
                            return index < pos.offset() ? new CaretPosition(parentNode, pos.offset() - 1) : pos;
                        }).getOr(pos);
                        return remove(caretContainer), newPosition;
                    } : removeUnchanged)(caretContainer, pos);
                })(container, pos);
            },
            remove: remove
        };
    }(tinymce), function(tinymce) {
        var each = tinymce.each, TreeWalker = tinymce.dom.TreeWalker, NodeType = tinymce.dom.NodeType, CaretContainer = tinymce.caret.CaretContainer, Arr = tinymce.util.Arr, isContentEditableTrue = NodeType.isContentEditableTrue, isContentEditableFalse = NodeType.isContentEditableFalse, isCaretContainer = CaretContainer.isCaretContainer;
        function hasCeProperty(node) {
            return isContentEditableTrue(node) || isContentEditableFalse(node);
        }
        function findParent(node, rootNode, predicate) {
            for (;node && node !== rootNode; ) {
                if (predicate(node)) return node;
                node = node.parentNode;
            }
            return null;
        }
        function isFormatterCaret(node) {
            return "_mce_caret" === node.id;
        }
        tinymce.dom.RangeUtils = function(dom) {
            this.walk = function(rng, callback) {
                var ancestor, node, parent, siblings, container, childNodes, startContainer = rng.startContainer, startOffset = rng.startOffset, endContainer = rng.endContainer, endOffset = rng.endOffset;
                if (0 < (rng = dom.select("td.mceSelected,th.mceSelected,td[data-mce-selected],th[data-mce-selected]")).length) each(rng, function(node) {
                    callback([ node ]);
                }); else {
                    if (1 == startContainer.nodeType && startContainer.hasChildNodes() && (startContainer = startContainer.childNodes[startOffset]), 
                    1 == endContainer.nodeType && endContainer.hasChildNodes() && (rng = endOffset, 
                    --rng > (childNodes = (container = endContainer).childNodes).length - 1 ? rng = childNodes.length - 1 : rng < 0 && (rng = 0), 
                    endContainer = childNodes[rng] || container), startContainer == endContainer) return callback(exclude([ startContainer ]));
                    for (ancestor = dom.findCommonAncestor(startContainer, endContainer), 
                    node = startContainer; node; node = node.parentNode) {
                        if (node === endContainer) return walkBoundary(startContainer, ancestor, !0);
                        if (node === ancestor) break;
                    }
                    for (node = endContainer; node; node = node.parentNode) {
                        if (node === startContainer) return walkBoundary(endContainer, ancestor);
                        if (node === ancestor) break;
                    }
                    childNodes = findEndPoint(startContainer, ancestor) || startContainer, 
                    rng = findEndPoint(endContainer, ancestor) || endContainer, 
                    walkBoundary(startContainer, childNodes, !0), (siblings = collectSiblings(childNodes == startContainer ? childNodes : childNodes.nextSibling, "nextSibling", rng == endContainer ? rng.nextSibling : rng)).length && callback(exclude(siblings)), 
                    walkBoundary(endContainer, rng);
                }
                function exclude(nodes) {
                    var node = nodes[0];
                    return 3 === node.nodeType && node === startContainer && startOffset >= node.nodeValue.length && nodes.splice(0, 1), 
                    node = nodes[nodes.length - 1], 0 === endOffset && 0 < nodes.length && node === endContainer && 3 === node.nodeType && nodes.splice(nodes.length - 1, 1), 
                    nodes;
                }
                function collectSiblings(node, name, end_node) {
                    for (var siblings = []; node && node != end_node; node = node[name]) siblings.push(node);
                    return siblings;
                }
                function findEndPoint(node, root) {
                    do {
                        if (node.parentNode == root) return node;
                    } while (node = node.parentNode);
                }
                function walkBoundary(start_node, end_node, next) {
                    var siblingName = next ? "nextSibling" : "previousSibling";
                    for (parent = (node = start_node).parentNode; node && node != end_node; node = parent) parent = node.parentNode, 
                    (siblings = collectSiblings(node == start_node ? node : node[siblingName], siblingName)).length && (next || siblings.reverse(), 
                    callback(exclude(siblings)));
                }
            }, this.split = function(rng) {
                var startContainer = rng.startContainer, startOffset = rng.startOffset, endContainer = rng.endContainer, rng = rng.endOffset;
                function splitText(node, offset) {
                    return node.splitText(offset);
                }
                return startContainer == endContainer && 3 == startContainer.nodeType ? 0 < startOffset && startOffset < startContainer.nodeValue.length && (startContainer = (endContainer = splitText(startContainer, startOffset)).previousSibling, 
                startOffset < rng ? (startContainer = endContainer = splitText(endContainer, rng -= startOffset).previousSibling, 
                rng = endContainer.nodeValue.length, startOffset = 0) : rng = 0) : (3 == startContainer.nodeType && 0 < startOffset && startOffset < startContainer.nodeValue.length && (startContainer = splitText(startContainer, startOffset), 
                startOffset = 0), 3 == endContainer.nodeType && 0 < rng && rng < endContainer.nodeValue.length && (rng = (endContainer = splitText(endContainer, rng).previousSibling).nodeValue.length)), 
                {
                    startContainer: startContainer,
                    startOffset: startOffset,
                    endContainer: endContainer,
                    endOffset: rng
                };
            }, this.normalize = function(rng) {
                var collapsed, normalized = !1;
                function normalizeEndPoint(start) {
                    var container, offset, walker, node, nonEmptyElementsMap, directionLeft, isAfterNode, body = dom.getRoot();
                    function hasBrBeforeAfter(node, left) {
                        for (var walker = new TreeWalker(node, dom.getParent(node.parentNode, dom.isBlock) || body); node = walker[left ? "prev" : "next"](); ) if ("BR" === node.nodeName) return 1;
                    }
                    function findTextNodeRelative(left, startNode) {
                        var walker, lastInlineElement, parentBlockContainer;
                        if (startNode = startNode || container, parentBlockContainer = dom.getParent(startNode.parentNode, dom.isBlock) || body, 
                        left && "BR" == startNode.nodeName && isAfterNode && dom.isEmpty(parentBlockContainer)) container = startNode.parentNode, 
                        offset = dom.nodeIndex(startNode), normalized = !0; else {
                            for (walker = new TreeWalker(startNode, parentBlockContainer); node = walker[left ? "prev" : "next"](); ) {
                                if ("false" === dom.getContentEditableParent(node) || function(node, rootNode) {
                                    return isCaretContainer(node) && !1 === function(node, rootNode) {
                                        return null !== findParent(node, rootNode, isFormatterCaret);
                                    }(node, rootNode);
                                }(node, dom.getRoot())) return;
                                if (3 === node.nodeType && 0 < node.nodeValue.length) return container = node, 
                                offset = left ? node.nodeValue.length : 0, normalized = !0;
                                if (dom.isBlock(node) || nonEmptyElementsMap[node.nodeName.toLowerCase()]) return;
                                lastInlineElement = node;
                            }
                            collapsed && lastInlineElement && (container = lastInlineElement, 
                            normalized = !0, offset = 0);
                        }
                    }
                    if (container = rng[(start ? "start" : "end") + "Container"], 
                    offset = rng[(start ? "start" : "end") + "Offset"], isAfterNode = 1 == container.nodeType && offset === container.childNodes.length, 
                    nonEmptyElementsMap = dom.schema.getNonEmptyElements(), directionLeft = start, 
                    !isCaretContainer(container)) {
                        if (1 == container.nodeType && offset > container.childNodes.length - 1 && (directionLeft = !1), 
                        9 === container.nodeType && (container = dom.getRoot(), 
                        offset = 0), container === body) {
                            if (directionLeft && (node = container.childNodes[0 < offset ? offset - 1 : 0])) {
                                if (isCaretContainer(node)) return;
                                if (nonEmptyElementsMap[node.nodeName] || "TABLE" == node.nodeName) return;
                            }
                            if (container.hasChildNodes()) {
                                if (offset = Math.min(!directionLeft && 0 < offset ? offset - 1 : offset, container.childNodes.length - 1), 
                                container = container.childNodes[offset], offset = 0, 
                                !collapsed && container === body.lastChild && "TABLE" === container.nodeName) return;
                                if (function(node) {
                                    for (;node && node != body; ) {
                                        if (isContentEditableFalse(node)) return 1;
                                        node = node.parentNode;
                                    }
                                }(container) || isCaretContainer(container)) return;
                                if (container.hasChildNodes() && !/TABLE/.test(container.nodeName)) {
                                    walker = new TreeWalker(node = container, body);
                                    do {
                                        if (isContentEditableFalse(node) || isCaretContainer(node)) {
                                            normalized = !1;
                                            break;
                                        }
                                        if (3 === node.nodeType && 0 < node.nodeValue.length) {
                                            offset = directionLeft ? 0 : node.nodeValue.length, 
                                            container = node, normalized = !0;
                                            break;
                                        }
                                        if (nonEmptyElementsMap[node.nodeName.toLowerCase()] && !function(node) {
                                            return node && /^(TD|TH|CAPTION)$/.test(node.nodeName);
                                        }(node)) {
                                            offset = dom.nodeIndex(node), container = node.parentNode, 
                                            "IMG" != node.nodeName || directionLeft || offset++, 
                                            normalized = !0;
                                            break;
                                        }
                                    } while (node = directionLeft ? walker.next() : walker.prev());
                                }
                            }
                        }
                        collapsed && (3 === container.nodeType && 0 === offset && findTextNodeRelative(!0), 
                        1 !== container.nodeType || !(node = (node = container.childNodes[offset]) || container.childNodes[offset - 1]) || "BR" !== node.nodeName || function(node) {
                            return node.previousSibling && "A" == node.previousSibling.nodeName;
                        }(node) || hasBrBeforeAfter(node) || hasBrBeforeAfter(node, !0) || findTextNodeRelative(!0, node)), 
                        directionLeft && !collapsed && 3 === container.nodeType && offset === container.nodeValue.length && findTextNodeRelative(!1), 
                        normalized && rng["set" + (start ? "Start" : "End")](container, offset);
                    }
                }
                return collapsed = rng.collapsed, normalizeEndPoint(!0), collapsed || normalizeEndPoint(), 
                normalized && collapsed && rng.collapse(!0), normalized;
            };
        }, tinymce.dom.RangeUtils.compareRanges = function(rng1, rng2) {
            if (rng1 && rng2) {
                if (!rng1.item && !rng1.duplicate) return rng1.startContainer == rng2.startContainer && rng1.startOffset == rng2.startOffset;
                if (rng1.item && rng2.item && rng1.item(0) === rng2.item(0)) return !0;
                if (rng1.isEqual && rng2.isEqual && rng2.isEqual(rng1)) return !0;
            }
            return !1;
        }, tinymce.dom.RangeUtils.getCaretRangeFromPoint = function(clientX, clientY, doc) {
            var rng, el = doc.elementFromPoint(clientX, clientY);
            if (!el || el === doc.documentElement) return null;
            if (doc.caretPositionFromPoint) el = doc.caretPositionFromPoint(clientX, clientY), 
            (rng = doc.createRange()).setStart(el.offsetNode, el.offset), rng.collapse(!0); else if (doc.caretRangeFromPoint) rng = doc.caretRangeFromPoint(clientX, clientY); else if (doc.body.createTextRange) {
                rng = doc.body.createTextRange();
                try {
                    rng.moveToPoint(clientX, clientY), rng.collapse(!0);
                } catch (ex) {
                    rng = function(clientX, clientY, doc) {
                        var element = doc.elementFromPoint(clientX, clientY), rng = doc.body.createTextRange();
                        if (element && "HTML" != element.tagName || (element = doc.body), 
                        rng.moveToElementText(element), 0 < (doc = (doc = Arr.toArray(rng.getClientRects())).sort(function(a, b) {
                            return (a = Math.abs(Math.max(a.top - clientY, a.bottom - clientY))) - Math.abs(Math.max(b.top - clientY, b.bottom - clientY));
                        })).length) {
                            clientY = (doc[0].bottom + doc[0].top) / 2;
                            try {
                                return rng.moveToPoint(clientX, clientY), rng.collapse(!0), 
                                rng;
                            } catch (ex) {}
                        }
                        return null;
                    }(clientX, clientY, doc);
                }
                return function(rng, rootNode) {
                    var parentElement = rng && rng.parentElement ? rng.parentElement() : null;
                    return isContentEditableFalse(findParent(parentElement, rootNode, hasCeProperty)) ? null : rng;
                }(rng, doc.body);
            }
            return rng;
        }, tinymce.dom.RangeUtils.getSelectedNode = function(range) {
            var startContainer = range.startContainer, startOffset = range.startOffset;
            return startContainer.hasChildNodes() && range.endOffset == startOffset + 1 ? startContainer.childNodes[startOffset] : null;
        }, tinymce.dom.RangeUtils.getNode = function(container, offset) {
            return 1 == container.nodeType && container.hasChildNodes() && (offset >= container.childNodes.length && (offset = container.childNodes.length - 1), 
            container = container.childNodes[offset]), container;
        };
    }(tinymce), function(tinymce) {
        var NodeType = tinymce.dom.NodeType, DOMUtils = tinymce.DOM, CaretCandidate = tinymce.caret.CaretCandidate, RangeUtils = tinymce.dom.RangeUtils, ClientRect = tinymce.geom.ClientRect, ExtendingChar = tinymce.text.ExtendingChar, Fun = tinymce.util.Fun, isElement = NodeType.isElement, CaretCandidate = CaretCandidate.isCaretCandidate, isBlock = NodeType.matchStyleValues("display", "block table"), isFloated = NodeType.matchStyleValues("float", "left right"), isValidElementCaretCandidate = Fun.and(isElement, CaretCandidate, Fun.negate(isFloated)), isNotPre = Fun.negate(NodeType.matchStyleValues("white-space", "pre pre-line pre-wrap")), isText = NodeType.isText, isBr = NodeType.isBr, nodeIndex = DOMUtils.nodeIndex, resolveIndex = RangeUtils.getNode;
        function createRange(doc) {
            return "createRange" in doc ? doc.createRange() : DOMUtils.DOM.createRng();
        }
        function isWhiteSpace(chr) {
            return chr && /[\r\n\t ]/.test(chr);
        }
        function isHiddenWhiteSpaceRange(range) {
            var container = range.startContainer, offset = range.startOffset;
            return isWhiteSpace(range.toString()) && isNotPre(container.parentNode) && (isWhiteSpace((range = container.data)[offset - 1]) || isWhiteSpace(range[offset + 1]));
        }
        function CaretPosition(container, offset, clientRects) {
            function getClientRects() {
                return clientRects = clientRects || function(caretPosition) {
                    var node, clientRects = [];
                    function getBoundingClientRect(item) {
                        var rng, doc, parentNode, clientRects = 0 < (clientRects = item.getClientRects()).length ? ClientRect.clone(clientRects[0]) : ClientRect.clone(item.getBoundingClientRect());
                        return isBr(item) && 0 === clientRects.left ? (rng = createRange(doc = item.ownerDocument), 
                        doc = doc.createTextNode("\xa0"), (parentNode = item.parentNode).insertBefore(doc, item), 
                        rng.setStart(doc, 0), rng.setEnd(doc, 1), item = ClientRect.clone(rng.getBoundingClientRect()), 
                        parentNode.removeChild(doc), item) : clientRects;
                    }
                    function collapseAndInflateWidth(clientRect, toStart) {
                        return (clientRect = ClientRect.collapse(clientRect, toStart)).width = 1, 
                        clientRect.right = clientRect.left + 1, clientRect;
                    }
                    function addUniqueAndValidRect(clientRect) {
                        0 === clientRect.height || 0 < clientRects.length && ClientRect.isEqual(clientRect, clientRects[clientRects.length - 1]) || clientRects.push(clientRect);
                    }
                    function addCharacterOffset(container, offset) {
                        var range = createRange(container.ownerDocument);
                        if (offset < container.data.length) {
                            if (ExtendingChar.isExtendingChar(container.data[offset])) return;
                            if (ExtendingChar.isExtendingChar(container.data[offset - 1]) && (range.setStart(container, offset), 
                            range.setEnd(container, offset + 1), !isHiddenWhiteSpaceRange(range))) return addUniqueAndValidRect(collapseAndInflateWidth(getBoundingClientRect(range), !1));
                        }
                        0 < offset && (range.setStart(container, offset - 1), range.setEnd(container, offset), 
                        isHiddenWhiteSpaceRange(range) || addUniqueAndValidRect(collapseAndInflateWidth(getBoundingClientRect(range), !1))), 
                        offset < container.data.length && (range.setStart(container, offset), 
                        range.setEnd(container, offset + 1), isHiddenWhiteSpaceRange(range) || addUniqueAndValidRect(collapseAndInflateWidth(getBoundingClientRect(range), !0)));
                    }
                    if (isText(caretPosition.container())) addCharacterOffset(caretPosition.container(), caretPosition.offset()); else if (isElement(caretPosition.container())) if (caretPosition.isAtEnd()) node = resolveIndex(caretPosition.container(), caretPosition.offset()), 
                    isText(node) && addCharacterOffset(node, node.data.length), 
                    isValidElementCaretCandidate(node) && !isBr(node) && addUniqueAndValidRect(collapseAndInflateWidth(getBoundingClientRect(node), !1)); else {
                        if (node = resolveIndex(caretPosition.container(), caretPosition.offset()), 
                        isText(node) && addCharacterOffset(node, 0), isValidElementCaretCandidate(node) && caretPosition.isAtEnd()) return addUniqueAndValidRect(collapseAndInflateWidth(getBoundingClientRect(node), !1)), 
                        clientRects;
                        caretPosition = resolveIndex(caretPosition.container(), caretPosition.offset() - 1), 
                        !isValidElementCaretCandidate(caretPosition) || isBr(caretPosition) || !isBlock(caretPosition) && !isBlock(node) && isValidElementCaretCandidate(node) || addUniqueAndValidRect(collapseAndInflateWidth(getBoundingClientRect(caretPosition), !1)), 
                        isValidElementCaretCandidate(node) && addUniqueAndValidRect(collapseAndInflateWidth(getBoundingClientRect(node), !0));
                    }
                    return clientRects;
                }(new CaretPosition(container, offset));
            }
            return {
                container: Fun.constant(container),
                offset: Fun.constant(offset),
                toRange: function() {
                    var range = createRange(container.ownerDocument);
                    return range.setStart(container, offset), range.setEnd(container, offset), 
                    range;
                },
                getClientRects: getClientRects,
                isVisible: function() {
                    return 0 < getClientRects().length;
                },
                isAtStart: function() {
                    return isText(container), 0 === offset;
                },
                isAtEnd: function() {
                    return isText(container) ? offset >= container.data.length : offset >= container.childNodes.length;
                },
                isEqual: function(caretPosition) {
                    return caretPosition && container === caretPosition.container() && offset === caretPosition.offset();
                },
                getNode: function(before) {
                    return resolveIndex(container, before ? offset - 1 : offset);
                }
            };
        }
        CaretPosition.fromRangeStart = function(range) {
            return new CaretPosition(range.startContainer, range.startOffset);
        }, CaretPosition.fromRangeEnd = function(range) {
            return new CaretPosition(range.endContainer, range.endOffset);
        }, CaretPosition.after = function(node) {
            return new CaretPosition(node.parentNode, nodeIndex(node) + 1);
        }, CaretPosition.before = function(node) {
            return new CaretPosition(node.parentNode, nodeIndex(node));
        }, tinymce.caret.CaretPosition = CaretPosition;
    }(tinymce), function(tinymce) {
        var NodeType = tinymce.dom.NodeType, TreeWalker = tinymce.dom.TreeWalker, CaretContainer = tinymce.caret.CaretContainer, CaretCandidate = tinymce.caret.CaretCandidate, Fun = tinymce.util.Fun, isContentEditableTrue = NodeType.isContentEditableTrue, isContentEditableFalse = NodeType.isContentEditableFalse, isBlockLike = NodeType.matchStyleValues("display", "block table table-cell table-caption"), isCaretContainer = CaretContainer.isCaretContainer, isCaretContainerBlock = CaretContainer.isCaretContainerBlock, curry = Fun.curry, isElement = NodeType.isElement, isCaretCandidate = CaretCandidate.isCaretCandidate;
        function skipCaretContainers(walk, shallow) {
            for (var node; node = walk(shallow); ) if (!isCaretContainerBlock(node)) return node;
            return null;
        }
        function getEditingHost(node, rootNode) {
            for (node = node.parentNode; node && node != rootNode; node = node.parentNode) if (isContentEditableTrue(node)) return node;
            return rootNode;
        }
        function getParentBlock(node, rootNode) {
            for (;node && node != rootNode; ) {
                if (isBlockLike(node)) return node;
                node = node.parentNode;
            }
            return null;
        }
        function beforeAfter(before, node) {
            var range = node.ownerDocument.createRange();
            return before ? (range.setStartBefore(node), range.setEndBefore(node)) : (range.setStartAfter(node), 
            range.setEndAfter(node)), range;
        }
        function lean(left, rootNode, node) {
            for (var sibling, siblingName = left ? "previousSibling" : "nextSibling"; node && node != rootNode; ) {
                if (sibling = node[siblingName], isCaretContainer(sibling) && (sibling = sibling[siblingName]), 
                isContentEditableFalse(sibling)) {
                    if (function(rootNode, node2) {
                        return getParentBlock(sibling, rootNode) == getParentBlock(node2, rootNode);
                    }(rootNode, node)) return sibling;
                    break;
                }
                if (isCaretCandidate(sibling)) break;
                node = node.parentNode;
            }
            return null;
        }
        var before = curry(beforeAfter, !0), after = curry(beforeAfter, !1);
        function isNextToContentEditableFalse(relativeOffset, caretPosition) {
            return isContentEditableFalse(function(relativeOffset, caretPosition) {
                var container;
                return caretPosition && (container = caretPosition.container(), 
                caretPosition = caretPosition.offset(), isElement(container)) ? container.childNodes[caretPosition + relativeOffset] : null;
            }(relativeOffset, caretPosition));
        }
        tinymce.caret.CaretUtils = {
            isForwards: function(direction) {
                return 0 < direction;
            },
            isBackwards: function(direction) {
                return direction < 0;
            },
            findNode: function(node, direction, predicateFn, rootNode, shallow) {
                var walker = new TreeWalker(node, rootNode);
                if (direction < 0) {
                    if ((isContentEditableFalse(node) || isCaretContainerBlock(node)) && predicateFn(node = skipCaretContainers(walker.prev, !0))) return node;
                    for (;node = skipCaretContainers(walker.prev, shallow); ) if (predicateFn(node)) return node;
                }
                if (0 < direction) {
                    if ((isContentEditableFalse(node) || isCaretContainerBlock(node)) && predicateFn(node = skipCaretContainers(walker.next, !0))) return node;
                    for (;node = skipCaretContainers(walker.next, shallow); ) if (predicateFn(node)) return node;
                }
                return null;
            },
            getEditingHost: getEditingHost,
            getParentBlock: getParentBlock,
            isInSameBlock: function(caretPosition1, caretPosition2, rootNode) {
                return getParentBlock(caretPosition1.container(), rootNode) == getParentBlock(caretPosition2.container(), rootNode);
            },
            isInSameEditingHost: function(caretPosition1, caretPosition2, rootNode) {
                return getEditingHost(caretPosition1.container(), rootNode) == getEditingHost(caretPosition2.container(), rootNode);
            },
            isBeforeContentEditableFalse: curry(isNextToContentEditableFalse, 0),
            isAfterContentEditableFalse: curry(isNextToContentEditableFalse, -1),
            normalizeRange: function(direction, rootNode, range) {
                var node, location, leanLeft = curry(lean, !0, rootNode), rootNode = curry(lean, !1, rootNode), container = range.startContainer, offset = range.startOffset;
                if (CaretContainer.isCaretContainerBlock(container)) {
                    if ("before" == (location = (container = isElement(container) ? container : container.parentNode).getAttribute("data-mce-caret")) && (node = container.nextSibling, 
                    isContentEditableFalse(node))) return before(node);
                    if ("after" == location && (node = container.previousSibling, 
                    isContentEditableFalse(node))) return after(node);
                }
                if (range.collapsed && NodeType.isText(container)) {
                    if (isCaretContainer(container)) {
                        if (1 === direction) {
                            if (node = rootNode(container)) return before(node);
                            if (node = leanLeft(container)) return after(node);
                        }
                        if (-1 === direction) {
                            if (node = leanLeft(container)) return after(node);
                            if (node = rootNode(container)) return before(node);
                        }
                        return range;
                    }
                    if (CaretContainer.endsWithCaretContainer(container) && offset >= container.data.length - 1) return 1 === direction && (node = rootNode(container)) ? before(node) : range;
                    if (CaretContainer.startsWithCaretContainer(container) && offset <= 1) return -1 === direction && (node = leanLeft(container)) ? after(node) : range;
                    if (offset === container.data.length) return (node = rootNode(container)) ? before(node) : range;
                    if (0 === offset) return (node = leanLeft(container)) ? after(node) : range;
                }
                return range;
            }
        };
    }(tinymce), function(tinymce) {
        var NodeType = tinymce.dom.NodeType, CaretPosition = tinymce.caret.CaretPosition, CaretUtils = tinymce.caret.CaretUtils, CaretCandidate = tinymce.caret.CaretCandidate, Arr = tinymce.util.Arr, Fun = tinymce.util.Fun, isContentEditableFalse = NodeType.isContentEditableFalse, isText = NodeType.isText, isElement = NodeType.isElement, isBr = NodeType.isBr, isForwards = CaretUtils.isForwards, isBackwards = CaretUtils.isBackwards, isCaretCandidate = CaretCandidate.isCaretCandidate, isAtomic = CaretCandidate.isAtomic, isEditableCaretCandidate = CaretCandidate.isEditableCaretCandidate;
        function nodeAtIndex(container, offset) {
            return container.hasChildNodes() && offset < container.childNodes.length ? container.childNodes[offset] : null;
        }
        function getCaretCandidatePosition(direction, node) {
            if (isForwards(direction)) {
                if (isCaretCandidate(node.previousSibling) && !isText(node.previousSibling)) return CaretPosition.before(node);
                if (isText(node)) return CaretPosition(node, 0);
            }
            if (isBackwards(direction)) {
                if (isCaretCandidate(node.nextSibling) && !isText(node.nextSibling)) return CaretPosition.after(node);
                if (isText(node)) return CaretPosition(node, node.data.length);
            }
            return !isBackwards(direction) || isBr(node) ? CaretPosition.before(node) : CaretPosition.after(node);
        }
        function findCaretPosition(direction, startCaretPosition, rootNode) {
            var container, node, nextNode, innerNode, offset;
            if (!isElement(rootNode) || !startCaretPosition) return null;
            if (container = startCaretPosition.container(), offset = startCaretPosition.offset(), 
            isText(container)) {
                if (isBackwards(direction) && 0 < offset) return CaretPosition(container, --offset);
                if (isForwards(direction) && offset < container.length) return CaretPosition(container, ++offset);
                node = container;
            } else {
                if (isBackwards(direction) && 0 < offset && (nextNode = nodeAtIndex(container, offset - 1), 
                isCaretCandidate(nextNode))) return !isAtomic(nextNode) && (innerNode = CaretUtils.findNode(nextNode, direction, isEditableCaretCandidate, nextNode)) ? isText(innerNode) ? CaretPosition(innerNode, innerNode.data.length) : CaretPosition.after(innerNode) : isText(nextNode) ? CaretPosition(nextNode, nextNode.data.length) : CaretPosition.before(nextNode);
                if (isForwards(direction) && offset < container.childNodes.length && (nextNode = nodeAtIndex(container, offset), 
                isCaretCandidate(nextNode))) return function(node, rootNode) {
                    var next;
                    return NodeType.isBr(node) && (next = findCaretPosition(1, CaretPosition.after(node), rootNode)) && !CaretUtils.isInSameBlock(CaretPosition.before(node), CaretPosition.before(next), rootNode);
                }(nextNode, rootNode) ? findCaretPosition(direction, CaretPosition.after(nextNode), rootNode) : !isAtomic(nextNode) && (innerNode = CaretUtils.findNode(nextNode, direction, isEditableCaretCandidate, nextNode)) ? isText(innerNode) ? CaretPosition(innerNode, 0) : CaretPosition.before(innerNode) : isText(nextNode) ? CaretPosition(nextNode, 0) : CaretPosition.after(nextNode);
                node = startCaretPosition.getNode();
            }
            return (isForwards(direction) && startCaretPosition.isAtEnd() || isBackwards(direction) && startCaretPosition.isAtStart()) && (node = CaretUtils.findNode(node, direction, Fun.constant(!0), rootNode, !0), 
            isEditableCaretCandidate(node)) ? getCaretCandidatePosition(direction, node) : (nextNode = CaretUtils.findNode(node, direction, isEditableCaretCandidate, rootNode), 
            !(offset = Arr.last(Arr.filter(function(node, rootNode) {
                for (var parents = []; node && node != rootNode; ) parents.push(node), 
                node = node.parentNode;
                return parents;
            }(container, rootNode), isContentEditableFalse))) || nextNode && offset.contains(nextNode) ? nextNode ? getCaretCandidatePosition(direction, nextNode) : null : isForwards(direction) ? CaretPosition.after(offset) : CaretPosition.before(offset));
        }
        tinymce.caret.CaretWalker = function(rootNode) {
            return {
                next: function(caretPosition) {
                    return findCaretPosition(1, caretPosition, rootNode);
                },
                prev: function(caretPosition) {
                    return findCaretPosition(-1, caretPosition, rootNode);
                }
            };
        };
    }(tinymce), function(tinymce) {
        var NodeType = tinymce.dom.NodeType, DOM = tinymce.DOM, ClientRect = tinymce.geom.ClientRect, CaretContainer = tinymce.caret.CaretContainer, CaretContainerRemove = tinymce.caret.CaretContainerRemove, isContentEditableFalse = NodeType.isContentEditableFalse;
        tinymce.caret.FakeCaret = function(rootNode, isBlock) {
            var cursorInterval, $lastVisualCaret, caretContainerNode;
            function hide() {
                for (var node, sibling, data, contentEditableFalseNodes = DOM.select("*[contentEditable=false]", rootNode), i = 0; i < contentEditableFalseNodes.length; i++) sibling = (node = contentEditableFalseNodes[i]).previousSibling, 
                CaretContainer.endsWithCaretContainer(sibling) && (1 == (data = sibling.data).length ? sibling.parentNode.removeChild(sibling) : sibling.deleteData(data.length - 1, 1)), 
                sibling = node.nextSibling, CaretContainer.startsWithCaretContainer(sibling) && (1 == (data = sibling.data).length ? sibling.parentNode.removeChild(sibling) : sibling.deleteData(0, 1));
                caretContainerNode && (CaretContainerRemove.remove(caretContainerNode), 
                caretContainerNode = null), $lastVisualCaret && ($lastVisualCaret.remove(), 
                $lastVisualCaret = null), clearInterval(cursorInterval);
            }
            return {
                show: function(before, node) {
                    var clientRect;
                    return hide(), isBlock(node) ? (caretContainerNode = CaretContainer.insertBlock("p", node, before), 
                    clientRect = function(node, before) {
                        var scrollX, clientRect = ClientRect.collapse(node.getBoundingClientRect(), before), docElm = "BODY" == rootNode.tagName ? (docElm = rootNode.ownerDocument.documentElement, 
                        scrollX = rootNode.scrollLeft || docElm.scrollLeft, rootNode.scrollTop || docElm.scrollTop) : (docElm = rootNode.getBoundingClientRect(), 
                        scrollX = rootNode.scrollLeft - docElm.left, rootNode.scrollTop - docElm.top);
                        return clientRect.left += scrollX, clientRect.right += scrollX, 
                        clientRect.top += docElm, clientRect.bottom += docElm, clientRect.width = 1, 
                        0 < (scrollX = node.offsetWidth - node.clientWidth) && (before && (scrollX *= -1), 
                        clientRect.left += scrollX, clientRect.right += scrollX), 
                        clientRect;
                    }(node, before), DOM.setStyle(caretContainerNode, "top", clientRect.top), 
                    $lastVisualCaret = DOM.add(rootNode, "div", {
                        class: "mce-visual-caret",
                        "data-mce-bogus": "all",
                        style: clientRect
                    }), before && DOM.addClass($lastVisualCaret, "mce-visual-caret-before"), 
                    cursorInterval = setInterval(function() {
                        var caret = DOM.select("div.mce-visual-caret", rootNode)[0];
                        DOM.toggleClass(caret, "mce-visual-caret-hidden");
                    }, 500), (clientRect = node.ownerDocument.createRange()).setStart(caretContainerNode, 0), 
                    clientRect.setEnd(caretContainerNode, 0)) : (caretContainerNode = CaretContainer.insertInline(node, before), 
                    clientRect = node.ownerDocument.createRange(), isContentEditableFalse(caretContainerNode.nextSibling) ? (clientRect.setStart(caretContainerNode, 0), 
                    clientRect.setEnd(caretContainerNode, 0)) : (clientRect.setStart(caretContainerNode, 1), 
                    clientRect.setEnd(caretContainerNode, 1))), clientRect;
                },
                hide: hide,
                getCss: function() {
                    return ".mce-visual-caret {position: absolute;background-color: black;background-color: currentcolor;}.mce-visual-caret-hidden {display: none;}*[data-mce-caret] {position: absolute;left: -1000px;right: auto;top: 0;margin: 0;padding: 0;}";
                },
                destroy: function() {
                    clearInterval(cursorInterval);
                }
            };
        };
    }(tinymce), function(tinymce) {
        var NodeType = tinymce.dom.NodeType, Fun = tinymce.util.Fun, Arr = tinymce.util.Arr, Dimensions = tinymce.dom.Dimensions, ClientRect = tinymce.geom.ClientRect, CaretUtils = tinymce.caret.CaretUtils, CaretCandidate = tinymce.caret.CaretCandidate, isContentEditableFalse = NodeType.isContentEditableFalse, findNode = CaretUtils.findNode, curry = Fun.curry;
        function distanceToRectLeft(clientRect, clientX) {
            return Math.abs(clientRect.left - clientX);
        }
        function distanceToRectRight(clientRect, clientX) {
            return Math.abs(clientRect.right - clientX);
        }
        function findClosestClientRect(clientRects, clientX) {
            function isInside(clientX, clientRect) {
                return clientX >= clientRect.left && clientX <= clientRect.right;
            }
            return Arr.reduce(clientRects, function(oldClientRect, clientRect) {
                var oldDistance = Math.min(distanceToRectLeft(oldClientRect, clientX), distanceToRectRight(oldClientRect, clientX)), newDistance = Math.min(distanceToRectLeft(clientRect, clientX), distanceToRectRight(clientRect, clientX));
                return isInside(clientX, clientRect) || !isInside(clientX, oldClientRect) && (newDistance == oldDistance && isContentEditableFalse(clientRect.node) || newDistance < oldDistance) ? clientRect : oldClientRect;
            });
        }
        function walkUntil(direction, rootNode, predicateFn, node) {
            for (;node = findNode(node, direction, CaretCandidate.isEditableCaretCandidate, rootNode); ) if (predicateFn(node)) return;
        }
        function findLineNodeRects(rootNode, targetNodeRect) {
            var clientRects = [];
            function collect(checkPosFn, node) {
                return node = Arr.filter(Dimensions.getClientRects(node), function(clientRect) {
                    return !checkPosFn(clientRect, targetNodeRect);
                }), clientRects = clientRects.concat(node), 0 === node.length;
            }
            return clientRects.push(targetNodeRect), walkUntil(-1, rootNode, curry(collect, ClientRect.isAbove), targetNodeRect.node), 
            walkUntil(1, rootNode, curry(collect, ClientRect.isBelow), targetNodeRect.node), 
            clientRects;
        }
        tinymce.caret.LineUtils = {
            findClosestClientRect: findClosestClientRect,
            findLineNodeRects: findLineNodeRects,
            closestCaret: function(rootNode, clientX, clientY) {
                var contentEditableFalseNodeRects = Dimensions.getClientRects(function(rootNode) {
                    return Arr.filter(Arr.toArray(rootNode.getElementsByTagName("*")), isContentEditableFalse);
                }(rootNode));
                return (contentEditableFalseNodeRects = (contentEditableFalseNodeRects = findClosestClientRect(Arr.filter(contentEditableFalseNodeRects, function(clientRect) {
                    return clientY >= clientRect.top && clientY <= clientRect.bottom;
                }), clientX)) && findClosestClientRect(findLineNodeRects(rootNode, contentEditableFalseNodeRects), clientX)) && isContentEditableFalse(contentEditableFalseNodeRects.node) ? function(clientRect, clientX) {
                    return {
                        node: clientRect.node,
                        before: distanceToRectLeft(clientRect, clientX) < distanceToRectRight(clientRect, clientX)
                    };
                }(contentEditableFalseNodeRects, clientX) : null;
            }
        };
    }(tinymce), function(tinymce) {
        var Fun = tinymce.util.Fun, Arr = tinymce.util.Arr, Dimensions = tinymce.dom.Dimensions, ClientRect = tinymce.geom.ClientRect, CaretUtils = tinymce.caret.CaretUtils, CaretCandidate = tinymce.caret.CaretCandidate, CaretWalker = tinymce.caret.CaretWalker, CaretPosition = tinymce.caret.CaretPosition;
        function walkUntil(direction, isAboveFn, isBeflowFn, rootNode, predicateFn, caretPosition) {
            var targetClientRect, line = 0, result = [];
            function add(node) {
                var i, clientRect, clientRects = Dimensions.getClientRects(node);
                for (-1 == direction && (clientRects = clientRects.reverse()), i = 0; i < clientRects.length; i++) if (clientRect = clientRects[i], 
                !isBeflowFn(clientRect, targetClientRect)) {
                    if (0 < result.length && isAboveFn(clientRect, Arr.last(result)) && line++, 
                    clientRect.line = line, predicateFn(clientRect)) return !0;
                    result.push(clientRect);
                }
            }
            return (targetClientRect = Arr.last(caretPosition.getClientRects())) && (add(caretPosition = caretPosition.getNode()), 
            function(direction, rootNode, predicateFn, node) {
                for (;node = CaretUtils.findNode(node, direction, CaretCandidate.isEditableCaretCandidate, rootNode); ) if (predicateFn(node)) return;
            }(direction, rootNode, add, caretPosition)), result;
        }
        var upUntil = (Fun = Fun.curry)(walkUntil, -1, ClientRect.isAbove, ClientRect.isBelow), downUntil = Fun(walkUntil, 1, ClientRect.isBelow, ClientRect.isAbove);
        tinymce.caret.LineWalker = {
            upUntil: upUntil,
            downUntil: downUntil,
            positionsUntil: function(direction, rootNode, predicateFn, node) {
                var walkFn, isBelowFn, isAboveFn, caretPosition, clientRect, targetClientRect, rootNode = new CaretWalker(rootNode), result = [], line = 0;
                function getClientRect(caretPosition) {
                    return Arr.last(caretPosition.getClientRects());
                }
                targetClientRect = getClientRect(caretPosition = 1 == direction ? (walkFn = rootNode.next, 
                isBelowFn = ClientRect.isBelow, isAboveFn = ClientRect.isAbove, 
                CaretPosition.after(node)) : (walkFn = rootNode.prev, isBelowFn = ClientRect.isAbove, 
                isAboveFn = ClientRect.isBelow, CaretPosition.before(node)));
                do {
                    if (caretPosition.isVisible() && !isAboveFn(clientRect = getClientRect(caretPosition), targetClientRect)) {
                        if (0 < result.length && isBelowFn(clientRect, Arr.last(result)) && line++, 
                        (clientRect = ClientRect.clone(clientRect)).position = caretPosition, 
                        clientRect.line = line, predicateFn(clientRect)) return result;
                        result.push(clientRect);
                    }
                } while (caretPosition = walkFn(caretPosition));
                return result;
            },
            isAboveLine: Fun(function(lineNumber, clientRect) {
                return clientRect.line > lineNumber;
            }),
            isLine: Fun(function(lineNumber, clientRect) {
                return clientRect.line === lineNumber;
            })
        };
    }(tinymce), tinymce.TextPattern = function(editor) {
        var self = this, isPatternsDirty = !0;
        function getPatterns() {
            return isPatternsDirty && (sortPatterns(self.patterns), isPatternsDirty = !1), 
            self.patterns;
        }
        function findPattern(text) {
            for (var patterns = getPatterns(), i = 0; i < patterns.length; i++) if (0 === text.indexOf(patterns[i].start) && (!patterns[i].end || text.lastIndexOf(patterns[i].end) == text.length - patterns[i].end.length)) return patterns[i];
        }
        function sortPatterns(patterns) {
            return patterns.sort(function(a, b) {
                return a.start.length > b.start.length ? -1 : a.start.length < b.start.length ? 1 : 0;
            });
        }
        function applyInlineFormat(space) {
            var container, startOffset, text, pattern, delta, selection = editor.selection, dom = editor.dom;
            if (selection.isCollapsed() && (container = (selection = selection.getRng(!0)).startContainer, 
            selection = selection.startOffset, text = container.data, delta = !0 === space ? 1 : 0, 
            3 == container.nodeType) && !dom.getParent(container, "PRE") && void 0 !== (pattern = function(text, offset, delta) {
                for (var pattern, sortedPatterns = sortPatterns(getPatterns()), i = 0; i < sortedPatterns.length; i++) if (void 0 !== (pattern = sortedPatterns[i]).end && function(pattern, text, offset, delta) {
                    return text.substr(offset - pattern.end.length - delta, pattern.end.length) === pattern.end;
                }(pattern, text, offset, delta) && function(offset, delta, pattern) {
                    return 0 < offset - delta - pattern.end.length - pattern.start.length;
                }(offset, delta, pattern)) return pattern;
            }(text, selection, delta)) && (startOffset = Math.max(0, selection - delta), 
            -1 !== (startOffset = text.lastIndexOf(pattern.start, startOffset - pattern.end.length - 1)))) return (text = dom.createRng()).setStart(container, startOffset), 
            text.setEnd(container, selection - delta), (pattern = findPattern(text.toString())) && pattern.end && !(container.data.length <= pattern.start.length + pattern.end.length) && pattern.format && (dom = editor.formatter.get(pattern.format)) && dom[0].inline ? (container = function(container, pattern, offset, startOffset, delta) {
                return delta && /[\u00a0 ]/.test(pattern.start) && (startOffset += 1), 
                (container = 0 < startOffset ? container.splitText(startOffset) : container).splitText(offset - startOffset - delta), 
                !1 !== pattern.remove && (container.deleteData(0, pattern.start.length), 
                container.deleteData(container.data.length - pattern.end.length, pattern.end.length)), 
                container;
            }(container, pattern, selection, startOffset, delta), space && container.appendData(" "), 
            editor.formatter.apply(pattern.format, {}, container), container) : void 0;
        }
        return self.patterns = [], editor.onKeyDown.addToTop(function(ed, e) {
            13 != e.keyCode || tinymce.VK.modifierPressed(e) || function(e) {
                var rng, wrappedTextNode = applyInlineFormat();
                wrappedTextNode && ((rng = editor.dom.createRng()).setStart(wrappedTextNode, wrappedTextNode.data.length), 
                rng.setEnd(wrappedTextNode, wrappedTextNode.data.length), editor.selection.setRng(rng)), 
                function(e) {
                    var firstTextNode, node, walker, rng, offset, selection = editor.selection, dom = editor.dom;
                    if (selection.isCollapsed()) {
                        var format, parent, startNode = selection.getStart();
                        if ("PRE" !== startNode.nodeName && (startNode = dom.getParent(startNode, "p,div"))) {
                            for (walker = new tinymce.dom.TreeWalker(startNode, startNode); node = walker.next(); ) if (3 == node.nodeType) {
                                firstTextNode = node;
                                break;
                            }
                            firstTextNode && (startNode = findPattern(firstTextNode.data)) && (startNode.remove && e.preventDefault(), 
                            e = (rng = selection.getRng(!0)).startContainer, offset = rng.startOffset, 
                            firstTextNode == e && (offset = Math.max(0, offset - startNode.start.length)), 
                            tinymce.trim(firstTextNode.data).length != startNode.start.length) && (startNode.format ? (format = editor.formatter.get(startNode.format)) && format[0].block && (firstTextNode.deleteData(0, startNode.start.length), 
                            editor.formatter.apply(startNode.format, {}, firstTextNode), 
                            rng.setStart(e, offset), rng.collapse(!0), selection.setRng(rng)) : startNode.cmd && (editor.undoManager.add(), 
                            format = startNode.start.length, e = firstTextNode.data, 
                            startNode.remove && (format = firstTextNode.data.length), 
                            firstTextNode.deleteData(0, format), parent = firstTextNode.parentNode, 
                            dom.isEmpty(parent) && dom.isBlock(parent) && (parent.innerHTML = '<br data-mce-bogus="1">', 
                            window.setTimeout(function() {
                                rng.setStart(parent, 0), rng.collapse(!0), selection.setRng(rng);
                            }, 0)), editor.execCommand(startNode.cmd, !1, e)));
                        }
                    }
                }(e);
            }(e);
        }), editor.onKeyUp.add(function(ed, e) {
            var lastChar, dom;
            32 != e.keyCode || tinymce.VK.modifierPressed(e) || (e = applyInlineFormat(!0)) && (dom = editor.dom, 
            lastChar = e.data.slice(-1), /[\u00a0 ]/.test(lastChar)) && (e.deleteData(e.data.length - 1, 1), 
            lastChar = dom.doc.createTextNode(lastChar), e.nextSibling ? dom.insertAfter(lastChar, e.nextSibling) : e.parentNode.appendChild(lastChar), 
            (e = dom.createRng()).setStart(lastChar, 1), e.setEnd(lastChar, 1), 
            editor.selection.setRng(e));
        }), {
            getPatterns: getPatterns,
            addPattern: function(pattern) {
                self.patterns.push(pattern), isPatternsDirty = !0;
            }
        };
    };
    var internalMark = "\x3c!-- x-tinymce/html --\x3e", unmark = function(html) {
        return html.replace(internalMark, "");
    }, isMarked = function(html) {
        return -1 !== html.indexOf(internalMark);
    };
    var clipboardData = {
        "text/html": "",
        "text/plain": ""
    };
    function hasData() {
        return !!clipboardData["text/html"] || !!clipboardData["text/plain"] || !!clipboardData["x-tinymce/html"];
    }
    function getData$1(mimetype) {
        return mimetype ? clipboardData[mimetype] || null : clipboardData;
    }
    function setData(mimetype, content) {
        clipboardData[mimetype] = {
            timestamp: Date.now(),
            content: content
        };
    }
    function clearData() {
        clipboardData = {
            "text/html": "",
            "text/plain": "",
            "x-tinymce/html": ""
        };
    }
    function cut(editor, evt) {
        !evt.isDefaultPrevented() && hasSelectedContent(editor) && setClipboardData(evt, getData(editor), fallback(editor), function() {
            var rng = editor.selection.getRng();
            setTimeout(function() {
                editor.selection.setRng(rng), editor.execCommand("Delete");
            }, 0);
        });
    }
    function copy(editor, evt) {
        !evt.isDefaultPrevented() && hasSelectedContent(editor) && setClipboardData(evt, getData(editor), fallback(editor), noop);
    }
    function parseCssToRules(content) {
        var doc = document.implementation.createHTMLDocument(""), styleElement = document.createElement("style");
        return styleElement.textContent = content, doc.body.appendChild(styleElement), 
        styleElement.sheet.cssRules;
    }
    clipboardData["x-tinymce/html"] = "";
    function noop() {}
    function setClipboardData(evt, data, fallback, done) {
        !function(clipboardData, html, text) {
            if (clearData(), setData("text/html", html), setData("text/plain", text), 
            setData("x-tinymce/html", html), function(clipboardData) {
                return !1 === tinymce.isIOS && void 0 !== clipboardData && "function" == typeof clipboardData.setData;
            }(clipboardData)) try {
                return clipboardData.clearData(), clipboardData.setData("text/html", html), 
                clipboardData.setData("text/plain", text), clipboardData.setData("x-tinymce/html", html), 
                1;
            } catch (e) {}
        }(evt.clipboardData, data.html, data.text) ? fallback(data.html, done) : (evt.preventDefault(), 
        done());
    }
    function fallback(editor) {
        return function(html, done) {
            var html = internalMark + html, outer = editor.dom.create("div", {
                contenteditable: "false",
                "data-mce-bogus": "all"
            }), html = editor.dom.create("div", {
                contenteditable: "true",
                "data-mce-bogus": "all"
            }, html), range = (editor.dom.setStyles(outer, {
                position: "fixed",
                left: "-3000px",
                width: "1000px",
                overflow: "hidden"
            }), outer.appendChild(html), editor.dom.add(editor.getBody(), outer), 
            editor.selection.getRng()), offscreenRange = (html.focus(), editor.dom.createRng());
            offscreenRange.selectNodeContents(html), editor.selection.setRng(offscreenRange), 
            setTimeout(function() {
                outer.parentNode.removeChild(outer), editor.selection.setRng(range), 
                done();
            }, 0);
        };
    }
    function getData(editor) {
        return {
            html: editor.selection.getContent({
                contextual: !0
            }),
            text: editor.selection.getContent({
                format: "text"
            })
        };
    }
    function hasSelectedContent(editor) {
        return !editor.selection.isCollapsed() || function(editor) {
            return !!editor.dom.getParent(editor.selection.getStart(), "td.mceSelected,th.mceSelected", editor.getBody());
        }(editor);
    }
    var DomParser$2 = tinymce.html.DomParser, Schema$1 = tinymce.html.Schema, each$6 = tinymce.each, DOM = tinymce.DOM, mceInternalUrlPrefix = "data:text/mce-internal,";
    function hasContentType(clipboardContent, mimeType) {
        return mimeType in clipboardContent && 0 < clipboardContent[mimeType].length;
    }
    function hasHtmlOrText(content) {
        return (hasContentType(content, "text/html") || hasContentType(content, "text/plain")) && !content.Files;
    }
    function getDataTransferItems(dataTransfer) {
        var legacyText, items = {};
        if (dataTransfer && (dataTransfer.getData && (legacyText = dataTransfer.getData("Text")) && 0 < legacyText.length && -1 === legacyText.indexOf(mceInternalUrlPrefix) && (items["text/plain"] = legacyText), 
        dataTransfer.types)) for (var i = 0; i < dataTransfer.types.length; i++) {
            var contentType = dataTransfer.types[i];
            try {
                items[contentType] = dataTransfer.getData(contentType);
            } catch (ex) {
                items[contentType] = "";
            }
        }
        return items;
    }
    function filter(content, items) {
        return tinymce.each(items, function(v) {
            content = v.constructor == RegExp ? content.replace(v, "") : content.replace(v[0], v[1]);
        }), content;
    }
    function innerText(html) {
        var schema = new Schema$1(), domParser = new DomParser$2({}, schema), text = "", shortEndedElements = schema.getShortEndedElements(), ignoreElements = tinymce.makeMap("script noscript style textarea video audio iframe object", " "), blockElements = schema.getBlockElements();
        return html = filter(html, [ /<!\[[^\]]+\]>/g ]), function walk(node) {
            var name = node.name, currentNode = node;
            if ("br" === name) text += "\n"; else if (shortEndedElements[name] && (text += " "), 
            ignoreElements[name]) text += " "; else {
                if (3 == node.type && (text += node.value), !node.shortEnded && (node = node.firstChild)) for (;walk(node), 
                node = node.next; );
                blockElements[name] && currentNode.next && (text += "\n", "p" == name) && (text += "\n");
            }
        }(domParser.parse(html)), text;
    }
    function trimHtml(html) {
        return filter(function(html) {
            if (-1 !== (startPos = html.indexOf("\x3c!--StartFragment--\x3e"))) {
                var startPos = html.substr(startPos + "\x3c!--StartFragment--\x3e".length), endPos = startPos.indexOf("\x3c!--EndFragment--\x3e");
                if (-1 !== endPos && /^<\/(p|h[1-6]|li)>/i.test(startPos.substr(endPos + "\x3c!--EndFragment--\x3e".length, 5))) return startPos.substr(0, endPos);
            }
            return html;
        }(html), [ /^[\s\S]*<body[^>]*>\s*|\s*<\/body[^>]*>[\s\S]*$/gi, /<!--StartFragment-->|<!--EndFragment-->/g, [ /( ?)<span class="Apple-converted-space">(\u00a0|&nbsp;)<\/span>( ?)/g, function(all, s1, s2) {
            return s1 || s2 ? "\xa0" : " ";
        } ], /<br class="Apple-interchange-newline">/g, /^<meta[^>]+>/g, /<br>$/i, /&nbsp;$/ ]);
    }
    var each$5 = tinymce.each;
    function convertToPixels(v) {
        if (-1 === v.indexOf("px")) {
            if (0 === parseInt(v, 10)) return 0;
            -1 !== v.indexOf("pt") && (v = parseInt(v, 10), v = Math.ceil(v / 1.33333), 
            v = Math.abs(v)), v && (v += "px");
        }
        return v;
    }
    var pixelStyles = [ "width", "height", "min-width", "max-width", "min-height", "max-height", "margin-top", "margin-right", "margin-bottom", "margin-left", "padding-top", "padding-right", "padding-bottom", "padding-left", "border-top-width", "border-right-width", "border-bottom-width", "border-left-width" ], styleProps = [ "background", "background-attachment", "background-color", "background-image", "background-position", "background-repeat", "border", "border-bottom", "border-bottom-color", "border-bottom-style", "border-bottom-width", "border-color", "border-left", "border-left-color", "border-left-style", "border-left-width", "border-right", "border-right-color", "border-right-style", "border-right-width", "border-style", "border-top", "border-top-color", "border-top-style", "border-top-width", "border-width", "outline", "outline-color", "outline-style", "outline-width", "height", "max-height", "max-width", "min-height", "min-width", "width", "font", "font-family", "font-size", "font-style", "font-variant", "font-weight", "content", "counter-increment", "counter-reset", "quotes", "list-style", "list-style-image", "list-style-position", "list-style-type", "margin", "margin-bottom", "margin-left", "margin-right", "margin-top", "padding", "padding-bottom", "padding-left", "padding-right", "padding-top", "bottom", "clear", "clip", "cursor", "display", "float", "left", "overflow", "position", "right", "top", "visibility", "z-index", "orphans", "page-break-after", "page-break-before", "page-break-inside", "widows", "border-collapse", "border-spacing", "caption-side", "empty-cells", "table-layout", "color", "direction", "letter-spacing", "line-height", "text-align", "text-decoration", "text-indent", "text-shadow", "text-transform", "unicode-bidi", "vertical-align", "white-space", "word-spacing" ], borderStyles = [ "border", "border-width", "border-style", "border-color", "border-top", "border-right", "border-bottom", "border-left", "border-top-width", "border-right-width", "border-bottom-width", "border-left-width", "border-top-color", "border-right-color", "border-bottom-color", "border-left-color", "border-top-style", "border-right-style", "border-bottom-style", "border-left-style" ], backgroundStyles = {
        "background-image": "none",
        "background-position": "0% 0%",
        "background-size": "auto auto",
        "background-repeat": "repeat",
        "background-origin": "padding-box",
        "background-clip": "border-box",
        "background-attachment": "scroll",
        "background-color": "transparent"
    }, fontStyles = [ "font", "font-family", "font-size", "font-style", "font-variant", "font-weight" ], namedColors = {
        "#F0F8FF": "AliceBlue",
        "#FAEBD7": "AntiqueWhite",
        "#7FFFD4": "Aquamarine",
        "#F0FFFF": "Azure",
        "#F5F5DC": "Beige",
        "#FFE4C4": "Bisque",
        "#000000": "Black",
        "#FFEBCD": "BlanchedAlmond",
        "#0000FF": "Blue",
        "#8A2BE2": "BlueViolet",
        "#A52A2A": "Brown",
        "#DEB887": "BurlyWood",
        "#5F9EA0": "CadetBlue",
        "#7FFF00": "Chartreuse",
        "#D2691E": "Chocolate",
        "#FF7F50": "Coral",
        "#6495ED": "CornflowerBlue",
        "#FFF8DC": "Cornsilk",
        "#DC143C": "Crimson",
        "#00008B": "DarkBlue",
        "#008B8B": "DarkCyan",
        "#B8860B": "DarkGoldenRod",
        "#A9A9A9": "DarkGray",
        "#006400": "DarkGreen",
        "#BDB76B": "DarkKhaki",
        "#8B008B": "DarkMagenta",
        "#556B2F": "DarkOliveGreen",
        "#FF8C00": "Darkorange",
        "#9932CC": "DarkOrchid",
        "#8B0000": "DarkRed",
        "#E9967A": "DarkSalmon",
        "#8FBC8F": "DarkSeaGreen",
        "#483D8B": "DarkSlateBlue",
        "#2F4F4F": "DarkSlateGrey",
        "#00CED1": "DarkTurquoise",
        "#9400D3": "DarkViolet",
        "#FF1493": "DeepPink",
        "#00BFFF": "DeepSkyBlue",
        "#696969": "DimGrey",
        "#1E90FF": "DodgerBlue",
        "#B22222": "FireBrick",
        "#FFFAF0": "FloralWhite",
        "#228B22": "ForestGreen",
        "#DCDCDC": "Gainsboro",
        "#F8F8FF": "GhostWhite",
        "#FFD700": "Gold",
        "#DAA520": "GoldenRod",
        "#808080": "Grey",
        "#008000": "Green",
        "#ADFF2F": "GreenYellow",
        "#F0FFF0": "HoneyDew",
        "#FF69B4": "HotPink",
        "#CD5C5C": "IndianRed",
        "#4B0082": "Indigo",
        "#FFFFF0": "Ivory",
        "#F0E68C": "Khaki",
        "#E6E6FA": "Lavender",
        "#FFF0F5": "LavenderBlush",
        "#7CFC00": "LawnGreen",
        "#FFFACD": "LemonChiffon",
        "#ADD8E6": "LightBlue",
        "#F08080": "LightCoral",
        "#E0FFFF": "LightCyan",
        "#FAFAD2": "LightGoldenRodYellow",
        "#D3D3D3": "LightGrey",
        "#90EE90": "LightGreen",
        "#FFB6C1": "LightPink",
        "#FFA07A": "LightSalmon",
        "#20B2AA": "LightSeaGreen",
        "#87CEFA": "LightSkyBlue",
        "#778899": "LightSlateGrey",
        "#B0C4DE": "LightSteelBlue",
        "#FFFFE0": "LightYellow",
        "#00FF00": "Lime",
        "#32CD32": "LimeGreen",
        "#FAF0E6": "Linen",
        "#FF00FF": "Magenta",
        "#800000": "Maroon",
        "#66CDAA": "MediumAquaMarine",
        "#0000CD": "MediumBlue",
        "#BA55D3": "MediumOrchid",
        "#9370D8": "MediumPurple",
        "#3CB371": "MediumSeaGreen",
        "#7B68EE": "MediumSlateBlue",
        "#00FA9A": "MediumSpringGreen",
        "#48D1CC": "MediumTurquoise",
        "#C71585": "MediumVioletRed",
        "#191970": "MidnightBlue",
        "#F5FFFA": "MintCream",
        "#FFE4E1": "MistyRose",
        "#FFE4B5": "Moccasin",
        "#FFDEAD": "NavajoWhite",
        "#000080": "Navy",
        "#FDF5E6": "OldLace",
        "#808000": "Olive",
        "#6B8E23": "OliveDrab",
        "#FFA500": "Orange",
        "#FF4500": "OrangeRed",
        "#DA70D6": "Orchid",
        "#EEE8AA": "PaleGoldenRod",
        "#98FB98": "PaleGreen",
        "#AFEEEE": "PaleTurquoise",
        "#D87093": "PaleVioletRed",
        "#FFEFD5": "PapayaWhip",
        "#FFDAB9": "PeachPuff",
        "#CD853F": "Peru",
        "#FFC0CB": "Pink",
        "#DDA0DD": "Plum",
        "#B0E0E6": "PowderBlue",
        "#800080": "Purple",
        "#FF0000": "Red",
        "#BC8F8F": "RosyBrown",
        "#4169E1": "RoyalBlue",
        "#8B4513": "SaddleBrown",
        "#FA8072": "Salmon",
        "#F4A460": "SandyBrown",
        "#2E8B57": "SeaGreen",
        "#FFF5EE": "SeaShell",
        "#A0522D": "Sienna",
        "#C0C0C0": "Silver",
        "#87CEEB": "SkyBlue",
        "#6A5ACD": "SlateBlue",
        "#708090": "SlateGrey",
        "#FFFAFA": "Snow",
        "#00FF7F": "SpringGreen",
        "#4682B4": "SteelBlue",
        "#D2B48C": "Tan",
        "#008080": "Teal",
        "#D8BFD8": "Thistle",
        "#FF6347": "Tomato",
        "#40E0D0": "Turquoise",
        "#EE82EE": "Violet",
        "#F5DEB3": "Wheat",
        "#FFFFFF": "White",
        "#F5F5F5": "WhiteSmoke",
        "#FFFF00": "Yellow",
        "#9ACD32": "YellowGreen"
    };
    function namedColorToHex(value) {
        return tinymce.each(namedColors, function(name, hex) {
            if (value.toLowerCase() === name.toLowerCase()) return value = hex, 
            !1;
        }), value.toLowerCase();
    }
    var each$4 = tinymce.each, Schema = tinymce.html.Schema, DomParser$1 = tinymce.html.DomParser, Serializer$1 = tinymce.html.Serializer, Node$1 = tinymce.html.Node;
    var each$3 = tinymce.each, isIE$1 = tinymce.isIE || tinymce.isIE12;
    function setup$2(editor) {
        editor.onPastePreProcess.add(function(editor, o) {
            !function(editor, o) {
                var h = (h = (h = o.content).replace(/^\s*(&nbsp;)+/g, "")).replace(/(&nbsp;|<br[^>]*>)+\s*$/g, "");
                o.pasteAsPlainText || (o.wordContent && (h = function(editor, content) {
                    var removeProps, settings = editor.settings, validStyles = {}, styleProps$1 = styleProps, keepStyles = (content = filter(content = (content = (content = (content = (content = content.replace(/<meta([^>]+)>/, "")).replace(/<style([^>]*)>([\w\W]*?)<\/style>/gi, function(match, attr, value) {
                        var classes = [], value = parseCssToRules(value);
                        return each$4(value, function(r) {
                            r.selectorText && each$4(r.selectorText.split(","), function(v) {
                                v = v.replace(/^\s*|\s*$|^\s\./g, ""), !/\.mso/i.test(v) && /\.[\w\-]+$/.test(v) && (v = r.cssText || "") && -1 === tinymce.inArray(classes, v) && classes.push(v);
                            });
                        }), "<style" + attr + ">" + classes.join("") + "</style>";
                    })).replace(/Version:[\d.]+\nStartHTML:\d+\nEndHTML:\d+\nStartFragment:\d+\nEndFragment:\d+/gi, "")).replace(/<b[^>]+id="?docs-internal-[^>]*>/gi, "")).replace(/<br class="?Apple-interchange-newline"?>/gi, ""), [ /<!--[\s\S]+?-->/gi, /<(!|script[^>]*>.*?<\/script(?=[>\s])|\/?(\?xml(:\w+)?|meta|link|\w:\w+)(?=[\s\/>]))[^>]*>/gi, [ /<(\/?)s>/gi, "<$1strike>" ], [ /&nbsp;/gi, "\xa0" ], [ /<span\s+style\s*=\s*"\s*mso-spacerun\s*:\s*yes\s*;?\s*"\s*>([\s\u00a0]*)<\/span>/gi, function(str, spaces) {
                        return 0 < spaces.length ? spaces.replace(/./, " ").slice(Math.floor(spaces.length / 2)).split("").join("\xa0") : "";
                    } ] ]), settings.inline_styles && (content = (content = content.replace(/<(u|strike)>/gi, function(match, node) {
                        return '<span style="text-decoration:' + ("u" === node ? "underline" : "line-through") + ';">';
                    })).replace(/<\/(u|strike)>/g, "</span>")), settings.forced_root_block && (content = content.replace(/<br><br>/gi, "")), 
                    keepStyles = settings.paste_retain_style_properties, removeStyles = settings.paste_remove_style_properties, 
                    !1 !== settings.paste_remove_styles ? (validStyles = {
                        "font-weight": {},
                        "font-style": {}
                    }, keepStyles && tinymce.is(keepStyles, "string") && (styleProps$1 = tinymce.explode(keepStyles), 
                    each$4(styleProps$1, function(style, i) {
                        if ("border" === style) return styleProps$1 = styleProps$1.concat(borderStyles), 
                        !0;
                    }))) : removeStyles && tinymce.is(removeStyles, "string") && (removeProps = tinymce.explode(removeStyles), 
                    each$4(removeProps, function(style, i) {
                        if ("border" === style) return removeProps = removeProps.concat(borderStyles), 
                        !0;
                    }), styleProps$1 = tinymce.grep(styleProps$1, function(prop) {
                        return -1 === tinymce.inArray(removeProps, prop);
                    })), each$4(styleProps$1, function(style) {
                        if ("border" === style) return each$4(borderStyles, function(name) {
                            validStyles[name] = {};
                        }), !0;
                        validStyles[style] = {};
                    }), settings.paste_word_valid_elements || "-strong/b,-em/i,-u,-span,-p,-ol[type|start|reversed],-ul,-li,-h1,-h2,-h3,-h4,-h5,-h6,-p/div,-a[href|name],img[src|alt|width|height],sub,sup,strike,br,del,table[width],tr,td[colspan|rowspan|width|valign],th[colspan|rowspan|width],thead,tfoot,tbody"), removeStyles = ("style" == settings.paste_process_stylesheets && (keepStyles += ",style"), 
                    new Schema({
                        valid_elements: keepStyles,
                        valid_children: "-li[p]"
                    })), footnotes = ("html5" !== settings.schema && removeStyles.getElementRule("table") && removeStyles.addValidElements("table[width|border|cellpadding|cellspacing]"), 
                    each$4(removeStyles.elements, function(rule) {
                        rule.attributes.class || (rule.attributes.class = {}, rule.attributesOrder.push("class")), 
                        rule.attributes.style || (rule.attributes.style = {}, rule.attributesOrder.push("style"));
                    }), (keepStyles = new DomParser$1({}, removeStyles)).addAttributeFilter("style", function(nodes) {
                        for (var node, style, i = nodes.length; i--; ) (style = (node = nodes[i]).attr("style")) && -1 !== style.indexOf("mso-list") && "li" !== node.name && node.attr("data-mce-word-list", 1), 
                        node.attr("style", function(node, styleValue) {
                            var matches, outputStyles = {}, styles = editor.dom.parseStyle(styleValue);
                            return each$4(styles, function(value, name) {
                                switch (name) {
                                  case "mso-list":
                                    (matches = /\w+ \w+([0-9]+)/i.exec(styleValue)) && (node._listLevel = parseInt(matches[1], 10)), 
                                    /Ignore/i.test(value) && node.firstChild && (node._listIgnore = !0, 
                                    node.firstChild._listIgnore = !0);
                                    break;

                                  case "horiz-align":
                                    name = "text-align";
                                    break;

                                  case "vert-align":
                                    name = "vertical-align";
                                    break;

                                  case "font-color":
                                  case "mso-foreground":
                                  case "color":
                                    name = "color", "windowtext" == value && (value = "");
                                    break;

                                  case "mso-background":
                                  case "mso-highlight":
                                    name = "background";
                                    break;

                                  case "font-weight":
                                  case "font-style":
                                    "normal" == value && (value = "");
                                    break;

                                  case "mso-element":
                                    if (/^(comment|comment-list)$/i.test(value)) return void node.remove();
                                    break;

                                  case "margin-left":
                                    var indentValue;
                                    "p" === node.name && !1 !== settings.paste_convert_indents && (indentValue = parseInt(editor.settings.indentation, 10), 
                                    value = parseInt(value, 10), value = Math.round(value / indentValue) * indentValue) && (node.attr("data-mce-indent", "" + value), 
                                    value = "");
                                }
                                return 0 === name.indexOf("mso-comment") ? (node.remove(), 
                                !0) : 0 === name.indexOf("mso-") || (value && -1 !== tinymce.inArray(pixelStyles, name) && (value = convertToPixels(value)), 
                                void (validStyles[name] && (outputStyles[name] = value)));
                            }), /(bold|700|800|900)/i.test(outputStyles["font-weight"]) && editor.schema.isValidChild("strong", node.name) && (delete outputStyles["font-weight"], 
                            node.wrap(new Node$1("strong", 1))), /(italic)/i.test(outputStyles["font-style"]) && editor.schema.isValidChild("em", node.name) && (delete outputStyles["font-style"], 
                            node.wrap(new Node$1("em", 1))), (outputStyles = editor.dom.serializeStyle(outputStyles, node.name)) || null;
                        }(node, style)), "span" == node.name && node.parent && !node.attributes.length && node.unwrap();
                    }), keepStyles.addAttributeFilter("class", function(nodes) {
                        for (var node, i = nodes.length; i--; ) {
                            var parent, className = (node = nodes[i]).attr("class");
                            /^(MsoCommentReference|MsoCommentText|msoDel)$/i.test(className) ? node.remove() : (/^Mso[\w]+/i.test(className) || 0 !== settings.paste_strip_class_attributes) && (node.attr("class", null), 
                            className && -1 !== className.indexOf("MsoList") && "li" !== node.name && node.attr("data-mce-word-list", 1), 
                            className && /\s*Mso(Foot|End)note\s*/.test(className) && ((parent = node.parent) && "a" === parent.name && (node.name = "sup"), 
                            "span" !== node.name || node.attributes.length || node.unwrap()), 
                            className) && /\s*MsoQuote\s*/.test(className) && (node.name = "blockquote");
                        }
                    }), keepStyles.addNodeFilter("del", function(nodes) {
                        for (var i = nodes.length; i--; ) nodes[i].remove();
                    }), settings.paste_process_footnotes || "convert"), keepStyles = (keepStyles.addNodeFilter("a", function(nodes) {
                        for (var node, href, name, i = nodes.length; i--; ) href = (node = nodes[i]).attr("href"), 
                        name = node.attr("name"), href && -1 != href.indexOf("#_msocom_") ? node.remove() : !(href = (href = href && !name ? editor.convertURL(href) : href) && 0 == href.indexOf("#") ? href.substr(href.indexOf("#")) : href) && !name || name && !/^_?(?:toc|edn|ftn)/i.test(name) ? node.unwrap() : name && "remove" === footnotes ? node.remove() : name && "unlink" === footnotes ? node.unwrap() : (node.attr({
                            href: href,
                            name: null
                        }), "html4" === settings.schema ? node.attr("name", name) : node.attr("id", name));
                    }), keepStyles.addNodeFilter("span", function(nodes) {
                        for (var node, i = nodes.length; i--; ) (node = nodes[i]).parent && !node.attributes.length && node.unwrap();
                    }), settings.paste_remove_paragraph_in_table_cell && keepStyles.addNodeFilter("td", function(nodes) {
                        for (var node, i = nodes.length; i--; ) (node = nodes[i]).firstChild && "p" == node.firstChild.name && node.firstChild === node.lastChild && node.firstChild.unwrap();
                    }), keepStyles.parse(content));
                    if (!1 !== settings.paste_convert_word_fake_lists) {
                        var currentListNode, prevListNode, node = keepStyles, lastLevel = 1;
                        function trimListStart(node, regExp) {
                            if (3 !== node.type || !regExp.test(node.value)) {
                                if (node = node.firstChild) do {
                                    if (!trimListStart(node, regExp)) return;
                                } while (node = node.next);
                                return 1;
                            }
                            node.value = node.value.replace(regExp, "");
                        }
                        function convertParagraphToLi(paragraphNode, listName, start, type) {
                            var level = paragraphNode._listLevel || lastLevel;
                            (currentListNode = level != lastLevel ? level < lastLevel ? currentListNode && currentListNode.parent.parent : (prevListNode = currentListNode, 
                            null) : currentListNode) && currentListNode.name == listName ? currentListNode.append(paragraphNode) : (prevListNode = prevListNode || currentListNode, 
                            currentListNode = new Node$1(listName, 1), type && /roman|alpha/.test(type) && currentListNode.attr({
                                style: listName = "list-style-type:" + type,
                                "data-mce-style": listName
                            }), 1 < start && currentListNode.attr("start", "" + start), 
                            paragraphNode.wrap(currentListNode)), paragraphNode.name = "li", 
                            lastLevel < level && prevListNode && prevListNode.lastChild.append(currentListNode), 
                            lastLevel = level, function removeIgnoredNodes(node) {
                                if (node._listIgnore) node.remove(); else if (node = node.firstChild) for (;removeIgnoredNodes(node), 
                                node = node.next; );
                            }(paragraphNode), trimListStart(paragraphNode, /^\u00a0+/), 
                            "ol" === currentListNode.name && trimListStart(paragraphNode, /^\s*([\u2022\u00b7\u00a7\u25CF]|\w+\.)/), 
                            "ul" === currentListNode.name && trimListStart(paragraphNode, /^\s*([\u2022\u00b7\u00a7\u25CF]|\w+\.)/), 
                            trimListStart(paragraphNode, /^\u00a0+/);
                        }
                        for (var elements = [], child = node.firstChild; null != child; ) if (elements.push(child), 
                        null !== (child = child.walk())) for (;void 0 !== child && child.parent !== node; ) child = child.walk();
                        for (var type, nodeText, i = 0; i < elements.length; i++) "p" == (node = elements[i]).name && node.firstChild ? (nodeText = function getText(node) {
                            var txt = "";
                            if (3 === node.type) return node.value;
                            if (node = node.firstChild) for (;txt += getText(node), 
                            node = node.next; );
                            return txt;
                        }(node), /^[\s\u00a0]*[\u2022\u00b7\u00a7\u25CF]\s*/.test(nodeText) ? convertParagraphToLi(node, "ul") : node.attr("data-mce-word-list") && (node.attr("data-mce-word-list", null), 
                        type = function(text) {
                            var found = "";
                            return text = nodeText.replace(/^[\u00a0 ]+/, ""), each$4({
                                "uppper-roman": /^[IVXLMCD]{1,2}\.[ \u00a0]/,
                                "lower-roman": /^[ivxlmcd]{1,2}\.[ \u00a0]/,
                                "upper-alpha": /^[A-Z]{1,2}[\.\)][ \u00a0]/,
                                "lower-alpha": /^[a-z]{1,2}[\.\)][ \u00a0]/,
                                numeric: /^[0-9]+\.[ \u00a0]/,
                                japanese: /^[\u3007\u4e00\u4e8c\u4e09\u56db\u4e94\u516d\u4e03\u516b\u4e5d]+\.[ \u00a0]/,
                                chinese: /^[\u58f1\u5f10\u53c2\u56db\u4f0d\u516d\u4e03\u516b\u4e5d\u62fe]+\.[ \u00a0]/
                            }, function(pattern, type) {
                                if (pattern.test(text)) return found = type, !1;
                            }), found;
                        }(nodeText)) ? convertParagraphToLi(node, "ol", (nodeText = /([0-9]+)\./.exec(nodeText)) ? parseInt(nodeText[1], 10) : 1, type) : node._listLevel ? convertParagraphToLi(node, "ul", 1) : currentListNode = null) : (prevListNode = currentListNode, 
                        currentListNode = null);
                    }
                    return new Serializer$1({
                        validate: settings.validate
                    }, removeStyles).serialize(keepStyles);
                }(editor, h)), !1 === editor.settings.verify_html && (h = (h = h.replace(/<b\b([^>]*)>/gi, "<strong$1>")).replace(/<\/b>/gi, "</strong>")), 
                o.content = h);
            }(editor, o);
        }), editor.onPastePostProcess.add(function(editor, o) {
            !function(editor, o) {
                var tags, dom = editor.dom, settings = editor.settings;
                if (dom.remove(dom.select("div[data-mce-convert]", o.node), 1), 
                !o.pasteAsPlainText && (each$3(dom.select("span.Apple-style-span", o.node), function(n) {
                    dom.remove(n, 1);
                }), 1 == settings.paste_strip_class_attributes && each$3(dom.select("*[class]", o.node), function(el) {
                    el.removeAttribute("class");
                }), each$3(dom.select("table, td, th", o.node), function(n) {
                    var width = dom.getAttrib(n, "width");
                    width && (dom.setStyle(n, "width", width), dom.setAttrib(n, "width", "")), 
                    (width = dom.getAttrib(n, "height")) && (dom.setStyle(n, "height", width), 
                    dom.setAttrib(n, "height", ""));
                }), !1 === settings.paste_remove_styles || settings.paste_retain_style_properties ? function(editor, node) {
                    var removeProps, dom = editor.dom, editor = editor.settings, styleProps$1 = styleProps, keepStyles = editor.paste_retain_style_properties, editor = editor.paste_remove_style_properties;
                    keepStyles && tinymce.is(keepStyles, "string") && (styleProps$1 = tinymce.explode(keepStyles), 
                    each$3(styleProps$1, function(style, i) {
                        return "border" == style ? (styleProps$1 = styleProps$1.concat(borderStyles), 
                        !0) : "font" == style ? (styleProps$1 = styleProps$1.concat(fontStyles), 
                        !0) : "padding" == style || "margin" == style ? (each$3([ "top", "bottom", "right", "left" ], function(side) {
                            styleProps$1.push(style + "-" + side);
                        }), !0) : void 0;
                    })), editor && tinymce.is(editor, "string") && (removeProps = tinymce.explode(editor), 
                    each$3(removeProps, function(style, i) {
                        return "border" === style ? (removeProps = removeProps.concat(borderStyles), 
                        !0) : "font" == style ? (removeProps = removeProps.concat(fontStyles), 
                        !0) : "padding" == style || "margin" == style ? (each$3([ "top", "bottom", "right", "left" ], function(side) {
                            removeProps.push(style + "-" + side);
                        }), !0) : void 0;
                    }), styleProps$1 = tinymce.grep(styleProps$1, function(prop) {
                        return -1 === tinymce.inArray(removeProps, prop);
                    })), each$3(dom.select("*[style]", node), function(n) {
                        var ns = {}, x = 0, styles = dom.parseStyle(n.style.cssText);
                        each$3(styles, function(v, k) {
                            -1 != tinymce.inArray(styleProps$1, k) && (ns[k] = v, 
                            x++);
                        }), dom.setAttrib(n, "style", ""), ns = dom.parseStyle(dom.serializeStyle(ns, n.nodeName)), 
                        0 < x ? dom.setStyles(n, ns) : "SPAN" != n.nodeName || n.className || dom.remove(n, !0), 
                        tinymce.isWebKit && n.removeAttribute("data-mce-style");
                    }), each$3(dom.select("*[align]", node), function(el) {
                        var v = dom.getAttrib(el, "align");
                        "left" !== v && "right" !== v && "center" !== v || (/(IFRAME|IMG|OBJECT|VIDEO|AUDIO|EMBED)/i.test(el.nodeName) ? "center" === v ? dom.setStyles(el, {
                            margin: "auto",
                            display: "block"
                        }) : dom.setStyle(el, "float", v) : dom.setStyle(el, "text-align", v)), 
                        el.removeAttribute("align");
                    });
                }(editor, o.node) : each$3(dom.select("*[style]", o.node), function(el) {
                    el.removeAttribute("style"), el.removeAttribute("data-mce-style");
                }), o.wordContent && function(editor, node) {
                    var dom = editor.dom, borderColors = [ "border-top-color", "border-right-color", "border-bottom-color", "border-left-color" ], positions = [ "top", "right", "bottom", "left" ];
                    each$4(dom.select("table[style], td[style], th[style]", node), function(n) {
                        var styles = {};
                        each$4(borderStyles, function(name) {
                            var value;
                            /-(top|right|bottom|left)-/.test(name) && (value = dom.getStyle(n, name), 
                            -1 !== name.indexOf("color") && ("currentcolor" !== value && "windowtext" !== value || each$4(borderColors, function(str) {
                                return str === name || (str = dom.getStyle(n, str), 
                                !!/(currentcolor|windowtext)/.test(str)) || void (value = str);
                            }), value = namedColorToHex(value)), "medium" === value && (value = "1"), 
                            (value = -1 !== name.indexOf("style") && "none" === value ? "solid" : value) && /^\d[a-z]?/.test(value) && (value = convertToPixels(value)), 
                            styles[name] = value);
                        }), each$4(positions, function(pos) {
                            var padding = dom.getStyle(n, "padding-" + pos), margin = dom.getStyle(n, "margin-" + pos);
                            padding && (styles["padding-" + pos] = convertToPixels(padding)), 
                            margin && (styles["margin-" + pos] = convertToPixels(margin));
                        }), each$4(styles, function(value, name) {
                            var prefix;
                            -1 !== name.indexOf("-width") && "" === value && (prefix = name.replace(/-width/, ""), 
                            delete styles[prefix + "-style"], delete styles[prefix + "-color"], 
                            delete styles[name]), -1 !== name.indexOf("color") && (styles[name] = namedColorToHex(value));
                        }), each$4(backgroundStyles, function(def, name) {
                            var value = dom.getStyle(n, name);
                            styles[name] = value === def ? "" : value;
                        }), dom.setStyle(n, "border", ""), dom.setStyle(n, "background", ""), 
                        dom.setStyles(n, styles);
                    }), each$4(dom.select("[data-mce-indent]", node), function(el) {
                        var value, style;
                        "p" === el.nodeName && (value = dom.getAttrib(el, "data-mce-indent"), 
                        style = editor.settings.indent_use_margin ? "margin-left" : "padding-left", 
                        dom.setStyle(el, style, value + "px")), dom.setAttrib(el, "data-mce-indent", "");
                    }), each$4(dom.select("[data-mce-word-list]", node), function(el) {
                        el.removeAttribute("data-mce-word-list");
                    });
                }(editor, o.node), each$3(dom.select("img", o.node), function(el) {
                    var src = dom.getAttrib(el, "src");
                    !src || /^(file:|data:image)\//i.test(src) ? settings.paste_upload_data_images ? dom.setAttrib(el, "data-mce-upload-marker", "1") : dom.remove(el) : dom.setAttrib(el, "src", editor.convertURL(src));
                }), isIE$1 && each$3(dom.select("a", o.node), function(el) {
                    each$3(dom.select("font,u"), function(n) {
                        dom.remove(n, 1);
                    });
                }), settings.paste_remove_tags && dom.remove(dom.select(settings.paste_remove_tags, o.node), 1), 
                settings.paste_keep_tags && (tags = settings.paste_keep_tags, dom.remove(dom.select("*:not(" + tags + ")", o.node), 1)), 
                settings.paste_remove_spans ? dom.remove(dom.select("span", o.node), 1) : each$3(dom.select("span", o.node), function(n) {
                    0 === dom.getAttribs(n).length && dom.remove(n, n.hasChildNodes() ? 1 : 0);
                }), !1 !== settings.paste_remove_empty_paragraphs)) for (var p, paras = dom.select("p", o.node), i = paras.length - 1; 0 <= i; i--) (p = paras[i]).hasChildNodes() && "" !== (p.textContent || "").replace(/\u00a0/g, " ").replace(/[\u200B\u200C\u200D\uFEFF]/g, "").replace(/\s+/g, "") || dom.remove(p);
            }(editor, o);
        });
    }
    var Entities = tinymce.html.Entities, isPlainText = function(text) {
        return !/<(?:(?!\/?(?:\w+))[^>]*|(?:\w+)\s+\w[^>]+)>/.test(text);
    }, convert = function(text, rootTag, rootAttrs) {
        return rootTag ? function(text, rootTag, rootAttrs) {
            var isLast, newlineFollows, isSingleNewline, pieces = text.split(/\r?\n/), i = 0, len = pieces.length, stack = [], blocks = [], rootAttrs = function(rootTag, rootAttrs) {
                var key, attrs = [], rootTag = "<" + rootTag;
                if ("object" == typeof rootAttrs) {
                    for (key in rootAttrs) Object.prototype.hasOwnProperty.call(rootAttrs, key) && attrs.push(key + '="' + Entities.encodeAllRaw(rootAttrs[key]) + '"');
                    attrs.length && (rootTag += " " + attrs.join(" "));
                }
                return rootTag + ">";
            }(rootTag, rootAttrs), rootTag = "</" + rootTag + ">";
            if (1 === pieces.length) return text;
            for (;i < len; i++) newlineFollows = !(isLast = i === len - 1) && !pieces[i + 1], 
            isSingleNewline = !pieces[i] && !stack.length, stack.push(pieces[i] || "&nbsp;"), 
            (isLast || newlineFollows || isSingleNewline) && (blocks.push(stack.join("<br>")), 
            stack = []), newlineFollows && i++;
            return 1 === blocks.length ? blocks[0] : rootAttrs + blocks.join(rootTag + rootAttrs) + rootTag;
        }(text, rootTag, rootAttrs) : text.replace(/\r?\n/g, "<br>");
    }, each$2 = tinymce.each, VK = tinymce.VK, DomParser = tinymce.html.DomParser, Serializer = tinymce.html.Serializer, BlobCache = tinymce.file.BlobCache, Env = tinymce.util.Env, isIE = tinymce.isIE || tinymce.isIE12;
    function isKeyboardPasteEvent(e) {
        return VK.metaKeyPressed(e) && 86 == e.keyCode || e.shiftKey && 45 == e.keyCode;
    }
    function pasteText(editor, text) {
        text = editor.dom.encode(text).replace(/\r\n/g, "\n"), pasteHtml(editor, text = convert(text, editor.settings.forced_root_block, editor.settings.forced_root_block_attrs));
    }
    function pasteHtml(editor, content, internal, pasteAsPlainText) {
        var o, re;
        content && (o = {
            content: content,
            internal: internal,
            pasteAsPlainText: pasteAsPlainText
        }, internal || !1 === editor.settings.paste_enable_default_filters || (o.wordContent = function(editor, content) {
            if (editor.settings.paste_force_cleanup) return !0;
            for (var j, groups = [ {
                name: "pages",
                tests: [ /<meta\s+content="Cocoa HTML Writer"/i, /<meta\s+name="CocoaVersion"/i ]
            }, {
                name: "openoffice",
                tests: [ /<meta\s+content="OpenOffice\.org[^"]*"/i, /Version:\d+(?:\.\d+)*[\s\S]*?StartHTML:\d+[\s\S]*?EndFragment:\d+/, /@page\s*\{/i, /<meta\s+name="generator"\s+content="LibreOffice\s+\d+(?:\.\d+)+(?:\s*\([^"]+\))?"/i ]
            }, {
                name: "word",
                tests: [ /<font\s+face="Times New Roman"|class="?Mso|style="[^"]*\bmso-|style='[^']*\bmso-|w:WordDocument|Excel\.Sheet|Microsoft Excel\s\d+/i, /xmlns:o=["']urn:schemas-microsoft-com:office:office["']/i, /xmlns:x=["']urn:schemas-microsoft-com:office:(?:word|excel)["']/i ]
            }, {
                name: "googledocs",
                tests: [ /class="OutlineElement/i, /id="?docs-internal-guid-/i ]
            }, {
                name: "protondocs",
                tests: [ /class=(?:"[^"]*\bLexical__\w+\b[^"]*"|'[^']*\bLexical__\w+\b[^']*')/i ]
            } ], i = 0; i < groups.length; i++) for (j = 0; j < groups[i].tests.length; j++) if (groups[i].tests[j].test(content)) return groups[i].name;
            return !1;
        }(editor, o.content), editor.settings.paste_process_stylesheets && (o.content = function(content) {
            var div = DOM.create("div", {}, content), styles = {}, styles = tinymce.extend(styles, function(content) {
                var classes = {};
                return content = parseCssToRules(content), each$6(content, function(r) {
                    var styles;
                    r.selectorText && (styles = {}, each$6(r.style, function(name) {
                        var value = r.style.getPropertyValue(name);
                        "" !== value && "normal" !== value && "inherit" !== value && "none" !== value && "initial" !== value && (styles[name] = value);
                    }), each$6(r.selectorText.split(","), function(selector) {
                        0 != (selector = selector.trim()).indexOf(".mce") && -1 === selector.indexOf(".mce-") && -1 === selector.indexOf(".mso-") && Object.values(styles).length && (classes[selector] = {
                            styles: styles,
                            text: r.cssText
                        });
                    }));
                }), classes;
            }(content));
            return each$6(styles, function(value, selector) {
                return -1 !== selector.indexOf("Mso") || -1 !== selector.indexOf(":") || 0 === selector.indexOf("@") || void DOM.setStyles(DOM.select(selector, div), value.styles);
            }), div.innerHTML;
        }(o.content)), o.content = trimHtml(o.content), editor.onPastePreProcess.dispatch(editor, o), 
        o.content = function(editor, html) {
            var parser = new DomParser({
                allow_event_attributes: !!editor.settings.paste_allow_event_attributes
            }, editor.schema), remove_attribs = (parser.addNodeFilter("meta,svg,script,noscript", function(nodes) {
                for (var i = nodes.length; i--; ) nodes[i].remove();
            }), editor.settings.paste_remove_spans && parser.addNodeFilter("span", function(nodes, name) {
                for (var i = nodes.length; i--; ) nodes[i].unwrap();
            }), (remove_attribs = editor.settings.paste_remove_attributes) && parser.addAttributeFilter(remove_attribs, function(nodes, name) {
                for (var i = nodes.length; i--; ) nodes[i].attr(name, null);
            }), parser.parse(html, {
                forced_root_block: !1,
                isRootContent: !0
            }));
            return new Serializer({
                validate: editor.settings.validate
            }, editor.schema).serialize(remove_attribs);
        }(editor, o.content), !1 !== editor.settings.paste_convert_urls && (o.content = function(editor, content) {
            var ex = "([-!#$%&'*+\\./0-9=?A-Z^_`a-z{|}~]+@[-!#$%&'*+\\/0-9=?A-Z^_`a-z{|}~]+.[-!#$%&'*+\\./0-9=?A-Z^_`a-z{|}~]+)", ux = "((?:news|telnet|nttp|file|http|ftp|https)://[-!#$%&'*+\\/0-9=?A-Z^_`a-z{|}~;]+.[-!#$%&@'*+\\./0-9=?A-Z^_`a-z{|}~;]+)";
            function createLink(url) {
                var attribs = {
                    href: editor.dom.decode(url)
                }, params = editor.settings.link || {}, attribs = tinymce.extend(attribs, params.attributes || {});
                return editor.dom.createHTML("a", attribs, url);
            }
            var decoded = editor.dom.decode(content);
            if (!/^<img src="(data|blob):[^>]+?>/.test(content) && !/^<a([^>]+)>([\s\S]+?)<\/a>$/.test(decoded)) {
                if ((decoded = !1) !== editor.settings.autolink_url) {
                    if (new RegExp("^" + ux + "$").test(content)) return createLink(content);
                    content = content.replace(new RegExp("((?:[a-zA-Z0-9_-]+=[\"'])|(?:}|].?))?" + ux, "gi"), function(match, extra, url) {
                        return extra ? match : createLink(url);
                    }), decoded = !0;
                }
                if (!1 !== editor.settings.autolink_email) {
                    if (new RegExp("^" + ex + "$").test(content)) return '<a href="mailto:' + content + '">' + content + "</a>";
                    content = content.replace(new RegExp('(href="[^"]+?)?(' + ex + ")", "g"), function(match, attrib, email) {
                        return attrib || !email || email.includes("//") ? match : '<a href="mailto:' + email + '">' + email + "</a>";
                    }), decoded = !0;
                }
                decoded && (content = function(content) {
                    return -1 === content.indexOf('data-mce-convert="url"') ? '<div data-mce-convert="url">' + content + "</div>" : content;
                }(content));
            }
            return content;
        }(editor, o.content)), o.node = editor.dom.create("div", {
            style: "display:none"
        }, o.content), editor.onPastePostProcess.dispatch(editor, o), o.content = o.node.innerHTML, 
        !1 !== editor.settings.paste_remove_empty_paragraphs && (o.content = o.content.replace(/<p([^>]+)>(&nbsp;|\u00a0)?<\/p>/g, "")), 
        editor.settings.paste_remove_whitespace && (o.content = o.content.replace(/(&nbsp;|\u00a0|\s| ){2,}/g, " ")), 
        editor.settings.paste_filter && (content = editor.settings.paste_filter.split(";"), 
        each$2(content, function(s) {
            re = /^\/.*\/(g|i|m)*$/.test(s) ? new Function("return " + s)() : new RegExp(s), 
            o.content = o.content.replace(re, "");
        }))), editor.onPasteBeforeInsert.dispatch(editor, o), o.terminate || function(editor, content) {
            var validate = editor.settings.validate;
            editor.settings.validate = !0, editor.execCommand("mceInsertContent", !1, content), 
            editor.settings.validate = validate;
        }(editor, o.content));
    }
    function insertClipboardContent(editor, clipboardContent, internal, pasteAsPlainText) {
        var content, text;
        editor.onGetClipboardContent.dispatch(editor, clipboardContent, pasteAsPlainText), 
        content = clipboardContent["x-tinymce/html"] || clipboardContent["text/html"], 
        internal = internal || isMarked(content), content = unmark(content), function(editor) {
            var node = editor.selection.getNode();
            return !1 !== editor.settings.html_paste_in_pre && node && "PRE" === node.nodeName;
        }(editor) ? (text = clipboardContent["text/plain"], text = editor.dom.encode(text), 
        content && !text && (content = trimHtml(content), text = editor.dom.encode(content)), 
        editor.selection.setContent(text, {
            no_events: !0
        })) : (text = !1 === internal && isPlainText(content), (pasteAsPlainText = !(content.length && !text) || pasteAsPlainText) ? pasteText(editor, content = hasContentType(clipboardContent, "text/plain") && text ? clipboardContent["text/plain"] : innerText(content)) : pasteHtml(editor, content, internal, pasteAsPlainText));
    }
    function isBrokenAndroidClipboardEvent(e) {
        return e = e.clipboardData, -1 !== navigator.userAgent.indexOf("Android") && e && e.items && 0 === e.items.length;
    }
    function isHtmlPaste(content) {
        return hasContentType(content, "text/html");
    }
    function pasteImageData(editor, e, lastRng) {
        var dataTransfer = e.clipboardData || e.dataTransfer;
        function processItems(items) {
            var i, hadImage = !1;
            if (items) for (i = 0; i < items.length; i++) {
                var blob, reader, item = items[i];
                /^image\/(jpeg|png|gif|bmp)$/.test(item.type) && (hadImage = !0, 
                e.preventDefault(), !1 !== editor.settings.paste_data_images ? (blob = item.getAsFile ? item.getAsFile() : item, 
                (reader = new FileReader()).onload = function() {
                    var html = function(editor, rng, reader, blob) {
                        rng && (editor.selection.setRng(rng), rng = null);
                        var blobInfo, idx, base64 = -1 !== (idx = (reader = rng = reader.result).indexOf(",")) ? reader.substr(idx + 1) : null;
                        return (reader = new Image()).src = rng, idx = editor.settings, 
                        editor = reader, !idx.images_dataimg_filter || idx.images_dataimg_filter(editor) ? ((reader = BlobCache.findFirst(function(cachedBlobInfo) {
                            return cachedBlobInfo.base64() === base64;
                        })) ? blobInfo = reader : (blobInfo = BlobCache.create("mceclip", blob, base64), 
                        BlobCache.add(blobInfo)), '<img src="' + blobInfo.blobUri() + '" />') : '<img src="' + rng + '" />';
                    }(editor, lastRng, reader, blob);
                    pasteHtml(editor, html);
                }, reader.readAsDataURL(blob)) : pasteHtml(editor, '<img src="' + Env.transparentSrc + '" data-mce-upload-marker="1" />', !0));
            }
            return hadImage;
        }
        return dataTransfer && !processItems(dataTransfer.items) && processItems(dataTransfer.files), 
        1;
    }
    function setup$1(editor, pasteBin) {
        var keyboardPastePlainTextState, keyboardPasteTimeStamp = 0;
        function getContentAndInsert(e) {
            var clipboardTimer = new Date().getTime(), clipboardContent = function(editor) {
                var eventTimestamp = e.timeStamp;
                if (hasData()) {
                    var data = getData$1();
                    if (data.timeStamp && data.timeStamp > eventTimestamp) return content = data.content, 
                    clearData(), content;
                    clearData();
                }
                var content = getDataTransferItems(e.clipboardData || e.dataTransfer || editor.getDoc().dataTransfer);
                return content;
            }(editor), clipboardDelay = new Date().getTime() - clipboardTimer;
            function isKeyBoardPaste() {
                return "drop" != e.type && new Date().getTime() - keyboardPasteTimeStamp - clipboardDelay < 1e3;
            }
            var content, internal = hasContentType(clipboardContent, "x-tinymce/html"), pasteAsPlainText = keyboardPastePlainTextState;
            !(keyboardPastePlainTextState = !1) !== editor.settings.paste_plain_text || internal || (pasteAsPlainText = !0), 
            e.isDefaultPrevented() || isBrokenAndroidClipboardEvent(e) || (isKeyBoardPaste() || e.preventDefault(), 
            !isIE || isKeyBoardPaste() && !e.ieFake || hasContentType(clipboardContent, "text/html") || (pasteBin.create(), 
            editor.dom.bind(editor.dom.get("mcepastebin"), "paste", function(e) {
                e.stopPropagation();
            }), editor.getDoc().execCommand("Paste", !1, null), clipboardContent["text/html"] = pasteBin.getHtml()), 
            (content = (content = clipboardContent)["text/plain"]) && 0 === content.indexOf("file://")) || !hasHtmlOrText(clipboardContent) && pasteImageData(editor, e, pasteBin.getLastRng() || editor.selection.getRng()) ? pasteBin.remove() : (isHtmlPaste(clipboardContent) || (clipboardTimer = pasteBin.getHtml(), 
            pasteBin.isDefaultContent(clipboardTimer) ? pasteAsPlainText = !0 : clipboardContent["text/html"] = clipboardTimer), 
            isHtmlPaste(clipboardContent) ? (e.preventDefault(), internal = internal || isMarked(clipboardContent["text/html"]), 
            insertClipboardContent(editor, clipboardContent, internal, pasteAsPlainText), 
            pasteBin.remove()) : hasContentType(clipboardContent, "text/plain") && hasContentType(clipboardContent, "text/uri-list") ? (e.preventDefault(), 
            clipboardContent["text/html"] = clipboardContent["text/plain"], insertClipboardContent(editor, clipboardContent, internal, pasteAsPlainText)) : setTimeout(function() {
                function block(e) {
                    e.preventDefault();
                }
                editor.dom.bind(editor.getDoc(), "mousedown", block), editor.dom.bind(editor.getDoc(), "keydown", block), 
                insertClipboardContent(editor, clipboardContent, internal, pasteAsPlainText), 
                editor.dom.unbind(editor.getDoc(), "mousedown", block), editor.dom.unbind(editor.getDoc(), "keydown", block), 
                pasteBin.remove();
            }, 0));
        }
        function removePasteBinOnKeyUp(e) {
            isKeyboardPasteEvent(e) && !e.isDefaultPrevented() && pasteBin.remove();
        }
        editor.addCommand("mceInsertClipboardContent", function(u, data) {
            return data.text ? (pasteText(editor, data.text), !0) : editor.settings.paste_plain_text && !data.internal ? (data.text || (data.text = innerText(data.content || "")), 
            pasteText(editor, data.text), !0) : void (data.content && pasteHtml(editor, data.content, data.internal || !1));
        }), editor.onPaste.add(function(editor, e) {
            if (e.isDefaultPrevented() || isBrokenAndroidClipboardEvent(e) && !hasData()) return pasteBin.remove(), 
            !1;
            getContentAndInsert(e), e.preventDefault();
        }), editor.onKeyDown.add(function(editor, e) {
            isKeyboardPasteEvent(e) && !e.isDefaultPrevented() && (keyboardPasteTimeStamp = new Date().getTime(), 
            e.stopImmediatePropagation(), keyboardPastePlainTextState = e.shiftKey && 86 == e.keyCode, 
            editor.dom.bind(editor.getBody(), "keyup", function handler(e) {
                removePasteBinOnKeyUp(e), editor.dom.unbind(editor.getBody(), "keyup", handler);
            }), editor.dom.bind(editor.getBody(), "paste", function handler(e) {
                removePasteBinOnKeyUp(e), editor.dom.unbind(editor.getBody(), "paste", handler);
            }));
        }), editor.addCommand("mcePasteFakeClipboard", function(ui, e) {
            var content = getData$1().content || "";
            content && insertClipboardContent(editor, content, !0, !0 === e.isPlainText);
        });
    }
    function getCaretRangeFromEvent(editor, e) {
        return RangeUtils.getCaretRangeFromPoint(e.clientX, e.clientY, editor.getDoc());
    }
    function setFocusedRange(editor, rng) {
        editor.focus(), editor.selection.setRng(rng);
    }
    function PasteBin(editor) {
        var lastRng;
        return {
            create: function() {
                return lastRng = editor.selection.getRng(), function(editor, lastRng) {
                    var scrollContainer, rect, dom = editor.dom, body = editor.getBody(), scrollTop = editor.dom.getViewPort(editor.getWin()).y, top = 20;
                    editor.inline && (scrollContainer = editor.selection.getScrollContainer()) && 0 < scrollContainer.scrollTop && (scrollTop = scrollContainer.scrollTop), 
                    lastRng.getClientRects && ((rect = function(rng) {
                        var node, container = rng.startContainer, rects = rng.getClientRects();
                        if (rects.length) return rects[0];
                        if (rng.collapsed && 1 == container.nodeType) {
                            for (node = container.childNodes[lastRng.startOffset]; node && 3 == node.nodeType && !node.data.length; ) node = node.nextSibling;
                            if (node) return "BR" == node.tagName && (container = dom.doc.createTextNode("\ufeff"), 
                            node.parentNode.insertBefore(container, node), (rng = dom.createRng()).setStartBefore(container), 
                            rng.setEndAfter(container), rects = rng.getClientRects(), 
                            dom.remove(container)), rects.length ? rects[0] : void 0;
                        }
                    }(lastRng)) ? top = scrollTop + (rect.top - dom.getPos(body).y) : (top = scrollTop, 
                    (rect = lastRng.startContainer) && 1 == (rect = 3 == rect.nodeType && rect.parentNode != body ? rect.parentNode : rect).nodeType && (top = dom.getPos(rect, scrollContainer || body).y))), 
                    scrollTop = editor.dom.add(editor.getBody(), "div", {
                        id: "mcepastebin",
                        contentEditable: !0,
                        "data-mce-bogus": "all",
                        style: "position: absolute; top: " + top + "px; width: 10px; height: 10px; overflow: hidden; opacity: 0"
                    }, pasteBinDefaultContent), tinymce.isGecko && dom.setStyle(scrollTop, "left", "rtl" == dom.getStyle(body, "direction", !0) ? 65535 : -65535), 
                    dom.bind(scrollTop, "beforedeactivate focusin focusout", function(e) {
                        e.stopPropagation();
                    }), scrollTop.focus(), editor.selection.select(scrollTop, !0);
                }(editor, lastRng);
            },
            remove: function() {
                return function(editor, lastRng) {
                    if (getEl(editor)) {
                        for (var pasteBinClone; pasteBinClone = editor.dom.get("mcepastebin"); ) editor.dom.remove(pasteBinClone), 
                        editor.dom.unbind(pasteBinClone);
                        lastRng && editor.selection.setRng(lastRng);
                    }
                }(editor, lastRng);
            },
            getEl: function() {
                return getEl(editor);
            },
            getHtml: function() {
                return function(editor) {
                    function copyAndRemove(toElm, fromElm) {
                        toElm.appendChild(fromElm), editor.dom.remove(fromElm, !0);
                    }
                    var i, dirtyWrappers, cleanWrapper, pasteBinClones = tinymce.grep(editor.getBody().childNodes, function(elm) {
                        return "mcepastebin" === elm.id;
                    }), pasteBinElm = pasteBinClones.shift();
                    for (tinymce.each(pasteBinClones, function(pasteBinClone) {
                        copyAndRemove(pasteBinElm, pasteBinClone);
                    }), i = (dirtyWrappers = editor.dom.select("div[id=mcepastebin]", pasteBinElm)).length - 1; 0 <= i; i--) cleanWrapper = editor.dom.create("div"), 
                    pasteBinElm.insertBefore(cleanWrapper, dirtyWrappers[i]), copyAndRemove(cleanWrapper, dirtyWrappers[i]);
                    return pasteBinElm ? pasteBinElm.innerHTML : "";
                }(editor);
            },
            getLastRng: function() {
                return lastRng;
            },
            isDefaultContent: function(value) {
                return value === pasteBinDefaultContent;
            }
        };
    }
    tinymce.clipboard.FakeClipboard = Object.freeze({
        __proto__: null,
        clearData: clearData,
        getData: getData$1,
        hasData: hasData,
        setData: setData
    });
    function getEl(editor) {
        return editor.dom.get("mcepastebin");
    }
    var AutoLinkPattern, RangeUtils = tinymce.dom.RangeUtils, Delay = tinymce.util.Delay, draggingInternallyState = !1, pasteBinDefaultContent = "%MCEPASTEBIN%", Dispatcher = tinymce.util.Dispatcher, TAGS = (tinymce.Clipboard = function(editor) {
        var pasteBin = new PasteBin(editor);
        editor.onGetClipboardContent = new Dispatcher(this), editor.onPastePreProcess = new Dispatcher(this), 
        editor.onPastePostProcess = new Dispatcher(this), editor.onPasteBeforeInsert = new Dispatcher(this), 
        function(editor) {
            tinymce.isWebKit && editor.onPastePreProcess.add(function(editor, o) {
                o.isWordContent || (o.content = function(editor, content) {
                    var dom, node, webKitStyles = editor.settings.paste_webkit_styles;
                    return !0 === editor.settings.paste_remove_styles_if_webkit && "all" != webKitStyles ? (content = (webKitStyles = webKitStyles && webKitStyles.split(/[, ]/)) ? (dom = editor.dom, 
                    node = editor.selection.getNode(), content.replace(/(<[^>]+) style="([^"]*)"([^>]*>)/gi, function(all, before, value, after) {
                        var inputStyles = dom.parseStyle(value, "span"), outputStyles = {};
                        if ("none" === webKitStyles) return before + after;
                        for (var i = 0; i < webKitStyles.length; i++) {
                            var inputValue = inputStyles[webKitStyles[i]], currentValue = dom.getStyle(node, webKitStyles[i], !0);
                            /color/.test(webKitStyles[i]) && (inputValue = dom.toHex(inputValue), 
                            currentValue = dom.toHex(currentValue)), currentValue != inputValue && (outputStyles[webKitStyles[i]] = inputValue);
                        }
                        return (outputStyles = dom.serializeStyle(outputStyles, "span")) ? before + ' style="' + outputStyles + '"' + after : before + after;
                    })) : content.replace(/(<[^>]+) style="([^"]*)"([^>]*>)/gi, "$1$3")).replace(/(<[^>]+) data-mce-style="([^"]+)"([^>]*>)/gi, function(all, before, value, after) {
                        return before + ' style="' + value + '"' + after;
                    }) : content;
                }(editor, o.content));
            }), (tinymce.isIE || tinymce.isIE12) && editor.onPastePostProcess.add(function(editor, o) {
                o.isWordContent || (o.content = function(editor, html) {
                    var blockElements = [];
                    return each$5(editor.schema.getBlockElements(), function(block, blockName) {
                        blockElements.push(blockName);
                    }), html = filter(html, [ [ new RegExp("(?:<br>&nbsp;[\\s\\r\\n]+|<br>)*(<\\/?(" + blockElements.join("|") + ")[^>]*>)(?:<br>&nbsp;[\\s\\r\\n]+|<br>)*", "g"), "$1" ] ]), 
                    filter(html, [ [ /<br><br>/g, "<BR><BR>" ], [ /<br>/g, " " ], [ /<BR><BR>/g, "<br>" ] ]);
                }(editor, o.content));
            });
        }(editor), setup$2(editor), editor.onPreInit.add(function() {
            !function(editor) {
                editor.onCut.add(cut), editor.onCopy.add(copy);
            }(editor), function(editor) {
                editor.settings.paste_block_drop && editor.dom.bind(editor.getBody(), [ "dragend", "dragover", "draggesture", "dragdrop", "drop", "drag" ], function(e) {
                    e.preventDefault(), e.stopPropagation();
                }), !1 === editor.settings.paste_data_images && editor.dom.bind(editor.getBody(), "drop", function(e) {
                    var dataTransfer = e.dataTransfer;
                    dataTransfer && dataTransfer.files && 0 < dataTransfer.files.length && e.preventDefault();
                }), editor.dom.bind(editor.getBody(), "drop", function(e) {
                    var dropContent, internal, content, rng = getCaretRangeFromEvent(editor, e);
                    e.isDefaultPrevented() || (internal = hasContentType(dropContent = getDataTransferItems(e.dataTransfer), "x-tinymce/html") || draggingInternallyState, 
                    (hasHtmlOrText(dropContent) && !function(content) {
                        return (content = content["text/plain"]) && 0 === content.indexOf("file://");
                    }(dropContent) || !pasteImageData(e, rng)) && rng && !1 !== editor.settings.paste_filter_drop && (content = dropContent["x-tinymce/html"] || dropContent["text/html"] || dropContent["text/plain"], 
                    content = editor.settings.paste_plain_text && dropContent["text/plain"] || content) && (e.preventDefault(), 
                    Delay.setEditorTimeout(editor, function() {
                        editor.undoManager.add(), internal && (editor.execCommand("Delete", !1, null, {
                            skip_undo: !0
                        }), editor.selection.getRng().deleteContents()), setFocusedRange(editor, rng), 
                        content = trimHtml(content);
                        var data = {};
                        !dropContent["text/html"] || editor.settings.paste_plain_text ? data.text = content : (content = function(content) {
                            return content = DOM.create("div", {}, content), each$6(DOM.select("[style]", content), function(elm) {
                                elm.setAttribute("style", elm.getAttribute("data-mce-style") || "");
                            }), content.innerHTML;
                        }(content), data.content = content, data.internal = internal || draggingInternallyState), 
                        editor.execCommand("mceInsertClipboardContent", !1, data, {
                            skip_undo: !0
                        });
                    })));
                }), editor.dom.bind(editor.getBody(), "dragstart", function(e) {
                    var content;
                    e.isDefaultPrevented() || e.dataTransfer && (draggingInternallyState = !0, 
                    e.altKey && (e.dataTransfer.effectAllowed = "copy", e.dataTransfer.dropEffect = "copy"), 
                    content = editor.selection.getContent({
                        contextual: !0
                    })) && (content = function(content) {
                        return content = DOM.create("div", {}, content), each$6(DOM.select("[style]", content), function(elm) {
                            var style = elm.getAttribute("style");
                            style && elm.setAttribute("data-mce-style", style);
                        }), content.innerHTML;
                    }(content), e.dataTransfer.setData("x-tinymce/html", content));
                }), editor.dom.bind(editor.getBody(), [ "dragover", "dragend" ], function(e) {
                    editor.settings.clipboard_paste_data_images && 0 == draggingInternallyState && (e.preventDefault(), 
                    setFocusedRange(editor, getCaretRangeFromEvent(editor, e))), 
                    "dragend" == e.type && (draggingInternallyState = !1);
                });
            }(editor), setup$1(editor, pasteBin);
        });
    }, function(tinymce) {
        function funescape(_, escaped, escapedWhitespace) {
            var high = "0x" + escaped - 65536;
            return high != high || escapedWhitespace ? escaped : high < 0 ? String.fromCharCode(65536 + high) : String.fromCharCode(high >> 10 | 55296, 1023 & high | 56320);
        }
        var i, support, Expr, getText, isXML, tokenize, compile, select, outermostContext, sortInput, hasDuplicate, setDocument, document, docElem, documentIsHTML, rbuggyQSA, rbuggyMatches, matches, contains, expando = "sizzle" + -new Date(), preferredDoc = window.document, dirruns = 0, done = 0, classCache = createCache(), tokenCache = createCache(), compilerCache = createCache(), sortOrder = function(a, b) {
            return a === b && (hasDuplicate = !0), 0;
        }, strundefined = "undefined", hasOwn = {}.hasOwnProperty, arr = [], pop = arr.pop, push_native = arr.push, push = arr.push, slice = arr.slice, indexOf = arr.indexOf || function(elem) {
            for (var i = 0, len = this.length; i < len; i++) if (this[i] === elem) return i;
            return -1;
        }, booleans = "checked|selected|async|autofocus|autoplay|controls|defer|disabled|hidden|ismap|loop|multiple|open|readonly|required|scoped", whitespace = "[\\x20\\t\\r\\n\\f]", identifier = "(?:\\\\.|[\\w-]|[^\\x00-\\xa0])+", attributes = "\\[" + whitespace + "*(" + identifier + ")(?:" + whitespace + "*([*^$|!~]?=)" + whitespace + "*(?:'((?:\\\\.|[^\\\\'])*)'|\"((?:\\\\.|[^\\\\\"])*)\"|(" + identifier + "))|)" + whitespace + "*\\]", pseudos = ":(" + identifier + ")(?:\\((('((?:\\\\.|[^\\\\'])*)'|\"((?:\\\\.|[^\\\\\"])*)\")|((?:\\\\.|[^\\\\()[\\]]|" + attributes + ")*)|.*)\\)|)", rtrim = new RegExp("^" + whitespace + "+|((?:^|[^\\\\])(?:\\\\.)*)" + whitespace + "+$", "g"), rcomma = new RegExp("^" + whitespace + "*," + whitespace + "*"), rcombinators = new RegExp("^" + whitespace + "*([>+~]|" + whitespace + ")" + whitespace + "*"), rattributeQuotes = new RegExp("=" + whitespace + "*([^\\]'\"]*?)" + whitespace + "*\\]", "g"), rpseudo = new RegExp(pseudos), ridentifier = new RegExp("^" + identifier + "$"), matchExpr = {
            ID: new RegExp("^#(" + identifier + ")"),
            CLASS: new RegExp("^\\.(" + identifier + ")"),
            TAG: new RegExp("^(" + identifier + "|[*])"),
            ATTR: new RegExp("^" + attributes),
            PSEUDO: new RegExp("^" + pseudos),
            CHILD: new RegExp("^:(only|first|last|nth|nth-last)-(child|of-type)(?:\\(" + whitespace + "*(even|odd|(([+-]|)(\\d*)n|)" + whitespace + "*(?:([+-]|)" + whitespace + "*(\\d+)|))" + whitespace + "*\\)|)", "i"),
            bool: new RegExp("^(?:" + booleans + ")$", "i"),
            needsContext: new RegExp("^" + whitespace + "*[>+~]|:(even|odd|eq|gt|lt|nth|first|last)(?:\\(" + whitespace + "*((?:-\\d)?\\d*)" + whitespace + "*\\)|)(?=[^-]|$)", "i")
        }, rinputs = /^(?:input|select|textarea|button)$/i, rheader = /^h\d$/i, rnative = /^[^{]+\{\s*\[native \w/, rquickExpr = /^(?:#([\w-]+)|(\w+)|\.([\w-]+))$/, rsibling = /[+~]/, rescape = /'|\\/g, runescape = new RegExp("\\\\([\\da-f]{1,6}" + whitespace + "?|(" + whitespace + ")|.)", "ig");
        try {
            push.apply(arr = slice.call(preferredDoc.childNodes), preferredDoc.childNodes), 
            arr[preferredDoc.childNodes.length].nodeType;
        } catch (e) {
            push = {
                apply: arr.length ? function(target, els) {
                    push_native.apply(target, slice.call(els));
                } : function(target, els) {
                    for (var j = target.length, i = 0; target[j++] = els[i++]; );
                    target.length = j - 1;
                }
            };
        }
        function Sizzle(selector, context, results, seed) {
            var nodeType, i, groups, elem, nid, match, m;
            if ((context ? context.ownerDocument || context : preferredDoc) !== document && setDocument(context), 
            results = results || [], !selector || "string" != typeof selector) return results;
            if (1 !== (nodeType = (context = context || document).nodeType) && 9 !== nodeType) return [];
            if (documentIsHTML && !seed) {
                if (match = rquickExpr.exec(selector)) if (m = match[1]) {
                    if (9 === nodeType) {
                        if (!(elem = context.getElementById(m)) || !elem.parentNode) return results;
                        if (elem.id === m) return results.push(elem), results;
                    } else if (context.ownerDocument && (elem = context.ownerDocument.getElementById(m)) && contains(context, elem) && elem.id === m) return results.push(elem), 
                    results;
                } else {
                    if (match[2]) return push.apply(results, context.getElementsByTagName(selector)), 
                    results;
                    if ((m = match[3]) && support.getElementsByClassName) return push.apply(results, context.getElementsByClassName(m)), 
                    results;
                }
                if (support.qsa && (!rbuggyQSA || !rbuggyQSA.test(selector))) {
                    if (nid = elem = expando, match = context, m = 9 === nodeType && selector, 
                    1 === nodeType && "object" !== context.nodeName.toLowerCase()) {
                        for (groups = tokenize(selector), (elem = context.getAttribute("id")) ? nid = elem.replace(rescape, "\\$&") : context.setAttribute("id", nid), 
                        nid = "[id='" + nid + "'] ", i = groups.length; i--; ) groups[i] = nid + toSelector(groups[i]);
                        match = rsibling.test(selector) && testContext(context.parentNode) || context, 
                        m = groups.join(",");
                    }
                    if (m) try {
                        return push.apply(results, match.querySelectorAll(m)), results;
                    } catch (qsaError) {} finally {
                        elem || context.removeAttribute("id");
                    }
                }
            }
            return select(selector.replace(rtrim, "$1"), context, results, seed);
        }
        function createCache() {
            var keys = [];
            function cache(key, value) {
                return keys.push(key + " ") > Expr.cacheLength && delete cache[keys.shift()], 
                cache[key + " "] = value;
            }
            return cache;
        }
        function markFunction(fn) {
            return fn[expando] = !0, fn;
        }
        function assert(fn) {
            var div = document.createElement("div");
            try {
                return !!fn(div);
            } catch (e) {
                return !1;
            } finally {
                div.parentNode && div.parentNode.removeChild(div);
            }
        }
        function addHandle(attrs, handler) {
            for (var arr = attrs.split("|"), i = attrs.length; i--; ) Expr.attrHandle[arr[i]] = handler;
        }
        function siblingCheck(a, b) {
            var cur = b && a, diff = cur && 1 === a.nodeType && 1 === b.nodeType && (~b.sourceIndex || 1 << 31) - (~a.sourceIndex || 1 << 31);
            if (diff) return diff;
            if (cur) for (;cur = cur.nextSibling; ) if (cur === b) return -1;
            return a ? 1 : -1;
        }
        function createPositionalPseudo(fn) {
            return markFunction(function(argument) {
                return argument = +argument, markFunction(function(seed, matches) {
                    for (var j, matchIndexes = fn([], seed.length, argument), i = matchIndexes.length; i--; ) seed[j = matchIndexes[i]] && (seed[j] = !(matches[j] = seed[j]));
                });
            });
        }
        function testContext(context) {
            return context && typeof context.getElementsByTagName !== strundefined && context;
        }
        for (i in support = Sizzle.support = {}, isXML = Sizzle.isXML = function(elem) {
            return !!(elem = elem && (elem.ownerDocument || elem).documentElement) && "HTML" !== elem.nodeName;
        }, setDocument = Sizzle.setDocument = function(node) {
            var doc = node ? node.ownerDocument || node : preferredDoc, node = doc.defaultView;
            return doc !== document && 9 === doc.nodeType && doc.documentElement ? (docElem = (document = doc).documentElement, 
            documentIsHTML = !isXML(doc), node && node !== function(win) {
                try {
                    return win.top;
                } catch (ex) {}
                return null;
            }(node) && (node.addEventListener ? node.addEventListener("unload", function() {
                setDocument();
            }, !1) : node.attachEvent && node.attachEvent("onunload", function() {
                setDocument();
            })), support.attributes = assert(function(div) {
                return div.className = "i", !div.getAttribute("className");
            }), support.getElementsByTagName = assert(function(div) {
                return div.appendChild(doc.createComment("")), !div.getElementsByTagName("*").length;
            }), support.getElementsByClassName = rnative.test(doc.getElementsByClassName), 
            support.getById = assert(function(div) {
                return docElem.appendChild(div).id = expando, !doc.getElementsByName || !doc.getElementsByName(expando).length;
            }), support.getById ? (Expr.find.ID = function(id, context) {
                if (typeof context.getElementById !== strundefined && documentIsHTML) return (context = context.getElementById(id)) && context.parentNode ? [ context ] : [];
            }, Expr.filter.ID = function(id) {
                var attrId = id.replace(runescape, funescape);
                return function(elem) {
                    return elem.getAttribute("id") === attrId;
                };
            }) : (delete Expr.find.ID, Expr.filter.ID = function(id) {
                var attrId = id.replace(runescape, funescape);
                return function(elem) {
                    return (elem = typeof elem.getAttributeNode !== strundefined && elem.getAttributeNode("id")) && elem.value === attrId;
                };
            }), Expr.find.TAG = support.getElementsByTagName ? function(tag, context) {
                if (typeof context.getElementsByTagName !== strundefined) return context.getElementsByTagName(tag);
            } : function(tag, context) {
                var elem, tmp = [], i = 0, results = context.getElementsByTagName(tag);
                if ("*" !== tag) return results;
                for (;elem = results[i++]; ) 1 === elem.nodeType && tmp.push(elem);
                return tmp;
            }, Expr.find.CLASS = support.getElementsByClassName && function(className, context) {
                if (documentIsHTML) return context.getElementsByClassName(className);
            }, rbuggyMatches = [], rbuggyQSA = [], (support.qsa = rnative.test(doc.querySelectorAll)) && (assert(function(div) {
                div.innerHTML = "<select msallowcapture=''><option selected=''></option></select>", 
                div.querySelectorAll("[msallowcapture^='']").length && rbuggyQSA.push("[*^$]=" + whitespace + "*(?:''|\"\")"), 
                div.querySelectorAll("[selected]").length || rbuggyQSA.push("\\[" + whitespace + "*(?:value|" + booleans + ")"), 
                div.querySelectorAll(":checked").length || rbuggyQSA.push(":checked");
            }), assert(function(div) {
                var input = doc.createElement("input");
                input.setAttribute("type", "hidden"), div.appendChild(input).setAttribute("name", "D"), 
                div.querySelectorAll("[name=d]").length && rbuggyQSA.push("name" + whitespace + "*[*^$|!~]?="), 
                div.querySelectorAll(":enabled").length || rbuggyQSA.push(":enabled", ":disabled"), 
                div.querySelectorAll("*,:x"), rbuggyQSA.push(",.*:");
            })), (support.matchesSelector = rnative.test(matches = docElem.matches || docElem.webkitMatchesSelector || docElem.mozMatchesSelector || docElem.oMatchesSelector || docElem.msMatchesSelector)) && assert(function(div) {
                support.disconnectedMatch = matches.call(div, "div"), matches.call(div, "[s!='']:x"), 
                rbuggyMatches.push("!=", pseudos);
            }), rbuggyQSA = rbuggyQSA.length && new RegExp(rbuggyQSA.join("|")), 
            rbuggyMatches = rbuggyMatches.length && new RegExp(rbuggyMatches.join("|")), 
            node = rnative.test(docElem.compareDocumentPosition), contains = node || rnative.test(docElem.contains) ? function(a, b) {
                var adown = 9 === a.nodeType ? a.documentElement : a;
                return a === (b = b && b.parentNode) || !(!b || 1 !== b.nodeType || !(adown.contains ? adown.contains(b) : a.compareDocumentPosition && 16 & a.compareDocumentPosition(b)));
            } : function(a, b) {
                if (b) for (;b = b.parentNode; ) if (b === a) return !0;
                return !1;
            }, sortOrder = node ? function(a, b) {
                var compare;
                return a === b ? (hasDuplicate = !0, 0) : !a.compareDocumentPosition - !b.compareDocumentPosition || (1 & (compare = (a.ownerDocument || a) === (b.ownerDocument || b) ? a.compareDocumentPosition(b) : 1) || !support.sortDetached && b.compareDocumentPosition(a) === compare ? a === doc || a.ownerDocument === preferredDoc && contains(preferredDoc, a) ? -1 : b === doc || b.ownerDocument === preferredDoc && contains(preferredDoc, b) ? 1 : sortInput ? indexOf.call(sortInput, a) - indexOf.call(sortInput, b) : 0 : 4 & compare ? -1 : 1);
            } : function(a, b) {
                if (a === b) return hasDuplicate = !0, 0;
                var cur, i = 0, aup = a.parentNode, bup = b.parentNode, ap = [ a ], bp = [ b ];
                if (!aup || !bup) return a === doc ? -1 : b === doc ? 1 : aup ? -1 : bup ? 1 : sortInput ? indexOf.call(sortInput, a) - indexOf.call(sortInput, b) : 0;
                if (aup === bup) return siblingCheck(a, b);
                for (cur = a; cur = cur.parentNode; ) ap.unshift(cur);
                for (cur = b; cur = cur.parentNode; ) bp.unshift(cur);
                for (;ap[i] === bp[i]; ) i++;
                return i ? siblingCheck(ap[i], bp[i]) : ap[i] === preferredDoc ? -1 : bp[i] === preferredDoc ? 1 : 0;
            }, doc) : document;
        }, Sizzle.matches = function(expr, elements) {
            return Sizzle(expr, null, null, elements);
        }, Sizzle.matchesSelector = function(elem, expr) {
            if ((elem.ownerDocument || elem) !== document && setDocument(elem), 
            expr = expr.replace(rattributeQuotes, "='$1']"), support.matchesSelector && documentIsHTML && (!rbuggyMatches || !rbuggyMatches.test(expr)) && (!rbuggyQSA || !rbuggyQSA.test(expr))) try {
                var ret = matches.call(elem, expr);
                if (ret || support.disconnectedMatch || elem.document && 11 !== elem.document.nodeType) return ret;
            } catch (e) {}
            return 0 < Sizzle(expr, document, null, [ elem ]).length;
        }, Sizzle.contains = function(context, elem) {
            return (context.ownerDocument || context) !== document && setDocument(context), 
            contains(context, elem);
        }, Sizzle.attr = function(elem, name) {
            (elem.ownerDocument || elem) !== document && setDocument(elem);
            var fn = Expr.attrHandle[name.toLowerCase()];
            return void 0 !== (fn = fn && hasOwn.call(Expr.attrHandle, name.toLowerCase()) ? fn(elem, name, !documentIsHTML) : void 0) ? fn : support.attributes || !documentIsHTML ? elem.getAttribute(name) : (fn = elem.getAttributeNode(name)) && fn.specified ? fn.value : null;
        }, Sizzle.error = function(msg) {
            throw new Error("Syntax error, unrecognized expression: " + msg);
        }, Sizzle.uniqueSort = function(results) {
            var elem, duplicates = [], j = 0, i = 0;
            if (hasDuplicate = !support.detectDuplicates, sortInput = !support.sortStable && results.slice(0), 
            results.sort(sortOrder), hasDuplicate) {
                for (;elem = results[i++]; ) elem === results[i] && (j = duplicates.push(i));
                for (;j--; ) results.splice(duplicates[j], 1);
            }
            return sortInput = null, results;
        }, getText = Sizzle.getText = function(elem) {
            var node, ret = "", i = 0, nodeType = elem.nodeType;
            if (nodeType) {
                if (1 === nodeType || 9 === nodeType || 11 === nodeType) {
                    if ("string" == typeof elem.textContent) return elem.textContent;
                    for (elem = elem.firstChild; elem; elem = elem.nextSibling) ret += getText(elem);
                } else if (3 === nodeType || 4 === nodeType) return elem.nodeValue;
            } else for (;node = elem[i++]; ) ret += getText(node);
            return ret;
        }, (Expr = Sizzle.selectors = {
            cacheLength: 50,
            createPseudo: markFunction,
            match: matchExpr,
            attrHandle: {},
            find: {},
            relative: {
                ">": {
                    dir: "parentNode",
                    first: !0
                },
                " ": {
                    dir: "parentNode"
                },
                "+": {
                    dir: "previousSibling",
                    first: !0
                },
                "~": {
                    dir: "previousSibling"
                }
            },
            preFilter: {
                ATTR: function(match) {
                    return match[1] = match[1].replace(runescape, funescape), match[3] = (match[3] || match[4] || match[5] || "").replace(runescape, funescape), 
                    "~=" === match[2] && (match[3] = " " + match[3] + " "), match.slice(0, 4);
                },
                CHILD: function(match) {
                    return match[1] = match[1].toLowerCase(), "nth" === match[1].slice(0, 3) ? (match[3] || Sizzle.error(match[0]), 
                    match[4] = +(match[4] ? match[5] + (match[6] || 1) : 2 * ("even" === match[3] || "odd" === match[3])), 
                    match[5] = +(match[7] + match[8] || "odd" === match[3])) : match[3] && Sizzle.error(match[0]), 
                    match;
                },
                PSEUDO: function(match) {
                    var excess, unquoted = !match[6] && match[2];
                    return matchExpr.CHILD.test(match[0]) ? null : (match[3] ? match[2] = match[4] || match[5] || "" : unquoted && rpseudo.test(unquoted) && (excess = (excess = tokenize(unquoted, !0)) && unquoted.indexOf(")", unquoted.length - excess) - unquoted.length) && (match[0] = match[0].slice(0, excess), 
                    match[2] = unquoted.slice(0, excess)), match.slice(0, 3));
                }
            },
            filter: {
                TAG: function(nodeNameSelector) {
                    var nodeName = nodeNameSelector.replace(runescape, funescape).toLowerCase();
                    return "*" === nodeNameSelector ? function() {
                        return !0;
                    } : function(elem) {
                        return elem.nodeName && elem.nodeName.toLowerCase() === nodeName;
                    };
                },
                CLASS: function(className) {
                    var pattern = classCache[className + " "];
                    return pattern || (pattern = new RegExp("(^|" + whitespace + ")" + className + "(" + whitespace + "|$)")) && classCache(className, function(elem) {
                        return pattern.test("string" == typeof elem.className && elem.className || typeof elem.getAttribute !== strundefined && elem.getAttribute("class") || "");
                    });
                },
                ATTR: function(name, operator, check) {
                    return function(elem) {
                        return null == (elem = Sizzle.attr(elem, name)) ? "!=" === operator : !operator || (elem += "", 
                        "=" === operator ? elem === check : "!=" === operator ? elem !== check : "^=" === operator ? check && 0 === elem.indexOf(check) : "*=" === operator ? check && -1 < elem.indexOf(check) : "$=" === operator ? check && elem.slice(-check.length) === check : "~=" === operator ? -1 < (" " + elem + " ").indexOf(check) : "|=" === operator && (elem === check || elem.slice(0, check.length + 1) === check + "-"));
                    };
                },
                CHILD: function(type, what, argument, first, last) {
                    var simple = "nth" !== type.slice(0, 3), forward = "last" !== type.slice(-4), ofType = "of-type" === what;
                    return 1 === first && 0 === last ? function(elem) {
                        return !!elem.parentNode;
                    } : function(elem, context, xml) {
                        var cache, outerCache, node, diff, nodeIndex, start, dir = simple != forward ? "nextSibling" : "previousSibling", parent = elem.parentNode, name = ofType && elem.nodeName.toLowerCase(), useCache = !xml && !ofType;
                        if (parent) {
                            if (simple) {
                                for (;dir; ) {
                                    for (node = elem; node = node[dir]; ) if (ofType ? node.nodeName.toLowerCase() === name : 1 === node.nodeType) return !1;
                                    start = dir = "only" === type && !start && "nextSibling";
                                }
                                return !0;
                            }
                            if (start = [ forward ? parent.firstChild : parent.lastChild ], 
                            forward && useCache) {
                                for (nodeIndex = (cache = (outerCache = parent[expando] || (parent[expando] = {}))[type] || [])[0] === dirruns && cache[1], 
                                diff = cache[0] === dirruns && cache[2], node = nodeIndex && parent.childNodes[nodeIndex]; node = ++nodeIndex && node && node[dir] || (diff = nodeIndex = 0, 
                                start.pop()); ) if (1 === node.nodeType && ++diff && node === elem) {
                                    outerCache[type] = [ dirruns, nodeIndex, diff ];
                                    break;
                                }
                            } else if (useCache && (cache = (elem[expando] || (elem[expando] = {}))[type]) && cache[0] === dirruns) diff = cache[1]; else for (;(node = ++nodeIndex && node && node[dir] || (diff = nodeIndex = 0, 
                            start.pop())) && ((ofType ? node.nodeName.toLowerCase() !== name : 1 !== node.nodeType) || !++diff || (useCache && ((node[expando] || (node[expando] = {}))[type] = [ dirruns, diff ]), 
                            node !== elem)); );
                            return (diff -= last) === first || diff % first == 0 && 0 <= diff / first;
                        }
                    };
                },
                PSEUDO: function(pseudo, argument) {
                    var args, fn = Expr.pseudos[pseudo] || Expr.setFilters[pseudo.toLowerCase()] || Sizzle.error("unsupported pseudo: " + pseudo);
                    return fn[expando] ? fn(argument) : 1 < fn.length ? (args = [ pseudo, pseudo, "", argument ], 
                    Expr.setFilters.hasOwnProperty(pseudo.toLowerCase()) ? markFunction(function(seed, matches) {
                        for (var idx, matched = fn(seed, argument), i = matched.length; i--; ) seed[idx = indexOf.call(seed, matched[i])] = !(matches[idx] = matched[i]);
                    }) : function(elem) {
                        return fn(elem, 0, args);
                    }) : fn;
                }
            },
            pseudos: {
                not: markFunction(function(selector) {
                    var input = [], results = [], matcher = compile(selector.replace(rtrim, "$1"));
                    return matcher[expando] ? markFunction(function(seed, matches, context, xml) {
                        for (var elem, unmatched = matcher(seed, null, xml, []), i = seed.length; i--; ) (elem = unmatched[i]) && (seed[i] = !(matches[i] = elem));
                    }) : function(elem, context, xml) {
                        return input[0] = elem, matcher(input, null, xml, results), 
                        !results.pop();
                    };
                }),
                has: markFunction(function(selector) {
                    return function(elem) {
                        return 0 < Sizzle(selector, elem).length;
                    };
                }),
                contains: markFunction(function(text) {
                    return text = text.replace(runescape, funescape), function(elem) {
                        return -1 < (elem.textContent || elem.innerText || getText(elem)).indexOf(text);
                    };
                }),
                lang: markFunction(function(lang) {
                    return ridentifier.test(lang || "") || Sizzle.error("unsupported lang: " + lang), 
                    lang = lang.replace(runescape, funescape).toLowerCase(), function(elem) {
                        var elemLang;
                        do {
                            if (elemLang = documentIsHTML ? elem.lang : elem.getAttribute("xml:lang") || elem.getAttribute("lang")) return (elemLang = elemLang.toLowerCase()) === lang || 0 === elemLang.indexOf(lang + "-");
                        } while ((elem = elem.parentNode) && 1 === elem.nodeType);
                        return !1;
                    };
                }),
                target: function(elem) {
                    var hash = window.location && window.location.hash;
                    return hash && hash.slice(1) === elem.id;
                },
                root: function(elem) {
                    return elem === docElem;
                },
                focus: function(elem) {
                    return elem === document.activeElement && (!document.hasFocus || document.hasFocus()) && !!(elem.type || elem.href || ~elem.tabIndex);
                },
                enabled: function(elem) {
                    return !1 === elem.disabled;
                },
                disabled: function(elem) {
                    return !0 === elem.disabled;
                },
                checked: function(elem) {
                    var nodeName = elem.nodeName.toLowerCase();
                    return "input" === nodeName && !!elem.checked || "option" === nodeName && !!elem.selected;
                },
                selected: function(elem) {
                    return elem.parentNode && elem.parentNode.selectedIndex, !0 === elem.selected;
                },
                empty: function(elem) {
                    for (elem = elem.firstChild; elem; elem = elem.nextSibling) if (elem.nodeType < 6) return !1;
                    return !0;
                },
                parent: function(elem) {
                    return !Expr.pseudos.empty(elem);
                },
                header: function(elem) {
                    return rheader.test(elem.nodeName);
                },
                input: function(elem) {
                    return rinputs.test(elem.nodeName);
                },
                button: function(elem) {
                    var name = elem.nodeName.toLowerCase();
                    return "input" === name && "button" === elem.type || "button" === name;
                },
                text: function(elem) {
                    return "input" === elem.nodeName.toLowerCase() && "text" === elem.type && (null == (elem = elem.getAttribute("type")) || "text" === elem.toLowerCase());
                },
                first: createPositionalPseudo(function() {
                    return [ 0 ];
                }),
                last: createPositionalPseudo(function(matchIndexes, length) {
                    return [ length - 1 ];
                }),
                eq: createPositionalPseudo(function(matchIndexes, length, argument) {
                    return [ argument < 0 ? argument + length : argument ];
                }),
                even: createPositionalPseudo(function(matchIndexes, length) {
                    for (var i = 0; i < length; i += 2) matchIndexes.push(i);
                    return matchIndexes;
                }),
                odd: createPositionalPseudo(function(matchIndexes, length) {
                    for (var i = 1; i < length; i += 2) matchIndexes.push(i);
                    return matchIndexes;
                }),
                lt: createPositionalPseudo(function(matchIndexes, length, argument) {
                    for (var i = argument < 0 ? argument + length : argument; 0 <= --i; ) matchIndexes.push(i);
                    return matchIndexes;
                }),
                gt: createPositionalPseudo(function(matchIndexes, length, argument) {
                    for (var i = argument < 0 ? argument + length : argument; ++i < length; ) matchIndexes.push(i);
                    return matchIndexes;
                })
            }
        }).pseudos.nth = Expr.pseudos.eq, {
            radio: !0,
            checkbox: !0,
            file: !0,
            password: !0,
            image: !0
        }) Expr.pseudos[i] = function(type) {
            return function(elem) {
                return "input" === elem.nodeName.toLowerCase() && elem.type === type;
            };
        }(i);
        for (i in {
            submit: !0,
            reset: !0
        }) Expr.pseudos[i] = function(type) {
            return function(elem) {
                var name = elem.nodeName.toLowerCase();
                return ("input" === name || "button" === name) && elem.type === type;
            };
        }(i);
        function setFilters() {}
        function toSelector(tokens) {
            for (var i = 0, len = tokens.length, selector = ""; i < len; i++) selector += tokens[i].value;
            return selector;
        }
        function addCombinator(matcher, combinator, base) {
            var dir = combinator.dir, checkNonElements = base && "parentNode" === dir, doneName = done++;
            return combinator.first ? function(elem, context, xml) {
                for (;elem = elem[dir]; ) if (1 === elem.nodeType || checkNonElements) return matcher(elem, context, xml);
            } : function(elem, context, xml) {
                var oldCache, outerCache, newCache = [ dirruns, doneName ];
                if (xml) {
                    for (;elem = elem[dir]; ) if ((1 === elem.nodeType || checkNonElements) && matcher(elem, context, xml)) return !0;
                } else for (;elem = elem[dir]; ) if (1 === elem.nodeType || checkNonElements) {
                    if ((oldCache = (outerCache = elem[expando] || (elem[expando] = {}))[dir]) && oldCache[0] === dirruns && oldCache[1] === doneName) return newCache[2] = oldCache[2];
                    if ((outerCache[dir] = newCache)[2] = matcher(elem, context, xml)) return !0;
                }
            };
        }
        function elementMatcher(matchers) {
            return 1 < matchers.length ? function(elem, context, xml) {
                for (var i = matchers.length; i--; ) if (!matchers[i](elem, context, xml)) return !1;
                return !0;
            } : matchers[0];
        }
        function condense(unmatched, map, filter, context, xml) {
            for (var elem, newUnmatched = [], i = 0, len = unmatched.length, mapped = null != map; i < len; i++) !(elem = unmatched[i]) || filter && !filter(elem, context, xml) || (newUnmatched.push(elem), 
            mapped && map.push(i));
            return newUnmatched;
        }
        setFilters.prototype = Expr.filters = Expr.pseudos, Expr.setFilters = new setFilters(), 
        tokenize = Sizzle.tokenize = function(selector, parseOnly) {
            var matched, match, tokens, type, soFar, groups, preFilters, cached = tokenCache[selector + " "];
            if (cached) return parseOnly ? 0 : cached.slice(0);
            for (soFar = selector, groups = [], preFilters = Expr.preFilter; soFar; ) {
                for (type in matched && !(match = rcomma.exec(soFar)) || (match && (soFar = soFar.slice(match[0].length) || soFar), 
                groups.push(tokens = [])), matched = !1, (match = rcombinators.exec(soFar)) && (matched = match.shift(), 
                tokens.push({
                    value: matched,
                    type: match[0].replace(rtrim, " ")
                }), soFar = soFar.slice(matched.length)), Expr.filter) !(match = matchExpr[type].exec(soFar)) || preFilters[type] && !(match = preFilters[type](match)) || (matched = match.shift(), 
                tokens.push({
                    value: matched,
                    type: type,
                    matches: match
                }), soFar = soFar.slice(matched.length));
                if (!matched) break;
            }
            return parseOnly ? soFar.length : soFar ? Sizzle.error(selector) : tokenCache(selector, groups).slice(0);
        }, compile = Sizzle.compile = function(selector, match) {
            var i, setMatchers = [], elementMatchers = [], cached = compilerCache[selector + " "];
            if (!cached) {
                for (i = (match = match || tokenize(selector)).length; i--; ) ((cached = function matcherFromTokens(tokens) {
                    for (var checkContext, matcher, j, len = tokens.length, leadingRelative = Expr.relative[tokens[0].type], implicitRelative = leadingRelative || Expr.relative[" "], i = leadingRelative ? 1 : 0, matchContext = addCombinator(function(elem) {
                        return elem === checkContext;
                    }, implicitRelative, !0), matchAnyContext = addCombinator(function(elem) {
                        return -1 < indexOf.call(checkContext, elem);
                    }, implicitRelative, !0), matchers = [ function(elem, context, xml) {
                        return !leadingRelative && (xml || context !== outermostContext) || ((checkContext = context).nodeType ? matchContext : matchAnyContext)(elem, context, xml);
                    } ]; i < len; i++) if (matcher = Expr.relative[tokens[i].type]) matchers = [ addCombinator(elementMatcher(matchers), matcher) ]; else {
                        if ((matcher = Expr.filter[tokens[i].type].apply(null, tokens[i].matches))[expando]) {
                            for (j = ++i; j < len && !Expr.relative[tokens[j].type]; j++);
                            return function setMatcher(preFilter, selector, matcher, postFilter, postFinder, postSelector) {
                                return postFilter && !postFilter[expando] && (postFilter = setMatcher(postFilter)), 
                                postFinder && !postFinder[expando] && (postFinder = setMatcher(postFinder, postSelector)), 
                                markFunction(function(seed, results, context, xml) {
                                    var temp, i, elem, preMap = [], postMap = [], preexisting = results.length, elems = seed || function(selector, contexts, results) {
                                        for (var i = 0, len = contexts.length; i < len; i++) Sizzle(selector, contexts[i], results);
                                        return results;
                                    }(selector || "*", context.nodeType ? [ context ] : context, []), matcherIn = !preFilter || !seed && selector ? elems : condense(elems, preMap, preFilter, context, xml), matcherOut = matcher ? postFinder || (seed ? preFilter : preexisting || postFilter) ? [] : results : matcherIn;
                                    if (matcher && matcher(matcherIn, matcherOut, context, xml), 
                                    postFilter) for (temp = condense(matcherOut, postMap), 
                                    postFilter(temp, [], context, xml), i = temp.length; i--; ) (elem = temp[i]) && (matcherOut[postMap[i]] = !(matcherIn[postMap[i]] = elem));
                                    if (seed) {
                                        if (postFinder || preFilter) {
                                            if (postFinder) {
                                                for (temp = [], i = matcherOut.length; i--; ) (elem = matcherOut[i]) && temp.push(matcherIn[i] = elem);
                                                postFinder(null, matcherOut = [], temp, xml);
                                            }
                                            for (i = matcherOut.length; i--; ) (elem = matcherOut[i]) && -1 < (temp = postFinder ? indexOf.call(seed, elem) : preMap[i]) && (seed[temp] = !(results[temp] = elem));
                                        }
                                    } else matcherOut = condense(matcherOut === results ? matcherOut.splice(preexisting, matcherOut.length) : matcherOut), 
                                    postFinder ? postFinder(null, results, matcherOut, xml) : push.apply(results, matcherOut);
                                });
                            }(1 < i && elementMatcher(matchers), 1 < i && toSelector(tokens.slice(0, i - 1).concat({
                                value: " " === tokens[i - 2].type ? "*" : ""
                            })).replace(rtrim, "$1"), matcher, i < j && matcherFromTokens(tokens.slice(i, j)), j < len && matcherFromTokens(tokens = tokens.slice(j)), j < len && toSelector(tokens));
                        }
                        matchers.push(matcher);
                    }
                    return elementMatcher(matchers);
                }(match[i]))[expando] ? setMatchers : elementMatchers).push(cached);
                (cached = compilerCache(selector, function(elementMatchers, setMatchers) {
                    function superMatcher(seed, context, xml, results, outermost) {
                        var elem, j, matcher, matchedCount = 0, i = "0", unmatched = seed && [], setMatched = [], contextBackup = outermostContext, elems = seed || byElement && Expr.find.TAG("*", outermost), dirrunsUnique = dirruns += null == contextBackup ? 1 : Math.random() || .1, len = elems.length;
                        for (outermost && (outermostContext = context !== document && context); i !== len && null != (elem = elems[i]); i++) {
                            if (byElement && elem) {
                                for (j = 0; matcher = elementMatchers[j++]; ) if (matcher(elem, context, xml)) {
                                    results.push(elem);
                                    break;
                                }
                                outermost && (dirruns = dirrunsUnique);
                            }
                            bySet && ((elem = !matcher && elem) && matchedCount--, 
                            seed) && unmatched.push(elem);
                        }
                        if (matchedCount += i, bySet && i !== matchedCount) {
                            for (j = 0; matcher = setMatchers[j++]; ) matcher(unmatched, setMatched, context, xml);
                            if (seed) {
                                if (0 < matchedCount) for (;i--; ) unmatched[i] || setMatched[i] || (setMatched[i] = pop.call(results));
                                setMatched = condense(setMatched);
                            }
                            push.apply(results, setMatched), outermost && !seed && 0 < setMatched.length && 1 < matchedCount + setMatchers.length && Sizzle.uniqueSort(results);
                        }
                        return outermost && (dirruns = dirrunsUnique, outermostContext = contextBackup), 
                        unmatched;
                    }
                    var bySet = 0 < setMatchers.length, byElement = 0 < elementMatchers.length;
                    return bySet ? markFunction(superMatcher) : superMatcher;
                }(elementMatchers, setMatchers))).selector = selector;
            }
            return cached;
        }, select = Sizzle.select = function(selector, context, results, seed) {
            var i, tokens, token, type, find, compiled = "function" == typeof selector && selector, match = !seed && tokenize(selector = compiled.selector || selector);
            if (results = results || [], 1 === match.length) {
                if (2 < (tokens = match[0] = match[0].slice(0)).length && "ID" === (token = tokens[0]).type && support.getById && 9 === context.nodeType && documentIsHTML && Expr.relative[tokens[1].type]) {
                    if (!(context = (Expr.find.ID(token.matches[0].replace(runescape, funescape), context) || [])[0])) return results;
                    compiled && (context = context.parentNode), selector = selector.slice(tokens.shift().value.length);
                }
                for (i = matchExpr.needsContext.test(selector) ? 0 : tokens.length; i-- && (token = tokens[i], 
                !Expr.relative[type = token.type]); ) if ((find = Expr.find[type]) && (seed = find(token.matches[0].replace(runescape, funescape), rsibling.test(tokens[0].type) && testContext(context.parentNode) || context))) {
                    if (tokens.splice(i, 1), selector = seed.length && toSelector(tokens)) break;
                    return push.apply(results, seed), results;
                }
            }
            return (compiled || compile(selector, match))(seed, context, !documentIsHTML, results, rsibling.test(selector) && testContext(context.parentNode) || context), 
            results;
        }, support.sortStable = expando.split("").sort(sortOrder).join("") === expando, 
        support.detectDuplicates = !!hasDuplicate, setDocument(), support.sortDetached = assert(function(div1) {
            return 1 & div1.compareDocumentPosition(document.createElement("div"));
        }), assert(function(div) {
            return div.innerHTML = "<a href='#'></a>", "#" === div.firstChild.getAttribute("href");
        }) || addHandle("type|href|height|width", function(elem, name, isXML) {
            if (!isXML) return elem.getAttribute(name, "type" === name.toLowerCase() ? 1 : 2);
        }), support.attributes && assert(function(div) {
            return div.innerHTML = "<input/>", div.firstChild.setAttribute("value", ""), 
            "" === div.firstChild.getAttribute("value");
        }) || addHandle("value", function(elem, name, isXML) {
            if (!isXML && "input" === elem.nodeName.toLowerCase()) return elem.defaultValue;
        }), assert(function(div) {
            return null == div.getAttribute("disabled");
        }) || addHandle(booleans, function(elem, name, isXML) {
            if (!isXML) return !0 === elem[name] ? name.toLowerCase() : (isXML = elem.getAttributeNode(name)) && isXML.specified ? isXML.value : null;
        }), tinymce.dom.Sizzle = Sizzle;
    }(tinymce), function(tinymce) {
        function getPos(elm) {
            for (var x = 0, y = 0, offsetParent = elm; offsetParent && offsetParent.nodeType; ) x += offsetParent.offsetLeft || 0, 
            y += offsetParent.offsetTop || 0, offsetParent = offsetParent.offsetParent;
            return {
                x: x,
                y: y
            };
        }
        var NodeType = tinymce.dom.NodeType, Dispatcher = tinymce.util.Dispatcher;
        tinymce.dom.ScrollIntoView = function(editor, elm, alignToTop) {
            var y, viewPortY, viewPortH, dom = editor.dom, root = dom.getRoot(), offsetY = 0;
            editor.onScrollIntoView = new Dispatcher(), !function(editor, elm, alignToTop) {
                return editor.onScrollIntoView.dispatch(editor, elm = {
                    elm: elm,
                    alignToTop: alignToTop,
                    cancel: !1
                }), !0 === elm.cancel;
            }(editor, elm, alignToTop) && NodeType.isElement(elm) && (!1 === alignToTop && (offsetY = elm.offsetHeight), 
            "BODY" !== root.nodeName && (alignToTop = editor.selection.getScrollContainer()) ? (y = getPos(elm).y - getPos(alignToTop).y + offsetY, 
            viewPortH = alignToTop.clientHeight, (y < (viewPortY = alignToTop.scrollTop) || viewPortY + viewPortH < y + 25) && (alignToTop.scrollTop = y < viewPortY ? y : y - viewPortH + 25)) : (root = dom.getViewPort(editor.getWin()), 
            y = dom.getPos(elm).y + offsetY, viewPortY = root.y, viewPortH = root.h, 
            (y < root.y || viewPortY + viewPortH < y + 25) && editor.getWin().scrollTo(0, y < viewPortY ? y : y - viewPortH + 25)));
        };
    }(tinymce), function(tinymce) {
        function trimEmptyTextNode(node) {
            NodeType.isText(node) && 0 === node.data.length && node.parentNode.removeChild(node);
        }
        var NodeType = tinymce.dom.NodeType, CaretBookmark = tinymce.caret.CaretBookmark, CaretContainer = tinymce.caret.CaretContainer, CaretPosition = tinymce.caret.CaretPosition, RangeUtils = tinymce.dom.RangeUtils, Zwsp = tinymce.text.Zwsp, Arr = tinymce.util.Arr, isContentEditableFalse = NodeType.isContentEditableFalse;
        function BookmarkManager(selection) {
            var dom = selection.dom;
            this.getBookmark = function(type, normalized) {
                var rng, collapsed, styles, chr = "&#xFEFF;";
                function findIndex(name, element) {
                    var count = 0;
                    return tinymce.each(dom.select(name), function(node) {
                        if ("all" !== node.getAttribute("data-mce-bogus")) return node != element && void count++;
                    }), count;
                }
                function normalizeTableCellSelection(rng) {
                    function moveEndPoint(start) {
                        var childNodes, container = rng[(prefix = start ? "start" : "end") + "Container"], prefix = rng[prefix + "Offset"];
                        1 == container.nodeType && "TR" == container.nodeName && (container = (childNodes = container.childNodes)[Math.min(start ? prefix : prefix - 1, childNodes.length - 1)]) && (prefix = start ? 0 : container.childNodes.length, 
                        rng["set" + (start ? "Start" : "End")](container, prefix));
                    }
                    return moveEndPoint(!0), moveEndPoint(), rng;
                }
                if (2 == type) return name = (element = selection.getNode()) ? element.nodeName : null, 
                rng = selection.getRng(), isContentEditableFalse(element) || "IMG" == name ? {
                    name: name,
                    index: findIndex(name, element)
                } : selection.tridentSel ? selection.tridentSel.getBookmark(type) : (element = function(rng) {
                    function findSibling(node, offset) {
                        return NodeType.isElement(node) && (node = RangeUtils.getNode(node, offset), 
                        isContentEditableFalse(node)) ? node : CaretContainer.isCaretContainer(node) && (offset = (node = NodeType.isText(node) && CaretContainer.isCaretContainerBlock(node) ? node.parentNode : node).previousSibling, 
                        isContentEditableFalse(offset) || (offset = node.nextSibling, 
                        isContentEditableFalse(offset))) ? offset : void 0;
                    }
                    return findSibling(rng.startContainer, rng.startOffset) || findSibling(rng.endContainer, rng.endOffset);
                }(rng)) ? {
                    name: name = element.tagName,
                    index: findIndex(name, element)
                } : function(rng) {
                    var root = dom.getRoot(), bookmark = {};
                    function getPoint(rng, start) {
                        var childNodes, container = rng[start ? "startContainer" : "endContainer"], rng = rng[start ? "startOffset" : "endOffset"], point = [], start = 0;
                        for (3 === container.nodeType ? point.push(normalized ? function(container, offset) {
                            for (var trimmedOffset = Zwsp.trim(container.data.slice(0, offset)).length, node = container.previousSibling; node && 3 === node.nodeType; node = node.previousSibling) trimmedOffset += Zwsp.trim(node.data).length;
                            return trimmedOffset;
                        }(container, rng) : rng) : (rng >= (childNodes = container.childNodes).length && childNodes.length && (start = 1, 
                        rng = Math.max(0, childNodes.length - 1)), point.push(dom.nodeIndex(childNodes[rng], normalized) + start)); container && container != root; container = container.parentNode) point.push(dom.nodeIndex(container, normalized));
                        return point;
                    }
                    return bookmark.start = getPoint(rng, !0), selection.isCollapsed() || (bookmark.end = getPoint(rng)), 
                    bookmark;
                }(rng);
                if (3 == type) return rng = selection.getRng(), {
                    start: CaretBookmark.create(dom.getRoot(), CaretPosition.fromRangeStart(rng)),
                    end: CaretBookmark.create(dom.getRoot(), CaretPosition.fromRangeEnd(rng))
                };
                if (type) return {
                    rng: selection.getRng()
                };
                if (rng = selection.getRng(), type = dom.uniqueId(), collapsed = selection.isCollapsed(), 
                styles = "overflow:hidden;line-height:0px", rng.duplicate || rng.item) {
                    if (rng.item) return {
                        name: name = (element = rng.item(0)).nodeName,
                        index: findIndex(name, element)
                    };
                    rng2 = rng.duplicate();
                    try {
                        rng.collapse(), rng.pasteHTML('<span data-mce-type="bookmark" id="' + type + '_start" style="' + styles + '">' + chr + "</span>"), 
                        collapsed || (rng2.collapse(!1), rng.moveToElementText(rng2.parentElement()), 
                        0 === rng.compareEndPoints("StartToEnd", rng2) && rng2.move("character", -1), 
                        rng2.pasteHTML('<span data-mce-type="bookmark" id="' + type + '_end" style="' + styles + '">' + chr + "</span>"));
                    } catch (ex) {
                        return null;
                    }
                } else {
                    if ("IMG" == (name = (element = selection.getNode()).nodeName)) return {
                        name: name,
                        index: findIndex(name, element)
                    };
                    var name, rng2 = normalizeTableCellSelection(rng.cloneRange()), element = (collapsed || (rng2.collapse(!1), 
                    name = dom.create("span", {
                        "data-mce-type": "bookmark",
                        id: type + "_end",
                        style: styles
                    }, chr), rng2.insertNode(name), trimEmptyTextNode(name.nextSibling)), 
                    (rng = normalizeTableCellSelection(rng)).collapse(!0), dom.create("span", {
                        "data-mce-type": "bookmark",
                        id: type + "_start",
                        style: styles
                    }, chr));
                    rng.insertNode(element), trimEmptyTextNode(element.previousSibling);
                }
                return selection.moveToBookmark({
                    id: type,
                    keep: 1
                }), {
                    id: type
                };
            }, this.moveToBookmark = function(bookmark) {
                var rng, root, startContainer, endContainer, startOffset, endOffset;
                function setEndPoint(start) {
                    var i, node, offset, children, point = bookmark[start ? "start" : "end"];
                    if (point) {
                        for (offset = point[0], node = root, i = point.length - 1; 1 <= i; i--) {
                            if (children = node.childNodes, point[i] > children.length - 1) return;
                            node = children[point[i]];
                        }
                        3 === node.nodeType && (offset = Math.min(point[0], node.nodeValue.length)), 
                        1 === node.nodeType && (offset = Math.min(point[0], node.childNodes.length)), 
                        start ? rng.setStart(node, offset) : rng.setEnd(node, offset);
                    }
                    return 1;
                }
                function restoreEndPoint(suffix) {
                    var idx, node, marker = dom.get(bookmark.id + "_" + suffix), keep = bookmark.keep;
                    if (marker && (node = marker.parentNode, "start" == suffix ? (idx = keep ? (node = marker.firstChild, 
                    1) : dom.nodeIndex(marker), startContainer = endContainer = node, 
                    startOffset = endOffset = idx) : (idx = keep ? (node = marker.firstChild, 
                    1) : dom.nodeIndex(marker), endContainer = node, endOffset = idx), 
                    !keep)) {
                        for (node = marker.previousSibling, keep = marker.nextSibling, 
                        tinymce.each(tinymce.grep(marker.childNodes), function(node) {
                            3 == node.nodeType && (node.nodeValue = node.nodeValue.replace(/\uFEFF/g, ""));
                        }); marker = dom.get(bookmark.id + "_" + suffix); ) dom.remove(marker, 1);
                        node && keep && node.nodeType == keep.nodeType && 3 == node.nodeType && (idx = node.nodeValue.length, 
                        node.appendData(keep.nodeValue), dom.remove(keep), "start" == suffix ? (startContainer = endContainer = node, 
                        startOffset = endOffset = idx) : (endContainer = node, endOffset = idx));
                    }
                }
                function addBogus(node) {
                    return dom.isBlock(node) && !node.innerHTML && (node.innerHTML = '<br data-mce-bogus="1" />'), 
                    node;
                }
                if (bookmark) if (Arr.isArray(bookmark.start)) {
                    if (rng = dom.createRng(), root = dom.getRoot(), selection.tridentSel) return selection.tridentSel.moveToBookmark(bookmark);
                    setEndPoint(!0) && setEndPoint() && selection.setRng(rng);
                } else "string" == typeof bookmark.start ? selection.setRng(function() {
                    var rng = dom.createRng(), pos = CaretBookmark.resolve(dom.getRoot(), bookmark.start);
                    return rng.setStart(pos.container(), pos.offset()), pos = CaretBookmark.resolve(dom.getRoot(), bookmark.end), 
                    rng.setEnd(pos.container(), pos.offset()), rng;
                }()) : bookmark.id ? (restoreEndPoint("start"), restoreEndPoint("end"), 
                startContainer && ((rng = dom.createRng()).setStart(addBogus(startContainer), startOffset), 
                rng.setEnd(addBogus(endContainer), endOffset), selection.setRng(rng))) : bookmark.name ? selection.select(dom.select(bookmark.name)[bookmark.index]) : bookmark.rng && selection.setRng(bookmark.rng);
            };
        }
        BookmarkManager.isBookmarkNode = function(node) {
            return node && "SPAN" === node.tagName && "bookmark" === node.getAttribute("data-mce-type");
        }, tinymce.dom.BookmarkManager = BookmarkManager;
    }(tinymce), function(tinymce) {
        var Dispatcher = tinymce.util.Dispatcher, VK = tinymce.VK;
        function hasContentEditableState(node, value) {
            if (node && 1 === node.nodeType) {
                if (node.contentEditable === value) return !0;
                if (node.getAttribute("data-mce-contenteditable") === value) return !0;
            }
            return !1;
        }
        tinymce.dom.ControlSelection = function(selection, editor) {
            var selectedElm, selectedElmGhost, resizeHelper, resizeHandles, selectedHandle, lastMouseDownEvent, startX, startY, selectedElmX, selectedElmY, startW, startH, ratio, resizeStarted, width, height, startScrollWidth, startScrollHeight, dom = editor.dom, each = tinymce.each, editableDoc = editor.getDoc(), rootDocument = document, isIE = tinymce.isIE && tinymce.isIE < 11, abs = Math.abs, round = Math.round, rootElement = editor.getBody();
            function isResizable(elm) {
                var selector = editor.settings.object_resizing;
                return !1 !== selector && ("string" != typeof selector && (selector = "table,img,[data-mce-resize]"), 
                "false" !== elm.getAttribute("data-mce-resize")) && elm != editor.getBody() && editor.dom.is(elm, selector);
            }
            function resizeGhostElement(e) {
                var deltaX, deltaY, elm;
                !function(e) {
                    var keys, i;
                    if (e.changedTouches) for (keys = "screenX screenY pageX pageY clientX clientY".split(" "), 
                    i = 0; i < keys.length; i++) e[keys[i]] = e.changedTouches[0][keys[i]];
                }(e), deltaX = e.screenX - startX, deltaY = e.screenY - startY, 
                width = deltaX * selectedHandle[2] + startW, height = deltaY * selectedHandle[3] + startH, 
                width = width < 5 ? 5 : width, height = height < 5 ? 5 : height, 
                ("IMG" !== (elm = selectedElm).nodeName && "proportional" !== elm.getAttribute("data-mce-resize") || !1 === editor.settings.resize_img_proportional ? VK.modifierPressed(e) || "IMG" == selectedElm.nodeName && selectedHandle[2] * selectedHandle[3] != 0 : !VK.modifierPressed(e)) && (abs(deltaX) > abs(deltaY) ? (height = round(width * ratio), 
                width = round(height / ratio)) : (width = round(height / ratio), 
                height = round(width * ratio))), dom.setStyles(selectedElmGhost, {
                    width: width,
                    height: height
                }), elm = selectedHandle.startPos.x + deltaX, e = selectedHandle.startPos.y + deltaY, 
                dom.setStyles(resizeHelper, {
                    left: elm = 0 < elm ? elm : 0,
                    top: e = 0 < e ? e : 0,
                    display: "block"
                }), resizeHelper.innerHTML = width + " &times; " + height, selectedHandle[2] < 0 && selectedElmGhost.clientWidth <= width && dom.setStyle(selectedElmGhost, "left", selectedElmX + (startW - width)), 
                selectedHandle[3] < 0 && selectedElmGhost.clientHeight <= height && dom.setStyle(selectedElmGhost, "top", selectedElmY + (startH - height)), 
                (deltaX = rootElement.scrollWidth - startScrollWidth) + (deltaY = rootElement.scrollHeight - startScrollHeight) != 0 && dom.setStyles(resizeHelper, {
                    left: elm - deltaX,
                    top: e - deltaY
                }), resizeStarted || (editor.onObjectResizeStart.dispatch(editor, selectedElm, startW, startH), 
                resizeStarted = !0);
            }
            function endGhostResize() {
                function setSizeProp(name, value) {
                    value && ("IMG" !== selectedElm.nodeName ? dom.setStyle(selectedElm, name, value) : dom.setAttrib(selectedElm, name, value));
                }
                resizeStarted = !1, setSizeProp("width", width), setSizeProp("height", height), 
                dom.unbind(editableDoc, "mousemove touchmove", resizeGhostElement), 
                dom.unbind(editableDoc, "mouseup touchend", endGhostResize), rootDocument != editableDoc && (dom.unbind(rootDocument, "mousemove touchmove", resizeGhostElement), 
                dom.unbind(rootDocument, "mouseup touchend", endGhostResize)), dom.remove(selectedElmGhost), 
                dom.remove(resizeHelper), dom.removeClass(selectedElm, "mce-resizing"), 
                isIE && "TABLE" != selectedElm.nodeName || showResizeRect(selectedElm), 
                editor.onObjectResized.dispatch(editor, selectedElm, width, height), 
                dom.setAttrib(selectedElm, "style", dom.getAttrib(selectedElm, "style")), 
                editor.nodeChanged();
            }
            function showResizeRect(targetElm, mouseDownHandleName, mouseDownEvent) {
                var targetWidth, targetHeight, position;
                hideResizeRect(), unbindResizeHandleEvents(), position = dom.getPos(targetElm, rootElement), 
                selectedElmX = position.x, selectedElmY = position.y, position = targetElm.getBoundingClientRect(), 
                targetWidth = position.width || position.right - position.left, 
                targetHeight = position.height || position.bottom - position.top, 
                selectedElm != targetElm && (detachResizeStartListener(), selectedElm = targetElm, 
                width = height = 0), editor.onObjectSelected.dispatch(editor, targetElm), 
                isResizable(targetElm) ? each(resizeHandles, function(handle, name) {
                    var handleElm;
                    function startDrag(e) {
                        startX = e.screenX, startY = e.screenY, startW = selectedElm.clientWidth, 
                        startH = selectedElm.clientHeight, ratio = startH / startW, 
                        (selectedHandle = handle).startPos = {
                            x: targetWidth * handle[0] + selectedElmX,
                            y: targetHeight * handle[1] + selectedElmY
                        }, startScrollWidth = rootElement.scrollWidth, startScrollHeight = rootElement.scrollHeight, 
                        selectedElmGhost = selectedElm.cloneNode(), dom.addClass(selectedElmGhost, "mce-clonedresizable"), 
                        dom.setAttrib(selectedElmGhost, "data-mce-bogus", "all"), 
                        selectedElmGhost.contentEditable = !1, selectedElmGhost.unSelectabe = !0, 
                        dom.setStyles(selectedElmGhost, {
                            left: selectedElmX,
                            top: selectedElmY,
                            margin: 0
                        }), dom.addClass(selectedElm, "mce-resizing"), selectedElmGhost.removeAttribute("data-mce-selected"), 
                        rootElement.appendChild(selectedElmGhost), dom.bind(editableDoc, "mousemove touchmove", resizeGhostElement), 
                        dom.bind(editableDoc, "mouseup touchend", endGhostResize), 
                        rootDocument != editableDoc && (dom.bind(rootDocument, "mousemove touchmove", resizeGhostElement), 
                        dom.bind(rootDocument, "mouseup touchend", endGhostResize)), 
                        resizeHelper = dom.add(rootElement, "div", {
                            class: "mce-resize-helper",
                            "data-mce-bogus": "all"
                        }, startW + " &times; " + startH);
                    }
                    mouseDownHandleName ? name == mouseDownHandleName && startDrag(mouseDownEvent) : ((handleElm = dom.get("mceResizeHandle" + name.toUpperCase())) && dom.remove(handleElm), 
                    handleElm = dom.add(rootElement, "div", {
                        id: "mceResizeHandle" + name.toUpperCase(),
                        "data-mce-bogus": "all",
                        class: "mce-resizehandle mce-resizehandle-" + name,
                        unselectable: !0,
                        style: "cursor:" + name + "-resize;"
                    }), 11 === isIE && (handleElm.contentEditable = !1), dom.bind(handleElm, "mousedown", function(e) {
                        e.stopImmediatePropagation(), e.preventDefault(), startDrag(e);
                    }), handle.elm = handleElm, dom.setStyles(handleElm, {
                        left: targetWidth * handle[0] + selectedElmX - handleElm.offsetWidth / 2,
                        top: targetHeight * handle[1] + selectedElmY - handleElm.offsetHeight / 2
                    }));
                }) : hideResizeRect(), selectedElm.setAttribute("data-mce-selected", "1");
            }
            function hideResizeRect() {
                var name, handleElm;
                for (name in unbindResizeHandleEvents(), selectedElm && selectedElm.removeAttribute("data-mce-selected"), 
                resizeHandles) (handleElm = dom.get("mceResizeHandle" + name.toUpperCase())) && (dom.unbind(handleElm), 
                dom.remove(handleElm));
            }
            function updateResizeRect(e) {
                var startElm;
                function isChildOrEqual(node, parent) {
                    if (node) do {
                        if (node === parent) return 1;
                    } while (node = node.parentNode);
                }
                resizeStarted || editor.removed || editor !== tinymce.activeEditor || (each(dom.select("img[data-mce-selected][data-mce-resize],hr[data-mce-selected][data-mce-resize],span[data-mce-selected][data-mce-resize]"), function(img) {
                    img.removeAttribute("data-mce-selected");
                }), e = "mousedown" == e.type ? e.target : selection.getNode(), 
                isChildOrEqual(e = dom.closest(e, isIE ? "table" : "table,img,[data-mce-resize]")[0], rootElement) && (disableGeckoResize(), 
                isChildOrEqual(startElm = selection.getStart(!0), e)) && isChildOrEqual(selection.getEnd(!0), e) && (!isIE || e != startElm && "IMG" !== startElm.nodeName) ? showResizeRect(e) : hideResizeRect());
            }
            function attachEvent(elm, name, func) {
                elm && elm.attachEvent && elm.attachEvent("on" + name, func);
            }
            function detachEvent(elm, name, func) {
                elm && elm.detachEvent && elm.detachEvent("on" + name, func);
            }
            function resizeNativeStart(e) {
                var name, corner, cornerX, cornerY, target = e.srcElement, e = target.getBoundingClientRect(), relativeX = lastMouseDownEvent.clientX - e.left, relativeY = lastMouseDownEvent.clientY - e.top;
                for (name in resizeHandles) if (corner = resizeHandles[name], cornerX = target.offsetWidth * corner[0], 
                cornerY = target.offsetHeight * corner[1], abs(cornerX - relativeX) < 8 && abs(cornerY - relativeY) < 8) {
                    selectedHandle = corner;
                    break;
                }
                resizeStarted = !0, editor.onObjectResizeStart.dispatch(editor, selectedElm, selectedElm.clientWidth, selectedElm.clientHeight), 
                editor.getDoc().selection.empty(), showResizeRect(target, name, lastMouseDownEvent);
            }
            function isWithinContentEditableFalse(elm) {
                return hasContentEditableState(function(root, node) {
                    for (;node && node != root; ) {
                        if (hasContentEditableState(node, "true") || hasContentEditableState(node, "false")) return node;
                        node = node.parentNode;
                    }
                    return null;
                }(editor.getBody(), elm), "false");
            }
            function nativeControlSelect(e) {
                var target = e.srcElement;
                isWithinContentEditableFalse(target) ? function(e) {
                    e.preventDefault ? e.preventDefault() : e.returnValue = !1;
                }(e) : target != selectedElm && (editor.onObjectSelected.dispatch(editor, target), 
                detachResizeStartListener(), 0 === target.id.indexOf("mceResizeHandle") ? e.returnValue = !1 : "IMG" != target.nodeName && "TABLE" != target.nodeName || (hideResizeRect(), 
                attachEvent(selectedElm = target, "resizestart", resizeNativeStart)));
            }
            function detachResizeStartListener() {
                detachEvent(selectedElm, "resizestart", resizeNativeStart);
            }
            function unbindResizeHandleEvents() {
                for (var name in resizeHandles) (name = resizeHandles[name]).elm && (dom.unbind(name.elm), 
                delete name.elm);
            }
            function disableGeckoResize() {
                try {
                    editor.getDoc().execCommand("enableObjectResizing", !1, !1);
                } catch (ex) {}
            }
            function controlSelect(elm) {
                var ctrlRng;
                if (isIE) {
                    ctrlRng = editableDoc.body.createControlRange();
                    try {
                        return ctrlRng.addElement(elm), ctrlRng.select(), !0;
                    } catch (ex) {}
                }
            }
            function selectControl(editor, e) {
                var target = e.target, nodeName = target.nodeName;
                resizeStarted || !/^(TABLE|IMG|HR)$/.test(nodeName) || isWithinContentEditableFalse(target) || (editor.selection.select(target, "TABLE" == nodeName), 
                "mousedown" == e.type && editor.nodeChanged());
            }
            return editor.onObjectSelected = new Dispatcher(), editor.onObjectResizeStart = new Dispatcher(), 
            editor.onObjectResized = new Dispatcher(), resizeHandles = {
                nw: [ 0, 0, -1, -1 ],
                ne: [ 1, 0, 1, -1 ],
                se: [ 1, 1, 1, 1 ],
                sw: [ 0, 1, -1, 1 ]
            }, editor.onInit.add(function(editor) {
                isIE ? (editor.onObjectResized.add(function(editor, e) {
                    "TABLE" != e.target.nodeName && (hideResizeRect(), controlSelect(e.target));
                }), attachEvent(rootElement, "controlselect", nativeControlSelect), 
                editor.onMouseDown.add(function(editor, e) {
                    lastMouseDownEvent = e;
                })) : (disableGeckoResize(), (11 <= tinymce.isIE || tinymce.isIE12) && (editor.onClick.add(selectControl), 
                editor.onMouseDown.add(selectControl), editor.dom.bind(rootElement, "mscontrolselect", function(e) {
                    function delayedSelect(node) {
                        setTimeout(function() {
                            editor.selection.select(node);
                        }, 0);
                    }
                    isWithinContentEditableFalse(e.target) ? (e.preventDefault(), 
                    delayedSelect(e.target)) : /^(TABLE|IMG|HR)$/.test(e.target.nodeName) && (e.preventDefault(), 
                    "IMG" == e.target.tagName) && delayedSelect(e.target);
                }))), callback = function(e) {
                    updateResizeRect(e);
                }, (func = function() {
                    var args = arguments;
                    clearTimeout(timer), timer = setTimeout(function() {
                        callback.apply(this, args);
                    }, 0);
                }).stop = function() {
                    clearTimeout(timer);
                };
                var callback, timer, func, throttledUpdateResizeRect = func;
                function updateTableRect(editor, e) {
                    selectedElm && "TABLE" == selectedElm.nodeName && throttledUpdateResizeRect(e);
                }
                editor.onNodeChange.add(function() {
                    setTimeout(function() {
                        throttledUpdateResizeRect({
                            type: ""
                        });
                    }, 100);
                }), editor.dom.bind(editor.getBody(), "drop", function(e) {
                    throttledUpdateResizeRect(e);
                }), editor.onBeforeGetContent.add(hideResizeRect), editor.onKeyUp.add(updateTableRect), 
                editor.dom.bind(editor.getBody(), "compositionend", function(e) {
                    updateTableRect(0, e);
                }), editor.onBlur.add(hideResizeRect), editor.onHide.add(hideResizeRect);
            }), editor.onRemove.add(unbindResizeHandleEvents), {
                isResizable: isResizable,
                showResizeRect: showResizeRect,
                hideResizeRect: hideResizeRect,
                updateResizeRect: updateResizeRect,
                controlSelect: controlSelect,
                destroy: function() {
                    selectedElm = selectedElmGhost = null, isIE && (detachResizeStartListener(), 
                    detachEvent(rootElement, "controlselect", nativeControlSelect));
                }
            };
        };
    }(tinymce), function(tinymce) {
        var each = tinymce.each, extend = tinymce.extend, TreeWalker = tinymce.dom.TreeWalker, BookmarkManager = tinymce.dom.BookmarkManager, ControlSelection = tinymce.dom.ControlSelection, RangeUtils = tinymce.dom.RangeUtils, CaretPosition = tinymce.caret.CaretPosition, Zwsp = tinymce.text.Zwsp, ScrollIntoView = tinymce.dom.ScrollIntoView, Env = tinymce.util.Env;
        tinymce.dom.Selection = function(dom, win, serializer, editor) {
            var self = this;
            self.dom = dom, self.win = win, self.serializer = serializer, self.editor = editor, 
            self.bookmarkManager = new BookmarkManager(self), self.controlSelection = new ControlSelection(self, editor), 
            each([ "onBeforeSetContent", "onBeforeGetContent", "onSetContent", "onGetContent", "onGetSelectionRange", "onSetSelectionRange", "onAfterSetSelectionRange" ], function(e) {
                self[e] = new tinymce.util.Dispatcher(self);
            }), self.onBeforeSetContent.add(function(e, args) {
                var node;
                "raw" !== args.format && (node = new tinymce.html.DomParser(editor.settings, editor.schema).parse(args.content, extend(args, {
                    isRootContent: !0,
                    forced_root_block: !1
                })), args.content = new tinymce.html.Serializer({
                    validate: !1
                }, editor.schema).serialize(node));
            }), tinymce.addUnload(self.destroy, self);
        }, tinymce.dom.Selection.prototype = {
            setCursorLocation: function(node, offset) {
                var rng = this.dom.createRng();
                node ? (rng.setStart(node, offset), rng.setEnd(node, offset), this.setRng(rng), 
                this.collapse(!1)) : (this._moveEndPoint(rng, this.editor.getBody(), !0), 
                this.setRng(rng));
            },
            getContextualFragment: function(rng, frag) {
                var ed = this.editor, dom = this.dom, node = rng.commonAncestorContainer;
                if (node === ed.getBody()) return frag;
                var nodes, tableCells = dom.select("td[data-mce-selected], th[data-mce-selected], td.mceSelected, th.mceSelected", node);
                if (tableCells.length) {
                    var row, table = dom.getParent(node, "table");
                    if (table) return table = dom.clone(table), row = dom.create("tr"), 
                    each(tableCells, function(cell) {
                        row.appendChild(dom.clone(cell, !0));
                    }), table.appendChild(row), table;
                }
                return !rng.collapsed && (tableCells = dom.getParents(node, null, ed.getBody()), 
                (table = tinymce.grep(tableCells, function(elm) {
                    return 1 === elm.nodeType && !function(elm) {
                        return dom.isBlock(elm) && !/H[1-6]/.test(elm.nodeName);
                    }(elm);
                })).length) ? (nodes = document.createDocumentFragment(), each(table, function(elm) {
                    (elm = dom.clone(elm)).appendChild(frag), nodes.appendChild(elm);
                }), nodes) : frag;
            },
            getContent: function(args) {
                var whiteSpaceAfter, rng = this.getRng(), tmpElm = this.dom.create("body"), se = this.getSel(), whiteSpaceBefore = whiteSpaceAfter = "";
                return (args = args || {}).get = !0, args.format = args.format || "html", 
                args.selection = !0, this.onBeforeGetContent.dispatch(this, args), 
                "text" === args.format ? this.isCollapsed() ? "" : Zwsp.trim(rng.text || (se.toString ? se.toString() : "")) : (rng.cloneContents ? (se = rng.cloneContents()) && (args.contextual && (se = this.getContextualFragment(rng, se)), 
                tmpElm.appendChild(se)) : void 0 !== rng.item || void 0 !== rng.htmlText ? (tmpElm.innerHTML = "<br>" + (rng.item ? rng.item(0).outerHTML : rng.htmlText), 
                tmpElm.removeChild(tmpElm.firstChild)) : tmpElm.innerHTML = rng.toString(), 
                /^\s/.test(tmpElm.innerHTML) && (whiteSpaceBefore = " "), /\s+$/.test(tmpElm.innerHTML) && (whiteSpaceAfter = " "), 
                args.getInner = !0, args.content = this.isCollapsed() ? "" : whiteSpaceBefore + this.serializer.serialize(tmpElm, args) + whiteSpaceAfter, 
                this.onGetContent.dispatch(this, args), args.content);
            },
            setContent: function(content, args) {
                var frag, temp, rng = this.getRng(), doc = this.win.document;
                if ((args = args || {
                    format: "html"
                }).set = !0, args.selection = !0, args.content = content, args.no_events || this.onBeforeSetContent.dispatch(this, args), 
                content = args.content, rng.insertNode) {
                    content += '<span id="__caret">_</span>', rng.startContainer == doc && rng.endContainer == doc || (rng.deleteContents(), 
                    0 === doc.body.childNodes.length) ? doc.body.innerHTML = content : rng.createContextualFragment ? rng.insertNode(rng.createContextualFragment(content)) : (frag = doc.createDocumentFragment(), 
                    temp = doc.createElement("div"), frag.appendChild(temp), temp.outerHTML = content, 
                    rng.insertNode(frag)), temp = this.dom.get("__caret"), (rng = doc.createRange()).setStartBefore(temp), 
                    rng.setEndBefore(temp), this.setRng(rng), this.dom.remove("__caret");
                    try {
                        this.setRng(rng);
                    } catch (ex) {}
                } else rng.item && (doc.execCommand("Delete", !1, null), rng = this.getRng()), 
                /^\s+/.test(content) ? (rng.pasteHTML('<span id="__mce_tmp">_</span>' + content), 
                this.dom.remove("__mce_tmp")) : rng.pasteHTML(content);
                args.no_events || this.onSetContent.dispatch(this, args);
            },
            getStart: function(real) {
                var startElement, parentElement, checkRng, node, rng = this.getRng();
                if (rng.duplicate || rng.item) {
                    if (rng.item) return rng.item(0);
                    for ((checkRng = rng.duplicate()).collapse(1), (startElement = checkRng.parentElement()).ownerDocument !== this.dom.doc && (startElement = this.dom.getRoot()), 
                    parentElement = node = rng.parentElement(); node = node.parentNode; ) if (node == startElement) {
                        startElement = parentElement;
                        break;
                    }
                    return startElement;
                }
                return (startElement = 1 != (startElement = rng.startContainer).nodeType || !startElement.hasChildNodes() || real && rng.collapsed ? startElement : startElement.childNodes[Math.min(startElement.childNodes.length - 1, rng.startOffset)]) && 3 == startElement.nodeType ? startElement.parentNode : startElement;
            },
            getEnd: function(real) {
                var endElement, endOffset, rng = this.getRng();
                return rng.duplicate || rng.item ? rng.item ? rng.item(0) : ((rng = rng.duplicate()).collapse(0), 
                (endElement = (endElement = rng.parentElement()).ownerDocument !== this.dom.doc ? this.dom.getRoot() : endElement) && "BODY" == endElement.nodeName && endElement.lastChild || endElement) : (endElement = rng.endContainer, 
                endOffset = rng.endOffset, (endElement = 1 != endElement.nodeType || !endElement.hasChildNodes() || real && rng.collapsed ? endElement : endElement.childNodes[0 < endOffset ? endOffset - 1 : endOffset]) && 3 == endElement.nodeType ? endElement.parentNode : endElement);
            },
            getBookmark: function(type, normalized) {
                return this.bookmarkManager.getBookmark(type, normalized);
            },
            moveToBookmark: function(bookmark) {
                return this.bookmarkManager.moveToBookmark(bookmark);
            },
            select: function(node, content) {
                var dom = this.dom, rng = dom.createRng();
                if (this.lastFocusBookmark = null, node) {
                    if (!content && this.controlSelection.controlSelect(node)) return;
                    dom = dom.nodeIndex(node), rng.setStart(node.parentNode, dom), 
                    rng.setEnd(node.parentNode, dom + 1), content && (this._moveEndPoint(rng, node, !0), 
                    this._moveEndPoint(rng, node)), this.setRng(rng);
                }
                return node;
            },
            isCollapsed: function() {
                var rng = this.getRng(), sel = this.getSel();
                return !(!rng || rng.item) && (rng.compareEndPoints ? 0 === rng.compareEndPoints("StartToEnd", rng) : !sel || rng.collapsed);
            },
            collapse: function(toStart) {
                var node, rng = this.getRng();
                rng.item && (node = rng.item(0), (rng = this.win.document.body.createTextRange()).moveToElementText(node)), 
                rng.collapse(!!toStart), this.setRng(rng);
            },
            getSel: function() {
                var win = this.win;
                return win.getSelection ? win.getSelection() : win.document.selection;
            },
            getRng: function(w3c) {
                var selection, rng, doc, element;
                function tryCompareBoundaryPoints(how, sourceRange, destinationRange) {
                    try {
                        return sourceRange.compareBoundaryPoints(how, destinationRange);
                    } catch (ex) {
                        return -1;
                    }
                }
                if (!this.win) return null;
                if (null == (doc = this.win.document)) return null;
                if (!w3c && this.lastFocusBookmark) (w3c = this.lastFocusBookmark).startContainer ? ((rng = doc.createRange()).setStart(w3c.startContainer, w3c.startOffset), 
                rng.setEnd(w3c.endContainer, w3c.endOffset)) : rng = w3c; else {
                    try {
                        !(selection = this.getSel()) || (element = selection.anchorNode) && !Object.getPrototypeOf(element) || (rng = 0 < selection.rangeCount ? selection.getRangeAt(0) : (selection.createRange ? selection : doc).createRange());
                    } catch (ex) {}
                    if (this.onGetSelectionRange.dispatch(this, w3c = {
                        range: rng
                    }), w3c.range !== rng) return w3c.range;
                    (rng = rng || (doc.createRange ? doc.createRange() : doc.body.createTextRange())).setStart && 9 === rng.startContainer.nodeType && rng.collapsed && (element = this.dom.getRoot(), 
                    rng.setStart(element, 0), rng.setEnd(element, 0)), this.selectedRange && this.explicitRange && (0 === tryCompareBoundaryPoints(rng.START_TO_START, rng, this.selectedRange) && 0 === tryCompareBoundaryPoints(rng.END_TO_END, rng, this.selectedRange) ? rng = this.explicitRange : (this.selectedRange = null, 
                    this.explicitRange = null));
                }
                return rng;
            },
            setRng: function(rng, forward) {
                if (rng) if (rng.select) {
                    this.explicitRange = null;
                    try {
                        rng.select();
                    } catch (ex) {}
                } else {
                    var evt, sel = this.getSel();
                    if (this.onSetSelectionRange.dispatch(this, evt = {
                        range: rng
                    }), rng = evt.range, sel) {
                        this.explicitRange = rng;
                        try {
                            sel.removeAllRanges(), sel.addRange(rng);
                        } catch (ex) {}
                        !1 === forward && sel.extend && (sel.collapse(rng.endContainer, rng.endOffset), 
                        sel.extend(rng.startContainer, rng.startOffset)), this.selectedRange = 0 < sel.rangeCount ? sel.getRangeAt(0) : null;
                    }
                    !rng.collapsed && rng.startContainer === rng.endContainer && sel.setBaseAndExtent && rng.endOffset - rng.startOffset < 2 && rng.startContainer.hasChildNodes() && (evt = rng.startContainer.childNodes[rng.startOffset]) && "IMG" === evt.tagName && (sel.setBaseAndExtent(rng.startContainer, rng.startOffset, rng.endContainer, rng.endOffset), 
                    sel.anchorNode === rng.startContainer && sel.focusNode === rng.endContainer || sel.setBaseAndExtent(evt, 0, evt, 1)), 
                    this.onAfterSetSelectionRange.dispatch(this, {
                        range: rng
                    });
                }
            },
            setNode: function(elm) {
                return this.setContent(this.dom.getOuterHTML(elm)), elm;
            },
            getNode: function() {
                var elm, startContainer, endContainer, startOffset, endOffset, rng = this.getRng(), root = this.dom.getRoot();
                function skipEmptyTextNodes(node, forwards) {
                    for (var orig = node; node && 3 === node.nodeType && 0 === node.length; ) node = forwards ? node.nextSibling : node.previousSibling;
                    return node || orig;
                }
                return rng ? (startContainer = rng.startContainer, endContainer = rng.endContainer, 
                startOffset = rng.startOffset, endOffset = rng.endOffset, rng.setStart ? (elm = rng.commonAncestorContainer, 
                !rng.collapsed && (startContainer == endContainer && endOffset - startOffset < 2 && startContainer.hasChildNodes() && (elm = startContainer.childNodes[startOffset]), 
                3 === startContainer.nodeType) && 3 === endContainer.nodeType && (startContainer = startContainer.length === startOffset ? skipEmptyTextNodes(startContainer.nextSibling, !0) : startContainer.parentNode, 
                endContainer = 0 === endOffset ? skipEmptyTextNodes(endContainer.previousSibling, !1) : endContainer.parentNode, 
                startContainer) && startContainer === endContainer ? startContainer : elm && 3 == elm.nodeType ? elm.parentNode : elm) : rng.item ? rng.item(0) : rng.parentElement()) : root;
            },
            getSelectedBlocks: function(startElm, endElm) {
                var dom = this.dom, selectedBlocks = [], root = dom.getRoot();
                if (startElm = dom.getParent(startElm || this.getStart(), dom.isBlock), 
                endElm = dom.getParent(endElm || this.getEnd(), dom.isBlock), startElm && startElm != root && selectedBlocks.push(startElm), 
                startElm && endElm && startElm != endElm) for (var node, walker = new TreeWalker(startElm, root); (node = walker.next()) && node != endElm; ) dom.isBlock(node) && selectedBlocks.push(node);
                return endElm && startElm != endElm && endElm != root && selectedBlocks.push(endElm), 
                selectedBlocks;
            },
            isForward: function() {
                var anchorRange, dom = this.dom, sel = this.getSel();
                return !(sel && sel.anchorNode && sel.focusNode) || ((anchorRange = dom.createRng()).setStart(sel.anchorNode, sel.anchorOffset), 
                anchorRange.collapse(!0), (dom = dom.createRng()).setStart(sel.focusNode, sel.focusOffset), 
                dom.collapse(!0), anchorRange.compareBoundaryPoints(anchorRange.START_TO_START, dom) <= 0);
            },
            normalize: function() {
                var rng = this.getRng();
                return Env.range && new RangeUtils(this.dom).normalize(rng) && this.setRng(rng, this.isForward()), 
                rng;
            },
            selectorChanged: function(selector, callback) {
                var currentSelectors, self = this;
                return self.selectorChangedData || (self.selectorChangedData = {}, 
                currentSelectors = {}, self.editor.onNodeChange.addToTop(function(ed, cm, node) {
                    var dom = self.dom, parents = dom.getParents(node, null, dom.getRoot()), matchedSelectors = {};
                    each(self.selectorChangedData, function(callbacks, selector) {
                        each(parents, function(node) {
                            if (dom.is(node, selector)) return currentSelectors[selector] || (each(callbacks, function(callback) {
                                callback(!0, {
                                    node: node,
                                    selector: selector,
                                    parents: parents
                                });
                            }), currentSelectors[selector] = callbacks), matchedSelectors[selector] = callbacks, 
                            !1;
                        });
                    }), each(currentSelectors, function(callbacks, selector) {
                        matchedSelectors[selector] || (delete currentSelectors[selector], 
                        each(callbacks, function(callback) {
                            callback(!1, {
                                node: node,
                                selector: selector,
                                parents: parents
                            });
                        }));
                    });
                })), self.selectorChangedData[selector] || (self.selectorChangedData[selector] = []), 
                self.selectorChangedData[selector].push(callback), self;
            },
            getScrollContainer: function() {
                for (var scrollContainer, node = this.dom.getRoot(); node && "BODY" != node.nodeName; ) {
                    if (node.scrollHeight > node.clientHeight) {
                        scrollContainer = node;
                        break;
                    }
                    node = node.parentNode;
                }
                return scrollContainer;
            },
            scrollIntoView: function(elm, alignToTop) {
                ScrollIntoView(this.editor, elm, alignToTop);
            },
            placeCaretAt: function(clientX, clientY) {
                this.setRng(RangeUtils.getCaretRangeFromPoint(clientX, clientY, this.editor.getDoc()));
            },
            _moveEndPoint: function(rng, node, start) {
                var root = node, walker = new TreeWalker(node, root), nonEmptyElementsMap = this.dom.schema.getNonEmptyElements();
                do {
                    if (3 == node.nodeType && 0 !== tinymce.trim(node.nodeValue).length) return void (start ? rng.setStart(node, 0) : rng.setEnd(node, node.nodeValue.length));
                    if (nonEmptyElementsMap[node.nodeName] && !/^(TD|TH)$/.test(node.nodeName)) return void (start ? rng.setStartBefore(node) : "BR" == node.nodeName ? rng.setEndBefore(node) : rng.setEndAfter(node));
                } while (node = start ? walker.next() : walker.prev());
                "BODY" == root.nodeName && (start ? rng.setStart(root, 0) : rng.setEnd(root, root.childNodes.length));
            },
            getBoundingClientRect: function() {
                var rng = this.getRng();
                return rng.collapsed ? CaretPosition.fromRangeStart(rng).getClientRects()[0] : rng.getBoundingClientRect();
            },
            destroy: function() {
                this.win = null, this.controlSelection.destroy();
            },
            _fixIESelection: function() {
                var started, startRng, htmlElm, dom = this.dom, doc = dom.doc, body = doc.body;
                function rngFromPoint(x, y) {
                    var rng = body.createTextRange();
                    try {
                        rng.moveToPoint(x, y);
                    } catch (ex) {
                        rng = null;
                    }
                    return rng;
                }
                function selectionChange(e) {
                    e.button ? (e = rngFromPoint(e.x, e.y)) && (0 < e.compareEndPoints("StartToStart", startRng) ? e.setEndPoint("StartToStart", startRng) : e.setEndPoint("EndToEnd", startRng), 
                    e.select()) : endSelection();
                }
                function endSelection() {
                    var rng = doc.selection.createRange();
                    startRng && !rng.item && 0 === rng.compareEndPoints("StartToEnd", rng) && startRng.select(), 
                    dom.unbind(doc, "mouseup", endSelection), dom.unbind(doc, "mousemove", selectionChange), 
                    startRng = started = 0;
                }
                doc.documentElement.unselectable = !0, dom.bind(doc, [ "mousedown", "contextmenu" ], function(e) {
                    "HTML" === e.target.nodeName && (started && endSelection(), 
                    (htmlElm = doc.documentElement).scrollHeight > htmlElm.clientHeight || (started = 1, 
                    (startRng = rngFromPoint(e.x, e.y)) && (dom.bind(doc, "mouseup", endSelection), 
                    dom.bind(doc, "mousemove", selectionChange), dom.win.focus(), 
                    startRng.select())));
                });
            }
        };
    }(tinymce), function(tinymce) {
        tinymce.dom.Serializer = function(settings, dom, schema) {
            var htmlParser, self = this, each = tinymce.each, tempAttrs = (settings.apply_source_formatting || (settings.indent = !1), 
            dom = dom || tinymce.DOM, schema = schema || new tinymce.html.Schema(settings), 
            settings.entity_encoding = settings.entity_encoding || "named", settings.remove_trailing_brs = !("remove_trailing_brs" in settings) || settings.remove_trailing_brs, 
            settings.element_format = settings.element_format || "xhtml", [ "data-mce-selected" ]), onPreProcess = new tinymce.util.Dispatcher(self), onPostProcess = new tinymce.util.Dispatcher(self);
            return (htmlParser = new tinymce.html.DomParser(settings, schema)).addAttributeFilter("data-mce-tabindex", function(nodes, name) {
                for (var node, i = nodes.length; i--; ) (node = nodes[i]).attr("tabindex", node.attributes.map["data-mce-tabindex"]), 
                node.attr(name, null);
            }), htmlParser.addAttributeFilter("src,href,style", function(nodes, name) {
                for (var node, value, i = nodes.length, internalName = "data-mce-" + name, urlConverter = settings.url_converter, urlConverterScope = settings.url_converter_scope; i--; ) void 0 !== (value = (node = nodes[i]).attributes.map[internalName]) ? (node.attr(name, 0 < value.length ? value : null), 
                node.attr(internalName, null)) : (value = node.attributes.map[name], 
                "style" === name ? settings.validate_styles && (value = dom.serializeStyle(dom.parseStyle(value), node.name)) : urlConverter && (value = urlConverter.call(urlConverterScope, value, name, node.name)), 
                node.attr(name, 0 < value.length ? value : null));
            }), htmlParser.addAttributeFilter("class", function(nodes) {
                for (var node, value, i = nodes.length; i--; ) (value = (node = nodes[i]).attr("class")) && (value = (value = node.attr("class").replace(/(?:^|\s)mce(-?)(Item[\w-]+|Selected)(?!\S)/gi, "")).replace(/\s+/g, " ").replace(/^\s*|\s*$/g, ""), 
                node.attr("class", 0 < value.length ? value : null));
            }), htmlParser.addAttributeFilter("data-mce-type", function(nodes, name, args) {
                for (var node, i = nodes.length; i--; ) "temp" !== (node = nodes[i]).attributes.map["data-mce-type"] && ("bookmark" !== node.attributes.map["data-mce-type"] || args.cleanup) || node.remove();
            }), htmlParser.addNodeFilter("noscript", function(nodes) {
                for (var node, i = nodes.length; i--; ) (node = nodes[i].firstChild) && (node.value = tinymce.html.Entities.decode(node.value));
            }), htmlParser.addNodeFilter("script,style", function(nodes, name) {
                var node, firstChild, value, parent, i = nodes.length;
                function trim(value) {
                    return value.replace(/(<!--\[CDATA\[|\]\]-->)/g, "\n").replace(/^[\r\n]*|[\r\n]*$/g, "").replace(/^\s*((<!--)?(\s*\/\/)?\s*<!\[CDATA\[|(<!--\s*)?\/\*\s*<!\[CDATA\[\s*\*\/|(\/\/)?\s*<!--|\/\*\s*<!--\s*\*\/)\s*[\r\n]*/gi, "").replace(/\s*(\/\*\s*\]\]>\s*\*\/(-->)?|\s*\/\/\s*\]\]>(-->)?|\/\/\s*(-->)?|\]\]>|\/\*\s*-->\s*\*\/|\s*-->\s*)\s*$/g, "");
                }
                for (;i--; ) value = (firstChild = (node = nodes[i]).firstChild) ? firstChild.value : "", 
                (parent = node.parent) && "pre" === parent.name || ("script" === name ? ((parent = node.attr("type")) && node.attr("type", "mce-no/type" == parent ? null : parent.replace(/^mce\-/, "")), 
                "xhtml" === settings.element_format && firstChild && 0 < value.length && (firstChild.value = "// <![CDATA[\n" + trim(value) + "\n// ]]>")) : "xhtml" === settings.element_format && firstChild && 0 < value.length && (firstChild.value = "\x3c!--\n" + trim(value) + "\n--\x3e"));
            }), htmlParser.addNodeFilter("#comment", function(nodes) {
                for (var node, i = nodes.length; i--; ) 0 === (node = nodes[i]).value.indexOf("[CDATA[") ? (node.name = "#cdata", 
                node.type = 4, node.value = node.value.replace(/^\[CDATA\[|\]\]$/g, "")) : 0 === node.value.indexOf("mce:protected ") && (node.name = "#text", 
                node.type = 3, node.raw = !0, node.value = unescape(node.value).substr(14));
            }), htmlParser.addNodeFilter("xml:namespace,input", function(nodes, name) {
                for (var node, i = nodes.length; i--; ) 7 === (node = nodes[i]).type ? node.remove() : 1 !== node.type || "input" !== name || "type" in node.attributes.map || node.attr("type", "text");
            }), settings.fix_list_elements && htmlParser.addNodeFilter("ul,ol", function(nodes) {
                for (var node, parentNode, i = nodes.length; i--; ) "ul" !== (parentNode = (node = nodes[i]).parent).name && "ol" !== parentNode.name || node.prev && "li" === node.prev.name && node.prev.append(node);
            }), htmlParser.addAttributeFilter("data-mce-src,data-mce-href,data-mce-style,data-mce-selected,data-mce-expando,data-mce-block,data-mce-type,data-mce-resize,data-mce-placeholder", function(nodes, name) {
                for (var i = nodes.length; i--; ) nodes[i].attr(name, null);
            }), {
                schema: schema,
                addNodeFilter: htmlParser.addNodeFilter,
                addAttributeFilter: htmlParser.addAttributeFilter,
                onPreProcess: onPreProcess,
                onPostProcess: onPostProcess,
                serialize: function(node, args) {
                    var doc, oldDoc, rootNode, brNode2, node = node.cloneNode(!0), impl = document.implementation;
                    return impl.createHTMLDocument && (doc = impl.createHTMLDocument(""), 
                    each("BODY" == node.nodeName ? node.childNodes : [ node ], function(node) {
                        doc.body.appendChild(doc.importNode(node, !0));
                    }), node = "BODY" != node.nodeName ? doc.body.firstChild : doc.body, 
                    oldDoc = dom.doc, dom.doc = doc), (args = args || {}).format = args.format || "html", 
                    args.selection && (args.forced_root_block = ""), args.no_events || (args.node = node, 
                    onPreProcess.dispatch(self, args)), isBr(rootNode = (rootNode = impl = htmlParser.parse(tinymce.trim(args.getInner ? node.innerHTML : dom.getOuterHTML(node)), args)).lastChild) && isBr(brNode2 = rootNode.prev) && (rootNode.remove(), 
                    brNode2.remove()), node = new tinymce.html.Serializer(settings, schema), 
                    args.content = node.serialize(impl), args.cleanup || (args.content = args.content.replace(/\uFEFF/g, "")), 
                    args.no_events || onPostProcess.dispatch(self, args), oldDoc && (dom.doc = oldDoc), 
                    args.node = null, args.content;
                    function isBr(node) {
                        return node && "br" === node.name;
                    }
                },
                addRules: function(rules) {
                    schema.addValidElements(rules);
                },
                setRules: function(rules) {
                    schema.setValidElements(rules);
                },
                addTempAttr: function(name) {
                    -1 === tinymce.inArray(tempAttrs, name) && (htmlParser.addAttributeFilter(name, function(nodes, name) {
                        for (var i = nodes.length; i--; ) nodes[i].attr(name, null);
                    }), tempAttrs.push(name));
                },
                getTempAttrs: function() {
                    return tempAttrs;
                }
            };
        };
    }(tinymce), function(tinymce) {
        tinymce.dom.ScriptLoader = function() {
            var states = {}, queue = [], scriptLoadedCallbacks = {}, queueLoadedCallbacks = [], loading = 0;
            this.isDone = function(url) {
                return 2 == states[url];
            }, this.markDone = function(url) {
                states[url] = 2;
            }, this.add = this.load = function(url, callback, scope) {
                null == states[url] && (queue.push(url), states[url] = 0), callback && (scriptLoadedCallbacks[url] || (scriptLoadedCallbacks[url] = []), 
                scriptLoadedCallbacks[url].push({
                    func: callback,
                    scope: scope || this
                }));
            }, this.loadQueue = function(callback, scope) {
                this.loadScripts(queue, callback, scope);
            }, this.loadScripts = function(scripts, callback, scope) {
                var loadScripts;
                function execScriptLoadedCallbacks(url) {
                    tinymce.each(scriptLoadedCallbacks[url], function(callback) {
                        callback.func.call(callback.scope);
                    }), scriptLoadedCallbacks[url] = void 0;
                }
                queueLoadedCallbacks.push({
                    func: callback,
                    scope: scope || this
                }), (loadScripts = function() {
                    var loadingScripts = tinymce.grep(scripts);
                    scripts.length = 0, tinymce.each(loadingScripts, function(url) {
                        2 == states[url] ? execScriptLoadedCallbacks(url) : 1 != states[url] && (states[url] = 1, 
                        loading++, function(url, callback) {
                            var elm, id, dom = tinymce.DOM;
                            function done() {
                                dom.remove(id), elm && (elm.onreadystatechange = elm.onload = elm = null), 
                                callback();
                            }
                            id = dom.uniqueId(), (elm = document.createElement("script")).setAttribute("data-cfasync", !1), 
                            elm.id = id, elm.type = "text/javascript", elm.src = tinymce._addVer(url), 
                            tinymce.isIE && !tinymce.isIE11 || (elm.onload = done), 
                            elm.onerror = function() {
                                "undefined" != typeof console && console.log && console.log("Failed to load: " + url);
                            }, tinymce.isOpera || (elm.onreadystatechange = function() {
                                var state = elm.readyState;
                                "complete" != state && "loaded" != state || done();
                            }), (document.getElementsByTagName("head")[0] || document.body).appendChild(elm);
                        }(url, function() {
                            states[url] = 2, loading--, execScriptLoadedCallbacks(url), 
                            loadScripts();
                        }));
                    }), loading || (tinymce.each(queueLoadedCallbacks, function(callback) {
                        callback.func.call(callback.scope);
                    }), queueLoadedCallbacks.length = 0);
                })();
            };
        }, tinymce.ScriptLoader = new tinymce.dom.ScriptLoader();
    }(tinymce), function(tinymce) {
        tinymce.dom.StyleSheetLoader = function(document) {
            var states = {}, queue = [], stylesheetLoadedCallbacks = {}, queueLoadedCallbacks = [], loading = 0, maxLoadTime = 5e3;
            function loadStylesheet(url, callback) {
                var elm, id, startTime, complete;
                function done() {
                    complete || (complete = !0, elm && (elm.onreadystatechange = elm.onload = elm = null), 
                    callback());
                }
                function error() {
                    "undefined" != typeof console && console.log && console.log("Failed to load: " + url), 
                    done();
                }
                id = tinymce.DOM.uniqueId(), (elm = document.createElement("link")).rel = "stylesheet", 
                elm.type = "text/css", elm.href = tinymce._addVer(url), elm.async = !1, 
                elm.defer = !1, startTime = new Date().getTime(), elm.setAttribute("data-cfasync", !1), 
                elm.id = id, elm.onload = function waitForLoaded() {
                    var waitCallback = waitForLoaded;
                    !function() {
                        for (var styleSheet, styleSheets = document.styleSheets, i = styleSheets.length; i--; ) if ((styleSheet = (styleSheet = styleSheets[i]).ownerNode || styleSheet.owningElement) && styleSheet.id === elm.id) return done(), 
                        1;
                    }() && (new Date().getTime() - startTime < maxLoadTime ? setTimeout(waitCallback) : error());
                }, elm.onerror = error, (document.getElementsByTagName("head")[0] || document.body).appendChild(elm);
            }
            this.isDone = function(url) {
                return 2 == states[url];
            }, this.markDone = function(url) {
                states[url] = 2;
            }, this.add = this.load = function(url, callback, scope) {
                null == states[url] && (queue.push(url), states[url] = 0), callback && (stylesheetLoadedCallbacks[url] || (stylesheetLoadedCallbacks[url] = []), 
                stylesheetLoadedCallbacks[url].push({
                    func: callback,
                    scope: scope || this
                }));
            }, this.loadQueue = function(callback, scope) {
                this.loadStylesheets(queue, callback, scope);
            }, this.loadStylesheets = function(stylesheets, callback, scope) {
                var loadStylesheets;
                function execstylesheetLoadedCallbacks(url) {
                    tinymce.each(stylesheetLoadedCallbacks[url], function(callback) {
                        callback.func.call(callback.scope);
                    }), stylesheetLoadedCallbacks[url] = void 0;
                }
                queueLoadedCallbacks.push({
                    func: callback,
                    scope: scope || this
                }), (loadStylesheets = function() {
                    var loadingstylesheets = tinymce.grep(stylesheets);
                    stylesheets.length = 0, tinymce.each(loadingstylesheets, function(url) {
                        2 == states[url] ? execstylesheetLoadedCallbacks(url) : 1 != states[url] && (states[url] = 1, 
                        loading++, loadStylesheet(url, function() {
                            states[url] = 2, loading--, execstylesheetLoadedCallbacks(url), 
                            loadStylesheets();
                        }));
                    }), loading || (tinymce.each(queueLoadedCallbacks, function(callback) {
                        callback.func.call(callback.scope);
                    }), queueLoadedCallbacks.length = 0);
                })();
            }, this.loadStylesheet = loadStylesheet;
        }, tinymce.StyleSheetLoader = new tinymce.dom.StyleSheetLoader();
    }(tinymce), function(tinymce) {
        function isUIElement(editor, elm) {
            var customSelector = editor ? editor.settings.custom_ui_selector : "";
            return null !== DOM.getParent(elm, function(elm) {
                return FocusManager.isEditorUIElement(elm) || !!customSelector && editor.dom.is(elm, customSelector);
            });
        }
        var selectionChangeHandler, documentFocusInHandler, documentMouseUpHandler, DOM = tinymce.DOM;
        function FocusManager(editorManager) {
            function registerEvents(editor) {
                editor.onSetContent.add(function() {
                    editor.lastRng = null;
                }), editor.onMouseDown.add(function() {
                    editor.selection.lastFocusBookmark = null;
                }), editor.onFocusIn.add(function() {
                    var lastRng, focusedEditor = editorManager.focusedEditor;
                    editor.selection.lastFocusBookmark && (lastRng = function(editor, bookmark) {
                        var rng;
                        return bookmark.startContainer ? ((rng = editor.getDoc().createRange()).setStart(bookmark.startContainer, bookmark.startOffset), 
                        rng.setEnd(bookmark.endContainer, bookmark.endOffset)) : rng = bookmark, 
                        rng;
                    }(editor, editor.selection.lastFocusBookmark), editor.selection.lastFocusBookmark = null, 
                    editor.selection.setRng(lastRng)), focusedEditor != editor && (focusedEditor && (focusedEditor.onBlur.dispatch(focusedEditor, {
                        focusedEditor: editor
                    }), focusedEditor.onDeactivate.dispatch(focusedEditor, editor)), 
                    editorManager.setActive(editor), (editorManager.focusedEditor = editor).onFocus.dispatch(editor, {
                        blurredEditor: focusedEditor
                    }), editor.onActivate.dispatch(editor, focusedEditor), editor.focus(!0)), 
                    editor.lastRng = null;
                }), editor.onFocusOut.add(function() {
                    setTimeout(function() {
                        var focusedEditor = editorManager.focusedEditor;
                        isUIElement(editor, function() {
                            try {
                                return document.activeElement;
                            } catch (ex) {
                                return document.body;
                            }
                        }()) || focusedEditor != editor || (editor.onBlur.dispatch(editor, {
                            focusedEditor: null
                        }), editorManager.focusedEditor = null, editor.selection && (editor.selection.lastFocusBookmark = null));
                    }, 10);
                }), documentFocusInHandler || (documentFocusInHandler = function(e) {
                    var dom, rng, activeEditor = editorManager.activeEditor, e = e.target;
                    activeEditor && e.ownerDocument === document && (activeEditor.selection && e !== activeEditor.getBody() && function(editor, target) {
                        return !1 === editor.dom.isChildOf(target, editor.getBody());
                    }(editor, e) && (activeEditor.selection.lastFocusBookmark = (dom = activeEditor.dom, 
                    (rng = activeEditor.lastRng) && rng.startContainer ? dom.isChildOf(rng.startContainer, dom.getRoot()) && dom.isChildOf(rng.endContainer, dom.getRoot()) ? {
                        startContainer: rng.startContainer,
                        startOffset: rng.startOffset,
                        endContainer: rng.endContainer,
                        endOffset: rng.endOffset
                    } : void 0 : rng)), e === document.body || isUIElement(activeEditor, e) || editorManager.focusedEditor !== activeEditor || (activeEditor.onBlur.dispatch(editor, {
                        focusedEditor: null
                    }), editorManager.focusedEditor = null));
                }, DOM.bind(document, "focusin", documentFocusInHandler));
            }
            editorManager.onAddEditor.add(function(mgr, editor) {
                registerEvents(editor);
            }), editorManager.onRemoveEditor.add(function(mgr, editor) {
                !function(editor) {
                    editorManager.focusedEditor == editor && (editorManager.focusedEditor = null), 
                    editorManager.activeEditor || (DOM.unbind(document, "selectionchange", selectionChangeHandler), 
                    DOM.unbind(document, "focusin", documentFocusInHandler), DOM.unbind(document, "mouseup", documentMouseUpHandler), 
                    selectionChangeHandler = documentFocusInHandler = documentMouseUpHandler = null);
                }(editor);
            });
        }
        FocusManager.isEditorUIElement = function(elm) {
            return -1 !== elm.className.toString().indexOf("mce");
        }, tinymce.dom.FocusManager = FocusManager;
    }(tinymce), function(tinymce) {
        var Event = tinymce.dom.Event, each = tinymce.each;
        tinymce.create("tinymce.ui.KeyboardNavigation", {
            KeyboardNavigation: function(settings, dom) {
                var itemFocussed, itemBlurred, rootKeydown, rootFocussed, focussedId, self = this, root = settings.root, items = settings.items, enableUpDown = settings.enableUpDown, enableLeftRight = settings.enableLeftRight || !settings.enableUpDown, excludeFromTabOrder = settings.excludeFromTabOrder, rootElm = (dom = dom || tinymce.DOM, 
                itemFocussed = function(evt) {
                    focussedId = evt.target.id;
                }, itemBlurred = function(evt) {
                    dom.setAttrib(evt.target.id, "tabindex", "-1");
                }, rootFocussed = function() {
                    var item = dom.get(focussedId);
                    dom.setAttrib(item, "tabindex", "0"), item.focus();
                }, this.focus = function() {
                    dom.get(focussedId).focus();
                }, this.update = function(value) {
                    each(items = value, function(item, idx) {
                        item.id || (item.id = dom.uniqueId("_mce_item_")), item = dom.get(item.id), 
                        idx = excludeFromTabOrder ? (dom.bind(item, "blur", itemBlurred), 
                        "-1") : 0 === idx ? "0" : "-1", item.setAttribute("tabindex", idx), 
                        dom.bind(item, "focus", itemFocussed);
                    });
                }, this.destroy = function() {
                    each(items, function(item) {
                        item = dom.get(item.id), dom.unbind(item, "focus", itemFocussed), 
                        dom.unbind(item, "blur", itemBlurred);
                    });
                    var rootElm = dom.get(root);
                    dom.unbind(rootElm, "focus", rootFocussed), dom.unbind(rootElm, "keydown", rootKeydown), 
                    items = dom = root = this.focus = itemFocussed = itemBlurred = rootKeydown = rootFocussed = null, 
                    this.destroy = function() {};
                }, this.moveFocus = function(dir, evt) {
                    var idx = -1;
                    focussedId && (each(items, function(item, index) {
                        if (item.id === focussedId) return idx = index, !1;
                    }), (idx += dir) < 0 ? idx = items.length - 1 : idx >= items.length && (idx = 0), 
                    dir = items[idx], dom.setAttrib(focussedId, "tabindex", "-1"), 
                    dom.setAttrib(dir.id, "tabindex", "0"), dom.get(dir.id).focus(), 
                    settings.actOnFocus && settings.onAction(dir.id), evt) && Event.cancel(evt);
                }, rootKeydown = function(evt) {
                    switch (evt.keyCode) {
                      case 37:
                        enableLeftRight && (self.moveFocus(-1), Event.cancel(evt));
                        break;

                      case 39:
                        enableLeftRight && (self.moveFocus(1), Event.cancel(evt));
                        break;

                      case 38:
                        enableUpDown && (self.moveFocus(-1), Event.cancel(evt));
                        break;

                      case 40:
                        enableUpDown && (self.moveFocus(1), Event.cancel(evt));
                        break;

                      case 27:
                        settings.onCancel && (settings.onCancel(), Event.cancel(evt));
                        break;

                      case 14:
                      case 13:
                      case 32:
                        settings.onAction && (Event.cancel(evt), settings.onAction(evt, focussedId));
                    }
                }, this.update(items), items[0] && (focussedId = items[0].id), dom.setAttrib(root, "tabindex", "-1"), 
                dom.get(root));
                dom.bind(rootElm, "focus", rootFocussed), dom.bind(rootElm, "keydown", rootKeydown);
            }
        });
    }(tinymce), function(tinymce) {
        var DOM = tinymce.DOM;
        tinymce.create("tinymce.ui.Control", {
            Control: function(id, settings, editor) {
                this.id = id, this.settings = settings || {}, this.rendered = !1, 
                this.onRender = new tinymce.util.Dispatcher(this), this.classPrefix = "mce", 
                this.scope = this.settings.scope || this, this.disabled = 0, this.active = 0, 
                this.editor = editor, this.type = "control", this.name = this.settings.name || id;
            },
            setAriaProperty: function(property, value) {
                var element = DOM.get(this.id + "_aria") || DOM.get(this.id);
                element && element.setAttribute("aria-" + property, "" + !!value);
            },
            focus: function() {
                DOM.get(this.id).focus();
            },
            setDisabled: function(state) {
                state != this.disabled && (this.setAriaProperty("disabled", state), 
                this.setState("Disabled", state), this.setState("Enabled", !state), 
                this.disabled = state);
            },
            isDisabled: function() {
                return this.disabled;
            },
            setActive: function(s) {
                s != this.active && (this.setState("Active", s), this.active = s, 
                this.setAriaProperty("current", s));
            },
            isActive: function() {
                return this.active;
            },
            setState: function(c, s) {
                var n = DOM.get(this.id);
                c = this.classPrefix + c, s ? DOM.addClass(n, c) : DOM.removeClass(n, c);
            },
            isRendered: function() {
                return this.rendered;
            },
            renderHTML: function() {},
            renderTo: function(n) {
                var frag = DOM.createFragment(this.renderHTML());
                n.appendChild(frag), this.postRender();
            },
            postRender: function() {
                var state;
                tinymce.is(this.disabled) && (state = this.disabled, this.disabled = -1, 
                this.setDisabled(state)), tinymce.is(this.active) && (state = this.active, 
                this.active = -1, this.setActive(state)), this.onRender.dispatch();
            },
            parent: function(ctrl) {
                if (!ctrl) return this._parent || null;
                this._parent = ctrl;
            },
            remove: function() {
                this.destroy(), DOM.remove(this.id);
            },
            destroy: function() {
                tinymce.dom.Event.clear(this.id);
            }
        });
    }(tinymce), tinymce.create("tinymce.ui.Container:tinymce.ui.Control", {
        Container: function(id, settings, editor) {
            var self = this;
            this._super(id, settings = settings || {}, editor), this.controls = [], 
            this.lookup = {}, settings.controls && tinymce.each(settings.controls, function(ctrl) {
                self.add(ctrl);
            });
        },
        add: function(ctrl) {
            return this.lookup[ctrl.id] = ctrl, this.controls.push(ctrl), ctrl.parent(this), 
            ctrl;
        },
        destroy: function() {
            var i;
            for (this._super(), i = 0; i < this.controls.length; i++) this.controls[i].destroy();
            delete this.lookup[this.id];
        },
        get: function(id) {
            return this.lookup[id];
        },
        find: function(name) {
            var i;
            if ("#" === name.charAt(0)) return this.get(name.substring(1));
            for (i = 0; i < this.controls.length; i++) if (this.controls[i].name === name) return this.controls[i];
        }
    }), function(tinymce) {
        var dom = tinymce.DOM, Event = tinymce.dom.Event;
        tinymce.create("tinymce.ui.TabPanel:tinymce.ui.Container", {
            TabPanel: function(id, settings, editor) {
                this._super(id, settings = settings || {}, editor), this.items = [];
            },
            renderHTML: function() {
                var html = "";
                if (1 < this.items.length) {
                    html += '<ul class="mceTabs" role="tablist">';
                    for (var i = 0; i < this.items.length; i++) {
                        var tab = this.items[i];
                        html += '<li id="' + this.id + "_tab_" + i + '" role="tab" aria-selected="' + (0 === i ? "true" : "false") + '" aria-controls="' + this.id + "_panel_" + i + '">' + tab.title + "</li>";
                    }
                    html += "</ul>";
                }
                for (html += '<div class="mceTabPanels">', i = 0; i < this.items.length; i++) {
                    var items = (tab = this.items[i]).items || [], cls = tab.class || "";
                    html += '<div id="' + this.id + "_panel_" + i + '" class="mceTab' + (cls ? " " + cls : "") + '" role="tabpanel"' + (0 === i ? "" : ' style="display:none"') + ">";
                    for (var x = 0; x < items.length; x++) html += items[x].renderHTML();
                    html += "</div>";
                }
                return dom.createHTML("div", {
                    id: this.id,
                    class: "mceTabPanel" + (this.settings.class ? " " + this.settings.class : "")
                }, html += "</div>");
            },
            _activateTab: function(index) {
                for (var tabEl, panelEl, i = 0; i < this.items.length; i++) tabEl = dom.get(this.id + "_tab_" + i), 
                (panelEl = dom.get(this.id + "_panel_" + i)) && (i === index ? (dom.addClass(tabEl, "mceActive"), 
                dom.setAttrib(tabEl, "aria-selected", "true"), panelEl.style.display = "") : (dom.removeClass(tabEl, "mceActive"), 
                dom.setAttrib(tabEl, "aria-selected", "false"), panelEl.style.display = "none"));
            },
            add: function(item) {
                this.items.push(item);
            },
            submit: function() {
                for (var data = {}, i = 0; i < this.items.length; i++) !function collect(items) {
                    for (var i = 0; i < items.length; i++) {
                        var item = items[i];
                        if ("function" == typeof item.submit) {
                            var key, values = item.submit();
                            for (key in values) values.hasOwnProperty(key) && (data[key] = values[key]);
                        } else item.controls && item.controls.length ? collect(item.controls) : "function" == typeof item.value && (data[item.name] = item.value());
                    }
                }(this.items[i].items || []);
                return data;
            },
            update: function(data) {
                for (var i = 0; i < this.items.length; i++) !function applyUpdate(items) {
                    for (var i = 0; i < items.length; i++) {
                        var item = items[i];
                        "function" == typeof item.update ? item.update(data) : item.controls && item.controls.length && applyUpdate(item.controls);
                    }
                }(this.items[i].items || []);
            },
            postRender: function() {
                var i, self = this;
                for (this._super(), i = 0; i < this.items.length; i++) for (var items = this.items[i].items || [], x = 0; x < items.length; x++) items[x].postRender();
                for (this._activateTab(0), i = 0; i < this.items.length; i++) !function(index) {
                    Event.add(self.id + "_tab_" + index, "click", function(e) {
                        Event.cancel(e), self._activateTab(index);
                    });
                }(i);
            },
            destroy: function() {
                this._super();
                for (var i = 0; i < this.controls.length; i++) this.controls[i].destroy();
                delete this.lookup[this.id];
            }
        });
    }(tinymce), function(tinymce) {
        var dom = tinymce.DOM;
        tinymce.create("tinymce.ui.Form:tinymce.ui.Container", {
            renderHTML: function() {
                var i, html = "", settings = this.settings;
                for (settings.label && (html += "<legend>" + dom.encode(settings.label) + "</legend>"), 
                i = 0; i < this.controls.length; i++) {
                    var ctrl = this.controls[i], s = ctrl.settings;
                    s.subtype && "hidden" == s.subtype ? html += ctrl.renderHTML() : (html += '<div class="mceFormRow">', 
                    s.label && "checkbox" !== ctrl.type && (html += '<label for="' + ctrl.id + '" id="' + ctrl.id + '_label">' + dom.encode(s.label) + "</label>"), 
                    html = (html += '\t<div class="mceFormControl">') + ctrl.renderHTML() + "\t</div>", 
                    s.label && "checkbox" === ctrl.type && (html += '<label for="' + ctrl.id + '" id="' + ctrl.id + '_label">' + dom.encode(s.label) + "</label>"), 
                    html += "</div>");
                }
                return dom.createHTML("fieldset", {
                    id: this.id,
                    class: "mceForm" + (settings.class ? " " + settings.class : ""),
                    role: "group"
                }, html);
            },
            submit: function() {
                for (var data = {}, i = 0; i < this.controls.length; i++) {
                    var ctrl = this.controls[i];
                    "function" == typeof ctrl.value && (data[ctrl.name] = ctrl.value());
                }
                return data;
            },
            update: function(data) {
                for (var i = 0; i < this.controls.length; i++) {
                    var ctrl = this.controls[i];
                    data[ctrl.name] && "function" == typeof ctrl.value && ctrl.value(data[ctrl.name]);
                }
            },
            empty: function() {
                for (var i = 0; i < this.controls.length; i++) this.controls[i].remove();
                this.controls = [], this.lookup = {};
            },
            add: function(ctrl) {
                return !this.get(ctrl.id) && this._super(ctrl);
            },
            show: function(ctrl) {
                ctrl = dom.get(ctrl.id), (ctrl = dom.getParent(ctrl, ".mceFormRow")) && (ctrl.style.display = "");
            },
            hide: function(ctrl) {
                ctrl = dom.get(ctrl.id), (ctrl = dom.getParent(ctrl, ".mceFormRow")) && (ctrl.style.display = "none");
            },
            postRender: function() {
                var i;
                for (this._super(), i = 0; i < this.controls.length; i++) this.controls[i].postRender(), 
                this.controls[i].elm = dom.get(this.controls[i].id);
            }
        });
    }(tinymce), tinymce.create("tinymce.ui.Separator:tinymce.ui.Control", {
        Separator: function(id, s) {
            this._super(id, s), this.classPrefix = "mceSeparator", this.setDisabled(!0);
        },
        renderHTML: function() {
            return tinymce.DOM.createHTML("span", {
                class: this.classPrefix,
                role: "separator",
                "aria-orientation": "vertical",
                tabindex: "-1"
            }, "");
        }
    }), function(tinymce) {
        tinymce.create("tinymce.ui.MenuItem:tinymce.ui.Control", {
            MenuItem: function(id, settings) {
                this._super(id, settings);
            },
            setSelected: function(state) {
                this.setState("Selected", state), this.setAriaProperty("selected", !!state), 
                this.selected = state;
            },
            isSelected: function() {
                return this.selected;
            },
            postRender: function() {
                var state;
                this._super(), tinymce.is(this.disabled) && (state = this.disabled, 
                this.disabled = -1, this.setDisabled(state)), tinymce.is(this.active) && (state = this.active, 
                this.active = -1, this.setActive(state)), tinymce.is(this.selected) && this.setSelected(this.selected);
            }
        });
    }(tinymce), function(tinymce) {
        var DOM = tinymce.DOM, walk = tinymce.walk;
        tinymce.create("tinymce.ui.Menu:tinymce.ui.MenuItem", {
            Menu: function(id, settings) {
                this._super(id, settings), this.items = {}, this.collapsed = !1, 
                this.menuCount = 0, this.onAddItem = new tinymce.util.Dispatcher(this);
            },
            expand: function(d) {
                d && walk(this, function(o) {
                    o.expand && o.expand();
                }, "items", this), this.collapsed = !1;
            },
            collapse: function(state) {
                state && walk(this, function(menu) {
                    menu.collapse && menu.collapse();
                }, "items", this), this.collapsed = !0;
            },
            isCollapsed: function() {
                return this.collapsed;
            },
            add: function(menu) {
                return menu.settings || (menu = new tinymce.ui.MenuItem(menu.id || DOM.uniqueId(), menu)), 
                this.onAddItem.dispatch(this, menu), this.items[menu.id] = menu;
            },
            addSeparator: function() {
                return this.add({
                    separator: !0
                });
            },
            addMenu: function(menu) {
                return menu.collapse || (menu = this.createMenu(menu)), this.menuCount++, 
                this.add(menu);
            },
            hasMenus: function() {
                return 0 !== this.menuCount;
            },
            remove: function(menu) {
                delete this.items[menu.id];
            },
            removeAll: function() {
                walk(this, function(menu) {
                    menu.removeAll ? menu.removeAll() : menu.remove(), menu.destroy();
                }, "items", this), this.items = {};
            },
            createMenu: function(settings) {
                return (settings = new tinymce.ui.Menu(settings.id || DOM.uniqueId(), settings)).onAddItem.add(this.onAddItem.dispatch, this.onAddItem), 
                settings;
            }
        });
    }(tinymce), function(tinymce) {
        var DOM = tinymce.DOM, each = tinymce.each, Event = tinymce.dom.Event, specialKeyCodeMap = {
            9: "tab",
            17: "ctrl",
            18: "alt",
            27: "esc",
            37: "left",
            39: "right",
            13: "enter",
            91: "cmd",
            38: "up",
            40: "down"
        };
        tinymce.create("tinymce.ui.DropMenu:tinymce.ui.Menu", {
            DropMenu: function(id, s) {
                (s = s || {}).container = s.container || DOM.doc.body, s.offset_x = s.offset_x || 0, 
                s.offset_y = s.offset_y || 0, s.vp_offset_x = s.vp_offset_x || 0, 
                s.vp_offset_y = s.vp_offset_y || 0, this._super(id, s), this.onShowMenu = new tinymce.util.Dispatcher(this), 
                this.onHideMenu = new tinymce.util.Dispatcher(this), this.onFilterInput = new tinymce.util.Dispatcher(this), 
                this.classPrefix = "mceMenu", this.selected = [];
            },
            createMenu: function(s) {
                var cs = this.settings;
                return s.container = s.container || cs.container, s.parent = this, 
                s.constrain = s.constrain || cs.constrain, s.class = s.class || cs.class, 
                s.vp_offset_x = s.vp_offset_x || cs.vp_offset_x, s.vp_offset_y = s.vp_offset_y || cs.vp_offset_y, 
                s.keyboard_focus = cs.keyboard_focus, (cs = new tinymce.ui.DropMenu(s.id || DOM.uniqueId(), s)).onAddItem.add(this.onAddItem.dispatch, this.onAddItem), 
                cs;
            },
            focus: function() {
                this.keyboardNav && this.keyboardNav.focus();
            },
            update: function() {
                var s = this.settings, m = DOM.get("menu_" + this.id);
                s.max_width && DOM.setStyle(m, "width", s.max_width), s.max_height && DOM.setStyle(m, "height", s.max_height);
            },
            scrollTo: function(el) {
                el.parentNode.scrollTop = el.offsetTop;
            },
            deselectAll: function() {
                each(this.items, function(item) {
                    item.setSelected(0);
                });
            },
            selectItem: function(item, state) {
                return !!item && (item.setSelected(state), state ? this.selected.push(item) : 0 <= (state = tinymce.inArray(this.selected, item)) && this.selected.splice(state, 1), 
                item);
            },
            findItem: function(val) {
                var found;
                return each(this.items, function(item) {
                    if (item.settings.title === val) return found = item, !1;
                }), found;
            },
            clearFilterInput: function() {
                var filter = DOM.get("menu_" + this.id + "_filter"), input = DOM.select("input", "menu_" + this.id + "_filter_input")[0];
                filter && (input.value = "", input.focus(), this.clearFilteredItems());
            },
            showMenu: function(x, y, px, py) {
                var co, w, h, mx, el, self = this, s = self.settings, vp = DOM.getViewPort(), cp = self.classPrefix;
                self.collapse(1), self.isMenuVisible || (self.selected = [], self.rendered ? co = DOM.get("menu_" + self.id) : (co = DOM.add(self.settings.container, self.renderNode()), 
                each(self.items, function(o) {
                    o.postRender();
                }), self.postRender()), co && (DOM.show(co), self.update(), x += s.offset_x || 0, 
                y += s.offset_y || 0, s.constrain && (w = +co.clientWidth, h = +co.clientHeight, 
                mx = vp.x + vp.w, vp = vp.y + vp.h, x + s.vp_offset_x + w > mx && (x = px ? px - w : Math.max(0, mx - s.vp_offset_x - w)), 
                y + s.vp_offset_y + h > vp) && (y = py ? py - h - 8 : Math.max(0, vp - s.vp_offset_y - h)), 
                DOM.setStyles(co, {
                    left: x,
                    top: y
                }), self.isMenuVisible = 1, self.mouseClickFunc = Event.add(co, "click", function(e) {
                    var n = e.target;
                    return "INPUT" != n.nodeName && "TEXTAREA" != n.nodeName && (n = n && DOM.getParent(n, ".mceMenuItem")) && !DOM.hasClass(n, cp + "ItemSub") ? ((n = self.items[n.id]) && !n.isDisabled() && (n.settings.onAction && n.settings.onAction(e), 
                    n.settings.onclick && !1 !== n.settings.onclick(e) && self.close(), 
                    self.clearFilterInput()), !1) : void 0;
                }), self.mouseOverFunc = Event.add(co, "mouseover", function(e) {
                    var m, n = e.target;
                    if (n = n && DOM.getParent(n, ".mceMenuItem")) {
                        if (m = self.items[n.id], self.hasMenus()) {
                            if (self.lastMenu && self.lastMenu.collapse(1), m.isDisabled()) return;
                            n && DOM.hasClass(n, cp + "ItemSub") && (n = DOM.getRect(n), 
                            m.showMenu(+(n.x + n.w), +n.y, n.x), self.lastMenu = m);
                        }
                        m.settings.onmouseover && m.settings.onmouseover(e);
                    }
                }), Event.add(co, "keydown", self._keyDownHandler, self), s.filter && Event.add(co, "keyup", self._keyUpHandler, self), 
                self.onShowMenu.dispatch(self), each(self.items, function(o) {
                    o.selected && -1 === tinymce.inArray(self.selected, o) && self.selected.push(o);
                }), self.selected.length ? (el = DOM.get(self.selected[0].id)) && self.scrollTo(el) : (el = DOM.get("menu_" + self.id + "_items")) && (el.scrollTop = 0), 
                s.keyboard_focus && self._setupKeyboardNav(), s.filter) && (px = DOM.select("input", "menu_" + self.id + "_filter_input")) && px[0].focus());
            },
            hideMenu: function(c) {
                var co = DOM.get("menu_" + this.id);
                this.isMenuVisible && (this.settings.filter && this.clearFilterInput(!0), 
                Event.remove(co, "click", this.mouseClickFunc), Event.remove(co, "keydown", this._keyDownHandler), 
                Event.remove(co, "keyup", this._keyUpHandler), DOM.hide(co), this.isMenuVisible = 0, 
                c || this.collapse(1), (co = DOM.get("menu_" + this.id)) && DOM.removeClass(co.firstChild, this.classPrefix + "ItemActive"), 
                this.onHideMenu.dispatch(this));
            },
            add: function(o) {
                var co;
                return o = this._super(o), this.isRendered && (co = DOM.get("menu_" + this.id + "_items")) && this._add(co, o), 
                o;
            },
            collapse: function(d) {
                this._super(d), this.hideMenu(1);
            },
            close: function() {
                for (var dm = this; dm; ) dm.hideMenu && dm.hideMenu(), dm = dm.settings.parent;
            },
            remove: function(o) {
                return DOM.remove(o.id), this.destroy(), this._super(o);
            },
            destroy: function() {
                var co = DOM.get("menu_" + this.id);
                this.keyboardNav && this.keyboardNav.destroy(), Event.remove(co, "mouseover", this.mouseOverFunc), 
                Event.remove(DOM.select("a", co), "focus", this.mouseOverFunc), 
                Event.remove(co, "click", this.mouseClickFunc), Event.remove(co, "keyup", this._keyUpHandler), 
                Event.remove(co, "keydown", this._keyDownHandler), DOM.remove(co);
            },
            renderNode: function() {
                var items, filterInput, self = this, s = self.settings, menu = DOM.create("div", {
                    role: "menu",
                    id: "menu_" + self.id,
                    class: s.class + " " + self.classPrefix,
                    "aria-orientation": "vertical"
                });
                return self.settings.parent && DOM.setAttrib(menu, "aria-parent", self.settings.parent.id), 
                s.filter && (s = DOM.add(menu, "div", {
                    id: "menu_" + self.id + "_filter",
                    class: self.classPrefix + "Filter"
                }, ""), filterInput = DOM.add(s, "div", {
                    id: "menu_" + self.id + "_filter_input",
                    class: self.classPrefix + "FilterInput"
                }, '<input type="text" autocomplete="off" autocapitalize="off" spellcheck="false" placeholder="..." />'), 
                self.onHideMenu.add(function() {
                    filterInput.firstChild.value = "";
                })), items = DOM.add(menu, "div", {
                    id: "menu_" + self.id + "_items",
                    class: self.classPrefix + "Items"
                }), each(self.items, function(o) {
                    self._add(items, o);
                }), self.rendered = !0, menu;
            },
            selectAndClear: function(value) {
                this.settings.onselect.call(this, value), this.clearFilterInput();
            },
            _setupKeyboardNav: function() {
                var self = this, contextMenu = DOM.get("menu_" + self.id), menuItems = DOM.select('div[role="menuitem"]', "menu_" + self.id);
                menuItems.splice(0, 0, contextMenu), self.keyboardNav = new tinymce.ui.KeyboardNavigation({
                    root: "menu_" + self.id,
                    items: menuItems,
                    onCancel: function() {
                        self.hideMenu();
                    },
                    onAction: function(e, id) {
                        var val, item;
                        1 < menuItems.length ? e.target && "INPUT" === e.target.nodeName && ("" !== (val = e.target.value) && ((item = self.findItem(val)) ? id = item.id : (id = DOM.uniqueId(), 
                        item = self.add({
                            id: id,
                            role: "menuitem",
                            title: val,
                            onclick: function() {
                                self.selectAndClear(this.settings.value);
                            }
                        }))), e.target.value = "") : self.settings.onselect && !1 !== self.settings.onselect.call(self, e.target) && self.hideMenu(), 
                        (item = item || self.items[id]) && item.settings.value && self.selectAndClear(item.settings.value);
                    },
                    enableUpDown: !0
                }), contextMenu.focus();
            },
            _updateKeyboardNav: function() {
                var items = DOM.select('div[role="menuitem"]:not(.mceMenuItemHidden)', this.id + "");
                this.keyboardNav.update(items);
            },
            clearFilteredItems: function() {
                each(this.items, function(o, id) {
                    DOM.removeClass(id, "mceMenuItemHidden");
                }), this.keyboardNav && this._updateKeyboardNav();
            },
            filterItems: function(value) {
                var matcher;
                "" === value ? this.clearFilteredItems() : (matcher = new RegExp("" + value.replace(/[\-\[\]\/\{\}\(\)\*\+\?\.\\\^\$\|]/g, "\\$&"), "i"), 
                each(this.items, function(o, id) {
                    o = o.settings, (o = !value || void 0 === value || matcher.test(o.title)) ? DOM.removeClass(id, "mceMenuItemHidden") : DOM.addClass(id, "mceMenuItemHidden");
                }), this._updateKeyboardNav());
            },
            _keyDownHandler: function(evt) {
                var nodes, endIndex, tabIndex;
                9 == evt.keyCode && (nodes = DOM.select("input, button, select, textarea", DOM.get("menu_" + this.id)), 
                (nodes = tinymce.grep(nodes, function(node) {
                    return !node.disabled && !DOM.isHidden(node) && 0 <= node.getAttribute("tabindex");
                })).length) && (DOM.setAttrib(nodes, "tabindex", 0), evt.shiftKey && nodes.reverse(), 
                endIndex = Math.max(0, nodes.length - 1), tabIndex = function(nodes, node) {
                    for (var i = 0; i < nodes.length; i++) if (nodes[i] === node) return i;
                    return -1;
                }(nodes, evt.target), tabIndex++, nodes[tabIndex = endIndex < (tabIndex = Math.max(tabIndex, 0)) ? 0 : tabIndex].focus(), 
                DOM.setAttrib(nodes[tabIndex], "tabindex", 1), evt.preventDefault(), 
                evt.stopImmediatePropagation());
            },
            _keyUpHandler: function(evt) {
                var input, self = this;
                evt.target && "INPUT" === evt.target.nodeName && (input = evt.target, 
                setTimeout(function() {
                    var item;
                    32 === evt.keyCode && ((item = self.findItem(input.value)) && self.selectItem(item), 
                    input.value = ""), specialKeyCodeMap[evt.keyCode] || self.filterItems(input.value), 
                    self.onFilterInput.dispatch(self, evt);
                }, 0));
            },
            _add: function(menu, o) {
                var icon, s = o.settings, cp = this.classPrefix;
                s.separator ? DOM.add(menu, "div", {
                    id: o.id,
                    class: cp + "Item " + cp + "ItemSeparator"
                }) : (menu = DOM.add(menu, "div", {
                    id: o.id,
                    class: cp + "Item " + cp + "ItemEnabled"
                }), s.tooltip ? (DOM.setAttrib(menu, "data-title", s.tooltip), DOM.addClass(menu, "mceTooltip"), 
                DOM.add(menu, "span", {
                    class: "sr-only",
                    id: o.id + "_sr_only"
                }, s.tooltip), DOM.setAttrib(menu, "aria-describedby", o.id + "_sr_only")) : DOM.setAttrib(menu, "title", s.title || ""), 
                s.description && DOM.setAttrib(menu, "aria-describedby", o.id + "_description"), 
                s.html ? (DOM.addClass(menu, "mceMenuHtml"), DOM.setHTML(menu, s.html)) : (DOM.setAttrib(menu, "role", "menuitem"), 
                !s.icon && !s.icon_src || s.svg || s.image || (icon = DOM.add(menu, "span", {
                    class: "mceIcon" + (s.icon ? " mce_" + s.icon : "")
                }), s.icon_src && DOM.add(icon, "img", {
                    src: s.icon_src
                }), DOM.addClass(menu, "mceHasIcon")), s.image && DOM.add(menu, "span", {
                    class: "mceImage",
                    style: 'background-image:url("' + s.image + '")',
                    role: "presentation"
                }), s.svg && DOM.add(menu, "span", {
                    class: "mceIcon mceIconSvg"
                }, s.svg), icon = DOM.add(menu, s.element || "span", {
                    class: "mceText"
                }, o.settings.title), s.description && DOM.add(menu, "span", {
                    class: "mceDescription",
                    id: o.id + "_description"
                }, s.description), o.settings.style && ("function" == typeof o.settings.style && (o.settings.style = o.settings.style()), 
                DOM.setAttrib(icon, "style", o.settings.style)), s.parent && (DOM.setAttrib(icon, "aria-haspopup", "true"), 
                DOM.setAttrib(icon, "aria-owns", o.id))), DOM.addClass(menu, s.class), 
                o.onmouseover && Event.add(menu, "mouseover", o.onmouseover), o.collapse && DOM.addClass(menu, cp + "ItemSub"));
            }
        });
    }(tinymce), function(tinymce) {
        var DOM = tinymce.DOM, Event = tinymce.dom.Event, Dispatcher = tinymce.util.Dispatcher;
        tinymce.create("tinymce.ui.Button:tinymce.ui.Control", {
            Button: function(id, s, ed) {
                this._super(id, s, ed), this.classPrefix = "mceButton", this.onPostRender = new Dispatcher(this);
            },
            renderHTML: function() {
                var cp = this.classPrefix, s = this.settings, l = DOM.encode(s.label || ""), h = '<button type="button" id="' + this.id + '" class="' + cp + " " + s.class + (l ? " " + cp + "Labeled" : "") + '" title="' + DOM.encode(s.title) + '" aria-label="' + DOM.encode(s.title) + '">';
                return s.class && (s.class = " " + tinymce.trim(s.class)), s.icon = s.icon || "", 
                s.image ? h += '<span role="presentation" class="mceIcon mceIconImage' + s.class + '"><img class="mceIcon" src="' + s.image + '" alt="' + DOM.encode(s.title) + '" /></span>' + (l ? '<span class="' + cp + 'Label">' + l + "</span>" : "") : (s.icon && (s.icon = " mce_" + s.icon), 
                h += '<span role="presentation" class="mceIcon' + s.class + s.icon + '"></span>' + (l ? '<span class="' + cp + 'Label">' + l + "</span>" : "")), 
                h + "</button>";
            },
            postRender: function() {
                var imgBookmark, self = this, s = self.settings;
                tinymce.isIE && self.editor && Event.add(self.id, "mousedown", function() {
                    var nodeName = self.editor.selection.getNode().nodeName;
                    imgBookmark = "IMG" === nodeName ? self.editor.selection.getBookmark() : null;
                }), Event.add(self.id, "click", function(e) {
                    if (Event.cancel(e), !self.isDisabled()) return tinymce.isIE && self.editor && null !== imgBookmark && self.editor.selection.moveToBookmark(imgBookmark), 
                    s.onclick.call(s.scope, e);
                }), Event.add(self.id, "keydown", function(e) {
                    if (!self.isDisabled() && e.keyCode == tinymce.VK.SPACEBAR) return Event.cancel(e), 
                    s.onclick.call(s.scope, e);
                }), this.rendered = !0, this.onPostRender.dispatch(this, DOM.get(this.id));
            }
        });
    }(tinymce), function(tinymce) {
        var DOM = tinymce.DOM, Event = tinymce.dom.Event, each = tinymce.each, Dispatcher = tinymce.util.Dispatcher, specialKeyCodeMap = {
            9: "tab",
            17: "ctrl",
            18: "alt",
            27: "esc",
            37: "left",
            39: "right",
            13: "enter",
            91: "cmd",
            38: "up",
            40: "down"
        };
        tinymce.create("tinymce.ui.ListBox:tinymce.ui.Control", {
            ListBox: function(id, s, ed) {
                this._super(id, s, ed), this.type = "listbox", this.items = s.items || [], 
                this.onChange = new Dispatcher(this), this.onPostRender = new Dispatcher(this), 
                this.onAdd = new Dispatcher(this), this.onBeforeRenderMenu = new Dispatcher(this), 
                this.onRenderMenu = new Dispatcher(this), this.classPrefix = "mceListBox";
            },
            deselectAll: function() {
                each(this.items, function(item) {
                    item.selected = !1;
                }), this.menu && this.menu.deselectAll();
            },
            select: function(values) {
                var fv, self = this;
                return null == values ? this.selectByIndex(-1) : values.length ? (this.settings.multiple || this.deselectAll(), 
                void ("function" == typeof values ? (each(self.items, function(item, i) {
                    values(item.value) && (self.selectByIndex(i), fv = !0);
                }), fv || self.selectByIndex(-1)) : (tinymce.is(values, "string") && (values = self.settings.multiple && self.settings.seperator ? values.split(self.settings.seperator) : [ values ]), 
                each(values, function(value) {
                    var i = self.findItem(value);
                    -1 == i && self.settings.combobox && (i = self.add(value, value)), 
                    self.selectByIndex(i);
                }), this.settings.combobox && (this.clearComboBox(!0), this.settings.multiple) && each(this.items, function(item) {
                    item.selected && self.addTag(item.value);
                })))) : (this.deselectAll(), this.selectByIndex(-1));
            },
            value: function(val) {
                if (!arguments.length) return val = [], each(this.items, function(item) {
                    item.selected && val.push(item.value);
                }), val.join(" ").trim();
                this.select(val), this.settings.onselect.call(this, val);
            },
            selectByIndex: function(idx) {
                var elm = DOM.get(this.id + "_text");
                (idx = this.items[idx]) ? (idx.selected = !idx.selected, idx.selected ? this.selectedValue = idx.value : this.selectedValue = null, 
                this.settings.combobox || (DOM.setHTML(elm, DOM.encode(idx.title)), 
                DOM.removeClass(elm, "mceTitle"), DOM.setAttrib(this.id, "aria-valuenow", idx.title)), 
                this.menu && this.menu.selectItem(this.menu.items[idx.id], idx.selected)) : (DOM.setHTML(elm, DOM.encode(this.settings.title)), 
                DOM.addClass(elm, "mceTitle"), this.selectedValue = null, DOM.setAttrib(this.id, "aria-valuenow", this.settings.title), 
                this.settings.multiple && this.deselectAll());
            },
            add: function(name, value, settings) {
                if (settings = settings || {}, -1 == this.findItem(value)) return settings = tinymce.extend(settings, {
                    title: name,
                    value: value
                }), name = this.items.push(settings), this.onAdd.dispatch(this, settings), 
                name - 1;
            },
            findItem: function(value) {
                for (var idx = -1, i = 0, len = this.items.length; i < len; i++) this.items[i].value === value && (idx = i);
                return idx;
            },
            getLength: function() {
                return this.items.length;
            },
            renderHTML: function() {
                var inp, html = "", prefix = this.classPrefix;
                return this.settings.combobox ? (inp = DOM.createHTML("input", {
                    type: "text",
                    id: this.id + "_input",
                    tabindex: -1,
                    autocomplete: "off",
                    spellcheck: !1,
                    autocapitalize: "off",
                    class: "mceText",
                    placeholder: "..."
                }), html += DOM.createHTML("div", {
                    class: "mceComboBox"
                }, inp)) : html += DOM.createHTML("button", {
                    type: "button",
                    id: this.id + "_text",
                    tabindex: -1,
                    class: "mceText"
                }, DOM.encode(this.settings.title)), html += DOM.createHTML("button", {
                    type: "button",
                    id: this.id + "_open",
                    tabindex: -1,
                    class: "mceOpen"
                }), DOM.createHTML("div", {
                    id: this.id,
                    role: this.settings.combobox ? "combobox" : "listbox",
                    tabindex: 0,
                    class: prefix + " " + this.settings.class,
                    title: this.settings.title,
                    "aria-label": this.settings.title,
                    "aria-haspopup": "true",
                    "aria-expanded": !1
                }, html);
            },
            clearComboBox: function(removetags) {
                var input = DOM.get(this.id + "_input");
                input.value = "", input.focus(), removetags && DOM.remove(DOM.select(".mceButtonTag", this.id));
            },
            removeTag: function(btn) {
                var self = this;
                each(self.items, function(item, i) {
                    item.value === btn.value && (item.selected = !1, self.selectedValue == item.value) && (self.selectedValue = null);
                }), Event.clear(btn), DOM.remove(btn);
            },
            addTag: function(value) {
                var self = this, inp = DOM.get(self.id + "_input"), btn = DOM.create("button", {
                    class: "mceButton mceButtonTag",
                    value: value
                }, "<label>" + value + "</label>");
                DOM.insertBefore(btn, inp), Event.add(btn, "click", function(evt) {
                    evt.preventDefault(), "LABEL" != evt.target.nodeName && self.removeTag(btn);
                });
            },
            showMenu: function() {
                var pos, menu, self = this, elm = DOM.get(this.id);
                this.isDisabled() || (this.isMenuRendered || (this.renderMenu(), 
                this.isMenuRendered = !0), 0 !== this.items.length && (pos = DOM.getPos(elm), 
                (menu = this.menu).settings.offset_x = pos.x, menu.settings.offset_y = pos.y, 
                this.settings.max_width || (menu.settings.max_width = elm.offsetWidth), 
                each(this.items, function(item) {
                    menu.items[item.id] && (menu.items[item.id].setSelected(0), 
                    item.value !== self.selectedValue && !item.selected || menu.items[item.id].setSelected(1));
                }), menu.showMenu(0, elm.clientHeight, 0, pos.y), Event.add(DOM.doc, "mousedown", this.hideMenu, this), 
                DOM.addClass(this.id, this.classPrefix + "Selected"), this.setAriaProperty("expanded", !0)));
            },
            hideMenu: function(e) {
                this.menu && (!e || "mousedown" != e.type || e.target.id != this.id + "_text" && e.target.id != this.id + "_open") && (e && DOM.getParent(e.target, ".mceMenu") || (DOM.removeClass(this.id, this.classPrefix + "Selected"), 
                Event.remove(DOM.doc, "mousedown", this.hideMenu, this), this.menu.hideMenu()), 
                this.setAriaProperty("expanded", !1));
            },
            renderMenu: function() {
                var self = this, cls = this.classPrefix + "Menu" + (this.settings.menu_class ? " " + this.settings.menu_class : ""), menu = this.settings.control_manager.createDropMenu(this.id + "_menu", {
                    class: cls,
                    max_width: this.settings.max_width || 250,
                    max_height: this.settings.max_height || "",
                    filter: !!this.settings.filter,
                    keyboard_focus: !0,
                    onselect: function(value) {
                        !1 !== self.settings.onselect(value) && (self.select(value), 
                        menu.close());
                    }
                });
                menu.onHideMenu.add(function() {
                    self.hideMenu(), self.settings.combobox && (menu.clearFilteredItems(), 
                    self.focus());
                }), this.onBeforeRenderMenu.dispatch(this, menu), each(this.items, function(item) {
                    void 0 === item.value ? menu.add({
                        title: item.title,
                        role: "option",
                        onAction: function(e) {
                            !1 !== self.settings.onselect("") && self.select(""), 
                            menu.close();
                        }
                    }) : (item.id = DOM.uniqueId(), item.role = "option", item.onAction = function(e) {
                        !1 !== self.settings.onselect(item.value) && self.select(item.value), 
                        self.settings.multiple || self.settings.keepopen || menu.close();
                    }, menu.add(item));
                }), this.onRenderMenu.dispatch(this, menu), this.menu = menu;
            },
            postRender: function() {
                var self = this;
                self.destroy(), Event.add(this.id, "click", function(evt) {
                    "INPUT" == evt.target.nodeName || DOM.hasClass(evt.target, "mceButtonTag") || (self.menu && self.menu.isMenuVisible ? self.hideMenu(evt) : self.showMenu(evt), 
                    Event.cancel(evt));
                }), Event.add(this.id, "keydown", function(evt) {
                    "INPUT" !== evt.target.nodeName && 32 == evt.keyCode && (self.menu && self.menu.isMenuVisible ? self.hideMenu(evt) : self.showMenu(evt), 
                    Event.cancel(evt));
                }), Event.add(this.id + "_input", "keyup", function(evt) {
                    setTimeout(function() {
                        var value = evt.target.value;
                        value ? specialKeyCodeMap[evt.keyCode] || (self.menu && self.menu.isMenuVisible || self.showMenu(), 
                        evt.target.focus(), self.menu.filterItems(value)) : (Event.cancel(evt), 
                        self.hideMenu());
                    }, 0);
                }), Event.add(this.id + "_input", "keydown", function(evt) {
                    switch (evt.keyCode) {
                      case 13:
                        Event.cancel(evt), "" === this.value ? self.showMenu() : (!1 !== self.settings.onselect(this.value) && self.select(this.value), 
                        self.hideMenu(), this.value = "");
                        break;

                      case 40:
                      case 38:
                        self.showMenu(), Event.cancel(evt), self.menu.focus();
                        break;

                      case 8:
                        var tags, val;
                        this.value || (tags = DOM.select("button", evt.target.parentNode)).length && (val = (tags = tags.pop()).value, 
                        self.removeTag(tags), Event.cancel(evt), this.value = val, 
                        this.focus());
                    }
                }), Event.add(this.id, "focus", function() {
                    this._focused || (this.keyDownHandler = Event.add(this.id, "keydown", function(e) {
                        40 == e.keyCode && (self.showMenu(), Event.cancel(e));
                    }), this.keyPressHandler = Event.add(this.id, "keypress", function(e) {
                        var value;
                        13 == e.keyCode && (value = self.selectedValue, self.selectedValue = null, 
                        Event.cancel(e), self.settings.onselect(value));
                    })), this._focused = 1;
                }), Event.add(this.id, "blur", function() {
                    Event.remove(this.id, "keydown", this.keyDownHandler), Event.remove(this.id, "keypress", this.keyPressHandler), 
                    this._focused = 0;
                }), this.onPostRender.dispatch(this, DOM.get(this.id)), this.rendered = !0;
            },
            destroy: function() {
                this._super(), Event.clear(this.id + "_text"), Event.clear(this.id + "_open"), 
                each(this.items, function(item) {
                    item.selected = !1;
                }), this.selectedValue = null;
            }
        });
    }(tinymce), function(tinymce) {
        var DOM = tinymce.DOM, Event = tinymce.dom.Event, each = tinymce.each;
        tinymce.create("tinymce.ui.NativeListBox:tinymce.ui.ListBox", {
            NativeListBox: function(id, settings) {
                this._super(id, settings);
            },
            setDisabled: function(settings) {
                DOM.get(this.id).disabled = settings, this.setAriaProperty("disabled", settings);
            },
            isDisabled: function() {
                return DOM.get(this.id).disabled;
            },
            select: function(value) {
                var fv, fn, self = this;
                if (null == value) return this.selectByIndex(-1);
                fn = value && "function" == typeof value ? value : function(val) {
                    return val == value;
                }, value != this.selectedValue && (each(this.items, function(o, i) {
                    if (fn(o.value)) return fv = 1, self.selectByIndex(i), !1;
                }), fv || this.selectByIndex(-1));
            },
            selectByIndex: function(idx) {
                DOM.get(this.id).selectedIndex = idx + 1, this.selectedValue = this.items[idx] ? this.items[idx].value : null;
            },
            add: function(name, value, attribs) {
                (attribs = attribs || {}).value = value, this.isRendered() && DOM.add(DOM.get(this.id), "option", attribs, name), 
                this.items.push(name = {
                    title: name,
                    value: value,
                    attribs: attribs
                }), this.onAdd.dispatch(this, name);
            },
            getLength: function() {
                return this.items.length;
            },
            renderHTML: function() {
                var html = DOM.createHTML("option", {
                    value: ""
                }, "-- " + this.settings.title + " --");
                return each(this.items, function(item) {
                    html += DOM.createHTML("option", {
                        value: item.value
                    }, item.title);
                }), html = DOM.createHTML("select", {
                    id: this.id,
                    class: "mceNativeListBox",
                    "aria-labelledby": this.id + "_aria"
                }, html), html += DOM.createHTML("span", {
                    id: this.id + "_aria",
                    style: "display: none"
                }, this.settings.title);
            },
            postRender: function() {
                var self = this, changeListenerAdded = !0;
                function onChange(e) {
                    (e = (e = self.items[e.target.selectedIndex - 1]) && e.value) && (self.onChange.dispatch(self, e), 
                    self.settings.onselect) && self.settings.onselect(e);
                }
                this.rendered = !0, Event.add(this.id, "change", onChange), Event.add(this.id, "keydown", function(e) {
                    var blur;
                    if (Event.remove(self.id, "change", void 0), changeListenerAdded = !1, 
                    blur = Event.add(this.id, "blur", function() {
                        changeListenerAdded || (changeListenerAdded = !0, Event.add(self.id, "change", onChange), 
                        Event.remove(self.id, "blur", blur));
                    }), 13 == e.keyCode || 32 == e.keyCode) return onChange(e), 
                    Event.cancel(e);
                    40 != e.keyCode && 38 != e.keyCode || e.stopImmediatePropagation();
                }), this.onPostRender.dispatch(this, DOM.get(this.id));
            }
        });
    }(tinymce), function(tinymce) {
        var DOM = tinymce.DOM, Event = tinymce.dom.Event, Dispatcher = tinymce.util.Dispatcher;
        tinymce.create("tinymce.ui.TextBox:tinymce.ui.Control", {
            TextBox: function(id, s, ed) {
                s = tinymce.extend({
                    class: "",
                    title: ""
                }, s), this._super(id, s, ed), this.type = "textbox", this.onChange = new Dispatcher(this), 
                this.onPostRender = new Dispatcher(this), this.classPrefix = "mceTextBox";
            },
            value: function(val) {
                if (!arguments.length) return DOM.getValue(this.id);
                DOM.setValue(this.id, val), "color" == this.settings.subtype && DOM.setValue(this.id + "_color", val);
            },
            renderHTML: function() {
                var html = "", prefix = this.classPrefix, s = this.settings, type = s.subtype || "text", attribs = {
                    type: type,
                    id: this.id,
                    class: prefix + " " + s.class,
                    title: DOM.encode(s.title),
                    tabindex: 0,
                    autofocus: !0
                };
                return s.description && (attribs["aria-describedby"] = this.id + "_description"), 
                attribs = tinymce.extend(attribs, s.attributes || {}), s.multiline ? html += DOM.createHTML("textarea", attribs, "") : ("color" == type && (attribs.type = "text", 
                html += DOM.createHTML("input", {
                    type: "color",
                    id: this.id + "_color"
                })), html += DOM.createHTML("input", attribs)), s.description && (html += DOM.createHTML("span", {
                    class: prefix + "Description",
                    id: this.id + "_description"
                }, DOM.encode(s.description))), s.button && (html += DOM.createHTML("button", {
                    id: this.id + "_button",
                    class: "mceButton",
                    title: DOM.encode(s.button.label || "")
                }, '<span role="presentation" class="mceIcon mce_' + s.button.icon + '"></span>')), 
                html;
            },
            postRender: function() {
                var self = this, s = this.settings;
                void 0 !== s.value && this.value(s.value), s.onchange && "function" == typeof s.onchange && this.onChange.add(s.onchange), 
                Event.add(this.id, "change", function() {
                    self.onChange.dispatch(this, DOM.get(self.id));
                }), s.button && Event.add(this.id + "_button", "click", function(e) {
                    e.preventDefault(), s.button.click.apply(self);
                }), "color" == s.subtype && (Event.add(this.id, "change", function(e) {
                    DOM.setValue(this.id + "_color", DOM.get(self.id).value);
                }), Event.add(this.id + "_color", "change", function(e) {
                    DOM.setValue(self.id, DOM.get(self.id + "_color").value);
                })), this.onPostRender.dispatch(this, DOM.get(this.id));
            },
            setDisabled: function(state) {
                this._super(state);
                var elm = DOM.get(this.id);
                elm && (elm.disabled = state, this.settings.subtype) && "color" == this.settings.subtype && (elm = DOM.get(this.id + "_color")) && (elm.disabled = state);
            },
            destroy: function() {
                this._super(), Event.clear(this.id);
            }
        });
    }(tinymce), function(tinymce) {
        var DOM = tinymce.DOM, Event = tinymce.dom.Event;
        tinymce.create("tinymce.ui.UrlBox:tinymce.ui.TextBox", {
            UrlBox: function(id, s, ed) {
                s.multiline = !1, s.onpick = s.onpick || function() {}, s.class = "mceUrlBox", 
                s.upload && "function" != typeof s.upload && (s.upload = !1), this._super(id, s, ed);
            },
            renderHTML: function() {
                var icon, html = this._super(), s = this.settings;
                return s.picker && (icon = s.picker_icon || "file", html += '<button type="button" class="mceButton mceButtonPicker" id="' + this.id + '_picker" title="' + DOM.encode(s.picker_label || "") + '"><span role="presentation" class="mceIcon mce_' + icon + '"></span></button>'), 
                s.upload && (icon = tinymce.map(s.upload_accept || [], function(val) {
                    return -1 == val.indexOf("/") && "." != val.charAt(0) ? "." + val : val;
                }), html += '<a class="mceButton mceButtonUpload" role="button" aria-label="' + DOM.encode(s.upload_label || "") + '"><span role="presentation" class="mceIcon mce_cloud_upload"></span><span role="presentation" class="mceIcon mce_spinner"></span><input id="' + this.id + '_upload" type="file" aria-hidden="true" title="' + DOM.encode(s.upload_label || "") + '" accept="' + icon.join(",") + '" /></a>'), 
                html;
            },
            setLoading: function(state) {
                this.setAriaProperty("busy", state), this.setDisabled(state);
            },
            setDisabled: function(state) {
                this._super(state), DOM.get(this.id + "_upload").disabled = state;
            },
            postRender: function() {
                var self = this, s = this.settings;
                this._super(), s.picker && (DOM.addClass(this.id, "mceUrlBoxPicker"), 
                Event.add(this.id + "_picker", "click", function(e) {
                    e.preventDefault(), s.onpick.call(self);
                })), s.upload && (DOM.addClass(this.id, "mceUrlBoxUpload"), Event.add(this.id + "_upload", "change", function(e) {
                    this.files && this.files.length && s.upload.call(self, e, this.files[0]), 
                    e.preventDefault();
                }), DOM.bind(this.id, "drag dragstart dragend dragover dragenter dragleave", function(e) {
                    e.preventDefault();
                }), DOM.bind(this.id, "dragover dragenter", function() {
                    DOM.addClass(this.id, "mceUrlBoxUploadHover");
                }), DOM.bind(this.id, "dragleave", function() {
                    DOM.removeClass(this.id, "mceUrlBoxUploadHover");
                }), DOM.bind(this.id, "drop", function(e) {
                    var dataTransfer = e.dataTransfer;
                    dataTransfer && dataTransfer.files && dataTransfer.files.length && (dataTransfer = dataTransfer.files[0]) && s.upload.call(self, e, dataTransfer), 
                    e.preventDefault();
                }));
            }
        });
    }(tinymce), function(tinymce) {
        var DOM = tinymce.DOM, Event = tinymce.dom.Event, each = tinymce.each, Dispatcher = tinymce.util.Dispatcher;
        tinymce.create("tinymce.ui.CheckBox:tinymce.ui.Control", {
            CheckBox: function(id, s, ed) {
                this._super(id, s, ed), this.type = "checkbox", void 0 === s.value && (s.value = ""), 
                this.onChange = new Dispatcher(this), this.onPostRender = new Dispatcher(this), 
                this.classPrefix = "mceCheckBox";
            },
            value: function(val) {
                if (!arguments.length) return this.checked();
                this.checked(val);
            },
            checked: function(state) {
                var elm = DOM.get(this.id);
                if (!arguments.length) return elm.checked;
                this.isDisabled() || (this.setState("checked", !!state), elm.checked = !!state);
            },
            renderHTML: function() {
                var html = "", prefix = this.classPrefix, s = this.settings;
                return html += '<input type="checkbox" id="' + this.id + '" value="' + s.value + '" class="' + prefix + " " + s.class + '" title="' + DOM.encode(s.title) + '"', 
                s.attributes && each(s.attributes, function(val, key) {
                    html += " " + key + '="' + val + '"';
                }), html += " />";
            },
            postRender: function() {
                var self = this, s = this.settings;
                s.onchange && "function" == typeof s.onchange && this.onChange.add(s.onchange), 
                Event.add(this.id, "click", function() {
                    self.checked(self.checked());
                }), Event.add(this.id, "change", function() {
                    self.onChange.dispatch(this, DOM.get(self.id));
                }), this.onPostRender.dispatch(this, DOM.get(this.id));
            },
            setDisabled: function(state) {
                this._super(state), DOM.get(this.id).disabled = state;
            },
            destroy: function() {
                this._super(), Event.clear(this.id);
            }
        });
    }(tinymce), function(tinymce) {
        var DOM = tinymce.DOM, Event = tinymce.dom.Event;
        tinymce.create("tinymce.ui.MenuButton:tinymce.ui.Button", {
            MenuButton: function(id, s, ed) {
                this._super(id, s, ed), this.onRenderMenu = new tinymce.util.Dispatcher(this), 
                s.menu_container = s.menu_container || DOM.doc.body;
            },
            showMenu: function() {
                var pos, m, e = DOM.get(this.id);
                if (!this.isDisabled()) {
                    if (this.isMenuRendered || (this.renderMenu(), this.isMenuRendered = !0), 
                    this.isMenuVisible) return this.hideMenu();
                    pos = DOM.getPos(e), (m = this.menu).settings.offset_x = pos.x, 
                    m.settings.offset_y = pos.y, m.settings.vp_offset_x = pos.x, 
                    m.settings.vp_offset_y = pos.y, m.settings.keyboard_focus = this._focused, 
                    m.showMenu(0, e.firstChild.clientHeight), Event.add(DOM.doc, "mousedown", this.hideMenu, this), 
                    this.setState("Selected", 1), this.isMenuVisible = 1, this.setAriaProperty("expanded", !0);
                }
            },
            renderMenu: function() {
                var self = this, m = self.settings.control_manager.createDropMenu(self.id + "_menu", {
                    class: this.classPrefix + "Menu",
                    icons: self.settings.icons,
                    max_width: this.settings.max_width,
                    max_height: this.settings.max_height,
                    keyboard_focus: !0,
                    onselect: this.settings.onselect,
                    title: this.settings.title
                });
                m.onHideMenu.add(function() {
                    self.hideMenu(), self.focus();
                }), self.onRenderMenu.dispatch(self, m), self.menu = m;
            },
            hideMenu: function(e) {
                var self = this;
                e && "mousedown" == e.type && DOM.getParent(e.target, function(e) {
                    return e.id === self.id || e.id === self.id + "_open";
                }) || (e && DOM.getParent(e.target, ".mceMenu") || (self.setState("Selected", 0), 
                Event.remove(DOM.doc, "mousedown", self.hideMenu, self), self.menu && self.menu.hideMenu()), 
                self.isMenuVisible = 0, self.setAriaProperty("expanded", !1));
            },
            postRender: function() {
                var self = this, s = self.settings;
                this._super(), Event.add(self.id, "click", function(evt) {
                    self.isDisabled() || (s.onclick && s.onclick(evt, self.value), 
                    self.showMenu());
                });
            }
        });
    }(tinymce), function(tinymce) {
        var DOM = tinymce.DOM, Event = tinymce.dom.Event;
        tinymce.create("tinymce.ui.SplitButton:tinymce.ui.MenuButton", {
            SplitButton: function(id, s, ed) {
                this._super(id, s, ed), this.classPrefix = "mceSplitButton";
            },
            renderHTML: function() {
                var html = "", s = this.settings, icon = s.image ? DOM.createHTML("img ", {
                    src: s.image,
                    role: "presentation",
                    class: "mceAction " + s.class
                }) : DOM.createHTML("span", {
                    class: "mceAction " + s.class,
                    role: "presentation"
                }), html = (html += DOM.createHTML("button", {
                    type: "button",
                    id: this.id + "_action",
                    tabindex: "-1",
                    class: "mceText " + s.class,
                    title: s.title
                }, icon)) + DOM.createHTML("button", {
                    type: "button",
                    id: this.id + "_open",
                    tabindex: "-1",
                    class: "mceOpen " + s.class,
                    title: s.title
                });
                return DOM.createHTML("div", {
                    id: this.id,
                    role: "button",
                    tabindex: 0,
                    class: "mceSplitButton " + s.class,
                    title: s.title,
                    "aria-label": s.title,
                    "aria-haspopup": "true",
                    "aria-expanded": !1
                }, html);
            },
            postRender: function() {
                var activate, self = this, s = self.settings;
                s.onclick ? (Event.add(self.id + "_action", "click", activate = function(evt) {
                    self.isDisabled() || (s.onclick(evt, self.value), Event.cancel(evt), 
                    self.hideMenu());
                }), Event.add(self.id, [ "click", "keydown" ], function(evt) {
                    32 !== evt.keyCode && 13 !== evt.keyCode && 14 !== evt.keyCode || evt.altKey || evt.ctrlKey || evt.metaKey ? "click" !== evt.type && 40 !== evt.keyCode || (self.showMenu(), 
                    Event.cancel(evt)) : (activate(evt), Event.cancel(evt));
                })) : Event.add(self.id + "_action", "click", function(evt) {
                    self.showMenu(), Event.cancel(evt);
                }), Event.add(self.id + "_open", "click", function(evt) {
                    self.showMenu(), Event.cancel(evt);
                }), Event.add([ self.id, self.id + "_open" ], "focus", function() {
                    self._focused = 1;
                }), Event.add([ self.id, self.id + "_open" ], "blur", function() {
                    self._focused = 0;
                }), this.rendered = !0;
            },
            destroy: function() {
                this._super(), Event.clear(this.id + "_action"), Event.clear(this.id + "_open"), 
                Event.clear(this.id);
            }
        });
    }(tinymce), function(tinymce) {
        var DOM = tinymce.DOM, Event = tinymce.dom.Event, is = tinymce.is, each = tinymce.each;
        tinymce.create("tinymce.ui.ColorSplitButton:tinymce.ui.SplitButton", {
            ColorSplitButton: function(id, settings, editor) {
                this._super(id, settings, editor), this.settings = tinymce.extend({
                    colors: "000000,993300,333300,003300,003366,000080,333399,333333,800000,FF6600,808000,008000,008080,0000FF,666699,808080,FF0000,FF9900,99CC00,339966,33CCCC,3366FF,800080,999999,FF00FF,FFCC00,FFFF00,00FF00,00FFFF,00CCFF,993366,FFFFFF,FF99CC,FFCC99,FFFF99,CCFFCC,CCFFFF,99CCFF,CC99FF",
                    grid_width: 8,
                    default_color: "#888888"
                }, settings || {}), this.onShowMenu = new tinymce.util.Dispatcher(this), 
                this.onHideMenu = new tinymce.util.Dispatcher(this), this.value = settings.default_color;
            },
            showMenu: function() {
                var elm, pos, self = this;
                if (!this.isDisabled()) {
                    if (this.isMenuRendered || (this.renderMenu(), this.isMenuRendered = !0), 
                    this.isMenuVisible) return this.hideMenu();
                    elm = DOM.get(this.id), DOM.show(this.id + "_menu"), DOM.addClass(elm, "mceSplitButtonSelected"), 
                    pos = DOM.getPos(elm), DOM.setStyles(this.id + "_menu", {
                        left: pos.x,
                        top: pos.y + elm.firstChild.clientHeight
                    }), Event.add(DOM.doc, "mousedown", this.hideMenu, this), this.onShowMenu.dispatch(this), 
                    this._focused && (this._keyHandler = Event.add(this.id + "_menu", "keydown", function(e) {
                        27 == e.keyCode && this.hideMenu();
                    }), DOM.select("button", this.id + "_menu")[0].focus()), this.keyboardNav = new tinymce.ui.KeyboardNavigation({
                        root: this.id + "_menu",
                        items: DOM.select("button", this.id + "_menu"),
                        onCancel: function() {
                            self.hideMenu(), self.focus();
                        }
                    }), this.keyboardNav.focus(), this.isMenuVisible = 1;
                }
            },
            hideMenu: function(e) {
                var self = this;
                !this.isMenuVisible || e && "mousedown" == e.type && DOM.getParent(e.target, function(elm) {
                    return elm.id === self.id + "_open";
                }) || (e && DOM.getParent(e.target, ".mceSplitButtonMenu") || (DOM.removeClass(this.id, "mceSplitButtonSelected"), 
                Event.remove(DOM.doc, "mousedown", this.hideMenu, this), Event.remove(this.id + "_menu", "keydown", this._keyHandler), 
                DOM.hide(this.id + "_menu")), this.isMenuVisible = 0, this.onHideMenu.dispatch(), 
                this.keyboardNav.destroy());
            },
            renderMenu: function() {
                var node, self = this, settings = this.settings, list = DOM.add(settings.menu_container, "div", {
                    role: "listbox",
                    id: this.id + "_menu",
                    class: "mceMenu mceSplitButtonMenu " + settings.menu_class
                }), menu = DOM.add(list, "div", {
                    role: "presentation",
                    class: "mceColorSplitMenu " + settings.class
                });
                return each(is(settings.colors, "array") ? settings.colors : settings.colors.split(","), function(color) {
                    var val = "#" + (color = color.replace(/^#/, "")), color = {
                        style: {
                            backgroundColor: val = 0 == color.indexOf("--") ? "var(" + color + ")" : val
                        },
                        title: self.editor.getLang("colors." + color, val),
                        "data-mce-color": val,
                        class: "mceColorButton",
                        role: "option"
                    };
                    node = DOM.add(menu, "button", color);
                }), node = DOM.add(menu, "button", {
                    title: this.editor.getLang("advanced.no_color", "No Colour"),
                    "data-mce-color": "",
                    role: "option",
                    class: "mceRemoveColor"
                }, "&cross;"), settings.more_colors_func && (node = DOM.add(menu, "button", {
                    role: "option",
                    id: this.id + "_more",
                    class: "mceMoreColors"
                }, settings.more_colors_title), Event.add(node, "click", function(e) {
                    return settings.more_colors_func.call(settings.more_colors_scope || self), 
                    self.hideMenu(), Event.cancel(e);
                })), DOM.addClass(menu, "mceColorSplitMenu"), Event.add(this.id + "_menu", "mousedown", function(e) {
                    return Event.cancel(e);
                }), Event.add(this.id + "_menu", "click", function(e) {
                    var color = (e = DOM.getParent(e.target, "button", menu)).getAttribute("data-mce-color");
                    return e && "button" == e.nodeName.toLowerCase() && void 0 !== color && self.setColor(color), 
                    !1;
                }), list;
            },
            setColor: function(color) {
                this.displayColor(color), this.hideMenu(), this.settings.onselect(color);
            },
            displayColor: function(color) {
                DOM.setStyle(this.id + "_preview", "backgroundColor", color), this.value = color;
            },
            postRender: function() {
                this._super(), DOM.add(this.id + "_action", "span", {
                    id: this.id + "_preview",
                    role: "presentation",
                    class: "mceColorPreview"
                }), DOM.setStyle(this.id + "_preview", "backgroundColor", this.value);
            },
            destroy: function() {
                this._super(), Event.clear(this.id + "_menu"), Event.clear(this.id + "_more"), 
                DOM.remove(this.id + "_menu"), this.keyboardNav && this.keyboardNav.destroy();
            }
        });
    }(tinymce), function(tinymce) {
        var dom = tinymce.DOM, each = tinymce.each, Event = tinymce.dom.Event;
        tinymce.create("tinymce.ui.ToolbarGroup:tinymce.ui.Container", {
            renderHTML: function() {
                var html = [], controls = this.controls, controls = ((0, tinymce.each)(controls, function(toolbar) {
                    html.push(toolbar.renderHTML());
                }), dom.create("div", {
                    id: this.id,
                    role: "group",
                    class: this.settings.class ? this.classPrefix + this.settings.class : ""
                }, html.join("")));
                return dom.getOuterHTML(controls);
            },
            focus: function() {
                dom.get(this.id).focus();
            },
            postRender: function() {
                var editor = this.editor, settings = this.settings, id = this.id, items = [];
                each(this.controls, function(toolbar) {
                    each(toolbar.controls, function(control) {
                        control.id && items.push(control);
                    });
                }), this.keyNav = new tinymce.ui.KeyboardNavigation({
                    root: id,
                    items: items,
                    onCancel: function() {
                        tinymce.isWebKit && dom.get(editor.id + "_ifr").focus(), 
                        editor.focus();
                    },
                    excludeFromTabOrder: !settings.tab_focus_toolbar
                });
            },
            destroy: function() {
                this._super(), this.keyNav.destroy(), Event.clear(this.id);
            }
        });
    }(tinymce), function(tinymce) {
        var dom = tinymce.DOM;
        tinymce.create("tinymce.ui.Toolbar:tinymce.ui.Container", {
            renderHTML: function() {
                for (var html = "", settings = this.settings, controls = settings.controls || this.controls, i = 0; i < controls.length; i++) html += controls[i].renderHTML();
                return this.controls = controls, dom.createHTML("div", {
                    id: this.id,
                    class: "mceToolbarRow" + (settings.class ? " " + settings.class : ""),
                    role: "group"
                }, html);
            }
        });
    }(tinymce), function(tinymce) {
        var dom = tinymce.DOM;
        tinymce.create("tinymce.ui.Layout:tinymce.ui.Container", {
            renderHTML: function() {
                for (var html = "", settings = this.settings, controls = settings.controls || this.controls, i = 0; i < controls.length; i++) html += controls[i].renderHTML();
                return this.controls = controls, dom.createHTML("div", {
                    id: this.id,
                    class: "mceFlexLayout " + (settings.class ? " " + settings.class : ""),
                    role: "group"
                }, html);
            },
            postRender: function() {
                var i;
                for (this._super(), i = 0; i < this.controls.length; i++) this.controls[i].postRender();
            },
            destroy: function() {
                this._super();
                for (var i = 0; i < this.controls.length; i++) this.controls[i].destroy();
                delete this.lookup[this.id];
            }
        });
    }(tinymce), function(tinymce) {
        var DOM = tinymce.DOM, Event = tinymce.dom.Event, each = tinymce.each, Dispatcher = tinymce.util.Dispatcher;
        tinymce.create("tinymce.ui.Panel:tinymce.ui.Container", {
            Panel: function(id, s, ed) {
                this._super(id, s, ed), this.settings = s = tinymce.extend({
                    content: "",
                    buttons: []
                }, this.settings), this.editor = ed, this.classPrefix = "mcePanel", 
                this.onRenderPanel = new Dispatcher(this);
            },
            showPanel: function(elm) {
                var x, y, mx, w, vp, panel, self = this, s = this.settings;
                if (this.storeSelection(), self.isPanelRendered || self.renderPanel(), 
                self.isPanelVisible) return self.hidePanel();
                vp = DOM.getViewPort(), (panel = DOM.get(self.id)) && (DOM.show(panel), 
                s.url && (DOM.get(self.id + "_iframe").src = s.url), s = DOM.getPos(elm), 
                w = panel.clientWidth, panel = panel.clientHeight, mx = vp.x + vp.w, 
                vp = vp.y + vp.h, mx < x + w && (x = Math.max(0, mx - w)), vp < y + panel && (y = Math.max(0, vp - panel)), 
                x = s.x, y = s.y, DOM.setStyles(self.id, {
                    left: x,
                    top: y + elm.clientHeight + 5,
                    zIndex: 2e5
                }), self.isPanelVisible = 1, Event.add(DOM.doc, "mousedown", function(e) {
                    DOM.getParents(e.target, ".mcePanel").length || self.hidePanel();
                }));
            },
            storeSelection: function() {
                tinymce.isIE && (this.editor.focus(), this.bookmark = this.editor.selection.getBookmark(1));
            },
            restoreSelection: function() {
                this.bookmark && (this.editor.selection.moveToBookmark(this.bookmark), 
                this.editor.focus()), this.bookmark = 0;
            },
            renderPanel: function() {
                var footer, self = this, s = this.settings, prefix = this.classPrefix, panel = DOM.add(DOM.doc.body, "div", {
                    role: "presentation",
                    id: self.id,
                    class: s.class || "defaultSkin",
                    style: "position:absolute;left:0;top:-1000px;"
                }), panel = DOM.add(panel, "div", {
                    class: prefix
                }), content = DOM.add(panel, "div", {
                    class: prefix + "Content"
                }), html = (s.width && DOM.setStyle(panel, "width", s.width), []), navItems = (s.html && ("string" == typeof s.html ? html.push(s.html) : html.push(DOM.createHTML(s.html))), 
                s.controls && each(s.controls, function(ctrl) {
                    html.push(ctrl.renderHTML()), ctrl.postRender(), setTimeout(function() {
                        ctrl.controls && each(ctrl.controls, function(c) {
                            c.postRender();
                        });
                    }, 0);
                }), DOM.setHTML(content, html.join("")), s.url && DOM.add(content, "iframe", {
                    id: self.id + "_iframe",
                    src: s.url,
                    style: {
                        border: 0,
                        width: "100%",
                        height: "100%"
                    },
                    onload: function() {
                        self.isPanelRendered = !0, self.onRenderPanel.dispatch(self);
                    }
                }), s.buttons.length && (footer = DOM.add(panel, "div", {
                    class: prefix + "Footer"
                }), each(s.buttons, function(o) {
                    var btn = DOM.add(footer, "button", {
                        type: "button",
                        class: "mceButton",
                        id: self.id + "_button_" + o.id
                    }, o.title || "");
                    o.classes && DOM.addClass(btn, o.classes), o.onclick && Event.add(btn, "click", function(e) {
                        e.preventDefault(), self.restoreSelection(), o.onclick.call(o.scope || self, e) && self.hidePanel();
                    });
                })), tinymce.grep(DOM.select("input, select, button, textarea", panel), function(elm) {
                    return 0 <= elm.getAttribute("tabindex") && -1 === elm.className.indexOf("Disabled");
                }));
                return navItems.length && Event.add(panel, "keydown", function(e) {
                    9 === e.keyCode && e.target === navItems[navItems.length - 1] && (e.preventDefault(), 
                    navItems[0].focus());
                }), Event.add(panel, "keyup", function(e) {
                    13 === e.keyCode && self.settings.onsubmit && (e.preventDefault(), 
                    self.settings.onsubmit());
                }), s.url || (self.isPanelRendered = !0, self.onRenderPanel.dispatch(self)), 
                panel;
            },
            hidePanel: function() {
                DOM.hide(this.id), this.isPanelVisible = 0;
            },
            setButtonDisabled: function(button, state) {
                button = this.id + "_button_" + button, state ? DOM.addClass(button, "disabled") : DOM.removeClass(button, "disabled");
            },
            setButtonLabel: function(button, label) {
                DOM.setHTML(this.id + "_button_" + button, label);
            },
            destroy: function() {
                this._super(), Event.clear(this.id), DOM.remove(this.id);
            }
        });
    }(tinymce), function() {
        var DOM = tinymce.DOM, Event = tinymce.dom.Event, Delay = tinymce.util.Delay;
        tinymce.create("tinymce.ui.ContextPanel:tinymce.ui.Panel", {
            ContextPanel: function(id, s, ed) {
                this._super(id, s, ed), this.settings = s = tinymce.extend({
                    content: "",
                    buttons: []
                }, this.settings), this.editor = ed;
            },
            renderPanel: function() {
                var self = this, scrollFunc = (this._super(), DOM.addClass(DOM.select(".mcePanel", DOM.get(this.id)), "mceContextPanel"), 
                Delay.debounce(function() {
                    self.isPanelVisible && self.positionPanel();
                }, 60));
                self.scrollFunc = Event.add(this.editor.getWin(), "scroll", scrollFunc), 
                this.editor.onHide.add(function() {
                    self.hidePanel();
                });
            },
            showPanel: function(elm) {
                this._super(elm), this.target = elm, this.positionPanel();
            },
            positionPanel: function() {
                var pos, elm, offset, win, panel = DOM.get(this.id);
                panel && (elm = this.target, offset = DOM.getRect(this.editor.getContentAreaContainer()), 
                DOM.removeClass(panel, "mceArrowDown"), (pos = DOM.getPos(elm)).y < 0 || (win = (win = this.editor.getWin()).scrollY + win.innerHeight, 
                pos.y > win - elm.clientHeight) ? this.hidePanel() : (DOM.show(panel), 
                this.isPanelVisible = 1, win = pos.x + offset.x + elm.clientWidth / 2, 
                pos = pos.y + offset.y, win -= panel.clientWidth / 2, (pos = pos + elm.clientHeight + 10) > offset.y + offset.h && (pos -= elm.clientHeight + panel.clientHeight + 10, 
                DOM.addClass(panel, "mceArrowDown")), DOM.setStyles(this.id, {
                    left: win,
                    top: pos,
                    zIndex: 2e5
                })));
            },
            destroy: function() {
                Event.remove(this.editor.getWin(), "scroll", self.scrollFunc), this._super();
            }
        });
    }(), function(tinymce) {
        var DOM = tinymce.DOM, Event = tinymce.dom.Event, Dispatcher = tinymce.util.Dispatcher;
        tinymce.create("tinymce.ui.PanelButton:tinymce.ui.Button", {
            PanelButton: function(id, s, ed) {
                this._super(id, s, ed), this.settings = s = tinymce.extend({}, this.settings), 
                this.editor = ed, this.classPrefix = "mcePanelButton", this.onShowPanel = new Dispatcher(this), 
                this.onHidePanel = new Dispatcher(this), this.onRenderPanel = new Dispatcher(this);
            },
            showPanel: function() {
                var elm;
                this.isDisabled() || (elm = DOM.get(this.id), this.panel.showPanel(elm), 
                this.onShowPanel.dispatch(this), this.setState("Selected", 1), this.setAriaProperty("expanded", !0));
            },
            hidePanel: function(e) {
                var self = this;
                !self.panel || e && "mousedown" == e.type && DOM.getParent(e.target, function(e) {
                    return e.id === self.id || e.id === self.id + "_open";
                }) || e && DOM.getParent(e.target, ".mcePanel") || (self.setState("Selected", 0), 
                Event.remove(DOM.doc, "mousedown", self.hidePanel, self), self.panel.hidePanel(), 
                self.onHidePanel.dispatch(self), self.setAriaProperty("expanded", !1));
            },
            postRender: function() {
                var self = this, s = self.settings;
                DOM.addClass(self.id, "mceButton"), Event.add(self.id, "click", function(evt) {
                    self.isDisabled() || (s.onclick && s.onclick(self.value), self.showPanel()), 
                    Event.cancel(evt);
                }), Event.add(self.id, "focus", function() {
                    self._focused = 1;
                }), Event.add(self.id, "blur", function() {
                    self._focused = 0;
                }), self.panel || (self.panel = self.editor.controlManager.createPanel(self.id + "_panel", self.settings), 
                self.editor.onMouseDown.add(self.hidePanel, self)), self.panel.onRenderPanel.add(function() {
                    self.onRenderPanel.dispatch(self);
                }), self.setAriaProperty("expanded", !1);
            },
            restoreSelection: function() {
                self.panel && self.panel.restoreSelection();
            },
            destroy: function() {
                this._super(), Event.clear(this.id + "_panel"), DOM.remove(this.id + "_panel");
            }
        });
    }(tinymce), function(tinymce) {
        var DOM = tinymce.DOM, Event = tinymce.dom.Event;
        tinymce.create("tinymce.ui.PanelSplitButton:tinymce.ui.PanelButton", {
            PanelSplitButton: function(id, s, ed) {
                this._super(id, s, ed);
            },
            renderHTML: function() {
                var html = "", s = this.settings, icon = s.image ? DOM.createHTML("img ", {
                    src: s.image,
                    role: "presentation",
                    class: "mceAction " + s.class
                }) : DOM.createHTML("span", {
                    class: "mceAction " + s.class,
                    role: "presentation"
                }), html = (html += DOM.createHTML("button", {
                    id: this.id + "_action",
                    tabindex: "-1",
                    class: "mceText " + s.class,
                    title: s.title
                }, icon)) + DOM.createHTML("button", {
                    id: this.id + "_open",
                    tabindex: "-1",
                    class: "mceOpen " + s.class,
                    title: s.title
                });
                return DOM.createHTML("div", {
                    id: this.id,
                    role: "button",
                    tabindex: 0,
                    class: "mceSplitButton " + s.class,
                    title: s.title,
                    "aria-label": s.title,
                    "aria-haspopup": "true"
                }, html);
            },
            postRender: function() {
                function activate(evt) {
                    self.isDisabled() || (s.onclick(self.value), Event.cancel(evt));
                }
                var self = this, s = self.settings;
                Event.add(self.id + "_action", "click", activate), Event.add(self.id, [ "click", "keydown" ], function(evt) {
                    32 !== evt.keyCode && 13 !== evt.keyCode && 14 !== evt.keyCode || evt.altKey || evt.ctrlKey || evt.metaKey ? "click" !== evt.type && 40 !== evt.keyCode || (self.showPanel(), 
                    Event.cancel(evt)) : (activate(), Event.cancel(evt));
                }), Event.add(self.id + "_open", "click", function(evt) {
                    self.showPanel(), Event.cancel(evt);
                }), Event.add([ self.id, self.id + "_open" ], "focus", function() {
                    self._focused = 1;
                }), Event.add([ self.id, self.id + "_open" ], "blur", function() {
                    self._focused = 0;
                }), self.panel || (self.panel = new tinymce.ui.Panel(self.id + "_panel", self.settings, self.editor)), 
                self.panel.onRenderPanel.add(function() {
                    self.onRenderPanel.dispatch(self), DOM.addClass(self.id + "_panel", "mcePanelSplitButton");
                });
            }
        });
    }(tinymce), function(tinymce) {
        var Dispatcher = tinymce.util.Dispatcher;
        tinymce.create("tinymce.ui.ButtonDialog:tinymce.ui.PanelButton", {
            ButtonDialog: function(id, s, ed) {
                s.content && (s.html = s.content), s.buttons && tinymce.each(s.buttons, function(btn) {
                    btn.onclick = btn.click || function() {};
                }), this.onShowDialog = new Dispatcher(this), this.onHideDialog = new Dispatcher(this), 
                this._super(id, s, ed);
            },
            showDialog: function() {
                this.showPanel(), this.onShowDialog.dispatch(this);
            },
            hideDialog: function(e) {
                this.hidePanel(e), this.onHideDialog.dispatch(this);
            }
        });
    }(tinymce), function(tinymce) {
        var DOM = tinymce.DOM, count = 0;
        tinymce.create("tinymce.ui.RepeatableItem:tinymce.ui.Container", {
            RepeatableItem: function(id, settings) {
                this._super(id, settings), id = settings.controls[0].id + "_" + count++, 
                delete this.lookup[id], this.controls[0].id = id;
            },
            renderHTML: function() {
                var html = "";
                return html += this.controls[0].renderHTML(), DOM.createHTML("div", {
                    id: this.id,
                    class: "mceRepeatableItem mceForm mceFormRow"
                }, html += '<button class="mceButton"><span role="presentation" class="mceIcon mce_plus"></span><span role="presentation" class="mceIcon mce_trash"></span></button>');
            },
            value: function(value) {
                return arguments.length ? (Array.isArray(value) && (value = value.shift()), 
                this.controls[0].value(value), this) : this.controls[0].value();
            }
        });
    }(tinymce), function(tinymce) {
        var dom = tinymce.DOM, each = tinymce.each, count = 0;
        tinymce.create("tinymce.ui.Repeatable:tinymce.ui.Container", {
            renderHTML: function() {
                for (var settings = this.settings, html = "", controls = this.controls, i = 0; i < controls.length; i++) html += controls[i].renderHTML();
                return dom.createHTML("div", {
                    id: this.id,
                    class: "mceForm mceRepeatable" + (settings.class ? " " + settings.class : ""),
                    role: "group"
                }, html);
            },
            value: function(values) {
                var self = this, controls = this.controls;
                if (arguments.length) {
                    for (i = 0; i < controls.length; i++) controls[i].value(values.shift());
                    return each(values, function(val) {
                        self.addItem(val);
                    }), this;
                }
                for (var values = [], i = 0; i < this.controls.length; i++) {
                    var value = this.controls[i].value();
                    value && (values = values.concat(value));
                }
                return values;
            },
            getItemControl: function() {
                var item = this.settings.item || {
                    type: "TextBox",
                    settings: {}
                };
                return new tinymce.ui[item.type || "TextBox"](this.id + "_item_" + item.id, item.settings || {}, this.editor);
            },
            addItem: function(value) {
                var item = this.getItemControl(), item = new tinymce.ui.RepeatableItem(this.id + "_item_" + count++, {
                    controls: [ item ]
                });
                return this.add(item), item.renderTo(dom.get(this.id)), value && item.value(value), 
                item;
            },
            postRender: function() {
                var self = this, elm = dom.get(this.id);
                dom.bind(elm, "click", function(e) {
                    e.preventDefault(), (e = dom.getParent(e.target, "button")) && (e = e.parentNode, 
                    0 == dom.nodeIndex(e) ? self.addItem() : self.get(e.id).remove());
                }), this.addItem();
            },
            destroy: function() {
                this._super(), this.controls = [];
            }
        });
    }(tinymce), function(tinymce) {
        var each = tinymce.each;
        tinymce.create("tinymce.ui.CustomValue:tinymce.ui.Form", {
            CustomValue: function(id, settings, ed) {
                settings = tinymce.extend(settings, {
                    class: "mceFormRow"
                }), this._super(id, settings, ed);
                var name = new tinymce.ui.TextBox(this.id + "_name", {
                    name: "name",
                    label: ed.getLang("label_name", "Name"),
                    attributes: {
                        autocomplete: !1
                    }
                }), id = new tinymce.ui.TextBox(this.id + "_value", {
                    name: "value",
                    label: ed.getLang("label_value", "Value"),
                    attributes: {
                        autocomplete: !1
                    }
                });
                settings.values && settings.values.length && (name = new tinymce.ui.ListBox(this.id + "_name", {
                    name: "name",
                    label: ed.getLang("label_name", "Name"),
                    combobox: !0
                }), each(settings.values, function(val) {
                    name.add(val, val);
                })), this.add(name), this.add(id);
            },
            renderHTML: function() {
                for (var i = 0; i < this.controls.length; i++) {
                    var ctrl = this.controls[i];
                    ctrl.id = this.id + "_" + ctrl.name;
                }
                return this._super();
            },
            value: function(values) {
                if (arguments.length) {
                    if ("object" == typeof values) for (var key in values) this.controls[0].value(key), 
                    this.controls[1].value(values[key]);
                    return this;
                }
                var data;
                return (key = this.controls[0].value()) ? ((data = {})[key] = this.controls[1].value(), 
                data) : "";
            }
        });
    }(tinymce), function(tinymce) {
        var Dispatcher = tinymce.util.Dispatcher;
        tinymce.AddOnManager = function() {
            this.items = [], this.urls = {}, this.lookup = {}, this.onAdd = new Dispatcher(this);
        }, tinymce.AddOnManager.prototype = {
            get: function(n) {
                if (this.lookup[n]) return this.lookup[n].instance;
            },
            dependencies: function(n) {
                var result;
                return (this.lookup[n] ? this.lookup[n].dependencies : result) || [];
            },
            requireLangPack: function(n) {},
            add: function(id, o, dependencies) {
                return this.items.push(o), this.lookup[id] = {
                    instance: o,
                    dependencies: dependencies
                }, this.onAdd.dispatch(this, id, o), o;
            },
            createUrl: function(baseUrl, dep) {
                return "object" == typeof dep ? dep : {
                    prefix: baseUrl.prefix,
                    resource: dep,
                    suffix: baseUrl.suffix
                };
            },
            addComponents: function(pluginName, scripts) {
                var pluginUrl = this.urls[pluginName];
                tinymce.each(scripts, function(script) {
                    tinymce.ScriptLoader.add(pluginUrl + "/" + script);
                });
            },
            load: function(n, u, cb, s) {
                var self = this, url = u;
                function loadDependencies() {
                    var dependencies = self.dependencies(n);
                    tinymce.each(dependencies, function(dep) {
                        dep = self.createUrl(u, dep), self.load(dep.resource, dep, void 0, void 0);
                    }), cb && (s ? cb.call(s) : cb.call(tinymce.ScriptLoader));
                }
                self.urls[n] || (0 !== (url = "object" == typeof u ? u.prefix + u.resource + u.suffix : url).indexOf("/") && -1 == url.indexOf("://") && (url = tinymce.baseURL + "/" + url), 
                self.urls[n] = url.substring(0, url.lastIndexOf("/")), self.lookup[n] ? loadDependencies() : tinymce.ScriptLoader.add(url, loadDependencies, s));
            }
        }, tinymce.PluginManager = new tinymce.AddOnManager(), tinymce.ThemeManager = new tinymce.AddOnManager();
    }(tinymce), function(tinymce) {
        var each = tinymce.each, extend = tinymce.extend, DOM = tinymce.DOM, Event = tinymce.dom.Event, explode = tinymce.explode, Dispatcher = tinymce.util.Dispatcher, instanceCounter = 0;
        tinymce.documentBaseURL = window.location.href.replace(/[\?#].*$/, "").replace(/[\/\\][^\/]+$/, ""), 
        /[\/\\]$/.test(tinymce.documentBaseURL) || (tinymce.documentBaseURL += "/"), 
        tinymce.baseURL = new tinymce.util.URI(tinymce.documentBaseURL).toAbsolute(tinymce.baseURL), 
        tinymce.baseURI = new tinymce.util.URI(tinymce.baseURL), tinymce.onBeforeUnload = new Dispatcher(tinymce), 
        Event.add(window, "beforeunload", function(e) {
            tinymce.onBeforeUnload.dispatch(tinymce, e);
        }), tinymce.onAddEditor = new Dispatcher(tinymce), tinymce.onRemoveEditor = new Dispatcher(tinymce), 
        tinymce.on = function(name, handler) {
            function wrapped(ed, arg) {
                handler({
                    editor: tinymce.activeEditor
                });
            }
            "addeditor" == (name = name.toLowerCase()) && tinymce.onAddEditor.add(wrapped), 
            "removeeditor" == name && tinymce.onRemoveEditor.add(wrapped);
        }, tinymce.EditorManager = extend(tinymce, {
            editors: [],
            i18n: {},
            activeEditor: null,
            init: function(settings) {
                var self = this;
                function hasClass(elm, className) {
                    return className.constructor === RegExp ? className.test(elm.className) : DOM.hasClass(elm, className);
                }
                self.settings = settings, DOM.bind(window, "ready", function initEditors() {
                    var targets, editors = [];
                    DOM.unbind(window, "ready", initEditors), function(name) {
                        (name = settings.onpageload) && name.apply(self, Array.prototype.slice.call(arguments, 2));
                    }("onpageload"), targets = DOM.unique(function(settings) {
                        var l, targets = [];
                        if (settings.types) each(settings.types, function(type) {
                            targets = targets.concat(DOM.select(type.selector));
                        }); else {
                            if (settings.selector) return DOM.select(settings.selector);
                            if (settings.target) return [ settings.target ];
                            switch (settings.mode) {
                              case "exact":
                                0 < (l = settings.elements || "").length && each(explode(l), function(id) {
                                    var elm;
                                    (elm = DOM.get(id)) ? targets.push(elm) : each(document.forms, function(f) {
                                        each(f.elements, function(e) {
                                            e.name === id && (id = "mce_editor_" + instanceCounter++, 
                                            DOM.setAttrib(e, "id", id), targets.push(e));
                                        });
                                    });
                                });
                                break;

                              case "textareas":
                              case "specific_textareas":
                                each(DOM.select("textarea"), function(elm) {
                                    settings.editor_deselector && hasClass(elm, settings.editor_deselector) || settings.editor_selector && !hasClass(elm, settings.editor_selector) || targets.push(elm);
                                });
                            }
                        }
                        return targets;
                    }(settings)), each(targets, function(elm) {
                        var targetEditor, EditorManager, oldEditors, editors;
                        (elm = self.get(elm.id)) && elm.initialized && !(elm.getContainer() || elm.getBody()).parentNode && (targetEditor = elm, 
                        oldEditors = editors = (EditorManager = tinymce.EditorManager).editors, 
                        editors = tinymce.grep(editors, function(editor) {
                            return targetEditor !== editor;
                        }), EditorManager.activeEditor === targetEditor && (EditorManager.activeEditor = 0 < editors.length ? editors[0] : null), 
                        EditorManager.focusedEditor === targetEditor && (EditorManager.focusedEditor = null), 
                        oldEditors.length, editors.length, elm.remove());
                    }), 0 !== (targets = tinymce.grep(targets, function(elm) {
                        return !self.get(elm.id);
                    })).length && each(targets, function(elm) {
                        !function(id, settings, targetElm) {
                            id = new tinymce.Editor(id, settings, self), editors.push(id), 
                            id.onInit.add(function() {
                                targets.length;
                            }), id.targetElm = id.targetElm || targetElm, id.render();
                        }(function(elm) {
                            var id = elm.id;
                            return id || (id = (id = elm.name) && !DOM.get(id) ? elm.name : DOM.uniqueId(), 
                            elm.setAttribute("id", id)), id;
                        }(elm), settings, elm);
                    });
                });
            },
            get: function(id) {
                return void 0 === id ? this.editors : this.editors.hasOwnProperty(id) ? this.editors[id] : void 0;
            },
            getInstanceById: function(id) {
                return this.get(id);
            },
            add: function(editor) {
                var editors = this.editors;
                return editors[editor.id] = editor, editors.push(editor), this.setActive(editor), 
                this.onAddEditor.dispatch(this, editor), editor;
            },
            remove: function(editor) {
                var i, editors = this.editors;
                if (!editor) return null;
                if (!editors[editor.id]) return null;
                for (delete editors[editor.id], i = 0; i < editors.length; i++) if (editors[i] == editor) {
                    editors.splice(i, 1);
                    break;
                }
                return this.activeEditor == editor && this.setActive(editors[0]), 
                editor.destroy(), this.onRemoveEditor.dispatch(this, editor), editor;
            },
            execCommand: function(c, u, v) {
                var win, ed = this.get(v);
                switch (c) {
                  case "mceFocus":
                    return ed.focus(), !0;

                  case "mceAddEditor":
                  case "mceAddControl":
                    return this.get(v) || new tinymce.Editor(v, this.settings).render(), 
                    !0;

                  case "mceAddFrameControl":
                    return (win = v.window).tinyMCE = tinyMCE, (win.tinymce = tinymce).DOM.doc = win.document, 
                    tinymce.DOM.win = win, (ed = new tinymce.Editor(v.element_id, v)).render(), 
                    !(v.page_window = null);

                  case "mceRemoveEditor":
                  case "mceRemoveControl":
                    return ed && ed.remove(), !0;

                  case "mceToggleEditor":
                    return ed ? ed.isHidden() ? ed.show() : ed.hide() : this.execCommand("mceAddControl", 0, v), 
                    !0;
                }
                return !!this.activeEditor && this.activeEditor.execCommand(c, u, v);
            },
            execInstanceCommand: function(id, c, u, v) {
                return !!(id = this.get(id)) && id.execCommand(c, u, v);
            },
            triggerSave: function() {
                each(this.editors, function(e) {
                    e.save();
                });
            },
            addI18n: function(p, o) {
                var i18n = this.i18n;
                tinymce.is(p, "string") ? each(o, function(o, k) {
                    i18n[p + "." + k] = o;
                }) : each(p, function(o, lc) {
                    each(o, function(o, g) {
                        each(o, function(o, k) {
                            "common" === g ? i18n[lc + "." + k] = o : i18n[lc + "." + g + "." + k] = o;
                        });
                    });
                });
            },
            setActive: function(editor) {
                this.selectedInstance = this.activeEditor = editor;
            }
        }), tinymce.FocusManager = new tinymce.dom.FocusManager(tinymce.EditorManager);
    }(tinymce), function(tinymce) {
        var timer, lastPath = [];
        function nodeChanged(ed, e) {
            timer && clearTimeout(timer), 65 == e.keyCode && tinymce.VK.metaKeyPressed(e) || ed.selection.normalize(), 
            ed.nodeChanged();
        }
        tinymce.NodeChange = function(editor) {
            editor.onSelectionChange.add(function(ed, e) {
                var startElm = ed.selection.getStart(!0);
                lastPath = [ startElm ], !function(ed, startElm) {
                    var i, currentPath = ed.dom.getParents(startElm, "*", ed.getBody());
                    if (currentPath.reverse(), currentPath.length === lastPath.length) {
                        for (i = currentPath.length; 0 <= i && currentPath[i] === lastPath[i]; i--);
                        if (-1 === i) return lastPath = currentPath, 1;
                    }
                    lastPath = currentPath;
                }(ed, startElm) && ed.dom.isChildOf(startElm, ed.getBody()) && nodeChanged(ed, e);
            }), editor.onMouseUp.add(function(ed, e) {
                e.isDefaultPrevented() || ("IMG" == ed.selection.getNode().nodeName ? timer = setTimeout(function() {
                    nodeChanged(ed, e);
                }, 0) : nodeChanged(ed, e));
            }), this.nodeChanged = function(args) {
                var node, root, parents, selection = editor.selection;
                editor.initialized && selection && !editor.settings.disable_nodechange && !editor.readonly && (root = editor.getBody(), 
                (node = selection.getStart(!0) || root).ownerDocument == editor.getDoc() && editor.dom.isChildOf(node, root) || (node = root), 
                parents = [], editor.dom.getParent(node, function(node) {
                    if (node === root) return !0;
                    parents.push(node);
                }), (args = args || {}).element = node, args.parents = parents, 
                args.contenteditable = !node.hasAttribute("contenteditable") || tinymce.dom.NodeType.isContentEditableTrue(node), 
                editor.onNodeChange.dispatch(editor, args && args.controlManager || editor.controlManager, node, selection.isCollapsed(), args));
            };
        };
    }(tinymce), function(tinymce) {
        function normalizeSelection(editor) {
            editor.selection.normalize();
        }
        function focusBody(body) {
            if (body.setActive) try {
                body.setActive();
            } catch (ex) {
                body.focus();
            } else body.focus();
        }
        var activateEditor = function(editor) {
            tinymce.setActive(editor);
        };
        tinymce.EditorFocus = {
            focus: function(editor, skipFocus) {
                editor.removed || (skipFocus ? activateEditor : function(editor) {
                    editor.getDoc();
                    var body = editor.getBody(), contentEditable = editor.settings.content_editable, selection = editor.selection, rng = selection.getRng();
                    rng.item && rng.item(0), rng = function(editor, node) {
                        return editor.dom.getParent(node, function(node) {
                            return "true" === editor.dom.getContentEditable(node);
                        });
                    }(editor, selection.getNode()), editor.dom.contains(body, rng) ? (focusBody(rng), 
                    normalizeSelection(editor), activateEditor(editor)) : (contentEditable || editor.getWin().focus(), 
                    (tinymce.isGecko || contentEditable) && (contentEditable && document.activeElement !== body && editor.selection.setRng(editor.lastRng), 
                    focusBody(body), normalizeSelection(editor)));
                })(editor);
            }
        };
    }(tinymce), function(tinymce) {
        var DOM = tinymce.DOM, Event = tinymce.dom.Event, extend = tinymce.extend, each = tinymce.each, isGecko = tinymce.isGecko, isIE = tinymce.isIE, is = tinymce.is, ThemeManager = tinymce.ThemeManager, PluginManager = tinymce.PluginManager, EditorFocus = tinymce.EditorFocus, explode = tinymce.explode, Zwsp = tinymce.text.Zwsp, TrimBody = tinymce.dom.TrimBody;
        tinymce.Editor = function(id, settings) {
            this.settings = settings = extend({
                id: id,
                language: "en",
                theme: "advanced",
                skin: "modern",
                delta_width: 0,
                delta_height: 0,
                popup_css: "",
                plugins: "",
                document_base_url: tinymce.documentBaseURL,
                add_form_submit_trigger: !0,
                submit_patch: !0,
                add_unload_trigger: !0,
                convert_urls: !0,
                relative_urls: !0,
                remove_script_host: !0,
                table_inline_editing: !1,
                object_resizing: !0,
                accessibility_focus: !0,
                doctype: "<!DOCTYPE html>",
                visual: !0,
                font_size_style_values: "xx-small,x-small,small,medium,large,x-large,xx-large",
                font_size_legacy_values: "xx-small,small,medium,large,x-large,xx-large,300%",
                apply_source_formatting: !0,
                directionality: "ltr",
                forced_root_block: "p",
                hidden_input: !0,
                padd_empty_editor: !0,
                render_ui: !0,
                indentation: "30px",
                fix_table_elements: !0,
                inline_styles: !0,
                convert_fonts_to_spans: !0,
                indent: "simple",
                indent_before: "p,h1,h2,h3,h4,h5,h6,blockquote,div,title,style,pre,script,td,ul,li,area,table,thead,tfoot,tbody,tr,section,article,hgroup,aside,figure,option,optgroup,datalist",
                indent_after: "p,h1,h2,h3,h4,h5,h6,blockquote,div,title,style,pre,script,td,ul,li,area,table,thead,tfoot,tbody,tr,section,article,hgroup,aside,figure,option,optgroup,datalist",
                validate: !0,
                entity_encoding: "named",
                url_converter: this.convertURL,
                url_converter_scope: this,
                validate_styles: !0
            }, settings), this.id = this.editorId = id, this.isNotDirty = !1, this.plugins = {}, 
            this.documentBaseURI = new tinymce.util.URI(settings.document_base_url || tinymce.documentBaseURL, {
                base_uri: tinymce.baseURI
            }), this.baseURI = tinymce.baseURI, this.contentCSS = [], this.contentStyles = [], 
            this.setupEvents(), this.execCommands = {}, this.queryStateCommands = {}, 
            this.queryValueCommands = {}, this.execCallback("setup", this);
        }, tinymce.Editor.prototype = {
            render: function() {
                var self = this, s = self.settings, id = self.id, sl = tinymce.ScriptLoader;
                Event.domLoaded ? (tinymce.settings = s, !self.getElement() || tinymce.isIDevice && !tinymce.isIOS5 || (!/TEXTAREA|INPUT/i.test(self.getElement().nodeName) && s.hidden_input && DOM.getParent(id, "form") && DOM.insertAfter(DOM.create("input", {
                    type: "hidden",
                    name: id
                }), id), s.content_editable || (self.orgVisibility = self.getElement().style.visibility, 
                self.getElement().style.visibility = "hidden"), tinymce.WindowManager && (self.windowManager = new tinymce.WindowManager(self)), 
                "xml" == s.encoding && self.onGetContent.add(function(ed, o) {
                    o.save && (o.content = DOM.encode(o.content));
                }), s.add_form_submit_trigger && self.onSubmit.addToTop(function() {
                    self.initialized && (self.save(), self.isNotDirty = !0);
                }), s.add_unload_trigger && (self._beforeUnload = tinymce.onBeforeUnload.add(function() {
                    !self.initialized || self.destroyed || self.isHidden() || self.save({
                        format: "raw",
                        no_events: !0
                    });
                })), tinymce.addUnload(self.destroy, self), s.submit_patch && self.onBeforeRenderUI.add(function() {
                    var n = self.getElement().form;
                    !n || n._mceOldSubmit || n.submit.nodeType || n.submit.length || ((self.formElement = n)._mceOldSubmit = n.submit, 
                    n.submit = function() {
                        return tinymce.triggerSave(), self.isNotDirty = !0, self.formElement._mceOldSubmit(self.formElement);
                    });
                }), s.theme && "function" != typeof s.theme && "-" != s.theme.charAt(0) && !ThemeManager.urls[s.theme] && ThemeManager.load(s.theme, "themes/" + s.theme + "/theme" + tinymce.suffix + ".js"), 
                each(explode(s.plugins), function(p) {
                    var dependencies;
                    p && !PluginManager.urls[p] && ("-" == p.charAt(0) ? (p = p.substr(1, p.length), 
                    dependencies = PluginManager.dependencies(p), each(dependencies, function(dep) {
                        var defaultSettings = {
                            prefix: "plugins/",
                            resource: dep,
                            suffix: "/plugin" + tinymce.suffix + ".js"
                        };
                        dep = PluginManager.createUrl(defaultSettings, dep), PluginManager.load(dep.resource, dep);
                    })) : PluginManager.load(p, {
                        prefix: "plugins/",
                        resource: p,
                        suffix: "/plugin" + tinymce.suffix + ".js"
                    }));
                }), each(s.external_plugins, function(url, name) {
                    url && (PluginManager.load(name, url), s.plugins += "," + name);
                }), sl.loadQueue(function() {
                    self.removed || self.init();
                }))) : Event.add(window, "ready", function() {
                    self.render();
                });
            },
            init: function() {
                var h, mh, o, url, w, re, self = this, s = self.settings, e = self.getElement(), initializedPlugins = [];
                if (tinymce.add(self), s.aria_label = s.aria_label || DOM.getAttrib(e, "aria-label", self.getLang("aria.rich_text_area")), 
                s.theme && ("function" != typeof s.theme ? (s.theme = s.theme.replace(/-/, ""), 
                o = ThemeManager.get(s.theme), self.theme = new o(), self.theme.init && self.theme.init(self, ThemeManager.urls[s.theme] || tinymce.documentBaseURL.replace(/\/$/, ""))) : self.theme = s.theme), 
                Array.isArray(s.plugins) && (s.plugins = s.plugins.join(",")), each(explode(s.plugins.replace(/\-/g, "")), function initPlugin(p) {
                    var c = PluginManager.get(p), u = PluginManager.urls[p] || tinymce.documentBaseURL.replace(/\/$/, "");
                    c && -1 === tinymce.inArray(initializedPlugins, p) && (each(PluginManager.dependencies(p), function(dep) {
                        initPlugin(dep);
                    }), c = new c(self, u), (self.plugins[p] = c).init && c.init(self, u), 
                    initializedPlugins.push(p));
                }), self.controlManager = new tinymce.ControlManager(self), self.onBeforeRenderUI.dispatch(self, self.controlManager), 
                s.render_ui && self.theme && (self.orgDisplay = e.style.display, 
                "function" != typeof s.theme ? (w = s.width, h = s.height || e.style.height || e.offsetHeight, 
                mh = s.min_height || 100, (re = /^[0-9\.]+(|px)$/i).test("" + w) && (w = Math.max(parseInt(w, 10) + (o.deltaWidth || 0), 100)), 
                re.test("" + h) && (h = Math.max(parseInt(h, 10) + (o.deltaHeight || 0), mh)), 
                o = self.theme.renderUI({
                    targetNode: e,
                    width: w,
                    height: h,
                    deltaWidth: s.delta_width,
                    deltaHeight: s.delta_height
                }), w && DOM.setStyles(o.sizeContainer || o.editorContainer, {
                    width: w
                }), (h = (o.iframeHeight || h) + ("number" == typeof h ? o.deltaHeight || 0 : "")) < mh && (h = mh)) : ((o = s.theme(self, e)).editorContainer.nodeType && (o.editorContainer = o.editorContainer.id = o.editorContainer.id || self.id + "_parent"), 
                o.iframeContainer.nodeType && (o.iframeContainer = o.iframeContainer.id = o.iframeContainer.id || self.id + "_iframecontainer"), 
                h = o.iframeHeight || e.offsetHeight, isIE && (self.onInit.add(function(ed) {
                    ed.dom.bind(ed.getBody(), "beforedeactivate keydown keyup", function() {
                        ed.bookmark = ed.selection.getBookmark(1);
                    });
                }), self.onNodeChange.add(function(ed) {
                    document.activeElement.id == ed.id + "_ifr" && (ed.bookmark = ed.selection.getBookmark(1));
                }))), self.editorContainer = o.editorContainer), s.content_css && each(explode(s.content_css), function(u) {
                    self.contentCSS.push(self.documentBaseURI.toAbsolute(u));
                }), s.content_style && self.contentStyles.push(s.content_style), 
                s.content_editable) return e = o = null, self.initContentBody();
                document.domain && location.hostname != document.domain && (tinymce.relaxedDomain = document.domain), 
                self.iframeHTML = s.doctype + '<html dir="' + s.directionality + '"><head xmlns="http://www.w3.org/1999/xhtml">', 
                s.document_base_url != tinymce.documentBaseURL && (self.iframeHTML += '<base href="' + self.documentBaseURI.getURI() + '" />'), 
                self.iframeHTML += '<meta http-equiv="Content-Type" content="text/html; charset=UTF-8" />', 
                -1 != (re = s.body_id || "tinymce").indexOf("=") && (re = (re = self.getParam("body_id", "", "hash"))[self.id] || re), 
                -1 != (w = s.body_class || "").indexOf("=") && (w = (w = self.getParam("body_class", "", "hash"))[self.id] || ""), 
                self.iframeHTML += '</head><body id="' + re + '" class="mceContentBody ' + w + '"><br></body></html>', 
                tinymce.relaxedDomain && (url = 'javascript:(function(){document.open();document.domain="' + document.domain + '";var ed = window.parent.tinymce.get("' + self.id + '");document.write(ed.iframeHTML);document.close();ed.initContentBody();})()');
                var ifr = DOM.add(o.iframeContainer, "iframe", {
                    id: self.id + "_ifr",
                    frameBorder: "0",
                    allowTransparency: "true",
                    title: s.aria_label,
                    style: {
                        height: h
                    }
                });
                ifr.onload = function() {
                    ifr.onload = null, self.onLoad.dispatch();
                }, self.contentAreaContainer = o.iframeContainer, o.editorContainer && (DOM.get(o.editorContainer).style.display = self.orgDisplay), 
                e.style.visibility = self.orgVisibility, DOM.get(self.id).style.display = "none", 
                DOM.setAttrib(self.id, "aria-hidden", !0), tinymce.relaxedDomain && url || self.initContentBody();
            },
            initContentBody: function() {
                var body, contentCssText, self = this, settings = self.settings, targetElm = DOM.get(self.id), doc = self.getDoc(), styleLoader = (isIE && tinymce.relaxedDomain || settings.content_editable || (doc.open(), 
                doc.write(self.iframeHTML), doc.close(), tinymce.relaxedDomain && (doc.domain = tinymce.relaxedDomain)), 
                settings.content_editable && (DOM.addClass(targetElm, "mceContentBody"), 
                self.contentDocument = doc = settings.content_document || document, 
                self.contentWindow = settings.content_window || window, self.bodyElement = targetElm, 
                settings.content_document = settings.content_window = null), (body = self.getBody()).disabled = !0, 
                settings.readonly || (body.contentEditable = self.getParam("content_editable_state", !0)), 
                body.disabled = !1, self.schema = new tinymce.html.Schema(settings), 
                self.dom = new tinymce.dom.DOMUtils(doc, {
                    keep_values: !0,
                    url_converter: self.convertURL,
                    url_converter_scope: self,
                    hex_colors: settings.force_hex_style_colors,
                    class_filter: settings.class_filter,
                    update_styles: !0,
                    root_element: settings.content_editable ? self.id : null,
                    schema: self.schema
                }), self.parser = new tinymce.html.DomParser(settings, self.schema), 
                self.parser.addAttributeFilter("src,href,style", function(nodes, name) {
                    for (var node, value, internalName, i = nodes.length, dom = self.dom; i--; ) value = (node = nodes[i]).attr(name), 
                    node.attributes.map[internalName = "data-mce-" + name] || ("style" === name ? (settings.validate_styles && (value = dom.serializeStyle(dom.parseStyle(value), node.name)), 
                    node.attr(internalName, value)) : node.attr(internalName, self.convertURL(value, name, node.name)));
                }), self.parser.addNodeFilter("#cdata", function(nodes) {
                    for (var node, i = nodes.length; i--; ) (node = nodes[i]).type = 8, 
                    node.name = "#comment", node.value = "[CDATA[" + node.value + "]]";
                }), self.parser.addNodeFilter("p,h1,h2,h3,h4,h5,h6,div", function(nodes) {
                    for (var node, i = nodes.length, nonEmptyElements = self.schema.getNonEmptyElements(); i--; ) (node = nodes[i]).isEmpty(nonEmptyElements) && (node.empty().append(new tinymce.html.Node("br", 1)).shortEnded = !0);
                }), self.serializer = new tinymce.dom.Serializer(settings, self.dom, self.schema), 
                self.selection = new tinymce.dom.Selection(self.dom, self.getWin(), self.serializer, self), 
                self.formatter = new tinymce.Formatter(self), self.textpattern = new tinymce.TextPattern(self), 
                self.undoManager = new tinymce.UndoManager(self), self.forceBlocks = new tinymce.ForceBlocks(self), 
                self.enterKey = new tinymce.EnterKey(self), self._nodeChangeDispatcher = new tinymce.NodeChange(self), 
                self.editorCommands = new tinymce.EditorCommands(self), self._selectionOverrides = new tinymce.SelectionOverrides(self), 
                self._clipBoard = new tinymce.Clipboard(self), self.onExecCommand.add(function(editor, command) {
                    /^(FontName|FontSize)$/.test(command) || self.nodeChanged();
                }), self.serializer.onPreProcess.add(function(se, o) {
                    return self.onPreProcess.dispatch(self, o, se);
                }), self.serializer.onPostProcess.add(function(se, o) {
                    return self.onPostProcess.dispatch(self, o, se);
                }), self.onPreInit.dispatch(self), settings.browser_spellcheck || settings.gecko_spellcheck || (doc.body.spellcheck = !1), 
                settings.readonly || self.bindNativeEvents(), self.controlManager.onPostRender.dispatch(self, self.controlManager), 
                self.onPostRender.dispatch(self), self.quirks = tinymce.util.Quirks(self), 
                settings.directionality && (body.dir = settings.directionality), 
                settings.nowrap && (body.style.whiteSpace = "nowrap"), settings.protect && self.onBeforeSetContent.add(function(ed, o) {
                    each(settings.protect, function(pattern) {
                        o.content = o.content.replace(pattern, function(str) {
                            return "\x3c!--mce:protected " + escape(str) + "--\x3e";
                        });
                    });
                }), self.onSetContent.add(function() {
                    self.addVisual(self.getBody());
                }), settings.padd_empty_editor && self.onPostProcess.add(function(ed, o) {
                    o.content = o.content.replace(/^(<p[^>]*>(&nbsp;|&#160;|\s|\u00a0|)<\/p>[\r\n]*|<br \/>[\r\n]*)$/, "");
                }), self.load({
                    initial: !0,
                    format: "html"
                }), self.startContent = self.getContent({
                    format: "raw"
                }), 0 < self.contentStyles.length && (contentCssText = "", each(self.contentStyles, function(style) {
                    contentCssText += style + "\r\n";
                }), self.dom.addStyle(contentCssText)), new tinymce.dom.StyleSheetLoader(self.getDoc()));
                each(self.contentCSS, function(url) {
                    styleLoader.add(url);
                }), styleLoader.loadQueue(function() {
                    self.initialized = !0, self.onInit.dispatch(self), self.execCallback("setupcontent_callback", self.id, body, doc), 
                    self.execCallback("init_instance_callback", self), self.focus(!0), 
                    self.nodeChanged({
                        initial: !0
                    }), settings.auto_focus && setTimeout(function() {
                        var focusEditor = !0 === settings.auto_focus ? self : tinymce.get(settings.auto_focus);
                        focusEditor.destroyed || focusEditor.focus();
                    }, 100);
                }), doc = body = null;
            },
            focus: function(skip_focus) {
                EditorFocus.focus(this, skip_focus);
            },
            execCallback: function(n) {
                var s, f = this.settings[n];
                if (f) return this.callbackLookup && (s = this.callbackLookup[n]) && (f = s.func, 
                s = s.scope), is(f, "string") && (s = (s = f.replace(/\.\w+$/, "")) ? tinymce.resolve(s) : 0, 
                f = tinymce.resolve(f), this.callbackLookup = this.callbackLookup || {}, 
                this.callbackLookup[n] = {
                    func: f,
                    scope: s
                }), f.apply(s || this, Array.prototype.slice.call(arguments, 1));
            },
            translate: function(s) {
                var c = this.settings.language || "en", i18n = tinymce.i18n;
                return s ? i18n[c + "." + s] || s.replace(/\{\#([^\}]+)\}/g, function(a, b) {
                    return i18n[c + "." + b] || "{#" + b + "}";
                }) : "";
            },
            getLang: function(n, dv) {
                return tinymce.i18n[(this.settings.language || "en") + "." + n] || (is(dv) ? dv : "{#" + n + "}");
            },
            getParam: function(n, dv, ty) {
                var o, tr = tinymce.trim, n = is(this.settings[n]) ? this.settings[n] : dv;
                return "hash" === ty ? (o = {}, is(n, "string") ? each(0 < n.indexOf("=") ? n.split(/[;,](?![^=;,]*(?:[;,]|$))/) : n.split(","), function(v) {
                    1 < (v = v.split("=")).length ? o[tr(v[0])] = tr(v[1]) : o[tr(v[0])] = tr(v);
                }) : o = n, o) : n;
            },
            nodeChanged: function(args) {
                this._nodeChangeDispatcher.nodeChanged(args);
            },
            addButton: function(name, settings) {
                this.buttons = this.buttons || {}, this.buttons[name] = settings;
            },
            addCommand: function(name, callback, scope) {
                this.execCommands[name] = {
                    func: callback,
                    scope: scope || this
                };
            },
            addQueryStateHandler: function(name, callback, scope) {
                this.queryStateCommands[name] = {
                    func: callback,
                    scope: scope || this
                };
            },
            addQueryValueHandler: function(name, callback, scope) {
                this.queryValueCommands[name] = {
                    func: callback,
                    scope: scope || this
                };
            },
            queryCommandSupported: function(cmd) {
                return this.editorCommands.queryCommandSupported(cmd);
            },
            addShortcut: function(pattern, desc, cmdFunc, scope) {
                var self = this;
                if (!1 === self.settings.custom_shortcuts) return !1;
                self.shortcuts = self.shortcuts || {};
                var cmd, keyCodeLookup = {
                    f9: 120,
                    f10: 121,
                    f11: 122
                }, modifierNames = tinymce.makeMap("alt,ctrl,shift,meta,access");
                function parseShortcut(pattern) {
                    var id, key, shortcut = {};
                    for (key in each(explode(pattern, "+"), function(value) {
                        value in modifierNames ? shortcut[value] = !0 : /^[0-9]{2,}$/.test(value) ? shortcut.keyCode = parseInt(value, 10) : (shortcut.charCode = value.charCodeAt(0), 
                        shortcut.keyCode = keyCodeLookup[value] || value.toUpperCase().charCodeAt(0));
                    }), id = [ shortcut.keyCode ], modifierNames) shortcut[key] ? id.push(key) : shortcut[key] = !1;
                    return shortcut.id = id.join(","), shortcut.access && (shortcut.alt = !0, 
                    tinymce.isMac ? shortcut.ctrl = !0 : shortcut.shift = !0), shortcut.meta && (tinymce.isMac ? shortcut.meta = !0 : (shortcut.ctrl = !0, 
                    shortcut.meta = !1)), shortcut;
                }
                return "string" == typeof (cmd = cmdFunc) ? cmdFunc = function() {
                    self.execCommand(cmd, !1, null);
                } : tinymce.isArray(cmd) && (cmdFunc = function() {
                    self.execCommand(cmd[0], cmd[1], cmd[2]);
                }), each(explode(tinymce.trim(pattern.toLowerCase())), function(pattern) {
                    pattern = function(pattern, desc, cmdFunc, scope) {
                        return (pattern = tinymce.map(explode(pattern, ">"), parseShortcut))[pattern.length - 1] = extend(pattern[pattern.length - 1], {
                            func: cmdFunc,
                            scope: scope || self
                        }), extend(pattern[0], {
                            desc: self.translate(desc),
                            subpatterns: pattern.slice(1)
                        });
                    }(pattern, desc, cmdFunc, scope), self.shortcuts[pattern.id] = pattern;
                }), !0;
            },
            execCommand: function(cmd, ui, val, a) {
                var o, self = this, s = 0;
                return /^(mceAddUndoLevel|mceEndUndoLevel|mceBeginUndoLevel|mceRepaint|SelectAll)$/.test(cmd) || a && a.skip_focus || self.focus(), 
                a = extend({}, a), self.onBeforeExecCommand.dispatch(self, cmd, ui, val, a), 
                !a.terminate && (self.execCallback("execcommand_callback", self.id, self.selection.getNode(), cmd, ui, val) ? (self.onExecCommand.dispatch(self, cmd, ui, val, a), 
                !0) : (o = self.execCommands[cmd]) && !0 !== (o = o.func.call(o.scope, ui, val)) ? (self.onExecCommand.dispatch(self, cmd, ui, val, a), 
                o) : (each(self.plugins, function(p) {
                    if (p.execCommand && p.execCommand(cmd, ui, val)) return self.onExecCommand.dispatch(self, cmd, ui, val, a), 
                    !(s = 1);
                }), !!s || (self.theme && self.theme.execCommand && self.theme.execCommand(cmd, ui, val) || self.editorCommands.execCommand(cmd, ui, val) ? (self.onExecCommand.dispatch(self, cmd, ui, val, a), 
                !0) : (self.getDoc().execCommand(cmd, ui, val), void self.onExecCommand.dispatch(self, cmd, ui, val, a)))));
            },
            queryCommandState: function(cmd) {
                var o, s;
                if (!this._isHidden()) {
                    if ((o = this.queryStateCommands[cmd]) && !0 !== (s = o.func.call(o.scope))) return s;
                    if (-1 !== (o = this.editorCommands.queryCommandState(cmd))) return o;
                    try {
                        return this.getDoc().queryCommandState(cmd);
                    } catch (ex) {}
                }
            },
            queryCommandValue: function(c) {
                var o, s;
                if (!this._isHidden()) {
                    if ((o = this.queryValueCommands[c]) && !0 !== (s = o.func.call(o.scope))) return s;
                    if (o = this.editorCommands.queryCommandValue(c), is(o)) return o;
                    try {
                        return this.getDoc().queryCommandValue(c);
                    } catch (ex) {}
                }
            },
            show: function() {
                DOM.show(this.getContainer()), DOM.hide(this.id), this.load(), this.onShow.dispatch(this);
            },
            hide: function() {
                var doc = this.getDoc();
                isIE && doc && doc.execCommand("SelectAll"), this.save(), DOM.hide(this.getContainer()), 
                DOM.setStyle(this.id, "display", this.orgDisplay), this.onHide.dispatch(this);
            },
            isHidden: function() {
                return !DOM.isHidden(this.id);
            },
            setProgressState: function(b, ti, o) {
                return this.onSetProgressState.dispatch(this, b, ti, o), b;
            },
            load: function(o) {
                var h, e = this.getElement();
                if (e) return (o = o || {}).load = !0, h = this.setContent(is(e.value) ? e.value : e.innerHTML, o), 
                o.element = e, o.no_events || this.onLoadContent.dispatch(this, o), 
                o.element = null, h;
            },
            save: function(o) {
                var h, f, self = this, e = self.getElement();
                if (e && self.initialized) return (o = o || {}).save = !0, o.element = e, 
                o.content = self.getContent(o), o.no_events || self.onSaveContent.dispatch(self, o), 
                h = o.content, /TEXTAREA|INPUT/i.test(e.nodeName) ? e.value = h : (e.innerHTML = h, 
                (f = DOM.getParent(self.id, "form")) && each(f.elements, function(e) {
                    if (e.name == self.id) return e.value = h, !1;
                })), o.element = e = null, h;
            },
            setContent: function(content, args) {
                var forcedRootBlockName, body = this.getBody();
                return (args = args || {}).format = args.format || "html", args.set = !0, 
                args.content = content, args.no_events || this.onBeforeSetContent.dispatch(this, args), 
                0 === (content = args.content).length || /^\s+$/.test(content) ? ((forcedRootBlockName = this.settings.forced_root_block) && this.schema.isValidChild(body.nodeName.toLowerCase(), forcedRootBlockName.toLowerCase()) ? content = isIE ? "<" + forcedRootBlockName + "></" + forcedRootBlockName + ">" : "<" + forcedRootBlockName + '><br data-mce-bogus="1"></' + forcedRootBlockName + ">" : isIE || (content = '<br data-mce-bogus="1">'), 
                this.dom.setHTML(body, content), this.onSetContent.dispatch(this, args)) : ("raw" !== args.format && (content = new tinymce.html.Serializer({}, this.schema).serialize(this.parser.parse(content))), 
                args.content = tinymce.trim(content), this.dom.setHTML(body, args.content), 
                args.no_events || this.onSetContent.dispatch(this, args)), args.content;
            },
            insertContent: function(value) {
                this.execCommand("mceInsertContent", !1, value);
            },
            getSelection: function() {
                return this.selection.getContent();
            },
            getContent: function(args) {
                var body = this.getBody();
                return (args = args || {}).format = args.format || "html", args.get = !0, 
                args.getInner = !0, this._selectionOverrides.hideFakeCaret(), this._selectionOverrides.destroy(), 
                args.no_events || this.onBeforeGetContent.dispatch(this, args), 
                body = "raw" == args.format ? tinymce.trim(Zwsp.trim(TrimBody.trim(body, this.serializer.getTempAttrs()).innerHTML)) : "text" == args.format ? body.innerText || body.textContent : this.serializer.serialize(body, args), 
                "text" != args.format ? args.content = tinymce.trim(body) : args.content = body, 
                args.no_events || this.onGetContent.dispatch(this, args), args.content;
            },
            isDirty: function() {
                return tinymce.trim(this.startContent) !== tinymce.trim(this.getContent({
                    format: "raw"
                })) && !this.isNotDirty;
            },
            getContainer: function() {
                return this.container || (this.container = DOM.get(this.editorContainer || this.id + "_parent")), 
                this.container;
            },
            getContentAreaContainer: function() {
                return this.contentAreaContainer;
            },
            getElement: function() {
                return DOM.get(this.settings.content_element || this.id);
            },
            getWin: function() {
                var elm;
                return this.contentWindow || (elm = DOM.get(this.id + "_ifr")) && (this.contentWindow = elm.contentWindow), 
                this.contentWindow;
            },
            getDoc: function() {
                var win;
                return this.contentDocument || (win = this.getWin()) && (this.contentDocument = win.document), 
                this.contentDocument;
            },
            getBody: function() {
                return this.bodyElement || this.getDoc().body;
            },
            convertURL: function(url, name, elm) {
                var settings = this.settings;
                if (settings.urlconverter_callback) return this.execCallback("urlconverter_callback", url, elm, !0, name);
                if (settings.convert_urls && (!elm || "LINK" != elm.nodeName) && 0 !== url.indexOf("file:")) {
                    if (settings.relative_urls) return this.documentBaseURI.toRelative(url);
                    url = this.documentBaseURI.toAbsolute(url, settings.remove_script_host);
                }
                return url;
            },
            addVisual: function(elm) {
                var cls, self = this, settings = self.settings, dom = self.dom;
                elm = elm || self.getBody(), is(self.hasVisual) || (self.hasVisual = settings.visual), 
                self.hasVisual ? dom.addClass(self.getBody(), "mce-visualaid") : dom.removeClass(self.getBody(), "mce-visualaid"), 
                each(dom.select("table,a", elm), function(elm) {
                    var value;
                    switch (elm.nodeName) {
                      case "TABLE":
                        return cls = settings.visual_table_class || "mce-item-table", 
                        void ((value = dom.getAttrib(elm, "border")) && "0" != value || (self.hasVisual ? dom.addClass(elm, cls) : dom.removeClass(elm, cls)));

                      case "A":
                        return void (dom.getAttrib(elm, "href", !1) || (value = dom.getAttrib(elm, "name") || elm.id, 
                        cls = "mce-item-anchor", value && (self.hasVisual ? dom.addClass(elm, cls) : dom.removeClass(elm, cls))));
                    }
                }), self.onVisualAid.dispatch(self, elm, self.hasVisual);
            },
            remove: function() {
                var elm = this.getContainer(), doc = this.getDoc();
                this.removed || (this.removed = 1, isIE && doc && doc.execCommand("SelectAll"), 
                this.save(), DOM.setStyle(this.id, "display", this.orgDisplay), 
                this.getBody().onload = null, this.settings.content_editable || (Event.unbind(this.getWin()), 
                Event.unbind(this.getDoc())), Event.unbind(this.getBody()), Event.clear(elm), 
                this.execCallback("remove_instance_callback", this), this.onRemove.dispatch(this), 
                this.onExecCommand.listeners = [], this._selectionOverrides.destroy(), 
                tinymce.remove(this), DOM.remove(elm));
            },
            destroy: function(s) {
                this.destroyed || (isGecko && (Event.unbind(this.getDoc()), Event.unbind(this.getWin()), 
                Event.unbind(this.getBody())), s || (tinymce.removeUnload(this.destroy), 
                tinymce.onBeforeUnload.remove(this._beforeUnload), this.theme && this.theme.destroy && this.theme.destroy(), 
                this.controlManager.destroy(), this.selection.destroy(), this.dom.destroy()), 
                this.formElement && (this.formElement.submit = this.formElement._mceOldSubmit, 
                this.formElement._mceOldSubmit = null), this.contentAreaContainer = this.formElement = this.container = this.settings.content_element = this.bodyElement = this.contentDocument = this.contentWindow = null, 
                this.selection && (this.selection = this.selection.win = this.selection.dom = this.selection.dom.doc = null), 
                this.destroyed = 1);
            },
            setMode: function(disabled) {
                var body = self.getBody();
                body.contentEditable = disabled, body.disabled = disabled;
            },
            _isHidden: function() {
                var s;
                return isGecko ? !(s = this.selection.getSel()) || !s.rangeCount || 0 === s.rangeCount : 0;
            }
        };
    }(tinymce), function(tinymce) {
        var each = tinymce.each, legacyEventMap = {
            preinit: "onPreInit",
            beforerenderui: "onBeforeRenderUI",
            postrender: "onPostRender",
            load: "onLoad",
            init: "onInit",
            remove: "onRemove",
            activate: "onActivate",
            deactivate: "onDeactivate",
            show: "onShow",
            hide: "onHide",
            click: "onClick",
            event: "onEvent",
            mouseup: "onMouseUp",
            mousedown: "onMouseDown",
            dblclick: "onDblClick",
            keydown: "onKeyDown",
            keyup: "onKeyUp",
            keypress: "onKeyPress",
            contextmenu: "onContextMenu",
            submit: "onSubmit",
            reset: "onReset",
            paste: "onPaste",
            cut: "onCut",
            copy: "onCopy",
            preprocess: "onPreProcess",
            postprocess: "onPostProcess",
            beforesetcontent: "onBeforeSetContent",
            beforegetcontent: "onBeforeGetContent",
            setcontent: "onSetContent",
            getcontent: "onGetContent",
            loadcontent: "onLoadContent",
            savecontent: "onSaveContent",
            nodechange: "onNodeChange",
            change: "onChange",
            beforeexeccmd: "onBeforeExecCommand",
            execcmd: "onExecCommand",
            undo: "onUndo",
            redo: "onRedo",
            visualaid: "onVisualAid",
            setprogressstate: "onSetProgressState",
            setattrib: "onSetAttrib",
            selectionchange: "onSelectionChange",
            blur: "onBlur",
            focus: "onFocus",
            focusin: "onFocusIn",
            focusout: "onFocusOut",
            beforeinput: "onBeforeInput",
            input: "onInput",
            compositionstart: "onCompositionStart"
        };
        tinymce.Editor.prototype.setupEvents = function() {
            var self = this, settings = self.settings, selectionEvents = (each([ "onPreInit", "onBeforeRenderUI", "onPostRender", "onLoad", "onInit", "onRemove", "onActivate", "onDeactivate", "onShow", "onHide", "onClick", "onEvent", "onMouseUp", "onMouseDown", "onDblClick", "onKeyDown", "onKeyUp", "onKeyPress", "onContextMenu", "onSubmit", "onReset", "onPaste", "onCut", "onCopy", "onPreProcess", "onPostProcess", "onBeforeSetContent", "onBeforeGetContent", "onSetContent", "onGetContent", "onLoadContent", "onSaveContent", "onNodeChange", "onChange", "onBeforeExecCommand", "onExecCommand", "onUndo", "onRedo", "onVisualAid", "onSetProgressState", "onSetAttrib", "onSelectionChange", "onBlur", "onFocus", "onFocusIn", "onFocusOut", "onBeforeInput", "onInput", "onCompositionStart" ], function(name) {
                self[name] = new tinymce.util.Dispatcher(self);
            }), settings.cleanup_callback && (self.onBeforeSetContent.add(function(ed, o) {
                o.content = ed.execCallback("cleanup_callback", "insert_to_editor", o.content, o);
            }), self.onPreProcess.add(function(ed, o) {
                o.set && ed.execCallback("cleanup_callback", "insert_to_editor_dom", o.node, o), 
                o.get && ed.execCallback("cleanup_callback", "get_from_editor_dom", o.node, o);
            }), self.onPostProcess.add(function(ed, o) {
                o.set && (o.content = ed.execCallback("cleanup_callback", "insert_to_editor", o.content, o)), 
                o.get && (o.content = ed.execCallback("cleanup_callback", "get_from_editor", o.content, o));
            })), [ "onSetContent", "onBeforeSetContent", "onGetContent", "onBeforeGetContent" ]);
            self.on = function(name, handler, prepend) {
                name.split(" ");
                for (var names, i = (names = name.toLowerCase().split(" ")).length; i--; ) {
                    name = names[i];
                    var evt = legacyEventMap[name] || name, wrapped = function(ed, arg) {
                        ed = "object" == typeof arg && null !== arg ? tinymce.extend({
                            editor: ed
                        }, arg) : {
                            editor: ed,
                            data: arg
                        }, handler(ed);
                    };
                    prepend ? self[evt].addToTop(wrapped) : self[evt].add(wrapped), 
                    -1 !== tinymce.inArray(selectionEvents, evt) && self.selection && "object" == typeof self.selection[evt] && "function" == typeof self.selection[evt].add && (wrapped = function(sel, arg) {
                        arg && !0 === arg.selection && (arg = "object" == typeof arg && null !== arg ? tinymce.extend({
                            editor: self
                        }, arg) : {
                            editor: self,
                            data: arg
                        }, handler(arg));
                    }, prepend ? self.selection[evt].add(wrapped) : self.selection[evt].addToTop(wrapped));
                }
            }, self.fire = function(name, arg) {
                name = name.toLocaleLowerCase(), name = legacyEventMap[name] || name, 
                arg = "object" == typeof arg && null !== arg ? tinymce.extend({
                    editor: self
                }, arg) : {
                    editor: self,
                    data: arg
                }, self[name].dispatch(self, arg);
            }, self.off = function(name, handler) {
                name = name.toLocaleLowerCase(), name = legacyEventMap[name] || name, 
                handler ? self[name].remove(handler) : self[name].removeAll();
            };
        }, tinymce.Editor.prototype.bindNativeEvents = function() {
            var nativeToDispatcherMap, self = this, settings = self.settings, dom = self.dom;
            function eventHandler(evt, args) {
                self.removed || !1 !== self.onEvent.dispatch(self, evt, args) && self[nativeToDispatcherMap[evt.fakeType || evt.type]].dispatch(self, evt, args);
            }
            function matchShortcut(e, shortcut) {
                return shortcut && shortcut.ctrl == e.ctrlKey && shortcut.meta == e.metaKey && shortcut.alt == e.altKey && shortcut.shift == e.shiftKey && (e.keyCode == shortcut.keyCode || e.charCode && e.charCode == shortcut.charCode) && (e.preventDefault(), 
                1);
            }
            function executeShortcutAction(shortcut) {
                shortcut.func && shortcut.func.call(shortcut.scope);
            }
            each(nativeToDispatcherMap = {
                mouseup: "onMouseUp",
                mousedown: "onMouseDown",
                click: "onClick",
                keyup: "onKeyUp",
                keydown: "onKeyDown",
                keypress: "onKeyPress",
                submit: "onSubmit",
                reset: "onReset",
                contextmenu: "onContextMenu",
                dblclick: "onDblClick",
                paste: "onPaste",
                cut: "onCut",
                copy: "onCopy",
                selectionchange: "onSelectionChange",
                focusin: "onFocusIn",
                focusout: "onFocusOut",
                beforeinput: "onBeforeInput",
                input: "onInput"
            }, function(dispatcherName, nativeName) {
                var root = settings.content_editable ? self.getBody() : self.getDoc();
                switch (nativeName) {
                  case "contextmenu":
                    dom.bind(root, nativeName, eventHandler);
                    break;

                  case "paste":
                  case "cut":
                  case "copy":
                    dom.bind(self.getBody(), nativeName, eventHandler);
                    break;

                  case "submit":
                  case "reset":
                    dom.bind(self.getElement().form || tinymce.DOM.getParent(self.id, "form"), nativeName, eventHandler);
                    break;

                  default:
                    dom.bind(root, nativeName, eventHandler);
                }
            }), dom.bind(settings.content_editable ? self.getBody() : tinymce.isGecko ? self.getDoc() : self.getWin(), "focus", function() {
                self.focus(!0);
            }), self.onReset.add(function() {
                self.setContent(self.startContent, {
                    format: "raw"
                });
            });
            var pendingPatterns = [];
            function handleShortcut(e) {
                !function(e) {
                    return e.altKey || e.ctrlKey || e.metaKey;
                }(e) && !function(e) {
                    return "keydown" === e.type && 112 <= e.keyCode && e.keyCode <= 123;
                }(e) || e.isDefaultPrevented() || (each(self.shortcuts, function(shortcut) {
                    if (matchShortcut(e, shortcut)) return pendingPatterns = shortcut.subpatterns.slice(0), 
                    "keydown" == e.type && executeShortcutAction(shortcut), !0;
                }), matchShortcut(e, pendingPatterns[0]) && (1 === pendingPatterns.length && "keydown" == e.type && executeShortcutAction(pendingPatterns[0]), 
                pendingPatterns.shift()));
            }
            self.onKeyUp.add(function(ed, e) {
                handleShortcut(e);
            }), self.onKeyPress.add(function(ed, e) {
                handleShortcut(e);
            }), self.onKeyDown.add(function(ed, e) {
                handleShortcut(e);
            });
        };
    }(tinymce), function(tinymce) {
        function listItems(elm) {
            return tinymce.grep(elm.childNodes, function(child) {
                return "LI" === child.nodeName;
            });
        }
        function trimListItems(elms) {
            return 0 < elms.length && !elms[elms.length - 1].firstChild ? elms.slice(0, -1) : elms;
        }
        function getParentLi(dom, node) {
            return (node = dom.getParent(node, dom.isBlock)) && "LI" === node.nodeName ? node : null;
        }
        function findLastOf(node, rootNode) {
            return node = CaretPosition.after(node), (rootNode = new CaretWalker(rootNode).prev(node)) ? rootNode.toRange() : null;
        }
        var CaretWalker = tinymce.caret.CaretWalker, CaretPosition = tinymce.caret.CaretPosition;
        tinymce.InsertList = {
            isListFragment: function(fragment) {
                var firstChild = fragment.firstChild, fragment = fragment.lastChild;
                return firstChild && "meta" === firstChild.name && (firstChild = firstChild.next), 
                fragment && "mce_marker" === fragment.attr("id") && (fragment = fragment.prev), 
                !(!firstChild || firstChild !== fragment || "ul" !== firstChild.name && "ol" !== firstChild.name);
            },
            insertAtCaret: function(serializer, dom, rng, fragment) {
                function isAt(location) {
                    var caretPos = CaretPosition.fromRangeStart(rng), caretWalker = new CaretWalker(dom.getRoot());
                    return !(location = 1 === location ? caretWalker.prev(caretPos) : caretWalker.next(caretPos)) || getParentLi(dom, location.getNode()) !== liTarget;
                }
                var target, rootNode, parentElm, serializer = function(dom, serializer, fragment) {
                    return serializer = serializer.serialize(fragment), fragment = dom.createFragment(serializer), 
                    serializer = (dom = fragment).firstChild, fragment = dom.lastChild, 
                    serializer && "META" === serializer.nodeName && serializer.parentNode.removeChild(serializer), 
                    fragment && "mce_marker" === fragment.id && fragment.parentNode.removeChild(fragment), 
                    dom;
                }(dom, serializer, fragment), liTarget = getParentLi(dom, rng.startContainer), fragment = trimListItems(listItems(serializer.firstChild)), serializer = dom.getRoot();
                return isAt(1) ? (rootNode = serializer, parentElm = (target = liTarget).parentNode, 
                tinymce.each(fragment, function(elm) {
                    parentElm.insertBefore(elm, target);
                }), function(node, rootNode) {
                    return node = CaretPosition.before(node), (rootNode = new CaretWalker(rootNode).next(node)) ? rootNode.toRange() : null;
                }(target, rootNode)) : isAt(2) ? function(target, elms, rootNode, dom) {
                    return dom.insertAfter(elms.reverse(), target), findLastOf(elms[0], rootNode);
                }(liTarget, fragment, serializer, dom) : function(target, elms, rootNode, rng) {
                    var rng = function(parentNode, rng) {
                        var beforeRng = rng.cloneRange(), rng = rng.cloneRange();
                        return beforeRng.setStartBefore(parentNode), rng.setEndAfter(parentNode), 
                        [ beforeRng.cloneContents(), rng.cloneContents() ];
                    }(target, rng), parentElm = target.parentNode;
                    return parentElm.insertBefore(rng[0], target), tinymce.each(elms, function(li) {
                        parentElm.insertBefore(li, target);
                    }), parentElm.insertBefore(rng[1], target), parentElm.removeChild(target), 
                    findLastOf(elms[elms.length - 1], rootNode);
                }(liTarget, fragment, serializer, rng);
            },
            isParentBlockLi: function(dom, node) {
                return !!getParentLi(dom, node);
            },
            trimListItems: trimListItems,
            listItems: listItems
        };
    }(tinymce), function(tinymce) {
        var CaretWalker = tinymce.caret.CaretWalker, CaretPosition = tinymce.caret.CaretPosition, NodeType = tinymce.dom.NodeType, Serializer = tinymce.html.Serializer, InsertList = tinymce.InsertList, Arr = tinymce.util.Arr, FilterNode = tinymce.html.FilterNode, InvalidNodes = tinymce.html.InvalidNodes, isTableCell = NodeType.matchNodeNames("td th");
        tinymce.InsertContent = {
            insertAtCaret: function(editor, value) {
                !function(editor, value, details) {
                    var parser, serializer, parentNode, rootNode, args, marker, node, node2, merge, textInlineElements = editor.schema.getTextInlineElements(), selection = editor.selection, dom = editor.dom, schema = editor.schema;
                    /^ | $/.test(value) && (value = function(html) {
                        var container, rng;
                        function hasSiblingText(siblingName) {
                            return container[siblingName] && 3 == container[siblingName].nodeType;
                        }
                        return rng = selection.getRng(!0), container = rng.startContainer, 
                        rng = rng.startOffset, 3 == container.nodeType && (0 < rng ? html = html.replace(/^&nbsp;/, " ") : hasSiblingText("previousSibling") || (html = html.replace(/^ /, "&nbsp;")), 
                        rng < container.length ? html = html.replace(/&nbsp;(<br>|)$/, " ") : hasSiblingText("nextSibling") || (html = html.replace(/(&nbsp;| )(<br>|)$/, "&nbsp;"))), 
                        html;
                    }(value)), parser = editor.parser, merge = details.merge, serializer = new Serializer({
                        validate: editor.settings.validate
                    }, editor.schema), bookmarkHtml = '<span id="mce_marker" data-mce-type="bookmark">&#xFEFF;&#x200B;</span>', 
                    args = {
                        content: value,
                        format: "html",
                        selection: !0
                    }, selection.onBeforeSetContent.dispatch(selection, args), -1 == (value = args.content).indexOf("{$caret}") && (value += "{$caret}"), 
                    value = value.replace(/\{\$caret\}/, bookmarkHtml), ((rng = selection.getRng()).startContainer || (rng.parentElement ? rng.parentElement() : null)) === (body = editor.getBody()) && selection.isCollapsed() && dom.isBlock(body.firstChild) && function(node) {
                        return node && !editor.schema.getShortEndedElements()[node.nodeName];
                    }(body.firstChild) && dom.isEmpty(body.firstChild) && ((rng = dom.createRng()).setStart(body.firstChild, 0), 
                    rng.setEnd(body.firstChild, 0), selection.setRng(rng)), selection.isCollapsed() || (editor.selection.setRng(editor.selection.getRng()), 
                    editor.getDoc().execCommand("Delete", !1, null), function() {
                        var rng = selection.getRng(!0), container = rng.startContainer, offset = rng.startOffset;
                        3 == container.nodeType && rng.collapsed && "\xa0" === container.data[offset] && (container.deleteData(offset, 1), 
                        /[\u00a0| ]$/.test(value) || (value += " "));
                    }());
                    var rng, root, caretElement = {
                        context: (parentNode = selection.getNode()).nodeName.toLowerCase(),
                        data: details.data
                    }, fragment = parser.parse(value, caretElement);
                    if (!0 === details.paste && InsertList.isListFragment(fragment) && InsertList.isParentBlockLi(dom, parentNode)) rng = InsertList.insertAtCaret(serializer, dom, editor.selection.getRng(!0), fragment), 
                    editor.selection.setRng(rng), editor.onSetContent.dispatch(editor, args); else {
                        if (function(fragment) {
                            for (var node = fragment; node = node.walk(); ) 1 === node.type && node.attr("data-mce-fragment", "1");
                        }(fragment), "mce_marker" == (node = fragment.lastChild).attr("id")) for (node = (marker = node).prev; node; node = node.walk(!0)) if (3 == node.type || !dom.isBlock(node.name)) {
                            editor.schema.isValidChild(node.parent.name, "span") && node.parent.insert(marker, node, "br" === node.name);
                            break;
                        }
                        if (editor._selectionOverrides.showBlockCaretContainer(parentNode), 
                        caretElement.invalid) {
                            for (selection.setContent(bookmarkHtml, {
                                no_events: !0
                            }), parentNode = selection.getNode(), rootNode = editor.getBody(), 
                            9 == parentNode.nodeType ? parentNode = node = rootNode : node = parentNode; node !== rootNode; ) node = (parentNode = node).parentNode;
                            value = parentNode === rootNode ? rootNode.innerHTML : dom.getOuterHTML(parentNode);
                            var body = parser.parse(value), details = function() {
                                for (var markerNode = body; markerNode; markerNode = markerNode.walk()) if ("mce_marker" === markerNode.attr("id")) return [ markerNode ];
                                return [];
                            }(), caretElement = (Arr.each(details, function(marker) {
                                marker.replace(fragment);
                            }), fragment.children()), parent = fragment.parent || body, bookmarkHtml = (fragment.unwrap(), 
                            Arr.filter(caretElement, function(node) {
                                return InvalidNodes.isInvalid(schema, node, parent);
                            }));
                            InvalidNodes.cleanInvalidNodes(bookmarkHtml, schema, rootNode), 
                            FilterNode.filter(parser.getNodeFilters(), parser.getAttributeFilters(), body), 
                            value = serializer.serialize(body), parentNode == rootNode ? dom.setHTML(rootNode, value) : dom.setOuterHTML(parentNode, value);
                        } else value = serializer.serialize(fragment), function(editor, value, parentNode) {
                            var node, node2;
                            "all" === parentNode.getAttribute("data-mce-bogus") ? parentNode.parentNode.insertBefore(editor.dom.createFragment(value), parentNode) : (node = parentNode.firstChild, 
                            node2 = parentNode.lastChild, !node || node === node2 && "BR" === node.nodeName ? editor.dom.setHTML(parentNode, value) : editor.selection.setContent(value));
                        }(editor, value, parentNode);
                        merge && (root = editor.getBody(), tinymce.each(dom.select("*[data-mce-fragment]"), function(node) {
                            for (var testNode = node.parentNode; testNode && testNode != root; testNode = testNode.parentNode) textInlineElements[node.nodeName.toLowerCase()] && testNode === node && dom.remove(node, !0);
                        })), function(marker) {
                            var parentEditableFalseElm;
                            marker && (selection.scrollIntoView(marker), (parentEditableFalseElm = function(node) {
                                for (var root = editor.getBody(); node && node !== root; node = node.parentNode) if ("false" === editor.dom.getContentEditable(node)) return node;
                                return null;
                            }(marker)) ? (dom.remove(marker), selection.select(parentEditableFalseElm)) : (rng = dom.createRng(), 
                            (node = marker.previousSibling) && 3 == node.nodeType ? (rng.setStart(node, node.nodeValue.length), 
                            (node2 = marker.nextSibling) && 3 == node2.nodeType && (node.appendData(node2.data), 
                            node2.parentNode.removeChild(node2))) : (rng.setStartBefore(marker), 
                            rng.setEndBefore(marker)), parentEditableFalseElm = dom.getParent(marker, dom.isBlock), 
                            dom.remove(marker), parentEditableFalseElm && dom.isEmpty(parentEditableFalseElm) && (dom.empty(parentEditableFalseElm), 
                            rng.setStart(parentEditableFalseElm, 0), rng.setEnd(parentEditableFalseElm, 0), 
                            isTableCell(parentEditableFalseElm) || parentEditableFalseElm.getAttribute("data-mce-fragment") || !(marker = function(rng) {
                                if (rng = CaretPosition.fromRangeStart(rng), rng = new CaretWalker(editor.getBody()).next(rng)) return rng.toRange();
                            }(rng)) ? dom.add(parentEditableFalseElm, dom.create("br", {
                                "data-mce-bogus": "1"
                            })) : (rng = marker, dom.remove(parentEditableFalseElm))), 
                            selection.setRng(rng)));
                        }(dom.get("mce_marker")), details = editor.getBody(), tinymce.each(details.getElementsByTagName("*"), function(elm) {
                            elm.removeAttribute("data-mce-fragment");
                        }), args.selection = !0, selection.onSetContent.dispatch(selection, args), 
                        editor.addVisual();
                    }
                }(editor, (value = function(value) {
                    var details;
                    return value && "string" != typeof value ? (details = tinymce.extend({
                        paste: value.paste,
                        data: {
                            paste: value.paste
                        }
                    }, value), {
                        content: value.content,
                        details: details
                    }) : {
                        content: value,
                        details: {}
                    };
                }(value)).content, value.details);
            }
        };
    }(tinymce), function(tinymce) {
        var each = tinymce.each, TreeWalker = tinymce.dom.TreeWalker;
        tinymce.EditorCommands = function(editor) {
            var bookmark, dom = editor.dom, selection = editor.selection, commands = {
                state: {},
                exec: {},
                value: {}
            }, settings = editor.settings, formatter = editor.formatter;
            function execCommand(command, ui, value) {
                var func;
                return command = command.toLowerCase(), !!(func = commands.exec[command]) && (func(command, ui, value), 
                !0);
            }
            function queryCommandState(command) {
                var func;
                return command = command.toLowerCase(), (func = commands.state[command]) ? func(command) : -1;
            }
            function addCommands(command_list, type) {
                type = type || "exec", each(command_list, function(callback, command) {
                    each(command.toLowerCase().split(","), function(command) {
                        commands[type][command] = callback;
                    });
                });
            }
            function execNativeCommand(command, ui, value) {
                void 0 === ui && (ui = !1), void 0 === value && (value = null), 
                editor.getDoc().execCommand(command, ui, value);
            }
            function isFormatMatch(name) {
                return formatter.match(name);
            }
            function toggleFormat(name, value) {
                formatter.toggle(name, value ? {
                    value: value
                } : void 0);
            }
            function storeSelection(type) {
                bookmark = selection.getBookmark(type);
            }
            function restoreSelection() {
                selection.moveToBookmark(bookmark);
            }
            tinymce.extend(this, {
                execCommand: execCommand,
                queryCommandState: queryCommandState,
                queryCommandValue: function(command) {
                    var func;
                    return command = command.toLowerCase(), !!(func = commands.value[command]) && func(command);
                },
                addCommands: addCommands,
                queryCommandSupported: function(command) {
                    if (command = command.toLowerCase(), commands.exec[command]) return !0;
                    try {
                        return editor.getDoc().queryCommandSupported(command);
                    } catch (ex) {}
                    return !1;
                }
            }), addCommands({
                "mceResetDesignMode,mceBeginUndoLevel": function() {},
                "mceEndUndoLevel,mceAddUndoLevel": function() {
                    editor.undoManager.add();
                },
                "Cut,Copy,Paste": function(command) {
                    try {
                        execNativeCommand(command);
                    } catch (ex) {}
                },
                unlink: function() {
                    var elm;
                    selection.isCollapsed() ? (elm = editor.dom.getParent(selection.getStart(), "a")) && editor.dom.remove(elm, !0) : formatter.remove("link");
                },
                "JustifyLeft,JustifyCenter,JustifyRight,JustifyFull": function(command) {
                    var align = command.substring(7);
                    each("left,center,right,full".split(","), function(name) {
                        align != name && formatter.remove("align" + name);
                    }), toggleFormat("align" + align), execCommand("mceRepaint");
                },
                "InsertUnorderedList,InsertOrderedList": function(command) {
                    var listParent;
                    execNativeCommand(command), (command = dom.getParent(selection.getNode(), "ol,ul")) && (listParent = command.parentNode, 
                    /^(H[1-6]|P|ADDRESS|PRE)$/.test(listParent.nodeName)) && (storeSelection(), 
                    dom.split(listParent, command), restoreSelection());
                },
                "Bold,Italic,Underline,Strikethrough,Superscript,Subscript": function(command) {
                    toggleFormat(command);
                },
                "ForeColor,HiliteColor,FontName": function(command, ui, value) {
                    toggleFormat(command, value);
                },
                FontSize: function(command, ui, value) {
                    var fontClasses, fontSizes;
                    1 <= value && value <= 7 && (fontSizes = tinymce.explode(settings.font_size_style_values), 
                    value = (fontClasses = tinymce.explode(settings.font_size_classes)) ? fontClasses[value - 1] || value : fontSizes[value - 1] || value), 
                    toggleFormat(command, value);
                },
                ApplyFormat: function(command, ui, value) {
                    formatter.apply(value.name, value.args || {}, value.node || null);
                },
                RemoveFormat: function(command, ui, value) {
                    formatter.remove((value = value || {
                        name: command
                    }).name, value.args || {}, value.node || null);
                },
                ToggleFormat: function(command, ui, value) {
                    formatter.toggle((value = value || {
                        name: command
                    }).name, value.args || {}, value.node || null);
                },
                mceBlockQuote: function() {
                    toggleFormat("blockquote");
                },
                FormatBlock: function(command, ui, value) {
                    return toggleFormat(value || "p");
                },
                mceCleanup: function() {
                    var bookmark = selection.getBookmark();
                    editor.setContent(editor.getContent({
                        cleanup: !0
                    }), {
                        cleanup: !0
                    }), selection.moveToBookmark(bookmark);
                },
                mceRemoveNode: function(command, ui, value) {
                    (value = value || selection.getNode()) != editor.getBody() && (storeSelection(), 
                    editor.dom.remove(value, !0), restoreSelection());
                },
                mceSelectNodeDepth: function(command, ui, value) {
                    var counter = 0;
                    value = parseInt(value, 10), dom.getParent(selection.getNode(), function(node) {
                        if (1 == node.nodeType && counter++ == value) return selection.select(node), 
                        !1;
                    }, editor.getBody());
                },
                mceSelectNode: function(command, ui, value) {
                    selection.select(value);
                },
                mceInsertContent: function(command, ui, value) {
                    tinymce.InsertContent.insertAtCaret(editor, value);
                },
                mceInsertRawHTML: function(command, ui, value) {
                    selection.setContent("tiny_mce_marker"), editor.setContent(editor.getContent().replace(/tiny_mce_marker/g, function() {
                        return value;
                    }));
                },
                mceToggleFormat: function(command, ui, value) {
                    toggleFormat(value);
                },
                mceSetContent: function(command, ui, value) {
                    editor.setContent(value);
                },
                "Indent,Outdent": function(command) {
                    var value, intentValue = settings.indentation, indentUnit = /[a-z%]+$/i.exec(intentValue), intentValue = parseInt(intentValue, 10);
                    queryCommandState("InsertUnorderedList") || queryCommandState("InsertOrderedList") ? execNativeCommand(command) : (settings.forced_root_block || dom.getParent(selection.getNode(), dom.isBlock) || formatter.apply("div"), 
                    each(selection.getSelectedBlocks(), function(element) {
                        var indentStyleName;
                        "LI" != element.nodeName && (indentStyleName = editor.getParam("indent_use_margin", !1) ? "margin" : "padding", 
                        indentStyleName += "rtl" == dom.getStyle(element, "direction", !0) ? "Right" : "Left", 
                        "outdent" == command ? (value = Math.max(0, parseInt(element.style[indentStyleName] || 0, 10) - intentValue), 
                        dom.setStyle(element, indentStyleName, value ? value + indentUnit : "")) : (value = parseInt(element.style[indentStyleName] || 0, 10) + intentValue + indentUnit, 
                        dom.setStyle(element, indentStyleName, value)));
                    }));
                },
                mceRepaint: function() {
                    if (tinymce.isGecko) try {
                        storeSelection(!0), selection.getSel() && selection.getSel().selectAllChildren(editor.getBody()), 
                        selection.collapse(!0), restoreSelection();
                    } catch (ex) {}
                },
                InsertHorizontalRule: function() {
                    editor.execCommand("mceInsertContent", !1, "<hr />");
                },
                mceToggleVisualAid: function() {
                    editor.hasVisual = !editor.hasVisual, editor.addVisual();
                },
                mceReplaceContent: function(command, ui, value) {
                    editor.execCommand("mceInsertContent", !1, value.replace(/\{\$selection\}/g, selection.getContent({
                        format: "text"
                    })));
                },
                mceInsertLink: function(command, ui, value) {
                    var anchor;
                    "string" == typeof value && (value = {
                        href: value
                    }), anchor = dom.getParent(selection.getNode(), "a"), value.href = value.href.replace(" ", "%20"), 
                    anchor && value.href || formatter.remove("link"), value.href && formatter.apply("link", value, anchor);
                },
                selectAll: function() {
                    var root = dom.getRoot(), rng = dom.createRng();
                    selection.getRng().setStart ? ((rng = dom.createRng()).setStart(root, 0), 
                    rng.setEnd(root, root.childNodes.length), selection.setRng(rng)) : (rng = selection.getRng()).item || (rng.moveToElementText(root), 
                    rng.select());
                },
                delete: function() {
                    execNativeCommand("Delete");
                    var body = editor.getBody();
                    dom.isEmpty(body) && (editor.setContent(""), body.firstChild && dom.isBlock(body.firstChild) ? editor.selection.setCursorLocation(body.firstChild, 0) : editor.selection.setCursorLocation(body, 0));
                },
                mceNewDocument: function() {
                    editor.setContent("");
                },
                InsertLineBreak: function(command, ui, value) {
                    var brElm, extraBr, rng = selection.getRng(!0), offset = (new tinymce.dom.RangeUtils(dom).normalize(rng), 
                    rng.startOffset), container = rng.startContainer, parentBlock = (1 == container.nodeType && container.hasChildNodes() && (isAfterLastNodeInContainer = offset > container.childNodes.length - 1, 
                    container = container.childNodes[Math.min(offset, container.childNodes.length - 1)] || container, 
                    offset = isAfterLastNodeInContainer && 3 == container.nodeType ? container.nodeValue.length : 0), 
                    dom.getParent(container, dom.isBlock)), isAfterLastNodeInContainer = parentBlock ? dom.getParent(parentBlock.parentNode, dom.isBlock) : null, containerBlockName = isAfterLastNodeInContainer ? isAfterLastNodeInContainer.nodeName.toUpperCase() : "", value = value && value.ctrlKey;
                    return "LI" != containerBlockName || value || (parentBlock = isAfterLastNodeInContainer), 
                    container && 3 === container.nodeType && offset >= container.nodeValue.length && ((containerBlockName = dom.getParent(container, "a")) && (!(value = containerBlockName.nextSibling) || 3 === value.nodeType && /^\s*$/.test(value.nodeValue)) && (rng.setStartAfter(containerBlockName), 
                    rng.setEndAfter(containerBlockName), container = containerBlockName.parentNode), 
                    !function() {
                        for (var node, walker = new TreeWalker(container, parentBlock), nonEmptyElementsMap = editor.schema.getNonEmptyElements(); node = walker.next(); ) if (nonEmptyElementsMap[node.nodeName.toLowerCase()] || 0 < node.length) return 1;
                    }()) && (brElm = dom.create("br"), rng.insertNode(brElm), rng.setStartAfter(brElm), 
                    rng.setEndAfter(brElm), extraBr = !0), brElm = dom.create("br"), 
                    rng.insertNode(brElm), isAfterLastNodeInContainer = dom.create("span", {}, "&nbsp;"), 
                    brElm.parentNode.insertBefore(isAfterLastNodeInContainer, brElm), 
                    selection.scrollIntoView(isAfterLastNodeInContainer), dom.remove(isAfterLastNodeInContainer), 
                    extraBr ? (rng.setStartBefore(brElm), rng.setEndBefore(brElm)) : (rng.setStartAfter(brElm), 
                    rng.setEndAfter(brElm)), selection.setRng(rng), editor.undoManager.add(), 
                    !0;
                }
            }), addCommands({
                "JustifyLeft,JustifyCenter,JustifyRight,JustifyFull": function(command) {
                    var name = "align" + command.substring(7), command = selection.getNode(), nodes = selection.isCollapsed() ? [ dom.getParent(command, dom.isBlock) ] : selection.getSelectedBlocks(), command = ("FIGCAPTION" == command.nodeName && (nodes = [ command ]), 
                    tinymce.map(nodes, function(node) {
                        return !!formatter.matchNode(node, name);
                    }));
                    return -1 !== tinymce.inArray(command, !0);
                },
                "Bold,Italic,Underline,Strikethrough,Superscript,Subscript": isFormatMatch,
                mceBlockQuote: function() {
                    return isFormatMatch("blockquote");
                },
                Outdent: function() {
                    var node;
                    if (settings.inline_styles) {
                        if ((node = dom.getParent(selection.getStart(), dom.isBlock)) && 0 < parseInt(node.style.paddingLeft, 10)) return !0;
                        if ((node = dom.getParent(selection.getEnd(), dom.isBlock)) && 0 < parseInt(node.style.paddingLeft, 10)) return !0;
                    }
                    return queryCommandState("InsertUnorderedList") || queryCommandState("InsertOrderedList") || !settings.inline_styles && !!dom.getParent(selection.getNode(), "BLOCKQUOTE");
                },
                "InsertUnorderedList,InsertOrderedList": function(command) {
                    var list = dom.getParent(selection.getNode(), "ul,ol,dl");
                    return list && ("insertunorderedlist" === command && "UL" === list.tagName || "insertorderedlist" === command && "OL" === list.tagName);
                }
            }, "state"), addCommands({
                "FontSize,FontName": function(command) {
                    var parent;
                    return (parent = dom.getParent(selection.getNode(), "span")) ? "fontsize" == command ? parent.style.fontSize : parent.style.fontFamily.replace(/, /g, ",").replace(/[\'\"]/g, "").toLowerCase() : 0;
                }
            }, "value"), addCommands({
                Undo: function() {
                    editor.undoManager.undo();
                },
                Redo: function() {
                    editor.undoManager.redo();
                }
            });
        };
    }(tinymce), function(tinymce) {
        var Dispatcher = tinymce.util.Dispatcher;
        tinymce.UndoManager = function(editor) {
            var um, beforeBookmark, onBeforeAdd, onAdd, onUndo, onRedo, index = 0, data = [];
            function addNonTypingUndoLevel() {
                um.typing = !1, um.add();
            }
            return onBeforeAdd = new Dispatcher(um), onAdd = new Dispatcher(um), 
            onUndo = new Dispatcher(um), onRedo = new Dispatcher(um), onAdd.add(function(undoman, level) {
                if (undoman.hasUndo()) return editor.onChange.dispatch(editor, level, undoman);
            }), onUndo.add(function(undoman, level) {
                return editor.onUndo.dispatch(editor, level, undoman);
            }), onRedo.add(function(undoman, level) {
                return editor.onRedo.dispatch(editor, level, undoman);
            }), editor.onInit.add(function() {
                um.add();
            }), editor.onBeforeExecCommand.add(function(ed, cmd, ui, val, args) {
                "Undo" == cmd || "Redo" == cmd || "mceRepaint" == cmd || args && args.skip_undo || um.beforeChange();
            }), editor.onExecCommand.add(function(ed, cmd, ui, val, args) {
                "Undo" == cmd || "Redo" == cmd || "mceRepaint" == cmd || args && args.skip_undo || um.add();
            }), editor.onSaveContent.add(addNonTypingUndoLevel), editor.dom.bind(editor.dom.getRoot(), "dragend", addNonTypingUndoLevel), 
            editor.dom.bind(editor.getBody(), "focusout", function() {
                !editor.removed && um.typing && addNonTypingUndoLevel();
            }), editor.onKeyUp.add(function(editor, e) {
                var keyCode = e.keyCode;
                e.isDefaultPrevented() || (33 <= keyCode && keyCode <= 36 || 37 <= keyCode && keyCode <= 40 || 45 == keyCode || 13 == keyCode || e.ctrlKey) && addNonTypingUndoLevel();
            }), editor.onKeyDown.add(function(editor, e) {
                var keyCode = e.keyCode;
                e.isDefaultPrevented() || (33 <= keyCode && keyCode <= 36 || 37 <= keyCode && keyCode <= 40 || 45 == keyCode ? um.typing && addNonTypingUndoLevel() : (e = e.ctrlKey && !e.altKey || e.metaKey, 
                !(keyCode < 16 || 20 < keyCode) || 224 === keyCode || 91 === keyCode || um.typing || e || (um.beforeChange(), 
                um.typing = !0, um.add())));
            }), editor.onMouseDown.add(function() {
                um.typing && addNonTypingUndoLevel();
            }), editor.addShortcut("meta+z", "", "Undo"), editor.addShortcut("meta+y,meta+shift+z", "", "Redo"), 
            um = {
                data: data,
                typing: !1,
                onBeforeAdd: onBeforeAdd,
                onAdd: onAdd,
                onUndo: onUndo,
                onRedo: onRedo,
                beforeChange: function() {
                    beforeBookmark = editor.selection.getBookmark(2, !0);
                },
                add: function(level) {
                    var i, lastLevel, settings = editor.settings;
                    if ((level = level || {}).content = tinymce.trim(editor.getContent({
                        format: "raw",
                        no_events: 1,
                        undo: !0
                    })), um.onBeforeAdd.dispatch(um, level), (lastLevel = data[index]) && lastLevel.content == level.content) return null;
                    if (data[index] && (data[index].beforeBookmark = beforeBookmark), 
                    settings.custom_undo_redo_levels && data.length > settings.custom_undo_redo_levels) {
                        for (i = 0; i < data.length - 1; i++) data[i] = data[i + 1];
                        data.length--, index = data.length;
                    }
                    return level.bookmark = editor.selection.getBookmark(2, !0), 
                    index < data.length - 1 && (data.length = index + 1), data.push(level), 
                    index = data.length - 1, um.onAdd.dispatch(um, level), editor.isNotDirty = 0, 
                    level;
                },
                undo: function() {
                    var level;
                    return um.typing && (um.add(), um.typing = !1), 0 < index && (level = data[--index], 
                    editor.setContent(level.content, {
                        format: "raw",
                        undo: !0
                    }), editor.selection.moveToBookmark(level.beforeBookmark), um.onUndo.dispatch(um, level)), 
                    level;
                },
                redo: function() {
                    var level;
                    return index < data.length - 1 && (level = data[++index], editor.setContent(level.content, {
                        format: "raw",
                        undo: !0
                    }), editor.selection.moveToBookmark(level.bookmark), um.onRedo.dispatch(um, level)), 
                    level;
                },
                clear: function() {
                    data = [], index = 0, um.typing = !1;
                },
                hasUndo: function() {
                    return 0 < index || this.typing;
                },
                hasRedo: function() {
                    return index < data.length - 1 && !this.typing;
                }
            };
        };
    }(tinymce), tinymce.ForceBlocks = function(editor) {
        var settings = editor.settings, dom = editor.dom, selection = editor.selection, schema = editor.schema, blockElements = schema.getBlockElements();
        function addRootBlocks() {
            var rng, startContainer, startOffset, endContainer, endOffset, rootBlockNode, tempNode, wrapped, restoreSelection, tmpRng, rootNodeName, node = selection.getStart(), rootNode = editor.getBody(), forcedRootBlock = settings.forced_root_block;
            if (node && 1 === node.nodeType && forcedRootBlock && !node.getAttribute("data-mce-type")) {
                for (;node && node != rootNode; ) {
                    if (blockElements[node.nodeName]) return;
                    node = node.parentNode;
                }
                if ((rng = selection.getRng()).setStart) {
                    startContainer = rng.startContainer, startOffset = rng.startOffset, 
                    endContainer = rng.endContainer, endOffset = rng.endOffset;
                    try {
                        restoreSelection = editor.getDoc().activeElement === rootNode;
                    } catch (ex) {}
                } else rng.item && (node = rng.item(0), (rng = editor.getDoc().body.createTextRange()).moveToElementText(node)), 
                restoreSelection = rng.parentElement().ownerDocument === editor.getDoc(), 
                (tmpRng = rng.duplicate()).collapse(!0), startOffset = -1 * tmpRng.move("character", -16777215), 
                tmpRng.collapsed || ((tmpRng = rng.duplicate()).collapse(!1), endOffset = -1 * tmpRng.move("character", -16777215) - startOffset);
                for (node = rootNode.firstChild, rootNodeName = rootNode.nodeName.toLowerCase(); node; ) (3 === node.nodeType || 1 == node.nodeType && !blockElements[node.nodeName]) && schema.isValidChild(rootNodeName, forcedRootBlock.toLowerCase()) ? 3 === node.nodeType && 0 === node.nodeValue.length ? (node = (tempNode = node).nextSibling, 
                dom.remove(tempNode)) : (rootBlockNode || (rootBlockNode = dom.create(forcedRootBlock, editor.settings.forced_root_block_attrs), 
                node.parentNode.insertBefore(rootBlockNode, node), wrapped = !0), 
                node = (tempNode = node).nextSibling, rootBlockNode.appendChild(tempNode)) : (rootBlockNode = null, 
                node = node.nextSibling);
                if (wrapped && restoreSelection) {
                    if (rng.setStart) rng.setStart(startContainer, startOffset), 
                    rng.setEnd(endContainer, endOffset), selection.setRng(rng); else try {
                        (rng = editor.getDoc().body.createTextRange()).moveToElementText(rootNode), 
                        rng.collapse(!0), rng.moveStart("character", startOffset), 
                        0 < endOffset && rng.moveEnd("character", endOffset), rng.select();
                    } catch (ex) {}
                    editor.nodeChanged();
                }
            }
        }
        settings.forced_root_block && (editor.onKeyUp.add(addRootBlocks), editor.onNodeChange.add(addRootBlocks));
    }, function(tinymce) {
        var Event = tinymce.dom.Event, each = tinymce.each, extend = tinymce.extend, PreviewCss = tinymce.util.PreviewCss;
        tinymce.ControlManager = function(ed, s) {
            var self = this;
            s = s || {}, self.editor = ed, self.controls = {}, self.onAdd = new tinymce.util.Dispatcher(self), 
            self.onPostRender = new tinymce.util.Dispatcher(self), self.prefix = s.prefix || ed.id + "_", 
            self._cls = {}, self.classPrefix = "mce", self.onPostRender.add(function() {
                each(self.controls, function(c) {
                    c.postRender();
                });
            });
        }, tinymce.ControlManager.prototype = {
            get: function(id) {
                return this.controls[this.prefix + id] || this.controls[id];
            },
            setActive: function(id, s) {
                return (id = this.get(id)) && id.setActive(s), id;
            },
            setDisabled: function(id, s) {
                return (id = this.get(id)) && id.setDisabled(s), id;
            },
            add: function(c) {
                return c && (this.controls[c.id] = c, this.onAdd.dispatch(c, this)), 
                c;
            },
            createControl: function(name) {
                var ctrl, i, l, factories, self = this, editor = self.editor;
                for (self.controlFactories || (self.controlFactories = [], each(editor.plugins, function(plugin) {
                    plugin.createControl && self.controlFactories.push(plugin);
                })), i = 0, l = (factories = self.controlFactories).length; i < l; i++) if (ctrl = factories[i].createControl(name, self)) return self.add(ctrl);
                return "|" === name || "separator" === name ? self.createSeparator() : editor.buttons && (ctrl = editor.buttons[name]) ? self.createButton(name, ctrl) : self.add(ctrl);
            },
            createDropMenu: function(id, s, cc) {
                var c, bm, ed = this.editor;
                return (s = extend({
                    class: "mceDropDown",
                    constrain: ed.settings.constrain_menus
                }, s)).class += " " + (ed.settings.skin_class || "mceDefaultSkin"), 
                -1 == id.indexOf(this.prefix) && (id = this.prefix + id), cc = cc || this._cls.dropmenu || tinymce.ui.DropMenu, 
                (c = this.controls[id] = new cc(id, s)).onAddItem.add(function(c, o) {
                    var s = o.settings;
                    s.title && (s.title = ed.getLang(s.title, s.title)), !s.onclick && s.cmd && (s.onclick = function() {
                        ed.execCommand(s.cmd, s.ui || !1, s.value);
                    });
                }), tinymce.isIE && (c.onShowMenu.add(function() {
                    ed.focus(), bm = ed.selection.getBookmark(1);
                }), c.onHideMenu.add(function() {
                    bm && (ed.selection.moveToBookmark(bm), bm = 0);
                })), ed.onRemove.add(function() {
                    c.destroy();
                }), this.add(c);
            },
            createListBox: function(id, s, cc) {
                var ed = this.editor, c = this.get(id);
                return c || (s.title = ed.translate(s.title), s.scope = s.scope || ed, 
                s.onselect || (s.onselect = function(v) {
                    if (!s.cmd) return !1;
                    ed.execCommand(s.cmd, s.ui || !1, v || s.value);
                }), s = extend({
                    title: s.title,
                    class: "mce_" + id,
                    scope: s.scope,
                    control_manager: this
                }, s), id = this.prefix + id, c = new (cc || this._cls.listbox || tinymce.ui.ListBox)(id, s, ed), 
                this.controls[id] = c, tinymce.isWebKit && c.onPostRender.add(function(c, n) {
                    Event.add(n, "mousedown", function() {
                        ed.bookmark = ed.selection.getBookmark(1);
                    }), Event.add(n, "focus", function() {
                        ed.selection.moveToBookmark(ed.bookmark), ed.bookmark = null;
                    });
                }), Array.isArray(s.items) && c.onRenderMenu.add(function(c, m) {
                    each(s.items, function(item) {
                        m.add(item);
                    });
                }), c.hideMenu && ed.onMouseDown.add(c.hideMenu, c), this.add(c));
            },
            createStylesBox: function(id, s, cc) {
                var ed = this.editor;
                function compileFilter(filter) {
                    var filters;
                    return Array.isArray(filter) ? (filters = filter.map(compileFilter), 
                    function(value) {
                        return filters.every(function(filterFunc) {
                            return filterFunc(value);
                        });
                    }) : "string" == typeof filter && filter ? function(value) {
                        return -1 !== value.indexOf(filter);
                    } : "function" == typeof filter ? function(value) {
                        return filter(value);
                    } : filter instanceof RegExp ? function(value) {
                        return filter.test(value);
                    } : filter;
                }
                return s = tinymce.extend({
                    max_height: 384,
                    combobox: !0,
                    multiple: !0,
                    seperator: " ",
                    menu_class: "mceStylesBoxMenu",
                    allow_element_selector: !1
                }, s || {}), (id = this.createListBox(id, s, cc)).onPostRender.add(function(c, n) {
                    var ctrl = c;
                    s.styles && "string" == typeof s.styles && (s.styles = s.styles.split(/[\s,]+/)), 
                    Array.isArray(s.styles) && s.styles.length ? (each(s.styles, function(item) {
                        var title, value;
                        if ("string" == typeof item) title = value = item; else if ("object" == typeof item && null !== item) if (item.title && item.value) title = item.title, 
                        value = item.value; else for (var key in item) if (item.hasOwnProperty(key)) {
                            value = item[title = key];
                            break;
                        }
                        title && value && ctrl.add(title, value, {
                            style: function() {
                                return PreviewCss.getCssText(ed, {
                                    classes: value
                                });
                            }
                        });
                    }), ctrl.hasClasses = !0) : Array.isArray(ed.settings.importcss_classes) && !ctrl.hasClasses && (each(ed.settings.importcss_classes, function(item) {
                        var element, selectorText = item.selectorText || item.selector || item;
                        return !selectorText || !(!s.selector_filter || !compileFilter(s.selector_filter)(selectorText)) || !((selectorText = /^(?:([a-z0-9\-_]+))?(\.[a-z0-9_\-\.]+)$/i.exec(selectorText)) && (element = selectorText[1] || null, 
                        selectorText = selectorText[2].substr(1), !element || s.allow_element_selector)) || (element = selectorText.split("."), 
                        each(element, function(cls) {
                            ctrl.add(cls, cls, {
                                style: function() {
                                    return item.style || PreviewCss.getCssText(ed, {
                                        classes: cls
                                    });
                                }
                            });
                        }), void PreviewCss.reset());
                    }), Array.isArray(ed.settings.importcss_classes)) && (ctrl.hasClasses = !0);
                }), id;
            },
            createButton: function(id, s, cc) {
                var c, ed = this.editor;
                return this.get(id) ? this.get(id) : (s.title = ed.translate(s.title), 
                s.label = ed.translate(s.label), s.scope = s.scope || ed, s.onclick || s.menu_button || (s.onclick = function() {
                    ed.execCommand(s.cmd, s.ui || !1, s.value);
                }), s = extend({
                    title: s.title,
                    class: "mce_" + id,
                    scope: s.scope,
                    control_manager: this
                }, s), id = this.prefix + id, s.menu_button ? (c = new (cc || this._cls.menubutton || tinymce.ui.MenuButton)(id, s, ed), 
                ed.onMouseDown.add(c.hideMenu, c)) : c = new (this._cls.button || tinymce.ui.Button)(id, s, ed), 
                this.add(c));
            },
            createMenuButton: function(id, s, cc) {
                return (s = s || {}).menu_button = 1, this.createButton(id, s, cc);
            },
            createSplitButton: function(id, s, cc) {
                var ed = this.editor;
                return this.get(id) ? this.get(id) : (s.title = ed.translate(s.title), 
                s.scope = s.scope || ed, !s.onclick && s.cmd && (s.onclick = function(v) {
                    ed.execCommand(s.cmd, s.ui || !1, v || s.value);
                }), !s.onselect && s.cmd && (s.onselect = function(v) {
                    ed.execCommand(s.cmd, s.ui || !1, v || s.value);
                }), s = extend({
                    title: s.title,
                    class: "mce_" + id,
                    scope: s.scope,
                    control_manager: this
                }, s), id = this.prefix + id, cc = cc || this._cls.splitbutton || tinymce.ui.SplitButton, 
                cc = this.add(new cc(id, s, ed)), ed.onMouseDown.add(cc.hideMenu, cc), 
                cc.onRenderMenu.add(function(e, m) {
                    Array.isArray(s.items) && each(s.items, function(item) {
                        m.add(item);
                    }), m.onHideMenu.add(function() {
                        ed.nodeChanged(), ed.focus();
                    });
                }), this.add(cc));
            },
            createColorSplitButton: function(id, s, cc) {
                var c, bm, ed = this.editor;
                return this.get(id) ? this.get(id) : (s.title = ed.translate(s.title), 
                s.scope = s.scope || ed, s.onclick || (s.onclick = function(v) {
                    tinymce.isIE && (bm = ed.selection.getBookmark(1)), ed.execCommand(s.cmd, s.ui || !1, v || s.value);
                }), s.onselect || (s.onselect = function(v) {
                    ed.execCommand(s.cmd, s.ui || !1, v || s.value);
                }), s = extend({
                    title: s.title,
                    class: "mce_" + id,
                    menu_class: ed.settings.skin_class || "mceDefaultSkin",
                    scope: s.scope,
                    more_colors_title: ed.getLang("more_colors")
                }, s), id = this.prefix + id, cc = cc || this._cls.colorsplitbutton || tinymce.ui.ColorSplitButton, 
                c = new cc(id, s, ed), ed.onMouseDown.add(c.hideMenu, c), ed.onRemove.add(function() {
                    c.destroy();
                }), c.onShowMenu.add(function() {
                    bm = ed.selection.getBookmark(1);
                }), c.onHideMenu.add(function() {
                    bm && (ed.selection.moveToBookmark(bm), bm = 0);
                }), this.add(c));
            },
            createTextBox: function(id, s, cc) {
                var ed = this.editor;
                return id = this.prefix + id, this.get(id) || (s.title = ed.translate(s.title), 
                s.label = ed.translate(s.label), s.scope = s.scope || ed, s = extend({
                    title: s.title,
                    class: "mce_" + id,
                    scope: s.scope,
                    control_manager: this
                }, s), cc = new (cc || tinymce.ui.TextBox)(id, s, ed), this.add(cc));
            },
            createUrlBox: function(id, s) {
                var ed = this.editor;
                return s.upload_label = ed.getLang(s.upload_label, "Upload"), s.picker_label = ed.getLang(s.picker_label, "Browse"), 
                this.createTextBox(id, s, tinymce.ui.UrlBox);
            },
            createCheckBox: function(id, s) {
                var ed = this.editor;
                return this.get(id) || (s.title = ed.translate(s.title), s.label = ed.translate(s.label), 
                s.scope = s.scope || ed, s = extend({
                    title: s.title,
                    class: "mce_" + id,
                    scope: s.scope,
                    control_manager: this
                }, s), id = this.prefix + id, id = new tinymce.ui.CheckBox(id, s, ed), 
                this.add(id));
            },
            createCustomValue: function(id, s) {
                var ed = this.editor;
                return id = this.prefix + id, id = new tinymce.ui.CustomValue(id, s, ed), 
                this.add(id);
            },
            createRepeatable: function(id, s) {
                var ed = this.editor;
                return id = this.prefix + id, this.get(id) || (s.scope = s.scope || ed, 
                s = extend({
                    class: "mce_" + id,
                    scope: s.scope,
                    control_manager: this
                }, s), id = new tinymce.ui.Repeatable(id, s, ed), this.add(id));
            },
            createPanel: function(id, s, cc) {
                var ed = this.editor;
                return s.class += " " + (ed.settings.skin_class || "mceDefaultSkin"), 
                delete this.controls[id], ed = new (cc || this._cls.panel || tinymce.ui.Panel)(id, s, this.editor), 
                this.add(ed);
            },
            createContextPanel: function(id, s) {
                var cc = tinymce.ui.ContextPanel;
                return this.createPanel(id, s, cc);
            },
            createTabs: function(id, s, cc) {
                return delete this.controls[id], cc = new (cc || this._cls.tabPanel || tinymce.ui.TabPanel)(id, s, this.editor), 
                this.add(cc);
            },
            createToolbar: function(id, s, cc) {
                return id = this.prefix + id, delete this.controls[id], cc = new (cc || this._cls.toolbar || tinymce.ui.Toolbar)(id, s, this.editor), 
                this.add(cc);
            },
            createToolbarGroup: function(id, s, cc) {
                return id = this.prefix + id, delete this.controls[id], cc = new (cc || this._cls.toolbarGroup || tinymce.ui.ToolbarGroup)(id, s, this.editor), 
                this.add(cc);
            },
            createLayout: function(id, s, cc) {
                return id = this.prefix + id, delete this.controls[id], cc = new (cc || this._cls.layout || tinymce.ui.Layout)(id, s, this.editor), 
                this.add(cc);
            },
            createForm: function(id, s) {
                return id = this.prefix + id, delete this.controls[id], id = new tinymce.ui.Form(id, s, this.editor), 
                this.add(id);
            },
            createSeparator: function(cc) {
                return new (cc || this._cls.separator || tinymce.ui.Separator)();
            },
            setControlType: function(n, c) {
                return this._cls[n.toLowerCase()] = c;
            },
            destroy: function() {
                each(this.controls, function(c) {
                    c.destroy();
                }), this.controls = null;
            }
        };
    }(tinymce), function(tinymce) {
        var DOM = tinymce.DOM, Event = tinymce.dom.Event, each = tinymce.each, Dispatcher = tinymce.util.Dispatcher;
        function ucfirst(s) {
            return s.substring(0, 1).toUpperCase() + s.substring(1);
        }
        function updateWithTouchData(e) {
            var keys, i;
            if (e.changedTouches) for (keys = "screenX screenY pageX pageY clientX clientY".split(" "), 
            i = 0; i < keys.length; i++) e[keys[i]] = e.changedTouches[0][keys[i]];
        }
        tinymce.create("tinymce.WindowManager", {
            WindowManager: function(ed) {
                this.editor = ed, this.onOpen = new Dispatcher(this), this.onClose = new Dispatcher(this), 
                this.params = {}, this.features = {}, this.zIndex = 700002, this.count = 0, 
                this.windows = {};
            },
            createInstance: function(cl, a, b, c, d, e) {
                return new (tinymce.resolve(cl))(a, b, c, d, e);
            },
            open: function(f, p) {
                var id, self = this, ed = self.editor, dh = 0, p = (p = p || {}, 
                (f = f || {}).type || (self.bookmark = ed.selection.getBookmark(1)), 
                id = DOM.uniqueId("mce_window_"), f.width = parseInt(f.width || 0, 10), 
                f.height = parseInt(f.height || 0, 10), p.mce_window_id = id, self.features = f, 
                self.params = p, self.onOpen.dispatch(self, f, p), '<div class="mceModalBody" id="' + id + '" dir="' + ed.settings.skin_directionality + '">   <div class="mceModalContainer">       <div class="mceModalHeader" id="' + id + '_header">           <h5 class="mceModalTitle" id="' + id + '_title">' + (f.title || "") + '</h5>           <button class="mceModalClose" type="button" title="' + ed.getLang("close", "Close") + '" aria-label="' + ed.getLang("close", "Close") + '"></button>       </div>       <div class="mceModalContent" id="' + id + '_content"></div>   </div></div>'), modal = DOM.select(".mceModal");
                return modal.length || (modal = DOM.add(DOM.doc.body, "div", {
                    class: ed.settings.skin_class + " mceModal",
                    role: "dialog",
                    "aria-labelledby": id + "_title"
                }, ""), !1 !== f.overlay && DOM.add(modal, "div", {
                    class: "mceModalOverlay"
                })), DOM.add(modal, "div", {
                    class: "mceModalFrame",
                    id: id + "_frame"
                }, p), f.fixed ? (DOM.addClass(modal, "mceModalFixed"), Event.add(id, "blur", function() {
                    self.close(null, id);
                })) : DOM.addClass(DOM.select(".mceModalHeader", modal), "mceModalMove"), 
                f.buttons = f.buttons || [], (ed = f.url || f.file) ? (!1 !== f.addver && (ed = tinymce._addVer(ed)), 
                DOM.addClass(id, "mceLoading"), DOM.addClass(id + "_content", "mceModalContentIframe"), 
                p = DOM.add(id + "_content", "iframe", {
                    id: id + "_ifr",
                    src: "about:blank",
                    frameBorder: 0,
                    "aria-label": "Dialog Content Iframe"
                }), DOM.setAttrib(p, "src", ed), Event.add(p, "load", function() {
                    DOM.removeClass(id, "mceLoading");
                })) : (f.type && DOM.addClass(id, "mceModal" + ucfirst(f.type)), 
                f.buttons.length || f.buttons.push({
                    id: "cancel",
                    title: self.editor.getLang("cancel", "Cancel"),
                    onclick: function(e) {
                        Event.cancel(e), self.close(null, id);
                    }
                }), f.content && ("string" == typeof f.content && DOM.setHTML(id + "_content", "<div>" + f.content.replace("\n", "") + "</div>"), 
                f.content.nodeType) && DOM.add(id + "_content", DOM.create("div", {}, f.content)), 
                f.items && (tinymce.is(f.items, "array") || (f.items = [ f.items ]), 
                each(f.items, function(ctrl) {
                    var form = DOM.add(id + "_content", "div");
                    ctrl.renderTo(form), self.onClose.add(function(e, win) {
                        win.id == id && ctrl.destroy();
                    });
                })), Event.add(id, "keydown", function(e) {
                    var nodes, endIndex, tabIndex;
                    9 === e.keyCode && (nodes = DOM.select("input, button, select, textarea, .mceListBox", DOM.get(id)), 
                    (nodes = tinymce.grep(nodes, function(node) {
                        return !node.disabled && !DOM.isHidden(node) && 0 <= node.getAttribute("tabindex");
                    })).length) && (DOM.setAttrib(nodes, "tabindex", 0), e.shiftKey && nodes.reverse(), 
                    endIndex = Math.max(0, nodes.length - 1), tabIndex = function(nodes, node) {
                        for (var i = 0; i < nodes.length; i++) if (nodes[i] === node) return i;
                        return -1;
                    }(nodes, e.target), tabIndex++, nodes[tabIndex = endIndex < (tabIndex = Math.max(tabIndex, 0)) ? 0 : tabIndex].focus(), 
                    DOM.setAttrib(nodes[tabIndex], "tabindex", 1), e.preventDefault(), 
                    e.stopImmediatePropagation());
                })), f.buttons.length && (DOM.add(DOM.select(".mceModalContainer", id), "div", {
                    class: "mceModalFooter",
                    id: id + "_footer"
                }), each(f.buttons, function(button) {
                    "cancel" === button.id && (button.onclick = function(e) {
                        self.close(null, id);
                    });
                    var attribs = {
                        id: id + "_" + button.id,
                        class: "mceButton",
                        type: "button"
                    }, btn = (button.autofocus && (attribs.autofocus = !0), button.title = button.title || "OK", 
                    DOM.add(id + "_footer", "button", attribs, button.title));
                    button.icon && DOM.add(btn, "span", {
                        class: "mceIcon mce_" + button.icon,
                        role: "presentation"
                    }), each(tinymce.explode(button.classes), function(cls) {
                        DOM.addClass(btn, "mceButton" + ucfirst(cls));
                    }), button.onclick && Event.add(btn, "click", function(e) {
                        Event.cancel(e), button.onclick.call(self, e);
                    }), button.onsubmit && Event.add(btn, "click", function(e) {
                        Event.cancel(e), button.onsubmit.call(self, e), e.cancelSubmit || self.close(null, id);
                    });
                })), Event.add(id, "keydown", function(evt) {
                    if (27 === evt.keyCode) self.close(null, id), evt.preventDefault(), 
                    evt.stopImmediatePropagation(); else if (13 === evt.keyCode) {
                        if (evt.target) {
                            if ("TEXTAREA" === evt.target.nodeName) return;
                            "BUTTON" === evt.target.nodeName && Event.fire(evt.target, "click");
                        }
                        evt.preventDefault(), evt.stopImmediatePropagation();
                    }
                }), Event.add(DOM.select("button.mceModalClose", DOM.get(id)), "click", function(evt) {
                    self.close(null, id), evt.preventDefault(), evt.stopImmediatePropagation();
                }), f.type || (dh += DOM.get(id + "_header").clientHeight), f.size ? DOM.addClass(id, f.size) : (f.width && DOM.setStyle(id, "width", f.width + 0), 
                f.height && DOM.setStyle(id, "height", f.height + dh)), f.fixed || Event.add(DOM.win, "resize orientationchange", function() {
                    DOM.get(id) && self.position(id);
                }), Event.add(id, "mousedown", function(e) {
                    var n = e.target;
                    if (!/(input|select|textarea|button|label)/i.test(n.nodeName)) return self.focus(id), 
                    DOM.hasClass(n, ".mceModalClose") || f.fixed || !DOM.hasClass(n, "mceModalMove") && !DOM.hasClass(n.parentNode, "mceModalMove") ? void 0 : self._startDrag(id, e, "Move");
                }), self.windows[id] = modal = {
                    id: id,
                    features: f,
                    elm: DOM.get(id),
                    moveTo: function(x, y) {
                        return self.moveTo(id, x, y);
                    },
                    close: function() {
                        return self.close(null, id);
                    },
                    focus: function() {
                        return self.focus(id);
                    }
                }, f.open && "function" == typeof f.open && f.open.call(modal, modal), 
                DOM.setAttrib(id, "aria-hidden", "false"), self.position(id), self.focus(id), 
                self.count++, modal;
            },
            close: function(win, id) {
                if (id = this._findId(id || win), !(win = this.windows[id] || this._frontWindow())) return !1;
                this.count--, 0 === this.count && (DOM.remove(DOM.select(".mceModal")), 
                DOM.setAttrib(DOM.doc.body, "aria-hidden", "false"), this.editor.focus()), 
                this.onClose.dispatch(this, win);
                var f = win.features || {};
                return f.close && "function" == typeof f.close && f.close.call(win || this, win), 
                Event.clear(id), Event.clear(id + "_ifr"), DOM.remove(id + "_frame"), 
                DOM.remove(id), delete this.windows[id], 0 < this.count && (f = this._frontWindow()) && f.focus(), 
                !0;
            },
            setTitle: function(win, title) {
                win = this._findId(win), (win = DOM.get(win + "_title")) && !win.innerHTML && (win.innerHTML = DOM.encode(title));
            },
            confirm: function(options, cb, s) {
                var self = this;
                tinymce.is(options, "string") && (options = {
                    text: options
                }), options = tinymce.extend({
                    title: ""
                }, options), self.open({
                    title: self.editor.getLang(options.title, options.title),
                    type: "confirm",
                    buttons: [ {
                        title: self.editor.getLang("no", "No"),
                        id: "cancel"
                    }, {
                        title: self.editor.getLang("yes", "Yes"),
                        id: "ok",
                        classes: "primary",
                        autofocus: !0,
                        onsubmit: function(s) {
                            cb && cb.call(s || self, s);
                        }
                    } ],
                    content: "<p>" + DOM.encode(self.editor.getLang(options.text, options.text)) + "</p>"
                });
            },
            alert: function(options, cb, s) {
                var self = this;
                tinymce.is(options, "string") && (options = {
                    text: options
                }), options = tinymce.extend({
                    title: ""
                }, options), self.open({
                    title: self.editor.getLang(options.title, options.title),
                    type: "alert",
                    buttons: [ {
                        title: self.editor.getLang("cancel", "Cancel"),
                        id: "cancel"
                    }, {
                        title: self.editor.getLang("ok", "Ok"),
                        id: "ok",
                        classes: "primary",
                        autofocus: !0,
                        onsubmit: function(s) {
                            cb && cb.call(s || self, s);
                        }
                    } ],
                    content: "<p>" + DOM.encode(self.editor.getLang(options.text, options.text)) + "</p>"
                });
            },
            prompt: function(options, cb, s) {
                var self = this, html = (tinymce.is(options, "string") && (options = {
                    text: options
                }), options = tinymce.extend({
                    title: ""
                }, options), '<div class="mceModalRow">   <div class="mceModalControl">       <input type="text" id="' + self.editor.id + '_prompt_input" autofocus />   </div></div>');
                self.open({
                    title: self.editor.getLang(options.title, options.title),
                    type: "prompt",
                    buttons: [ {
                        title: self.editor.getLang("cancel", "Cancel"),
                        id: "cancel"
                    }, {
                        title: self.editor.getLang("ok", "Ok"),
                        id: "ok",
                        classes: "primary",
                        autofocus: !0,
                        onsubmit: function() {
                            var value = DOM.getValue(self.editor.id + "_prompt_input"), value = DOM.encode(value);
                            cb && cb.call(s || self, value);
                        }
                    } ],
                    content: html
                });
            },
            resizeBy: function(dw, dh, id) {},
            moveTo: function(id, x, y) {
                DOM.setStyles(id, {
                    left: x,
                    top: y
                });
            },
            position: function(id) {
                var p = DOM.getRect(id), vp = DOM.getViewPort(), top = Math.round(Math.max(vp.y + 10, vp.y + vp.h / 2 - p.h / 2)), vp = Math.round(Math.max(vp.x + 10, vp.x + vp.w / 2 - p.w / 2)), vp = Math.max(0, vp - 10);
                DOM.setStyles(id, {
                    left: vp,
                    top: top
                });
            },
            focus: function(id) {
                var win = this.windows[id];
                if (win) if (win.zIndex = this.zIndex++, DOM.setStyle(id + "_frame", "zIndex", win.zIndex), 
                DOM.removeClass(this.lastId, "mceFocus"), DOM.addClass(id + "_frame", "mceFocus"), 
                this.lastId = id + "_frame", DOM.get(id).focus(), DOM.get(id + "_ifr")) DOM.get(id + "_ifr").focus(); else {
                    var nodes = DOM.select("input, select, button, textarea", DOM.get(id));
                    nodes[0].focus();
                    for (var i = 0; i < nodes.length; i++) {
                        var node = nodes[i];
                        if (0 <= node.getAttribute("tabindex") && node.getAttribute("autofocus")) {
                            node.focus();
                            break;
                        }
                    }
                }
            },
            _startDrag: function(id, se, ac) {
                var mu, mm, sx, sy, p, vp, d = DOM.doc;
                function end() {
                    Event.remove(d, "mouseup touchend", mu), Event.remove(d, "mousemove touchmove", mm), 
                    DOM.removeClass(id, "dragging");
                }
                DOM.hasClass(id, "dragging") ? end() : (updateWithTouchData(se), 
                p = DOM.getRect(id), (vp = DOM.getViewPort()).w -= 2, vp.h -= 2, 
                DOM.addClass(id, "dragging"), sx = se.screenX, sy = se.screenY, 
                mu = Event.add(d, "mouseup touchend", function(e) {
                    return updateWithTouchData(e), end(), Event.cancel(e);
                }), mm = Event.add(d, "mousemove touchmove", function(e) {
                    updateWithTouchData(e);
                    var x = e.screenX - sx, y = e.screenY - sy, x = Math.max(p.x + x, 10), y = Math.max(p.y + y, 10);
                    return DOM.setStyles(id, {
                        left: x,
                        top: y
                    }), Event.cancel(e);
                }));
            },
            _frontWindow: function() {
                var fw, ix = 0;
                return tinymce.each(this.windows, function(win) {
                    win.zIndex > ix && (ix = (fw = win).zIndex);
                }), fw;
            },
            _findId: function(w) {
                return "string" != typeof w && each(this.windows, function(wo) {
                    var ifr = DOM.get(wo.id + "_ifr");
                    if (ifr && w == ifr.contentWindow) return w = wo.id, !1;
                }), w;
            }
        });
    }(tinymce), function(tinymce) {
        tinymce.Formatter = function(ed) {
            var formatChangeData, undef, formats = {}, each = tinymce.each, dom = ed.dom, selection = ed.selection, TreeWalker = tinymce.dom.TreeWalker, rangeUtils = new tinymce.dom.RangeUtils(dom), isValidChild = ed.schema.isValidChild, isBlock = dom.isBlock, forcedRootBlock = ed.settings.forced_root_block, nodeIndex = dom.nodeIndex, INVISIBLE_CHAR = "\ufeff", MCE_ATTR_RE = /^(src|href|style)$/, FALSE = !1, TRUE = !0, getContentEditable = dom.getContentEditable, hasCaretNodeSibling = function(node) {
                for (var sibling = node.parentNode.firstChild; sibling; ) {
                    if (sibling !== node && isCaretNode(sibling)) return !0;
                    sibling = sibling.nextSibling;
                }
                return !1;
            }, canFormatBR = function(editor, format, node, parentName) {
                return !(!1 === editor.settings.format_empty_lines || !format.inline || !node.parentNode) && ("a" == format.inline || editor.schema.getTextRootBlockElements()[parentName] && !editor.dom.isEmpty(node.parentNode) && !hasCaretNodeSibling(node));
            };
            function isTextBlock(name) {
                return name.nodeType && (name = name.nodeName), !!ed.schema.getTextBlockElements()[name.toLowerCase()];
            }
            function isTableCell(node) {
                return /^(TH|TD)$/.test(node.nodeName);
            }
            function getParents(node, selector) {
                return dom.getParents(node, selector, dom.getRoot());
            }
            function isCaretNode(node) {
                return 1 === node.nodeType && "_mce_caret" === node.id;
            }
            function isBogusBr(node) {
                return "BR" == node.nodeName && node.getAttribute("data-mce-bogus") && !node.nextSibling;
            }
            function get(name) {
                return name ? formats[name] : formats;
            }
            function register(name, format) {
                var current;
                name && ("string" != typeof name ? each(name, function(format, name) {
                    register(name, format);
                }) : (format = format.length ? format : [ format ], each(format, function(format) {
                    format.deep === undef && (format.deep = !format.selector), format.split === undef && (format.split = !format.selector || format.inline), 
                    format.remove === undef && format.selector && !format.inline && (format.remove = "none"), 
                    format.selector && format.inline && (format.mixed = !0, format.block_expand = !0), 
                    "string" == typeof format.classes && (format.classes = format.classes.split(/\s+/));
                }), formats[name] ? (current = (current = formats[name]).length ? current : [ current ], 
                formats[name] = current.concat(format)) : formats[name] = format));
            }
            function matchesUnInheritedFormatSelector(node, name) {
                var formatList = get(name);
                if (formatList) for (var i = 0; i < formatList.length; i++) if (!1 === formatList[i].inherit && formatList[i].selector && dom.is(node, formatList[i].selector)) return 1;
            }
            function getTextDecoration(node) {
                var decoration;
                return ed.dom.getParent(node, function(n) {
                    return (decoration = ed.dom.getStyle(n, "text-decoration")) && "none" !== decoration;
                }), decoration;
            }
            function processUnderlineAndColor(node) {
                var textDecoration;
                1 === node.nodeType && node.parentNode && 1 === node.parentNode.nodeType && (textDecoration = getTextDecoration(node.parentNode), 
                ed.dom.getStyle(node, "color") && textDecoration ? ed.dom.setStyle(node, "text-decoration", textDecoration) : ed.dom.getStyle(node, "text-decoration") === textDecoration && ed.dom.setStyle(node, "text-decoration", null));
            }
            function apply(name, vars, node) {
                var bookmark, rng, formatList = get(name), format = formatList[0], isCollapsed = !node && selection.isCollapsed();
                function setElementFormat(elm, fmt) {
                    var styleVal;
                    fmt = fmt || format, elm && (each(fmt.styles, function(value, name) {
                        dom.setStyle(elm, name, replaceVars(value, vars));
                    }), fmt.styles && (styleVal = dom.serializeStyle(dom.parseStyle(elm.style.cssText), elm.nodeName)) && elm.setAttribute("data-mce-style", styleVal), 
                    each(fmt.attributes, function(value, name) {
                        dom.setAttrib(elm, name, replaceVars(value, vars));
                    }), each(fmt.classes, function(value) {
                        value = replaceVars(value, vars), dom.hasClass(elm, value) || dom.addClass(elm, value);
                    }), fmt.onformat) && fmt.onformat(elm, fmt, vars, node);
                }
                function applyNodeStyle(formatList, node) {
                    var found = !1;
                    return !!format.selector && (each(formatList, function(format) {
                        return "collapsed" in format && format.collapsed !== isCollapsed || !dom.is(node, format.selector) || isCaretNode(node) || isBogusBr(node) ? void 0 : (setElementFormat(node, format), 
                        !(found = !0));
                    }), found);
                }
                function applyRngStyle(rng, bookmark, node_specific) {
                    var newWrappers = [], contentEditable = !0, wrapName = format.inline || format.block, wrapElm = dom.create(wrapName);
                    setElementFormat(wrapElm), rangeUtils.walk(rng, function(nodes) {
                        var currentWrapElm;
                        each(nodes, function process(node) {
                            var nodeName, parentName, found, hasContentEditableState, lastContentEditable;
                            isBogusBr(node) || isBookmarkNode(node) || (lastContentEditable = contentEditable, 
                            nodeName = node.nodeName.toLowerCase(), parentName = node.parentNode.nodeName.toLowerCase(), 
                            1 === node.nodeType && getContentEditable(node) && (lastContentEditable = contentEditable, 
                            contentEditable = "true" === getContentEditable(node), 
                            hasContentEditableState = !function(node) {
                                return ed.schema.getShortEndedElements()[node.nodeName.toLowerCase()];
                            }(node)), isEq(nodeName, "br") && !canFormatBR(ed, format, node, parentName) ? (currentWrapElm = 0, 
                            format.block && dom.remove(node)) : format.wrapper && matchNode(node, name, vars) ? currentWrapElm = 0 : contentEditable && !hasContentEditableState && format.block && !format.wrapper && isTextBlock(nodeName) && isValidChild(parentName, wrapName) ? (setElementFormat(node = dom.rename(node, wrapName)), 
                            newWrappers.push(node), currentWrapElm = 0) : format.selector && (found = applyNodeStyle(formatList, node), 
                            !format.inline || found) ? currentWrapElm = 0 : !contentEditable || hasContentEditableState || !isValidChild(wrapName, nodeName) || !isValidChild(parentName, wrapName) || function(node) {
                                return !node_specific && 3 === node.nodeType && 1 === node.nodeValue.length && 65279 === node.nodeValue.charCodeAt(0);
                            }(node) || isCaretNode(node) || isBogusBr(node) || isBookmarkNode(node) || format.inline && isBlock(node) ? (currentWrapElm = 0, 
                            each(tinymce.grep(node.childNodes), process), hasContentEditableState && (contentEditable = lastContentEditable), 
                            currentWrapElm = 0) : (currentWrapElm || (currentWrapElm = dom.clone(wrapElm, FALSE), 
                            node.parentNode.insertBefore(currentWrapElm, node), 
                            newWrappers.push(currentWrapElm)), currentWrapElm.appendChild(node)));
                        });
                    }), !0 !== format.links && !1 !== format.wrap_links || each(newWrappers, function(node) {
                        !function process(node) {
                            "A" === node.nodeName && setElementFormat(node, format), 
                            each(tinymce.grep(node.childNodes), process);
                        }(node);
                    }), each(newWrappers, function(node) {
                        var childCount;
                        if (childCount = function(node) {
                            var count = 0;
                            return each(node.childNodes, function(node) {
                                isWhiteSpaceNode(node) || isBookmarkNode(node) || count++;
                            }), count;
                        }(node), (1 < newWrappers.length || !isBlock(node)) && 0 === childCount) dom.remove(node, 1); else if (1 < childCount && isEq(node.firstChild.nodeName, "BR") && dom.remove(node.firstChild), 
                        format.inline || format.wrapper) {
                            if (format.exact || 1 !== childCount || (node = function(node) {
                                var clone, child = function(root) {
                                    var child = !1;
                                    return each(root.childNodes, function(node) {
                                        if (function(node) {
                                            return !(1 != node.nodeType || isBookmarkNode(node) || isWhiteSpaceNode(node) || isCaretNode(node) || isBogusBr(node));
                                        }(node)) return child = node, !1;
                                    }), child;
                                }(node);
                                return child && !isBookmarkNode(child) && matchName(child, format) && (setElementFormat(clone = dom.clone(child, FALSE)), 
                                dom.replace(clone, node, TRUE), dom.remove(child, 1)), 
                                clone || node;
                            }(node)), each(formatList, function(format) {
                                each(dom.select(format.inline, node), function(child) {
                                    isBookmarkNode(child) || removeFormat(format, vars, child, format.exact ? child : null);
                                });
                            }), matchNode(node.parentNode, name, vars)) return dom.remove(node, 1), 
                            node = 0, TRUE;
                            format.merge_with_parents && dom.getParent(node.parentNode, function(parent) {
                                if (matchNode(parent, name, vars)) return dom.remove(node, 1), 
                                node = 0, TRUE;
                            }), node && !1 !== format.merge_siblings && (node = mergeSiblings(getNonWhiteSpaceSibling(node), node), 
                            node = mergeSiblings(node, getNonWhiteSpaceSibling(node, TRUE)));
                        }
                    });
                }
                if ("false" === getContentEditable(selection.getNode())) {
                    node = selection.getNode();
                    for (var i = 0, l = formatList.length; i < l; i++) if (formatList[i].ceFalseOverride && formatList[i].selector && dom.is(node, formatList[i].selector)) return setElementFormat(node, formatList[i]), 
                    !0;
                } else format && (node && node.parentNode ? node.nodeType ? applyNodeStyle(formatList, node) || ((rng = dom.createRng()).setStartBefore(node), 
                rng.setEndAfter(node), applyRngStyle(expandRng(rng, formatList), 0, !0)) : applyRngStyle(node, 0, !0) : isCollapsed && format.inline && !dom.select("td.mceSelected,th.mceSelected,div.mceSelected").length ? performCaretAction("apply", name, vars) : (rng = selection.getNode(), 
                forcedRootBlock || !formatList[0].defaultBlock || dom.getParent(rng, dom.isBlock) || apply(formatList[0].defaultBlock), 
                selection.setRng(function() {
                    var rng = selection.getRng(), start = rng.startContainer, end = rng.endContainer;
                    return start != end && 0 === rng.endOffset && (end = (3 == (start = function(start, end) {
                        var walker = new TreeWalker(end);
                        for (node = walker.prev2(); node; node = walker.prev2()) {
                            if (3 == node.nodeType && 0 < node.data.length) return node;
                            if (1 < node.childNodes.length || node == start || "BR" == node.tagName) return node;
                        }
                    }(start, end)).nodeType ? start.data : start.childNodes).length, 
                    rng.setEnd(start, end)), rng;
                }()), bookmark = selection.getBookmark(), applyRngStyle(expandRng(selection.getRng(TRUE), formatList)), 
                format.styles && (format.styles.color || format.styles.textDecoration) && (tinymce.walk(rng, processUnderlineAndColor, "childNodes"), 
                processUnderlineAndColor(rng)), selection.moveToBookmark(bookmark), 
                moveStart(selection.getRng(TRUE)), ed.nodeChanged()));
            }
            function remove(name, vars, node, similar) {
                var rng, formatList = get(name), format = formatList[0], contentEditable = !0;
                function splitToFormatRoot(container) {
                    return function(formatRoot, container, target) {
                        var parent, clone, lastClone, firstClone, i, formatRootParent;
                        if (formatRoot) {
                            for (formatRootParent = formatRoot.parentNode, parent = container.parentNode; parent && parent != formatRootParent; parent = parent.parentNode) {
                                for (clone = dom.clone(parent, FALSE), i = 0; i < formatList.length; i++) if (removeFormat(formatList[i], vars, clone, clone)) {
                                    clone = 0;
                                    break;
                                }
                                clone && (lastClone && clone.appendChild(lastClone), 
                                firstClone = firstClone || clone, lastClone = clone);
                            }
                            format.mixed && isBlock(formatRoot) || (container = dom.split(formatRoot, container)), 
                            lastClone && (target.parentNode.insertBefore(lastClone, target), 
                            firstClone.appendChild(target));
                        }
                        return container;
                    }(function(container) {
                        var formatRoot;
                        return each(getParents(container.parentNode).reverse(), function(parent) {
                            var format;
                            formatRoot || "_start" == parent.id || "_end" == parent.id || (format = matchNode(parent, name, vars, similar)) && !1 !== format.split && (formatRoot = parent);
                        }), formatRoot;
                    }(container), container, container);
                }
                function unwrap(start) {
                    var node = dom.get(start ? "_start" : "_end"), out = node[start ? "firstChild" : "lastChild"];
                    return 3 == (out = isBookmarkNode(out) ? out[start ? "firstChild" : "lastChild"] : out).nodeType && 0 === out.data.length && (out = start ? node.previousSibling || node.nextSibling : node.nextSibling || node.previousSibling), 
                    dom.remove(node, !0), out;
                }
                function removeRngStyle(rng) {
                    var startContainer, endContainer, commonAncestorContainer = rng.commonAncestorContainer;
                    rng = expandRng(rng, formatList, TRUE), format.split && ((startContainer = getContainer(rng, TRUE)) != (endContainer = getContainer(rng)) ? (commonAncestorContainer && /^T(HEAD|BODY|FOOT|R)$/.test(commonAncestorContainer.nodeName) && /^(TH|TD)$/.test(endContainer.nodeName) && endContainer.firstChild && (endContainer = endContainer.firstChild || endContainer), 
                    !dom.isChildOf(startContainer, endContainer) || isBlock(endContainer) || isTableCell(startContainer) || isTableCell(endContainer) ? (startContainer = wrap(startContainer, "span", {
                        id: "_start",
                        "data-mce-type": "bookmark"
                    }), endContainer = wrap(endContainer, "span", {
                        id: "_end",
                        "data-mce-type": "bookmark"
                    }), splitToFormatRoot(startContainer), splitToFormatRoot(endContainer), 
                    startContainer = unwrap(TRUE), endContainer = unwrap()) : (splitToFormatRoot(startContainer = wrap(startContainer, "span", {
                        id: "_start",
                        "data-mce-type": "bookmark"
                    })), startContainer = unwrap(TRUE))) : startContainer = endContainer = splitToFormatRoot(startContainer), 
                    rng.startContainer = startContainer.parentNode || startContainer, 
                    rng.startOffset = nodeIndex(startContainer), rng.endContainer = endContainer.parentNode || endContainer, 
                    rng.endOffset = nodeIndex(endContainer) + 1), rangeUtils.walk(rng, function(nodes) {
                        each(nodes, function(node) {
                            (function process(node) {
                                var children, i, l;
                                if (1 === node.nodeType && getContentEditable(node) && (contentEditable = "true" === getContentEditable(node)), 
                                children = tinymce.grep(node.childNodes), contentEditable || format.ceFalseOverride || function(node) {
                                    return getParents(node, "FIGURE") && "FIGURE" != node.nodeName;
                                }(node)) for (i = 0, l = formatList.length; i < l && !removeFormat(formatList[i], vars, node, node); i++);
                                if (format.deep && children.length) for (i = 0, 
                                l = children.length; i < l; i++) process(children[i]);
                            })(node), 1 === node.nodeType && "underline" === ed.dom.getStyle(node, "text-decoration") && node.parentNode && "underline" === getTextDecoration(node.parentNode) && removeFormat({
                                deep: !1,
                                exact: !0,
                                inline: "span",
                                styles: {
                                    textDecoration: "underline"
                                }
                            }, null, node);
                        });
                    });
                }
                if (node) node.nodeType ? ((rng = dom.createRng()).setStartBefore(node), 
                rng.setEndAfter(node), removeRngStyle(rng)) : removeRngStyle(node); else if ("false" === getContentEditable(selection.getNode())) {
                    node = selection.getNode();
                    for (var i = 0, l = formatList.length; i < l && (!formatList[i].ceFalseOverride || !removeFormat(formatList[i], vars, node, node)); i++);
                } else selection.isCollapsed() && format.inline && !dom.select("td.mceSelected,th.mceSelected,div.mceSelected").length ? performCaretAction("remove", name, vars, similar) : (rng = selection.getBookmark(), 
                removeRngStyle(selection.getRng(TRUE)), selection.moveToBookmark(rng), 
                format.inline && match(name, vars, selection.getStart()) && moveStart(selection.getRng(!0)), 
                ed.nodeChanged());
            }
            function matchNode(node, name, vars, similar) {
                var format, i, classes, formatList = get(name);
                function matchItems(node, format, item_name) {
                    var key, value, i, items = format[item_name];
                    if (format.onmatch) return format.onmatch(node, format, item_name);
                    if (items) if (items.length === undef) {
                        for (key in items) if (items.hasOwnProperty(key)) {
                            if (value = "attributes" === item_name ? dom.getAttrib(node, key) : getStyle(node, key), 
                            similar && !value && !format.exact) return;
                            if ((!similar || format.exact) && !isEq(value, normalizeStyleValue(replaceVars(items[key], vars), key))) return;
                        }
                    } else for (i = 0; i < items.length; i++) if ("attributes" === item_name ? dom.getAttrib(node, items[i]) : getStyle(node, items[i])) return format;
                    return format;
                }
                if (formatList && node) for (i = 0; i < formatList.length; i++) if (matchName(node, format = formatList[i]) && matchItems(node, format, "attributes") && matchItems(node, format, "styles")) {
                    if (classes = format.classes) for (i = 0; i < classes.length; i++) if (!dom.hasClass(node, classes[i])) return;
                    return format;
                }
            }
            function match(name, vars, node) {
                var startNode;
                function matchParents(node) {
                    var root = dom.getRoot();
                    return node !== root && (node = dom.getParent(node, function(node) {
                        return !!matchesUnInheritedFormatSelector(node, name) || node.parentNode === root || !!matchNode(node, name, vars, !0);
                    }), matchNode(node, name, vars));
                }
                return node ? matchParents(node) : matchParents(node = selection.getNode()) || (startNode = selection.getStart()) != node && matchParents(startNode) ? TRUE : FALSE;
            }
            tinymce.extend(this, {
                get: get,
                register: register,
                unregister: function(name) {
                    return name && formats[name] && delete formats[name], formats;
                },
                apply: apply,
                remove: remove,
                toggle: function(name, vars, node) {
                    var fmt = get(name);
                    (!match(name, vars, node) || "toggle" in fmt[0] && !fmt[0].toggle ? apply : remove)(name, vars, node);
                },
                match: match,
                matchAll: function(names, vars) {
                    var matchedFormatNames = [], checkedMap = {}, startElement = selection.getStart();
                    return dom.getParent(startElement, function(node) {
                        for (var name, i = 0; i < names.length; i++) name = names[i], 
                        !checkedMap[name] && matchNode(node, name, vars) && (checkedMap[name] = !0, 
                        matchedFormatNames.push(name));
                    }, dom.getRoot()), matchedFormatNames;
                },
                matchNode: matchNode,
                canApply: function(name) {
                    var parents, i, x, selector, formatList = get(name);
                    if (formatList) for (parents = getParents(selection.getStart()), 
                    x = formatList.length - 1; 0 <= x; x--) {
                        if (!(selector = formatList[x].selector) || formatList[x].defaultBlock) return TRUE;
                        for (i = parents.length - 1; 0 <= i; i--) if (dom.is(parents[i], selector)) return TRUE;
                    }
                    return FALSE;
                },
                formatChanged: function(formats, callback, similar) {
                    var currentFormats;
                    return formatChangeData || (formatChangeData = {}, currentFormats = {}, 
                    ed.onNodeChange.addToTop(function(ed, cm, node) {
                        var parents = getParents(node), matchedFormats = {}, parents = tinymce.grep(parents, function(node) {
                            return 1 == node.nodeType && !node.getAttribute("data-mce-bogus");
                        });
                        each(formatChangeData, function(callbacks, format) {
                            each(parents, function(node) {
                                return matchNode(node, format, {}, callbacks.similar) ? (currentFormats[format] || (each(callbacks, function(callback) {
                                    callback(!0, {
                                        node: node,
                                        format: format,
                                        parents: parents
                                    });
                                }), currentFormats[format] = callbacks), matchedFormats[format] = callbacks, 
                                !1) : !matchesUnInheritedFormatSelector(node, format) && void 0;
                            });
                        }), each(currentFormats, function(callbacks, format) {
                            matchedFormats[format] || (delete currentFormats[format], 
                            each(callbacks, function(callback) {
                                callback(!1, {
                                    node: node,
                                    format: format,
                                    parents: parents
                                });
                            }));
                        });
                    })), each(formats.split(","), function(format) {
                        formatChangeData[format] || (formatChangeData[format] = [], 
                        formatChangeData[format].similar = similar), formatChangeData[format].push(callback);
                    }), this;
                }
            }), register({
                valigntop: [ {
                    selector: "td,th",
                    styles: {
                        verticalAlign: "top"
                    }
                } ],
                valignmiddle: [ {
                    selector: "td,th",
                    styles: {
                        verticalAlign: "middle"
                    }
                } ],
                valignbottom: [ {
                    selector: "td,th",
                    styles: {
                        verticalAlign: "bottom"
                    }
                } ],
                alignleft: [ {
                    selector: "figure,figcaption,p,h1,h2,h3,h4,h5,h6,td,th,tr,div,ul,ol,li",
                    styles: {
                        textAlign: "left"
                    },
                    defaultBlock: "div",
                    inherit: !1
                }, {
                    selector: "figure[data-mce-image]",
                    collapsed: !1,
                    ceFalseOverride: !0,
                    styles: {
                        float: "left"
                    }
                }, {
                    selector: "img,table",
                    collapsed: !1,
                    styles: {
                        float: "left"
                    }
                } ],
                aligncenter: [ {
                    selector: "figure,figcaption,p,h1,h2,h3,h4,h5,h6,td,th,tr,div,ul,ol,li",
                    styles: {
                        textAlign: "center"
                    },
                    defaultBlock: "div",
                    inherit: !1
                }, {
                    selector: "figure[data-mce-image]",
                    collapsed: !1,
                    ceFalseOverride: !0,
                    styles: {
                        marginLeft: "auto",
                        marginRight: "auto",
                        display: "table"
                    }
                }, {
                    selector: "img",
                    collapsed: !1,
                    styles: {
                        display: "block",
                        marginLeft: "auto",
                        marginRight: "auto"
                    }
                }, {
                    selector: "table",
                    collapsed: !1,
                    styles: {
                        marginLeft: "auto",
                        marginRight: "auto"
                    }
                } ],
                alignright: [ {
                    selector: "figure,figcaption,p,h1,h2,h3,h4,h5,h6,td,th,tr,div,ul,ol,li",
                    styles: {
                        textAlign: "right"
                    },
                    defaultBlock: "div",
                    inherit: !1
                }, {
                    selector: "figure[data-mce-image]",
                    collapsed: !1,
                    ceFalseOverride: !0,
                    styles: {
                        float: "right"
                    }
                }, {
                    selector: "img,table",
                    collapsed: !1,
                    styles: {
                        float: "right"
                    }
                } ],
                alignfull: [ {
                    selector: "figure,figcaption,p,h1,h2,h3,h4,h5,h6,td,th,div,ul,ol,li",
                    styles: {
                        textAlign: "justify"
                    },
                    defaultBlock: "div",
                    inherit: !1
                } ],
                bold: [ {
                    inline: "strong",
                    remove: "all"
                }, {
                    inline: "span",
                    styles: {
                        fontWeight: "bold"
                    }
                }, {
                    inline: "b",
                    remove: "all"
                } ],
                italic: [ {
                    inline: "em",
                    remove: "all"
                }, {
                    inline: "span",
                    styles: {
                        fontStyle: "italic"
                    }
                }, {
                    inline: "i",
                    remove: "all"
                } ],
                underline: [ {
                    inline: "span",
                    styles: {
                        textDecoration: "underline"
                    },
                    exact: !0
                }, {
                    inline: "u",
                    remove: "all"
                } ],
                strikethrough: [ {
                    inline: "span",
                    styles: {
                        textDecoration: "line-through"
                    },
                    exact: !0
                }, {
                    inline: "strike",
                    remove: "all"
                } ],
                forecolor: {
                    inline: "span",
                    styles: {
                        color: "%value"
                    },
                    links: !0,
                    remove_similar: !0
                },
                hilitecolor: {
                    inline: "span",
                    styles: {
                        backgroundColor: "%value"
                    },
                    links: !0,
                    remove_similar: !0
                },
                fontname: {
                    inline: "span",
                    styles: {
                        fontFamily: "%value"
                    }
                },
                fontsize: {
                    inline: "span",
                    styles: {
                        fontSize: "%value"
                    }
                },
                fontsize_class: {
                    inline: "span",
                    attributes: {
                        class: "%value"
                    }
                },
                blockquote: {
                    block: "blockquote",
                    wrapper: !0,
                    remove: "all"
                },
                subscript: {
                    inline: "sub"
                },
                superscript: {
                    inline: "sup"
                },
                code: {
                    inline: "code"
                },
                link: {
                    inline: "a",
                    selector: "a",
                    remove: "all",
                    split: !0,
                    deep: !0,
                    onmatch: function() {
                        return !0;
                    },
                    onformat: function(elm, fmt, vars) {
                        each(vars, function(value, key) {
                            dom.setAttrib(elm, key, value);
                        });
                    }
                },
                removeformat: [ {
                    selector: "b,strong,em,i,font,u,strike,sub,sup,dfn,code,samp,kbd,var,cite,mark,q,del,ins",
                    remove: "all",
                    split: !0,
                    expand: !1,
                    block_expand: !0,
                    deep: !0
                }, {
                    selector: "span",
                    attributes: [ "style", "class" ],
                    remove: "empty",
                    split: !0,
                    expand: !1,
                    deep: !0
                }, {
                    selector: "*",
                    attributes: [ "style", "class" ],
                    split: !1,
                    expand: !1,
                    deep: !0
                } ]
            }), each("p h1 h2 h3 h4 h5 h6 div address pre div code samp dt dd dl".split(/\s/), function(name) {
                register(name, {
                    block: name,
                    remove: "all"
                });
            }), register(ed.settings.formats), ed.addShortcut("meta+b", "bold_desc", "Bold"), 
            ed.addShortcut("meta+i", "italic_desc", "Italic"), ed.addShortcut("meta+u", "underline_desc", "Underline");
            for (var i = 1; i <= 6; i++) ed.addShortcut("access+" + i, "", [ "FormatBlock", !1, "h" + i ]);
            function matchName(node, format) {
                return isEq(node, format.inline) || isEq(node, format.block) ? TRUE : format.selector && 1 == node.nodeType && dom.is(node, format.selector);
            }
            function isEq(str1, str2) {
                return str1 = "" + ((str1 = str1 || "").nodeName || str1), str2 = "" + ((str2 = str2 || "").nodeName || str2), 
                str1.toLowerCase() == str2.toLowerCase();
            }
            function getStyle(node, name) {
                return normalizeStyleValue(dom.getStyle(node, name), name);
            }
            function normalizeStyleValue(value, name) {
                return "color" != name && "backgroundColor" != name || (value = dom.toHex(value)), 
                "fontWeight" == name && 700 == value && (value = "bold"), "" + ("fontFamily" == name ? value.replace(/[\'\"]/g, "").replace(/,\s+/g, ",") : value);
            }
            function replaceVars(value, vars) {
                return "string" != typeof value ? value = value(vars) : vars && (value = value.replace(/%(\w+)/g, function(str, name) {
                    return vars[name] || str;
                })), value;
            }
            function isWhiteSpaceNode(node) {
                return node && 3 === node.nodeType && /^([\t \r\n]+|)$/.test(node.nodeValue);
            }
            function wrap(node, name, attrs) {
                return name = dom.create(name, attrs), node.parentNode.insertBefore(name, node), 
                name.appendChild(node), name;
            }
            function expandRng(rng, format, remove) {
                var leaf, lastIdx, startContainer = rng.startContainer, startOffset = rng.startOffset, endContainer = rng.endContainer, endOffset = rng.endOffset;
                function findParentContainer(start) {
                    var parent, sibling, container = parent = start ? startContainer : endContainer, siblingName = start ? "previousSibling" : "nextSibling", root = dom.getRoot();
                    if (3 != container.nodeType || isWhiteSpaceNode(container) || !(start ? 0 < startOffset : endOffset < container.nodeValue.length)) for (;;) {
                        if (!format[0].block_expand && isBlock(parent)) return parent;
                        for (sibling = parent[siblingName]; sibling; sibling = sibling[siblingName]) if (!(isBookmarkNode(sibling) || isWhiteSpaceNode(sibling) || isBogusBr(sibling) || isCaretNode(sibling))) return parent;
                        if (parent == root || parent.parentNode == root) {
                            container = parent;
                            break;
                        }
                        parent = parent.parentNode;
                    }
                    return container;
                }
                function findLeaf(node, offset) {
                    for (offset === undef && (offset = (3 === node.nodeType ? node : node.childNodes).length); node && node.hasChildNodes(); ) (node = node.childNodes[offset]) && (offset = (3 === node.nodeType ? node : node.childNodes).length);
                    return {
                        node: node,
                        offset: offset
                    };
                }
                function findParentContentEditable(node) {
                    for (var parent = node; parent; ) {
                        if (1 === parent.nodeType && getContentEditable(parent)) return "false" === getContentEditable(parent) ? parent : node;
                        parent = parent.parentNode;
                    }
                    return node;
                }
                function findWordEndPoint(container, offset, start) {
                    var walker, node, pos, lastTextNode;
                    function findSpace(node, offset) {
                        var pos, pos2, node = node.nodeValue;
                        return void 0 === offset && (offset = start ? node.length : 0), 
                        start ? (pos = node.lastIndexOf(" ", offset), -1 === (pos = (pos2 = node.lastIndexOf("\xa0", offset)) < pos ? pos : pos2) || remove || pos++) : (pos = node.indexOf(" ", offset), 
                        pos2 = node.indexOf("\xa0", offset), pos = -1 !== pos && (-1 === pos2 || pos < pos2) ? pos : pos2), 
                        pos;
                    }
                    if (3 === container.nodeType) {
                        if (-1 !== (pos = findSpace(container, offset))) return {
                            container: container,
                            offset: pos
                        };
                        lastTextNode = container;
                    }
                    for (walker = new TreeWalker(container, dom.getParent(container, isBlock) || ed.getBody()); node = walker[start ? "prev" : "next"](); ) if (3 === node.nodeType) {
                        if (-1 !== (pos = findSpace(lastTextNode = node))) return {
                            container: node,
                            offset: pos
                        };
                    } else if (isBlock(node)) break;
                    if (lastTextNode) return {
                        container: lastTextNode,
                        offset: offset = start ? 0 : lastTextNode.length
                    };
                }
                function findSelectorEndPoint(container, sibling_name) {
                    for (var y, curFormat, parents = getParents(container = 3 == container.nodeType && 0 === container.nodeValue.length && container[sibling_name] ? container[sibling_name] : container), i = 0; i < parents.length; i++) for (y = 0; y < format.length; y++) if (!("collapsed" in (curFormat = format[y]) && curFormat.collapsed !== rng.collapsed) && dom.is(parents[i], curFormat.selector)) return parents[i];
                    return container;
                }
                function findBlockEndPoint(container, sibling_name) {
                    var node, root = dom.getRoot();
                    if (!(node = (node = (node = format[0].wrapper ? node : dom.getParent(container, format[0].block, root)) || dom.getParent(3 == container.nodeType ? container.parentNode : container, function(node) {
                        return node != root && isTextBlock(node);
                    })) && format[0].wrapper && getParents(node, "ul,ol,dl").reverse()[0] || node)) for (node = container; node[sibling_name] && !isBlock(node[sibling_name]) && !isEq(node = node[sibling_name], "br"); );
                    return node || container;
                }
                if (1 == startContainer.nodeType && startContainer.hasChildNodes() && (lastIdx = startContainer.childNodes.length - 1, 
                startContainer = startContainer.childNodes[lastIdx < startOffset ? lastIdx : startOffset]) && 3 == startContainer.nodeType && (startOffset = 0), 
                1 == endContainer.nodeType && endContainer.hasChildNodes() && (lastIdx = endContainer.childNodes.length - 1, 
                endContainer = endContainer.childNodes[lastIdx < endOffset ? lastIdx : endOffset - 1]) && 3 == endContainer.nodeType && (endOffset = endContainer.nodeValue.length), 
                startContainer = findParentContentEditable(startContainer), endContainer = findParentContentEditable(endContainer), 
                (isBookmarkNode(startContainer.parentNode) || isBookmarkNode(startContainer)) && 3 == (startContainer = (startContainer = isBookmarkNode(startContainer) ? startContainer : startContainer.parentNode).nextSibling || startContainer).nodeType && (startOffset = 0), 
                (isBookmarkNode(endContainer.parentNode) || isBookmarkNode(endContainer)) && 3 == (endContainer = (endContainer = isBookmarkNode(endContainer) ? endContainer : endContainer.parentNode).previousSibling || endContainer).nodeType && (endOffset = endContainer.length), 
                format[0].inline && (rng.collapsed && ((lastIdx = findWordEndPoint(startContainer, startOffset, !0)) && (startContainer = lastIdx.container, 
                startOffset = lastIdx.offset), lastIdx = findWordEndPoint(endContainer, endOffset)) && (endContainer = lastIdx.container, 
                endOffset = lastIdx.offset), (leaf = findLeaf(endContainer, endOffset)).node)) {
                    for (;leaf.node && 0 === leaf.offset && leaf.node.previousSibling; ) leaf = findLeaf(leaf.node.previousSibling);
                    leaf.node && 0 < leaf.offset && 3 === leaf.node.nodeType && " " === leaf.node.nodeValue.charAt(leaf.offset - 1) && 1 < leaf.offset && (endContainer = leaf.node).splitText(leaf.offset - 1);
                }
                return (format[0].inline || format[0].block_expand) && (format[0].inline && 3 == startContainer.nodeType && 0 !== startOffset || isBlock(startContainer) || (startContainer = findParentContainer(!0)), 
                format[0].inline && 3 == endContainer.nodeType && endOffset !== endContainer.nodeValue.length || isBlock(endContainer) || (endContainer = findParentContainer())), 
                format[0].selector && format[0].expand !== FALSE && !format[0].inline && (startContainer = findSelectorEndPoint(startContainer, "previousSibling"), 
                endContainer = findSelectorEndPoint(endContainer, "nextSibling")), 
                (format[0].block || format[0].selector) && (startContainer = findBlockEndPoint(startContainer, "previousSibling"), 
                endContainer = findBlockEndPoint(endContainer, "nextSibling"), format[0].block) && (isBlock(startContainer) || (startContainer = findParentContainer(!0)), 
                isBlock(endContainer) || (endContainer = findParentContainer())), 
                1 == startContainer.nodeType && (startOffset = nodeIndex(startContainer), 
                startContainer = startContainer.parentNode), 1 == endContainer.nodeType && (endOffset = nodeIndex(endContainer) + 1, 
                endContainer = endContainer.parentNode), {
                    startContainer: startContainer,
                    startOffset: startOffset,
                    endContainer: endContainer,
                    endOffset: endOffset
                };
            }
            function removeFormat(format, vars, node, compare_node) {
                var i, attrs, stylesModified;
                if (!matchName(node, format) && !function(node, format) {
                    return format.links && "A" == node.tagName;
                }(node, format)) return FALSE;
                if (format.onremove && format.onremove(node, format, vars, node), 
                "all" != format.remove) for (each(format.styles, function(value, name) {
                    value = normalizeStyleValue(replaceVars(value, vars), name), 
                    "number" == typeof name && (name = value, compare_node = 0), 
                    !format.remove_similar && compare_node && !isEq(getStyle(compare_node, name), value) || dom.setStyle(node, name, ""), 
                    stylesModified = 1;
                }), stylesModified && "" === dom.getAttrib(node, "style") && (node.removeAttribute("style"), 
                node.removeAttribute("data-mce-style")), each(format.attributes, function(value, name) {
                    var valueOut;
                    value = replaceVars(value, vars), "number" == typeof name && (name = value, 
                    compare_node = 0), compare_node && !isEq(dom.getAttrib(compare_node, name), value) || ("class" == name && (value = dom.getAttrib(node, name)) && (valueOut = "", 
                    each(value.split(/\s+/), function(cls) {
                        /mce\w+/.test(cls) && (valueOut += (valueOut ? " " : "") + cls);
                    }), valueOut) ? dom.setAttrib(node, name, valueOut) : ("class" == name && node.removeAttribute("className"), 
                    MCE_ATTR_RE.test(name) && node.removeAttribute("data-mce-" + name), 
                    node.removeAttribute(name)));
                }), each(format.classes, function(value) {
                    value = replaceVars(value, vars), compare_node && !dom.hasClass(compare_node, value) || dom.removeClass(node, value);
                }), attrs = dom.getAttribs(node), i = 0; i < attrs.length; i++) {
                    var attrName = attrs[i].nodeName;
                    if (0 !== attrName.indexOf("_") && 0 !== attrName.indexOf("data-")) return FALSE;
                }
                return "none" != format.remove && (function(node, format) {
                    var rootBlockElm, parentNode = node.parentNode;
                    function find(node, next, inc) {
                        return !(node = getNonWhiteSpaceSibling(node, next, inc)) || "BR" == node.nodeName || isBlock(node);
                    }
                    format.block && (forcedRootBlock ? parentNode != dom.getRoot() || format.list_block && isEq(node, format.list_block) || each(tinymce.grep(node.childNodes), function(node) {
                        isValidChild(forcedRootBlock, node.nodeName.toLowerCase()) ? rootBlockElm ? rootBlockElm.appendChild(node) : (rootBlockElm = wrap(node, forcedRootBlock), 
                        dom.setAttribs(rootBlockElm, ed.settings.forced_root_block_attrs)) : rootBlockElm = 0;
                    }) : isBlock(node) && !isBlock(parentNode) && (find(node, FALSE) || find(node.firstChild, TRUE, 1) || node.insertBefore(dom.create("br"), node.firstChild), 
                    find(node, TRUE) || find(node.lastChild, FALSE, 1) || node.appendChild(dom.create("br")))), 
                    format.selector && format.inline && !isEq(format.inline, node) || dom.remove(node, 1);
                }(node, format), TRUE);
            }
            function getNonWhiteSpaceSibling(node, next, inc) {
                if (node) for (next = next ? "nextSibling" : "previousSibling", 
                node = inc ? node : node[next]; node; node = node[next]) if (1 == node.nodeType || !isWhiteSpaceNode(node)) return node;
            }
            function isBookmarkNode(node) {
                return node && 1 == node.nodeType && "bookmark" == node.getAttribute("data-mce-type");
            }
            function mergeSiblings(prev, next) {
                var sibling, tmpSibling, node1, node2;
                function findElementSibling(node, sibling_name) {
                    for (sibling = node; sibling; sibling = sibling[sibling_name]) {
                        if (3 == sibling.nodeType && 0 !== sibling.nodeValue.length) return node;
                        if (1 == sibling.nodeType && !isBookmarkNode(sibling)) return sibling;
                    }
                    return node;
                }
                if (prev && next && (prev = findElementSibling(prev, "previousSibling"), 
                node2 = next = findElementSibling(next, "nextSibling"), (node1 = prev).nodeName == node2.nodeName && compareObjects(getAttribs(node1), getAttribs(node2)) && compareObjects(dom.parseStyle(dom.getAttrib(node1, "style")), dom.parseStyle(dom.getAttrib(node2, "style"))) ? TRUE : FALSE)) {
                    for (sibling = prev.nextSibling; sibling && sibling != next; ) sibling = (tmpSibling = sibling).nextSibling, 
                    prev.appendChild(tmpSibling);
                    return dom.remove(next), each(tinymce.grep(next.childNodes), function(node) {
                        prev.appendChild(node);
                    }), prev;
                }
                function getAttribs(node) {
                    var attribs = {};
                    return each(dom.getAttribs(node), function(attr) {
                        0 !== (attr = attr.nodeName.toLowerCase()).indexOf("_") && "style" !== attr && (attribs[attr] = dom.getAttrib(node, attr));
                    }), attribs;
                }
                function compareObjects(obj1, obj2) {
                    var value, name;
                    for (name in obj1) if (obj1.hasOwnProperty(name)) {
                        if ((value = obj2[name]) === undef) return FALSE;
                        if (obj1[name] != value) return FALSE;
                        delete obj2[name];
                    }
                    for (name in obj2) if (obj2.hasOwnProperty(name)) return FALSE;
                    return TRUE;
                }
                return next;
            }
            function getContainer(rng, start) {
                var lastIdx, container = rng[start ? "startContainer" : "endContainer"], rng = rng[start ? "startOffset" : "endOffset"];
                return 1 == container.nodeType && (lastIdx = container.childNodes.length - 1, 
                !start && rng && rng--, container = container.childNodes[lastIdx < rng ? lastIdx : rng]), 
                3 === (container = 3 === container.nodeType && start && rng >= container.nodeValue.length && new TreeWalker(container, ed.getBody()).next() || container).nodeType && !start && 0 === rng && new TreeWalker(container, ed.getBody()).prev() || container;
            }
            function performCaretAction(type, name, vars, similar) {
                var textNode, offset, text, caretContainer, debug = ed.settings.caret_debug;
                function createCaretContainer(fill) {
                    var caretContainer = dom.create("span", {
                        id: "_mce_caret",
                        "data-mce-bogus": !0,
                        style: debug ? "color:red" : ""
                    });
                    return fill && caretContainer.appendChild(ed.getDoc().createTextNode(INVISIBLE_CHAR)), 
                    caretContainer;
                }
                function isCaretContainerEmpty(node, nodes) {
                    for (;node; ) {
                        if (3 === node.nodeType && node.nodeValue !== INVISIBLE_CHAR || 1 < node.childNodes.length) return;
                        nodes && 1 === node.nodeType && nodes.push(node), node = node.firstChild;
                    }
                    return 1;
                }
                function getParentCaretContainer(node) {
                    for (;node; ) {
                        if ("_mce_caret" === node.id) return node;
                        node = node.parentNode;
                    }
                }
                function findFirstTextNode(node) {
                    var walker;
                    if (node) for (node = (walker = new TreeWalker(node, node)).current(); node; node = walker.next()) if (3 === node.nodeType) return node;
                }
                function removeCaretContainer(node, move_caret) {
                    var rng;
                    if (node) rng = selection.getRng(!0), isCaretContainerEmpty(node) ? (!1 !== move_caret && (rng.setStartBefore(node), 
                    rng.setEndBefore(node)), dom.remove(node)) : ((move_caret = findFirstTextNode(node)).nodeValue.charAt(0) === INVISIBLE_CHAR && (move_caret.deleteData(0, 1), 
                    rng.startContainer == move_caret && 0 < rng.startOffset && rng.setStart(move_caret, rng.startOffset - 1), 
                    rng.endContainer == move_caret) && 0 < rng.endOffset && rng.setEnd(move_caret, rng.endOffset - 1), 
                    dom.remove(node, 1)), selection.setRng(rng); else if (!(node = getParentCaretContainer(selection.getStart()))) for (;node = dom.get("_mce_caret"); ) removeCaretContainer(node, !1);
                }
                function unmarkBogusCaretParents() {
                    var caretContainer = getParentCaretContainer(selection.getStart());
                    caretContainer && !dom.isEmpty(caretContainer) && tinymce.walk(caretContainer, function(node) {
                        1 != node.nodeType || "_mce_caret" === node.id || dom.isEmpty(node) || dom.setAttrib(node, "data-mce-bogus", null);
                    }, "childNodes");
                }
                ed._hasCaretEvents || (ed.onBeforeGetContent.addToTop(function() {
                    var i, nodes = [];
                    if (isCaretContainerEmpty(getParentCaretContainer(selection.getStart()), nodes)) for (i = nodes.length; i--; ) dom.setAttrib(nodes[i], "data-mce-bogus", "1");
                }), tinymce.each("onMouseUp onKeyUp".split(" "), function(name) {
                    ed[name].addToTop(function() {
                        removeCaretContainer(), unmarkBogusCaretParents();
                    });
                }), ed.onKeyDown.addToTop(function(ed, e) {
                    (8 == (e = e.keyCode) && selection.isCollapsed() || 37 == e || 39 == e) && removeCaretContainer(getParentCaretContainer(selection.getStart())), 
                    unmarkBogusCaretParents();
                }), selection.onSetContent.add(unmarkBogusCaretParents), ed._hasCaretEvents = !0), 
                "apply" == type ? (offset = (type = selection.getRng(!0)).startOffset, 
                text = type.startContainer.nodeValue, (caretContainer = getParentCaretContainer(selection.getStart())) && (textNode = findFirstTextNode(caretContainer)), 
                text && 0 < offset && offset < text.length && /\w/.test(text.charAt(offset)) && /\w/.test(text.charAt(offset - 1)) ? (text = selection.getBookmark(), 
                type.collapse(!0), type = expandRng(type, get(name)), type = rangeUtils.split(type), 
                apply(name, vars, type), selection.moveToBookmark(text)) : (caretContainer && textNode.nodeValue === INVISIBLE_CHAR || (textNode = (caretContainer = createCaretContainer(!0)).firstChild, 
                type.insertNode(caretContainer), offset = 1), apply(name, vars, caretContainer), 
                selection.setCursorLocation(textNode, offset))) : function() {
                    var hasContentAfter, formatNode, i, parents = [], container = (rng = selection.getRng(!0)).startContainer, offset = rng.startOffset;
                    for (3 == (node = container).nodeType && (offset != container.nodeValue.length && (hasContentAfter = !0), 
                    node = node.parentNode); node; ) {
                        if (matchNode(node, name, vars, similar)) {
                            formatNode = node;
                            break;
                        }
                        node.nextSibling && (hasContentAfter = !0), parents.push(node), 
                        node = node.parentNode;
                    }
                    if (formatNode) if (hasContentAfter) offset = selection.getBookmark(), 
                    rng.collapse(!0), rng = expandRng(rng, get(name), !0), rng = rangeUtils.split(rng), 
                    remove(name, vars, rng), selection.moveToBookmark(offset); else {
                        for (node = container = createCaretContainer(), i = parents.length - 1; 0 <= i; i--) node.appendChild(dom.clone(parents[i], !1)), 
                        node = node.firstChild;
                        node.appendChild(dom.doc.createTextNode(INVISIBLE_CHAR));
                        var rng, node = node.firstChild;
                        (rng = dom.getParent(formatNode, isTextBlock)) && dom.isEmpty(rng) ? formatNode.parentNode.replaceChild(container, formatNode) : dom.insertAfter(container, formatNode), 
                        selection.setCursorLocation(node, 1), dom.isEmpty(formatNode) && dom.remove(formatNode);
                    }
                }();
            }
            function moveStart(rng) {
                var isAtEndOfText, walker, node, nodes, container = rng.startContainer, offset = rng.startOffset;
                if ((rng.startContainer != rng.endContainer || !function(node) {
                    return node && /^(IMG)$/.test(node.nodeName);
                }(rng.startContainer.childNodes[rng.startOffset])) && (3 == container.nodeType && offset >= container.nodeValue.length && (offset = nodeIndex(container), 
                container = container.parentNode, isAtEndOfText = !0), 1 == container.nodeType)) for (container = (nodes = container.childNodes)[Math.min(offset, nodes.length - 1)], 
                walker = new TreeWalker(container, dom.getParent(container, dom.isBlock)), 
                (offset > nodes.length - 1 || isAtEndOfText) && walker.next(), node = walker.current(); node; node = walker.next()) if (3 == node.nodeType && !isWhiteSpaceNode(node)) return rng.setStart(node, 0), 
                selection.setRng(rng);
            }
            ed.addShortcut("access+7", "", [ "FormatBlock", !1, "p" ]), ed.addShortcut("access+8", "", [ "FormatBlock", !1, "div" ]), 
            ed.addShortcut("access+9", "", [ "FormatBlock", !1, "address" ]);
        };
    }(tinymce), tinymce.onAddEditor.add(function(tinymce, ed) {
        var filters, fontSizes, dom, settings = ed.settings;
        function replaceWithSpan(node, styles) {
            tinymce.each(styles, function(value, name) {
                value && dom.setStyle(node, name, value);
            }), dom.rename(node, "span");
        }
        function convert(editor, params) {
            dom = editor.dom, settings.convert_fonts_to_spans && tinymce.each(dom.select("font,u,strike", params.node), function(node) {
                filters[node.nodeName.toLowerCase()](ed.dom, node);
            });
        }
        settings.inline_styles && (fontSizes = tinymce.explode(settings.font_size_legacy_values), 
        filters = {
            font: function(dom, node) {
                replaceWithSpan(node, {
                    backgroundColor: node.style.backgroundColor,
                    color: node.color,
                    fontFamily: node.face,
                    fontSize: fontSizes[parseInt(node.size, 10) - 1]
                });
            },
            u: function(dom, node) {
                replaceWithSpan(node, {
                    textDecoration: "underline"
                });
            },
            strike: function(dom, node) {
                replaceWithSpan(node, {
                    textDecoration: "line-through"
                });
            }
        }, ed.onPreProcess.add(convert), ed.onSetContent.add(convert), ed.onInit.add(function() {
            ed.selection.onSetContent.add(convert);
        }));
    }), function(tinymce) {
        var TreeWalker = tinymce.dom.TreeWalker, RangeUtils = tinymce.dom.RangeUtils, NodeType = tinymce.dom.NodeType, CaretContainer = tinymce.caret.CaretContainer;
        tinymce.EnterKey = function(editor) {
            var dom = editor.dom, selection = editor.selection, settings = editor.settings, undoManager = editor.undoManager, schema = editor.schema, nonEmptyElementsMap = schema.getNonEmptyElements(), moveCaretBeforeOnEnterElementsMap = schema.getMoveCaretBeforeOnEnterElements();
            function handleEnterKey(evt) {
                var tmpRng, editableRoot, container, offset, parentBlock, newBlock, containerBlock, parentBlockName, containerBlockName, newBlockName, isAfterLastNodeInContainer, containerBlockParentName, shiftKey, rng = selection.getRng(!0);
                function canSplitBlock(node) {
                    return node && dom.isBlock(node) && !/^(TD|TH|CAPTION|FORM)$/.test(node.nodeName) && !/^(fixed|absolute)/i.test(node.style.position) && "true" !== dom.getContentEditable(node) && !node.hasAttribute("data-mce-type");
                }
                function renderBlockOnIE(block) {
                    var oldRng;
                    dom.isBlock(block) && (oldRng = selection.getRng(), block.appendChild(dom.create("span", null, "\xa0")), 
                    selection.select(block), block.lastChild.outerHTML = "", selection.setRng(oldRng));
                }
                function moveToCaretPosition(root) {
                    var walker, node, rng, firstChild, lastNode = root;
                    if (root) {
                        if (/^(LI|DT|DD)$/.test(root.nodeName) && (firstChild = function(node) {
                            for (;node; ) {
                                if (1 == node.nodeType || 3 == node.nodeType && node.data && /[\r\n\s]/.test(node.data)) return node;
                                node = node.nextSibling;
                            }
                        }(root.firstChild)) && /^(UL|OL|DL)$/.test(firstChild.nodeName) && root.insertBefore(dom.doc.createTextNode("\xa0"), root.firstChild), 
                        rng = dom.createRng(), root.normalize(), root.hasChildNodes()) {
                            for (walker = new TreeWalker(root, root); node = walker.current(); ) {
                                if (3 == node.nodeType) {
                                    rng.setStart(node, 0), rng.setEnd(node, 0);
                                    break;
                                }
                                if (moveCaretBeforeOnEnterElementsMap[node.nodeName.toLowerCase()]) {
                                    rng.setStartBefore(node), rng.setEndBefore(node);
                                    break;
                                }
                                lastNode = node, node = walker.next();
                            }
                            node || (rng.setStart(lastNode, 0), rng.setEnd(lastNode, 0));
                        } else "BR" == root.nodeName ? root.nextSibling && dom.isBlock(root.nextSibling) ? (rng.setStartBefore(root), 
                        rng.setEndBefore(root)) : (rng.setStartAfter(root), rng.setEndAfter(root)) : (rng.setStart(root, 0), 
                        rng.setEnd(root, 0));
                        selection.setRng(rng), dom.remove(void 0), selection.scrollIntoView(root);
                    }
                }
                function setForcedBlockAttrs(node) {
                    var forcedRootBlockName = settings.forced_root_block;
                    forcedRootBlockName && forcedRootBlockName.toLowerCase() === node.tagName.toLowerCase() && dom.setAttribs(node, settings.forced_root_block_attrs);
                }
                function emptyBlock(elm) {
                    elm.innerHTML = '<br data-mce-bogus="1">';
                }
                function createNewBlock(name) {
                    var block, clonedNode, caretNode, node = container, textInlineElements = schema.getTextInlineElements();
                    if (name || "TABLE" == parentBlockName ? setForcedBlockAttrs(block = dom.create(name || newBlockName)) : block = settings.enterkey_keep_attributes ? parentBlock.cloneNode(!1) : dom.create(parentBlock.nodeName), 
                    caretNode = block, !0 === settings.enterkey_keep_styles) for (;textInlineElements[node.nodeName] && "_mce_caret" != node.id && (clonedNode = node.cloneNode(!1), 
                    dom.setAttrib(clonedNode, "id", ""), block.hasChildNodes() ? clonedNode.appendChild(block.firstChild) : caretNode = clonedNode, 
                    block.appendChild(clonedNode)), (node = node.parentNode) && node != editableRoot; ); else dom.setAttrib(block, "style", null), 
                    dom.setAttrib(block, "class", null);
                    return caretNode.innerHTML = '<br data-mce-bogus="1">', block;
                }
                function isCaretAtStartOrEndOfBlock(start) {
                    var walker, node, name;
                    if (3 != container.nodeType || !(start ? 0 < offset : offset < container.nodeValue.length)) {
                        if ((container.parentNode != parentBlock || !isAfterLastNodeInContainer || start) && (!start || 1 != container.nodeType || container != parentBlock.firstChild)) {
                            if ("TABLE" === container.nodeName || container.previousSibling && "TABLE" == container.previousSibling.nodeName) return isAfterLastNodeInContainer && !start || !isAfterLastNodeInContainer && start;
                            if (NodeType.isContentEditableFalse(container) || container.previousSibling && NodeType.isContentEditableFalse(container.previousSibling)) return isAfterLastNodeInContainer && !start || !isAfterLastNodeInContainer && start;
                            for (walker = new TreeWalker(container, parentBlock), 
                            3 == container.nodeType && (start && 0 === offset ? walker.prev() : start || offset != container.nodeValue.length || walker.next()); node = walker.current(); ) {
                                if (1 === node.nodeType) {
                                    if (!node.getAttribute("data-mce-bogus") && (name = node.nodeName.toLowerCase(), 
                                    nonEmptyElementsMap[name]) && "br" !== name) return;
                                } else if (3 === node.nodeType && !/^[ \t\r\n]*$/.test(node.nodeValue)) return;
                                start ? walker.prev() : walker.next();
                            }
                        }
                        return 1;
                    }
                }
                function insertBr() {
                    editor.execCommand("InsertLineBreak", !1, evt);
                }
                function insertNewBlockAfter() {
                    newBlock = /^(H[1-6]|PRE|FIGURE)$/.test(parentBlockName) && "HGROUP" != containerBlockName ? createNewBlock(newBlockName) : createNewBlock(), 
                    settings.end_container_on_empty_block && canSplitBlock(containerBlock) && dom.isEmpty(parentBlock) ? newBlock = dom.split(containerBlock, parentBlock) : dom.insertAfter(newBlock, parentBlock), 
                    moveToCaretPosition(newBlock);
                }
                if (rng = selection.getRng(!0), !evt.isDefaultPrevented()) if (rng.collapsed) {
                    if (new RangeUtils(dom).normalize(rng), container = rng.startContainer, 
                    offset = rng.startOffset, newBlockName = settings.forced_root_block || "p", 
                    newBlockName = (newBlockName = !1 === settings.force_block_newlines ? "" : newBlockName) ? newBlockName.toUpperCase() : "", 
                    shiftKey = evt.shiftKey, 1 == container.nodeType && container.hasChildNodes() && (isAfterLastNodeInContainer = offset > container.childNodes.length - 1, 
                    container = container.childNodes[Math.min(offset, container.childNodes.length - 1)] || container, 
                    offset = isAfterLastNodeInContainer && 3 == container.nodeType ? container.nodeValue.length : 0), 
                    editableRoot = function(node) {
                        for (var ce, root = dom.getRoot(), parent = node, editableRoot = null; parent && parent !== root && "false" !== (ce = dom.getContentEditable(parent)) && !1 !== ce; ) "true" !== ce && !0 !== ce || (editableRoot = parent), 
                        parent = parent.parentNode;
                        return parent && parent !== root && editableRoot || root;
                    }(container)) {
                        if (undoManager.beforeChange(), (newBlockName && !shiftKey || !newBlockName && shiftKey) && (container = function(container, offset) {
                            var newBlock, startNode, node, next, rootBlockName, blockName = newBlockName || "P", parentBlock = dom.getParent(container, dom.isBlock);
                            if (!parentBlock || !canSplitBlock(parentBlock)) {
                                if (rootBlockName = ((parentBlock = parentBlock || editableRoot) == editableRoot || function(node) {
                                    return node && /^(TD|TH|CAPTION)$/.test(node.nodeName);
                                }(parentBlock) ? parentBlock : parentBlock.parentNode).nodeName.toLowerCase(), 
                                !parentBlock.hasChildNodes()) return setForcedBlockAttrs(newBlock = dom.create(blockName)), 
                                parentBlock.appendChild(newBlock), rng.setStart(newBlock, 0), 
                                rng.setEnd(newBlock, 0), newBlock;
                                for (node = container; node && node.parentNode != parentBlock; ) node = node.parentNode;
                                for (;node && !dom.isBlock(node); ) node = (startNode = node).previousSibling;
                                if (startNode && schema.isValidChild(rootBlockName, blockName.toLowerCase())) {
                                    for (setForcedBlockAttrs(newBlock = dom.create(blockName)), 
                                    startNode.parentNode.insertBefore(newBlock, startNode), 
                                    node = startNode; node && !dom.isBlock(node); ) next = node.nextSibling, 
                                    newBlock.appendChild(node), node = next;
                                    rng.setStart(container, offset), rng.setEnd(container, offset);
                                }
                            }
                            return container;
                        }(container, offset)), parentBlock = dom.getParent(container, dom.isBlock), 
                        containerBlock = parentBlock ? dom.getParent(parentBlock.parentNode, dom.isBlock) : null, 
                        parentBlockName = parentBlock ? parentBlock.nodeName.toUpperCase() : "", 
                        "LI" != (containerBlockName = containerBlock ? containerBlock.nodeName.toUpperCase() : "") || evt.ctrlKey || (parentBlock = containerBlock, 
                        parentBlockName = containerBlockName), /^(LI|DT|DD)$/.test(parentBlockName)) {
                            if (!newBlockName && shiftKey) return void insertBr();
                            if (dom.isEmpty(parentBlock)) return void (containerBlock != editor.getBody() && (containerBlockParentName = containerBlock.parentNode.nodeName, 
                            /^(OL|UL|LI)$/.test(containerBlockParentName) && (newBlockName = "LI"), 
                            newBlock = newBlockName ? createNewBlock(newBlockName) : dom.create("BR"), 
                            isFirstOrLastLi(!0) && isFirstOrLastLi() ? "LI" == containerBlockParentName ? dom.insertAfter(newBlock, getContainerBlock()) : dom.replace(newBlock, containerBlock) : isFirstOrLastLi(!0) ? "LI" == containerBlockParentName ? (dom.insertAfter(newBlock, getContainerBlock()), 
                            newBlock.appendChild(dom.doc.createTextNode(" ")), newBlock.appendChild(containerBlock)) : containerBlock.parentNode.insertBefore(newBlock, containerBlock) : isFirstOrLastLi() ? (dom.insertAfter(newBlock, getContainerBlock()), 
                            renderBlockOnIE(newBlock)) : (containerBlock = getContainerBlock(), 
                            (tmpRng = rng.cloneRange()).setStartAfter(parentBlock), 
                            tmpRng.setEndAfter(containerBlock), fragment = tmpRng.extractContents(), 
                            "LI" == newBlockName && "LI" == fragment.firstChild.nodeName ? (newBlock = fragment.firstChild, 
                            dom.insertAfter(fragment, containerBlock)) : (dom.insertAfter(fragment, containerBlock), 
                            dom.insertAfter(newBlock, containerBlock))), dom.remove(parentBlock), 
                            moveToCaretPosition(newBlock), undoManager.add()));
                        }
                        if ("PRE" == parentBlockName && !1 !== settings.br_in_pre) {
                            if (!shiftKey) return void insertBr();
                        } else if (!newBlockName && !shiftKey && "LI" != parentBlockName || newBlockName && shiftKey) return void insertBr();
                        if (!newBlockName || parentBlock !== editor.getBody()) {
                            if (newBlockName = newBlockName || "P", CaretContainer.isCaretContainerBlock(parentBlock)) newBlock = CaretContainer.showCaretContainerBlock(parentBlock), 
                            dom.isEmpty(parentBlock) && emptyBlock(parentBlock), 
                            moveToCaretPosition(newBlock); else if (isCaretAtStartOrEndOfBlock()) insertNewBlockAfter(); else if (isCaretAtStartOrEndOfBlock(!0)) renderBlockOnIE(newBlock = parentBlock.parentNode.insertBefore(createNewBlock(), parentBlock)), 
                            moveToCaretPosition(newBlock); else {
                                (tmpRng = rng.cloneRange()).setEndAfter(parentBlock);
                                for (var fragment, node = fragment = tmpRng.extractContents(); 3 === node.nodeType && (node.nodeValue = node.nodeValue.replace(/^[\r\n]+/, "")), 
                                node = node.firstChild; );
                                newBlock = fragment.firstChild, dom.insertAfter(fragment, parentBlock), 
                                function() {
                                    var i, node = newBlock, firstChilds = [];
                                    if (node) {
                                        for (;node = node.firstChild; ) {
                                            if (dom.isBlock(node)) return;
                                            1 != node.nodeType || nonEmptyElementsMap[node.nodeName.toLowerCase()] || firstChilds.push(node);
                                        }
                                        for (i = firstChilds.length; i--; ) (!(node = firstChilds[i]).hasChildNodes() || node.firstChild == node.lastChild && "" === node.firstChild.nodeValue || "A" == node.nodeName && " " === (node.innerText || node.textContent)) && dom.remove(node);
                                    }
                                }(), (containerBlockParentName = parentBlock).normalize(), 
                                (shiftKey = containerBlockParentName.lastChild) && !/^(left|right)$/gi.test(dom.getStyle(shiftKey, "float", !0)) || dom.add(containerBlockParentName, "br"), 
                                dom.isEmpty(parentBlock) && emptyBlock(parentBlock), 
                                !newBlock || dom.isEmpty(newBlock) ? (dom.remove(newBlock), 
                                insertNewBlockAfter()) : moveToCaretPosition(newBlock), 
                                newBlock.normalize();
                            }
                            dom.setAttrib(newBlock, "id", ""), editor.onNewBlock.dispatch(editor, newBlock), 
                            undoManager.typing = !1, undoManager.add();
                        }
                    }
                } else editor.execCommand("Delete");
                function isFirstOrLastLi(first) {
                    for (var node = containerBlock[first ? "firstChild" : "lastChild"]; node && 1 != node.nodeType; ) node = node[first ? "nextSibling" : "previousSibling"];
                    return node === parentBlock;
                }
                function getContainerBlock() {
                    var containerBlockParent = containerBlock.parentNode;
                    return /^(LI|DT|DD)$/.test(containerBlockParent.nodeName) ? containerBlockParent : containerBlock;
                }
            }
            return editor.onNewBlock = new tinymce.util.Dispatcher(), editor.onKeyDown.add(function(ed, evt) {
                13 == evt.keyCode && (handleEnterKey(evt), evt.preventDefault());
            }), {
                handleEnterKey: handleEnterKey
            };
        };
    }(tinymce), function(tinymce) {
        function bindFakeDragEvents(editor) {
            var state = {}, pageDom = tinymce.DOM, rootDocument = document, dragStartHandler = function(state, editor) {
                return function(e) {
                    var ceElm, docElm, rootElm, elm;
                    0 === e.button && (ceElm = Arr.find(editor.dom.getParents(e.target), Fun.or(isContentEditableFalse, isContentEditableTrue)), 
                    rootElm = editor.getBody(), isContentEditableFalse(elm = ceElm)) && elm !== rootElm && (elm = editor.dom.getPos(ceElm), 
                    rootElm = editor.getBody(), docElm = editor.getDoc().documentElement, 
                    state.element = ceElm, state.screenX = e.screenX, state.screenY = e.screenY, 
                    state.maxX = (editor.inline ? rootElm.scrollWidth : docElm.offsetWidth) - 2, 
                    state.maxY = (editor.inline ? rootElm.scrollHeight : docElm.offsetHeight) - 2, 
                    state.relX = e.pageX - elm.x, state.relY = e.pageY - elm.y, 
                    state.width = ceElm.offsetWidth, state.height = ceElm.offsetHeight, 
                    state.ghost = function(editor, elm, width, height) {
                        var elm = elm.cloneNode(!0), ghostElm = (editor.dom.setStyles(elm, {
                            width: width,
                            height: height
                        }), editor.dom.setAttrib(elm, "data-mce-selected", null), 
                        editor.dom.create("div", {
                            class: "mce-drag-container",
                            "data-mce-bogus": "all",
                            unselectable: "on",
                            contenteditable: "false"
                        }));
                        return editor.dom.setStyles(ghostElm, {
                            position: "absolute",
                            opacity: .5,
                            overflow: "hidden",
                            border: 0,
                            padding: 0,
                            margin: 0,
                            width: width,
                            height: height
                        }), editor.dom.setStyles(elm, {
                            margin: 0,
                            boxSizing: "border-box"
                        }), ghostElm.appendChild(elm), ghostElm;
                    }(editor, ceElm, state.width, state.height));
                };
            }(state, editor), dragHandler = function(state, editor) {
                var throttledPlaceCaretAt = Delay.throttle(function(clientX, clientY) {
                    editor._selectionOverrides.hideFakeCaret(), editor.selection.placeCaretAt(clientX, clientY);
                }, 0);
                return function(e) {
                    var ghostElm, bodyElm, movement = Math.max(Math.abs(e.screenX - state.screenX), Math.abs(e.screenY - state.screenY));
                    if (state.element && !state.dragging && 10 < movement) {
                        if (editor.dom.fire(editor.getBody(), "dragstart", {
                            target: state.element
                        }).preventDefault(e)) return;
                        state.dragging = !0, editor.focus();
                    }
                    state.dragging && (movement = function(state, position) {
                        return {
                            pageX: position.pageX - state.relX,
                            pageY: position.pageY + 5
                        };
                    }(state, MousePosition.calc(editor, e)), ghostElm = state.ghost, 
                    bodyElm = editor.getBody(), ghostElm.parentNode !== bodyElm && bodyElm.appendChild(ghostElm), 
                    function(ghostElm, position, width, height, maxX, maxY) {
                        var overflowX = 0, overflowY = 0;
                        ghostElm.style.left = position.pageX + "px", ghostElm.style.top = position.pageY + "px", 
                        position.pageX + width > maxX && (overflowX = position.pageX + width - maxX), 
                        position.pageY + height > maxY && (overflowY = position.pageY + height - maxY), 
                        ghostElm.style.width = width - overflowX + "px", ghostElm.style.height = height - overflowY + "px";
                    }(state.ghost, movement, state.width, state.height, state.maxX, state.maxY), 
                    throttledPlaceCaretAt(e.clientX, e.clientY));
                };
            }(state, editor), dropHandler = function(state, editor) {
                return function(e) {
                    var evt, selection;
                    state.dragging && function(editor, targetElement, dragElement) {
                        return targetElement !== dragElement && !editor.dom.isChildOf(targetElement, dragElement) && !isContentEditableFalse(targetElement);
                    }(editor, 3 === (selection = (selection = editor.selection).getSel().getRangeAt(0).startContainer).nodeType ? selection.parentNode : selection, state.element) && ((selection = (selection = state.element).cloneNode(!0)).removeAttribute("data-mce-selected"), 
                    selection = selection, (evt = editor.dom.fire(editor.getBody(), "drop", {
                        targetClone: selection,
                        clientX: e.clientX,
                        clientY: e.clientY
                    })).isDefaultPrevented(e) || (selection = evt.args.targetClone, 
                    editor.undoManager.add(), removeElement(state.element), editor.insertContent(editor.dom.getOuterHTML(selection)), 
                    editor._selectionOverrides.hideFakeCaret())), removeDragState(state);
                };
            }(state, editor), dragEndHandler = function(state, editor) {
                return function() {
                    removeDragState(state), state.dragging && editor.dom.fire(editor.getBody(), "dragend");
                };
            }(state, editor);
            editor.dom.bind(editor.getBody(), "mousedown", dragStartHandler), editor.dom.bind(editor.getBody(), "mousemove", dragHandler), 
            editor.dom.bind(editor.getBody(), "mouseup", dropHandler), pageDom.bind(rootDocument, "mousemove", dragHandler), 
            pageDom.bind(rootDocument, "mouseup", dragEndHandler), editor.dom.bind(editor.getBody(), "remove", function() {
                pageDom.unbind(rootDocument, "mousemove", dragHandler), pageDom.unbind(rootDocument, "mouseup", dragEndHandler);
            });
        }
        function removeDragState(state) {
            state.dragging = !1, state.element = null, removeElement(state.ghost);
        }
        var NodeType = tinymce.dom.NodeType, Fun = tinymce.util.Fun, Arr = tinymce.util.Arr, Delay = tinymce.util.Delay, MousePosition = tinymce.dom.MousePosition, isContentEditableFalse = NodeType.isContentEditableFalse, isContentEditableTrue = NodeType.isContentEditableTrue, removeElement = function(elm) {
            elm && elm.parentNode && elm.parentNode.removeChild(elm);
        };
        tinymce.DragDropOverrides = {
            init: function(editor) {
                bindFakeDragEvents(editor), function(editor) {
                    editor.dom.bind(editor.getBody(), "drop", function(e) {
                        var realTarget = void 0 !== e.clientX ? editor.getDoc().elementFromPoint(e.clientX, e.clientY) : null;
                        (isContentEditableFalse(realTarget) || isContentEditableFalse(editor.dom.getContentEditableParent(realTarget))) && e.preventDefault();
                    });
                }(editor);
            }
        };
    }(tinymce), function(tinymce) {
        var CaretWalker = tinymce.caret.CaretWalker, CaretPosition = tinymce.caret.CaretPosition, CaretContainer = tinymce.caret.CaretContainer, CaretUtils = tinymce.caret.CaretUtils, CaretContainerRemove = tinymce.caret.CaretContainerRemove, FakeCaret = tinymce.caret.FakeCaret, LineWalker = tinymce.caret.LineWalker, LineUtils = tinymce.caret.LineUtils, ClientRect = tinymce.geom.ClientRect, NodeType = tinymce.dom.NodeType, RangeUtils = tinymce.dom.RangeUtils, VK = tinymce.VK, Fun = tinymce.util.Fun, Arr = tinymce.util.Arr, Dispatcher = tinymce.util.Dispatcher, DragDropOverrides = tinymce.DragDropOverrides, curry = Fun.curry, isContentEditableTrue = NodeType.isContentEditableTrue, isContentEditableFalse = NodeType.isContentEditableFalse, isElement = NodeType.isElement, isAfterContentEditableFalse = CaretUtils.isAfterContentEditableFalse, isBeforeContentEditableFalse = CaretUtils.isBeforeContentEditableFalse, getSelectedNode = RangeUtils.getSelectedNode;
        function getVisualCaretPosition(walkFn, caretPosition) {
            for (;caretPosition = walkFn(caretPosition); ) if (caretPosition.isVisible()) return caretPosition;
            return caretPosition;
        }
        function setEditorTimeout(editor, callback, time) {
            setTimeout(function() {
                editor.removed || callback();
            }, time);
        }
        tinymce.SelectionOverrides = function(editor) {
            editor.onShowCaret = new Dispatcher(), editor.onBeforeObjectSelected = new Dispatcher(), 
            editor.onObjectSelected = new Dispatcher(), editor.onContentEditableSelect = new Dispatcher();
            var selectedContentEditableNode, right, left, deleteForward, backspace, up, down, rootNode = editor.getBody(), caretWalker = new CaretWalker(rootNode), getNextVisualCaretPosition = curry(getVisualCaretPosition, caretWalker.next), getPrevVisualCaretPosition = curry(getVisualCaretPosition, caretWalker.prev), fakeCaret = new FakeCaret(editor.getBody(), isBlock), realSelectionId = "sel-" + editor.dom.uniqueId();
            function getRealSelectionElement() {
                var container = editor.dom.get(realSelectionId);
                return container && container.getElementsByTagName("*")[0];
            }
            function isBlock(node) {
                return editor.dom.isBlock(node);
            }
            function setRange(range) {
                range && editor.selection.setRng(range);
            }
            function getRange() {
                return editor.selection.getRng();
            }
            function scrollIntoView(node, alignToTop) {
                editor.selection.scrollIntoView(node, alignToTop);
            }
            function showCaret(direction, node, before) {
                var evt = {
                    target: node,
                    direction: direction,
                    before: before
                };
                return editor.onShowCaret.dispatch(editor, evt), evt.target ? (scrollIntoView(node, -1 === direction), 
                fakeCaret.show(before, node)) : null;
            }
            function selectNode(node) {
                var evt = {
                    target: node
                };
                return editor.onBeforeObjectSelected.dispatch(editor, evt), evt.target ? function(node) {
                    var rng = node.ownerDocument.createRange();
                    return rng.selectNode(node), rng;
                }(node) : null;
            }
            function getNormalizedRangeEndPoint(direction, range) {
                return range = CaretUtils.normalizeRange(direction, rootNode, range), 
                -1 == direction ? CaretPosition.fromRangeStart(range) : CaretPosition.fromRangeEnd(range);
            }
            function exitPreBlock(direction, range) {
                var pre;
                range.collapsed && editor.settings.forced_root_block && (pre = editor.dom.getParent(range.startContainer, "PRE")) && !(1 == direction ? getNextVisualCaretPosition : getPrevVisualCaretPosition)(CaretPosition.fromRangeStart(range)) && ((range = editor.dom.create(editor.settings.forced_root_block)).innerHTML = '<br data-mce-bogus="1">', 
                1 == direction ? editor.dom.insertAfter(range, pre) : editor.dom.insertBefore(range, pre), 
                editor.selection.select(range, !0), editor.selection.collapse());
            }
            function moveH(direction, getNextPosFn, isBeforeContentEditableFalseFn, range) {
                return (getNextPosFn = function(direction, getNextPosFn, isBeforeContentEditableFalseFn, range) {
                    var caretPosition, node, toCaretPosition;
                    return !range.collapsed && (node = getSelectedNode(range), isContentEditableFalse(node)) ? showCaret(direction, node, -1 == direction) : (node = function(range) {
                        return CaretContainer.isCaretContainerBlock(range.startContainer);
                    }(range), isBeforeContentEditableFalseFn(caretPosition = getNormalizedRangeEndPoint(direction, range)) ? selectNode(caretPosition.getNode(-1 == direction)) : (caretPosition = getNextPosFn(caretPosition)) ? isBeforeContentEditableFalseFn(caretPosition) ? showCaret(direction, caretPosition.getNode(-1 == direction), 1 == direction) : isBeforeContentEditableFalseFn(isBeforeContentEditableFalseFn = getNextPosFn(caretPosition)) && (getNextPosFn = caretPosition, 
                    toCaretPosition = isBeforeContentEditableFalseFn, !(toCaretPosition = CaretUtils.isInSameBlock(getNextPosFn, toCaretPosition)) && NodeType.isBr(getNextPosFn.getNode()) || toCaretPosition) ? showCaret(direction, isBeforeContentEditableFalseFn.getNode(-1 == direction), 1 == direction) : node ? renderRangeCaret(caretPosition.toRange()) : null : node ? range : null);
                }(direction, getNextPosFn, isBeforeContentEditableFalseFn, range)) || (exitPreBlock(direction, range), 
                null);
            }
            function moveV(direction, walkerFn, range) {
                return (walkerFn = function(direction, walkerFn, range) {
                    var dist2, contentEditableFalseNode = getSelectedNode(range), range = getNormalizedRangeEndPoint(direction, range), walkerFn = walkerFn(rootNode, LineWalker.isAboveLine(1), range), walkerFn = Arr.filter(walkerFn, LineWalker.isLine(1)), caretClientRect = Arr.last(range.getClientRects());
                    return isBeforeContentEditableFalse(range) && (contentEditableFalseNode = range.getNode()), 
                    isAfterContentEditableFalse(range) && (contentEditableFalseNode = range.getNode(!0)), 
                    caretClientRect ? (range = caretClientRect.left, (caretClientRect = LineUtils.findClosestClientRect(walkerFn, range)) && isContentEditableFalse(caretClientRect.node) ? (walkerFn = Math.abs(range - caretClientRect.left), 
                    dist2 = Math.abs(range - caretClientRect.right), showCaret(direction, caretClientRect.node, walkerFn < dist2)) : contentEditableFalseNode && (walkerFn = LineWalker.positionsUntil(direction, rootNode, LineWalker.isAboveLine(1), contentEditableFalseNode), 
                    caretClientRect = (caretClientRect = LineUtils.findClosestClientRect(Arr.filter(walkerFn, LineWalker.isLine(1)), range)) || Arr.last(Arr.filter(walkerFn, LineWalker.isLine(0)))) ? renderRangeCaret(caretClientRect.position.toRange()) : void 0) : null;
                }(direction, walkerFn, range)) || (exitPreBlock(direction, range), 
                null);
            }
            function showBlockCaretContainer(blockCaretContainer) {
                blockCaretContainer.hasAttribute("data-mce-caret") && (CaretContainer.showCaretContainerBlock(blockCaretContainer), 
                setRange(getRange()), scrollIntoView(blockCaretContainer[0]));
            }
            function renderCaretAtRange(range) {
                return range = CaretUtils.normalizeRange(1, rootNode, range), range = CaretPosition.fromRangeStart(range), 
                isContentEditableFalse(range.getNode()) ? showCaret(1, range.getNode(), !range.isAtEnd()) : isContentEditableFalse(range.getNode(!0)) ? showCaret(1, range.getNode(!0), !1) : (range = editor.dom.getParent(range.getNode(), Fun.or(isContentEditableFalse, isContentEditableTrue)), 
                isContentEditableFalse(range) ? showCaret(1, range, !1) : null);
            }
            function renderRangeCaret(range) {
                return range && range.collapsed && renderCaretAtRange(range) || range;
            }
            function deleteContentEditableNode(node) {
                var nextCaretPosition, prevCaretPosition, prevCeFalseElm, nextElement;
                return isContentEditableFalse(node) ? (isContentEditableFalse(node.previousSibling) && (prevCeFalseElm = node.previousSibling), 
                (nextCaretPosition = (prevCaretPosition = getPrevVisualCaretPosition(CaretPosition.before(node))) ? nextCaretPosition : getNextVisualCaretPosition(CaretPosition.after(node))) && isElement(nextCaretPosition.getNode()) && (nextElement = nextCaretPosition.getNode()), 
                CaretContainerRemove.remove(node.previousSibling), CaretContainerRemove.remove(node.nextSibling), 
                editor.dom.remove(node), editor.dom.isEmpty(editor.getBody()) ? (editor.setContent(""), 
                void editor.focus()) : prevCeFalseElm ? CaretPosition.after(prevCeFalseElm).toRange() : nextElement ? CaretPosition.before(nextElement).toRange() : prevCaretPosition ? prevCaretPosition.toRange() : nextCaretPosition ? nextCaretPosition.toRange() : null) : null;
            }
            function isTextBlock(node) {
                var textBlocks = editor.schema.getTextBlockElements();
                return node.nodeName in textBlocks;
            }
            function isEmpty(elm) {
                return editor.dom.isEmpty(elm);
            }
            function mergeTextBlocks(direction, fromCaretPosition, toCaretPosition) {
                var node, ceTarget, dom = editor.dom, fromBlock = dom.getParent(fromCaretPosition.getNode(), dom.isBlock), toBlock = dom.getParent(toCaretPosition.getNode(), dom.isBlock);
                if (-1 === direction) {
                    if (ceTarget = toCaretPosition.getNode(!0), isAfterContentEditableFalse(toCaretPosition) && isBlock(ceTarget)) return isTextBlock(fromBlock) ? (isEmpty(fromBlock) && dom.remove(fromBlock), 
                    CaretPosition.after(ceTarget).toRange()) : deleteContentEditableNode(toCaretPosition.getNode(!0));
                } else if (ceTarget = fromCaretPosition.getNode(), isBeforeContentEditableFalse(fromCaretPosition) && isBlock(ceTarget)) return isTextBlock(toBlock) ? (isEmpty(toBlock) && dom.remove(toBlock), 
                CaretPosition.before(ceTarget).toRange()) : deleteContentEditableNode(fromCaretPosition.getNode());
                if (fromBlock === toBlock || !isTextBlock(fromBlock) || !isTextBlock(toBlock)) return null;
                for (;node = fromBlock.firstChild; ) toBlock.appendChild(node);
                return editor.dom.remove(fromBlock), toCaretPosition.toRange();
            }
            function backspaceDelete(direction, beforeFn, afterFn, range) {
                var newCaretPosition;
                return range.collapsed ? afterFn(afterFn = getNormalizedRangeEndPoint(direction, range)) && CaretContainer.isCaretContainerBlock(range.startContainer) ? (newCaretPosition = -1 == direction ? caretWalker.prev(afterFn) : caretWalker.next(afterFn)) ? renderRangeCaret(newCaretPosition.toRange()) : range : beforeFn(afterFn) ? renderRangeCaret(deleteContentEditableNode(afterFn.getNode(-1 == direction))) : beforeFn(newCaretPosition = -1 == direction ? caretWalker.prev(afterFn) : caretWalker.next(afterFn)) ? -1 === direction ? mergeTextBlocks(direction, afterFn, newCaretPosition) : mergeTextBlocks(direction, newCaretPosition, afterFn) : void 0 : (beforeFn = getSelectedNode(range), 
                isContentEditableFalse(beforeFn) ? renderRangeCaret(deleteContentEditableNode(beforeFn)) : null);
            }
            function isWithinCaretContainer(node) {
                return CaretContainer.isCaretContainer(node) || CaretContainer.startsWithCaretContainer(node) || CaretContainer.endsWithCaretContainer(node);
            }
            function isRangeInCaretContainer(rng) {
                return isWithinCaretContainer(rng.startContainer) || isWithinCaretContainer(rng.endContainer);
            }
            function setContentEditableSelection(range) {
                var node, startOffset, endOffset, caretPosition, dom = editor.dom;
                if (!range) return null;
                if (range.collapsed) {
                    if (!isRangeInCaretContainer(range)) {
                        if (caretPosition = getNormalizedRangeEndPoint(1, range), 
                        isContentEditableFalse(caretPosition.getNode())) return showCaret(1, caretPosition.getNode(), !caretPosition.isAtEnd());
                        if (isContentEditableFalse(caretPosition.getNode(!0))) return showCaret(1, caretPosition.getNode(!0), !1);
                    }
                    return null;
                }
                return caretPosition = range.startContainer, startOffset = range.startOffset, 
                endOffset = range.endOffset, 3 == caretPosition.nodeType && 0 == startOffset && isContentEditableFalse(caretPosition.parentNode) && (caretPosition = caretPosition.parentNode, 
                startOffset = dom.nodeIndex(caretPosition), caretPosition = caretPosition.parentNode), 
                1 == caretPosition.nodeType && (endOffset == startOffset + 1 && (node = caretPosition.childNodes[startOffset]), 
                isContentEditableFalse(node)) && (endOffset = node.cloneNode(!0), 
                editor.onObjectSelected.dispatch(editor, caretPosition = {
                    node: node,
                    target: endOffset
                }), 0 != !caretPosition.isDefaultPrevented) ? (endOffset = caretPosition.target, 
                (startOffset = dom.get(realSelectionId)) || (startOffset = dom.create("div", {
                    "data-mce-bogus": "all",
                    class: "mce-offscreen-selection",
                    id: realSelectionId
                }), dom.add(editor.getBody(), startOffset)), range = editor.dom.createRng(), 
                startOffset.innerHTML = "", startOffset.appendChild(document.createTextNode("\xa0")), 
                startOffset.appendChild(endOffset), startOffset.appendChild(document.createTextNode("\xa0")), 
                range.setStart(startOffset.firstChild, 1), range.setEnd(startOffset.lastChild, 0), 
                dom.setStyle(startOffset, "top", dom.getPos(node, editor.getBody()).y), 
                startOffset.focus(), (caretPosition = editor.selection.getSel()).removeAllRanges(), 
                caretPosition.addRange(range), dom.setAttrib(dom.select("*[data-mce-selected]"), "data-mce-selected", null), 
                node.setAttribute("data-mce-selected", 1), selectedContentEditableNode = node, 
                hideFakeCaret(), range) : null;
            }
            function removeContentEditableSelection() {
                selectedContentEditableNode && (selectedContentEditableNode.removeAttribute("data-mce-selected"), 
                editor.dom.remove(realSelectionId), selectedContentEditableNode = null);
            }
            function hideFakeCaret() {
                fakeCaret.hide();
            }
            function override(evt, moveFn) {
                !1 === evt.isDefaultPrevented() && (moveFn = moveFn(getRange())) && (evt.preventDefault(), 
                setRange(moveFn));
            }
            function getContentEditableRoot(node) {
                for (var root = editor.getBody(); node && node != root; ) {
                    if (isContentEditableTrue(node) || isContentEditableFalse(node)) return node;
                    node = node.parentNode;
                }
                return null;
            }
            function hasBetterMouseTarget(targetNode, caretNode) {
                targetNode = editor.dom.getParent(targetNode, editor.dom.isBlock), 
                caretNode = editor.dom.getParent(caretNode, editor.dom.isBlock);
                return targetNode && editor.dom.getParent(targetNode, editor.dom.isBlock) !== editor.dom.getParent(caretNode, editor.dom.isBlock) && (targetNode = new CaretWalker(caretNode = targetNode), 
                caretNode.firstChild) && (caretNode = CaretPosition.before(caretNode.firstChild), 
                targetNode = targetNode.next(caretNode)) && !isBeforeContentEditableFalse(targetNode) && !isAfterContentEditableFalse(targetNode);
            }
            function handleBlockContainer(e) {
                var blockCaretContainer = editor.dom.select("*[data-mce-caret]")[0];
                blockCaretContainer && ("compositionstart" == e.type ? (e.preventDefault(), 
                e.stopPropagation(), showBlockCaretContainer(blockCaretContainer)) : CaretContainer.hasContent(blockCaretContainer) && showBlockCaretContainer(blockCaretContainer));
            }
            function handleEmptyBackspaceDelete(e) {
                var prevent, br, ceRoot;
                switch (e.keyCode) {
                  case VK.DELETE:
                  case VK.BACKSPACE:
                    ceRoot = getContentEditableRoot(editor.selection.getNode()), 
                    prevent = void (isContentEditableTrue(ceRoot) && isBlock(ceRoot) && editor.dom.isEmpty(ceRoot) && (br = editor.dom.create("br", {
                        "data-mce-bogus": "1"
                    }), editor.dom.empty(ceRoot), editor.dom.add(ceRoot, br), editor.selection.setRng(CaretPosition.before(br).toRange())));
                }
                prevent && e.preventDefault();
            }
            return right = curry(moveH, 1, getNextVisualCaretPosition, isBeforeContentEditableFalse), 
            left = curry(moveH, -1, getPrevVisualCaretPosition, isAfterContentEditableFalse), 
            deleteForward = curry(backspaceDelete, 1, isBeforeContentEditableFalse, isAfterContentEditableFalse), 
            backspace = curry(backspaceDelete, -1, isAfterContentEditableFalse, isBeforeContentEditableFalse), 
            up = curry(moveV, -1, LineWalker.upUntil), down = curry(moveV, 1, LineWalker.downUntil), 
            editor.onMouseUp.add(function() {
                var range = getRange();
                range.collapsed && setRange(renderCaretAtRange(range));
            }), editor.onClick.add(function(editor, e) {
                var contentEditableRoot = getContentEditableRoot(e.target);
                contentEditableRoot && (isContentEditableFalse(contentEditableRoot) && (e.preventDefault(), 
                editor.focus()), isContentEditableTrue(contentEditableRoot)) && editor.dom.isChildOf(contentEditableRoot, editor.selection.getNode()) && removeContentEditableSelection();
            }), editor.onNewBlock.add(function() {
                removeContentEditableSelection(), hideFakeCaret();
            }), editor.onBlur.add(function() {
                removeContentEditableSelection(), hideFakeCaret();
            }), function(editor) {
                var moved = !1;
                editor.dom.bind(editor.getBody(), "touchstart", function() {
                    moved = !1;
                }), editor.dom.bind(editor.getBody(), "touchmove", function() {
                    moved = !0;
                }), editor.dom.bind(editor.getBody(), "touchend", function(e) {
                    var contentEditableRoot = getContentEditableRoot(e.target);
                    isContentEditableFalse(contentEditableRoot) && !moved && (e.preventDefault(), 
                    setContentEditableSelection(selectNode(contentEditableRoot)), 
                    editor.onContentEditableSelect.dispatch(editor, e));
                });
            }(editor), editor.onMouseDown.add(function(editor, e) {
                var clientX, clientY, contentEditableRoot = getContentEditableRoot(e.target);
                contentEditableRoot ? isContentEditableFalse(contentEditableRoot) ? (e.preventDefault(), 
                setContentEditableSelection(selectNode(contentEditableRoot)), editor.onContentEditableSelect.dispatch(editor, e)) : (clientX = e.clientX, 
                clientY = e.clientY, !(contentEditableRoot = editor.selection.getRng()).collapsed && Arr.reduce(contentEditableRoot.getClientRects(), function(state, rect) {
                    return state || ClientRect.containsXY(rect, clientX, clientY);
                }, !1) || editor.selection.placeCaretAt(e.clientX, e.clientY)) : (removeContentEditableSelection(), 
                hideFakeCaret(), (contentEditableRoot = LineUtils.closestCaret(rootNode, e.clientX, e.clientY)) && !hasBetterMouseTarget(e.target, contentEditableRoot.node) && (e.preventDefault(), 
                editor.getBody().focus(), setRange(showCaret(1, contentEditableRoot.node, contentEditableRoot.before))));
            }), editor.onKeyDown.add(function(editor, e) {
                if (!VK.modifierPressed(e)) switch (e.keyCode) {
                  case VK.RIGHT:
                    override(e, right);
                    break;

                  case VK.DOWN:
                    override(e, down);
                    break;

                  case VK.LEFT:
                    override(e, left);
                    break;

                  case VK.UP:
                    override(e, up);
                    break;

                  case VK.DELETE:
                    override(e, deleteForward);
                    break;

                  case VK.BACKSPACE:
                    override(e, backspace);
                    break;

                  default:
                    isContentEditableFalse(editor.selection.getNode()) && function(e) {
                        return !(112 <= e.keyCode && e.keyCode <= 123);
                    }(e) && e.preventDefault();
                }
            }), editor.onCompositionStart.addToTop(function(editor, e) {
                handleBlockContainer(e), handleEmptyBackspaceDelete(e);
            }), editor.onKeyUp.addToTop(function(editor, e) {
                handleBlockContainer(e), handleEmptyBackspaceDelete(e);
            }), editor.onCut.add(function() {
                var node = editor.selection.getNode();
                isContentEditableFalse(node) && setEditorTimeout(editor, function() {
                    setRange(renderRangeCaret(deleteContentEditableNode(node)));
                });
            }), editor.selection.onGetSelectionRange.add(function(sel, e) {
                var rng = e.range;
                selectedContentEditableNode && (selectedContentEditableNode.parentNode ? ((rng = rng.cloneRange()).selectNode(selectedContentEditableNode), 
                e.range = rng) : selectedContentEditableNode = null);
            }), editor.selection.onSetSelectionRange.add(function(sel, e) {
                var rng = setContentEditableSelection(e.range);
                rng && (e.range = rng);
            }), editor.selection.onAfterSetSelectionRange.add(function(sel, e) {
                isRangeInCaretContainer(e = e.range) || hideFakeCaret(), e = e.startContainer.parentNode, 
                editor.dom.hasClass(e, "mce-offscreen-selection") || removeContentEditableSelection();
            }), editor.dom.bind(editor.getBody(), "focus", function() {
                setEditorTimeout(editor, function() {
                    editor.selection.setRng(renderRangeCaret(editor.selection.getRng()));
                }, 0);
            }), editor.onCopy.add(function(editor, e) {
                var realSelectionElement, clipboardData = e.clipboardData;
                !e.isDefaultPrevented() && e.clipboardData && (realSelectionElement = getRealSelectionElement()) && (e.preventDefault(), 
                clipboardData.clearData(), e = realSelectionElement.outerHTML || "", 
                clipboardData.setData("text/html", e), clipboardData.setData("x-tinymce/html", e), 
                clipboardData.setData("text/plain", realSelectionElement.outerText));
            }), DragDropOverrides.init(editor), {
                showBlockCaretContainer: showBlockCaretContainer,
                hideFakeCaret: hideFakeCaret,
                destroy: function() {
                    fakeCaret.destroy(), selectedContentEditableNode = null;
                }
            };
        };
    }(tinymce), function() {
        var Entities = tinymce.html.Entities, each = tinymce.each, extend = tinymce.extend, DomParser = tinymce.html.DomParser, HtmlSerializer = tinymce.html.Serializer, Dispatcher = tinymce.util.Dispatcher, DOM = tinymce.DOM;
        tinymce.PluginManager.add("core", function(ed, url) {
            ed.onUpdateMedia = new Dispatcher(), ed.onWfEditorSave = new Dispatcher();
            var store, contentLoaded = !1, elm = ed.getElement(), startup_content_html = ed.settings.startup_content_html || "", quoteMap = (ed.onBeforeRenderUI.add(function() {
                if (startup_content_html && elm && !contentLoaded && ("TEXTAREA" === elm.nodeName ? "" == elm.value : "" == elm.innerHTML)) return contentLoaded = !0, 
                (value = Entities.decode(startup_content_html)) && ("TEXTAREA" === elm.nodeName ? elm.value = value : elm.innerHTML = value), 
                !0;
                var value;
            }), {
                en: {
                    '"': "&ldquo;{$selection}&rdquo;",
                    "'": "&lsquo;{$selection}&rsquo;"
                },
                de: {
                    '"': "&bdquo;{$selection}&ldquo;",
                    "'": "&sbquo;{$selection}&rsquo;"
                }
            });
            ed.onKeyUp.add(function(ed, e) {
                var map = quoteMap[ed.settings.language] || quoteMap.en;
                !e.ctrlKey || e.altKey || '"' != e.key && "'" != e.key || (map = map[e.shiftKey ? '"' : "'"], 
                ed.undoManager.add(), ed.execCommand("mceReplaceContent", !1, map));
            }), ed.onExecCommand.add(function(ed, cmd, ui, val, args) {
                "Undo" != cmd && "Redo" != cmd && "mceReApply" != cmd && "mceRepaint" != cmd && (store = {
                    cmd: cmd,
                    ui: ui,
                    value: val,
                    args: args
                });
            }), ed.addShortcut("ctrl+alt+z", "", "mceReApply"), ed.addCommand("mceReApply", function() {
                if (store && store.cmd) return ed.execCommand(store.cmd, store.ui, store.value, store.args);
            }), ed.onPreInit.add(function() {
                var pb;
                ed.onUpdateMedia.add(function(ed, o) {
                    o.before && o.after && (each(ed.dom.select("img,poster"), function(elm) {
                        var after, stamp, src = elm.getAttribute("src");
                        (src = src && -1 !== src.indexOf("?") ? src.substring(0, src.indexOf("?")) : src) == o.before && (after = o.after, 
                        stamp = "?" + new Date().getTime(), -1 !== src.indexOf("?") && -1 === after.indexOf("?") && (after += stamp), 
                        ed.dom.setAttribs(elm, {
                            src: after,
                            "data-mce-src": o.after
                        })), elm.getAttribute("srcset") && function(elm, o) {
                            var srcset = elm.getAttribute("srcset");
                            if (srcset) {
                                for (var sets = srcset.split(","), i = 0; i < sets.length; i++) {
                                    var values = sets[i].trim().split(" ");
                                    o.before == values[0] && (values[0] = o.after), 
                                    sets[i] = values.join(" ");
                                }
                                elm.setAttribute("srcset", sets.join(","));
                            }
                        }(elm, o);
                    }), each(ed.dom.select("a[href]"), function(elm) {
                        ed.dom.getAttrib(elm, "href") == o.before && ed.dom.setAttribs(elm, {
                            href: o.after,
                            "data-mce-href": o.after
                        });
                    }));
                }), ed.onWfEditorSave.add(function(ed, o) {
                    o.content = function(ed, content) {
                        var args, parser, settings;
                        return ed.settings.validate ? (args = {
                            no_events: !0,
                            format: "html",
                            get: !0,
                            load: !0
                        }, extend(settings = {}, ed.settings), args.content = content, 
                        ed.onBeforeGetContent.dispatch(ed, args), settings.forced_root_block = !1, 
                        settings.validate = !0, parser = new DomParser(settings, ed.schema), 
                        settings = new HtmlSerializer(settings, ed.schema), args.content = settings.serialize(parser.parse(args.content), args), 
                        ed.onPostProcess.dispatch(ed, args), args.content) : content;
                    }(ed, o.content);
                }), (pb = DOM.get("sp-inline-popover")) && DOM.isChildOf(ed.getElement(), pb) && ed.onGetContent.addToTop(function(ed, o) {
                    var args;
                    -1 != ed.id.indexOf("sppbeditor-") && "raw" == o.format && (args = tinymce.extend(o, {
                        format: "html"
                    }), o.content = ed.serializer.serialize(ed.getBody(), args));
                });
            }), 0 == ed.settings.forced_root_block && 0 != ed.settings.editable_root && (ed.settings.editable_root = "rootblock", 
            ed.onPreInit.addToTop(function() {
                var selection = ed.selection, dom = ed.dom;
                dom.settings.root_element = ed.settings.editable_root, ed.schema.addValidElements("#mce:root[id|data-mce-root]"), 
                ed.schema.children["mce:root"] = ed.schema.children.body, ed.schema.children.body["mce:root"] = {}, 
                ed.serializer.addAttributeFilter("data-mce-root", function(nodes) {
                    for (var i = nodes.length; i--; ) nodes[i].unwrap();
                }), ed.serializer.addAttributeFilter("data-mce-bogus", function(nodes) {
                    for (var i = nodes.length; i--; ) nodes[i].remove();
                }), ed.onBeforeSetContent.add(function(editor, o) {
                    o.content || (o.content = '<br data-mce-bogus="1">'), o.content = '<mce:root id="' + ed.settings.editable_root + '" data-mce-root="1">' + o.content + "</mce:root>";
                }), ed.onSetContent.addToTop(function(ed, o) {
                    var rng;
                    (ed = dom.get(ed.settings.editable_root)) && (/^(&nbsp;|&#160;|\s|\u00a0|)$/.test(ed.innerHTML) && (ed.innerHTML = '<br data-mce-bogus="1">'), 
                    (rng = dom.createRng()).setStart(ed, 0), rng.setEnd(ed, 0), 
                    selection.setRng(rng));
                }), ed.onSaveContent.add(function(ed, o) {
                    "&nbsp;" === o.content && (o.content = "");
                }), ed.undoManager.onBeforeAdd.add(function(um, level) {
                    var node, container = ed.dom.create("div", {}, level.content);
                    (node = container.firstChild) && 1 == node.nodeType && node.hasAttribute("data-mce-root") && (level.content = container.firstChild.innerHTML);
                });
            }));
        });
    }(), tinymce.PluginManager.add("help", function(ed, url) {
        ed.addCommand("mceHelp", function() {
            ed.windowManager.open({
                title: ed.getLang("dlg.help", "Help"),
                url: ed.getParam("site_url") + "index.php?option=com_jce&task=plugin.display&plugin=help&lang=" + ed.getParam("language") + "&section=editor&category=editor&article=about",
                size: "mce-modal-landscape-full"
            });
        }), ed.addButton("help", {
            title: "dlg.help",
            cmd: "mceHelp"
        });
    }), AutoLinkPattern = /^(https?:\/\/|ssh:\/\/|ftp:\/\/|file:\/|www\.|(?:mailto:)?[A-Z0-9._%+\-]+@)(.+)$/i, 
    tinymce.PluginManager.add("autolink", function(ed, url) {
        function parseCurrentLine(editor, endOffset, delimiter) {
            var rng, end, endContainer, len, rngText, prev;
            function scopeIndex(container, index) {
                return index < 0 && (index = 0), 3 == container.nodeType && (container = container.data.length) < index ? container : index;
            }
            function setStart(container, offset) {
                1 != container.nodeType || container.hasChildNodes() ? rng.setStart(container, scopeIndex(container, offset)) : rng.setStartBefore(container);
            }
            function setEnd(container, offset) {
                1 != container.nodeType || container.hasChildNodes() ? rng.setEnd(container, scopeIndex(container, offset)) : rng.setEndAfter(container);
            }
            if ("A" != editor.selection.getNode().tagName) {
                if ((rng = editor.selection.getRng(!0).cloneRange()).startOffset < 5) {
                    if (!(prev = rng.endContainer.previousSibling)) {
                        if (!rng.endContainer.firstChild || !rng.endContainer.firstChild.nextSibling) return;
                        prev = rng.endContainer.firstChild.nextSibling;
                    }
                    if (setStart(prev, len = prev.length), setEnd(prev, len), rng.endOffset < 5) return;
                    end = rng.endOffset, endContainer = prev;
                } else {
                    if (3 != (endContainer = rng.endContainer).nodeType && endContainer.firstChild) {
                        for (;3 != endContainer.nodeType && endContainer.firstChild; ) endContainer = endContainer.firstChild;
                        3 == endContainer.nodeType && (setStart(endContainer, 0), 
                        setEnd(endContainer, endContainer.nodeValue.length));
                    }
                    end = 1 == rng.endOffset ? 2 : rng.endOffset - 1 - endOffset;
                }
                for (len = end; setStart(endContainer, 2 <= end ? end - 2 : 0), 
                setEnd(endContainer, 1 <= end ? end - 1 : 0), --end, " " != (rngText = rng.toString()) && "" !== rngText && 160 != rngText.charCodeAt(0) && 0 <= end - 2 && rngText != delimiter; );
                rng.toString() == delimiter || 160 == rng.toString().charCodeAt(0) ? (setStart(endContainer, end), 
                setEnd(endContainer, len), end += 1) : (0 === rng.startOffset ? setStart(endContainer, 0) : setStart(endContainer, end), 
                setEnd(endContainer, len)), "." == (prev = rng.toString()).charAt(prev.length - 1) && setEnd(endContainer, len - 1), 
                (endOffset = (prev = rng.toString()).match(AutoLinkPattern)) && ("www." == endOffset[1] ? endOffset[1] = "https://www." : /@$/.test(endOffset[1]) && !/^mailto:/.test(endOffset[1]) && (endOffset[1] = "mailto:" + endOffset[1]), 
                -1 !== endOffset[1].indexOf("http") && !editor.getParam("autolink_url", !0) || -1 !== endOffset[1].indexOf("mailto:") && !editor.getParam("autolink_email", !0) || (len = editor.selection.getBookmark(), 
                editor.selection.setRng(rng), editor.execCommand("createlink", !1, endOffset[1] + endOffset[2]), 
                prev = editor.selection.getNode(), editor.settings.default_link_target && editor.dom.setAttrib(prev, "target", editor.settings.default_link_target), 
                editor.onAutoLink.dispatch(editor, {
                    node: prev
                }), editor.selection.moveToBookmark(len), editor.nodeChanged()));
            }
        }
        (ed.getParam("autolink_url", !0) || ed.getParam("autolink_email", !0)) && (ed.settings.autolink_pattern && (AutoLinkPattern = ed.settings.autolink_pattern), 
        ed.onAutoLink = new tinymce.util.Dispatcher(this), ed.onKeyDown.addToTop(function(ed, e) {
            if (13 == e.keyCode) return function(ed) {
                parseCurrentLine(ed, -1, "");
            }(ed);
        }), tinymce.isIE || (ed.onKeyPress.add(function(ed, e) {
            if (41 == e.which) return function(ed) {
                parseCurrentLine(ed, -1, "(");
            }(ed);
        }), ed.onKeyUp.add(function(ed, e) {
            if (32 == e.keyCode) return function(ed) {
                parseCurrentLine(ed, 0, "");
            }(ed);
        })));
    }), [ "a", "abbr", "acronym", "address", "applet", "area", "article", "aside", "audio", "b", "base", "basefont", "bdi", "bdo", "bgsound", "big", "blink", "blockquote", "body", "br", "button", "canvas", "caption", "center", "cite", "code", "col", "colgroup", "command", "content", "data", "datalist", "dd", "del", "details", "dfn", "dialog", "dir", "div", "dl", "dt", "element", "em", "embed", "fieldset", "figcaption", "figure", "font", "footer", "form", "frame", "frameset", "h1", "h2", "h3", "h4", "h5", "h6", "head", "header", "hgroup", "hr", "html", "i", "iframe", "image", "img", "input", "ins", "isindex", "kbd", "keygen", "label", "legend", "li", "link", "listing", "main", "map", "mark", "marquee", "menu", "menuitem", "meta", "meter", "multicol", "nav", "nobr", "noembed", "noframes", "noscript", "object", "ol", "optgroup", "option", "output", "p", "param", "picture", "plaintext", "pre", "progress", "q", "rp", "rt", "rtc", "ruby", "s", "samp", "script", "section", "select", "shadow", "slot", "small", "source", "spacer", "span", "strike", "strong", "style", "sub", "summary", "sup", "table", "tbody", "td", "template", "textarea", "tfoot", "th", "thead", "time", "title", "tr", "track", "tt", "u", "ul", "var", "video", "wbr", "xmp" ]), FONT_ICON_RE = /<([a-z0-9]+)([^>]+)class="([^"]*)(glyph|uk-)?(fa|icon|bi)-([\w-]+)([^"]*)"([^>]*)><\/\1>/gi, PADDED_RX = /<(p|h1|h2|h3|h4|h5|h6|pre|div|address|caption)\b([^>]+)>(&nbsp;|\u00a0)<\/\1>/gi;
    const explode$1 = tinymce.explode, each$1 = tinymce.each, explode = tinymce.explode;
    function processAttributes(editor, content) {
        var invalidAttribRules = editor.getParam("invalid_attributes", ""), editor = editor.getParam("invalid_attribute_values", "");
        if (!invalidAttribRules && !editor) return content;
        for (var rules, doc = document.implementation.createHTMLDocument("").createElement("div"), nodes = (doc.innerHTML = content, 
        doc.querySelectorAll("*")), i = nodes.length, attrRules = function(list) {
            for (var s, rx, items = explode$1(list), matchers = [], i = 0; i < items.length; i++) if (s = (items[i] || "").trim()) try {
                rx = new RegExp("^(?:" + s + ")$", "i"), matchers.push(rx);
            } catch (e) {
                s = s.replace(/[.*+?^${}()|[\]\\]/g, "\\$&"), matchers.push(new RegExp("^" + s + "$", "i"));
            }
            return matchers;
        }(invalidAttribRules), valueRules = (content = editor, rules = [], content = explode(content), 
        each$1(content, function(item) {
            var m;
            (item = (item || "").trim()) && ((m = /([a-z0-9\*]+)\[([a-z0-9\-]+)([\^\$\!~\*]?=)?["']?([^"']+)?["']?\]/i.exec(item)) && 5 === m.length ? rules.push({
                type: "bracket",
                tag: m[1].toLowerCase(),
                attrib: m[2].toLowerCase(),
                expr: void 0 === m[3] ? null : m[3] || "",
                check: m[4] || ""
            }) : rules.push({
                type: "pattern",
                tag: "*",
                pattern: item
            }));
        }), rules); i--; ) for (var node, attrValue, nodeName = (node = nodes[i]).tagName.toLowerCase(), attributes = node.attributes || [], x = attributes.length - 1; 0 <= x; x--) {
            var attr = attributes[x];
            attr && attr.name && (attr = attr.name.toLowerCase(), attrValue = node.getAttribute(attr), 
            function(name, rules) {
                var i;
                if (name) for (i = 0; i < rules.length; i++) if (rules[i].test(name)) return 1;
            }(attr, attrRules) || function(tag, name, value, rules) {
                for (var r, rx, k = 0; k < rules.length; k++) if ("pattern" === (r = rules[k]).type) {
                    try {
                        rx = new RegExp("^" + r.pattern + "$", "i");
                    } catch (e) {
                        rx = null;
                    }
                    if (rx && rx.test(name) || r.pattern.toLowerCase() === name) return 1;
                } else if ("bracket" === r.type && ("*" === r.tag || tag === r.tag) && name === r.attrib && (!r.expr || function(value, expr, check) {
                    return expr ? "=" === expr ? value === check : "*=" === expr ? 0 <= value.indexOf(check) : "~=" === expr ? 0 <= (" " + value + " ").indexOf(" " + check + " ") : "!=" === expr ? value != check : "^=" === expr ? 0 === value.indexOf(check) : "$=" === expr && value.substr(value.length - check.length) === check : check;
                }(value, r.expr, r.check))) return 1;
            }(nodeName, attr, attrValue, valueRules)) && (node.removeAttribute(attr), 
            node.removeAttribute("data-mce-" + attr));
        }
        return doc.innerHTML;
    }
    function convertFromGeshi(h) {
        return (h || "").replace(/<pre xml:lang="([^"]+)"([^>]*)>(.*?)<\/pre>/g, function(a, b, c, d) {
            return '<pre data-geshi-lang="' + b + '"' + (c && /\w/.test(c) ? c.split(" ").join(" data-geshi-") : "") + ">" + d + "</pre>";
        });
    }
    var each = tinymce.each, Node = tinymce.html.Node;
    tinymce.PluginManager.add("cleanup", function(ed, url) {
        !1 === ed.settings.verify_html && (ed.settings.validate = !1);
        var padding = function(Node) {
            return {
                paddEmptyTags: function(content) {
                    return (content = (content = content.replace(FONT_ICON_RE, '<$1$2class="$3$4$5-$6$7"$8 data-mce-empty="1">&nbsp;</$1>')).replace(/<(a|i|span)\b([^>]+)><\/\1>/gi, '<$1$2 data-mce-empty="1">&nbsp;</$1>')).replace(/<li><\/li>/, '<li data-mce-empty="1">&nbsp;</li>');
                },
                ensureEmptyInlineNodes: function(nodes, name) {
                    for (var node, i = nodes.length; i--; ) !(node = nodes[i]).attr("class") && "li" !== name || node.firstChild || (node.attr("data-mce-empty", "1"), 
                    node.append(new Node("#text", "3")).value = "\xa0");
                },
                cleanupEmptyInlineNodes: function(nodes) {
                    for (var node, fc, i = nodes.length; i--; ) fc = (node = nodes[i]).firstChild, 
                    node.attr("data-mce-empty", null), !fc || "\xa0" !== fc.value && "&nbsp;" !== fc.value || fc.remove();
                }
            };
        }(Node);
        ed.onPreInit.add(function() {
            var elements;
            ed.serializer.addAttributeFilter("data-mce-caret", function(nodes) {
                for (var i = nodes.length; i--; ) nodes[i].remove();
            }), !1 === ed.settings.remove_trailing_brs && ed.serializer.addAttributeFilter("data-mce-bogus", function(nodes) {
                for (var node, textNode, i = nodes.length; i--; ) "br" === (node = nodes[i]).name && (node.prev || node.next ? node.remove() : ((textNode = new Node("#text", 3)).value = "\xa0", 
                node.replace(textNode)));
            }), ed.serializer.addAttributeFilter("data-mce-tmp", function(nodes, name) {
                for (var i = nodes.length; i--; ) nodes[i].attr("data-mce-tmp", null);
            }), ed.parser.addAttributeFilter("data-mce-tmp", function(nodes, name) {
                for (var i = nodes.length; i--; ) nodes[i].attr("data-mce-tmp", null);
            }), !1 !== ed.settings.verify_html && (ed.settings.allow_event_attributes || each(ed.schema.elements, function(elm) {
                if (!elm.attributesOrder || 0 === elm.attributesOrder.length) return !0;
                each(elm.attributes, function(obj, name) {
                    0 === name.indexOf("on") && (delete elm.attributes[name], elm.attributesOrder.splice(tinymce.inArray(elm, elm.attributesOrder, name), 1));
                });
            }), elements = ed.schema.elements, each("ol ul sub sup blockquote font table tbody tr strong b".split(","), function(name) {
                elements[name] && (elements[name].removeEmpty = !1);
            }), ed.getParam("pad_empty_tags", !0) || each(elements, function(v, k) {
                v.paddEmpty && (v.paddEmpty = !1);
            }), ed.getParam("table_pad_empty_cells", !0) || (elements.th.paddEmpty = !1, 
            elements.td.paddEmpty = !1), each(elements, function(v, k) {
                if (0 === k.indexOf("mce:")) return !0;
                -1 === tinymce.inArray(TAGS, k) && ed.schema.addCustomElements(k);
            })), ed.parser.addNodeFilter("a,i,span,li", function(nodes, name) {
                padding.ensureEmptyInlineNodes(nodes, name);
            }), ed.serializer.addAttributeFilter("data-mce-empty", function(nodes) {
                padding.cleanupEmptyInlineNodes(nodes);
            });
        }), !1 === ed.settings.verify_html && ed.addCommand("mceCleanup", function() {
            var s = ed.settings, se = ed.selection, bm = se.getBookmark(), content = ed.getContent({
                cleanup: !0
            }), s = (s.verify_html = !0, new tinymce.html.Schema(s)), content = new tinymce.html.Serializer({
                validate: !0
            }, s).serialize(new tinymce.html.DomParser({
                validate: !0,
                allow_event_attributes: !!ed.settings.allow_event_attributes
            }, s).parse(content));
            ed.setContent(content, {
                cleanup: !0
            }), se.moveToBookmark(bm);
        }), ed.onBeforeSetContent.add(function(ed, o) {
            o.content = o.content.replace(/^<br>/, ""), o.content = convertFromGeshi(o.content), 
            o.content = padding.paddEmptyTags(o.content), o.content = processAttributes(ed, o.content);
        }), ed.onPostProcess.add(function(ed, o) {
            o.set && (o.content = convertFromGeshi(o.content)), o.get && (o.content = (o.content || "").replace(/<pre([^>]+)data-geshi-lang="([^"]+)"([^>]*)>(.*?)<\/pre>/g, function(a, b, c, d, e) {
                return '<pre xml:lang="' + c + '"' + (b + d).replace(/data-geshi-/gi, "").replace(/\s+/g, " ").replace(/\s$/, "") + ">" + e + "</pre>";
            }), o.content = o.content.replace(/<a([^>]*)class="jce(box|popup|lightbox|tooltip|_tooltip)"([^>]*)><\/a>/gi, ""), 
            o.content = o.content.replace(/<span class="jce(box|popup|lightbox|tooltip|_tooltip)">(.*?)<\/span>/gi, "$2"), 
            o.content = o.content.replace(/_mce_(src|href|style|coords|shape)="([^"]+)"\s*?/gi, ""), 
            !1 === ed.settings.validate && (o.content = o.content.replace(/<body([^>]*)>([\s\S]*)<\/body>/, "$2"), 
            ed.getParam("remove_tag_padding") || (o.content = o.content.replace(/<(p|h1|h2|h3|h4|h5|h6|th|td|pre|div|address|caption)\b([^>]*)><\/\1>/gi, "<$1$2>&nbsp;</$1>"))), 
            ed.getParam("table_pad_empty_cells", !0) || (o.content = o.content.replace(/<(th|td)([^>]*)>(&nbsp;|\u00a0)<\/\1>/gi, "<$1$2></$1>")), 
            o.content = o.content.replace(/<(a|i|span)([^>]+)>(&nbsp;|\u00a0)<\/\1>/gi, function(match, tag, attribs) {
                return attribs = attribs.replace('data-mce-empty="1"', ""), "<" + tag + " " + tinymce.trim(attribs) + "></" + tag + ">";
            }), o.content = o.content.replace(/<li data-mce-empty="1">(&nbsp;|\u00a0)<\/li>/gi, "<li></li>"), 
            ed.getParam("remove_div_padding") && (o.content = o.content.replace(/<div([^>]*)>(&nbsp;|\u00a0)<\/div>/g, "<div$1></div>")), 
            !1 === ed.getParam("pad_empty_tags", !0) && (o.content = o.content.replace(PADDED_RX, "<$1$2></$1>")), 
            ed.getParam("keep_nbsp", !0) && "raw" === ed.settings.entity_encoding && (o.content = o.content.replace(/\u00a0/g, "&nbsp;")), 
            o.content = o.content.replace(/(uk|v|ng|data)-([\w-]+)=""(\s|>)/gi, "$1-$2$3"), 
            ed.settings.padd_empty_editor && (o.content = o.content.replace(/^(<div>(&nbsp;|&#160;|\s|\u00a0|)<\/div>[\r\n]*|<br(\s*\/)?>[\r\n]*)$/, "")), 
            o.content = o.content.replace(/<hr(.*)class="system-pagebreak"(.*?)\/?>/gi, '<hr$1class="system-pagebreak"$2/>'), 
            o.content = o.content.replace(/<hr id="system-readmore"(.*?)>/gi, '<hr id="system-readmore" />'));
        }), ed.onSaveContent.add(function(ed, o) {
            var entities;
            ed.getParam("cleanup_pluginmode") && (entities = {
                "&#39;": "'",
                "&amp;": "&",
                "&quot;": '"',
                "&apos;": "'"
            }, o.content = o.content.replace(/&(#39|apos|amp|quot);/gi, function(a) {
                return entities[a];
            }));
        }), ed.addButton("cleanup", {
            title: "advanced.cleanup_desc",
            cmd: "mceCleanup"
        }), this.paddEmptyTags = padding.paddEmptyTags;
    }), function() {
        const Node$1 = tinymce.html.Node;
        var Content_createTextNode = function(value, raw) {
            var text = new Node$1("#text", 3);
            return text.raw = !1 !== raw, text.value = value, text;
        }, Content_createShortcodeHtml = function(editor, data, tag) {
            return data = (data = editor.dom.decode(data)).replace(/[\n\r]/gi, "<br />"), 
            editor.dom.createHTML(tag || "pre", {
                "data-mce-code": "shortcode"
            }, editor.dom.encode(data));
        }, Content_createHtml = function(editor, data, type, tag) {
            return type = type || "script", tag = tag || "pre", !1 !== editor.settings.code_use_blocks ? editor.dom.createHTML(tag, {
                "data-mce-code": type
            }, editor.dom.encode(data)) : (data = data.replace(/<br[^>]*?>/gi, "\n"), 
            editor.dom.createHTML("img", {
                src: "data:image/gif;base64,R0lGODlhAQABAIAAAAAAAP///yH5BAEAAAAALAAAAAABAAEAAAIBRAA7",
                "data-mce-resize": "false",
                "data-mce-code": type,
                "data-mce-type": "placeholder",
                "data-mce-value": escape(data)
            }));
        };
        const each$1 = tinymce.each;
        let htmlSchema, shortEndedElements = {}, booleanAttributes = {};
        function canKeepCode(editor, type) {
            return !1 === editor.settings.validate || editor.getParam("code_allow_" + type);
        }
        function isXmlElement(editor, name) {
            return !htmlSchema.isValid(name) && !function(editor, name) {
                return editor = editor.settings.invalid_elements.split(","), -1 !== tinymce.inArray(editor, name);
            }(editor, name);
        }
        function isValid(editor, tag, attr) {
            return isXmlElement(editor, tag) || !1 === editor.settings.validate || editor.schema.isValid(tag, attr);
        }
        function processXML(editor, content) {
            return content.replace(/<([a-z0-9\-_\:\.]+)(?:[^>]*?)\/?>((?:[\s\S]*?)<\/\1>)?/gi, function(match, tag) {
                return "svg" === (tag = tag.toLowerCase()) && !1 === editor.settings.code_allow_svg_in_xml || "math" === tag && !1 === editor.settings.code_allow_mathml_in_xml || !isXmlElement(editor, tag) ? match : (!1 !== editor.settings.code_validate_xml && (match = function(editor, xml) {
                    return function sanitizeNode(editor, node) {
                        var html = [];
                        switch (node.nodeType) {
                          case 1:
                            var name, value, tagName = node.nodeName.toLowerCase();
                            if (!isValid(editor, tagName)) return "";
                            html.push("<", tagName);
                            for ({
                                name,
                                value
                            } of Array.from(node.attributes)) !isValid(editor, tagName, name) || !editor.settings.allow_event_attributes && name.startsWith("on") || (!booleanAttributes[name] || "" !== value && "true" !== value && value !== name ? html.push(" ", name, '="', editor.dom.encode(value, !0), '"') : html.push(" ", name));
                            if (shortEndedElements[tagName]) "html5-strict" === editor.settings.schema ? html.push(">") : html.push(" />"); else {
                                html.push(">");
                                for (var child of Array.from(node.childNodes)) html.push(sanitizeNode(editor, child));
                                html.push("</", tagName, ">");
                            }
                            break;

                          case 3:
                            var text = node.nodeValue;
                            html.push(text);
                            break;

                          case 5:
                            html.push("<![CDATA[", editor.dom.encode(node.nodeValue, !0), "]]>");
                            break;

                          case 8:
                            html.push("\x3c!--", editor.dom.encode(node.nodeValue, !0), "--\x3e");
                        }
                        return html.join("");
                    }(editor, new DOMParser().parseFromString(xml, "text/xml").documentElement);
                }(editor, match)), Content_createHtml(editor, match, "xml"));
            });
        }
        function processShortcode(editor, html, tagName) {
            var attrPlaceholders;
            return -1 === html.indexOf("{") || "{" == html.charAt(0) && html.length < 3 || (-1 != html.indexOf("{/source}") && (html = function(editor, html) {
                return -1 === html.indexOf("{/source}") ? html : html.replace(/(?:(<(code|pre|samp|span)[^>]*(data-mce-type="code")?>|")?)\{source(.*?)\}([\s\S]+?)\{\/source\}/g, function(match) {
                    return "<" === match.charAt(0) || '"' === match.charAt(0) ? match : (match = editor.dom.decode(match), 
                    '<pre data-mce-code="shortcode" data-mce-label="sourcerer">' + editor.dom.encode(match) + "</pre>");
                });
            }(editor, html)), tagName = tagName || "span", attrPlaceholders = [], 
            html = (html = html.replace(/=("[^"]*\{[^"]*"|'[^']*\{[^']*')/g, function(match) {
                return attrPlaceholders.push(match), '="__SHORTCODE_ATTR_' + (attrPlaceholders.length - 1) + '__"';
            })).replace(/(?:(<(code|pre|samp|span)[^>]*(data-mce-type="code")?>)?)(?:\{)([\w-]+)(.*?)(?:\/?\})(?:([\s\S]+?)\{\/\4\})?/g, function(match) {
                return "<" === match.charAt(0) ? match : Content_createShortcodeHtml(editor, match, tagName);
            }), attrPlaceholders.length && (html = html.replace(/="__SHORTCODE_ATTR_(\d+)__"/g, function(_match, index) {
                return attrPlaceholders[parseInt(index, 10)];
            }))), html;
        }
        function processPhp(editor, content) {
            return canKeepCode(editor, "php") ? (content = content.replace(/\="([^"]+?)"/g, function(_a, b) {
                return '="' + b.replace(/<\?(php)?(.+?)\?>/gi, function(_x, _y, z) {
                    return "__php_start__" + editor.dom.encode(z) + "__php_end__";
                }) + '"';
            }), (content = (content = /<textarea/.test(content) ? content.replace(/<textarea([^>]*)>([\s\S]*?)<\/textarea>/gi, function(_a, b, c) {
                return "<textarea" + b + ">" + c.replace(/<\?(php)?(.+?)\?>/gi, function(_x, _y, z) {
                    return "__php_start__" + editor.dom.encode(z) + "__php_end__";
                }) + "</textarea>";
            }) : content).replace(/<([^>]+)<\?(php)?(.+?)\?>([^>]*?)>/gi, function(_a, b, _c, d, e) {
                return " " !== b.charAt(b.length) && (b += " "), "<" + b + 'data-mce-php="' + d + '" ' + e + ">";
            })).replace(/<\?(php)?([\s\S]+?)\?>/gi, function(match) {
                return match = match.replace(/\n/g, "<br />"), Content_createHtml(editor, match, "php");
            })) : content.replace(/<\?(php)?([\s\S]*?)\?>/gi, "");
        }
        var Process = {
            init: function(editor) {
                htmlSchema = new tinymce.html.Schema({
                    schema: "mixed",
                    invalid_elements: editor.settings.invalid_elements
                }), each$1(editor.schema.getShortEndedElements(), function(_shortEnded, name) {
                    shortEndedElements[name.toLowerCase()] = !0;
                }), each$1(editor.schema.getBoolAttrs(), function(_boolAttr, name) {
                    booleanAttributes[name.toLowerCase()] = !0;
                });
            },
            processOnInsert: function(editor, value, _node) {
                return /\{.+\}/gi.test(value) && editor.settings.code_protect_shortcode && (value = processShortcode(editor, value, void 0)), 
                canKeepCode(editor, "custom_xml") && (value = processXML(editor, value)), 
                /<(\?|script|style)/.test(value) && (value = value.replace(/<(script|style)([^>]*?)>([\s\S]*?)<\/\1>/gi, function(match, type) {
                    return canKeepCode(editor, type) ? (match = match.replace(/<br[^>]*?>/gi, "\n"), 
                    Content_createHtml(editor, match, type)) : "";
                }), value = processPhp(editor, value)), /<link[^>]*?rel="stylesheet"[^>]*?>/gi.test(value) ? value.replace(/<link[^>]*?rel="stylesheet"[^>]*?>/gi, function(match) {
                    return canKeepCode(editor, "style") ? Content_createHtml(editor, match, "link") : "";
                }) : value;
            },
            processShortcode: processShortcode,
            processPhp: processPhp,
            processXML: processXML
        };
        const each = tinymce.each, Node = tinymce.html.Node, VK = tinymce.VK, DomParser = tinymce.html.DomParser, Serializer = tinymce.html.Serializer;
        function isOnlyChild(node) {
            var child = node.parent.firstChild, count = 0;
            if (child) do {
                if (1 === child.type) {
                    if (child.attributes.map["data-mce-type"] || child.attributes.map["data-mce-bogus"]) continue;
                    if (child === node) continue;
                    count++;
                }
                8 === child.type && count++, 3 !== child.type || /^[ \t\r\n]*$/.test(child.value) || count++;
            } while (child = child.next);
            return 0 === count;
        }
        tinymce.PluginManager.add("code", function(editor, url) {
            function canKeepCode(type) {
                return !1 === editor.settings.validate || editor.getParam("code_allow_" + type);
            }
            var blockElements = [], inlineElements = [], code_blocks = !1 !== editor.settings.code_use_blocks;
            function handleEnterInPre(ed, node, before) {
                var node = ed.dom.getParents(node, blockElements.join(",")), newBlockName = ed.settings.forced_root_block || "p";
                !1 === ed.settings.force_block_newlines && (newBlockName = "br"), 
                (node = node.shift()) !== ed.getBody() && (newBlockName = ed.dom.create(newBlockName, {}, "\xa0"), 
                before ? node.parentNode.insertBefore(newBlockName, node) : ed.dom.insertAfter(newBlockName, node), 
                (before = ed.selection.getRng()).setStart(newBlockName, 0), before.setEnd(newBlockName, 0), 
                ed.selection.setRng(before), ed.selection.scrollIntoView(newBlockName));
            }
            editor.settings.code_allow_script && (editor.settings.allow_script_urls = !0), 
            editor.addCommand("InsertShortCode", function(ui, html) {
                return editor.settings.code_protect_shortcode && (html = Process.processShortcode(editor, html, "pre"), 
                tinymce.is(html)) && editor.execCommand("mceReplaceContent", !1, html), 
                !1;
            }), editor.onKeyDown.add(function(ed, e) {
                var node;
                if (e.keyCode == VK.ENTER) {
                    if ("PRE" === (node = ed.selection.getNode()).nodeName && "shortcode" === node.getAttribute("data-mce-code")) return void (e.shiftKey || (ed.execCommand("InsertLineBreak", !1, e), 
                    e.preventDefault()));
                    "SPAN" === node.nodeName && node.getAttribute("data-mce-code") && (handleEnterInPre(ed, node), 
                    e.preventDefault());
                }
                e.keyCode == VK.UP && e.altKey && "PRE" == (node = ed.selection.getNode()).nodeName && (handleEnterInPre(ed, node, !0), 
                e.preventDefault()), 9 != e.keyCode || VK.metaKeyPressed(e) || "PRE" === (node = ed.selection.getNode()).nodeName && node.getAttribute("data-mce-code") && (ed.selection.setContent("\t", {
                    no_events: !0
                }), e.preventDefault()), e.keyCode !== VK.BACKSPACE && e.keyCode !== VK.DELETE || "SPAN" === (node = ed.selection.getNode()).nodeName && node.getAttribute("data-mce-code") && "placeholder" === node.getAttribute("data-mce-type") && (ed.undoManager.add(), 
                ed.dom.remove(node), e.preventDefault());
            }), editor.onPreInit.add(function() {
                function isCodePlaceholder(node) {
                    return "SPAN" === node.nodeName && node.getAttribute("data-mce-code") && "placeholder" == node.getAttribute("data-mce-type");
                }
                function onSetContent() {
                    each(editor.dom.select("pre[data-mce-code]", editor.getBody()), function(elm) {
                        var clone, clonedElm;
                        (elm = editor.dom.getParent(elm, "p")) && ((clonedElm = (clone = elm.cloneNode(!0)).querySelector("[data-mce-code]")) && clone.removeChild(clonedElm), 
                        editor.dom.isEmpty(clone)) && editor.dom.remove(elm, 1);
                    });
                }
                Process.init(editor), editor.dom.bind(editor.getDoc(), "keyup click", function(e) {
                    var node = e.target, sel = editor.selection.getNode();
                    editor.dom.removeClass(editor.dom.select(".mce-item-selected"), "mce-item-selected"), 
                    node === editor.getBody() && isCodePlaceholder(sel) ? sel.parentNode !== node || sel.nextSibling || editor.dom.insertAfter(editor.dom.create("br", {
                        "data-mce-bogus": 1
                    }), sel) : isCodePlaceholder(node) && (e.preventDefault(), e.stopImmediatePropagation(), 
                    editor.selection.select(node), window.setTimeout(function() {
                        editor.dom.addClass(node, "mce-item-selected");
                    }, 10), e.preventDefault());
                });
                var ctrl = editor.controlManager.get("formatselect");
                ctrl && each([ "script", "style", "php", "shortcode", "xml" ], function(key) {
                    var title = editor.getLang("code." + key, key);
                    if ("shortcode" === key && editor.settings.code_protect_shortcode) return ctrl.add(title, key, {
                        class: "mce-code-" + key
                    }), editor.formatter.register("shortcode", {
                        block: "pre",
                        attributes: {
                            "data-mce-code": "shortcode"
                        }
                    }), !0;
                    "xml" === key && (editor.settings.code_allow_xml = !!editor.settings.code_allow_custom_xml), 
                    canKeepCode(key) && code_blocks && (ctrl.add(title, key, {
                        class: "mce-code-" + key
                    }), editor.formatter.register(key, {
                        block: "pre",
                        attributes: {
                            "data-mce-code": key
                        },
                        onformat: function(elm) {
                            each(editor.dom.select("br", elm), function(br) {
                                editor.dom.replace(editor.dom.doc.createTextNode("\n"), br);
                            });
                        }
                    }));
                }), each(editor.schema.getBlockElements(), function(_block, blockName) {
                    blockElements.push(blockName);
                }), each(editor.schema.getTextInlineElements(), function(_inline, name) {
                    inlineElements.push(name);
                }), editor.settings.code_protect_shortcode && (editor.textpattern.addPattern({
                    start: "{",
                    end: "}",
                    cmd: "InsertShortCode",
                    remove: !0
                }), editor.textpattern.addPattern({
                    start: " {",
                    end: "}",
                    format: "inline-shortcode",
                    remove: !1
                })), editor.formatter.register("inline-shortcode", {
                    inline: "span",
                    attributes: {
                        "data-mce-code": "shortcode"
                    }
                }), editor.selection.onBeforeSetContent.addToTop(function(sel, o) {
                    (sel = sel.getNode()) && "PRE" === sel.nodeName || (o.content = Process.processOnInsert(editor, o.content, sel));
                }), editor.onSetContent.add(onSetContent), editor.selection.onSetContent.add(onSetContent), 
                editor.parser.addNodeFilter("script,style,link", function(nodes) {
                    for (var i = nodes.length; i--; ) {
                        var node, text, value, placeholder, parent = (node = nodes[i]).parent;
                        parent && "pre" === parent.name || ("link" == node.name && "stylesheet" != node.attr("rel") ? node.remove() : (node.attr("data-mce-fragment", null), 
                        node.firstChild && (node.firstChild.value = node.firstChild.value.replace(/<span([^>]+)>([\s\S]+?)<\/span>/gi, function(match, attr, content) {
                            return -1 === attr.indexOf("data-mce-code") ? match : editor.dom.decode(content);
                        })), code_blocks ? (value = new Serializer({
                            validate: !1
                        }).serialize(node), value = tinymce.trim(value), (parent = new Node("pre", 1)).attr({
                            "data-mce-code": node.name
                        }), text = Content_createTextNode(value, !1), parent.append(text), 
                        node.replace(parent)) : (value = "", node.firstChild && (value = tinymce.trim(node.firstChild.value)), 
                        placeholder = Node.create("img", {
                            src: "data:image/gif;base64,R0lGODlhAQABAIAAAAAAAP///yH5BAEAAAAALAAAAAABAAEAAAIBRAA7",
                            "data-mce-code": node.name,
                            "data-mce-type": "placeholder",
                            "data-mce-resize": "false",
                            title: editor.dom.encode(value)
                        }), each(node.attributes, function(attr) {
                            placeholder.attr("data-mce-p-" + attr.name, attr.value);
                        }), value && placeholder.attr("data-mce-value", escape(value)), 
                        node.replace(placeholder))));
                    }
                }), editor.parser.addAttributeFilter("data-mce-code", function(nodes, name) {
                    var node, i = nodes.length;
                    function isBlockNode(node) {
                        return -1 != tinymce.inArray(blockElements, node.name);
                    }
                    for (;i--; ) {
                        var type, parent = (node = nodes[i]).parent;
                        "placeholder" == node.attr("data-mce-type") || "shortcode" !== (type = node.attr(name)) && "php" !== type || ((type = node.firstChild.value) && (node.firstChild.value = type.replace(/<br[\s\/]*>/g, "\n")), 
                        parent && (parent.attr(name) ? node.unwrap() : ("body" !== parent.name && !isOnlyChild(node) && function(node) {
                            return "span" == node.name && (node.next && ("#text" == node.next.type || !isBlockNode(node.next)) || node.prev && ("#text" == node.prev.type || !isBlockNode(node.prev)) || node.parent && !isBlockNode(node.parent));
                        }(node) || (node.name = "pre", node.parent && function(node) {
                            return -1 != tinymce.inArray(inlineElements, node.name);
                        }(node.parent) && (node.name = "span"), "pre" == node.name && parent && "p" == parent.name && isOnlyChild(node) && parent.parent && parent.replace(node)), 
                        "span" == node.name && node === parent.lastChild && (type = Content_createTextNode("\xa0"), 
                        parent.append(type)))));
                    }
                }), editor.serializer.addAttributeFilter("data-mce-code", function(nodes, name) {
                    for (var i = nodes.length; i--; ) {
                        var node, root_block = !1, type = (node = nodes[i]).attr(name);
                        if ("img" === node.name) {
                            var key, elm = new Node(type, 1);
                            for (key in node.attributes.map) {
                                var val = node.attributes.map[key];
                                -1 !== key.indexOf("data-mce-p-") ? key = key.substr(11) : val = null, 
                                elm.attr(key, val);
                            }
                            (imgValue = node.attr("data-mce-value")) && (imgValue = Content_createTextNode(unescape(imgValue)), 
                            "php" == type || "shortcode" == type ? elm = imgValue : elm.append(imgValue)), 
                            node.replace(elm);
                        } else if (node.isEmpty() && node.remove(), "xml" !== type) {
                            "script" !== type && "style" !== type || (root_block = type);
                            var childVal, parser, child = node.firstChild, imgValue = node.clone(!0), text = "";
                            if (child) for (;/(shortcode|php)/.test(node.attr("data-mce-code")) || (childVal = "br" == child.name ? "\n" : child.value) && (text += childVal), 
                            child = child.next; );
                            text && (imgValue.empty(), parser = new DomParser({
                                validate: !1
                            }), "script" !== type && "style" !== type || parser.addNodeFilter(type, function(items, filterName) {
                                for (var n = items.length; n--; ) {
                                    var item = items[n];
                                    each(item.attributes, function(attr) {
                                        return !attr || 0 === attr.name.indexOf("data-") && -1 === attr.name.indexOf("data-mce-") || void (!1 === editor.schema.isValid(filterName, attr.name) && item.attr(attr.name, null));
                                    });
                                }
                            }), parser = parser.parse(text, {
                                forced_root_block: root_block
                            }), imgValue.append(parser)), node.replace(imgValue), 
                            "shortcode" === type && "pre" === imgValue.name && (root_block = Content_createTextNode("\n"), 
                            imgValue.append(root_block), imgValue.unwrap());
                        }
                    }
                }), editor.onContextMenu.addToTop(function(ed, e) {
                    if ((ed = ed.selection.getNode()) && ed.hasAttribute("data-mce-code")) return !1;
                });
            }), editor.onInit.add(function() {
                editor.theme && editor.theme.onResolveName && editor.theme.onResolveName.add(function(theme, o) {
                    var node = o.node;
                    node.getAttribute("data-mce-code") && (o.name = node.getAttribute("data-mce-code"));
                });
            }), editor.onMouseDown.add(function(ed, e) {
                var clientY, top, right, pre = e.target.closest("pre[data-mce-code]");
                pre && ({
                    clientX: e,
                    clientY
                } = e, {
                    top,
                    right
                } = pre.getBoundingClientRect(), right - 32 <= e) && clientY <= top + 32 && ed.dom.toggleClass(pre, "mce-code-toggle");
            }), editor.onBeforeSetContent.addToTop(function(ed, o) {
                editor.settings.code_protect_shortcode && -1 === o.content.indexOf('data-mce-code="shortcode"') && (o.content = Process.processShortcode(editor, o.content)), 
                canKeepCode("custom_xml") && o.content && o.load && (o.content = Process.processXML(editor, o.content)), 
                /<(\?|script|style|link)/.test(o.content) && (canKeepCode("script") || (o.content = o.content.replace(/<script[^>]*>([\s\S]*?)<\/script>/gi, "")), 
                canKeepCode("style") || (o.content = o.content.replace(/<style[^>]*>([\s\S]*?)<\/style>/gi, ""), 
                o.content = o.content.replace(/<link[^>]*?rel="stylesheet"[^>]*?>/gi, "")), 
                o.content = Process.processPhp(editor, o.content));
            }), editor.onPostProcess.add(function(ed, o) {
                o.get && (/(data-mce-php|__php_start__)/.test(o.content) && (o.content = o.content.replace(/({source})?__php_start__(.*?)__php_end__/g, function(match, pre, code) {
                    return (pre || "") + "<?php" + ed.dom.decode(code) + "?>";
                }), o.content = o.content.replace(/<textarea([^>]*)>([\s\S]*?)<\/textarea>/gi, function(a, b, c) {
                    return "<textarea" + b + ">" + (/&lt;\?php/.test(c) ? ed.dom.decode(c) : c) + "</textarea>";
                }), o.content = o.content.replace(/data-mce-php="([^"]+?)"/g, function(a, b) {
                    return "<?php" + ed.dom.decode(b) + "?>";
                })), editor.settings.code_protect_shortcode && (o.content = o.content.replace(/\{([\s\S]+?)\}/gi, function(match, content) {
                    return "{" + ed.dom.decode(content) + "}";
                }), o.content = o.content.replace(/\{source([^\}]*?)\}([\s\S]+?)\{\/source\}/gi, function(match, start, content) {
                    return "{source" + start + "}" + ed.dom.decode(content) + "{/source}";
                }), o.content = o.content.replace(/\{([\w-]+)(.*?)\}([\s\S]+)\{\/\1\}/gi, function(match, start, attr, content) {
                    return "{" + start + attr + "}" + ed.dom.decode(content) + "{/" + start + "}";
                })), o.content = o.content.replace(/<(pre|span)([^>]+?)>([\s\S]*?)<\/\1>/gi, function(match, tag, attr, content) {
                    return -1 === attr.indexOf("data-mce-code") ? match : (content = tinymce.trim(content), 
                    "script" != (attr = ed.dom.create("div", {}, match).firstChild.getAttribute("data-mce-code")) && (content = content.replace(/<br[^>]*?>/gi, "\n")), 
                    content = ed.dom.decode(content), "php" == attr && (content = content.replace(/<\?(php)?/gi, "").replace(/\?>/g, ""), 
                    content = "<?php\n" + tinymce.trim(content) + "\n?>"), content);
                }), o.content = o.content.replace(/<!--mce:protected ([\s\S]+?)-->/gi, function(match, content) {
                    return unescape(content);
                }));
            });
        });
    }(), function() {
        var each = tinymce.each;
        tinymce.PluginManager.add("effects", function(ed, url) {
            function cleanEventAttribute(val) {
                return val ? val.replace(/^\s*this.src\s*=\s*\'([^\']+)\';?\s*$/, "$1").replace(/^\s*|\s*$/g, "") : "";
            }
            function bindMouseoverEvent(ed) {
                each(ed.dom.select("img"), function(elm) {
                    var src = elm.getAttribute("src"), mouseover = elm.getAttribute("data-mouseover"), mouseout = elm.getAttribute("data-mouseout");
                    if (elm.onmouseover = elm.onmouseout = null, !src || !mouseover || !mouseout) return !0;
                    elm.onmouseover = function() {
                        elm.setAttribute("src", elm.getAttribute("data-mouseover"));
                    }, elm.onmouseout = function() {
                        elm.setAttribute("src", elm.getAttribute("data-mouseout") || src);
                    };
                });
            }
            ed.onPreInit.add(function() {
                ed.onBeforeSetContent.add(function(ed, o) {
                    var div;
                    -1 !== o.content.indexOf("onmouseover=") && (div = ed.dom.create("div", {}, o.content), 
                    each(ed.dom.select("img[onmouseover]", div), function(node) {
                        var mouseover = node.getAttribute("onmouseover"), mouseout = node.getAttribute("onmouseout");
                        return !mouseover || 0 !== mouseover.indexOf("this.src") || (mouseover = cleanEventAttribute(mouseover), 
                        node.removeAttribute("onmouseover"), !mouseover) || (node.setAttribute("data-mouseover", mouseover), 
                        void (mouseout && 0 === mouseout.indexOf("this.src") && (mouseout = cleanEventAttribute(mouseout), 
                        node.removeAttribute("onmouseout"), mouseout) && node.setAttribute("data-mouseout", mouseout)));
                    }), o.content = div.innerHTML);
                }), ed.parser.addAttributeFilter("onmouseover", function(nodes) {
                    for (var i = nodes.length; i--; ) {
                        var mouseover, mouseout, node = nodes[i];
                        "img" === node.name && (mouseover = node.attr("onmouseover"), 
                        mouseout = node.attr("onmouseout"), mouseover) && 0 === mouseover.indexOf("this.src") && (mouseover = cleanEventAttribute(mouseover), 
                        node.attr("data-mouseover", mouseover), node.attr("onmouseover", null), 
                        mouseout) && 0 === mouseout.indexOf("this.src") && (mouseout = cleanEventAttribute(mouseout), 
                        node.attr("data-mouseout", mouseout), node.attr("onmouseout", null));
                    }
                }), ed.serializer.addAttributeFilter("data-mouseover", function(nodes) {
                    for (var i = nodes.length; i--; ) {
                        var mouseout, mouseover, node = nodes[i];
                        "img" === node.name && (mouseover = node.attr("data-mouseover"), 
                        mouseout = node.attr("data-mouseout"), mouseover = cleanEventAttribute(mouseover), 
                        node.attr("data-mouseover", null), node.attr("data-mouseout", null), 
                        mouseover) && (node.attr("onmouseover", "this.src='" + mouseover + "';"), 
                        mouseout = cleanEventAttribute(mouseout)) && node.attr("onmouseout", "this.src='" + mouseout + "';");
                    }
                }), ed.onSetContent.add(function() {
                    bindMouseoverEvent(ed);
                }), ed.onUpdateMedia.add(function(ed, o) {
                    bindMouseoverEvent(ed), o.before && o.after && each(ed.dom.select("img[data-mouseover]"), function(elm) {
                        var mouseover = elm.getAttribute("data-mouseover"), mouseout = elm.getAttribute("data-mouseout");
                        if (!mouseover) return !0;
                        mouseover == o.before && elm.setAttribute("data-mouseover", o.after), 
                        mouseout == o.before && elm.setAttribute("data-mouseout", o.after);
                    });
                });
            });
        });
    }(), function() {
        var VK = tinymce.VK, each = tinymce.each, blocks = [];
        tinymce.PluginManager.add("format", function(ed, url) {
            var keyCode;
            function clearBlocks(e) {
                var n = ed.selection.getNode(), tag = ed.getParam("forced_root_block", "p") || (ed.getParam("force_block_newlines") ? "p" : "br"), p = ed.dom.getParents(n, blocks.join(","));
                (p = ed.dom.getParent(n, "td,th") ? ed.dom.getParents(n, "td,th,tr,tfoot,thead,table") : p) && 1 < p.length && (e.preventDefault(), 
                (n = p[p.length - 1]) !== ed.getBody()) && (p = ed.dom.create(tag, {}, "\xa0"), 
                e.keyCode === VK.ENTER || e.keyCode === VK.DOWN ? ed.dom.insertAfter(p, n) : ed.dom.insertBefore(p, n), 
                ed.selection.select(p), ed.selection.collapse(1));
            }
            ed.addButton("italic", {
                title: "advanced.italic_desc",
                onclick: function(e) {
                    e.preventDefault(), ed.focus(), e.shiftKey ? ed.formatter.toggle("italic-i") : ed.formatter.toggle("italic"), 
                    ed.undoManager.add();
                }
            }), ed.addShortcut("meta+shift+i", "italic.desc", function() {
                ed.formatter.apply("italic-i");
            }), ed.addCommand("mceSoftHyphen", function() {
                ed.execCommand("mceInsertContent", !1, ed.plugins.visualchars && ed.plugins.visualchars.state ? '<span data-mce-bogus="1" class="mce-item-hidden mce-item-shy">&shy;</span>' : "&shy;");
            }), keyCode = 189, tinymce.isGecko && (keyCode = 173), ed.addShortcut("ctrl+shift+" + keyCode, "softhyphen.desc", "mceSoftHyphen"), 
            ed.onPreInit.add(function(ed) {
                each(ed.schema.getBlockElements(), function(v, k) {
                    if (/\W/.test(k)) return !0;
                    blocks.push(k.toLowerCase());
                }), ed.formatter.register("aside", {
                    block: "aside",
                    remove: "all",
                    wrapper: !0
                }), ed.formatter.register("p", {
                    block: "p",
                    remove: "all"
                }), ed.formatter.register("div", {
                    block: "div",
                    onmatch: !!ed.settings.forced_root_block && function() {
                        return !1;
                    }
                }), ed.formatter.register("div_container", {
                    block: "div",
                    wrapper: !0,
                    onmatch: !!ed.settings.forced_root_block && function() {
                        return !1;
                    }
                }), ed.formatter.register("span", {
                    inline: "span",
                    remove: "all",
                    onmatch: function() {
                        return !1;
                    }
                }), ed.formatter.register("section", {
                    block: "section",
                    remove: "all",
                    wrapper: !0,
                    merge_siblings: !1
                }), ed.formatter.register("article", {
                    block: "article",
                    remove: "all",
                    wrapper: !0,
                    merge_siblings: !1
                }), ed.formatter.register("footer", {
                    block: "footer",
                    remove: "all",
                    wrapper: !0,
                    merge_siblings: !1
                }), ed.formatter.register("header", {
                    block: "header",
                    remove: "all",
                    wrapper: !0,
                    merge_siblings: !1
                }), ed.formatter.register("nav", {
                    block: "nav",
                    remove: "all",
                    wrapper: !0,
                    merge_siblings: !1
                }), ed.formatter.register("code", {
                    inline: "code",
                    remove: "all"
                }), ed.formatter.register("samp", {
                    inline: "samp",
                    remove: "all"
                }), ed.formatter.register("blockquote", {
                    block: "blockquote",
                    wrapper: 1,
                    remove: "all",
                    merge_siblings: !1
                }), ed.formatter.register("italic-i", {
                    inline: "i",
                    remove: "all"
                });
                var doc, head, values, custom_css = ed.getParam("custom_css", "");
                custom_css && (head = (doc = ed.getDoc()).getElementsByTagName("head")[0], 
                ed = ed.dom.create("style", {
                    type: "text/css",
                    id: "mceCustomStyles"
                }), values = [], each(custom_css.split(";"), function(value) {
                    values.push(".mceContentBody " + value);
                }), ed.appendChild(doc.createTextNode(values.join(";"))), head.appendChild(ed));
            }), ed.settings.removeformat = [ {
                selector: "b,strong,em,i,font,u,strike,sub,sup,dfn,code,samp,kbd,var,cite,mark,q,footer",
                remove: "all",
                split: !0,
                expand: !1,
                block_expand: !0,
                deep: !0
            } ], ed.onKeyDown.add(function(ed, e) {
                e.keyCode !== VK.ENTER && e.keyCode !== VK.UP && e.keyCode !== VK.DOWN || !e.altKey || clearBlocks(e);
            }), ed.onKeyUp.addToTop(function(ed, e) {
                e.keyCode === VK.ENTER && "DIV" === (e = ed.selection.getNode()).nodeName && ed.settings.force_block_newlines && (!1 === ed.settings.keep_styles && ed.dom.removeAllAttribs(e), 
                ed.formatter.apply("p"));
            }), ed.onBeforeExecCommand.add(function(ed, cmd, ui, v, o) {
                var p, n = ed.selection.getNode();
                switch (cmd) {
                  case "FormatBlock":
                    if (!v) {
                        if (o.terminate = !0, n === ed.getBody()) return;
                        ed.undoManager.add(), (p = ed.dom.getParent(n, blocks.join(",")) || "") && (name = p.nodeName.toLowerCase(), 
                        ed.formatter.get(name)) && ed.formatter.remove(name);
                        var name = ed.controlManager.get("formatselect");
                        name && name.select(p);
                    }
                    "dl" === v && (ed.execCommand("InsertDefinitionList"), o.terminate = !0), 
                    "dt" !== v && "dd" !== v || (n && !ed.dom.getParent(n, "dl") && ed.execCommand("InsertDefinitionList"), 
                    "dt" === v && "DD" === n.nodeName && ed.dom.rename(n, "DT"), 
                    "dd" === v && "DT" === n.nodeName && ed.dom.rename(n, "DD"), 
                    o.terminate = !0);
                    break;

                  case "RemoveFormat":
                    v || ed.dom.isBlock(n) || (name = ed.controlManager.get("styleselect")) && name.selectedValue && ed.execCommand("mceToggleFormat", !1, name.selectedValue);
                }
            }), ed.onExecCommand.add(function(ed, cmd, ui, v, o) {
                var n = ed.selection.getNode();
                "mceToggleFormat" !== cmd || "dt" !== v && "dd" !== v || "DL" === n.nodeName && 0 === ed.dom.select("dt,dd", n).length && ed.formatter.remove("dl");
            });
        });
    }(), function() {
        var each = tinymce.each, DOM = tinymce.DOM, PreviewCss = tinymce.util.PreviewCss, rgba = {}, luma = {};
        function getLuminance(val) {
            var RsRGB, GsRGB, col;
            return luma[val] || (RsRGB = (col = function(val) {
                var r, b, g, a, values, match;
                return rgba[val] || (g = b = r = 0, -(a = 1) !== val.indexOf("#") ? (3 === (val = val.substr(1)).length && (val += val), 
                r = parseInt(val.substring(0, 2), 16), g = parseInt(val.substring(2, 4), 16), 
                b = parseInt(val.substring(4, 6), 16), 6 < val.length && (a = +((a = parseInt(val.substring(6, 8), 16)) / 255).toFixed(2))) : (val = val.replace(/\s/g, ""), 
                (values = (match = /^(?:rgb|rgba)\(([^\)]*)\)$/.exec(val)) ? match[1].split(",").map(function(x, i) {
                    return parseFloat(x);
                }) : values) && (r = values[0], g = values[1], b = values[2], 4 === values.length) && (a = values[3] || 1)), 
                rgba[val] = {
                    r: r,
                    g: g,
                    b: b,
                    a: a
                }), rgba[val];
            }(val)).r / 255, GsRGB = col.g / 255, col = col.b / 255, RsRGB = RsRGB <= .03928 ? RsRGB / 12.92 : Math.pow((.055 + RsRGB) / 1.055, 2.4), 
            GsRGB = GsRGB <= .03928 ? GsRGB / 12.92 : Math.pow((.055 + GsRGB) / 1.055, 2.4), 
            col = col <= .03928 ? col / 12.92 : Math.pow((.055 + col) / 1.055, 2.4), 
            luma[val] = .2126 * RsRGB + .7152 * GsRGB + .0722 * col), luma[val];
        }
        function isReadable(color1, color2, wcag2, limit) {
            return color1 = getLuminance(color1), color2 = getLuminance(color2), 
            wcag2 = wcag2 || 4.5, limit = limit || 21, (color1 = (Math.max(color1, color2) + .05) / (Math.min(color1, color2) + .05)) >= parseFloat(wcag2) && color1 < parseFloat(limit);
        }
        tinymce.PluginManager.add("importcss", function(ed, url) {
            var self = this;
            function setGuideLinesColor() {
                var gray = [ "#000000", "#080808", "#101010", "#181818", "#202020", "#282828", "#303030", "#383838", "#404040", "#484848", "#505050", "#585858", "#606060", "#686868", "#696969", "#707070", "#787878", "#808080", "#888888", "#909090", "#989898", "#a0a0a0", "#a8a8a8", "#a9a9a9", "#b0b0b0", "#b8b8b8", "#bebebe", "#c0c0c0", "#c8c8c8", "#d0d0d0", "#d3d3d3", "#d8d8d8", "#dcdcdc", "#e0e0e0", "#e8e8e8", "#f0f0f0", "#f5f5f5", "#f8f8f8", "#ffffff" ], blue = [ "#0d47a1", "#1565c0", "#1976d2", "#1e88e5", "#2196f3", "#42a5f5", "#64b5f6", "#90caf9", "#bbdefb", "#e3f2fd" ], guidelines = "#787878", control = "#1e88e5", bodybg = ed.dom.getStyle(ed.getBody(), "background-color", !0), color = ed.dom.getStyle(ed.getBody(), "color", !0);
                if (bodybg) {
                    ed._hasGuidelines = !0;
                    for (var i = 0; i < gray.length; i++) if (isReadable(gray[i], bodybg, 4.5, 5) && ed.dom.toHex(color) !== ed.dom.toHex(gray[i])) {
                        guidelines = gray[i];
                        break;
                    }
                    for (var css, i = 0; i < blue.length; i++) if (isReadable(blue[i], bodybg, 4.5, 5)) {
                        control = blue[i];
                        break;
                    }
                    (guidelines || control) && (css = ":root{", guidelines && (css = css + "--mce-guidelines: " + guidelines + ";--mce-visualchars: #a8a8a8;"), 
                    css += "--mce-placeholder: #efefef;", control && (css = css + "--mce-control-selection: " + control + ";--mce-control-selection-bg: #b4d7ff;"), 
                    ed.dom.addStyle(css += "}"));
                }
            }
            ed.onImportCSS = new tinymce.util.Dispatcher(), ed.onImportCSS.add(function() {
                tinymce.is(ed.settings.importcss_classes) || self.get();
            }), ed.onInit.add(function() {
                var hex, bodybg, color;
                ed.onImportCSS.dispatch(), "auto" !== ed.settings.content_style_reset || ed.dom.hasClass(ed.getBody(), "mceContentReset") || (bodybg = ed.dom.getStyle(ed.getBody(), "background-color", !0), 
                color = ed.dom.getStyle(ed.getBody(), "color", !0), bodybg && color && ((hex = ed.dom.toHex(bodybg)) == ed.dom.toHex(color) && "#000000" === hex || isReadable(color, bodybg, 3) || ed.dom.addClass(ed.getBody(), "mceContentReset"))), 
                setGuideLinesColor();
            }), ed.onFocus.add(function(ed) {
                ed._hasGuidelines || setGuideLinesColor();
            }), this.get = function() {
                var self = this, doc = ed.getDoc(), href = "", rules = [], fontface = [], filtered = {}, classes = [], bodyRx = !!ed.settings.body_class && new RegExp(".(" + ed.settings.body_class.split(" ").join("|") + ")");
                if (!classes.length) try {
                    each(doc.styleSheets, function(styleSheet) {
                        !function parseCSS(stylesheet) {
                            each(stylesheet.imports, function(r) {
                                var v;
                                0 < r.href.indexOf("://fonts.googleapis.com") ? (v = "@import url(" + r.href + ");", 
                                -1 === self.fontface.indexOf(v) && self.fontface.unshift(v)) : parseCSS(r);
                            });
                            try {
                                if (rules = stylesheet.cssRules || stylesheet.rules, 
                                !(href = stylesheet.href)) return;
                                if (url = href, -1 !== /\/(tinymce|plugins\/jce)\//.match(url) && -1 !== url.indexOf("content.css")) return;
                                href = href.substr(0, href.lastIndexOf("/") + 1), 
                                ed.hasStyleSheets = !0;
                            } catch (e) {}
                            var url;
                            each(rules, function(r) {
                                switch (r.type || 1) {
                                  case 1:
                                    if (!function(href) {
                                        var styleselect = ed.getParam("styleselect_stylesheets");
                                        return !styleselect || (void 0 === filtered[href] && (filtered[href] = -1 !== href.indexOf(styleselect)), 
                                        filtered[href]);
                                    }(stylesheet.href)) return !0;
                                    r.selectorText && each(r.selectorText.split(","), function(v) {
                                        var value;
                                        v = v.trim(), /\.mce[-A-Za-z0-9]/.test(v) || /\.wf[e]?-/.test(v) || (value = v, 
                                        bodyRx && bodyRx.test(value)) || /\.[\w\-\:]+$/.test(v) && classes.push(v);
                                    });
                                    break;

                                  case 3:
                                    0 < r.href.indexOf("//fonts.googleapis.com") && (v = "@import url(" + r.href + ");", 
                                    -1 === fontface.indexOf(v)) && fontface.unshift(v), 
                                    -1 === r.href.indexOf("//") && parseCSS(r.styleSheet);
                                    break;

                                  case 5:
                                    var v;
                                    r.cssText && !1 === /(fontawesome|glyphicons|icomoon)/i.test(r.cssText) && (u = r.cssText, 
                                    p = href, v = u.replace(/url\(["']?(.+?)["']?\)/gi, function(a, b) {
                                        return b.indexOf("://") < 0 ? 'url("' + p + b + '")' : a;
                                    }), -1 === fontface.indexOf(v)) && fontface.push(v);
                                }
                                var u, p;
                            });
                        }(styleSheet);
                    });
                } catch (ex) {}
                if (!fontface.length) try {
                    var setCss, head = DOM.doc.getElementsByTagName("head")[0], style = DOM.create("style", {
                        type: "text/css"
                    }), css = self.fontface.join("\n");
                    style.styleSheet ? (setCss = function() {
                        try {
                            style.styleSheet.cssText = css;
                        } catch (e) {}
                    }, style.styleSheet.disabled ? setTimeout(setCss, 10) : setCss()) : style.appendChild(DOM.doc.createTextNode(css)), 
                    head.appendChild(style);
                } catch (e) {}
                if (classes.length) return classes = classes.filter(function(val, ind, arr) {
                    return arr.indexOf(val) === ind;
                }), ed.getParam("styleselect_sort", 1) && classes.sort(), ed.settings.importcss_classes = tinymce.map(classes, function(val) {
                    var selectorText = (selectorText = /^(?:([a-z0-9\-_]+))?(\.[a-z0-9_\-\.]+)$/i.exec(selectorText = val)) && "body" !== selectorText[1] ? selectorText[2].substr(1).split(".").join(" ") : "", style = PreviewCss.getCssText(ed, {
                        classes: selectorText.split(" ")
                    });
                    return {
                        selector: val,
                        class: selectorText,
                        style: style
                    };
                }), PreviewCss.reset(), ed.settings.importcss_classes;
            };
        });
    }(), tinymce.PluginManager.add("colorpicker", function(ed, url) {
        ed.addCommand("mceColorPicker", function(ui, v) {
            ed.windowManager.open({
                url: ed.getParam("site_url") + "index.php?option=com_jce&task=plugin.display&plugin=colorpicker",
                size: "mce-modal-portrait-320",
                close_previous: !1
            }, {
                input_color: v.color,
                func: v.func
            });
        });
    }), function() {
        var each = tinymce.each, JSON = tinymce.util.JSON, RangeUtils = tinymce.dom.RangeUtils, Uuid = tinymce.util.Uuid, Env = tinymce.util.Env;
        tinymce.PluginManager.add("upload", function(ed, url) {
            var plugins = [], files = [], noop = (ed.onPreInit.add(function() {
                function bindUploadEvents(ed) {
                    each(ed.dom.select(".mce-item-upload-marker", ed.getBody()), function(n) {
                        0 == plugins.length ? ed.dom.remove(n) : bindUploadMarkerEvents(n);
                    });
                }
                each(ed.plugins, function(plg, name) {
                    var data;
                    tinymce.is(plg.getUploadConfig, "function") && (data = plg.getUploadConfig()).inline && data.filetypes && plugins.push(plg);
                }), ed.onBeforeSetContent.add(function(ed, o) {
                    o.content = o.content.replace(/<\/media>/g, "&nbsp;</media>");
                }), ed.onPostProcess.add(function(ed, o) {
                    o.content = o.content.replace(/(&nbsp;|\u00a0)<\/media>/g, "</media>");
                }), ed.schema.addValidElements("+media[type|width|height|class|style|title|*]"), 
                ed.serializer.addAttributeFilter("data-mce-marker", function(nodes, name, args) {
                    for (var i = nodes.length; i--; ) nodes[i].remove();
                }), ed.parser.addNodeFilter("img,media", function(nodes) {
                    for (var node, i = nodes.length; i--; ) !function(node) {
                        return "media" === node.name || "img" === node.name && (node.attr("data-mce-upload-marker") || !(!(node = node.attr("class")) || -1 == node.indexOf("upload-placeholder")));
                    }(node = nodes[i]) || (0 == plugins.length ? node.remove() : function(node) {
                        var src = node.attr("src") || "", style = {}, cls = [];
                        node.attr("alt") || /data:image/.test(src) || (src = src.substring(src.length, src.lastIndexOf("/") + 1), 
                        node.attr("alt", src)), node.attr("style") && (style = ed.dom.styles.parse(node.attr("style"))), 
                        node.attr("hspace") && (style["margin-left"] = style["margin-right"] = node.attr("hspace")), 
                        node.attr("vspace") && (style["margin-top"] = style["margin-bottom"] = node.attr("vspace")), 
                        node.attr("align") && (style.float = node.attr("align")), 
                        (cls = node.attr("class") ? node.attr("class").replace(/\s*upload-placeholder\s*/, "").split(" ") : cls).push("mce-item-upload"), 
                        cls.push("mce-item-upload-marker"), "media" === node.name && (node.name = "img", 
                        node.shortEnded = !0), node.attr({
                            src: Env.transparentSrc,
                            class: tinymce.trim(cls.join(" "))
                        }), src = ed.dom.create("span", {
                            style: style
                        }), (cls = ed.dom.getAttrib(src, "style")) && node.attr({
                            style: cls,
                            "data-mce-style": cls
                        });
                    }(node));
                }), ed.serializer.addNodeFilter("img", function(nodes) {
                    for (var node, cls, i = nodes.length; i--; ) (cls = (node = nodes[i]).attr("class")) && /mce-item-upload-marker/.test(cls) && (cls = cls.replace(/(?:^|\s)(mce-item-)(?!)(upload|upload-marker|upload-placeholder)(?!\S)/g, ""), 
                    node.attr({
                        "data-mce-src": "",
                        src: "",
                        class: tinymce.trim(cls)
                    }), node.name = "media", node.shortEnded = !1, node.attr("alt", null), 
                    node.attr("data-mce-upload-marker", null));
                }), ed.onSetContent.add(function() {
                    bindUploadEvents(ed);
                }), ed.onFullScreen && ed.onFullScreen.add(function(editor) {
                    bindUploadEvents(editor);
                });
            }), ed.onInit.add(function() {
                function cancelEvent(e) {
                    e.preventDefault(), e.stopPropagation();
                }
                0 == plugins.length ? (ed.dom.bind(ed.getBody(), "dragover", function(e) {
                    var dataTransfer = e.dataTransfer;
                    dataTransfer && dataTransfer.files && dataTransfer.files.length && e.preventDefault();
                }), ed.dom.bind(ed.getBody(), "drop", function(e) {
                    var dataTransfer = e.dataTransfer;
                    dataTransfer && dataTransfer.files && dataTransfer.files.length && e.preventDefault();
                })) : (ed.theme && ed.theme.onResolveName && ed.theme.onResolveName.add(function(theme, o) {
                    var n = o.node;
                    n && "IMG" === n.nodeName && /mce-item-upload/.test(n.className) && (o.name = "placeholder");
                }), ed.dom.bind(ed.getBody(), "dragover", function(e) {
                    e.dataTransfer.dropEffect = tinymce.VK.metaKeyPressed(e) ? "copy" : "move";
                }), ed.dom.bind(ed.getBody(), "drop", function(e) {
                    var rng, dataTransfer = e.dataTransfer;
                    dataTransfer && dataTransfer.files && dataTransfer.files.length && (each(dataTransfer.files, function(file) {
                        rng || (rng = RangeUtils.getCaretRangeFromPoint(e.clientX, e.clientY, ed.getDoc())) && ed.selection.setRng(rng), 
                        addFile(file);
                    }), cancelEvent(e)), files.length && each(files, function(file) {
                        uploadFile(file);
                    }), tinymce.isGecko && "IMG" == e.target.nodeName && cancelEvent(e);
                }));
            }), function() {});
            function uploadHandler(file, success, failure, progress) {
                success = success || noop, failure = failure || noop, progress = progress || noop;
                var xhr, formData, args = {
                    method: "upload",
                    id: Uuid.uuid("wf_"),
                    inline: 1,
                    name: file.filename
                }, url = file.upload_url;
                url += "&" + ed.settings.query, (xhr = new XMLHttpRequest()).open("POST", url), 
                xhr.upload.onprogress = function(e) {
                    progress(e.loaded / e.total * 100);
                }, xhr.onerror = function() {
                    failure("Image upload failed due to a XHR Transport error. Code: " + xhr.status);
                }, xhr.onload = function() {
                    var json;
                    xhr.status < 200 || 300 <= xhr.status ? failure("HTTP Error: " + xhr.status) : ((json = JSON.parse(xhr.responseText)) || failure("Invalid JSON response!"), 
                    json.error || !json.result ? failure(json.error.message || "Invalid JSON response!") : success(json.result));
                }, formData = new FormData(), each(args, function(value, name) {
                    formData.append(name, value);
                }), formData.append("file", file, file.name), xhr.send(formData);
            }
            function addFile(file) {
                if (!/\.(php([0-9]*)|phtml|pl|py|jsp|asp|htm|html|shtml|sh|cgi)\./i.test(file.name) && (each(plugins, function(plg) {
                    if (!file.upload_url) {
                        var url = plg.getUploadURL(file);
                        if (url) return file.upload_url = url, file.uploader = plg, 
                        !1;
                    }
                }), file.upload_url)) {
                    if (tinymce.is(file.uploader.getUploadConfig, "function")) {
                        var config = file.uploader.getUploadConfig(), name = file.target_name || file.name;
                        if (file.filename = name.replace(/[\+\\\/\?\#%&<>"\'=\[\]\{\},;@\^\(\)\xa3\u20ac$~]/g, ""), 
                        !new RegExp(".(" + config.filetypes.join("|") + ")$", "i").test(file.name)) return ed.windowManager.alert({
                            text: ed.getLang("upload.file_extension_error", "File type not supported"),
                            title: ed.getLang("upload.error", "Upload Error")
                        }), 0;
                        if (file.size && (name = parseInt(config.max_size, 10) || 1024, 
                        file.size > 1024 * name)) return ed.windowManager.alert({
                            text: ed.getLang("upload.file_size_error", "File size exceeds maximum allowed size"),
                            title: ed.getLang("upload.error", "Upload Error")
                        }), 0;
                    }
                    var w;
                    return file.marker || !1 === ed.settings.upload_use_placeholder || (config = Uuid.uuid("wf-tmp-"), 
                    ed.execCommand("mceInsertContent", !1, '<span data-mce-marker="1" id="' + config + '">\ufeff</span>', {
                        skip_undo: 1
                    }), name = ed.dom.get(config), /image\/(gif|png|jpeg|jpg)/.test(file.type) && file.size ? (config = Math.round(Math.sqrt(file.size)), 
                    w = Math.max(300, config), config = Math.max(300, config), ed.dom.setStyles(name, {
                        width: w,
                        height: config
                    }), ed.dom.addClass(name, "mce-item-upload")) : ed.setProgressState(!0), 
                    file.marker = name), files.push(file), 1;
                }
                ed.windowManager.alert({
                    text: ed.getLang("upload.file_extension_error", "File type not supported"),
                    title: ed.getLang("upload.error", "Upload Error")
                });
            }
            function bindUploadMarkerEvents(marker) {
                var dom = tinymce.DOM;
                function removeUpload() {
                    dom.setStyles("wf_upload_button", {
                        top: "",
                        left: "",
                        display: "none",
                        zIndex: ""
                    });
                }
                ed.onNodeChange.add(removeUpload), ed.dom.bind(ed.getWin(), "scroll", removeUpload);
                var btn, input = dom.get("wf_upload_input");
                dom.get("wf_upload_button") || (btn = dom.add(dom.doc.body, "div", {
                    id: "wf_upload_button",
                    class: "btn",
                    role: "button",
                    title: ed.getLang("upload.button_description", "Click to upload a file")
                }, '<label for="wf_upload_input"><span class="icon-upload"></span>&nbsp;' + ed.getLang("upload.label", "Upload") + "</label>"), 
                input = dom.add(btn, "input", {
                    type: "file",
                    id: "wf_upload_input"
                })), ed.dom.bind(marker, "mouseover", function(e) {
                    var p2, x, p1, vp;
                    ed.dom.getAttrib(marker, "data-mce-selected") || (vp = ed.dom.getViewPort(ed.getWin()), 
                    p1 = dom.getRect(ed.getContentAreaContainer()), p2 = ed.dom.getRect(marker), 
                    vp.y > p2.y + p2.h / 2 - 25) || vp.y < p2.y + p2.h / 2 + 25 - p1.h || (x = Math.max(p2.x - vp.x, 0) + p1.x, 
                    p1 = Math.max(p2.y - vp.y, 0) + p1.y - Math.max(vp.y - p2.y, 0), 
                    vp = "mce_fullscreen" == ed.id ? dom.get("mce_fullscreen_container").style.zIndex : 0, 
                    dom.setStyles("wf_upload_button", {
                        top: p1 + p2.h / 2 - 16,
                        left: x + p2.w / 2 - 50,
                        display: "block",
                        zIndex: vp + 1
                    }), dom.setStyles("wf_select_button", {
                        top: p1 + p2.h / 2 - 16,
                        left: x + p2.w / 2 - 50,
                        display: "block",
                        zIndex: vp + 1
                    }), input.onchange = function() {
                        var file;
                        input.files && (file = input.files[0]) && (file.marker = marker, 
                        addFile(file)) && (each([ "width", "height" ], function(key) {
                            ed.dom.setStyle(marker, key, ed.dom.getAttrib(marker, key));
                        }), file.marker = ed.dom.rename(marker, "span"), uploadFile(file), 
                        removeUpload());
                    });
                }), ed.dom.bind(marker, "mouseout", function(e) {
                    !e.relatedTarget && 0 < e.clientY || removeUpload();
                });
            }
            function removeFile(file) {
                for (var i = 0; i < files.length; i++) files[i] === file && files.splice(i, 1);
                files.splice(tinymce.inArray(files, file), 1);
            }
            function uploadFile(file) {
                uploadHandler(file, function(response) {
                    response = (response = response.files || []).length ? response[0] : {};
                    file.uploader && (response = tinymce.extend({
                        type: file.type,
                        name: file.name
                    }, response), function(file, data) {
                        var w, h, marker = file.marker, file = file.uploader;
                        ed.selection.select(marker), (file = file.insertUploadedFile(data)) && ("object" == typeof file && file.nodeType && (ed.dom.hasClass(marker, "mce-item-upload-marker") && (data = ed.dom.getAttrib(marker, "data-mce-style"), 
                        w = marker.width || 0, h = marker.height || 0, data && ((data = ed.dom.styles.parse(data)).width && (w = data.width, 
                        delete data.width), data.height && (h = data.height, delete data.height), 
                        ed.dom.setStyles(file, data)), w && ed.dom.setAttrib(file, "width", w), 
                        h) && ed.dom.setAttrib(file, "height", h = w ? "" : h), 
                        ed.undoManager.add(), ed.dom.replace(file, marker)), ed.nodeChanged());
                    }(file, response)), removeFile(file), file.marker && ed.dom.remove(file.marker), 
                    ed.setProgressState(!1);
                }, function(message) {
                    ed.windowManager.alert({
                        text: message,
                        title: ed.getLang("upload.error", "Upload Error")
                    }), removeFile(file), file.marker && ed.dom.remove(file.marker), 
                    ed.setProgressState(!1);
                }, function(value) {
                    file.marker && ed.dom.setAttrib(file.marker, "data-progress", value);
                });
            }
            this.plugins = plugins, this.upload = uploadHandler;
        });
    }(), function() {
        var VK = tinymce.VK, Node = tinymce.html.Node, each = tinymce.each, blocks = [];
        tinymce.PluginManager.add("figure", function(ed, url) {
            ed.onPreInit.add(function(ed) {
                function setClipboardData(ed, e) {
                    var node, content, clipboardData = e.clipboardData;
                    clipboardData && (node = ed.dom.getParent(ed.selection.getNode(), "figure")) && (ed.selection.select(node), 
                    content = {
                        html: content = ed.selection.getContent({
                            contextual: !0
                        }),
                        text: content.toString()
                    }, clipboardData.clearData(), clipboardData.setData("text/html", content.html), 
                    clipboardData.setData("text/plain", content.text), "cut" == e.type) && ed.dom.remove(node);
                }
                ed.parser.addNodeFilter("figure", function(nodes, name) {
                    for (var figcaption, node, i = nodes.length; i--; ) 0 === (node = nodes[i]).getAll("figcaption").length && ((figcaption = new Node("figcaption", 1)).attr("data-mce-empty", ed.getLang("figcaption.default", "Write a caption...")), 
                    figcaption.attr("contenteditable", !0), node.append(figcaption)), 
                    node.attr("data-mce-image", "1"), node.attr("contenteditable", "false"), 
                    each(node.getAll("img"), function(img) {
                        img.attr("data-mce-contenteditable", "true");
                    }), !1 !== ed.settings.figure_data_attribute && node.attr("data-wf-figure", "1");
                }), ed.parser.addNodeFilter("figcaption", function(nodes, name) {
                    for (var node, i = nodes.length; i--; ) (node = nodes[i]).firstChild || node.attr("data-mce-empty", ed.getLang("figcaption.default", "Write a caption...")), 
                    node.attr("contenteditable", "true");
                }), ed.serializer.addNodeFilter("figure", function(nodes, name) {
                    for (var node, i = nodes.length; i--; ) (node = nodes[i]).attr("contenteditable", null), 
                    each(node.getAll("img"), function(img) {
                        img.attr("data-mce-contenteditable", null);
                    });
                }), ed.serializer.addNodeFilter("figcaption", function(nodes, name) {
                    for (var node, i = nodes.length; i--; ) (node = nodes[i]).firstChild ? node.attr("contenteditable", null) : node.remove();
                }), ed.serializer.addAttributeFilter("data-mce-image", function(nodes, name) {
                    for (var i = nodes.length; i--; ) nodes[i].attr(name, null);
                }), each(ed.schema.getBlockElements(), function(v, k) {
                    if (/\W/.test(k)) return !0;
                    blocks.push(k.toLowerCase());
                }), ed.formatter.register("figure", {
                    block: "figure",
                    remove: "all",
                    ceFalseOverride: !0,
                    deep: !1,
                    onformat: function(elm, fmt, vars, node) {
                        vars = vars || {}, ed.dom.select("img,video,iframe", elm) && (ed.dom.setAttribs(elm, {
                            "data-mce-image": 1,
                            contenteditable: !1
                        }), ed.dom.setAttrib(ed.dom.select("img", elm), "data-mce-contenteditable", "true"), 
                        ed.dom.add(elm, "figcaption", {
                            "data-mce-empty": ed.getLang("figcaption.default", "Write a caption..."),
                            contenteditable: !0
                        }, vars.caption || ""), !1 !== ed.settings.figure_data_attribute) && ed.dom.setAttribs(elm, {
                            "data-wf-figure": "1"
                        });
                    },
                    onremove: function(node) {
                        ed.dom.remove(ed.dom.select("figcaption", node)), ed.dom.remove(ed.dom.getParent("figure", node), 1);
                    }
                }), ed.onBeforeExecCommand.add(function(ed, cmd, ui, v, o) {
                    var parent, se = ed.selection, n = se.getNode();
                    switch (cmd) {
                      case "JustifyRight":
                      case "JustifyLeft":
                      case "JustifyCenter":
                        n && ed.dom.is(n, "img,span[data-mce-object]") && (parent = ed.dom.getParent(n, "FIGURE")) && (se.select(parent), 
                        ed.execCommand(cmd, !1), o.terminate = !0);
                    }
                }), ed.onClick.add(function(ed, e) {
                    "IMG" === e.target.nodeName && VK.metaKeyPressed(e) && (e = ed.dom.getParent(e.target, "figure")) && (ed.selection.select(e), 
                    ed.nodeChanged());
                }), ed.onNodeChange.add(function(ed, cm, n) {
                    "FIGURE" !== n.nodeName && ed.dom.removeAttrib(ed.dom.select("figure"), "data-mce-selected");
                }), ed.onCopy.add(setClipboardData), ed.onCut.add(setClipboardData), 
                ed.onKeyDown.add(function(ed, e) {
                    var container, offset, isDelete = e.keyCode == VK.DELETE;
                    if (!e.isDefaultPrevented() && (isDelete || e.keyCode == VK.BACKSPACE) && !VK.modifierPressed(e) && (container = (isDelete = ed.selection.getRng()).startContainer, 
                    offset = isDelete.startOffset, isDelete = isDelete.collapsed, 
                    container = ed.dom.getParent(container, "FIGURE"))) {
                        var node = ed.selection.getNode();
                        if ("IMG" === node.nodeName) ed.dom.remove(container), ed.nodeChanged(), 
                        e.preventDefault(); else if ("FIGCAPTION" != node.nodeName || node.nodeValue && 0 !== node.nodeValue.length || 0 !== node.childNodes.length || e.preventDefault(), 
                        3 === node.nodeType && !isDelete && !offset) {
                            var figcaption = ed.dom.getParent(node, "FIGCAPTION");
                            if (figcaption) {
                                for (;figcaption.firstChild; ) figcaption.removeChild(figcaption.firstChild);
                                e.preventDefault();
                            }
                        }
                    }
                });
            });
        });
    }(), function() {
        var DOM = tinymce.DOM;
        tinymce.PluginManager.add("noneditable", function(editor) {
            var editClass = tinymce.trim(editor.getParam("noneditable_editable_class", "mceEditable")), nonEditClass = tinymce.trim(editor.getParam("noneditable_noneditable_class", "mceNonEditable"));
            function hasClass(checkClassName) {
                return function(node) {
                    return -1 !== (" " + node.attr("class") + " ").indexOf(checkClassName);
                };
            }
            var nonEditableRegExps, hasEditClass = hasClass(editClass), hasNonEditClass = hasClass(nonEditClass);
            (nonEditableRegExps = editor.getParam("noneditable_regexp")) && !nonEditableRegExps.length && (nonEditableRegExps = [ nonEditableRegExps ]), 
            editor.onPreInit.add(function() {
                editor.formatter.register("noneditable", {
                    block: "div",
                    wrapper: !0,
                    onformat: function(elm, fmt, vars) {
                        tinymce.each(vars, function(value, key) {
                            editor.dom.setAttrib(elm, key, value);
                        });
                    }
                }), nonEditableRegExps && editor.onBeforeSetContent.add(function(ed, e) {
                    !function(e) {
                        var i = nonEditableRegExps.length, content = e.content, cls = tinymce.trim(nonEditClass);
                        function replaceMatchWithSpan(match) {
                            var args = arguments, index = args[args.length - 2], prevChar = 0 < index ? content.charAt(index - 1) : "";
                            return '"' === prevChar || ">" === prevChar && -1 !== (prevChar = content.lastIndexOf("<", index)) && -1 !== content.substring(prevChar, index).indexOf('contenteditable="false"') ? match : '<span class="' + cls + '" data-mce-content="' + editor.dom.encode(args[0]) + '">' + editor.dom.encode("string" == typeof args[1] ? args[1] : args[0]) + "</span>";
                        }
                        if ("raw" != e.format) {
                            for (;i--; ) content = content.replace(nonEditableRegExps[i], replaceMatchWithSpan);
                            e.content = content;
                        }
                    }(e);
                }), editor.parser.addAttributeFilter("class", function(nodes) {
                    for (var node, i = nodes.length; i--; ) node = nodes[i], hasEditClass(node) ? node.attr("contenteditable", "true") : hasNonEditClass(node) && node.attr("contenteditable", "false");
                }), editor.serializer.addAttributeFilter("contenteditable", function(nodes) {
                    for (var node, i = nodes.length; i--; ) node = nodes[i], (hasEditClass(node) || hasNonEditClass(node)) && (nonEditableRegExps && node.attr("data-mce-content") ? (node.name = "#text", 
                    node.type = 3, node.raw = !0, node.value = node.attr("data-mce-content")) : node.attr("contenteditable", null));
                });
            }), this.isEditable = function(node) {
                return node.attr ? node.hasClass(editClass) : DOM.hasClass(node, editClass);
            }, this.isNonEditable = function(node) {
                return node.attr ? node.hasClass(nonEditClass) : DOM.hasClass(node, nonEditClass);
            };
        });
    }(), function() {
        var DOM = tinymce.DOM;
        tinymce.PluginManager.add("branding", function(ed, url) {
            !1 !== ed.settings.branding && (ed.onPostRender.add(function() {
                var container = ed.getContentAreaContainer();
                DOM.insertAfter(DOM.create("div", {
                    class: "mceBranding"
                }, 'Powered by JCE Core. <span id="mceBrandingMessage"></span><a href="https://www.joomlacontenteditor.net/buy" target="_blank" title="Get JCE Pro">JCE Pro</a>'), container);
            }), ed.onNodeChange.add(function(ed, cm, n, co) {
                var container = ed.getContentAreaContainer(), msg = "Get more features with ";
                "IMG" === n.nodeName && (msg = "Image resizing, thumbnails and editing in "), 
                ed.dom.is(n, ".mce-item-media") && (msg = "Upload and manage audio and video with "), 
                DOM.setHTML(DOM.get("mceBrandingMessage", container), msg);
            }));
        });
    }(), function() {
        function uniqueId(prefix) {
            return "blobid" + count++;
        }
        var each = tinymce.each, BlobCache = tinymce.file.BlobCache, Conversions = tinymce.file.Conversions, Uuid = tinymce.util.Uuid, DOM = tinymce.DOM, count = 0;
        tinymce.PluginManager.add("blobupload", function(ed, url) {
            var uploaders = [];
            function findMarker(marker) {
                var found;
                return each(ed.dom.select("img[src]"), function(image) {
                    if (image.src == marker.src) return found = image, !1;
                }), found;
            }
            function removeMarker(marker) {
                each(ed.dom.select("img[src]"), function(image) {
                    image.src == marker.src && (ed.selection.select(image), ed.execCommand("mceRemoveNode"), 
                    "P" == (image = ed.selection.getNode()).nodeName) && ed.dom.isEmpty(image) && ed.dom.add(image, "br", {
                        "data-mce-bogus": 1
                    });
                });
            }
            function uploadPastedImage(marker, blobInfo) {
                return new Promise(function(resolve, reject) {
                    if (!uploaders.length) return removeMarker(marker), resolve();
                    var html = '<div class="mceForm"><p>' + ed.getLang("upload.name_description", "Please supply a name for this file") + '</p><div class="mceModalRow">   <label for="' + ed.id + '_blob_input">' + ed.getLang("dlg.name", "Name") + '</label>   <div class="mceModalControl mceModalControlAppend">       <input type="text" id="' + ed.id + '_blob_input" autofocus />       <select id="' + ed.id + '_blob_mimetype">           <option value="jpeg">jpeg</option>           <option value="png">png</option>       </select>   </div></div><div class="mceModalRow">   <label for="' + ed.id + '_blob_input">' + ed.getLang("dlg.quality", "Quality") + '</label>   <div class="mceModalControl">       <select id="' + ed.id + '_blob_quality" class="mce-flex-25">           <option value="100">100</option>           <option value="90">90</option>           <option value="80">80</option>           <option value="70">70</option>           <option value="60">60</option>           <option value="50">50</option>           <option value="40">40</option>           <option value="30">30</option>           <option value="20">20</option>           <option value="10">10</option>       </select>       <span role="presentation">%</span>   </div></div></div>', win = ed.windowManager.open({
                        title: ed.getLang("dlg.name", "Name"),
                        content: html,
                        size: "mce-modal-landscape-small",
                        buttons: [ {
                            title: ed.getLang("cancel", "Cancel"),
                            id: "cancel"
                        }, {
                            title: ed.getLang("submit", "Submit"),
                            id: "submit",
                            onclick: function(e) {
                                var url, uploader, quality, value, images, filename = DOM.getValue(ed.id + "_blob_input");
                                return filename ? (filename = filename.replace(/[\+\\\/\?\#%&<>"\'=\[\]\{\},;@\^\(\)\xa3\u20ac$~]/g, ""), 
                                /\.(php([0-9]*)|phtml|pl|py|jsp|asp|htm|html|shtml|sh|cgi)\b/i.test(filename) ? (ed.windowManager.alert({
                                    text: ed.getLang("upload.file_extension_error", "File type not supported"),
                                    title: ed.getLang("upload.error", "Upload Error")
                                }), removeMarker(marker), resolve()) : (each(uploaders, function(instance) {
                                    if (!url && (url = instance.getUploadURL({
                                        name: blobInfo.filename()
                                    }))) return uploader = instance, !1;
                                }), url ? (value = blobInfo.filename(), value = (/\.(jpg|jpeg|png|gif|webp|avif)$/.test(value) ? value.substring(value.length, value.lastIndexOf(".") + 1) : "") || "jpeg", 
                                quality = DOM.getValue(ed.id + "_blob_quality") || 100, 
                                value = DOM.getValue(ed.id + "_blob_mimetype") || value, 
                                filename = {
                                    method: "upload",
                                    id: Uuid.uuid("wf_"),
                                    inline: 1,
                                    name: filename,
                                    url: url + "&" + ed.settings.query,
                                    mimetype: "image/" + value,
                                    quality: quality
                                }, images = tinymce.grep(ed.dom.select("img[src]"), function(image) {
                                    return image.src == marker.src;
                                }), ed.setProgressState(!0), void function(settings, blobInfo, failure) {
                                    var formData, xhr = new XMLHttpRequest();
                                    xhr.open("POST", settings.url), xhr.upload.onprogress = function(e) {
                                        e.loaded, e.total;
                                    }, xhr.onerror = function() {
                                        failure("Image upload failed due to a XHR Transport error. Code: " + xhr.status);
                                    }, xhr.onload = function() {
                                        var json, data;
                                        xhr.status < 200 || 300 <= xhr.status ? failure("HTTP Error: " + xhr.status) : (json = JSON.parse(xhr.responseText)) && !json.error && json.result && json.result.files ? ((data = json.result.files[0]).marker = images[0], 
                                        (data = uploader.insertUploadedFile(data)) && (ed.undoManager.add(), 
                                        ed.dom.replace(data, images[0]), ed.selection.select(data)), 
                                        ed.setProgressState(!1), win.close(), resolve()) : failure(json.error.message || "Invalid JSON response!");
                                    }, (formData = new FormData()).append("file", blobInfo.blob(), blobInfo.filename()), 
                                    each(settings, function(value, name) {
                                        if ("url" == name || "multipart" == name) return !0;
                                        formData.append(name, value);
                                    }), xhr.send(formData);
                                }(filename, blobInfo, function(error) {
                                    ed.windowManager.alert({
                                        text: error,
                                        title: ed.getLang("upload.error", "Upload Error")
                                    }), ed.setProgressState(!1), resolve();
                                })) : (removeMarker(marker), resolve()))) : (removeMarker(marker), 
                                resolve());
                            },
                            classes: "primary"
                        } ],
                        open: function() {
                            window.setTimeout(function() {
                                DOM.get(ed.id + "_blob_input").focus();
                            }, 10);
                        },
                        close: function() {
                            return removeMarker(marker), resolve();
                        }
                    });
                });
            }
            ed.onPreInit.add(function() {
                each(ed.plugins, function(plg, name) {
                    var data;
                    tinymce.is(plg.getUploadConfig, "function") && (data = plg.getUploadConfig()).inline && data.filetypes && uploaders.push(plg);
                });
            }), ed.onInit.add(function() {
                ed.onPasteBeforeInsert.add(function(ed, o) {
                    var promises, images, cachedPromises, o = ed.dom.create("div", 0, o.content);
                    (o = tinymce.grep(ed.dom.select("img[src]", o), function(img) {
                        var src = img.getAttribute("src");
                        return !(img.hasAttribute("data-mce-bogus") || img.hasAttribute("data-mce-placeholder") || img.hasAttribute("data-mce-upload-marker") || !src || "data:image/gif;base64,R0lGODlhAQABAIAAAAAAAP///yH5BAEAAAAALAAAAAABAAEAAAIBRAA7" == src || 0 !== src.indexOf("blob:") && 0 !== src.indexOf("data:"));
                    })).length && (promises = [], images = o, cachedPromises = {}, 
                    images = tinymce.map(o, function(img) {
                        var newPromise;
                        return cachedPromises[img.src] ? new Promise(function(resolve) {
                            cachedPromises[img.src].then(function(imageInfo) {
                                if ("string" == typeof imageInfo) return imageInfo;
                                resolve({
                                    image: img,
                                    blobInfo: imageInfo.blobInfo
                                });
                            });
                        }) : (newPromise = new Promise(function(resolve, reject) {
                            !function(blobCache, img, resolve, reject) {
                                var base64, blobInfo;
                                0 === img.src.indexOf("blob:") ? (blobInfo = blobCache.getByUri(img.src)) ? resolve({
                                    image: img,
                                    blobInfo: blobInfo
                                }) : Conversions.uriToBlob(img.src).then(function(blob) {
                                    Conversions.blobToDataUri(blob).then(function(dataUri) {
                                        base64 = Conversions.parseDataUri(dataUri).data, 
                                        blobInfo = blobCache.create(uniqueId(), blob, base64), 
                                        blobCache.add(blobInfo), resolve({
                                            image: img,
                                            blobInfo: blobInfo
                                        });
                                    });
                                }, function(err) {
                                    reject(err);
                                }) : (base64 = Conversions.parseDataUri(img.src).data, 
                                (blobInfo = blobCache.findFirst(function(cachedBlobInfo) {
                                    return cachedBlobInfo.base64() === base64;
                                })) ? resolve({
                                    image: img,
                                    blobInfo: blobInfo
                                }) : Conversions.uriToBlob(img.src).then(function(blob) {
                                    blobInfo = blobCache.create(uniqueId(), blob, base64), 
                                    blobCache.add(blobInfo), resolve({
                                        image: img,
                                        blobInfo: blobInfo
                                    });
                                }, function(err) {
                                    reject(err);
                                }));
                            }(BlobCache, img, resolve, reject);
                        }).then(function(result) {
                            return delete cachedPromises[result.image.src], result;
                        }).catch(function(error) {
                            return delete cachedPromises[img.src], error;
                        }), cachedPromises[img.src] = newPromise);
                    }), Promise.all(images).then(function(result) {
                        each(result, function(item) {
                            "string" != typeof item && (ed.selection.select(findMarker(item.image)), 
                            ed.selection.scrollIntoView(), promises.push(uploadPastedImage(item.image, item.blobInfo)));
                        });
                    }), Promise.all(promises).then());
                });
            });
        });
    }();
}();tinymce/license.txt000060400000043077152456167170010424 0ustar00                    GNU GENERAL PUBLIC LICENSE
                       Version 2, June 1991

 Copyright (C) 1989, 1991 Free Software Foundation, Inc.,
 <https://fsf.org/>
 Everyone is permitted to copy and distribute verbatim copies
 of this license document, but changing it is not allowed.

                            Preamble

  The licenses for most software are designed to take away your
freedom to share and change it.  By contrast, the GNU General Public
License is intended to guarantee your freedom to share and change free
software--to make sure the software is free for all its users.  This
General Public License applies to most of the Free Software
Foundation's software and to any other program whose authors commit to
using it.  (Some other Free Software Foundation software is covered by
the GNU Lesser General Public License instead.)  You can apply it to
your programs, too.

  When we speak of free software, we are referring to freedom, not
price.  Our General Public Licenses are designed to make sure that you
have the freedom to distribute copies of free software (and charge for
this service if you wish), that you receive source code or can get it
if you want it, that you can change the software or use pieces of it
in new free programs; and that you know you can do these things.

  To protect your rights, we need to make restrictions that forbid
anyone to deny you these rights or to ask you to surrender the rights.
These restrictions translate to certain responsibilities for you if you
distribute copies of the software, or if you modify it.

  For example, if you distribute copies of such a program, whether
gratis or for a fee, you must give the recipients all the rights that
you have.  You must make sure that they, too, receive or can get the
source code.  And you must show them these terms so they know their
rights.

  We protect your rights with two steps: (1) copyright the software, and
(2) offer you this license which gives you legal permission to copy,
distribute and/or modify the software.

  Also, for each author's protection and ours, we want to make certain
that everyone understands that there is no warranty for this free
software.  If the software is modified by someone else and passed on, we
want its recipients to know that what they have is not the original, so
that any problems introduced by others will not reflect on the original
authors' reputations.

  Finally, any free program is threatened constantly by software
patents.  We wish to avoid the danger that redistributors of a free
program will individually obtain patent licenses, in effect making the
program proprietary.  To prevent this, we have made it clear that any
patent must be licensed for everyone's free use or not licensed at all.

  The precise terms and conditions for copying, distribution and
modification follow.

                    GNU GENERAL PUBLIC LICENSE
   TERMS AND CONDITIONS FOR COPYING, DISTRIBUTION AND MODIFICATION

  0. This License applies to any program or other work which contains
a notice placed by the copyright holder saying it may be distributed
under the terms of this General Public License.  The "Program", below,
refers to any such program or work, and a "work based on the Program"
means either the Program or any derivative work under copyright law:
that is to say, a work containing the Program or a portion of it,
either verbatim or with modifications and/or translated into another
language.  (Hereinafter, translation is included without limitation in
the term "modification".)  Each licensee is addressed as "you".

Activities other than copying, distribution and modification are not
covered by this License; they are outside its scope.  The act of
running the Program is not restricted, and the output from the Program
is covered only if its contents constitute a work based on the
Program (independent of having been made by running the Program).
Whether that is true depends on what the Program does.

  1. You may copy and distribute verbatim copies of the Program's
source code as you receive it, in any medium, provided that you
conspicuously and appropriately publish on each copy an appropriate
copyright notice and disclaimer of warranty; keep intact all the
notices that refer to this License and to the absence of any warranty;
and give any other recipients of the Program a copy of this License
along with the Program.

You may charge a fee for the physical act of transferring a copy, and
you may at your option offer warranty protection in exchange for a fee.

  2. You may modify your copy or copies of the Program or any portion
of it, thus forming a work based on the Program, and copy and
distribute such modifications or work under the terms of Section 1
above, provided that you also meet all of these conditions:

    a) You must cause the modified files to carry prominent notices
    stating that you changed the files and the date of any change.

    b) You must cause any work that you distribute or publish, that in
    whole or in part contains or is derived from the Program or any
    part thereof, to be licensed as a whole at no charge to all third
    parties under the terms of this License.

    c) If the modified program normally reads commands interactively
    when run, you must cause it, when started running for such
    interactive use in the most ordinary way, to print or display an
    announcement including an appropriate copyright notice and a
    notice that there is no warranty (or else, saying that you provide
    a warranty) and that users may redistribute the program under
    these conditions, and telling the user how to view a copy of this
    License.  (Exception: if the Program itself is interactive but
    does not normally print such an announcement, your work based on
    the Program is not required to print an announcement.)

These requirements apply to the modified work as a whole.  If
identifiable sections of that work are not derived from the Program,
and can be reasonably considered independent and separate works in
themselves, then this License, and its terms, do not apply to those
sections when you distribute them as separate works.  But when you
distribute the same sections as part of a whole which is a work based
on the Program, the distribution of the whole must be on the terms of
this License, whose permissions for other licensees extend to the
entire whole, and thus to each and every part regardless of who wrote it.

Thus, it is not the intent of this section to claim rights or contest
your rights to work written entirely by you; rather, the intent is to
exercise the right to control the distribution of derivative or
collective works based on the Program.

In addition, mere aggregation of another work not based on the Program
with the Program (or with a work based on the Program) on a volume of
a storage or distribution medium does not bring the other work under
the scope of this License.

  3. You may copy and distribute the Program (or a work based on it,
under Section 2) in object code or executable form under the terms of
Sections 1 and 2 above provided that you also do one of the following:

    a) Accompany it with the complete corresponding machine-readable
    source code, which must be distributed under the terms of Sections
    1 and 2 above on a medium customarily used for software interchange; or,

    b) Accompany it with a written offer, valid for at least three
    years, to give any third party, for a charge no more than your
    cost of physically performing source distribution, a complete
    machine-readable copy of the corresponding source code, to be
    distributed under the terms of Sections 1 and 2 above on a medium
    customarily used for software interchange; or,

    c) Accompany it with the information you received as to the offer
    to distribute corresponding source code.  (This alternative is
    allowed only for noncommercial distribution and only if you
    received the program in object code or executable form with such
    an offer, in accord with Subsection b above.)

The source code for a work means the preferred form of the work for
making modifications to it.  For an executable work, complete source
code means all the source code for all modules it contains, plus any
associated interface definition files, plus the scripts used to
control compilation and installation of the executable.  However, as a
special exception, the source code distributed need not include
anything that is normally distributed (in either source or binary
form) with the major components (compiler, kernel, and so on) of the
operating system on which the executable runs, unless that component
itself accompanies the executable.

If distribution of executable or object code is made by offering
access to copy from a designated place, then offering equivalent
access to copy the source code from the same place counts as
distribution of the source code, even though third parties are not
compelled to copy the source along with the object code.

  4. You may not copy, modify, sublicense, or distribute the Program
except as expressly provided under this License.  Any attempt
otherwise to copy, modify, sublicense or distribute the Program is
void, and will automatically terminate your rights under this License.
However, parties who have received copies, or rights, from you under
this License will not have their licenses terminated so long as such
parties remain in full compliance.

  5. You are not required to accept this License, since you have not
signed it.  However, nothing else grants you permission to modify or
distribute the Program or its derivative works.  These actions are
prohibited by law if you do not accept this License.  Therefore, by
modifying or distributing the Program (or any work based on the
Program), you indicate your acceptance of this License to do so, and
all its terms and conditions for copying, distributing or modifying
the Program or works based on it.

  6. Each time you redistribute the Program (or any work based on the
Program), the recipient automatically receives a license from the
original licensor to copy, distribute or modify the Program subject to
these terms and conditions.  You may not impose any further
restrictions on the recipients' exercise of the rights granted herein.
You are not responsible for enforcing compliance by third parties to
this License.

  7. If, as a consequence of a court judgment or allegation of patent
infringement or for any other reason (not limited to patent issues),
conditions are imposed on you (whether by court order, agreement or
otherwise) that contradict the conditions of this License, they do not
excuse you from the conditions of this License.  If you cannot
distribute so as to satisfy simultaneously your obligations under this
License and any other pertinent obligations, then as a consequence you
may not distribute the Program at all.  For example, if a patent
license would not permit royalty-free redistribution of the Program by
all those who receive copies directly or indirectly through you, then
the only way you could satisfy both it and this License would be to
refrain entirely from distribution of the Program.

If any portion of this section is held invalid or unenforceable under
any particular circumstance, the balance of the section is intended to
apply and the section as a whole is intended to apply in other
circumstances.

It is not the purpose of this section to induce you to infringe any
patents or other property right claims or to contest validity of any
such claims; this section has the sole purpose of protecting the
integrity of the free software distribution system, which is
implemented by public license practices.  Many people have made
generous contributions to the wide range of software distributed
through that system in reliance on consistent application of that
system; it is up to the author/donor to decide if he or she is willing
to distribute software through any other system and a licensee cannot
impose that choice.

This section is intended to make thoroughly clear what is believed to
be a consequence of the rest of this License.

  8. If the distribution and/or use of the Program is restricted in
certain countries either by patents or by copyrighted interfaces, the
original copyright holder who places the Program under this License
may add an explicit geographical distribution limitation excluding
those countries, so that distribution is permitted only in or among
countries not thus excluded.  In such case, this License incorporates
the limitation as if written in the body of this License.

  9. The Free Software Foundation may publish revised and/or new versions
of the General Public License from time to time.  Such new versions will
be similar in spirit to the present version, but may differ in detail to
address new problems or concerns.

Each version is given a distinguishing version number.  If the Program
specifies a version number of this License which applies to it and "any
later version", you have the option of following the terms and conditions
either of that version or of any later version published by the Free
Software Foundation.  If the Program does not specify a version number of
this License, you may choose any version ever published by the Free Software
Foundation.

  10. If you wish to incorporate parts of the Program into other free
programs whose distribution conditions are different, write to the author
to ask for permission.  For software which is copyrighted by the Free
Software Foundation, write to the Free Software Foundation; we sometimes
make exceptions for this.  Our decision will be guided by the two goals
of preserving the free status of all derivatives of our free software and
of promoting the sharing and reuse of software generally.

                            NO WARRANTY

  11. BECAUSE THE PROGRAM IS LICENSED FREE OF CHARGE, THERE IS NO WARRANTY
FOR THE PROGRAM, TO THE EXTENT PERMITTED BY APPLICABLE LAW.  EXCEPT WHEN
OTHERWISE STATED IN WRITING THE COPYRIGHT HOLDERS AND/OR OTHER PARTIES
PROVIDE THE PROGRAM "AS IS" WITHOUT WARRANTY OF ANY KIND, EITHER EXPRESSED
OR IMPLIED, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF
MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE.  THE ENTIRE RISK AS
TO THE QUALITY AND PERFORMANCE OF THE PROGRAM IS WITH YOU.  SHOULD THE
PROGRAM PROVE DEFECTIVE, YOU ASSUME THE COST OF ALL NECESSARY SERVICING,
REPAIR OR CORRECTION.

  12. IN NO EVENT UNLESS REQUIRED BY APPLICABLE LAW OR AGREED TO IN WRITING
WILL ANY COPYRIGHT HOLDER, OR ANY OTHER PARTY WHO MAY MODIFY AND/OR
REDISTRIBUTE THE PROGRAM AS PERMITTED ABOVE, BE LIABLE TO YOU FOR DAMAGES,
INCLUDING ANY GENERAL, SPECIAL, INCIDENTAL OR CONSEQUENTIAL DAMAGES ARISING
OUT OF THE USE OR INABILITY TO USE THE PROGRAM (INCLUDING BUT NOT LIMITED
TO LOSS OF DATA OR DATA BEING RENDERED INACCURATE OR LOSSES SUSTAINED BY
YOU OR THIRD PARTIES OR A FAILURE OF THE PROGRAM TO OPERATE WITH ANY OTHER
PROGRAMS), EVEN IF SUCH HOLDER OR OTHER PARTY HAS BEEN ADVISED OF THE
POSSIBILITY OF SUCH DAMAGES.

                     END OF TERMS AND CONDITIONS

            How to Apply These Terms to Your New Programs

  If you develop a new program, and you want it to be of the greatest
possible use to the public, the best way to achieve this is to make it
free software which everyone can redistribute and change under these terms.

  To do so, attach the following notices to the program.  It is safest
to attach them to the start of each source file to most effectively
convey the exclusion of warranty; and each file should have at least
the "copyright" line and a pointer to where the full notice is found.

    <one line to give the program's name and a brief idea of what it does.>
    Copyright (C) <year>  <name of author>

    This program is free software; you can redistribute it and/or modify
    it under the terms of the GNU General Public License as published by
    the Free Software Foundation; either version 2 of the License, or
    (at your option) any later version.

    This program is distributed in the hope that it will be useful,
    but WITHOUT ANY WARRANTY; without even the implied warranty of
    MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
    GNU General Public License for more details.

    You should have received a copy of the GNU General Public License along
    with this program; if not, see <https://www.gnu.org/licenses/>.

Also add information on how to contact you by electronic and paper mail.

If the program is interactive, make it output a short notice like this
when it starts in an interactive mode:

    Gnomovision version 69, Copyright (C) year name of author
    Gnomovision comes with ABSOLUTELY NO WARRANTY; for details type `show w'.
    This is free software, and you are welcome to redistribute it
    under certain conditions; type `show c' for details.

The hypothetical commands `show w' and `show c' should show the appropriate
parts of the General Public License.  Of course, the commands you use may
be called something other than `show w' and `show c'; they could even be
mouse-clicks or menu items--whatever suits your program.

You should also get your employer (if you work as a programmer) or your
school, if any, to sign a "copyright disclaimer" for the program, if
necessary.  Here is a sample; alter the names:

  Yoyodyne, Inc., hereby disclaims all copyright interest in the program
  `Gnomovision' (which makes passes at compilers) written by James Hacker.

  <signature of Moe Ghoul>, 1 April 1989
  Moe Ghoul, President of Vice

This General Public License does not permit incorporating your program into
proprietary programs.  If your program is a subroutine library, you may
consider it more useful to permit linking proprietary applications with the
library.  If this is what you want to do, use the GNU Lesser General
Public License instead of this License.tinymce/plugins/core/plugin.js000060400000015751152456167170012504 0ustar00/* jce - 2.9.99.2 | 2026-04-22 | https://www.joomlacontenteditor.net | Source: https://github.com/widgetfactory/jce | Copyright (C) 2006 - 2026 Ryan Demmer. All rights reserved | GNU/GPL Version 2 or later - http://www.gnu.org/licenses/gpl-2.0.html */
!function() {
    var Entities = tinymce.html.Entities, each = tinymce.each, extend = tinymce.extend, DomParser = tinymce.html.DomParser, HtmlSerializer = tinymce.html.Serializer, Dispatcher = tinymce.util.Dispatcher, DOM = tinymce.DOM;
    tinymce.PluginManager.add("core", function(ed, url) {
        var store;
        ed.onUpdateMedia = new Dispatcher(), ed.onWfEditorSave = new Dispatcher();
        var contentLoaded = !1, elm = ed.getElement();
        var startup_content_html = ed.settings.startup_content_html || "", quoteMap = (ed.onBeforeRenderUI.add(function() {
            if (startup_content_html && elm && !contentLoaded && ("TEXTAREA" === elm.nodeName ? "" == elm.value : "" == elm.innerHTML)) return contentLoaded = !0, 
            value = startup_content_html, (value = Entities.decode(value)) && ("TEXTAREA" === elm.nodeName ? elm.value = value : elm.innerHTML = value), 
            !0;
            var value;
        }), {
            en: {
                '"': "&ldquo;{$selection}&rdquo;",
                "'": "&lsquo;{$selection}&rsquo;"
            },
            de: {
                '"': "&bdquo;{$selection}&ldquo;",
                "'": "&sbquo;{$selection}&rsquo;"
            }
        });
        function fakeRootBlock() {
            ed.settings.editable_root = "rootblock", ed.onPreInit.addToTop(function() {
                var selection = ed.selection, dom = ed.dom;
                dom.settings.root_element = ed.settings.editable_root, ed.schema.addValidElements("#mce:root[id|data-mce-root]"), 
                ed.schema.children["mce:root"] = ed.schema.children.body, ed.schema.children.body["mce:root"] = {}, 
                ed.serializer.addAttributeFilter("data-mce-root", function(nodes) {
                    for (var i = nodes.length; i--; ) nodes[i].unwrap();
                }), ed.serializer.addAttributeFilter("data-mce-bogus", function(nodes) {
                    for (var i = nodes.length; i--; ) nodes[i].remove();
                }), ed.onBeforeSetContent.add(function(editor, o) {
                    o.content || (o.content = '<br data-mce-bogus="1">'), o.content = '<mce:root id="' + ed.settings.editable_root + '" data-mce-root="1">' + o.content + "</mce:root>";
                }), ed.onSetContent.addToTop(function(ed, o) {
                    var rng, ed = dom.get(ed.settings.editable_root);
                    ed && (/^(&nbsp;|&#160;|\s|\u00a0|)$/.test(ed.innerHTML) && (ed.innerHTML = '<br data-mce-bogus="1">'), 
                    (rng = dom.createRng()).setStart(ed, 0), rng.setEnd(ed, 0), 
                    selection.setRng(rng));
                }), ed.onSaveContent.add(function(ed, o) {
                    "&nbsp;" === o.content && (o.content = "");
                }), ed.undoManager.onBeforeAdd.add(function(um, level) {
                    var node, container = ed.dom.create("div", {}, level.content);
                    (node = container.firstChild) && 1 == node.nodeType && node.hasAttribute("data-mce-root") && (level.content = container.firstChild.innerHTML);
                });
            });
        }
        ed.onKeyUp.add(function(ed, e) {
            var map = quoteMap[ed.settings.language] || quoteMap.en;
            !e.ctrlKey || e.altKey || '"' != e.key && "'" != e.key || (map = map[e.shiftKey ? '"' : "'"], 
            ed.undoManager.add(), ed.execCommand("mceReplaceContent", !1, map));
        }), ed.onExecCommand.add(function(ed, cmd, ui, val, args) {
            "Undo" != cmd && "Redo" != cmd && "mceReApply" != cmd && "mceRepaint" != cmd && (store = {
                cmd: cmd,
                ui: ui,
                value: val,
                args: args
            });
        }), ed.addShortcut("ctrl+alt+z", "", "mceReApply"), ed.addCommand("mceReApply", function() {
            if (store && store.cmd) return ed.execCommand(store.cmd, store.ui, store.value, store.args);
        }), ed.onPreInit.add(function() {
            var pb;
            ed.onUpdateMedia.add(function(ed, o) {
                o.before && o.after && (each(ed.dom.select("img,poster"), function(elm) {
                    var after, stamp, src = elm.getAttribute("src");
                    (src = src && -1 !== src.indexOf("?") ? src.substring(0, src.indexOf("?")) : src) == o.before && (after = o.after, 
                    stamp = "?" + new Date().getTime(), -1 !== src.indexOf("?") && -1 === after.indexOf("?") && (after += stamp), 
                    ed.dom.setAttribs(elm, {
                        src: after,
                        "data-mce-src": o.after
                    })), elm.getAttribute("srcset") && function(elm, o) {
                        var srcset = elm.getAttribute("srcset");
                        if (srcset) {
                            for (var sets = srcset.split(","), i = 0; i < sets.length; i++) {
                                var values = sets[i].trim().split(" ");
                                o.before == values[0] && (values[0] = o.after), 
                                sets[i] = values.join(" ");
                            }
                            elm.setAttribute("srcset", sets.join(","));
                        }
                    }(elm, o);
                }), each(ed.dom.select("a[href]"), function(elm) {
                    ed.dom.getAttrib(elm, "href") == o.before && ed.dom.setAttribs(elm, {
                        href: o.after,
                        "data-mce-href": o.after
                    });
                }));
            }), ed.onWfEditorSave.add(function(ed, o) {
                o.content = function(ed, content) {
                    var args, parser, settings;
                    return ed.settings.validate ? (args = {
                        no_events: !0,
                        format: "html",
                        get: !0,
                        load: !0
                    }, extend(settings = {}, ed.settings), args.content = content, 
                    ed.onBeforeGetContent.dispatch(ed, args), settings.forced_root_block = !1, 
                    settings.validate = !0, parser = new DomParser(settings, ed.schema), 
                    settings = new HtmlSerializer(settings, ed.schema), args.content = settings.serialize(parser.parse(args.content), args), 
                    ed.onPostProcess.dispatch(ed, args), args.content) : content;
                }(ed, o.content);
            }), (pb = DOM.get("sp-inline-popover")) && DOM.isChildOf(ed.getElement(), pb) && ed.onGetContent.addToTop(function(ed, o) {
                var args;
                -1 != ed.id.indexOf("sppbeditor-") && "raw" == o.format && (args = tinymce.extend(o, {
                    format: "html"
                }), o.content = ed.serializer.serialize(ed.getBody(), args));
            });
        }), 0 == ed.settings.forced_root_block && 0 != ed.settings.editable_root && fakeRootBlock();
    });
}();tinymce/plugins/contextmenu/plugin.js000060400000007035152456167170014121 0ustar00/* jce - 2.9.99.2 | 2026-04-22 | https://www.joomlacontenteditor.net | Source: https://github.com/widgetfactory/jce | Copyright (C) 2006 - 2026 Ryan Demmer. All rights reserved | GNU/GPL Version 2 or later - http://www.gnu.org/licenses/gpl-2.0.html */
!function() {
    var Event = tinymce.dom.Event, DOM = tinymce.DOM;
    tinymce.PluginManager.add("contextmenu", function(ed) {
        var showMenu, hideMenu, self = this;
        function isContentEditable(elm) {
            return "false" !== ed.dom.getContentEditableParent(elm);
        }
        function isNativeOverrideKeyEvent(e) {
            return e.ctrlKey && !contextmenuNeverUseNative;
        }
        function isImage(elm) {
            return elm && "IMG" === elm.nodeName && isContentEditable(elm);
        }
        var contextmenuNeverUseNative = ed.settings.contextmenu_never_use_native;
        if (self.onContextMenu = new tinymce.util.Dispatcher(this), tinymce.isAndroid || tinymce.isIOS) return !1;
        function hide(ed, e) {
            e && 2 == e.button || self._menu && (self._menu.removeAll(), self._menu.destroy(), 
            Event.remove(ed.getDoc(), "click", hideMenu), self._menu = null);
        }
        hideMenu = function(e) {
            hide(ed, e);
        }, showMenu = ed.onContextMenu.add(function(ed, e) {
            var elm;
            isNativeOverrideKeyEvent(e) || (Event.cancel(e), tinymce.isMac && tinymce.isWebKit && 2 === e.button && !isNativeOverrideKeyEvent(e) && ed.selection.isCollapsed() && (isImage(e.target) || ed.selection.placeCaretAt(e.clientX, e.clientY)), 
            (isImage(e.target) || (elm = e.target) && "A" === elm.nodeName && isContentEditable(elm)) && ed.selection.select(e.target), 
            function(ed, e) {
                var m = self._menu, se = ed.selection, col = se.isCollapsed(), e = e.target;
                e && "BODY" !== e.nodeName || (e = se.getNode() || ed.getBody());
                m && (m.removeAll(), m.destroy());
                return se = DOM.getPos(ed.getContentAreaContainer()), m = ed.controlManager.createDropMenu("contextmenu", {
                    offset_x: se.x + ed.getParam("contextmenu_offset_x", 0),
                    offset_y: se.y + ed.getParam("contextmenu_offset_y", 0),
                    constrain: !0,
                    keyboard_focus: !0
                }), self._menu = m, (se = m.addMenu({
                    title: "contextmenu.align"
                })).add({
                    title: "contextmenu.left",
                    icon: "justifyleft",
                    cmd: "JustifyLeft"
                }), se.add({
                    title: "contextmenu.center",
                    icon: "justifycenter",
                    cmd: "JustifyCenter"
                }), se.add({
                    title: "contextmenu.right",
                    icon: "justifyright",
                    cmd: "JustifyRight"
                }), se.add({
                    title: "contextmenu.full",
                    icon: "justifyfull",
                    cmd: "JustifyFull"
                }), self.onContextMenu.dispatch(self, m, e, col), m;
            }(ed, e).showMenu(e.clientX || e.pageX, e.clientY || e.pageY), Event.add(ed.getDoc(), "click", hideMenu), 
            ed.nodeChanged());
        }), ed.onRemove.add(function() {
            self._menu && self._menu.removeAll();
        }), ed.onMouseDown.add(hide), ed.onKeyDown.add(hide), ed.onKeyDown.add(function(ed, e) {
            !e.shiftKey || e.ctrlKey || e.altKey || 121 !== e.keyCode || (Event.cancel(e), 
            showMenu(ed, e));
        });
    });
}();tinymce/plugins/hr/plugin.js000060400000004476152456167170012167 0ustar00/* jce - 2.9.99.2 | 2026-04-22 | https://www.joomlacontenteditor.net | Source: https://github.com/widgetfactory/jce | Copyright (C) 2006 - 2026 Ryan Demmer. All rights reserved | GNU/GPL Version 2 or later - http://www.gnu.org/licenses/gpl-2.0.html */
!function() {
    var VK = tinymce.VK, BACKSPACE = VK.BACKSPACE, DELETE = VK.DELETE;
    tinymce.PluginManager.add("hr", function(ed, url) {
        function isHR(n) {
            return "HR" === n.nodeName && !1 === /mce-item-(pagebreak|readmore)/.test(n.className);
        }
        ed.addCommand("InsertHorizontalRule", function(ui, v) {
            var hr, el, p, n = ed.selection.getNode();
            /^(H[1-6]|P)$/.test(n.nodeName) ? (ed.undoManager.add(), ed.execCommand("mceInsertContent", !1, '<span id="mce_hr_marker" data-mce-type="bookmark">\ufeff</span>', {
                skip_undo: 1
            }), n = ed.dom.get("mce_hr_marker"), hr = ed.dom.create("hr"), p = ed.dom.getParent(n, "H1,H2,H3,H4,H5,H6,P,DIV,ADDRESS,PRE,FORM,TABLE,OL,UL,CAPTION,BLOCKQUOTE,CENTER,DL,DIR,FIELDSET,NOSCRIPT,NOFRAMES,MENU,ISINDEX,SAMP,SECTION,ARTICLE,HGROUP,ASIDE,FIGURE", "BODY"), 
            ed.dom.split(p, n), (p = n.nextSibling) || (el = ed.getParam("forced_root_block") || "br", 
            p = ed.dom.create(el), "br" != el && (p.innerHTML = "\xa0"), ed.dom.insertAfter(p, n)), 
            p && ed.selection.setCursorLocation(p, p.childNodes.length), ed.dom.replace(hr, n)) : ed.execCommand("mceInsertContent", !1, "<hr />"), 
            ed.undoManager.add();
        }), ed.addButton("hr", {
            title: "advanced.hr_desc",
            cmd: "InsertHorizontalRule"
        }), ed.onNodeChange.add(function(ed, cm, n) {
            var s = isHR(n);
            cm.setActive("hr", s), ed.dom.removeClass(ed.dom.select("hr.mce-item-selected:not(.mce-item-pagebreak,.mce-item-readmore)"), "mce-item-selected"), 
            s && ed.dom.addClass(n, "mce-item-selected");
        }), ed.onKeyDown.add(function(ed, e) {
            var n, sib;
            e.keyCode != BACKSPACE && e.keyCode != DELETE || isHR(n = ed.selection.getNode()) && (sib = n.previousSibling, 
            ed.dom.remove(n), e.preventDefault(), sib = ed.dom.isBlock(sib) || (sib = n.nextSibling, 
            ed.dom.isBlock(sib)) ? sib : null) && ed.selection.setCursorLocation(sib, sib.childNodes.length);
        });
    });
}();tinymce/plugins/wordcount/plugin.js000060400000006354152456167170013577 0ustar00/* jce - 2.9.99.2 | 2026-04-22 | https://www.joomlacontenteditor.net | Source: https://github.com/widgetfactory/jce | Copyright (C) 2006 - 2026 Ryan Demmer. All rights reserved | GNU/GPL Version 2 or later - http://www.gnu.org/licenses/gpl-2.0.html */
!function() {
    var DOM = tinymce.DOM, Delay = tinymce.util.Delay;
    tinymce.PluginManager.add("wordcount", function(ed, url) {
        var countre = ed.getParam("wordcount_countregex", /[\w\u2019\x27\-\u00C0-\u1FFF]+/g), cleanre = ed.getParam("wordcount_cleanregex", /[0-9.(),;:!?%#$?\x27\x22_+=\\\/\-]*/g), update_rate = ed.getParam("wordcount_update_rate", 200), target_id = ed.id + "_word_count", count = (ed.onWordCount = new tinymce.util.Dispatcher(this), 
        0);
        function processText(tx) {
            var tc = 0;
            return tc = tx && (tx = (tx = (tx = (tx = (tx = tx.replace(/\.\.\./g, " ")).replace(/<.[^<>]*?>/g, " ").replace(/&nbsp;|&#160;/gi, " ")).replace(/(\w+)(&#?[a-z0-9]+;)+(\w+)/i, "$1$3").replace(/&.+?;/g, " ")).replace(cleanre, "")).match(countre)) ? tx.length : tc;
        }
        var limit = parseInt(ed.getParam("wordcount_limit", 0), 10), showAlert = ed.getParam("wordcount_alert", 0);
        function updateLabel(value) {
            DOM.removeClass(target_id, "mceWordCountLimit"), value < 0 && DOM.addClass(target_id, "mceWordCountLimit"), 
            limit ? DOM.setAttrib(target_id, "title", ed.getLang("wordcount.remain", "Words Remaining:")) : DOM.setAttrib(target_id, "title", ed.getLang("wordcount.words", "Words:")), 
            DOM.setHTML(target_id, value.toString());
        }
        function countChars() {
            ed.destroyed || (count = processText(ed.getContent({
                format: "raw",
                no_events: !0
            })), (count = limit ? limit - count : count) < 0 && showAlert && ed.windowManager.alert(ed.getLang("wordcount.alert", "You have reached the word limit set for this content.")), 
            updateLabel(count), ed.onWordCount.dispatch(ed, count));
        }
        ed.onPostRender.add(function(ed, cm) {
            var statusbar;
            target_id = ed.getParam("wordcount_target_id", target_id), DOM.get(target_id) || (statusbar = DOM.select("div.mceStatusbar", ed.getContainer())).length && (ed = ed.getLang("wordcount.selection", "Words Selected:"), 
            DOM.add(statusbar[0], "div", {
                class: "mceWordCount"
            }, '<span title="' + ed + '" id="' + target_id + '" class="mceText">0</span>'));
        });
        var countAll = Delay.debounce(function() {
            countChars();
        }, update_rate), update_rate = Delay.debounce(function() {
            var sel, rng;
            ed.destroyed || (rng = ed.selection.getRng(), sel = ed.selection.getSel(), 
            rng.collapsed ? updateLabel(count) : (rng = processText(rng.text || (sel.toString ? sel.toString() : "")), 
            DOM.removeClass(target_id, "mceWordCountLimit"), DOM.setAttrib(target_id, "title", ed.getLang("wordcount.selection", "Words Selected:")), 
            DOM.setHTML(target_id, rng.toString())));
        }, update_rate);
        ed.onPreInit.add(function() {
            ed.on("keyup setcontent undo redo", countAll);
        }), ed.onSelectionChange.add(update_rate), ed.onInit.add(countAll);
    });
}();tinymce/plugins/clipboard/tests/clipboard.html000060400000346256152456167170015655 0ustar00<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">

<head>
	<title>Unit tests for the Clipboard plugin</title>
	<meta http-equiv="X-UA-Compatible" content="IE=edge" />
	<link rel="stylesheet" href="http://code.jquery.com/qunit/qunit-1.14.0.css" type="text/css" />
	<script src="http://code.jquery.com/qunit/qunit-1.14.0.js"></script>
	<script src="../../../../../../../../tinymce-muon-retina/tests/qunit/connector.js"></script>
	<script type="text/javascript" src="../../../../../../../../tinymce-muon-retina/tests/qunit/runner.js"></script>
	<script type="text/javascript" src="../../../../../../../../tinymce-muon-retina/tests/js/utils.js"></script>
	<script type="text/javascript" src="../../../tinymce.js"></script>
	<script type="text/javascript" src="../plugin.js"></script>
</head>

<body>
	<script type="text/javascript">
		var editor;

		QUnit.config.reorder = false;
		QUnit.config.autostart = false;

		module("Paste plugin", {
			autostart: false
		});

		function trimContent(value) {
			return value.trim();
		}

		var base64ImgSrc = [
			'R0lGODdhZABkAHcAACH/C05FVFNDQVBFMi4wAwEAAAAh+QQECgAAACwAAAAAZABkAIEAAAD78jY/',
			'P3SsMjIC/4SPqcvtD6OctNqLs968+w+G4kiW5ommR8C27gvHrxrK9g3TIM7f+tcL5n4doZFFLB6F',
			'Sc6SCRFIp9SqVTp6BiPXbjer5XG95Ck47IuWy2e0bLz2tt3DR5w8p7vgd2tej6TW5ycCGMM3aFZo',
			'OCOYqFjDuOf4KPAHiPh4qZeZuEnXOfjpFto3ilZ6dxqWGreq1br2+hTLtigZaFcJuYOb67DLC+Qb',
			'UIt3i2sshyzZtEFc7JwBLT1NXI2drb3N3e39DR4uPk5ebn6Onq6+zu488A4fLz9P335Aj58fb2+g',
			'71/P759AePwADBxY8KDAhAr9MWyY7yFEgPYmRgxokWK7jEYa2XGcJ/HjgJAfSXI0mRGlRZUTWUJ0',
			'2RCmQpkHaSLEKPKdzYU4c+78VzCo0KFEixo9ijSp0qVMmzp9CjWq1KlUq1q9eqEAADs='
		].join('');

		test("Paste simple text content", function () {
			var rng = editor.dom.createRng();

			editor.setContent('<p>1234</p>');
			editor.focus();
			rng.setStart(editor.getBody().firstChild.firstChild, 1);
			rng.setEnd(editor.getBody().firstChild.firstChild, 3);
			editor.selection.setRng(rng);

			editor.execCommand('mceInsertClipboardContent', false, { content: 'TEST' });
			equal(editor.getContent().replace(/[\r\n]+/g, ''), '<p>1TEST4</p>');
		});

		test("Paste styled text content", function () {
			var rng = editor.dom.createRng();

			editor.settings.paste_remove_styles_if_webkit = false;
			editor.settings.paste_remove_styles = false;

			editor.setContent('<p>1234</p>');
			rng.setStart(editor.getBody().firstChild.firstChild, 1);
			rng.setEnd(editor.getBody().firstChild.firstChild, 3);
			editor.selection.setRng(rng);

			editor.execCommand('mceInsertClipboardContent', false, { content: '<strong><em><span style="color: red;">TEST</span></em></strong>' });
			equal(editor.getContent().replace(/[\r\n]+/g, ''), '<p>1<strong><em><span style="color: red;">TEST</span></em></strong>4</p>');

			delete editor.settings.paste_remove_styles;
		});

		test("Paste paragraph in paragraph", function () {
			var rng = editor.dom.createRng();

			editor.setContent('<p>1234</p>');
			rng.setStart(editor.getBody().firstChild.firstChild, 1);
			rng.setEnd(editor.getBody().firstChild.firstChild, 3);
			editor.selection.setRng(rng);

			editor.execCommand('mceInsertClipboardContent', false, { content: '<p>TEST</p>' });
			equal(editor.getContent().replace(/[\r\n]+/g, ''), '<p>1</p><p>TEST</p><p>4</p>');
		});

		test("Paste paragraphs in complex paragraph", function () {
			var rng = editor.dom.createRng();

			editor.setContent('<p><strong><em>1234</em></strong></p>');
			rng.setStart(editor.dom.select('em,i')[0].firstChild, 1);
			rng.setEnd(editor.dom.select('em,i')[0].firstChild, 3);
			editor.selection.setRng(rng);

			editor.execCommand('mceInsertClipboardContent', false, { content: '<p>TEST 1</p><p>TEST 2</p>' });
			equal(editor.getContent().replace(/[\r\n]+/g, ''), '<p><strong><em>1</em></strong></p><p>TEST 1</p><p>TEST 2</p><p><strong><em>4</em></strong></p>');
		});

		test("Paste strip class attributes", function () {
			var rng = editor.dom.createRng();

			editor.settings.paste_strip_class_attributes = 1;

			editor.setContent('');
			editor.execCommand('SelectAll');

			editor.execCommand('mceInsertClipboardContent', false, { content: '<p class="some_class">1234</p>' });
			equal(editor.getContent().replace(/[\r\n]+/g, ''), '<p>1234</p>');

			editor.settings.paste_strip_class_attributes = 2;
		});

		test("Paste strip class attributes Word Only", function () {
			var rng = editor.dom.createRng();

			editor.settings.paste_strip_class_attributes = 2;

			editor.setContent('');
			editor.execCommand('SelectAll');

			editor.execCommand('mceInsertClipboardContent', false, { content: '<p class="MsoNormal">1234</p>' });
			equal(editor.getContent().replace(/[\r\n]+/g, ''), '<p>1234</p>');

			editor.settings.paste_strip_class_attributes = 2;
		});

		test("Paste keep class attributes", function () {
			var rng = editor.dom.createRng();

			editor.settings.paste_strip_class_attributes = 0;

			editor.setContent('');
			editor.execCommand('SelectAll');

			editor.execCommand('mceInsertClipboardContent', false, { content: '<p class="some_class">1234</p>' });
			equal(editor.getContent().replace(/[\r\n]+/g, ''), '<p class="some_class">1234</p>');

			editor.settings.paste_strip_class_attributes = 2;
		});

		test("Paste remove spans", function () {
			var rng = editor.dom.createRng();

			editor.settings.paste_remove_spans = 1;

			editor.setContent('');
			editor.execCommand('SelectAll');

			editor.execCommand('mceInsertClipboardContent', false, { content: '<p><span style="text-decoration:underline;">1234</span></p>' });
			equal(editor.getContent().replace(/[\r\n]+/g, ''), '<p>1234</p>');

			editor.settings.paste_remove_spans = 0;
		});

		test("Paste keep valid spans", function () {
			var rng = editor.dom.createRng();

			editor.settings.paste_remove_spans = 0;
			editor.settings.paste_remove_styles = false;

			editor.setContent('');
			editor.execCommand('SelectAll');

			editor.execCommand('mceInsertClipboardContent', false, { content: '<p><span style="text-decoration: underline;">1234</span><span>Text</span></p>' });
			equal(editor.getContent().replace(/[\r\n]+/g, ''), '<p><span style="text-decoration: underline;">1234</span>Text</p>');

			delete editor.settings.paste_remove_styles;
		});

		test("Paste remove styles", function () {
			var rng = editor.dom.createRng();

			editor.setContent('');
			editor.execCommand('SelectAll');

			editor.execCommand('mceInsertClipboardContent', false, { content: '<p style="font-weight:bold;">Text</p>' });
			equal(editor.getContent().replace(/[\r\n]+/g, ''), '<p>Text</p>');
		});

		test("Paste retain style properties", function () {
			var rng = editor.dom.createRng();

			editor.settings.paste_remove_styles = false;
			editor.settings.paste_retain_style_properties = 'font-weight,color';

			editor.setContent('');
			editor.execCommand('SelectAll');

			editor.execCommand('mceInsertClipboardContent', false, { content: '<p style="font-weight:bold;color:#000;text-decoration:underline;">Text</p>' });
			equal(editor.getContent().replace(/[\r\n]+/g, ''), '<p style="font-weight: bold; color: #000000;">Text</p>');

			delete editor.settings.paste_remove_styles;
			delete editor.settings.paste_retain_style_properties;
		});

		test("Paste remove style properties", function () {
			var rng = editor.dom.createRng();

			editor.settings.paste_remove_styles = false;
			editor.settings.paste_remove_style_properties = 'font-weight,color';

			editor.setContent('');
			editor.execCommand('SelectAll');

			editor.execCommand('mceInsertClipboardContent', false, { content: '<p style="font-weight:bold;color:#000;text-decoration:underline;">Text</p>' });
			equal(editor.getContent().replace(/[\r\n]+/g, ''), '<p style="text-decoration: underline;">Text</p>');

			delete editor.settings.paste_remove_styles;
			delete editor.settings.paste_remove_style_properties;
		});

		test("Paste remove tags", function () {
			var rng = editor.dom.createRng();

			editor.settings.paste_remove_tags = 'img,a';

			editor.setContent('');
			editor.execCommand('SelectAll');

			editor.execCommand('mceInsertClipboardContent', false, { content: '<p><img src="value.jpg" alt="" /><a href="text.html">Text</a> Some Text</p>' });
			equal(editor.getContent().replace(/[\r\n]+/g, ''), '<p>Text Some Text</p>');

			delete editor.settings.paste_remove_tags;
		});

		test("Paste keep tags", function () {
			var rng = editor.dom.createRng();

			editor.settings.paste_keep_tags = 'p,a';

			editor.setContent('');
			editor.execCommand('SelectAll');

			editor.execCommand('mceInsertClipboardContent', false, { content: '<p><img src="value.jpg" alt="" /><a href="text.html">Text</a> Some Text</p>' });
			equal(editor.getContent().replace(/[\r\n]+/g, ''), '<p><a href="text.html">Text</a> Some Text</p>');

			delete editor.settings.paste_keep_tags;
		});

		test("Paste remove attributes", function () {
			var rng = editor.dom.createRng();

			editor.settings.paste_remove_attributes = 'title';

			editor.setContent('');
			editor.execCommand('SelectAll');

			editor.execCommand('mceInsertClipboardContent', false, { content: '<p title="main"><img src="value.jpg" alt="" title="test" /> Some Text</p>' });
			equal(editor.getContent().replace(/[\r\n]+/g, ''), '<p><img src="value.jpg" alt="" /> Some Text</p>');

			delete editor.settings.paste_remove_attributes;
		});

		test("Paste remove empty paragraphs", function () {
			var rng = editor.dom.createRng();

			editor.setContent('');
			editor.execCommand('SelectAll');

			editor.execCommand('mceInsertClipboardContent', false, { content: '<p title="main">Some Text</p><p>&nbsp;</p>' });
			equal(editor.getContent().replace(/[\r\n]+/g, ''), '<p title="main">Some Text</p>');
		});

		test("Paste remove empty paragraphs false", function () {
			var rng = editor.dom.createRng();

			editor.settings.paste_remove_empty_paragraphs = false;

			editor.setContent('');
			editor.execCommand('SelectAll');

			editor.execCommand('mceInsertClipboardContent', false, { content: '<p title="main">Some Text</p><p>&nbsp;</p>' });
			equal(editor.getContent().replace(/[\r\n]+/g, ''), '<p title="main">Some Text</p><p>&nbsp;</p>');

			delete editor.settings.paste_remove_empty_paragraphs;
		});

		test("Paste regular expression filter", function () {
			var rng = editor.dom.createRng();

			editor.settings.paste_filter = '/some\\s/gi';

			editor.setContent('');
			editor.execCommand('SelectAll');

			editor.execCommand('mceInsertClipboardContent', false, { content: '<p title="Some text">Some Text</p><p>And some text</p>' });
			equal(editor.getContent().replace(/[\r\n]+/g, ''), '<p title="text">Text</p><p>And text</p>');

			delete editor.settings.paste_filter;
		});

		test("Paste allow event attributes", function () {
			var rng = editor.dom.createRng();

			editor.settings.paste_allow_event_attributes = true;
			editor.settings.allow_event_attributes = true;

			editor.setContent('');
			editor.execCommand('SelectAll');

			editor.execCommand('mceInsertClipboardContent', false, { content: '<p><a href="#" onclick="alert(something);">Click</a></p>' });
			equal(editor.getContent().replace(/[\r\n]+/g, ''), '<p><a href="#" onclick="alert(something);">Click</a></p>');

			delete editor.settings.paste_allow_event_attributes;
			delete editor.settings.allow_event_attributes;
		});

		test("Paste process images", function () {
			var rng = editor.dom.createRng();

			editor.settings.paste_upload_data_images = true;

			editor.setContent('<p>a</p>');
			rng.setStart(editor.getBody().firstChild.firstChild, 0);
			rng.setEnd(editor.getBody().firstChild.firstChild, 0);
			editor.selection.setRng(rng);

			editor.execCommand('mceInsertClipboardContent', false, { content: '<img src="data:image/gif;base64,' + base64ImgSrc + '" />' });
			equal(editor.getContent().replace(/[\r\n]+/g, ''), '<p><img src="data:image/gif;base64,' + base64ImgSrc + '" alt="" data-mce-upload-marker="1" />a</p>');

			delete editor.settings.paste_upload_data_images;
		});

		test("Paste process images:false (default)", function () {
			var rng = editor.dom.createRng();

			editor.setContent('<p>a</p>');
			rng.setStart(editor.getBody().firstChild.firstChild, 0);
			rng.setEnd(editor.getBody().firstChild.firstChild, 0);
			editor.selection.setRng(rng);

			editor.execCommand('mceInsertClipboardContent', false, { content: '<img src="data:image/gif;base64,' + base64ImgSrc + '" />' });
			equal(editor.getContent().replace(/[\r\n]+/g, ''), '<p>a</p>');
		});

		test("Paste Word fake list", function () {
			var rng = editor.dom.createRng();

			editor.settings.paste_remove_styles = true;

			editor.setContent('<p>1234</p>');
			rng.setStart(editor.getBody().firstChild.firstChild, 0);
			rng.setEnd(editor.getBody().firstChild.firstChild, 4);
			editor.selection.setRng(rng);

			editor.execCommand('mceInsertClipboardContent', false, { content: '<meta http-equiv="Content-Type" content="text/html; charset=utf-8"><meta name="ProgId" content="Word.Document"><meta name="Generator" content="Microsoft Word 12"><meta name="Originator" content="Microsoft Word 12"><link rel="File-List" href="file:///C:%5CUsers%5Cspocke%5CAppData%5CLocal%5CTemp%5Cmsohtmlclip1%5C01%5Cclip_filelist.xml"><link rel="themeData" href="file:///C:%5CUsers%5Cspocke%5CAppData%5CLocal%5CTemp%5Cmsohtmlclip1%5C01%5Cclip_themedata.thmx"><link rel="colorSchemeMapping" href="file:///C:%5CUsers%5Cspocke%5CAppData%5CLocal%5CTemp%5Cmsohtmlclip1%5C01%5Cclip_colorschememapping.xml"><!--[if gte mso 9]><xml> <w:WordDocument> <w:View>Normal</w:View> <w:Zoom>0</w:Zoom> <w:TrackMoves/> <w:TrackFormatting/> <w:HyphenationZone>21</w:HyphenationZone> <w:PunctuationKerning/> <w:ValidateAgainstSchemas/> <w:SaveIfXMLInvalid>false</w:SaveIfXMLInvalid> <w:IgnoreMixedContent>false</w:IgnoreMixedContent> <w:AlwaysShowPlaceholderText>false</w:AlwaysShowPlaceholderText> <w:DoNotPromoteQF/> <w:LidThemeOther>SV</w:LidThemeOther> <w:LidThemeAsian>X-NONE</w:LidThemeAsian> <w:LidThemeComplexScript>X-NONE</w:LidThemeComplexScript> <w:Compatibility> <w:BreakWrappedTables/> <w:SnapToGridInCell/> <w:WrapTextWithPunct/> <w:UseAsianBreakRules/> <w:DontGrowAutofit/> <w:SplitPgBreakAndParaMark/> <w:DontVertAlignCellWithSp/> <w:DontBreakConstrainedForcedTables/> <w:DontVertAlignInTxbx/> <w:Word11KerningPairs/> <w:CachedColBalance/> </w:Compatibility> <w:BrowserLevel>MicrosoftInternetExplorer4</w:BrowserLevel> <m:mathPr> <m:mathFont m:val="Cambria Math"/> <m:brkBin m:val="before"/> <m:brkBinSub m:val="&#45;-"/> <m:smallFrac m:val="off"/> <m:dispDef/> <m:lMargin m:val="0"/> <m:rMargin m:val="0"/> <m:defJc m:val="centerGroup"/> <m:wrapIndent m:val="1440"/> <m:intLim m:val="subSup"/> <m:naryLim m:val="undOvr"/> </m:mathPr></w:WordDocument> </xml><![endif]--><!--[if gte mso 9]><xml> <w:LatentStyles DefLockedState="false" DefUnhideWhenUsed="true" DefSemiHidden="true" DefQFormat="false" DefPriority="99" LatentStyleCount="267"> <w:LsdException Locked="false" Priority="0" SemiHidden="false" UnhideWhenUsed="false" QFormat="true" Name="Normal"/> <w:LsdException Locked="false" Priority="9" SemiHidden="false" UnhideWhenUsed="false" QFormat="true" Name="heading 1"/> <w:LsdException Locked="false" Priority="9" QFormat="true" Name="heading 2"/> <w:LsdException Locked="false" Priority="9" QFormat="true" Name="heading 3"/> <w:LsdException Locked="false" Priority="9" QFormat="true" Name="heading 4"/> <w:LsdException Locked="false" Priority="9" QFormat="true" Name="heading 5"/> <w:LsdException Locked="false" Priority="9" QFormat="true" Name="heading 6"/> <w:LsdException Locked="false" Priority="9" QFormat="true" Name="heading 7"/> <w:LsdException Locked="false" Priority="9" QFormat="true" Name="heading 8"/> <w:LsdException Locked="false" Priority="9" QFormat="true" Name="heading 9"/> <w:LsdException Locked="false" Priority="39" Name="toc 1"/> <w:LsdException Locked="false" Priority="39" Name="toc 2"/> <w:LsdException Locked="false" Priority="39" Name="toc 3"/> <w:LsdException Locked="false" Priority="39" Name="toc 4"/> <w:LsdException Locked="false" Priority="39" Name="toc 5"/> <w:LsdException Locked="false" Priority="39" Name="toc 6"/> <w:LsdException Locked="false" Priority="39" Name="toc 7"/> <w:LsdException Locked="false" Priority="39" Name="toc 8"/> <w:LsdException Locked="false" Priority="39" Name="toc 9"/> <w:LsdException Locked="false" Priority="35" QFormat="true" Name="caption"/> <w:LsdException Locked="false" Priority="10" SemiHidden="false" UnhideWhenUsed="false" QFormat="true" Name="Title"/> <w:LsdException Locked="false" Priority="1" Name="Default Paragraph Font"/> <w:LsdException Locked="false" Priority="11" SemiHidden="false" UnhideWhenUsed="false" QFormat="true" Name="Subtitle"/> <w:LsdException Locked="false" Priority="22" SemiHidden="false" UnhideWhenUsed="false" QFormat="true" Name="Strong"/>  <w:LsdException Locked="false" Priority="20" SemiHidden="false" UnhideWhenUsed="false" QFormat="true" Name="Emphasis"/>  <w:LsdException Locked="false" Priority="59" SemiHidden="false" UnhideWhenUsed="false" Name="Table Grid"/>  <w:LsdException Locked="false" UnhideWhenUsed="false" Name="Placeholder Text"/>  <w:LsdException Locked="false" Priority="1" SemiHidden="false" UnhideWhenUsed="false" QFormat="true" Name="No Spacing"/>  <w:LsdException Locked="false" Priority="60" SemiHidden="false" UnhideWhenUsed="false" Name="Light Shading"/>  <w:LsdException Locked="false" Priority="61" SemiHidden="false" UnhideWhenUsed="false" Name="Light List"/>  <w:LsdException Locked="false" Priority="62" SemiHidden="false" UnhideWhenUsed="false" Name="Light Grid"/>  <w:LsdException Locked="false" Priority="63" SemiHidden="false" UnhideWhenUsed="false" Name="Medium Shading 1"/>  <w:LsdException Locked="false" Priority="64" SemiHidden="false" UnhideWhenUsed="false" Name="Medium Shading 2"/>  <w:LsdException Locked="false" Priority="65" SemiHidden="false" UnhideWhenUsed="false" Name="Medium List 1"/>  <w:LsdException Locked="false" Priority="66" SemiHidden="false" UnhideWhenUsed="false" Name="Medium List 2"/>  <w:LsdException Locked="false" Priority="67" SemiHidden="false" UnhideWhenUsed="false" Name="Medium Grid 1"/>  <w:LsdException Locked="false" Priority="68" SemiHidden="false" UnhideWhenUsed="false" Name="Medium Grid 2"/>  <w:LsdException Locked="false" Priority="69" SemiHidden="false" UnhideWhenUsed="false" Name="Medium Grid 3"/>  <w:LsdException Locked="false" Priority="70" SemiHidden="false" UnhideWhenUsed="false" Name="Dark List"/>  <w:LsdException Locked="false" Priority="71" SemiHidden="false" UnhideWhenUsed="false" Name="Colorful Shading"/>  <w:LsdException Locked="false" Priority="72" SemiHidden="false" UnhideWhenUsed="false" Name="Colorful List"/>  <w:LsdException Locked="false" Priority="73" SemiHidden="false" UnhideWhenUsed="false" Name="Colorful Grid"/>  <w:LsdException Locked="false" Priority="60" SemiHidden="false" UnhideWhenUsed="false" Name="Light Shading Accent 1"/>  <w:LsdException Locked="false" Priority="61" SemiHidden="false" UnhideWhenUsed="false" Name="Light List Accent 1"/>  <w:LsdException Locked="false" Priority="62" SemiHidden="false" UnhideWhenUsed="false" Name="Light Grid Accent 1"/>  <w:LsdException Locked="false" Priority="63" SemiHidden="false" UnhideWhenUsed="false" Name="Medium Shading 1 Accent 1"/>  <w:LsdException Locked="false" Priority="64" SemiHidden="false" UnhideWhenUsed="false" Name="Medium Shading 2 Accent 1"/>  <w:LsdException Locked="false" Priority="65" SemiHidden="false" UnhideWhenUsed="false" Name="Medium List 1 Accent 1"/>  <w:LsdException Locked="false" UnhideWhenUsed="false" Name="Revision"/>  <w:LsdException Locked="false" Priority="34" SemiHidden="false" UnhideWhenUsed="false" QFormat="true" Name="List Paragraph"/>  <w:LsdException Locked="false" Priority="29" SemiHidden="false" UnhideWhenUsed="false" QFormat="true" Name="Quote"/>  <w:LsdException Locked="false" Priority="30" SemiHidden="false" UnhideWhenUsed="false" QFormat="true" Name="Intense Quote"/>  <w:LsdException Locked="false" Priority="66" SemiHidden="false" UnhideWhenUsed="false" Name="Medium List 2 Accent 1"/>  <w:LsdException Locked="false" Priority="67" SemiHidden="false" UnhideWhenUsed="false" Name="Medium Grid 1 Accent 1"/>  <w:LsdException Locked="false" Priority="68" SemiHidden="false" UnhideWhenUsed="false" Name="Medium Grid 2 Accent 1"/>  <w:LsdException Locked="false" Priority="69" SemiHidden="false" UnhideWhenUsed="false" Name="Medium Grid 3 Accent 1"/>  <w:LsdException Locked="false" Priority="70" SemiHidden="false" UnhideWhenUsed="false" Name="Dark List Accent 1"/>  <w:LsdException Locked="false" Priority="71" SemiHidden="false" UnhideWhenUsed="false" Name="Colorful Shading Accent 1"/>  <w:LsdException Locked="false" Priority="72" SemiHidden="false" UnhideWhenUsed="false" Name="Colorful List Accent 1"/>  <w:LsdException Locked="false" Priority="73" SemiHidden="false" UnhideWhenUsed="false" Name="Colorful Grid Accent 1"/>  <w:LsdException Locked="false" Priority="60" SemiHidden="false" UnhideWhenUsed="false" Name="Light Shading Accent 2"/>  <w:LsdException Locked="false" Priority="61" SemiHidden="false" UnhideWhenUsed="false" Name="Light List Accent 2"/>  <w:LsdException Locked="false" Priority="62" SemiHidden="false" UnhideWhenUsed="false" Name="Light Grid Accent 2"/>  <w:LsdException Locked="false" Priority="63" SemiHidden="false" UnhideWhenUsed="false" Name="Medium Shading 1 Accent 2"/>  <w:LsdException Locked="false" Priority="64" SemiHidden="false" UnhideWhenUsed="false" Name="Medium Shading 2 Accent 2"/>  <w:LsdException Locked="false" Priority="65" SemiHidden="false" UnhideWhenUsed="false" Name="Medium List 1 Accent 2"/>  <w:LsdException Locked="false" Priority="66" SemiHidden="false" UnhideWhenUsed="false" Name="Medium List 2 Accent 2"/>  <w:LsdException Locked="false" Priority="67" SemiHidden="false" UnhideWhenUsed="false" Name="Medium Grid 1 Accent 2"/>  <w:LsdException Locked="false" Priority="68" SemiHidden="false" UnhideWhenUsed="false" Name="Medium Grid 2 Accent 2"/>  <w:LsdException Locked="false" Priority="69" SemiHidden="false" UnhideWhenUsed="false" Name="Medium Grid 3 Accent 2"/>  <w:LsdException Locked="false" Priority="70" SemiHidden="false" UnhideWhenUsed="false" Name="Dark List Accent 2"/>  <w:LsdException Locked="false" Priority="71" SemiHidden="false" UnhideWhenUsed="false" Name="Colorful Shading Accent 2"/>  <w:LsdException Locked="false" Priority="72" SemiHidden="false" UnhideWhenUsed="false" Name="Colorful List Accent 2"/>  <w:LsdException Locked="false" Priority="73" SemiHidden="false" UnhideWhenUsed="false" Name="Colorful Grid Accent 2"/>  <w:LsdException Locked="false" Priority="60" SemiHidden="false" UnhideWhenUsed="false" Name="Light Shading Accent 3"/>  <w:LsdException Locked="false" Priority="61" SemiHidden="false" UnhideWhenUsed="false" Name="Light List Accent 3"/>  <w:LsdException Locked="false" Priority="62" SemiHidden="false" UnhideWhenUsed="false" Name="Light Grid Accent 3"/>  <w:LsdException Locked="false" Priority="63" SemiHidden="false" UnhideWhenUsed="false" Name="Medium Shading 1 Accent 3"/>  <w:LsdException Locked="false" Priority="64" SemiHidden="false" UnhideWhenUsed="false" Name="Medium Shading 2 Accent 3"/>  <w:LsdException Locked="false" Priority="65" SemiHidden="false" UnhideWhenUsed="false" Name="Medium List 1 Accent 3"/>  <w:LsdException Locked="false" Priority="66" SemiHidden="false" UnhideWhenUsed="false" Name="Medium List 2 Accent 3"/>  <w:LsdException Locked="false" Priority="67" SemiHidden="false" UnhideWhenUsed="false" Name="Medium Grid 1 Accent 3"/>  <w:LsdException Locked="false" Priority="68" SemiHidden="false" UnhideWhenUsed="false" Name="Medium Grid 2 Accent 3"/>  <w:LsdException Locked="false" Priority="69" SemiHidden="false" UnhideWhenUsed="false" Name="Medium Grid 3 Accent 3"/>  <w:LsdException Locked="false" Priority="70" SemiHidden="false" UnhideWhenUsed="false" Name="Dark List Accent 3"/>  <w:LsdException Locked="false" Priority="71" SemiHidden="false" UnhideWhenUsed="false" Name="Colorful Shading Accent 3"/>  <w:LsdException Locked="false" Priority="72" SemiHidden="false" UnhideWhenUsed="false" Name="Colorful List Accent 3"/>  <w:LsdException Locked="false" Priority="73" SemiHidden="false" UnhideWhenUsed="false" Name="Colorful Grid Accent 3"/>  <w:LsdException Locked="false" Priority="60" SemiHidden="false" UnhideWhenUsed="false" Name="Light Shading Accent 4"/>  <w:LsdException Locked="false" Priority="61" SemiHidden="false" UnhideWhenUsed="false" Name="Light List Accent 4"/>  <w:LsdException Locked="false" Priority="62" SemiHidden="false" UnhideWhenUsed="false" Name="Light Grid Accent 4"/>  <w:LsdException Locked="false" Priority="63" SemiHidden="false" UnhideWhenUsed="false" Name="Medium Shading 1 Accent 4"/>  <w:LsdException Locked="false" Priority="64" SemiHidden="false" UnhideWhenUsed="false" Name="Medium Shading 2 Accent 4"/>  <w:LsdException Locked="false" Priority="65" SemiHidden="false" UnhideWhenUsed="false" Name="Medium List 1 Accent 4"/>  <w:LsdException Locked="false" Priority="66" SemiHidden="false" UnhideWhenUsed="false" Name="Medium List 2 Accent 4"/>  <w:LsdException Locked="false" Priority="67" SemiHidden="false" UnhideWhenUsed="false" Name="Medium Grid 1 Accent 4"/>  <w:LsdException Locked="false" Priority="68" SemiHidden="false" UnhideWhenUsed="false" Name="Medium Grid 2 Accent 4"/>  <w:LsdException Locked="false" Priority="69" SemiHidden="false" UnhideWhenUsed="false" Name="Medium Grid 3 Accent 4"/>  <w:LsdException Locked="false" Priority="70" SemiHidden="false" UnhideWhenUsed="false" Name="Dark List Accent 4"/>  <w:LsdException Locked="false" Priority="71" SemiHidden="false" UnhideWhenUsed="false" Name="Colorful Shading Accent 4"/>  <w:LsdException Locked="false" Priority="72" SemiHidden="false" UnhideWhenUsed="false" Name="Colorful List Accent 4"/>  <w:LsdException Locked="false" Priority="73" SemiHidden="false" UnhideWhenUsed="false" Name="Colorful Grid Accent 4"/>  <w:LsdException Locked="false" Priority="60" SemiHidden="false" UnhideWhenUsed="false" Name="Light Shading Accent 5"/>  <w:LsdException Locked="false" Priority="61" SemiHidden="false" UnhideWhenUsed="false" Name="Light List Accent 5"/>  <w:LsdException Locked="false" Priority="62" SemiHidden="false" UnhideWhenUsed="false" Name="Light Grid Accent 5"/>  <w:LsdException Locked="false" Priority="63" SemiHidden="false" UnhideWhenUsed="false" Name="Medium Shading 1 Accent 5"/>  <w:LsdException Locked="false" Priority="64" SemiHidden="false" UnhideWhenUsed="false" Name="Medium Shading 2 Accent 5"/>  <w:LsdException Locked="false" Priority="65" SemiHidden="false" UnhideWhenUsed="false" Name="Medium List 1 Accent 5"/>  <w:LsdException Locked="false" Priority="66" SemiHidden="false" UnhideWhenUsed="false" Name="Medium List 2 Accent 5"/>  <w:LsdException Locked="false" Priority="67" SemiHidden="false" UnhideWhenUsed="false" Name="Medium Grid 1 Accent 5"/>  <w:LsdException Locked="false" Priority="68" SemiHidden="false" UnhideWhenUsed="false" Name="Medium Grid 2 Accent 5"/>  <w:LsdException Locked="false" Priority="69" SemiHidden="false" UnhideWhenUsed="false" Name="Medium Grid 3 Accent 5"/>  <w:LsdException Locked="false" Priority="70" SemiHidden="false" UnhideWhenUsed="false" Name="Dark List Accent 5"/>  <w:LsdException Locked="false" Priority="71" SemiHidden="false" UnhideWhenUsed="false" Name="Colorful Shading Accent 5"/>  <w:LsdException Locked="false" Priority="72" SemiHidden="false" UnhideWhenUsed="false" Name="Colorful List Accent 5"/>  <w:LsdException Locked="false" Priority="73" SemiHidden="false" UnhideWhenUsed="false" Name="Colorful Grid Accent 5"/>  <w:LsdException Locked="false" Priority="60" SemiHidden="false" UnhideWhenUsed="false" Name="Light Shading Accent 6"/>  <w:LsdException Locked="false" Priority="61" SemiHidden="false" UnhideWhenUsed="false" Name="Light List Accent 6"/>  <w:LsdException Locked="false" Priority="62" SemiHidden="false" UnhideWhenUsed="false" Name="Light Grid Accent 6"/>  <w:LsdException Locked="false" Priority="63" SemiHidden="false" UnhideWhenUsed="false" Name="Medium Shading 1 Accent 6"/>  <w:LsdException Locked="false" Priority="64" SemiHidden="false" UnhideWhenUsed="false" Name="Medium Shading 2 Accent 6"/>  <w:LsdException Locked="false" Priority="65" SemiHidden="false" UnhideWhenUsed="false" Name="Medium List 1 Accent 6"/>  <w:LsdException Locked="false" Priority="66" SemiHidden="false" UnhideWhenUsed="false" Name="Medium List 2 Accent 6"/>  <w:LsdException Locked="false" Priority="67" SemiHidden="false" UnhideWhenUsed="false" Name="Medium Grid 1 Accent 6"/>  <w:LsdException Locked="false" Priority="68" SemiHidden="false" UnhideWhenUsed="false" Name="Medium Grid 2 Accent 6"/>  <w:LsdException Locked="false" Priority="69" SemiHidden="false" UnhideWhenUsed="false" Name="Medium Grid 3 Accent 6"/>  <w:LsdException Locked="false" Priority="70" SemiHidden="false" UnhideWhenUsed="false" Name="Dark List Accent 6"/>  <w:LsdException Locked="false" Priority="71" SemiHidden="false" UnhideWhenUsed="false" Name="Colorful Shading Accent 6"/>  <w:LsdException Locked="false" Priority="72" SemiHidden="false" UnhideWhenUsed="false" Name="Colorful List Accent 6"/>  <w:LsdException Locked="false" Priority="73" SemiHidden="false" UnhideWhenUsed="false" Name="Colorful Grid Accent 6"/>  <w:LsdException Locked="false" Priority="19" SemiHidden="false" UnhideWhenUsed="false" QFormat="true" Name="Subtle Emphasis"/>  <w:LsdException Locked="false" Priority="21" SemiHidden="false" UnhideWhenUsed="false" QFormat="true" Name="Intense Emphasis"/>  <w:LsdException Locked="false" Priority="31" SemiHidden="false" UnhideWhenUsed="false" QFormat="true" Name="Subtle Reference"/>  <w:LsdException Locked="false" Priority="32" SemiHidden="false" UnhideWhenUsed="false" QFormat="true" Name="Intense Reference"/>  <w:LsdException Locked="false" Priority="33" SemiHidden="false" UnhideWhenUsed="false" QFormat="true" Name="Book Title"/>  <w:LsdException Locked="false" Priority="37" Name="Bibliography"/>  <w:LsdException Locked="false" Priority="39" QFormat="true" Name="TOC Heading"/>  </w:LatentStyles> </xml><![endif]--><style> <!-- /* Font Definitions */ @font-face {font-family:Wingdings; panose-1:5 0 0 0 0 0 0 0 0 0; mso-font-charset:2; mso-generic-font-family:auto; mso-font-pitch:variable; mso-font-signature:0 268435456 0 0 -2147483648 0;} @font-face {font-family:Wingdings; panose-1:5 0 0 0 0 0 0 0 0 0; mso-font-charset:2; mso-generic-font-family:auto; mso-font-pitch:variable; mso-font-signature:0 268435456 0 0 -2147483648 0;} @font-face {font-family:Calibri; panose-1:2 15 5 2 2 2 4 3 2 4; mso-font-charset:0; mso-generic-font-family:swiss; mso-font-pitch:variable; mso-font-signature:-1610611985 1073750139 0 0 159 0;} /* Style Definitions */ p.MsoNormal, li.MsoNormal, div.MsoNormal {mso-style-unhide:no; mso-style-qformat:yes; mso-style-parent:""; margin-top:0cm; margin-right:0cm; margin-bottom:10.0pt; margin-left:0cm; line-height:115%; mso-pagination:widow-orphan; font-size:11.0pt; font-family:"Calibri","sans-serif"; mso-ascii-font-family:Calibri; mso-ascii-theme-font:minor-latin; mso-fareast-font-family:Calibri; mso-fareast-theme-font:minor-latin; mso-hansi-font-family:Calibri; mso-hansi-theme-font:minor-latin; mso-bidi-font-family:"Times New Roman"; mso-bidi-theme-font:minor-bidi; mso-fareast-language:EN-US;} p.MsoListParagraph, li.MsoListParagraph, div.MsoListParagraph {mso-style-priority:34; mso-style-unhide:no; mso-style-qformat:yes; margin-top:0cm; margin-right:0cm; margin-bottom:10.0pt; margin-left:36.0pt; mso-add-space:auto; line-height:115%; mso-pagination:widow-orphan; font-size:11.0pt; font-family:"Calibri","sans-serif"; mso-ascii-font-family:Calibri; mso-ascii-theme-font:minor-latin; mso-fareast-font-family:Calibri; mso-fareast-theme-font:minor-latin; mso-hansi-font-family:Calibri; mso-hansi-theme-font:minor-latin; mso-bidi-font-family:"Times New Roman"; mso-bidi-theme-font:minor-bidi; mso-fareast-language:EN-US;} p.MsoListParagraphCxSpFirst, li.MsoListParagraphCxSpFirst, div.MsoListParagraphCxSpFirst {mso-style-priority:34; mso-style-unhide:no; mso-style-qformat:yes; mso-style-type:export-only; margin-top:0cm; margin-right:0cm; margin-bottom:0cm; margin-left:36.0pt; margin-bottom:.0001pt; mso-add-space:auto; line-height:115%; mso-pagination:widow-orphan; font-size:11.0pt; font-family:"Calibri","sans-serif"; mso-ascii-font-family:Calibri; mso-ascii-theme-font:minor-latin; mso-fareast-font-family:Calibri; mso-fareast-theme-font:minor-latin; mso-hansi-font-family:Calibri; mso-hansi-theme-font:minor-latin; mso-bidi-font-family:"Times New Roman"; mso-bidi-theme-font:minor-bidi; mso-fareast-language:EN-US;} p.MsoListParagraphCxSpMiddle, li.MsoListParagraphCxSpMiddle, div.MsoListParagraphCxSpMiddle {mso-style-priority:34; mso-style-unhide:no; mso-style-qformat:yes; mso-style-type:export-only; margin-top:0cm; margin-right:0cm; margin-bottom:0cm; margin-left:36.0pt; margin-bottom:.0001pt; mso-add-space:auto; line-height:115%; mso-pagination:widow-orphan; font-size:11.0pt; font-family:"Calibri","sans-serif"; mso-ascii-font-family:Calibri; mso-ascii-theme-font:minor-latin; mso-fareast-font-family:Calibri; mso-fareast-theme-font:minor-latin; mso-hansi-font-family:Calibri; mso-hansi-theme-font:minor-latin; mso-bidi-font-family:"Times New Roman"; mso-bidi-theme-font:minor-bidi; mso-fareast-language:EN-US;} p.MsoListParagraphCxSpLast, li.MsoListParagraphCxSpLast, div.MsoListParagraphCxSpLast {mso-style-priority:34; mso-style-unhide:no; mso-style-qformat:yes; mso-style-type:export-only; margin-top:0cm; margin-right:0cm; margin-bottom:10.0pt; margin-left:36.0pt; mso-add-space:auto; line-height:115%; mso-pagination:widow-orphan; font-size:11.0pt; font-family:"Calibri","sans-serif"; mso-ascii-font-family:Calibri; mso-ascii-theme-font:minor-latin; mso-fareast-font-family:Calibri; mso-fareast-theme-font:minor-latin; mso-hansi-font-family:Calibri; mso-hansi-theme-font:minor-latin; mso-bidi-font-family:"Times New Roman"; mso-bidi-theme-font:minor-bidi; mso-fareast-language:EN-US;} .MsoChpDefault {mso-style-type:export-only; mso-default-props:yes; mso-ascii-font-family:Calibri; mso-ascii-theme-font:minor-latin; mso-fareast-font-family:Calibri; mso-fareast-theme-font:minor-latin; mso-hansi-font-family:Calibri; mso-hansi-theme-font:minor-latin; mso-bidi-font-family:"Times New Roman"; mso-bidi-theme-font:minor-bidi; mso-fareast-language:EN-US;} .MsoPapDefault {mso-style-type:export-only; margin-bottom:10.0pt; line-height:115%;} @page Section1 {size:595.3pt 841.9pt; margin:70.85pt 70.85pt 70.85pt 70.85pt; mso-header-margin:35.4pt; mso-footer-margin:35.4pt; mso-paper-source:0;} div.Section1 {page:Section1;} /* List Definitions */ @list l0 {mso-list-id:1742563504; mso-list-type:hybrid; mso-list-template-ids:-524928352 69009409 69009411 69009413 69009409 69009411 69009413 69009409 69009411 69009413;} @list l0:level1 {mso-level-number-format:bullet; mso-level-text:?; mso-level-tab-stop:none; mso-level-number-position:left; text-indent:-18.0pt; font-family:Symbol;} ol {margin-bottom:0cm;} ul {margin-bottom:0cm;} --> </style><!--[if gte mso 10]> <style> /* Style Definitions */ table.MsoNormalTable {mso-style-name:"Table Normal"; mso-tstyle-rowband-size:0; mso-tstyle-colband-size:0; mso-style-noshow:yes; mso-style-priority:99; mso-style-qformat:yes; mso-style-parent:""; mso-padding-alt:0cm 5.4pt 0cm 5.4pt; mso-para-margin-top:0cm; mso-para-margin-right:0cm; mso-para-margin-bottom:10.0pt; mso-para-margin-left:0cm; line-height:115%; mso-pagination:widow-orphan; font-size:11.0pt; font-family:"Calibri","sans-serif"; mso-ascii-font-family:Calibri; mso-ascii-theme-font:minor-latin; mso-hansi-font-family:Calibri; mso-hansi-theme-font:minor-latin; mso-fareast-language:EN-US;} </style> <![endif]--> <p class="MsoListParagraphCxSpFirst" style="text-indent: -18pt;"><!--[if !supportLists]--><span style="font-family: Symbol;"><span style="">&middot;<span style="font-family: &quot;Times New Roman&quot;; font-style: normal; font-variant: normal; font-weight: normal; font-size: 7pt; line-height: normal; font-size-adjust: none; font-stretch: normal; -x-system-font: none;">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; </span></span></span><!--[endif]-->Item 1</p> <p class="MsoListParagraphCxSpMiddle" style="text-indent: -18pt;"><!--[if !supportLists]--><span style="font-family: Symbol;"><span style="">&middot;<span style="font-family: &quot;Times New Roman&quot;; font-style: normal; font-variant: normal; font-weight: normal; font-size: 7pt; line-height: normal; font-size-adjust: none; font-stretch: normal; -x-system-font: none;">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; </span></span></span><!--[endif]-->Item 2</p> <p class="MsoListParagraphCxSpMiddle" style="text-indent: -18pt;"><!--[if !supportLists]--><span style="font-family: Symbol;"><span style="">&middot;<span style="font-family: &quot;Times New Roman&quot;; font-style: normal; font-variant: normal; font-weight: normal; font-size: 7pt; line-height: normal; font-size-adjust: none; font-stretch: normal; -x-system-font: none;">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; </span></span></span><!--[endif]-->Item 3</p> <p class="MsoListParagraphCxSpMiddle" style="text-indent: -18pt;"><!--[if !supportLists]--><span style="font-family: Symbol;"><span style="">&middot;<span style="font-family: &quot;Times New Roman&quot;; font-style: normal; font-variant: normal; font-weight: normal; font-size: 7pt; line-height: normal; font-size-adjust: none; font-stretch: normal; -x-system-font: none;">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; </span></span></span><!--[endif]-->Item 4</p> <p class="MsoListParagraphCxSpMiddle" style="text-indent: -18pt;"><!--[if !supportLists]--><span style="font-family: Symbol;"><span style="">&middot;<span style="font-family: &quot;Times New Roman&quot;; font-style: normal; font-variant: normal; font-weight: normal; font-size: 7pt; line-height: normal; font-size-adjust: none; font-stretch: normal; -x-system-font: none;">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; </span></span></span><!--[endif]-->Item 5</p> <p class="MsoListParagraphCxSpLast" style="text-indent: -18pt;"><!--[if !supportLists]--><span style="font-family: Symbol;"><span style="">&middot;<span style="font-family: &quot;Times New Roman&quot;; font-style: normal; font-variant: normal; font-weight: normal; font-size: 7pt; line-height: normal; font-size-adjust: none; font-stretch: normal; -x-system-font: none;">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; </span></span></span><!--[endif]-->Item 6</p>' });
			equal(editor.getContent().replace(/[\r\n]+/g, ''), '<ul><li>Item 1</li><li>Item 2</li><li>Item 3</li><li>Item 4</li><li>Item 5</li><li>Item 6</li></ul>');

			editor.settings.paste_retain_style_properties = 'border';

			rng = editor.dom.createRng();
			editor.setContent('<p>1234</p>');
			rng.setStart(editor.getBody().firstChild.firstChild, 0);
			rng.setEnd(editor.getBody().firstChild.firstChild, 4);
			editor.selection.setRng(rng);
			editor.execCommand('mceInsertClipboardContent', false, { content: '<p class="ListStyle" style="margin-top:0cm;margin-right:0cm;margin-bottom:3.0pt;margin-left:18.0pt;mso-add-space:auto;text-align:justify;text-indent:-18.0pt;mso-list:l0 level1 lfo1;tab-stops:list 18.0pt"><span lang="DE" style="font-family:Verdana;mso-fareast-font-family:Verdana;mso-bidi-font-family:Verdana;color:black"><span style="mso-list:Ignore">\u25CF<span style="font:7.0pt &quot;Times New Roman&quot;">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</span></span></span><span lang="DE" style="font-family:Arial;mso-fareast-font-family:Arial;mso-bidi-font-family:Arial;color:black">Item&nbsp; Spaces.<o:p></o:p></span></p>' });
			equal(editor.getContent().replace(/[\r\n]+/g, ''), '<ul><li>Item&nbsp; Spaces.</li></ul>');

			rng = editor.dom.createRng();
			editor.setContent('<p>1234</p>');
			rng.setStart(editor.getBody().firstChild.firstChild, 0);
			rng.setEnd(editor.getBody().firstChild.firstChild, 4);
			editor.selection.setRng(rng);
			editor.execCommand('mceInsertClipboardContent', false, { content: '<p class="ListStyle" style="margin-left:36.0pt;mso-add-space:auto;text-indent:-18.0pt;mso-list:l0 level1 lfo1;tab-stops:list 36.0pt"><span lang="EN-US" style="color:black;mso-ansi-language:EN-US"><span style="mso-list:Ignore">1.<span style="font:7.0pt &quot;Times New Roman&quot;">&nbsp;&nbsp;&nbsp;&nbsp; </span></span></span><span lang="EN-US" style="font-family:Arial;mso-fareast-font-family:Arial;mso-bidi-font-family:Arial;color:black;mso-ansi-language:EN-US">Version 7.0</span><span lang="EN-US" style="font-family:Arial;mso-fareast-font-family:Arial;mso-bidi-font-family:Arial;color:black;mso-ansi-language:EN-US">:<o:p></o:p></span></p>' });
			equal(editor.getContent().replace(/[\r\n]+/g, ''), '<ol><li>Version 7.0:</li></ol>');
			editor.settings.paste_retain_style_properties = '';
		});

		test("Paste Word fake list before BR", function () {
			var rng = editor.dom.createRng();

			editor.setContent('<p>1234</p>');
			rng.setStart(editor.getBody().firstChild.firstChild, 0);
			rng.setEnd(editor.getBody().firstChild.firstChild, 4);
			editor.selection.setRng(rng);

			editor.execCommand('mceInsertContent', false, '<br>a');

			rng = editor.dom.createRng();
			rng.setStart(editor.getBody().firstChild, 0);
			rng.setEnd(editor.getBody().firstChild, 0);
			editor.selection.setRng(rng);

			editor.execCommand('mceInsertClipboardContent', false, { content: '<meta http-equiv="Content-Type" content="text/html; charset=utf-8"><meta name="ProgId" content="Word.Document"><meta name="Generator" content="Microsoft Word 12"><meta name="Originator" content="Microsoft Word 12"><link rel="File-List" href="file:///C:%5CUsers%5Cspocke%5CAppData%5CLocal%5CTemp%5Cmsohtmlclip1%5C01%5Cclip_filelist.xml"><link rel="themeData" href="file:///C:%5CUsers%5Cspocke%5CAppData%5CLocal%5CTemp%5Cmsohtmlclip1%5C01%5Cclip_themedata.thmx"><link rel="colorSchemeMapping" href="file:///C:%5CUsers%5Cspocke%5CAppData%5CLocal%5CTemp%5Cmsohtmlclip1%5C01%5Cclip_colorschememapping.xml"><!--[if gte mso 9]><xml> <w:WordDocument> <w:View>Normal</w:View> <w:Zoom>0</w:Zoom> <w:TrackMoves/> <w:TrackFormatting/> <w:HyphenationZone>21</w:HyphenationZone> <w:PunctuationKerning/> <w:ValidateAgainstSchemas/> <w:SaveIfXMLInvalid>false</w:SaveIfXMLInvalid> <w:IgnoreMixedContent>false</w:IgnoreMixedContent> <w:AlwaysShowPlaceholderText>false</w:AlwaysShowPlaceholderText> <w:DoNotPromoteQF/> <w:LidThemeOther>SV</w:LidThemeOther> <w:LidThemeAsian>X-NONE</w:LidThemeAsian> <w:LidThemeComplexScript>X-NONE</w:LidThemeComplexScript> <w:Compatibility> <w:BreakWrappedTables/> <w:SnapToGridInCell/> <w:WrapTextWithPunct/> <w:UseAsianBreakRules/> <w:DontGrowAutofit/> <w:SplitPgBreakAndParaMark/> <w:DontVertAlignCellWithSp/> <w:DontBreakConstrainedForcedTables/> <w:DontVertAlignInTxbx/> <w:Word11KerningPairs/> <w:CachedColBalance/> </w:Compatibility> <w:BrowserLevel>MicrosoftInternetExplorer4</w:BrowserLevel> <m:mathPr> <m:mathFont m:val="Cambria Math"/> <m:brkBin m:val="before"/> <m:brkBinSub m:val="&#45;-"/> <m:smallFrac m:val="off"/> <m:dispDef/> <m:lMargin m:val="0"/> <m:rMargin m:val="0"/> <m:defJc m:val="centerGroup"/> <m:wrapIndent m:val="1440"/> <m:intLim m:val="subSup"/> <m:naryLim m:val="undOvr"/> </m:mathPr></w:WordDocument> </xml><![endif]--><!--[if gte mso 9]><xml> <w:LatentStyles DefLockedState="false" DefUnhideWhenUsed="true" DefSemiHidden="true" DefQFormat="false" DefPriority="99" LatentStyleCount="267"> <w:LsdException Locked="false" Priority="0" SemiHidden="false" UnhideWhenUsed="false" QFormat="true" Name="Normal"/> <w:LsdException Locked="false" Priority="9" SemiHidden="false" UnhideWhenUsed="false" QFormat="true" Name="heading 1"/> <w:LsdException Locked="false" Priority="9" QFormat="true" Name="heading 2"/> <w:LsdException Locked="false" Priority="9" QFormat="true" Name="heading 3"/> <w:LsdException Locked="false" Priority="9" QFormat="true" Name="heading 4"/> <w:LsdException Locked="false" Priority="9" QFormat="true" Name="heading 5"/> <w:LsdException Locked="false" Priority="9" QFormat="true" Name="heading 6"/> <w:LsdException Locked="false" Priority="9" QFormat="true" Name="heading 7"/> <w:LsdException Locked="false" Priority="9" QFormat="true" Name="heading 8"/> <w:LsdException Locked="false" Priority="9" QFormat="true" Name="heading 9"/> <w:LsdException Locked="false" Priority="39" Name="toc 1"/> <w:LsdException Locked="false" Priority="39" Name="toc 2"/> <w:LsdException Locked="false" Priority="39" Name="toc 3"/> <w:LsdException Locked="false" Priority="39" Name="toc 4"/> <w:LsdException Locked="false" Priority="39" Name="toc 5"/> <w:LsdException Locked="false" Priority="39" Name="toc 6"/> <w:LsdException Locked="false" Priority="39" Name="toc 7"/> <w:LsdException Locked="false" Priority="39" Name="toc 8"/> <w:LsdException Locked="false" Priority="39" Name="toc 9"/> <w:LsdException Locked="false" Priority="35" QFormat="true" Name="caption"/> <w:LsdException Locked="false" Priority="10" SemiHidden="false" UnhideWhenUsed="false" QFormat="true" Name="Title"/> <w:LsdException Locked="false" Priority="1" Name="Default Paragraph Font"/> <w:LsdException Locked="false" Priority="11" SemiHidden="false" UnhideWhenUsed="false" QFormat="true" Name="Subtitle"/> <w:LsdException Locked="false" Priority="22" SemiHidden="false" UnhideWhenUsed="false" QFormat="true" Name="Strong"/>  <w:LsdException Locked="false" Priority="20" SemiHidden="false" UnhideWhenUsed="false" QFormat="true" Name="Emphasis"/>  <w:LsdException Locked="false" Priority="59" SemiHidden="false" UnhideWhenUsed="false" Name="Table Grid"/>  <w:LsdException Locked="false" UnhideWhenUsed="false" Name="Placeholder Text"/>  <w:LsdException Locked="false" Priority="1" SemiHidden="false" UnhideWhenUsed="false" QFormat="true" Name="No Spacing"/>  <w:LsdException Locked="false" Priority="60" SemiHidden="false" UnhideWhenUsed="false" Name="Light Shading"/>  <w:LsdException Locked="false" Priority="61" SemiHidden="false" UnhideWhenUsed="false" Name="Light List"/>  <w:LsdException Locked="false" Priority="62" SemiHidden="false" UnhideWhenUsed="false" Name="Light Grid"/>  <w:LsdException Locked="false" Priority="63" SemiHidden="false" UnhideWhenUsed="false" Name="Medium Shading 1"/>  <w:LsdException Locked="false" Priority="64" SemiHidden="false" UnhideWhenUsed="false" Name="Medium Shading 2"/>  <w:LsdException Locked="false" Priority="65" SemiHidden="false" UnhideWhenUsed="false" Name="Medium List 1"/>  <w:LsdException Locked="false" Priority="66" SemiHidden="false" UnhideWhenUsed="false" Name="Medium List 2"/>  <w:LsdException Locked="false" Priority="67" SemiHidden="false" UnhideWhenUsed="false" Name="Medium Grid 1"/>  <w:LsdException Locked="false" Priority="68" SemiHidden="false" UnhideWhenUsed="false" Name="Medium Grid 2"/>  <w:LsdException Locked="false" Priority="69" SemiHidden="false" UnhideWhenUsed="false" Name="Medium Grid 3"/>  <w:LsdException Locked="false" Priority="70" SemiHidden="false" UnhideWhenUsed="false" Name="Dark List"/>  <w:LsdException Locked="false" Priority="71" SemiHidden="false" UnhideWhenUsed="false" Name="Colorful Shading"/>  <w:LsdException Locked="false" Priority="72" SemiHidden="false" UnhideWhenUsed="false" Name="Colorful List"/>  <w:LsdException Locked="false" Priority="73" SemiHidden="false" UnhideWhenUsed="false" Name="Colorful Grid"/>  <w:LsdException Locked="false" Priority="60" SemiHidden="false" UnhideWhenUsed="false" Name="Light Shading Accent 1"/>  <w:LsdException Locked="false" Priority="61" SemiHidden="false" UnhideWhenUsed="false" Name="Light List Accent 1"/>  <w:LsdException Locked="false" Priority="62" SemiHidden="false" UnhideWhenUsed="false" Name="Light Grid Accent 1"/>  <w:LsdException Locked="false" Priority="63" SemiHidden="false" UnhideWhenUsed="false" Name="Medium Shading 1 Accent 1"/>  <w:LsdException Locked="false" Priority="64" SemiHidden="false" UnhideWhenUsed="false" Name="Medium Shading 2 Accent 1"/>  <w:LsdException Locked="false" Priority="65" SemiHidden="false" UnhideWhenUsed="false" Name="Medium List 1 Accent 1"/>  <w:LsdException Locked="false" UnhideWhenUsed="false" Name="Revision"/>  <w:LsdException Locked="false" Priority="34" SemiHidden="false" UnhideWhenUsed="false" QFormat="true" Name="List Paragraph"/>  <w:LsdException Locked="false" Priority="29" SemiHidden="false" UnhideWhenUsed="false" QFormat="true" Name="Quote"/>  <w:LsdException Locked="false" Priority="30" SemiHidden="false" UnhideWhenUsed="false" QFormat="true" Name="Intense Quote"/>  <w:LsdException Locked="false" Priority="66" SemiHidden="false" UnhideWhenUsed="false" Name="Medium List 2 Accent 1"/>  <w:LsdException Locked="false" Priority="67" SemiHidden="false" UnhideWhenUsed="false" Name="Medium Grid 1 Accent 1"/>  <w:LsdException Locked="false" Priority="68" SemiHidden="false" UnhideWhenUsed="false" Name="Medium Grid 2 Accent 1"/>  <w:LsdException Locked="false" Priority="69" SemiHidden="false" UnhideWhenUsed="false" Name="Medium Grid 3 Accent 1"/>  <w:LsdException Locked="false" Priority="70" SemiHidden="false" UnhideWhenUsed="false" Name="Dark List Accent 1"/>  <w:LsdException Locked="false" Priority="71" SemiHidden="false" UnhideWhenUsed="false" Name="Colorful Shading Accent 1"/>  <w:LsdException Locked="false" Priority="72" SemiHidden="false" UnhideWhenUsed="false" Name="Colorful List Accent 1"/>  <w:LsdException Locked="false" Priority="73" SemiHidden="false" UnhideWhenUsed="false" Name="Colorful Grid Accent 1"/>  <w:LsdException Locked="false" Priority="60" SemiHidden="false" UnhideWhenUsed="false" Name="Light Shading Accent 2"/>  <w:LsdException Locked="false" Priority="61" SemiHidden="false" UnhideWhenUsed="false" Name="Light List Accent 2"/>  <w:LsdException Locked="false" Priority="62" SemiHidden="false" UnhideWhenUsed="false" Name="Light Grid Accent 2"/>  <w:LsdException Locked="false" Priority="63" SemiHidden="false" UnhideWhenUsed="false" Name="Medium Shading 1 Accent 2"/>  <w:LsdException Locked="false" Priority="64" SemiHidden="false" UnhideWhenUsed="false" Name="Medium Shading 2 Accent 2"/>  <w:LsdException Locked="false" Priority="65" SemiHidden="false" UnhideWhenUsed="false" Name="Medium List 1 Accent 2"/>  <w:LsdException Locked="false" Priority="66" SemiHidden="false" UnhideWhenUsed="false" Name="Medium List 2 Accent 2"/>  <w:LsdException Locked="false" Priority="67" SemiHidden="false" UnhideWhenUsed="false" Name="Medium Grid 1 Accent 2"/>  <w:LsdException Locked="false" Priority="68" SemiHidden="false" UnhideWhenUsed="false" Name="Medium Grid 2 Accent 2"/>  <w:LsdException Locked="false" Priority="69" SemiHidden="false" UnhideWhenUsed="false" Name="Medium Grid 3 Accent 2"/>  <w:LsdException Locked="false" Priority="70" SemiHidden="false" UnhideWhenUsed="false" Name="Dark List Accent 2"/>  <w:LsdException Locked="false" Priority="71" SemiHidden="false" UnhideWhenUsed="false" Name="Colorful Shading Accent 2"/>  <w:LsdException Locked="false" Priority="72" SemiHidden="false" UnhideWhenUsed="false" Name="Colorful List Accent 2"/>  <w:LsdException Locked="false" Priority="73" SemiHidden="false" UnhideWhenUsed="false" Name="Colorful Grid Accent 2"/>  <w:LsdException Locked="false" Priority="60" SemiHidden="false" UnhideWhenUsed="false" Name="Light Shading Accent 3"/>  <w:LsdException Locked="false" Priority="61" SemiHidden="false" UnhideWhenUsed="false" Name="Light List Accent 3"/>  <w:LsdException Locked="false" Priority="62" SemiHidden="false" UnhideWhenUsed="false" Name="Light Grid Accent 3"/>  <w:LsdException Locked="false" Priority="63" SemiHidden="false" UnhideWhenUsed="false" Name="Medium Shading 1 Accent 3"/>  <w:LsdException Locked="false" Priority="64" SemiHidden="false" UnhideWhenUsed="false" Name="Medium Shading 2 Accent 3"/>  <w:LsdException Locked="false" Priority="65" SemiHidden="false" UnhideWhenUsed="false" Name="Medium List 1 Accent 3"/>  <w:LsdException Locked="false" Priority="66" SemiHidden="false" UnhideWhenUsed="false" Name="Medium List 2 Accent 3"/>  <w:LsdException Locked="false" Priority="67" SemiHidden="false" UnhideWhenUsed="false" Name="Medium Grid 1 Accent 3"/>  <w:LsdException Locked="false" Priority="68" SemiHidden="false" UnhideWhenUsed="false" Name="Medium Grid 2 Accent 3"/>  <w:LsdException Locked="false" Priority="69" SemiHidden="false" UnhideWhenUsed="false" Name="Medium Grid 3 Accent 3"/>  <w:LsdException Locked="false" Priority="70" SemiHidden="false" UnhideWhenUsed="false" Name="Dark List Accent 3"/>  <w:LsdException Locked="false" Priority="71" SemiHidden="false" UnhideWhenUsed="false" Name="Colorful Shading Accent 3"/>  <w:LsdException Locked="false" Priority="72" SemiHidden="false" UnhideWhenUsed="false" Name="Colorful List Accent 3"/>  <w:LsdException Locked="false" Priority="73" SemiHidden="false" UnhideWhenUsed="false" Name="Colorful Grid Accent 3"/>  <w:LsdException Locked="false" Priority="60" SemiHidden="false" UnhideWhenUsed="false" Name="Light Shading Accent 4"/>  <w:LsdException Locked="false" Priority="61" SemiHidden="false" UnhideWhenUsed="false" Name="Light List Accent 4"/>  <w:LsdException Locked="false" Priority="62" SemiHidden="false" UnhideWhenUsed="false" Name="Light Grid Accent 4"/>  <w:LsdException Locked="false" Priority="63" SemiHidden="false" UnhideWhenUsed="false" Name="Medium Shading 1 Accent 4"/>  <w:LsdException Locked="false" Priority="64" SemiHidden="false" UnhideWhenUsed="false" Name="Medium Shading 2 Accent 4"/>  <w:LsdException Locked="false" Priority="65" SemiHidden="false" UnhideWhenUsed="false" Name="Medium List 1 Accent 4"/>  <w:LsdException Locked="false" Priority="66" SemiHidden="false" UnhideWhenUsed="false" Name="Medium List 2 Accent 4"/>  <w:LsdException Locked="false" Priority="67" SemiHidden="false" UnhideWhenUsed="false" Name="Medium Grid 1 Accent 4"/>  <w:LsdException Locked="false" Priority="68" SemiHidden="false" UnhideWhenUsed="false" Name="Medium Grid 2 Accent 4"/>  <w:LsdException Locked="false" Priority="69" SemiHidden="false" UnhideWhenUsed="false" Name="Medium Grid 3 Accent 4"/>  <w:LsdException Locked="false" Priority="70" SemiHidden="false" UnhideWhenUsed="false" Name="Dark List Accent 4"/>  <w:LsdException Locked="false" Priority="71" SemiHidden="false" UnhideWhenUsed="false" Name="Colorful Shading Accent 4"/>  <w:LsdException Locked="false" Priority="72" SemiHidden="false" UnhideWhenUsed="false" Name="Colorful List Accent 4"/>  <w:LsdException Locked="false" Priority="73" SemiHidden="false" UnhideWhenUsed="false" Name="Colorful Grid Accent 4"/>  <w:LsdException Locked="false" Priority="60" SemiHidden="false" UnhideWhenUsed="false" Name="Light Shading Accent 5"/>  <w:LsdException Locked="false" Priority="61" SemiHidden="false" UnhideWhenUsed="false" Name="Light List Accent 5"/>  <w:LsdException Locked="false" Priority="62" SemiHidden="false" UnhideWhenUsed="false" Name="Light Grid Accent 5"/>  <w:LsdException Locked="false" Priority="63" SemiHidden="false" UnhideWhenUsed="false" Name="Medium Shading 1 Accent 5"/>  <w:LsdException Locked="false" Priority="64" SemiHidden="false" UnhideWhenUsed="false" Name="Medium Shading 2 Accent 5"/>  <w:LsdException Locked="false" Priority="65" SemiHidden="false" UnhideWhenUsed="false" Name="Medium List 1 Accent 5"/>  <w:LsdException Locked="false" Priority="66" SemiHidden="false" UnhideWhenUsed="false" Name="Medium List 2 Accent 5"/>  <w:LsdException Locked="false" Priority="67" SemiHidden="false" UnhideWhenUsed="false" Name="Medium Grid 1 Accent 5"/>  <w:LsdException Locked="false" Priority="68" SemiHidden="false" UnhideWhenUsed="false" Name="Medium Grid 2 Accent 5"/>  <w:LsdException Locked="false" Priority="69" SemiHidden="false" UnhideWhenUsed="false" Name="Medium Grid 3 Accent 5"/>  <w:LsdException Locked="false" Priority="70" SemiHidden="false" UnhideWhenUsed="false" Name="Dark List Accent 5"/>  <w:LsdException Locked="false" Priority="71" SemiHidden="false" UnhideWhenUsed="false" Name="Colorful Shading Accent 5"/>  <w:LsdException Locked="false" Priority="72" SemiHidden="false" UnhideWhenUsed="false" Name="Colorful List Accent 5"/>  <w:LsdException Locked="false" Priority="73" SemiHidden="false" UnhideWhenUsed="false" Name="Colorful Grid Accent 5"/>  <w:LsdException Locked="false" Priority="60" SemiHidden="false" UnhideWhenUsed="false" Name="Light Shading Accent 6"/>  <w:LsdException Locked="false" Priority="61" SemiHidden="false" UnhideWhenUsed="false" Name="Light List Accent 6"/>  <w:LsdException Locked="false" Priority="62" SemiHidden="false" UnhideWhenUsed="false" Name="Light Grid Accent 6"/>  <w:LsdException Locked="false" Priority="63" SemiHidden="false" UnhideWhenUsed="false" Name="Medium Shading 1 Accent 6"/>  <w:LsdException Locked="false" Priority="64" SemiHidden="false" UnhideWhenUsed="false" Name="Medium Shading 2 Accent 6"/>  <w:LsdException Locked="false" Priority="65" SemiHidden="false" UnhideWhenUsed="false" Name="Medium List 1 Accent 6"/>  <w:LsdException Locked="false" Priority="66" SemiHidden="false" UnhideWhenUsed="false" Name="Medium List 2 Accent 6"/>  <w:LsdException Locked="false" Priority="67" SemiHidden="false" UnhideWhenUsed="false" Name="Medium Grid 1 Accent 6"/>  <w:LsdException Locked="false" Priority="68" SemiHidden="false" UnhideWhenUsed="false" Name="Medium Grid 2 Accent 6"/>  <w:LsdException Locked="false" Priority="69" SemiHidden="false" UnhideWhenUsed="false" Name="Medium Grid 3 Accent 6"/>  <w:LsdException Locked="false" Priority="70" SemiHidden="false" UnhideWhenUsed="false" Name="Dark List Accent 6"/>  <w:LsdException Locked="false" Priority="71" SemiHidden="false" UnhideWhenUsed="false" Name="Colorful Shading Accent 6"/>  <w:LsdException Locked="false" Priority="72" SemiHidden="false" UnhideWhenUsed="false" Name="Colorful List Accent 6"/>  <w:LsdException Locked="false" Priority="73" SemiHidden="false" UnhideWhenUsed="false" Name="Colorful Grid Accent 6"/>  <w:LsdException Locked="false" Priority="19" SemiHidden="false" UnhideWhenUsed="false" QFormat="true" Name="Subtle Emphasis"/>  <w:LsdException Locked="false" Priority="21" SemiHidden="false" UnhideWhenUsed="false" QFormat="true" Name="Intense Emphasis"/>  <w:LsdException Locked="false" Priority="31" SemiHidden="false" UnhideWhenUsed="false" QFormat="true" Name="Subtle Reference"/>  <w:LsdException Locked="false" Priority="32" SemiHidden="false" UnhideWhenUsed="false" QFormat="true" Name="Intense Reference"/>  <w:LsdException Locked="false" Priority="33" SemiHidden="false" UnhideWhenUsed="false" QFormat="true" Name="Book Title"/>  <w:LsdException Locked="false" Priority="37" Name="Bibliography"/>  <w:LsdException Locked="false" Priority="39" QFormat="true" Name="TOC Heading"/>  </w:LatentStyles> </xml><![endif]--><style> <!-- /* Font Definitions */ @font-face {font-family:Wingdings; panose-1:5 0 0 0 0 0 0 0 0 0; mso-font-charset:2; mso-generic-font-family:auto; mso-font-pitch:variable; mso-font-signature:0 268435456 0 0 -2147483648 0;} @font-face {font-family:Wingdings; panose-1:5 0 0 0 0 0 0 0 0 0; mso-font-charset:2; mso-generic-font-family:auto; mso-font-pitch:variable; mso-font-signature:0 268435456 0 0 -2147483648 0;} @font-face {font-family:Calibri; panose-1:2 15 5 2 2 2 4 3 2 4; mso-font-charset:0; mso-generic-font-family:swiss; mso-font-pitch:variable; mso-font-signature:-1610611985 1073750139 0 0 159 0;} /* Style Definitions */ p.MsoNormal, li.MsoNormal, div.MsoNormal {mso-style-unhide:no; mso-style-qformat:yes; mso-style-parent:""; margin-top:0cm; margin-right:0cm; margin-bottom:10.0pt; margin-left:0cm; line-height:115%; mso-pagination:widow-orphan; font-size:11.0pt; font-family:"Calibri","sans-serif"; mso-ascii-font-family:Calibri; mso-ascii-theme-font:minor-latin; mso-fareast-font-family:Calibri; mso-fareast-theme-font:minor-latin; mso-hansi-font-family:Calibri; mso-hansi-theme-font:minor-latin; mso-bidi-font-family:"Times New Roman"; mso-bidi-theme-font:minor-bidi; mso-fareast-language:EN-US;} p.MsoListParagraph, li.MsoListParagraph, div.MsoListParagraph {mso-style-priority:34; mso-style-unhide:no; mso-style-qformat:yes; margin-top:0cm; margin-right:0cm; margin-bottom:10.0pt; margin-left:36.0pt; mso-add-space:auto; line-height:115%; mso-pagination:widow-orphan; font-size:11.0pt; font-family:"Calibri","sans-serif"; mso-ascii-font-family:Calibri; mso-ascii-theme-font:minor-latin; mso-fareast-font-family:Calibri; mso-fareast-theme-font:minor-latin; mso-hansi-font-family:Calibri; mso-hansi-theme-font:minor-latin; mso-bidi-font-family:"Times New Roman"; mso-bidi-theme-font:minor-bidi; mso-fareast-language:EN-US;} p.MsoListParagraphCxSpFirst, li.MsoListParagraphCxSpFirst, div.MsoListParagraphCxSpFirst {mso-style-priority:34; mso-style-unhide:no; mso-style-qformat:yes; mso-style-type:export-only; margin-top:0cm; margin-right:0cm; margin-bottom:0cm; margin-left:36.0pt; margin-bottom:.0001pt; mso-add-space:auto; line-height:115%; mso-pagination:widow-orphan; font-size:11.0pt; font-family:"Calibri","sans-serif"; mso-ascii-font-family:Calibri; mso-ascii-theme-font:minor-latin; mso-fareast-font-family:Calibri; mso-fareast-theme-font:minor-latin; mso-hansi-font-family:Calibri; mso-hansi-theme-font:minor-latin; mso-bidi-font-family:"Times New Roman"; mso-bidi-theme-font:minor-bidi; mso-fareast-language:EN-US;} p.MsoListParagraphCxSpMiddle, li.MsoListParagraphCxSpMiddle, div.MsoListParagraphCxSpMiddle {mso-style-priority:34; mso-style-unhide:no; mso-style-qformat:yes; mso-style-type:export-only; margin-top:0cm; margin-right:0cm; margin-bottom:0cm; margin-left:36.0pt; margin-bottom:.0001pt; mso-add-space:auto; line-height:115%; mso-pagination:widow-orphan; font-size:11.0pt; font-family:"Calibri","sans-serif"; mso-ascii-font-family:Calibri; mso-ascii-theme-font:minor-latin; mso-fareast-font-family:Calibri; mso-fareast-theme-font:minor-latin; mso-hansi-font-family:Calibri; mso-hansi-theme-font:minor-latin; mso-bidi-font-family:"Times New Roman"; mso-bidi-theme-font:minor-bidi; mso-fareast-language:EN-US;} p.MsoListParagraphCxSpLast, li.MsoListParagraphCxSpLast, div.MsoListParagraphCxSpLast {mso-style-priority:34; mso-style-unhide:no; mso-style-qformat:yes; mso-style-type:export-only; margin-top:0cm; margin-right:0cm; margin-bottom:10.0pt; margin-left:36.0pt; mso-add-space:auto; line-height:115%; mso-pagination:widow-orphan; font-size:11.0pt; font-family:"Calibri","sans-serif"; mso-ascii-font-family:Calibri; mso-ascii-theme-font:minor-latin; mso-fareast-font-family:Calibri; mso-fareast-theme-font:minor-latin; mso-hansi-font-family:Calibri; mso-hansi-theme-font:minor-latin; mso-bidi-font-family:"Times New Roman"; mso-bidi-theme-font:minor-bidi; mso-fareast-language:EN-US;} .MsoChpDefault {mso-style-type:export-only; mso-default-props:yes; mso-ascii-font-family:Calibri; mso-ascii-theme-font:minor-latin; mso-fareast-font-family:Calibri; mso-fareast-theme-font:minor-latin; mso-hansi-font-family:Calibri; mso-hansi-theme-font:minor-latin; mso-bidi-font-family:"Times New Roman"; mso-bidi-theme-font:minor-bidi; mso-fareast-language:EN-US;} .MsoPapDefault {mso-style-type:export-only; margin-bottom:10.0pt; line-height:115%;} @page Section1 {size:595.3pt 841.9pt; margin:70.85pt 70.85pt 70.85pt 70.85pt; mso-header-margin:35.4pt; mso-footer-margin:35.4pt; mso-paper-source:0;} div.Section1 {page:Section1;} /* List Definitions */ @list l0 {mso-list-id:1742563504; mso-list-type:hybrid; mso-list-template-ids:-524928352 69009409 69009411 69009413 69009409 69009411 69009413 69009409 69009411 69009413;} @list l0:level1 {mso-level-number-format:bullet; mso-level-text:?; mso-level-tab-stop:none; mso-level-number-position:left; text-indent:-18.0pt; font-family:Symbol;} ol {margin-bottom:0cm;} ul {margin-bottom:0cm;} --> </style><!--[if gte mso 10]> <style> /* Style Definitions */ table.MsoNormalTable {mso-style-name:"Table Normal"; mso-tstyle-rowband-size:0; mso-tstyle-colband-size:0; mso-style-noshow:yes; mso-style-priority:99; mso-style-qformat:yes; mso-style-parent:""; mso-padding-alt:0cm 5.4pt 0cm 5.4pt; mso-para-margin-top:0cm; mso-para-margin-right:0cm; mso-para-margin-bottom:10.0pt; mso-para-margin-left:0cm; line-height:115%; mso-pagination:widow-orphan; font-size:11.0pt; font-family:"Calibri","sans-serif"; mso-ascii-font-family:Calibri; mso-ascii-theme-font:minor-latin; mso-hansi-font-family:Calibri; mso-hansi-theme-font:minor-latin; mso-fareast-language:EN-US;} </style> <![endif]--> <p class="MsoListParagraphCxSpFirst" style="text-indent: -18pt;"><!--[if !supportLists]--><span style="font-family: Symbol;"><span style="">&middot;<span style="font-family: &quot;Times New Roman&quot;; font-style: normal; font-variant: normal; font-weight: normal; font-size: 7pt; line-height: normal; font-size-adjust: none; font-stretch: normal; -x-system-font: none;">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; </span></span></span><!--[endif]-->Item 1</p> <p class="MsoListParagraphCxSpMiddle" style="text-indent: -18pt;"><!--[if !supportLists]--><span style="font-family: Symbol;"><span style="">&middot;<span style="font-family: &quot;Times New Roman&quot;; font-style: normal; font-variant: normal; font-weight: normal; font-size: 7pt; line-height: normal; font-size-adjust: none; font-stretch: normal; -x-system-font: none;">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; </span></span></span><!--[endif]-->Item 2</p> <p class="MsoListParagraphCxSpMiddle" style="text-indent: -18pt;"><!--[if !supportLists]--><span style="font-family: Symbol;"><span style="">&middot;<span style="font-family: &quot;Times New Roman&quot;; font-style: normal; font-variant: normal; font-weight: normal; font-size: 7pt; line-height: normal; font-size-adjust: none; font-stretch: normal; -x-system-font: none;">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; </span></span></span><!--[endif]-->Item 3</p> <p class="MsoListParagraphCxSpMiddle" style="text-indent: -18pt;"><!--[if !supportLists]--><span style="font-family: Symbol;"><span style="">&middot;<span style="font-family: &quot;Times New Roman&quot;; font-style: normal; font-variant: normal; font-weight: normal; font-size: 7pt; line-height: normal; font-size-adjust: none; font-stretch: normal; -x-system-font: none;">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; </span></span></span><!--[endif]-->Item 4</p> <p class="MsoListParagraphCxSpMiddle" style="text-indent: -18pt;"><!--[if !supportLists]--><span style="font-family: Symbol;"><span style="">&middot;<span style="font-family: &quot;Times New Roman&quot;; font-style: normal; font-variant: normal; font-weight: normal; font-size: 7pt; line-height: normal; font-size-adjust: none; font-stretch: normal; -x-system-font: none;">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; </span></span></span><!--[endif]-->Item 5</p> <p class="MsoListParagraphCxSpLast" style="text-indent: -18pt;"><!--[if !supportLists]--><span style="font-family: Symbol;"><span style="">&middot;<span style="font-family: &quot;Times New Roman&quot;; font-style: normal; font-variant: normal; font-weight: normal; font-size: 7pt; line-height: normal; font-size-adjust: none; font-stretch: normal; -x-system-font: none;">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; </span></span></span><!--[endif]-->Item 6</p>' });

			equal(editor.getContent().replace(/[\r\n]+/g, ''), '<ul><li>Item 1</li><li>Item 2</li><li>Item 3</li><li>Item 4</li><li>Item 5</li><li>Item 6</li></ul><p><br />a</p>');
		});

		test("Paste Word list with type", function () {
			var rng = editor.dom.createRng();

			editor.setContent('');
			editor.execCommand('mceInsertClipboardContent', false, { content: '<ol style="margin-top:0in" start="1" type="A"><li class="MsoNormal">Item 1<o:p></o:p></li><li class="MsoNormal"><span lang="IT">Item 2<o:p></o:p></span></li><li class="MsoNormal">Item 3<o:p></o:p></li></ol>' });

			equal(editor.getContent().replace(/[\r\n]+/g, ''), '<ol start="1" type="A"><li>Item 1</li><li>Item 2</li><li>Item 3</li></ol>');
		});

		test("Paste Word list with strikethrough on numbers", function () {
			var rng = editor.dom.createRng();

			editor.settings.paste_remove_spans = false;
			editor.settings.paste_remove_styles = false;
			editor.settings.paste_retain_style_properties = 'text-decoration';

			editor.setContent('');
			editor.execCommand('mceInsertClipboardContent', false, {
				content: '<p class="MsoNormal" style="margin-left:36.0pt;text-indent:-18.0pt;mso-list:l0 level1 lfo1;tab-stops:list 72.0pt"><!--[if !supportLists]--><s><span lang="EN-US" style="font-family:Courier;mso-fareast-font-family:Courier;mso-bidi-font-family:Courier">1.<span style="font-size: 7pt; font-family: \'Times New Roman\';">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</span></span></s><!--[endif]--><s><span lang="EN-US" style="font-family:Courier">Item 1<o:p></o:p></span></s></p><p class="MsoNormal" style="margin-left:36.0pt;text-indent:-18.0pt;mso-list:l0 level1 lfo1;tab-stops:list 72.0pt"><!--[if !supportLists]--><s><span lang="EN-US" style="font-family:Courier;mso-fareast-font-family:Courier;mso-bidi-font-family:Courier">2.<span style="font-size: 7pt; font-family: \'Times New Roman\';">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</span></span></s><!--[endif]--><b><span lang="EN-US" style="font-family:Courier">Item 2</span></b><s><span lang="EN-US" style="font-family:Courier"><o:p></o:p></span></s></p>'
			});

			equal(editor.getContent().replace(/[\r\n]+/g, ''), '<ol><li><span style=\"text-decoration: line-through;\">Item 1</span></li><li><strong>Item 2</strong></li></ol>');
		});

		test("Paste Word table", function () {
			var rng = editor.dom.createRng();

			editor.setContent('<p>1234</p>');
			rng.setStart(editor.getBody().firstChild.firstChild, 0);
			rng.setEnd(editor.getBody().firstChild.firstChild, 4);
			editor.selection.setRng(rng);

			editor.execCommand('mceInsertClipboardContent', false, { content: '<meta http-equiv="Content-Type" content="text/html; charset=utf-8"><meta name="ProgId" content="Word.Document"><meta name="Generator" content="Microsoft Word 12"><meta name="Originator" content="Microsoft Word 12"><link rel="File-List" href="file:///C:%5CUsers%5Cspocke%5CAppData%5CLocal%5CTemp%5Cmsohtmlclip1%5C01%5Cclip_filelist.xml"><link rel="themeData" href="file:///C:%5CUsers%5Cspocke%5CAppData%5CLocal%5CTemp%5Cmsohtmlclip1%5C01%5Cclip_themedata.thmx"><link rel="colorSchemeMapping" href="file:///C:%5CUsers%5Cspocke%5CAppData%5CLocal%5CTemp%5Cmsohtmlclip1%5C01%5Cclip_colorschememapping.xml"><!--[if gte mso 9]><xml> <w:WordDocument> <w:View>Normal</w:View> <w:Zoom>0</w:Zoom> <w:TrackMoves/> <w:TrackFormatting/> <w:HyphenationZone>21</w:HyphenationZone> <w:PunctuationKerning/> <w:ValidateAgainstSchemas/> <w:SaveIfXMLInvalid>false</w:SaveIfXMLInvalid> <w:IgnoreMixedContent>false</w:IgnoreMixedContent> <w:AlwaysShowPlaceholderText>false</w:AlwaysShowPlaceholderText> <w:DoNotPromoteQF/> <w:LidThemeOther>SV</w:LidThemeOther> <w:LidThemeAsian>X-NONE</w:LidThemeAsian> <w:LidThemeComplexScript>X-NONE</w:LidThemeComplexScript> <w:Compatibility> <w:BreakWrappedTables/> <w:SnapToGridInCell/> <w:WrapTextWithPunct/> <w:UseAsianBreakRules/> <w:DontGrowAutofit/> <w:SplitPgBreakAndParaMark/> <w:DontVertAlignCellWithSp/> <w:DontBreakConstrainedForcedTables/> <w:DontVertAlignInTxbx/> <w:Word11KerningPairs/> <w:CachedColBalance/> </w:Compatibility> <w:BrowserLevel>MicrosoftInternetExplorer4</w:BrowserLevel> <m:mathPr> <m:mathFont m:val="Cambria Math"/> <m:brkBin m:val="before"/> <m:brkBinSub m:val="&#45;-"/> <m:smallFrac m:val="off"/> <m:dispDef/> <m:lMargin m:val="0"/> <m:rMargin m:val="0"/> <m:defJc m:val="centerGroup"/> <m:wrapIndent m:val="1440"/> <m:intLim m:val="subSup"/> <m:naryLim m:val="undOvr"/> </m:mathPr></w:WordDocument> </xml><![endif]--><!--[if gte mso 9]><xml> <w:LatentStyles DefLockedState="false" DefUnhideWhenUsed="true" DefSemiHidden="true" DefQFormat="false" DefPriority="99" LatentStyleCount="267"> <w:LsdException Locked="false" Priority="0" SemiHidden="false" UnhideWhenUsed="false" QFormat="true" Name="Normal"/> <w:LsdException Locked="false" Priority="9" SemiHidden="false" UnhideWhenUsed="false" QFormat="true" Name="heading 1"/> <w:LsdException Locked="false" Priority="9" QFormat="true" Name="heading 2"/> <w:LsdException Locked="false" Priority="9" QFormat="true" Name="heading 3"/> <w:LsdException Locked="false" Priority="9" QFormat="true" Name="heading 4"/> <w:LsdException Locked="false" Priority="9" QFormat="true" Name="heading 5"/> <w:LsdException Locked="false" Priority="9" QFormat="true" Name="heading 6"/> <w:LsdException Locked="false" Priority="9" QFormat="true" Name="heading 7"/> <w:LsdException Locked="false" Priority="9" QFormat="true" Name="heading 8"/> <w:LsdException Locked="false" Priority="9" QFormat="true" Name="heading 9"/> <w:LsdException Locked="false" Priority="39" Name="toc 1"/> <w:LsdException Locked="false" Priority="39" Name="toc 2"/> <w:LsdException Locked="false" Priority="39" Name="toc 3"/> <w:LsdException Locked="false" Priority="39" Name="toc 4"/> <w:LsdException Locked="false" Priority="39" Name="toc 5"/> <w:LsdException Locked="false" Priority="39" Name="toc 6"/> <w:LsdException Locked="false" Priority="39" Name="toc 7"/> <w:LsdException Locked="false" Priority="39" Name="toc 8"/> <w:LsdException Locked="false" Priority="39" Name="toc 9"/> <w:LsdException Locked="false" Priority="35" QFormat="true" Name="caption"/> <w:LsdException Locked="false" Priority="10" SemiHidden="false" UnhideWhenUsed="false" QFormat="true" Name="Title"/> <w:LsdException Locked="false" Priority="1" Name="Default Paragraph Font"/> <w:LsdException Locked="false" Priority="11" SemiHidden="false" UnhideWhenUsed="false" QFormat="true" Name="Subtitle"/> <w:LsdException Locked="false" Priority="22" SemiHidden="false" UnhideWhenUsed="false" QFormat="true" Name="Strong"/>  <w:LsdException Locked="false" Priority="20" SemiHidden="false" UnhideWhenUsed="false" QFormat="true" Name="Emphasis"/>  <w:LsdException Locked="false" Priority="59" SemiHidden="false" UnhideWhenUsed="false" Name="Table Grid"/>  <w:LsdException Locked="false" UnhideWhenUsed="false" Name="Placeholder Text"/>  <w:LsdException Locked="false" Priority="1" SemiHidden="false" UnhideWhenUsed="false" QFormat="true" Name="No Spacing"/>  <w:LsdException Locked="false" Priority="60" SemiHidden="false" UnhideWhenUsed="false" Name="Light Shading"/>  <w:LsdException Locked="false" Priority="61" SemiHidden="false" UnhideWhenUsed="false" Name="Light List"/>  <w:LsdException Locked="false" Priority="62" SemiHidden="false" UnhideWhenUsed="false" Name="Light Grid"/>  <w:LsdException Locked="false" Priority="63" SemiHidden="false" UnhideWhenUsed="false" Name="Medium Shading 1"/>  <w:LsdException Locked="false" Priority="64" SemiHidden="false" UnhideWhenUsed="false" Name="Medium Shading 2"/>  <w:LsdException Locked="false" Priority="65" SemiHidden="false" UnhideWhenUsed="false" Name="Medium List 1"/>  <w:LsdException Locked="false" Priority="66" SemiHidden="false" UnhideWhenUsed="false" Name="Medium List 2"/>  <w:LsdException Locked="false" Priority="67" SemiHidden="false" UnhideWhenUsed="false" Name="Medium Grid 1"/>  <w:LsdException Locked="false" Priority="68" SemiHidden="false" UnhideWhenUsed="false" Name="Medium Grid 2"/>  <w:LsdException Locked="false" Priority="69" SemiHidden="false" UnhideWhenUsed="false" Name="Medium Grid 3"/>  <w:LsdException Locked="false" Priority="70" SemiHidden="false" UnhideWhenUsed="false" Name="Dark List"/>  <w:LsdException Locked="false" Priority="71" SemiHidden="false" UnhideWhenUsed="false" Name="Colorful Shading"/>  <w:LsdException Locked="false" Priority="72" SemiHidden="false" UnhideWhenUsed="false" Name="Colorful List"/>  <w:LsdException Locked="false" Priority="73" SemiHidden="false" UnhideWhenUsed="false" Name="Colorful Grid"/>  <w:LsdException Locked="false" Priority="60" SemiHidden="false" UnhideWhenUsed="false" Name="Light Shading Accent 1"/>  <w:LsdException Locked="false" Priority="61" SemiHidden="false" UnhideWhenUsed="false" Name="Light List Accent 1"/>  <w:LsdException Locked="false" Priority="62" SemiHidden="false" UnhideWhenUsed="false" Name="Light Grid Accent 1"/>  <w:LsdException Locked="false" Priority="63" SemiHidden="false" UnhideWhenUsed="false" Name="Medium Shading 1 Accent 1"/>  <w:LsdException Locked="false" Priority="64" SemiHidden="false" UnhideWhenUsed="false" Name="Medium Shading 2 Accent 1"/>  <w:LsdException Locked="false" Priority="65" SemiHidden="false" UnhideWhenUsed="false" Name="Medium List 1 Accent 1"/>  <w:LsdException Locked="false" UnhideWhenUsed="false" Name="Revision"/>  <w:LsdException Locked="false" Priority="34" SemiHidden="false" UnhideWhenUsed="false" QFormat="true" Name="List Paragraph"/>  <w:LsdException Locked="false" Priority="29" SemiHidden="false" UnhideWhenUsed="false" QFormat="true" Name="Quote"/>  <w:LsdException Locked="false" Priority="30" SemiHidden="false" UnhideWhenUsed="false" QFormat="true" Name="Intense Quote"/>  <w:LsdException Locked="false" Priority="66" SemiHidden="false" UnhideWhenUsed="false" Name="Medium List 2 Accent 1"/>  <w:LsdException Locked="false" Priority="67" SemiHidden="false" UnhideWhenUsed="false" Name="Medium Grid 1 Accent 1"/>  <w:LsdException Locked="false" Priority="68" SemiHidden="false" UnhideWhenUsed="false" Name="Medium Grid 2 Accent 1"/>  <w:LsdException Locked="false" Priority="69" SemiHidden="false" UnhideWhenUsed="false" Name="Medium Grid 3 Accent 1"/>  <w:LsdException Locked="false" Priority="70" SemiHidden="false" UnhideWhenUsed="false" Name="Dark List Accent 1"/>  <w:LsdException Locked="false" Priority="71" SemiHidden="false" UnhideWhenUsed="false" Name="Colorful Shading Accent 1"/>  <w:LsdException Locked="false" Priority="72" SemiHidden="false" UnhideWhenUsed="false" Name="Colorful List Accent 1"/>  <w:LsdException Locked="false" Priority="73" SemiHidden="false" UnhideWhenUsed="false" Name="Colorful Grid Accent 1"/>  <w:LsdException Locked="false" Priority="60" SemiHidden="false" UnhideWhenUsed="false" Name="Light Shading Accent 2"/>  <w:LsdException Locked="false" Priority="61" SemiHidden="false" UnhideWhenUsed="false" Name="Light List Accent 2"/>  <w:LsdException Locked="false" Priority="62" SemiHidden="false" UnhideWhenUsed="false" Name="Light Grid Accent 2"/>  <w:LsdException Locked="false" Priority="63" SemiHidden="false" UnhideWhenUsed="false" Name="Medium Shading 1 Accent 2"/>  <w:LsdException Locked="false" Priority="64" SemiHidden="false" UnhideWhenUsed="false" Name="Medium Shading 2 Accent 2"/>  <w:LsdException Locked="false" Priority="65" SemiHidden="false" UnhideWhenUsed="false" Name="Medium List 1 Accent 2"/>  <w:LsdException Locked="false" Priority="66" SemiHidden="false" UnhideWhenUsed="false" Name="Medium List 2 Accent 2"/>  <w:LsdException Locked="false" Priority="67" SemiHidden="false" UnhideWhenUsed="false" Name="Medium Grid 1 Accent 2"/>  <w:LsdException Locked="false" Priority="68" SemiHidden="false" UnhideWhenUsed="false" Name="Medium Grid 2 Accent 2"/>  <w:LsdException Locked="false" Priority="69" SemiHidden="false" UnhideWhenUsed="false" Name="Medium Grid 3 Accent 2"/>  <w:LsdException Locked="false" Priority="70" SemiHidden="false" UnhideWhenUsed="false" Name="Dark List Accent 2"/>  <w:LsdException Locked="false" Priority="71" SemiHidden="false" UnhideWhenUsed="false" Name="Colorful Shading Accent 2"/>  <w:LsdException Locked="false" Priority="72" SemiHidden="false" UnhideWhenUsed="false" Name="Colorful List Accent 2"/>  <w:LsdException Locked="false" Priority="73" SemiHidden="false" UnhideWhenUsed="false" Name="Colorful Grid Accent 2"/>  <w:LsdException Locked="false" Priority="60" SemiHidden="false" UnhideWhenUsed="false" Name="Light Shading Accent 3"/>  <w:LsdException Locked="false" Priority="61" SemiHidden="false" UnhideWhenUsed="false" Name="Light List Accent 3"/>  <w:LsdException Locked="false" Priority="62" SemiHidden="false" UnhideWhenUsed="false" Name="Light Grid Accent 3"/>  <w:LsdException Locked="false" Priority="63" SemiHidden="false" UnhideWhenUsed="false" Name="Medium Shading 1 Accent 3"/>  <w:LsdException Locked="false" Priority="64" SemiHidden="false" UnhideWhenUsed="false" Name="Medium Shading 2 Accent 3"/>  <w:LsdException Locked="false" Priority="65" SemiHidden="false" UnhideWhenUsed="false" Name="Medium List 1 Accent 3"/>  <w:LsdException Locked="false" Priority="66" SemiHidden="false" UnhideWhenUsed="false" Name="Medium List 2 Accent 3"/>  <w:LsdException Locked="false" Priority="67" SemiHidden="false" UnhideWhenUsed="false" Name="Medium Grid 1 Accent 3"/>  <w:LsdException Locked="false" Priority="68" SemiHidden="false" UnhideWhenUsed="false" Name="Medium Grid 2 Accent 3"/>  <w:LsdException Locked="false" Priority="69" SemiHidden="false" UnhideWhenUsed="false" Name="Medium Grid 3 Accent 3"/>  <w:LsdException Locked="false" Priority="70" SemiHidden="false" UnhideWhenUsed="false" Name="Dark List Accent 3"/>  <w:LsdException Locked="false" Priority="71" SemiHidden="false" UnhideWhenUsed="false" Name="Colorful Shading Accent 3"/>  <w:LsdException Locked="false" Priority="72" SemiHidden="false" UnhideWhenUsed="false" Name="Colorful List Accent 3"/>  <w:LsdException Locked="false" Priority="73" SemiHidden="false" UnhideWhenUsed="false" Name="Colorful Grid Accent 3"/>  <w:LsdException Locked="false" Priority="60" SemiHidden="false" UnhideWhenUsed="false" Name="Light Shading Accent 4"/>  <w:LsdException Locked="false" Priority="61" SemiHidden="false" UnhideWhenUsed="false" Name="Light List Accent 4"/>  <w:LsdException Locked="false" Priority="62" SemiHidden="false" UnhideWhenUsed="false" Name="Light Grid Accent 4"/>  <w:LsdException Locked="false" Priority="63" SemiHidden="false" UnhideWhenUsed="false" Name="Medium Shading 1 Accent 4"/>  <w:LsdException Locked="false" Priority="64" SemiHidden="false" UnhideWhenUsed="false" Name="Medium Shading 2 Accent 4"/>  <w:LsdException Locked="false" Priority="65" SemiHidden="false" UnhideWhenUsed="false" Name="Medium List 1 Accent 4"/>  <w:LsdException Locked="false" Priority="66" SemiHidden="false" UnhideWhenUsed="false" Name="Medium List 2 Accent 4"/>  <w:LsdException Locked="false" Priority="67" SemiHidden="false" UnhideWhenUsed="false" Name="Medium Grid 1 Accent 4"/>  <w:LsdException Locked="false" Priority="68" SemiHidden="false" UnhideWhenUsed="false" Name="Medium Grid 2 Accent 4"/>  <w:LsdException Locked="false" Priority="69" SemiHidden="false" UnhideWhenUsed="false" Name="Medium Grid 3 Accent 4"/>  <w:LsdException Locked="false" Priority="70" SemiHidden="false" UnhideWhenUsed="false" Name="Dark List Accent 4"/>  <w:LsdException Locked="false" Priority="71" SemiHidden="false" UnhideWhenUsed="false" Name="Colorful Shading Accent 4"/>  <w:LsdException Locked="false" Priority="72" SemiHidden="false" UnhideWhenUsed="false" Name="Colorful List Accent 4"/>  <w:LsdException Locked="false" Priority="73" SemiHidden="false" UnhideWhenUsed="false" Name="Colorful Grid Accent 4"/>  <w:LsdException Locked="false" Priority="60" SemiHidden="false" UnhideWhenUsed="false" Name="Light Shading Accent 5"/>  <w:LsdException Locked="false" Priority="61" SemiHidden="false" UnhideWhenUsed="false" Name="Light List Accent 5"/>  <w:LsdException Locked="false" Priority="62" SemiHidden="false" UnhideWhenUsed="false" Name="Light Grid Accent 5"/>  <w:LsdException Locked="false" Priority="63" SemiHidden="false" UnhideWhenUsed="false" Name="Medium Shading 1 Accent 5"/>  <w:LsdException Locked="false" Priority="64" SemiHidden="false" UnhideWhenUsed="false" Name="Medium Shading 2 Accent 5"/>  <w:LsdException Locked="false" Priority="65" SemiHidden="false" UnhideWhenUsed="false" Name="Medium List 1 Accent 5"/>  <w:LsdException Locked="false" Priority="66" SemiHidden="false" UnhideWhenUsed="false" Name="Medium List 2 Accent 5"/>  <w:LsdException Locked="false" Priority="67" SemiHidden="false" UnhideWhenUsed="false" Name="Medium Grid 1 Accent 5"/>  <w:LsdException Locked="false" Priority="68" SemiHidden="false" UnhideWhenUsed="false" Name="Medium Grid 2 Accent 5"/>  <w:LsdException Locked="false" Priority="69" SemiHidden="false" UnhideWhenUsed="false" Name="Medium Grid 3 Accent 5"/>  <w:LsdException Locked="false" Priority="70" SemiHidden="false" UnhideWhenUsed="false" Name="Dark List Accent 5"/>  <w:LsdException Locked="false" Priority="71" SemiHidden="false" UnhideWhenUsed="false" Name="Colorful Shading Accent 5"/>  <w:LsdException Locked="false" Priority="72" SemiHidden="false" UnhideWhenUsed="false" Name="Colorful List Accent 5"/>  <w:LsdException Locked="false" Priority="73" SemiHidden="false" UnhideWhenUsed="false" Name="Colorful Grid Accent 5"/>  <w:LsdException Locked="false" Priority="60" SemiHidden="false" UnhideWhenUsed="false" Name="Light Shading Accent 6"/>  <w:LsdException Locked="false" Priority="61" SemiHidden="false" UnhideWhenUsed="false" Name="Light List Accent 6"/>  <w:LsdException Locked="false" Priority="62" SemiHidden="false" UnhideWhenUsed="false" Name="Light Grid Accent 6"/>  <w:LsdException Locked="false" Priority="63" SemiHidden="false" UnhideWhenUsed="false" Name="Medium Shading 1 Accent 6"/>  <w:LsdException Locked="false" Priority="64" SemiHidden="false" UnhideWhenUsed="false" Name="Medium Shading 2 Accent 6"/>  <w:LsdException Locked="false" Priority="65" SemiHidden="false" UnhideWhenUsed="false" Name="Medium List 1 Accent 6"/>  <w:LsdException Locked="false" Priority="66" SemiHidden="false" UnhideWhenUsed="false" Name="Medium List 2 Accent 6"/>  <w:LsdException Locked="false" Priority="67" SemiHidden="false" UnhideWhenUsed="false" Name="Medium Grid 1 Accent 6"/>  <w:LsdException Locked="false" Priority="68" SemiHidden="false" UnhideWhenUsed="false" Name="Medium Grid 2 Accent 6"/>  <w:LsdException Locked="false" Priority="69" SemiHidden="false" UnhideWhenUsed="false" Name="Medium Grid 3 Accent 6"/>  <w:LsdException Locked="false" Priority="70" SemiHidden="false" UnhideWhenUsed="false" Name="Dark List Accent 6"/>  <w:LsdException Locked="false" Priority="71" SemiHidden="false" UnhideWhenUsed="false" Name="Colorful Shading Accent 6"/>  <w:LsdException Locked="false" Priority="72" SemiHidden="false" UnhideWhenUsed="false" Name="Colorful List Accent 6"/>  <w:LsdException Locked="false" Priority="73" SemiHidden="false" UnhideWhenUsed="false" Name="Colorful Grid Accent 6"/>  <w:LsdException Locked="false" Priority="19" SemiHidden="false" UnhideWhenUsed="false" QFormat="true" Name="Subtle Emphasis"/>  <w:LsdException Locked="false" Priority="21" SemiHidden="false" UnhideWhenUsed="false" QFormat="true" Name="Intense Emphasis"/>  <w:LsdException Locked="false" Priority="31" SemiHidden="false" UnhideWhenUsed="false" QFormat="true" Name="Subtle Reference"/>  <w:LsdException Locked="false" Priority="32" SemiHidden="false" UnhideWhenUsed="false" QFormat="true" Name="Intense Reference"/>  <w:LsdException Locked="false" Priority="33" SemiHidden="false" UnhideWhenUsed="false" QFormat="true" Name="Book Title"/>  <w:LsdException Locked="false" Priority="37" Name="Bibliography"/>  <w:LsdException Locked="false" Priority="39" QFormat="true" Name="TOC Heading"/>  </w:LatentStyles> </xml><![endif]--><style> <!-- /* Font Definitions */ @font-face {font-family:Calibri; panose-1:2 15 5 2 2 2 4 3 2 4; mso-font-charset:0; mso-generic-font-family:swiss; mso-font-pitch:variable; mso-font-signature:-1610611985 1073750139 0 0 159 0;} /* Style Definitions */ p.MsoNormal, li.MsoNormal, div.MsoNormal {mso-style-unhide:no; mso-style-qformat:yes; mso-style-parent:""; margin-top:0cm; margin-right:0cm; margin-bottom:10.0pt; margin-left:0cm; line-height:115%; mso-pagination:widow-orphan; font-size:11.0pt; font-family:"Calibri","sans-serif"; mso-ascii-font-family:Calibri; mso-ascii-theme-font:minor-latin; mso-fareast-font-family:Calibri; mso-fareast-theme-font:minor-latin; mso-hansi-font-family:Calibri; mso-hansi-theme-font:minor-latin; mso-bidi-font-family:"Times New Roman"; mso-bidi-theme-font:minor-bidi; mso-fareast-language:EN-US;} p.MsoListParagraph, li.MsoListParagraph, div.MsoListParagraph {mso-style-priority:34; mso-style-unhide:no; mso-style-qformat:yes; margin-top:0cm; margin-right:0cm; margin-bottom:10.0pt; margin-left:36.0pt; mso-add-space:auto; line-height:115%; mso-pagination:widow-orphan; font-size:11.0pt; font-family:"Calibri","sans-serif"; mso-ascii-font-family:Calibri; mso-ascii-theme-font:minor-latin; mso-fareast-font-family:Calibri; mso-fareast-theme-font:minor-latin; mso-hansi-font-family:Calibri; mso-hansi-theme-font:minor-latin; mso-bidi-font-family:"Times New Roman"; mso-bidi-theme-font:minor-bidi; mso-fareast-language:EN-US;} p.MsoListParagraphCxSpFirst, li.MsoListParagraphCxSpFirst, div.MsoListParagraphCxSpFirst {mso-style-priority:34; mso-style-unhide:no; mso-style-qformat:yes; mso-style-type:export-only; margin-top:0cm; margin-right:0cm; margin-bottom:0cm; margin-left:36.0pt; margin-bottom:.0001pt; mso-add-space:auto; line-height:115%; mso-pagination:widow-orphan; font-size:11.0pt; font-family:"Calibri","sans-serif"; mso-ascii-font-family:Calibri; mso-ascii-theme-font:minor-latin; mso-fareast-font-family:Calibri; mso-fareast-theme-font:minor-latin; mso-hansi-font-family:Calibri; mso-hansi-theme-font:minor-latin; mso-bidi-font-family:"Times New Roman"; mso-bidi-theme-font:minor-bidi; mso-fareast-language:EN-US;} p.MsoListParagraphCxSpMiddle, li.MsoListParagraphCxSpMiddle, div.MsoListParagraphCxSpMiddle {mso-style-priority:34; mso-style-unhide:no; mso-style-qformat:yes; mso-style-type:export-only; margin-top:0cm; margin-right:0cm; margin-bottom:0cm; margin-left:36.0pt; margin-bottom:.0001pt; mso-add-space:auto; line-height:115%; mso-pagination:widow-orphan; font-size:11.0pt; font-family:"Calibri","sans-serif"; mso-ascii-font-family:Calibri; mso-ascii-theme-font:minor-latin; mso-fareast-font-family:Calibri; mso-fareast-theme-font:minor-latin; mso-hansi-font-family:Calibri; mso-hansi-theme-font:minor-latin; mso-bidi-font-family:"Times New Roman"; mso-bidi-theme-font:minor-bidi; mso-fareast-language:EN-US;} p.MsoListParagraphCxSpLast, li.MsoListParagraphCxSpLast, div.MsoListParagraphCxSpLast {mso-style-priority:34; mso-style-unhide:no; mso-style-qformat:yes; mso-style-type:export-only; margin-top:0cm; margin-right:0cm; margin-bottom:10.0pt; margin-left:36.0pt; mso-add-space:auto; line-height:115%; mso-pagination:widow-orphan; font-size:11.0pt; font-family:"Calibri","sans-serif"; mso-ascii-font-family:Calibri; mso-ascii-theme-font:minor-latin; mso-fareast-font-family:Calibri; mso-fareast-theme-font:minor-latin; mso-hansi-font-family:Calibri; mso-hansi-theme-font:minor-latin; mso-bidi-font-family:"Times New Roman"; mso-bidi-theme-font:minor-bidi; mso-fareast-language:EN-US;} .MsoChpDefault {mso-style-type:export-only; mso-default-props:yes; mso-ascii-font-family:Calibri; mso-ascii-theme-font:minor-latin; mso-fareast-font-family:Calibri; mso-fareast-theme-font:minor-latin; mso-hansi-font-family:Calibri; mso-hansi-theme-font:minor-latin; mso-bidi-font-family:"Times New Roman"; mso-bidi-theme-font:minor-bidi; mso-fareast-language:EN-US;} .MsoPapDefault {mso-style-type:export-only; margin-bottom:10.0pt; line-height:115%;} @page Section1 {size:595.3pt 841.9pt; margin:70.85pt 70.85pt 70.85pt 70.85pt; mso-header-margin:35.4pt; mso-footer-margin:35.4pt; mso-paper-source:0;} div.Section1 {page:Section1;} --> </style><!--[if gte mso 10]> <style> /* Style Definitions */ table.MsoNormalTable {mso-style-name:"Table Normal"; mso-tstyle-rowband-size:0; mso-tstyle-colband-size:0; mso-style-noshow:yes; mso-style-priority:99; mso-style-qformat:yes; mso-style-parent:""; mso-padding-alt:0cm 5.4pt 0cm 5.4pt; mso-para-margin-top:0cm; mso-para-margin-right:0cm; mso-para-margin-bottom:10.0pt; mso-para-margin-left:0cm; line-height:115%; mso-pagination:widow-orphan; font-size:11.0pt; font-family:"Calibri","sans-serif"; mso-ascii-font-family:Calibri; mso-ascii-theme-font:minor-latin; mso-hansi-font-family:Calibri; mso-hansi-theme-font:minor-latin; mso-fareast-language:EN-US;} table.MsoTableGrid {mso-style-name:"Table Grid"; mso-tstyle-rowband-size:0; mso-tstyle-colband-size:0; mso-style-priority:59; mso-style-unhide:no; border:solid black 1.0pt; mso-border-themecolor:text1; mso-border-alt:solid black .5pt; mso-border-themecolor:text1; mso-padding-alt:0cm 5.4pt 0cm 5.4pt; mso-border-insideh:.5pt solid black; mso-border-insideh-themecolor:text1; mso-border-insidev:.5pt solid black; mso-border-insidev-themecolor:text1; mso-para-margin:0cm; mso-para-margin-bottom:.0001pt; mso-pagination:widow-orphan; font-size:11.0pt; font-family:"Calibri","sans-serif"; mso-ascii-font-family:Calibri; mso-ascii-theme-font:minor-latin; mso-hansi-font-family:Calibri; mso-hansi-theme-font:minor-latin; mso-fareast-language:EN-US;} </style> <![endif]--> <table class="MsoTableGrid" style="border: medium none ; margin-left: 36pt; border-collapse: collapse;" border="1" cellpadding="0" cellspacing="0"> <tbody><tr style=""> <td style="border: 1pt solid black; padding: 0cm 5.4pt; width: 230.3pt;" valign="top" width="307"> <p class="MsoListParagraphCxSpFirst" style="margin: 0cm 0cm 0.0001pt; line-height: normal;">Cell 1</p> </td> <td style="border-style: solid solid solid none; border-color: black black black -moz-use-text-color; border-width: 1pt 1pt 1pt medium; padding: 0cm 5.4pt; width: 230.3pt;" valign="top" width="307"> <p class="MsoListParagraphCxSpLast" style="margin: 0cm 0cm 0.0001pt; line-height: normal;">Cell 2</p> </td> </tr> <tr style=""> <td style="border-style: none solid solid; border-color: -moz-use-text-color black black; border-width: medium 1pt 1pt; padding: 0cm 5.4pt; width: 230.3pt;" valign="top" width="307"> <p class="MsoListParagraphCxSpFirst" style="margin: 0cm 0cm 0.0001pt; line-height: normal;">Cell 3</p> </td> <td style="border-style: none solid solid none; border-color: -moz-use-text-color black black -moz-use-text-color; border-width: medium 1pt 1pt medium; padding: 0cm 5.4pt; width: 230.3pt;" valign="top" width="307"> <p class="MsoListParagraphCxSpLast" style="margin: 0cm 0cm 0.0001pt; line-height: normal;">Cell 4</p> </td> </tr> </tbody></table> <p class="MsoListParagraph"><o:p>&nbsp;</o:p></p>' });
			equal(editor.getContent().replace(/[\r\n]+/g, ''), '<table border="1" cellspacing="0" cellpadding="0"><tbody><tr><td style="vertical-align:top;width:307px"><p>Cell 1</p></td><td style="width:307px"><p>Cell 2</p></td></tr><tr><td style="vertical-align:top;width:307px"><p>Cell 3</p></td><td style="vertical-align:top;width:307px"><p>Cell 4</p></td></tr></tbody></table><p>&nbsp;</p>');
		});

		test("Paste Word retain styles", function () {
			var rng = editor.dom.createRng();

			editor.settings.paste_remove_styles = true;
			editor.settings.paste_retain_style_properties = 'color,background-color,font-family';

			// Test color
			editor.setContent('');
			editor.execCommand('SelectAll');
			editor.execCommand('mceInsertClipboardContent', false, { content: '<p class="MsoNormal" style="color: #ff0000">Test</p>' });
			equal(trimContent(editor.getContent().replace(/[\r\n]+/g, '')), '<p style=\"color: #ff0000;\">Test</p>');

			// Test background-color
			editor.setContent('');
			editor.execCommand('SelectAll');
			editor.execCommand('mceInsertClipboardContent', false, { content: '<p class="MsoNormal" style="background-color: #ff0000">Test</p>' });
			equal(trimContent(editor.getContent().replace(/[\r\n]+/g, '')), '<p style=\"background-color: #ff0000;\">Test</p>');

			delete editor.settings.paste_remove_styles;
			delete editor.settings.paste_retain_style_properties;
		});

		test("Paste Word Remove Footnotes", function () {
			var rng = editor.dom.createRng();

			editor.settings.paste_process_footnotes = 'remove';

			// Test color
			editor.setContent('');
			editor.execCommand('SelectAll');
			editor.execCommand('mceInsertClipboardContent', false, { content: '<meta http-equiv="Content-Type" content="text/html; charset=utf-8"> <meta name="ProgId" content="Word.Document"> <meta name="Generator" content="Microsoft Word 15"> <meta name="Originator" content="Microsoft Word 15"> <link rel="File-List" href="file:////Users/ryandemmer/Library/Group%20Containers/UBF8T346G9.Office/TemporaryItems/msohtmlclip/clip_filelist.xml"> <link rel="themeData" href="file:////Users/ryandemmer/Library/Group%20Containers/UBF8T346G9.Office/TemporaryItems/msohtmlclip/clip_themedata.thmx"> <link rel="colorSchemeMapping" href="file:////Users/ryandemmer/Library/Group%20Containers/UBF8T346G9.Office/TemporaryItems/msohtmlclip/clip_colorschememapping.xml"> <style>@font-face{font-family:SimSun;panose-1:2 1 6 0 3 1 1 1 1 1;mso-font-alt:宋体;mso-font-charset:134;mso-generic-font-family:auto;mso-font-pitch:variable;mso-font-signature:3 680460288 22 0 262145 0;}@font-face{font-family:"Cambria Math";panose-1:2 4 5 3 5 4 6 3 2 4;mso-font-charset:0;mso-generic-font-family:roman;mso-font-pitch:variable;mso-font-signature:-536870145 1107305727 0 0 415 0;}@font-face{font-family:Calibri;panose-1:2 15 5 2 2 2 4 3 2 4;mso-font-charset:0;mso-generic-font-family:swiss;mso-font-pitch:variable;mso-font-signature:-536859905 -1073732485 9 0 511 0;}@font-face{font-family:"\@SimSun";panose-1:2 1 6 0 3 1 1 1 1 1;mso-font-charset:134;mso-generic-font-family:auto;mso-font-pitch:variable;mso-font-signature:3 680460288 22 0 262145 0;}p.MsoNormal,li.MsoNormal,div.MsoNormal{mso-style-unhide:no;mso-style-parent:"";margin:0 0 10.0pt;line-height:115%;mso-pagination:widow-orphan;mso-hyphenate:none;font-size:11.0pt;font-family:"Calibri",sans-serif;mso-fareast-font-family:SimSun;mso-ansi-language:EN-ZA;mso-fareast-language:EN-US;}p.MsoFootnoteText,li.MsoFootnoteText,div.MsoFootnoteText{mso-style-unhide:no;mso-style-link:"Footnote Text Char";margin:0;mso-line-height-alt:5.0pt;mso-pagination:widow-orphan;mso-hyphenate:none;font-size:12.0pt;font-family:"Calibri",sans-serif;mso-fareast-font-family:SimSun;mso-ansi-language:EN-ZA;mso-fareast-language:EN-US;}span.MsoFootnoteReference{mso-style-unhide:no;vertical-align:super;}span.Footnoteanchor{mso-style-name:"Footnote anchor";mso-style-unhide:no;mso-style-parent:"";vertical-align:super;}span.FootnoteTextChar{mso-style-name:"Footnote Text Char";mso-style-unhide:no;mso-style-locked:yes;mso-style-link:"Footnote Text";font-family:"Calibri",sans-serif;mso-ascii-font-family:Calibri;mso-fareast-font-family:SimSun;mso-hansi-font-family:Calibri;mso-bidi-font-family:Calibri;mso-ansi-language:EN-ZA;mso-fareast-language:EN-US;}.MsoChpDefault{mso-style-type:export-only;mso-default-props:yes;font-family:"Calibri",sans-serif;mso-ascii-font-family:Calibri;mso-ascii-theme-font:minor-latin;mso-fareast-font-family:"Times New Roman";mso-fareast-theme-font:minor-fareast;mso-hansi-font-family:Calibri;mso-hansi-theme-font:minor-latin;mso-bidi-font-family:"Times New Roman";mso-bidi-theme-font:minor-bidi;mso-font-kerning:0;mso-ligatures:none;}@page{mso-footnote-separator:url("/Users/ryandemmer/Library/Group Containers/UBF8T346G9.Office/TemporaryItems/msohtmlclip/clip_header.htm") fs;mso-footnote-continuation-separator:url("/Users/ryandemmer/Library/Group Containers/UBF8T346G9.Office/TemporaryItems/msohtmlclip/clip_header.htm") fcs;mso-endnote-separator:url("/Users/ryandemmer/Library/Group Containers/UBF8T346G9.Office/TemporaryItems/msohtmlclip/clip_header.htm") es;mso-endnote-continuation-separator:url("/Users/ryandemmer/Library/Group Containers/UBF8T346G9.Office/TemporaryItems/msohtmlclip/clip_header.htm") ecs;}@page WordSection1{size:595.3pt 841.9pt;margin:72.0pt;mso-header-margin:35.4pt;mso-footer-margin:0;mso-forms-protection:no;mso-paper-source:0;}div.WordSection1{page:WordSection1;}</style> <p class="MsoNormal"><a name="__RefHeading__60_1272064333"></a><span lang="EN-ZA"style="mso-ascii-font-family:Calibri;mso-ascii-theme-font:minor-latin; mso-hansi-font-family:Calibri;mso-hansi-theme-font:minor-latin;mso-bidi-font-family: Calibri;mso-bidi-theme-font:minor-latin">Nullam<a style="mso-footnote-id:ftn1"href="#_ftn1"name="_ftnref1"title=""><span class="Footnoteanchor"style="vertical-align: super;"><span style="mso-special-character:footnote"><span class="Footnoteanchor"style="vertical-align: super;"><span lang="EN-ZA"style="font-size:11.0pt;line-height:115%; font-family:&quot;Calibri&quot;,sans-serif;mso-ascii-theme-font:minor-latin;mso-fareast-font-family: SimSun;mso-hansi-theme-font:minor-latin;mso-bidi-theme-font:minor-latin; mso-ansi-language:EN-ZA;mso-fareast-language:EN-US;mso-bidi-language:AR-SA">[1]</span></span></span></span></a>nec nibh ac quam dapibus porta.<o:p></o:p></span></p><div style="mso-element:footnote-list"><br clear="all"><hr align="left"size="1"width="33%"><div style="mso-element:footnote"id="ftn1"><p class="MsoFootnoteText"><a style="mso-footnote-id:ftn1"href="#_ftnref1"name="_ftn1"title=""><span class="MsoFootnoteReference"><span lang="EN-ZA"><span style="mso-special-character:footnote"><span class="MsoFootnoteReference"><span lang="EN-ZA"style="font-size:12.0pt;line-height: 115%;font-family:&quot;Calibri&quot;,sans-serif;mso-fareast-font-family:SimSun; mso-ansi-language:EN-ZA;mso-fareast-language:EN-US;mso-bidi-language:AR-SA">[1]</span></span></span></span></span></a><span lang="EN-ZA">Footnote<o:p></o:p></span></p></div></div>' });

			equal(trimContent(editor.getContent().replace(/[\r\n]+/g, '')), '<p>Nullam nec nibh ac quam dapibus porta.</p><p>&nbsp;</p><p>Footnote</p>');

			delete editor.settings.paste_process_footnotes;
		});

		test("Paste Word Unlink Footnotes", function () {
			var rng = editor.dom.createRng();

			editor.settings.paste_process_footnotes = 'unlink';

			// Test color
			editor.setContent('');
			editor.execCommand('SelectAll');
			editor.execCommand('mceInsertClipboardContent', false, { content: '<meta http-equiv="Content-Type" content="text/html; charset=utf-8"> <meta name="ProgId" content="Word.Document"> <meta name="Generator" content="Microsoft Word 15"> <meta name="Originator" content="Microsoft Word 15"> <link rel="File-List" href="file:////Users/ryandemmer/Library/Group%20Containers/UBF8T346G9.Office/TemporaryItems/msohtmlclip/clip_filelist.xml"> <link rel="themeData" href="file:////Users/ryandemmer/Library/Group%20Containers/UBF8T346G9.Office/TemporaryItems/msohtmlclip/clip_themedata.thmx"> <link rel="colorSchemeMapping" href="file:////Users/ryandemmer/Library/Group%20Containers/UBF8T346G9.Office/TemporaryItems/msohtmlclip/clip_colorschememapping.xml"> <style>@font-face{font-family:SimSun;panose-1:2 1 6 0 3 1 1 1 1 1;mso-font-alt:宋体;mso-font-charset:134;mso-generic-font-family:auto;mso-font-pitch:variable;mso-font-signature:3 680460288 22 0 262145 0;}@font-face{font-family:"Cambria Math";panose-1:2 4 5 3 5 4 6 3 2 4;mso-font-charset:0;mso-generic-font-family:roman;mso-font-pitch:variable;mso-font-signature:-536870145 1107305727 0 0 415 0;}@font-face{font-family:Calibri;panose-1:2 15 5 2 2 2 4 3 2 4;mso-font-charset:0;mso-generic-font-family:swiss;mso-font-pitch:variable;mso-font-signature:-536859905 -1073732485 9 0 511 0;}@font-face{font-family:"\@SimSun";panose-1:2 1 6 0 3 1 1 1 1 1;mso-font-charset:134;mso-generic-font-family:auto;mso-font-pitch:variable;mso-font-signature:3 680460288 22 0 262145 0;}p.MsoNormal,li.MsoNormal,div.MsoNormal{mso-style-unhide:no;mso-style-parent:"";margin:0 0 10.0pt;line-height:115%;mso-pagination:widow-orphan;mso-hyphenate:none;font-size:11.0pt;font-family:"Calibri",sans-serif;mso-fareast-font-family:SimSun;mso-ansi-language:EN-ZA;mso-fareast-language:EN-US;}p.MsoFootnoteText,li.MsoFootnoteText,div.MsoFootnoteText{mso-style-unhide:no;mso-style-link:"Footnote Text Char";margin:0;mso-line-height-alt:5.0pt;mso-pagination:widow-orphan;mso-hyphenate:none;font-size:12.0pt;font-family:"Calibri",sans-serif;mso-fareast-font-family:SimSun;mso-ansi-language:EN-ZA;mso-fareast-language:EN-US;}span.MsoFootnoteReference{mso-style-unhide:no;vertical-align:super;}span.Footnoteanchor{mso-style-name:"Footnote anchor";mso-style-unhide:no;mso-style-parent:"";vertical-align:super;}span.FootnoteTextChar{mso-style-name:"Footnote Text Char";mso-style-unhide:no;mso-style-locked:yes;mso-style-link:"Footnote Text";font-family:"Calibri",sans-serif;mso-ascii-font-family:Calibri;mso-fareast-font-family:SimSun;mso-hansi-font-family:Calibri;mso-bidi-font-family:Calibri;mso-ansi-language:EN-ZA;mso-fareast-language:EN-US;}.MsoChpDefault{mso-style-type:export-only;mso-default-props:yes;font-family:"Calibri",sans-serif;mso-ascii-font-family:Calibri;mso-ascii-theme-font:minor-latin;mso-fareast-font-family:"Times New Roman";mso-fareast-theme-font:minor-fareast;mso-hansi-font-family:Calibri;mso-hansi-theme-font:minor-latin;mso-bidi-font-family:"Times New Roman";mso-bidi-theme-font:minor-bidi;mso-font-kerning:0;mso-ligatures:none;}@page{mso-footnote-separator:url("/Users/ryandemmer/Library/Group Containers/UBF8T346G9.Office/TemporaryItems/msohtmlclip/clip_header.htm") fs;mso-footnote-continuation-separator:url("/Users/ryandemmer/Library/Group Containers/UBF8T346G9.Office/TemporaryItems/msohtmlclip/clip_header.htm") fcs;mso-endnote-separator:url("/Users/ryandemmer/Library/Group Containers/UBF8T346G9.Office/TemporaryItems/msohtmlclip/clip_header.htm") es;mso-endnote-continuation-separator:url("/Users/ryandemmer/Library/Group Containers/UBF8T346G9.Office/TemporaryItems/msohtmlclip/clip_header.htm") ecs;}@page WordSection1{size:595.3pt 841.9pt;margin:72.0pt;mso-header-margin:35.4pt;mso-footer-margin:0;mso-forms-protection:no;mso-paper-source:0;}div.WordSection1{page:WordSection1;}</style> <p class="MsoNormal"><a name="__RefHeading__60_1272064333"></a><span lang="EN-ZA"style="mso-ascii-font-family:Calibri;mso-ascii-theme-font:minor-latin; mso-hansi-font-family:Calibri;mso-hansi-theme-font:minor-latin;mso-bidi-font-family: Calibri;mso-bidi-theme-font:minor-latin">Nullam<a style="mso-footnote-id:ftn1"href="#_ftn1"name="_ftnref1"title=""><span class="Footnoteanchor"style="vertical-align: super;"><span style="mso-special-character:footnote"><span class="Footnoteanchor"style="vertical-align: super;"><span lang="EN-ZA"style="font-size:11.0pt;line-height:115%; font-family:&quot;Calibri&quot;,sans-serif;mso-ascii-theme-font:minor-latin;mso-fareast-font-family: SimSun;mso-hansi-theme-font:minor-latin;mso-bidi-theme-font:minor-latin; mso-ansi-language:EN-ZA;mso-fareast-language:EN-US;mso-bidi-language:AR-SA">[1]</span></span></span></span></a>nec nibh ac quam dapibus porta.<o:p></o:p></span></p><div style="mso-element:footnote-list"><br clear="all"><hr align="left"size="1"width="33%"><div style="mso-element:footnote"id="ftn1"><p class="MsoFootnoteText"><a style="mso-footnote-id:ftn1"href="#_ftnref1"name="_ftn1"title=""><span class="MsoFootnoteReference"><span lang="EN-ZA"><span style="mso-special-character:footnote"><span class="MsoFootnoteReference"><span lang="EN-ZA"style="font-size:12.0pt;line-height: 115%;font-family:&quot;Calibri&quot;,sans-serif;mso-fareast-font-family:SimSun; mso-ansi-language:EN-ZA;mso-fareast-language:EN-US;mso-bidi-language:AR-SA">[1]</span></span></span></span></span></a><span lang="EN-ZA">Footnote<o:p></o:p></span></p></div></div>' });

			equal(trimContent(editor.getContent().replace(/[\r\n]+/g, '')), '<p>Nullam [1]nec nibh ac quam dapibus porta.</p><p>&nbsp;</p><p>[1]Footnote</p>');

			delete editor.settings.paste_process_footnotes;
		});

		test("Paste Word Convert Footnotes", function () {
			var rng = editor.dom.createRng();

			editor.settings.paste_process_footnotes = 'convert';

			// Test color
			editor.setContent('');
			editor.execCommand('SelectAll');
			editor.execCommand('mceInsertClipboardContent', false, { content: '<meta http-equiv="Content-Type" content="text/html; charset=utf-8"> <meta name="ProgId" content="Word.Document"> <meta name="Generator" content="Microsoft Word 15"> <meta name="Originator" content="Microsoft Word 15"> <link rel="File-List" href="file:////Users/ryandemmer/Library/Group%20Containers/UBF8T346G9.Office/TemporaryItems/msohtmlclip/clip_filelist.xml"> <link rel="themeData" href="file:////Users/ryandemmer/Library/Group%20Containers/UBF8T346G9.Office/TemporaryItems/msohtmlclip/clip_themedata.thmx"> <link rel="colorSchemeMapping" href="file:////Users/ryandemmer/Library/Group%20Containers/UBF8T346G9.Office/TemporaryItems/msohtmlclip/clip_colorschememapping.xml"> <style>@font-face{font-family:SimSun;panose-1:2 1 6 0 3 1 1 1 1 1;mso-font-alt:宋体;mso-font-charset:134;mso-generic-font-family:auto;mso-font-pitch:variable;mso-font-signature:3 680460288 22 0 262145 0;}@font-face{font-family:"Cambria Math";panose-1:2 4 5 3 5 4 6 3 2 4;mso-font-charset:0;mso-generic-font-family:roman;mso-font-pitch:variable;mso-font-signature:-536870145 1107305727 0 0 415 0;}@font-face{font-family:Calibri;panose-1:2 15 5 2 2 2 4 3 2 4;mso-font-charset:0;mso-generic-font-family:swiss;mso-font-pitch:variable;mso-font-signature:-536859905 -1073732485 9 0 511 0;}@font-face{font-family:"\@SimSun";panose-1:2 1 6 0 3 1 1 1 1 1;mso-font-charset:134;mso-generic-font-family:auto;mso-font-pitch:variable;mso-font-signature:3 680460288 22 0 262145 0;}p.MsoNormal,li.MsoNormal,div.MsoNormal{mso-style-unhide:no;mso-style-parent:"";margin:0 0 10.0pt;line-height:115%;mso-pagination:widow-orphan;mso-hyphenate:none;font-size:11.0pt;font-family:"Calibri",sans-serif;mso-fareast-font-family:SimSun;mso-ansi-language:EN-ZA;mso-fareast-language:EN-US;}p.MsoFootnoteText,li.MsoFootnoteText,div.MsoFootnoteText{mso-style-unhide:no;mso-style-link:"Footnote Text Char";margin:0;mso-line-height-alt:5.0pt;mso-pagination:widow-orphan;mso-hyphenate:none;font-size:12.0pt;font-family:"Calibri",sans-serif;mso-fareast-font-family:SimSun;mso-ansi-language:EN-ZA;mso-fareast-language:EN-US;}span.MsoFootnoteReference{mso-style-unhide:no;vertical-align:super;}span.Footnoteanchor{mso-style-name:"Footnote anchor";mso-style-unhide:no;mso-style-parent:"";vertical-align:super;}span.FootnoteTextChar{mso-style-name:"Footnote Text Char";mso-style-unhide:no;mso-style-locked:yes;mso-style-link:"Footnote Text";font-family:"Calibri",sans-serif;mso-ascii-font-family:Calibri;mso-fareast-font-family:SimSun;mso-hansi-font-family:Calibri;mso-bidi-font-family:Calibri;mso-ansi-language:EN-ZA;mso-fareast-language:EN-US;}.MsoChpDefault{mso-style-type:export-only;mso-default-props:yes;font-family:"Calibri",sans-serif;mso-ascii-font-family:Calibri;mso-ascii-theme-font:minor-latin;mso-fareast-font-family:"Times New Roman";mso-fareast-theme-font:minor-fareast;mso-hansi-font-family:Calibri;mso-hansi-theme-font:minor-latin;mso-bidi-font-family:"Times New Roman";mso-bidi-theme-font:minor-bidi;mso-font-kerning:0;mso-ligatures:none;}@page{mso-footnote-separator:url("/Users/ryandemmer/Library/Group Containers/UBF8T346G9.Office/TemporaryItems/msohtmlclip/clip_header.htm") fs;mso-footnote-continuation-separator:url("/Users/ryandemmer/Library/Group Containers/UBF8T346G9.Office/TemporaryItems/msohtmlclip/clip_header.htm") fcs;mso-endnote-separator:url("/Users/ryandemmer/Library/Group Containers/UBF8T346G9.Office/TemporaryItems/msohtmlclip/clip_header.htm") es;mso-endnote-continuation-separator:url("/Users/ryandemmer/Library/Group Containers/UBF8T346G9.Office/TemporaryItems/msohtmlclip/clip_header.htm") ecs;}@page WordSection1{size:595.3pt 841.9pt;margin:72.0pt;mso-header-margin:35.4pt;mso-footer-margin:0;mso-forms-protection:no;mso-paper-source:0;}div.WordSection1{page:WordSection1;}</style> <p class="MsoNormal"><a name="__RefHeading__60_1272064333"></a><span lang="EN-ZA"style="mso-ascii-font-family:Calibri;mso-ascii-theme-font:minor-latin; mso-hansi-font-family:Calibri;mso-hansi-theme-font:minor-latin;mso-bidi-font-family: Calibri;mso-bidi-theme-font:minor-latin">Nullam<a style="mso-footnote-id:ftn1"href="#_ftn1"name="_ftnref1"title=""><span class="Footnoteanchor"style="vertical-align: super;"><span style="mso-special-character:footnote"><span class="Footnoteanchor"style="vertical-align: super;"><span lang="EN-ZA"style="font-size:11.0pt;line-height:115%; font-family:&quot;Calibri&quot;,sans-serif;mso-ascii-theme-font:minor-latin;mso-fareast-font-family: SimSun;mso-hansi-theme-font:minor-latin;mso-bidi-theme-font:minor-latin; mso-ansi-language:EN-ZA;mso-fareast-language:EN-US;mso-bidi-language:AR-SA">[1]</span></span></span></span></a>nec nibh ac quam dapibus porta.<o:p></o:p></span></p><div style="mso-element:footnote-list"><br clear="all"><hr align="left"size="1"width="33%"><div style="mso-element:footnote"id="ftn1"><p class="MsoFootnoteText"><a style="mso-footnote-id:ftn1"href="#_ftnref1"name="_ftn1"title=""><span class="MsoFootnoteReference"><span lang="EN-ZA"><span style="mso-special-character:footnote"><span class="MsoFootnoteReference"><span lang="EN-ZA"style="font-size:12.0pt;line-height: 115%;font-family:&quot;Calibri&quot;,sans-serif;mso-fareast-font-family:SimSun; mso-ansi-language:EN-ZA;mso-fareast-language:EN-US;mso-bidi-language:AR-SA">[1]</span></span></span></span></span></a><span lang="EN-ZA">Footnote<o:p></o:p></span></p></div></div>' });

			equal(trimContent(editor.getContent().replace(/[\r\n]+/g, '')), '<p>Nullam <a href="#_ftn1" id="_ftnref1">[1]</a>nec nibh ac quam dapibus porta.</p><p>&nbsp;</p><p><a href="#_ftnref1" id="_ftn1"><sup>[1]</sup></a>Footnote</p>');

			delete editor.settings.paste_process_footnotes;
		});

		test("Paste part of list from IE", function () {
			var rng = editor.dom.createRng();

			editor.setContent('');
			editor.execCommand('SelectAll');
			editor.execCommand('mceInsertClipboardContent', false, { content: '<li>item2</li><li>item3</li>' });
			equal(trimContent(editor.getContent().replace(/[\r\n]+/g, '')), '<ul><li>item2</li><li>item3</li></ul>', 'List tags are inferred when pasting LI');
		});

		test("Force Word Cleanup", function () {
			var rng = editor.dom.createRng();

			editor.settings.paste_force_cleanup = true;
			editor.settings.paste_remove_styles = false;

			// Test color
			editor.setContent('');
			editor.execCommand('SelectAll');

			editor.execCommand('mceInsertClipboardContent', false, { content: '<p style="mso-foreground: #ff0000;">Test</p>' });
			equal(trimContent(editor.getContent().replace(/[\r\n]+/g, '')), '<p style="color: #ff0000;">Test</p>');

			editor.settings.paste_force_cleanup = false;
			editor.settings.paste_remove_styles = true;
		});

		test("Disable default filters", function () {
			var rng = editor.dom.createRng();

			editor.settings.paste_enable_default_filters = false;

			// Test color
			editor.setContent('');
			editor.execCommand('SelectAll');

			editor.execCommand('mceInsertClipboardContent', false, { content: '<p class="MsoNormal" style="color: #ff0000;">Test</p>' });
			equal(trimContent(editor.getContent().replace(/[\r\n]+/g, '')), '<p class="MsoNormal" style="color: #ff0000;">Test</p>');

			editor.settings.paste_enable_default_filters = true;
		});

		test('paste invalid content with spans on page', function () {
			var startingContent = '<p>123 testing <span>span later in document</span></p>',
				insertedContent = '<ul><li>u</li><li>l</li></ul>';
			editor.setContent(startingContent);
			rng = editor.dom.createRng();
			rng.setStart(editor.dom.select('p')[0].firstChild, 0);
			rng.setEnd(editor.dom.select('p')[0].firstChild, 0);
			editor.selection.setRng(rng);
			editor.execCommand('mceInsertClipboardContent', false, { content: insertedContent });

			equal(editor.getContent().replace(/[\r\n]+/g, ''), insertedContent + startingContent);
		});

		test('paste plain text with space', function () {
			editor.setContent('<p>text</p>');
			rng = editor.dom.createRng();
			rng.setStart(editor.dom.select('p')[0].firstChild, 1);
			rng.setEnd(editor.dom.select('p')[0].firstChild, 2);
			editor.selection.setRng(rng);

			editor.execCommand('mceInsertClipboardContent', false, { text: ' a ' });

			equal(editor.getContent().replace(/[\r\n]+/g, ''), '<p>t a xt</p>');
		});

		test('paste plain text with double linefeeds', function () {
			editor.setContent('<p>text</p>');
			rng = editor.dom.createRng();
			rng.setStart(editor.dom.select('p')[0].firstChild, 1);
			rng.setEnd(editor.dom.select('p')[0].firstChild, 2);
			editor.selection.setRng(rng);

			editor.execCommand('mceInsertClipboardContent', false, { text: 'a\n\nb\n\n\c\n\n' });

			equal(editor.getContent().replace(/[\r\n]+/g, ''), '<p>t</p><p>a</p><p>b</p><p>c</p><p>xt</p>');
		});

		test('paste plain text with entities', function () {
			editor.setContent('<p>text</p>');
			rng = editor.dom.createRng();
			rng.setStart(editor.dom.select('p')[0].firstChild, 1);
			rng.setEnd(editor.dom.select('p')[0].firstChild, 2);
			editor.selection.setRng(rng);
			//editor.plugins.clipboard._insertPlainText('< & >');

			editor.execCommand('mceInsertClipboardContent', false, { text: '< & >' });

			equal(editor.getContent().replace(/[\r\n]+/g, ''), '<p>t&lt; &amp; &gt;xt</p>');
		});

		tinymce.init({
			mode: "exact",
			elements: "elm1",
			theme: "advanced",
			add_unload_trigger: false,
			language_load: false,
			plugins: 'clipboard',
			schema: 'mixed',
			compress: {
				'css': true,
				'javascript': true
			},
			init_instance_callback: function (ed) {
				editor = ed;
				QUnit.start();
			}
		});
	</script>

	<h1 id="qunit-header">Unit tests for the Paste plugin</h1>
	<h2 id="qunit-banner"></h2>
	<div id="qunit-testrunner-toolbar"></div>
	<h2 id="qunit-userAgent"></h2>
	<ol id="qunit-tests"></ol>

	<textarea id="elm1" name="elm1"></textarea>
	<div>
		<a href="javascript:alert(tinymce.EditorManager.get('elm1').getContent({format : 'raw'}));">[getRawContents]</a>
		<a href="javascript:alert(tinymce.EditorManager.get('elm1').getContent());">[getContents]</a>
	</div>
</body>

</html>tinymce/plugins/clipboard/plugin.js000060400000017111152456167170013503 0ustar00/* jce - 2.9.99.2 | 2026-04-22 | https://www.joomlacontenteditor.net | Source: https://github.com/widgetfactory/jce | Copyright (C) 2006 - 2026 Ryan Demmer. All rights reserved | GNU/GPL Version 2 or later - http://www.gnu.org/licenses/gpl-2.0.html */
!function() {
    "use strict";
    var DOM = tinymce.DOM, each$1 = tinymce.each;
    function openWin(ed, cmd) {
        var title = "", msg = (msg = ed.getLang("clipboard.paste_dlg_title", "Use %s+V on your keyboard to paste text into the window.")).replace(/%s/g, tinymce.isMac ? "CMD" : "CTRL"), ctrl = (title = "mcePaste" === cmd ? ed.getLang("clipboard.paste_desc") : ed.getLang("clipboard.paste_text_desc"), 
        '<textarea id="' + ed.id + '_paste_content" dir="ltr" wrap="soft" rows="14"></textarea>'), msg = '<div class="mceModalRow mceModalStack">   <label for="' + ed.id + '_paste_content">' + msg + '</label></div><div class="mceModalRow">   <div class="mceModalControl">' + ctrl + "</div></div>";
        ed.windowManager.open({
            title: title,
            content: msg,
            size: "mce-modal-portrait-xlarge",
            open: function() {
                var elm, pasteEd, inp = DOM.get(ed.id + "_paste_content");
                "mcePaste" == cmd && (elm = inp, (pasteEd = new tinymce.Editor(elm.id, {
                    plugins: "",
                    language_load: !1,
                    forced_root_block: !1,
                    verify_html: !1,
                    invalid_elements: ed.settings.invalid_elements,
                    base_url: ed.settings.base_url,
                    document_base_url: ed.settings.document_base_url,
                    directionality: ed.settings.directionality,
                    content_css: ed.settings.content_css,
                    allow_event_attributes: ed.settings.allow_event_attributes,
                    object_resizing: !1,
                    paste_upload_data_images: !0,
                    paste_data_images: !1,
                    schema: "mixed",
                    theme: function() {
                        var parent = DOM.create("div", {
                            role: "application",
                            id: elm.id + "_parent",
                            style: "width:100%"
                        }), container = DOM.add(parent, "div", {
                            style: "width:100%"
                        });
                        return DOM.insertAfter(parent, elm), {
                            iframeContainer: container,
                            editorContainer: parent
                        };
                    }
                })).contentCSS = ed.contentCSS, pasteEd.onPreInit.add(function() {
                    var dom = pasteEd.dom;
                    this.serializer.addAttributeFilter("data-mce-fragment", function(nodes, name) {
                        for (var i = nodes.length; i--; ) nodes[i].attr("data-mce-fragment", null);
                    }), pasteEd.onPastePostProcess.add(function(ed, o) {
                        each$1(dom.select("img[data-mce-upload-marker]", o.node), function(img) {
                            dom.setAttrib(img, "src", tinymce.util.Env.transparentSrc), 
                            dom.addClass(img, "mce-object mce-object-img"), dom.setStyles(img, {
                                width: img.width || "",
                                height: img.height || ""
                            });
                        });
                    }), pasteEd.onGetContent.add(function(ed, o) {
                        var node = dom.create("div", {}, o.content);
                        each$1(dom.select("img[data-mce-upload-marker]", node), function(img) {
                            dom.setAttrib(img, "src", tinymce.util.Env.transparentSrc), 
                            dom.removeClass(img, "mce-object mce-object-img"), dom.setStyles(img, {
                                width: "",
                                height: ""
                            });
                        }), o.content = node.innerHTML;
                    });
                }), pasteEd.onInit.add(function() {
                    window.setTimeout(function() {
                        pasteEd.focus();
                        var tmp = pasteEd.dom.add("br", {
                            "data-mce-bogus": "1"
                        });
                        pasteEd.selection.select(tmp), pasteEd.selection.collapse(), 
                        pasteEd.dom.remove(tmp);
                    }, 100);
                }), pasteEd.render()), window.setTimeout(function() {
                    inp.focus();
                }, 0);
            },
            close: function() {},
            buttons: [ {
                title: ed.getLang("cancel", "Cancel"),
                id: "cancel"
            }, {
                title: ed.getLang("insert", "Insert"),
                id: "insert",
                onsubmit: function(e) {
                    var content, inp = DOM.get(ed.id + "_paste_content"), data = {};
                    "mcePaste" == cmd ? (content = tinymce.get(inp.id).getContent(), 
                    content = (content = !0 !== ed.settings.code_allow_style ? content.replace(/<style[^>]*>[\s\S]+?<\/style>/gi, "") : content).replace(/<meta([^>]+)>/, ""), 
                    data.content = tinymce.trim(content), data.internal = !1) : data.text = inp.value, 
                    ed.execCommand("mceInsertClipboardContent", !1, data);
                },
                classes: "primary"
            } ]
        });
    }
    var each = tinymce.each;
    tinymce.PluginManager.add("clipboard", function(ed, url) {
        var pasteText = ed.getParam("clipboard_paste_text", 1), pasteHtml = ed.getParam("clipboard_paste_html", 1), FakeClipboard = (ed.onInit.add(function() {
            ed.plugins.contextmenu && ed.plugins.contextmenu.onContextMenu.add(function(th, m, e) {
                var c = ed.selection.isCollapsed();
                ed.getParam("clipboard_cut", 1) && m.add({
                    title: "advanced.cut_desc",
                    icon: "cut",
                    cmd: "Cut"
                }).setDisabled(c), ed.getParam("clipboard_copy", 1) && m.add({
                    title: "advanced.copy_desc",
                    icon: "copy",
                    cmd: "Copy"
                }).setDisabled(c), pasteHtml && m.add({
                    title: "clipboard.paste_desc",
                    icon: "paste",
                    cmd: "mcePaste"
                }), pasteText && m.add({
                    title: "clipboard.paste_text_desc",
                    icon: "pastetext",
                    cmd: "mcePasteText"
                });
            });
        }), tinymce.clipboard.FakeClipboard);
        each([ "mcePasteText", "mcePaste" ], function(cmd) {
            ed.addCommand(cmd, function(ui) {
                if (!ui || !FakeClipboard.hasData()) return openWin(ed, cmd);
                ed.execCommand("mcePasteFakeClipboard", !1, {
                    isPlainText: "mcePasteText" === cmd
                });
            });
        }), pasteHtml && ed.addButton("paste", {
            title: "clipboard.paste_desc",
            cmd: "mcePaste",
            ui: !0
        }), pasteText && ed.addButton("pastetext", {
            title: "clipboard.paste_text_desc",
            cmd: "mcePasteText",
            ui: !0
        }), ed.getParam("clipboard_cut", 1) && ed.addButton("cut", {
            title: "advanced.cut_desc",
            cmd: "Cut",
            icon: "cut"
        }), ed.getParam("clipboard_copy", 1) && ed.addButton("copy", {
            title: "advanced.copy_desc",
            cmd: "Copy",
            icon: "copy"
        });
    });
}();tinymce/plugins/fontsizeselect/plugin.js000060400000006547152456167170014620 0ustar00/* jce - 2.9.99.2 | 2026-04-22 | https://www.joomlacontenteditor.net | Source: https://github.com/widgetfactory/jce | Copyright (C) 2006 - 2026 Ryan Demmer. All rights reserved | GNU/GPL Version 2 or later - http://www.gnu.org/licenses/gpl-2.0.html */
!function() {
    var each = tinymce.each, fontSizes = [ 8, 10, 12, 14, 18, 24, 36 ];
    tinymce.PluginManager.add("fontsizeselect", function(ed, url) {
        var o, s = ed.settings;
        s.font_size_style_values || (s.font_size_style_values = "8pt,10pt,12pt,14pt,18pt,24pt,36pt"), 
        s.theme_font_sizes = ed.getParam("fontsizeselect_font_sizes", "8pt,10pt,12pt,14pt,18pt,24pt,36pt"), 
        tinymce.is(s.theme_font_sizes, "string") && (s.font_size_style_values = tinymce.explode(s.font_size_style_values), 
        s.font_size_classes = tinymce.explode(s.font_size_classes || ""), o = {}, 
        ed.settings.theme_font_sizes = s.theme_font_sizes, each(ed.getParam("theme_font_sizes", "", "hash"), function(v, k) {
            var cl;
            k == v && 1 <= v && v <= 7 && (k = v + " (" + fontSizes[v - 1] + "pt)", 
            cl = s.font_size_classes[v - 1], v = s.font_size_style_values[v - 1] || fontSizes[v - 1] + "pt"), 
            /^\s*\./.test(v) && (cl = v.replace(/\./g, "")), o[k] = cl ? {
                class: cl
            } : {
                fontSize: v
            };
        }), s.theme_font_sizes = o), ed.onNodeChange.add(function(ed, cm, n, collapsed, o) {
            var fv, cl, c = cm.get("fontsizeselect");
            c && n && each(o.parents, function(n) {
                if (n.style && (fv = n.style.fontSize || ed.dom.getStyle(n, "fontSize"), 
                cl = ed.dom.getAttrib(n, "class", ""), c.select(function(v) {
                    return !(!v.fontSize || v.fontSize !== fv) || !(!v.class || v.class !== cl) || void 0;
                }), fv)) return !1;
            });
        }), this.createControl = function(n, cf) {
            var c, i;
            if ("fontsizeselect" === n) return i = 0, (c = ed.controlManager.createListBox("fontsizeselect", {
                title: "advanced.font_size",
                onselect: function(v) {
                    var cur = c.items[c.selectedIndex];
                    !v && cur ? (cur = cur.value).class ? (ed.formatter.toggle("fontsize_class", {
                        value: cur.class
                    }), ed.undoManager.add(), ed.nodeChanged()) : ed.execCommand("FontSize", !1, cur.fontSize) : (v.class ? (ed.focus(), 
                    ed.undoManager.add(), ed.formatter.toggle("fontsize_class", {
                        value: v.class
                    }), ed.undoManager.add(), ed.nodeChanged()) : ed.execCommand("FontSize", !1, v.fontSize), 
                    c.select(function(sv) {
                        return v == sv;
                    }), cur && (cur.value.fontSize == v.fontSize || cur.value.class && cur.value.class == v.class) && c.select(null));
                }
            })) && each(ed.settings.theme_font_sizes, function(v, k) {
                var fz = v.fontSize, lh = (1 <= fz && fz <= 7 && (fz = fontSizes[parseInt(fz, 10) - 1] + "pt"), 
                Math.max(32, parseInt(fz, 10)));
                c.add(k, v, {
                    style: "font-size:" + fz + ";line-height:" + lh + "px",
                    class: "mceFontSize" + i++ + " " + (v.class || "")
                });
            }), c;
        };
    });
}();tinymce/plugins/reference/plugin.js000060400000014013152456167170013500 0ustar00/* jce - 2.9.99.2 | 2026-04-22 | https://www.joomlacontenteditor.net | Source: https://github.com/widgetfactory/jce | Copyright (C) 2006 - 2026 Ryan Demmer. All rights reserved | GNU/GPL Version 2 or later - http://www.gnu.org/licenses/gpl-2.0.html */
!function() {
    var each = tinymce.each, DOM = tinymce.DOM;
    function addZeros(value, len) {
        var i;
        if ((value = "" + value).length < len) for (i = 0; i < len - value.length; i++) value = "0" + value;
        return value;
    }
    tinymce.PluginManager.add("reference", function(ed, url) {
        function openDialog(tag) {
            var cm = ed.controlManager, form = cm.createForm("reference_form");
            "q" == tag ? form.add(cm.createTextBox("reference_cite", {
                label: ed.getLang("reference.label_cite", "Cite"),
                name: "cite"
            })) : form.add(cm.createTextBox("attributes_title", {
                label: ed.getLang("attributes.label_title", "Title"),
                name: "title"
            })), "ins" != tag && "del" != tag || (form.add(cm.createTextBox("reference_cite", {
                label: ed.getLang("reference.label_cite", "Cite"),
                name: "cite"
            })), form.add(cm.createTextBox("reference_datetime", {
                label: ed.getLang("reference.label_datetime", "Date/Time"),
                name: "datetime",
                button: {
                    icon: "date",
                    label: ed.getLang("reference.label_datetime", "Date/Time"),
                    click: function() {
                        var d;
                        this.value((d = new Date(), ed.getParam("reference_datetime", "%Y-%m-%dT%H:%M:%S").replace("%D", "%m/%d/%y").replace("%r", "%I:%M:%S %p").replace("%Y", "" + d.getFullYear()).replace("%y", "" + d.getYear()).replace("%m", addZeros(d.getMonth() + 1, 2)).replace("%d", addZeros(d.getDate(), 2)).replace("%H", "" + addZeros(d.getHours(), 2)).replace("%M", "" + addZeros(d.getMinutes(), 2)).replace("%S", "" + addZeros(d.getSeconds(), 2)).replace("%I", "" + ((d.getHours() + 11) % 12 + 1)).replace("%p", d.getHours() < 12 ? "AM" : "PM").replace("%%", "%")));
                    }
                }
            }))), ed.windowManager.open({
                title: ed.getLang("reference." + tag + "_title", "Reference"),
                items: [ form ],
                size: "mce-modal-landscape-small",
                open: function() {
                    var update, node = ed.selection.getNode(), attribs = {};
                    each([ "title", "datetime", "cite" ], function(name) {
                        if (!node.hasAttribute(name)) return !0;
                        attribs[name] = ed.dom.getAttrib(node, name), update = !0;
                    }), update && DOM.setHTML(this.id + "_insert", ed.getLang("update", "Update")), 
                    form.update(attribs);
                },
                buttons: [ {
                    title: ed.getLang("common.cancel", "Cancel"),
                    id: "cancel"
                }, {
                    title: ed.getLang("common.remove", "Remove"),
                    onsubmit: function() {
                        ed.selection.getNode().nodeName.toLowerCase() == tag && (ed.formatter.remove(tag), 
                        ed.undoManager.add());
                    }
                }, {
                    title: ed.getLang("common.insert", "Insert"),
                    id: "insert",
                    onsubmit: function(e) {
                        tinymce.dom.Event.cancel(e);
                        var e = ed.selection.getNode(), data = form.submit(), e = ed.dom.getParent(e, tag);
                        ed.formatter.apply(tag, data, e), ed.undoManager.add();
                    },
                    classes: "primary",
                    autofocus: !0
                } ]
            });
        }
        ed.addButton("cite", {
            title: "reference.cite_title",
            onclick: function() {
                openDialog("cite");
            }
        }), ed.addButton("q", {
            title: "reference.q_title",
            onclick: function() {
                openDialog("q");
            }
        }), "html5-strict" !== ed.settings.schema && ed.addButton("acronym", {
            title: "reference.acronym_title",
            onclick: function() {
                openDialog("acronym");
            }
        }), ed.addButton("abbr", {
            title: "reference.abbr_title",
            onclick: function() {
                openDialog("abbr");
            }
        }), ed.addButton("del", {
            title: "reference.del_title",
            onclick: function() {
                openDialog("del");
            }
        }), ed.addButton("ins", {
            title: "reference.ins_title",
            onclick: function() {
                openDialog("ins");
            }
        }), ed.onNodeChange.add(function(ed, cm, n, co) {
            var p = ed.dom.getParent(n, "CITE,ACRONYM,ABBR,DEL,INS,Q");
            if (cm.setDisabled("cite", co), cm.setDisabled("acronym", co), cm.setDisabled("abbr", co), 
            cm.setDisabled("del", co), cm.setDisabled("ins", co), cm.setDisabled("q", co), 
            cm.setActive("cite", 0), cm.setActive("acronym", 0), cm.setActive("abbr", 0), 
            cm.setActive("del", 0), cm.setActive("ins", 0), cm.setActive("q", 0), 
            p) for (;cm.setDisabled(p.nodeName.toLowerCase(), 0), cm.setActive(p.nodeName.toLowerCase(), 1), 
            p = p.parentNode; );
        }), ed.onPreInit.add(function() {
            ed.dom.create("abbr");
            var formats = {};
            each([ "cite", "acronym", "abbr", "del", "ins", "q" ], function(name) {
                formats[name] = {
                    inline: name,
                    remove: "all",
                    onformat: function(elm, fmt, vars) {
                        each(vars, function(value, key) {
                            ed.dom.setAttrib(elm, key, value);
                        });
                    }
                };
            }), ed.formatter.register(formats);
        });
    });
}();tinymce/plugins/help/js/help.min.js000060400000004640152456167170013327 0ustar00/* jce - 2.9.99.2 | 2026-04-22 | https://www.joomlacontenteditor.net | Source: https://github.com/widgetfactory/jce | Copyright (C) 2006 - 2026 Ryan Demmer. All rights reserved | GNU/GPL Version 2 or later - http://www.gnu.org/licenses/gpl-2.0.html */
!function($) {
    Wf.Help = {
        options: {
            url: "",
            key: [],
            pattern: ""
        },
        init: function(options) {
            var self = this;
            this.options = $.extend(this.options, options), $("#help-menu > li[id]").click(function(e) {
                $("#help-menu").find("li").removeClass("loading").removeClass("active");
                var el = this;
                e.preventDefault(), "LI" !== e.target.nodeName && (el = $(e.target).parents("li").first()), 
                $(el).siblings().children("ul").addClass("hidden"), $(el).addClass("active").children("ul").removeClass("hidden"), 
                !el.id && $(el).hasClass("subtopics") && (el = $(el).find("li[id]").first()), 
                self.loadItem(el);
            }), $("#help-iframe").on("load", function() {
                $(".loading", "#help-menu").removeClass("loading");
            }), ((options = this.options.key).length && $("#" + options.join(".")).length ? $("#" + options.join(".")) : $("#help-menu > li[id]").first()).click(), 
            $("[data-toggle]").click(function() {
                $("nav").toggle(), self.resizeFrame();
            });
        },
        resizeFrame: function() {
            var s, self = this;
            $("#help-frame").parent().css("width", function() {
                return $("#help-menu-toggle div.toggle-handle").hasClass("collapsed") && (s = $("#help-menu-toggle").outerWidth(!0)), 
                $("div.row-fluid").width() - self.getMenuSize(s) - 1;
            });
        },
        getMenuSize: function(pos) {
            return pos = void 0 === pos ? $("#help-menu").parent().outerWidth() + 14 : pos;
        },
        loadItem: function(el) {
            var keys, s = "", el = ($(el).addClass("loading"), $(el).attr("id")), s = this.options.pattern ? (keys = el.split("."), 
            "/" + (s = this.options.pattern.replace(/\$([1-9])/g, function(a, b) {
                b = parseInt(b, 10), b = Math.max(b - 1, 0);
                return keys[b] || "";
            })).replace(/^\//, "").replace(/\/$/, "")) : el;
            $("#help-iframe").attr("src", this.options.url + s);
        }
    };
}(jQuery);tinymce/plugins/help/plugin.js000060400000001375152456167170012501 0ustar00/* jce - 2.9.99.2 | 2026-04-22 | https://www.joomlacontenteditor.net | Source: https://github.com/widgetfactory/jce | Copyright (C) 2006 - 2026 Ryan Demmer. All rights reserved | GNU/GPL Version 2 or later - http://www.gnu.org/licenses/gpl-2.0.html */
tinymce.PluginManager.add("help", function(ed, url) {
    ed.addCommand("mceHelp", function() {
        ed.windowManager.open({
            title: ed.getLang("dlg.help", "Help"),
            url: ed.getParam("site_url") + "index.php?option=com_jce&task=plugin.display&plugin=help&lang=" + ed.getParam("language") + "&section=editor&category=editor&article=about",
            size: "mce-modal-landscape-full"
        });
    }), ed.addButton("help", {
        title: "dlg.help",
        cmd: "mceHelp"
    });
});tinymce/plugins/help/css/help.min.css000060400000002045152456167170013654 0ustar00html,section{overflow:hidden}.ui-jce,section{position:absolute}.ui-jce main,nav .uk-nav-header,section{padding:.5rem}html{background:#fff;font-size:13px}.ui-jce{top:.25rem;left:.25rem;right:.25rem;bottom:.25rem}main,nav{box-sizing:border-box;height:100%;flex:auto;position:relative}nav .uk-nav{display:block}nav .uk-nav.hidden{display:none}nav .uk-parent>ul{margin-left:1.5rem}nav .uk-list-space>li:nth-child(n+2){margin-top:.25rem}main{margin:0 0 0 .5rem;width:80%}section{right:0;left:0;bottom:0;top:2.5rem}iframe{width:100%;height:100%}.ui-jce .uk-nav li{position:relative}.ui-jce .uk-nav li a,.ui-jce header a{color:inherit}.ui-jce header a:hover{color:#888}.ui-jce header a:active,.ui-jce header a:hover,.ui-jce header a:visited{text-decoration:none}@keyframes donut-spin{0%{transform:rotate(0)}100%{transform:rotate(360deg)}}.loading>a>span::before{content:"";display:inline-block;border:2px solid rgba(0,0,0,.1);border-left-color:#888;border-radius:50%;width:16px;height:16px;animation:donut-spin 1.2s linear infinite;z-index:10001;box-sizing:border-box}tinymce/plugins/autolink/plugin.js000060400000011141152456167170013367 0ustar00/* jce - 2.9.99.2 | 2026-04-22 | https://www.joomlacontenteditor.net | Source: https://github.com/widgetfactory/jce | Copyright (C) 2006 - 2026 Ryan Demmer. All rights reserved | GNU/GPL Version 2 or later - http://www.gnu.org/licenses/gpl-2.0.html */
!function() {
    var AutoLinkPattern = /^(https?:\/\/|ssh:\/\/|ftp:\/\/|file:\/|www\.|(?:mailto:)?[A-Z0-9._%+\-]+@)(.+)$/i;
    tinymce.PluginManager.add("autolink", function(ed, url) {
        function parseCurrentLine(editor, endOffset, delimiter) {
            var rng, end, endContainer, len, rngText, prev;
            function scopeIndex(container, index) {
                return index < 0 && (index = 0), index = 3 == container.nodeType && (container = container.data.length) < index ? container : index;
            }
            function setStart(container, offset) {
                1 != container.nodeType || container.hasChildNodes() ? rng.setStart(container, scopeIndex(container, offset)) : rng.setStartBefore(container);
            }
            function setEnd(container, offset) {
                1 != container.nodeType || container.hasChildNodes() ? rng.setEnd(container, scopeIndex(container, offset)) : rng.setEndAfter(container);
            }
            if ("A" != editor.selection.getNode().tagName) {
                if ((rng = editor.selection.getRng(!0).cloneRange()).startOffset < 5) {
                    if (!(prev = rng.endContainer.previousSibling)) {
                        if (!rng.endContainer.firstChild || !rng.endContainer.firstChild.nextSibling) return;
                        prev = rng.endContainer.firstChild.nextSibling;
                    }
                    if (setStart(prev, len = prev.length), setEnd(prev, len), rng.endOffset < 5) return;
                    end = rng.endOffset, endContainer = prev;
                } else {
                    if (3 != (endContainer = rng.endContainer).nodeType && endContainer.firstChild) {
                        for (;3 != endContainer.nodeType && endContainer.firstChild; ) endContainer = endContainer.firstChild;
                        3 == endContainer.nodeType && (setStart(endContainer, 0), 
                        setEnd(endContainer, endContainer.nodeValue.length));
                    }
                    end = 1 == rng.endOffset ? 2 : rng.endOffset - 1 - endOffset;
                }
                for (len = end; setStart(endContainer, 2 <= end ? end - 2 : 0), 
                setEnd(endContainer, 1 <= end ? end - 1 : 0), --end, " " != (rngText = rng.toString()) && "" !== rngText && 160 != rngText.charCodeAt(0) && 0 <= end - 2 && rngText != delimiter; );
                rng.toString() == delimiter || 160 == rng.toString().charCodeAt(0) ? (setStart(endContainer, end), 
                setEnd(endContainer, len), end += 1) : (0 === rng.startOffset ? setStart(endContainer, 0) : setStart(endContainer, end), 
                setEnd(endContainer, len)), "." == (prev = rng.toString()).charAt(prev.length - 1) && setEnd(endContainer, len - 1), 
                (endOffset = (prev = rng.toString()).match(AutoLinkPattern)) && ("www." == endOffset[1] ? endOffset[1] = "https://www." : /@$/.test(endOffset[1]) && !/^mailto:/.test(endOffset[1]) && (endOffset[1] = "mailto:" + endOffset[1]), 
                -1 !== endOffset[1].indexOf("http") && !editor.getParam("autolink_url", !0) || -1 !== endOffset[1].indexOf("mailto:") && !editor.getParam("autolink_email", !0) || (len = editor.selection.getBookmark(), 
                editor.selection.setRng(rng), editor.execCommand("createlink", !1, endOffset[1] + endOffset[2]), 
                prev = editor.selection.getNode(), editor.settings.default_link_target && editor.dom.setAttrib(prev, "target", editor.settings.default_link_target), 
                editor.onAutoLink.dispatch(editor, {
                    node: prev
                }), editor.selection.moveToBookmark(len), editor.nodeChanged()));
            }
        }
        (ed.getParam("autolink_url", !0) || ed.getParam("autolink_email", !0)) && (ed.settings.autolink_pattern && (AutoLinkPattern = ed.settings.autolink_pattern), 
        ed.onAutoLink = new tinymce.util.Dispatcher(this), ed.onKeyDown.addToTop(function(ed, e) {
            if (13 == e.keyCode) return function(ed) {
                parseCurrentLine(ed, -1, "");
            }(ed);
        }), tinymce.isIE || (ed.onKeyPress.add(function(ed, e) {
            if (41 == e.which) return function(ed) {
                parseCurrentLine(ed, -1, "(");
            }(ed);
        }), ed.onKeyUp.add(function(ed, e) {
            if (32 == e.keyCode) return function(ed) {
                parseCurrentLine(ed, 0, "");
            }(ed);
        })));
    });
}();tinymce/plugins/imgmanager/plugin.js000060400000026700152456167170013657 0ustar00/* jce - 2.9.99.2 | 2026-04-22 | https://www.joomlacontenteditor.net | Source: https://github.com/widgetfactory/jce | Copyright (C) 2006 - 2026 Ryan Demmer. All rights reserved | GNU/GPL Version 2 or later - http://www.gnu.org/licenses/gpl-2.0.html */
!function() {
    var DOM = tinymce.DOM, Event = tinymce.dom.Event, extend = tinymce.extend;
    function isMediaObject(node) {
        return node.getAttribute("data-mce-object") || node.getAttribute("data-mce-type");
    }
    function isImage(node) {
        return node && "IMG" === node.nodeName && !isMediaObject(node);
    }
    function getUploadConfig(ed) {
        return ed.getParam("imgmanager", {}).upload || {};
    }
    function getUploadURL(ed, file) {
        var data = getUploadConfig(ed);
        return !!(data && data.filetypes && new RegExp(".(" + data.filetypes.join("|") + ")$", "i").test(file.name)) && ed.getParam("site_url") + "index.php?option=com_jce&task=plugin.display&plugin=image";
    }
    tinymce.PluginManager.add("imgmanager", function(ed, url) {
        var self = this;
        function openDialog() {
            var node = ed.selection.getNode();
            "IMG" == node.nodeName && isMediaObject(node) || ed.windowManager.open({
                file: ed.getParam("site_url") + "index.php?option=com_jce&task=plugin.display&plugin=image",
                size: "mce-modal-portrait-full"
            }, {
                plugin_url: url
            });
        }
        function insertImage(args) {
            var node = ed.selection.getNode();
            isImage(node) ? ed.dom.setAttribs(node, {
                src: args.src,
                alt: args.alt || "",
                class: args.class || ""
            }) : (ed.execCommand("mceInsertContent", !1, '<img id="__mce_tmp" src="" />', {
                skip_undo: 1
            }), node = ed.dom.get("__mce_tmp"), ed.dom.setAttribs(node, args), ed.dom.setAttrib(node, "id", "")), 
            ed.selection.select(node), ed.undoManager.add(), ed.nodeChanged();
        }
        function getDataAndInsert(args) {
            var params = ed.getParam("imgmanager", {});
            return new Promise(function(resolve, reject) {
                var value;
                !1 !== params.always_include_dimensions ? (ed.setProgressState(!0), 
                value = args.src, new Promise(function(resolve, reject) {
                    if (!value) return resolve();
                    var img = new Image();
                    img.onload = function() {
                        resolve({
                            width: img.width,
                            height: img.height
                        });
                    }, img.onerror = function() {
                        reject();
                    }, img.src = ed.documentBaseURI.toAbsolute(value);
                }).then(function(data) {
                    ed.setProgressState(!1), insertImage(extend(args, data)), resolve();
                }, function() {
                    ed.setProgressState(!1), reject();
                })) : (insertImage(args), resolve());
            });
        }
        ed.addCommand("mceImageManager", function() {
            openDialog();
        }), ed.addCommand("mceImage", function() {
            openDialog();
        }), ed.addButton("imgmanager", {
            title: "imgmanager.desc",
            cmd: "mceImage"
        }), ed.onNodeChange.add(function(ed, cm, n, collapsed) {
            n = isImage(n);
            cm.setDisabled("imgmanager", !n && !collapsed), cm.setActive("imgmanager", n);
        }), ed.onPreInit.add(function() {
            var cm, form, urlCtrl, descriptionCtrl, stylesListCtrl, args, uploader, params = ed.getParam("imgmanager", {}), isMobile = window.matchMedia("(max-width: 600px)").matches;
            !0 === (!0 === params.basic_dialog || isMobile) && (cm = ed.controlManager, 
            form = cm.createForm("image_form"), !(args = {
                label: ed.getLang("dlg.url", "URL"),
                name: "url",
                clear: !0
            }) !== params.basic_dialog_filebrowser && (params.basic_dialog_filebrowser || isMobile) && extend(args, {
                picker: !0,
                picker_label: "browse",
                picker_icon: "image",
                onpick: function() {
                    ed.execCommand("mceFileBrowser", !0, {
                        caller: "imgmanager",
                        callback: function(selected, data) {
                            var src;
                            data.length && (src = data[0].url, data = data[0].title, 
                            urlCtrl.value(src), data = data.replace(/\.[^.]+$/i, ""), 
                            descriptionCtrl.value(data), window.setTimeout(function() {
                                urlCtrl.focus();
                            }, 10));
                        },
                        filter: params.filetypes || "images",
                        value: urlCtrl.value()
                    });
                }
            }), uploader = ed.plugins.upload || !1, params.upload && uploader && extend(args, {
                upload_label: "upload.label",
                upload_accept: params.upload.filetypes,
                upload: function(e, file) {
                    if (file && file.name) {
                        var url = getUploadURL(ed, file);
                        if (!url) return ed.windowManager.alert({
                            text: ed.getLang("upload.file_extension_error", "File type not supported"),
                            title: ed.getLang("upload.error", "Upload Error")
                        }), !1;
                        urlCtrl.setLoading(!0), extend(file, {
                            filename: file.name.replace(/[\+\\\/\?\#%&<>"\'=\[\]\{\},;@\^\(\)\xa3\u20ac$~]/g, ""),
                            upload_url: url
                        }), uploader.upload(file, function(response) {
                            urlCtrl.setLoading(!1);
                            var response = response.files || [], response = response.length ? response[0] : {};
                            if (response.file) return urlCtrl.value(response.file), 
                            response = (response = response.alt || response.name || "").replace(/\.[^.]+$/i, ""), 
                            descriptionCtrl.value(response), !0;
                            ed.windowManager.alert({
                                text: "File upload failed!",
                                title: ed.getLang("upload.error", "Upload Error")
                            });
                        }, function(message) {
                            ed.windowManager.alert({
                                text: message,
                                title: ed.getLang("upload.error", "Upload Error")
                            }), urlCtrl.setLoading(!1);
                        });
                    }
                }
            }), urlCtrl = cm.createUrlBox("image_url", args), form.add(urlCtrl), 
            descriptionCtrl = cm.createTextBox("image_description", {
                label: ed.getLang("dlg.description", "Description"),
                name: "alt",
                clear: !0
            }), form.add(descriptionCtrl), !1 !== params.basic_dialog_classes && (stylesListCtrl = cm.createStylesBox("image_class", {
                label: ed.getLang("image.class", "Classes"),
                onselect: function() {},
                name: "classes",
                styles: params.custom_classes || []
            }), form.add(stylesListCtrl)), ed.addCommand("mceImage", function() {
                var node = ed.selection.getNode();
                "IMG" == node.nodeName && isMediaObject(node) || ed.windowManager.open({
                    title: ed.getLang("imgmanager.desc", "Image"),
                    items: [ form ],
                    size: "mce-modal-landscape-small",
                    open: function() {
                        var label = ed.getLang("insert", "Insert"), node = ed.selection.getNode(), src = "", alt = "", classes = params.attributes.classes || "";
                        isImage(node) && ((src = ed.dom.getAttrib(node, "src")) && (label = ed.getLang("update", "Update")), 
                        alt = ed.dom.getAttrib(node, "alt"), classes = ed.dom.getAttrib(node, "class")), 
                        urlCtrl.value(src), descriptionCtrl.value(alt), stylesListCtrl && (classes = classes.replace(/mce-[\w\-]+/g, "").replace(/\s+/g, " ").trim().split(" ").filter(function(cls) {
                            return "" !== cls.trim();
                        }), stylesListCtrl.value(classes)), window.setTimeout(function() {
                            urlCtrl.focus();
                        }, 10), DOM.setHTML(this.id + "_insert", label);
                    },
                    buttons: [ {
                        title: ed.getLang("cancel", "Cancel"),
                        id: "cancel"
                    }, {
                        title: ed.getLang("insert", "Insert"),
                        id: "insert",
                        onsubmit: function(e) {
                            var data = form.submit(), node = ed.selection.getNode();
                            if (Event.cancel(e), !data.url) return isImage(node) && ed.dom.remove(node), 
                            !1;
                            e = {
                                src: data.url,
                                alt: data.alt
                            };
                            (e = extend(e, self.getAttributes(params))).class = data.classes || e.class || "", 
                            getDataAndInsert(e).then();
                        },
                        classes: "primary",
                        scope: self
                    } ]
                });
            }));
        }), ed.onInit.add(function() {
            ed && ed.plugins.contextmenu && ed.plugins.contextmenu.onContextMenu.add(function(th, m, e) {
                m.add({
                    title: "imgmanager.desc",
                    icon: "imgmanager",
                    cmd: "mceImage"
                });
            });
        }), this.getAttributes = function(data) {
            var attr = {
                style: {}
            }, attribs = data.attributes || {};
            return attribs.style && tinymce.is(attribs.style, "string") && (attribs.style = ed.dom.parseStyle(attribs.style)), 
            attribs.styles && tinymce.is(attribs.styles, "object") && (attribs.style = extend(attribs.styles, attribs.style || {}), 
            delete attribs.styles), attribs.style && (attribs.style = ed.dom.serializeStyle(attribs.style)), 
            tinymce.each([ "alt", "title", "id", "dir", "class", "usemap", "style", "longdesc", "loading" ], function(key) {
                tinymce.is(attribs[key]) && (attr[key] = attribs[key]);
            }), data.width && (attr.width = data.width), data.height && (attr.height = data.height), 
            attr;
        }, this.insertUploadedFile = function(o) {
            var data = this.getUploadConfig();
            if (data && data.filetypes && new RegExp(".(" + data.filetypes.join("|") + ")$", "i").test(o.name)) return data = {
                src: o.file,
                alt: o.alt || o.name,
                style: {}
            }, data = extend(data, this.getAttributes(o)), ed.dom.create("img", data);
            return !1;
        }, this.getUploadURL = function(file) {
            return !ed.plugins.imgmanager_ext && getUploadURL(ed, file);
        }, this.getUploadConfig = function() {
            return getUploadConfig(ed);
        };
    });
}();tinymce/plugins/imgmanager/css/imgmanager.css000060400000000755152456167170015436 0ustar00.uk-browser-bottom .uk-tabs+.uk-form,.uk-browser-top .uk-form{height:57%}.uk-browser .uk-tabs{min-height:43%;height:auto;position:relative}.uk-browser-top .uk-form{top:-43%;position:relative}.uk-browser-top .uk-tabs{top:58%;position:relative}.uk-browser-external .uk-tabs{height:100%}.uk-browser-external+.uk-modal-footer .uk-button-refresh{display:none}.uk-browser-external .uk-tabs .uk-tab+.uk-switcher{height:calc(100% - 33px)}.uk-browser-external .uk-form-row+.uk-form-row{margin-top:15px}tinymce/plugins/imgmanager/js/imgmanager.js000060400000025314152456167170015104 0ustar00/* jce - 2.9.99.2 | 2026-04-22 | https://www.joomlacontenteditor.net | Source: https://github.com/widgetfactory/jce | Copyright (C) 2006 - 2026 Ryan Demmer. All rights reserved | GNU/GPL Version 2 or later - http://www.gnu.org/licenses/gpl-2.0.html */
!function($) {
    var ImageManagerDialog = {
        settings: {},
        init: function() {
            tinyMCEPopup.restoreSelection();
            var w, h, x, ed = tinyMCEPopup.editor, n = ed.selection.getNode(), self = this, params = ed.getParam("imgmanager", {}), src = ($("#insert").on("click", function(e) {
                self.insert(), e.preventDefault();
            }), decodeURIComponent(ed.dom.getAttrib(n, "src"))), src = ed.convertURL(src);
            $.each(this.settings.attributes, function(key, val) {
                val || $("#attributes-" + key).hide();
            }), $("#onmouseover, #onmouseout").addClass("uk-persistent-focus").on("click focus", function() {
                $("#onmouseover, #onmouseout").removeClass("uk-active"), $(this).addClass("uk-active");
            }), $("body").on("click.persistent-focus", function(e) {
                $(e.target).is(".uk-persistent-focus, li.file") || $(e.target).parents("li.file").length || $(".uk-persistent-focus").removeClass("uk-active");
            }), Wf.init({
                classes: params.custom_classes || []
            }), $("#alt").on("change", function() {
                "" === this.value ? $(this).removeClass("uk-edited") : $(this).addClass("uk-edited");
            }), n && "IMG" == n.nodeName ? ($(".uk-button-text", "#insert").text(tinyMCEPopup.getLang("update", "Update", !0)), 
            $("#src").val(src), $("#sample").attr({
                src: n.src
            }).attr(Wf.sizeToFit(n, {
                width: 80,
                height: 60
            })), w = Wf.getAttrib(n, "width"), h = Wf.getAttrib(n, "height"), $("#width").val(function() {
                return w ? ($(this).addClass("uk-isdirty"), w) : h ? void 0 : n.width;
            }), $("#height").val(function() {
                return h ? ($(this).addClass("uk-isdirty"), h) : w ? void 0 : n.height;
            }), $("#alt").val(function() {
                var val = ed.dom.getAttrib(n, "alt");
                if (val) return $(this).addClass("uk-edited"), val;
            }), $("#title").val(ed.dom.getAttrib(n, "title")), $.each([ "top", "right", "bottom", "left" ], function() {
                $("#margin_" + this).val(Wf.getAttrib(n, "margin-" + this));
            }), $("#border_width").val(function() {
                var v = Wf.getAttrib(n, "border-width");
                return 0 == $('option[value="' + v + '"]', this).length && $(this).append(new Option(v, v, !1, !0)), 
                v;
            }), $("#border_style").val(Wf.getAttrib(n, "border-style")), $("#border_color").val(Wf.getAttrib(n, "border-color")).trigger("change"), 
            $("#border").trigger("change"), $("#border").is(":checked") || $.each([ "border_width", "border_style", "border_color" ], function(i, k) {
                $("#" + k).val(self.settings.defaults[k]).trigger("change");
            }), $("#align").val(Wf.getAttrib(n, "align")), $("#classes").val(function() {
                var values = ed.dom.getAttrib(n, "class");
                return $.trim(values);
            }).trigger("change"), $("#style").val(ed.dom.getAttrib(n, "style")), 
            $("#id").val(ed.dom.getAttrib(n, "id")), $("#dir").val(ed.dom.getAttrib(n, "dir")), 
            $("#lang").val(ed.dom.getAttrib(n, "lang")), $("#usemap").val(ed.dom.getAttrib(n, "usemap")), 
            $("#loading").val(ed.dom.getAttrib(n, "loading")), $("#insert").button("option", "label", ed.getLang("update", "Update")), 
            $("#longdesc").val(ed.convertURL(ed.dom.getAttrib(n, "longdesc"))), 
            $.each([ "mouseover", "mouseout" ], function(i, key) {
                var val = ed.dom.getAttrib(n, "data-" + key);
                val = (val = $.trim(val)).replace(/^\s*this.src\s*=\s*\'([^\']+)\';?\s*$/, "$1").replace(/^\s*|\s*$/g, ""), 
                val = ed.convertURL(val), "mouseout" == key && (val = val || src), 
                $("#on" + key).val(val);
            }), (params = n.nextSibling) && "BR" == params.nodeName && params.style.clear && $("#clear").val(params.style.clear), 
            x = 0, params = function(ed, node) {
                for (var attrs = node.attributes, attribs = {}, i = attrs.length - 1; 0 <= i; i--) {
                    var name = attrs[i].name, value = ed.dom.getAttrib(node, name);
                    "_" !== name.charAt(0) && -1 === name.indexOf("-mce-") && (attribs[name] = value);
                }
                return attribs;
            }(ed, n), $.each(params, function(key, val) {
                if ("data-mouseover" === key || "data-mouseout" === key || 0 === key.indexOf("on")) return !0;
                if (document.getElementById(key) || "class" == key) return !0;
                try {
                    val = decodeURIComponent(val);
                } catch (e) {}
                var repeatable = $(".uk-repeatable").eq(0), repeatable = (0 < x && $(repeatable).clone(!0).appendTo($(repeatable).parent()), 
                $(".uk-repeatable").eq(x).find("input, select"));
                $(repeatable).eq(0).val(key), $(repeatable).eq(1).val(val), x++;
            })) : Wf.setDefaults(this.settings.defaults), "external" === ed.settings.filebrowser_position ? Wf.createBrowsers($("#src"), function(files) {
                files = files.shift();
                self.selectFile(files);
            }, "images") : $("#src").filebrowser().on("filebrowser:onfileclick", function(e, file, data) {
                self.selectFile(file, data);
            }).on("filebrowser:onfileinsert", function(e, file, data) {
                self.selectFile(file, data);
            }).on("filebrowser:onfileinsert", function(e, file, data) {
                self.insert();
            }), Wf.updateStyles(), $("#border").change(), $(".uk-constrain-checkbox").on("constrain:change", function(e, elms) {
                $(elms).addClass("uk-isdirty");
            }).trigger("constrain:update"), $(".uk-equalize-checkbox").trigger("equalize:update"), 
            $(".uk-form-controls select").datalist().trigger("datalist:update"), 
            $(".uk-datalist").trigger("datalist:update");
        },
        insert: function() {
            var ed = tinyMCEPopup.editor, self = this, n = ed.selection.getNode();
            if ("" === $("#src").val()) return Wf.Modal.alert(tinyMCEPopup.getLang("imgmanager_dlg.no_src", "Please enter a url for the image")), 
            !1;
            n && "IMG" === n.nodeName && "" === ed.dom.getAttrib(n, "alt") && this.insertAndClose(), 
            "" === $("#alt").val() ? Wf.Modal.confirm(tinyMCEPopup.getLang("imgmanager_dlg.missing_alt"), function(state) {
                state && self.insertAndClose();
            }, {
                width: 360,
                height: 240
            }) : this.insertAndClose();
        },
        insertAndClose: function() {
            var v, ed = tinyMCEPopup.editor, self = this, args = {}, br = "", over = (Wf.updateStyles(), 
            tinyMCEPopup.restoreSelection(), tinymce.isWebKit && ed.getWin().focus(), 
            args = {
                vspace: "",
                hspace: "",
                border: "",
                align: ""
            }, $.each([ "src", "width", "height", "alt", "title", "classes", "style", "id", "dir", "lang", "usemap", "longdesc", "loading" ], function(i, k) {
                v = $("#" + k + ":enabled").val(), "src" == k && (v = Wf.String.buildURI(v)), 
                "width" != k && "height" != k || (v = !1 !== self.settings.always_include_dimensions ? $("#" + k).val() : $("#" + k + ".uk-isdirty").val() || ""), 
                args[k = "classes" == k ? "class" : k] = v;
            }), args.onmouseover = args.onmouseout = "", $("#onmouseover").val()), out = $("#onmouseout").val();
            over || (out = ""), args = $.extend(args, {
                "data-mouseover": over ? ed.convertURL(over) : "",
                "data-mouseout": out ? ed.convertURL(out) : ""
            }), br = (over = ed.selection.getNode()).nextSibling, $(".uk-repeatable").each(function() {
                var elements = $("input, select", this), key = $(elements).eq(0).val(), elements = $(elements).eq(1).val();
                key && (args[key] = elements);
            }), over && "IMG" == over.nodeName ? (ed.dom.setAttribs(over, args), 
            br && "BR" == br.nodeName ? (!$("#clear").is(":disabled") && "" !== $("#clear").val() || ed.dom.remove(br), 
            $("#clear").is(":disabled") || "" === $("#clear").val() || ed.dom.setStyle(br, "clear", $("#clear").val())) : $("#clear").is(":disabled") || "" === $("#clear").val() || (br = ed.dom.create("br"), 
            ed.dom.setStyle(br, "clear", $("#clear").val()), ed.dom.insertAfter(br, over)), 
            ed.onUpdateMedia.dispatch(ed, {
                node: over
            })) : (ed.execCommand("mceInsertContent", !1, ed.dom.createHTML("img", $.extend({}, args, {
                id: "__mce_tmp"
            })), {
                skip_undo: 1
            }), over = ed.dom.get("__mce_tmp"), $("#clear").is(":disabled") || "" === $("#clear").val() || (br = ed.dom.create("br"), 
            ed.dom.setStyle(br, "clear", $("#clear").val()), ed.dom.insertAfter(br, over)), 
            ed.dom.setAttrib(over, "id", args.id)), ed.undoManager.add(), ed.nodeChanged(), 
            tinyMCEPopup.close();
        },
        selectFile: function(file, data) {
            var img, name = data.title, src = data.url;
            "rollover_tab" == $(".uk-tabs-panel > .uk-active").attr("id") ? $("input.uk-active", "#rollover_tab").or("#onmouseout").val(src) : ($("#alt").hasClass("uk-edited") || (name = (name = Wf.String.stripExt(name)).replace(/[-_]+/g, " "), 
            $("#alt").val(name)), $("#onmouseout").val(src), $("#src").val(src), 
            data.width && data.height ? $.each([ "width", "height" ], function(i, k) {
                var v = data[k] || "";
                $("#" + k).val(v).data("tmp", v).removeClass("uk-edited").addClass("uk-text-muted");
            }) : ((img = new Image()).onload = function() {
                $.each([ "width", "height" ], function(i, k) {
                    $("#" + k).val(img[k]).data("tmp", img[k]).removeClass("uk-edited").addClass("uk-text-muted");
                });
            }, img.src = src), name = Wf.sizeToFit({
                width: data.width,
                height: data.height
            }, {
                width: 80,
                height: 60
            }), $("#sample").attr({
                src: data.preview
            }).attr(name));
        }
    };
    window.ImageManagerDialog = ImageManagerDialog, $(document).ready(function() {
        ImageManagerDialog.init();
    });
}(jQuery);tinymce/plugins/langcode/plugin.js000060400000016214152456167170013323 0ustar00/* jce - 2.9.99.2 | 2026-04-22 | https://www.joomlacontenteditor.net | Source: https://github.com/widgetfactory/jce | Copyright (C) 2006 - 2026 Ryan Demmer. All rights reserved | GNU/GPL Version 2 or later - http://www.gnu.org/licenses/gpl-2.0.html */
!function() {
    var languageValues = {
        Afrikaans: "af",
        Albanian: "sq",
        "Arabic (Algeria)": "ar-DZ",
        "Arabic (Bahrain)": "ar-BH",
        "Arabic (Egypt)": "ar-EG",
        "Arabic (Iraq)": "ar-IQ",
        "Arabic (Jordan)": "ar-JO",
        "Arabic (Kuwait)": "ar-KW",
        "Arabic (Lebanon)": "ar-LB",
        "Arabic (Libya)": "ar-LY",
        "Arabic (Morocco)": "ar-MA",
        "Arabic (Oman)": "ar-OM",
        "Arabic (Qatar)": "ar-QA",
        "Arabic (Saudi Arabia)": "ar-SA",
        "Arabic (Syria)": "ar-SY",
        "Arabic (Tunisia)": "ar-TN",
        "Arabic (U.A.E.)": "ar-AE",
        "Arabic (Yemen)": "ar-YE",
        Basque: "eu",
        Belarusian: "be",
        Bulgarian: "bg",
        Catalan: "ca",
        "Chinese (Hong Kong)": "zh-HK",
        "Chinese (PRC)": "zh-CN",
        "Chinese (Singapore)": "zh-SG",
        "Chinese (Taiwan)": "zh-TW",
        Croatian: "hr",
        Czech: "cs",
        Danish: "da",
        "Dutch (Belgium)": "nl-BE",
        "Dutch (Standard)": "nl",
        English: "en",
        "English (Australia)": "en-AU",
        "English (Belize)": "en-BZ",
        "English (Canada)": "en-CA",
        "English (Ireland)": "en-IE",
        "English (Jamaica)": "en-JM",
        "English (New Zealand)": "en-NZ",
        "English (South Africa)": "en-ZA",
        "English (Trinidad)": "en-TT",
        "English (United Kingdom)": "en-GB",
        "English (United States)": "en-US",
        Estonian: "et",
        Faeroese: "fo",
        Farsi: "fa",
        Finnish: "fi",
        "French (Belgium)": "fr-BE",
        "French (Canada)": "fr-CA",
        "French (Luxembourg)": "fr-LU",
        "French (Standard)": "fr",
        "French (Switzerland)": "fr-CH",
        "Gaelic (Scotland)": "gd",
        "German (Austria)": "de-AT",
        "German (Liechtenstein)": "de-LI",
        "German (Luxembourg)": "de-LU",
        "German (Standard)": "de",
        "German (Switzerland)": "de-CH",
        Greek: "el",
        Hebrew: "he",
        Hindi: "hi",
        Hungarian: "hu",
        Icelandic: "is",
        Indonesian: "id",
        Irish: "ga",
        "Italian (Standard)": "it",
        "Italian (Switzerland)": "it-CH",
        Japanese: "ja",
        Korean: "ko",
        "Korean (Johab)": "ko",
        Kurdish: "ku",
        Latvian: "lv",
        Lithuanian: "lt",
        "Macedonian (FYROM)": "mk",
        Malayalam: "ml",
        Malaysian: "ms",
        Maltese: "mt",
        Norwegian: "no",
        "Norwegian (Bokm\xe5l)": "nb",
        "Norwegian (Nynorsk)": "nn",
        Polish: "pl",
        "Portuguese (Brazil)": "pt-BR",
        "Portuguese (Portugal)": "pt",
        Punjabi: "pa",
        "Rhaeto-Romanic": "rm",
        Romanian: "ro",
        "Romanian (Republic of Moldova)": "ro-MD",
        Russian: "ru",
        "Russian (Republic of Moldova)": "ru-MD",
        Serbian: "sr",
        Slovak: "sk",
        Slovenian: "sl",
        Sorbian: "sb",
        "Spanish (Argentina)": "es-AR",
        "Spanish (Bolivia)": "es-BO",
        "Spanish (Chile)": "es-CL",
        "Spanish (Colombia)": "es-CO",
        "Spanish (Costa Rica)": "es-CR",
        "Spanish (Dominican Republic)": "es-DO",
        "Spanish (Ecuador)": "es-EC",
        "Spanish (El Salvador)": "es-SV",
        "Spanish (Guatemala)": "es-GT",
        "Spanish (Honduras)": "es-HN",
        "Spanish (Mexico)": "es-MX",
        "Spanish (Nicaragua)": "es-NI",
        "Spanish (Panama)": "es-PA",
        "Spanish (Paraguay)": "es-PY",
        "Spanish (Peru)": "es-PE",
        "Spanish (Puerto Rico)": "es-PR",
        "Spanish (Spain)": "es",
        "Spanish (Uruguay)": "es-UY",
        "Spanish (Venezuela)": "es-VE",
        Swedish: "sv",
        "Swedish (Finland)": "sv-FI",
        Thai: "th",
        Tsonga: "ts",
        Tswana: "tn",
        Turkish: "tr",
        Ukrainian: "ua",
        Urdu: "ur",
        Venda: "ve",
        Vietnamese: "vi",
        Welsh: "cy",
        Xhosa: "xh",
        Yiddish: "ji",
        Zulu: "zu"
    }, DOM = tinymce.DOM;
    tinymce.PluginManager.add("langcode", function(ed, url) {
        ed.onPreInit.add(function() {
            ed.formatter.register({
                langcode: {
                    inline: "span",
                    remove: "all",
                    attributes: {
                        lang: "%value"
                    }
                }
            });
        }), ed.addButton("langcode", {
            title: "langcode.desc",
            onclick: function() {
                var cm = ed.controlManager, form = cm.createForm("language_form"), langList = cm.createListBox("language_lang", {
                    label: ed.getLang("langcode.label", "Language"),
                    onselect: function(v) {},
                    name: "language",
                    filter: !0
                });
                langList.add("--", ""), tinymce.each(languageValues, function(value, name) {
                    langList.add(name, value);
                }), form.add(langList), ed.windowManager.open({
                    title: ed.getLang("langcode.title", "Language Code"),
                    items: [ form ],
                    size: "mce-modal-landscape-small",
                    open: function() {
                        var node = ed.selection.getNode(), value = ed.settings.language;
                        node.hasAttribute("lang") && (value = node.getAttribute("lang"), 
                        DOM.setHTML(this.id + "_insert", ed.getLang("update", "Update"))), 
                        langList.value(value);
                    },
                    buttons: [ {
                        title: ed.getLang("common.cancel", "Cancel"),
                        id: "cancel"
                    }, {
                        title: ed.getLang("common.insert", "Insert"),
                        id: "insert",
                        onsubmit: function(e) {
                            var node = ed.selection.getNode(), selection = ed.selection, data = form.submit();
                            !selection.isCollapsed() && selection.getContent() == selection.getContent({
                                format: "text"
                            }) ? 1 < (selection = selection.getSelectedBlocks()).length ? tinymce.each(selection, function(elm) {
                                ed.dom.setAttrib(elm, "lang", data.language);
                            }) : data.language ? ed.formatter.apply("langcode", {
                                value: data.language
                            }) : ed.formatter.remove("langcode") : node && !function(node) {
                                return node == ed.dom.getRoot();
                            }(node) && ed.dom.setAttrib(node, "lang", data.language), 
                            tinymce.dom.Event.cancel(e);
                        },
                        classes: "primary",
                        autofocus: !0
                    } ]
                });
            }
        });
    });
}();tinymce/plugins/branding/plugin.js000060400000002252152456167170013330 0ustar00/* jce - 2.9.99.2 | 2026-04-22 | https://www.joomlacontenteditor.net | Source: https://github.com/widgetfactory/jce | Copyright (C) 2006 - 2026 Ryan Demmer. All rights reserved | GNU/GPL Version 2 or later - http://www.gnu.org/licenses/gpl-2.0.html */
!function() {
    var DOM = tinymce.DOM;
    tinymce.PluginManager.add("branding", function(ed, url) {
        !1 !== ed.settings.branding && (ed.onPostRender.add(function() {
            var container = ed.getContentAreaContainer();
            DOM.insertAfter(DOM.create("div", {
                class: "mceBranding"
            }, 'Powered by JCE Core. <span id="mceBrandingMessage"></span><a href="https://www.joomlacontenteditor.net/buy" target="_blank" title="Get JCE Pro">JCE Pro</a>'), container);
        }), ed.onNodeChange.add(function(ed, cm, n, co) {
            var container = ed.getContentAreaContainer(), msg = "Get more features with ";
            "IMG" === n.nodeName && (msg = "Image resizing, thumbnails and editing in "), 
            ed.dom.is(n, ".mce-item-media") && (msg = "Upload and manage audio and video with "), 
            DOM.setHTML(DOM.get("mceBrandingMessage", container), msg);
        }));
    });
}();tinymce/plugins/blobupload/plugin.js000060400000027233152456167170013675 0ustar00/* jce - 2.9.99.2 | 2026-04-22 | https://www.joomlacontenteditor.net | Source: https://github.com/widgetfactory/jce | Copyright (C) 2006 - 2026 Ryan Demmer. All rights reserved | GNU/GPL Version 2 or later - http://www.gnu.org/licenses/gpl-2.0.html */
!function() {
    var each = tinymce.each, BlobCache = tinymce.file.BlobCache, Conversions = tinymce.file.Conversions, Uuid = tinymce.util.Uuid, DOM = tinymce.DOM, count = 0, uniqueId = function(prefix) {
        return (prefix || "blobid") + count++;
    };
    tinymce.PluginManager.add("blobupload", function(ed, url) {
        var uploaders = [];
        function findMarker(marker) {
            var found;
            return each(ed.dom.select("img[src]"), function(image) {
                if (image.src == marker.src) return found = image, !1;
            }), found;
        }
        function removeMarker(marker) {
            each(ed.dom.select("img[src]"), function(image) {
                image.src == marker.src && (ed.selection.select(image), ed.execCommand("mceRemoveNode"), 
                "P" == (image = ed.selection.getNode()).nodeName) && ed.dom.isEmpty(image) && ed.dom.add(image, "br", {
                    "data-mce-bogus": 1
                });
            });
        }
        function processImages(images) {
            var cachedPromises = {}, images = tinymce.map(images, function(img) {
                var newPromise;
                return cachedPromises[img.src] ? new Promise(function(resolve) {
                    cachedPromises[img.src].then(function(imageInfo) {
                        if ("string" == typeof imageInfo) return imageInfo;
                        resolve({
                            image: img,
                            blobInfo: imageInfo.blobInfo
                        });
                    });
                }) : (newPromise = new Promise(function(resolve, reject) {
                    !function(blobCache, img, resolve, reject) {
                        var base64, blobInfo;
                        0 === img.src.indexOf("blob:") ? (blobInfo = blobCache.getByUri(img.src)) ? resolve({
                            image: img,
                            blobInfo: blobInfo
                        }) : Conversions.uriToBlob(img.src).then(function(blob) {
                            Conversions.blobToDataUri(blob).then(function(dataUri) {
                                base64 = Conversions.parseDataUri(dataUri).data, 
                                blobInfo = blobCache.create(uniqueId(), blob, base64), 
                                blobCache.add(blobInfo), resolve({
                                    image: img,
                                    blobInfo: blobInfo
                                });
                            });
                        }, function(err) {
                            reject(err);
                        }) : (base64 = Conversions.parseDataUri(img.src).data, (blobInfo = blobCache.findFirst(function(cachedBlobInfo) {
                            return cachedBlobInfo.base64() === base64;
                        })) ? resolve({
                            image: img,
                            blobInfo: blobInfo
                        }) : Conversions.uriToBlob(img.src).then(function(blob) {
                            blobInfo = blobCache.create(uniqueId(), blob, base64), 
                            blobCache.add(blobInfo), resolve({
                                image: img,
                                blobInfo: blobInfo
                            });
                        }, function(err) {
                            reject(err);
                        }));
                    }(BlobCache, img, resolve, reject);
                }).then(function(result) {
                    return delete cachedPromises[result.image.src], result;
                }).catch(function(error) {
                    return delete cachedPromises[img.src], error;
                }), cachedPromises[img.src] = newPromise);
            });
            return Promise.all(images);
        }
        function uploadPastedImage(marker, blobInfo) {
            return new Promise(function(resolve, reject) {
                if (!uploaders.length) return removeMarker(marker), resolve();
                var html = '<div class="mceForm"><p>' + ed.getLang("upload.name_description", "Please supply a name for this file") + '</p><div class="mceModalRow">   <label for="' + ed.id + '_blob_input">' + ed.getLang("dlg.name", "Name") + '</label>   <div class="mceModalControl mceModalControlAppend">       <input type="text" id="' + ed.id + '_blob_input" autofocus />       <select id="' + ed.id + '_blob_mimetype">           <option value="jpeg">jpeg</option>           <option value="png">png</option>       </select>   </div></div><div class="mceModalRow">   <label for="' + ed.id + '_blob_input">' + ed.getLang("dlg.quality", "Quality") + '</label>   <div class="mceModalControl">       <select id="' + ed.id + '_blob_quality" class="mce-flex-25">           <option value="100">100</option>           <option value="90">90</option>           <option value="80">80</option>           <option value="70">70</option>           <option value="60">60</option>           <option value="50">50</option>           <option value="40">40</option>           <option value="30">30</option>           <option value="20">20</option>           <option value="10">10</option>       </select>       <span role="presentation">%</span>   </div></div></div>', win = ed.windowManager.open({
                    title: ed.getLang("dlg.name", "Name"),
                    content: html,
                    size: "mce-modal-landscape-small",
                    buttons: [ {
                        title: ed.getLang("cancel", "Cancel"),
                        id: "cancel"
                    }, {
                        title: ed.getLang("submit", "Submit"),
                        id: "submit",
                        onclick: function(e) {
                            var url, uploader, quality, value, images, filename = DOM.getValue(ed.id + "_blob_input");
                            return filename ? (filename = filename.replace(/[\+\\\/\?\#%&<>"\'=\[\]\{\},;@\^\(\)\xa3\u20ac$~]/g, ""), 
                            /\.(php([0-9]*)|phtml|pl|py|jsp|asp|htm|html|shtml|sh|cgi)\b/i.test(filename) ? (ed.windowManager.alert({
                                text: ed.getLang("upload.file_extension_error", "File type not supported"),
                                title: ed.getLang("upload.error", "Upload Error")
                            }), removeMarker(marker), resolve()) : (each(uploaders, function(instance) {
                                if (!url && (url = instance.getUploadURL({
                                    name: blobInfo.filename()
                                }))) return uploader = instance, !1;
                            }), url ? (value = blobInfo.filename(), value = (/\.(jpg|jpeg|png|gif|webp|avif)$/.test(value) ? value.substring(value.length, value.lastIndexOf(".") + 1) : "") || "jpeg", 
                            quality = DOM.getValue(ed.id + "_blob_quality") || 100, 
                            value = DOM.getValue(ed.id + "_blob_mimetype") || value, 
                            filename = {
                                method: "upload",
                                id: Uuid.uuid("wf_"),
                                inline: 1,
                                name: filename,
                                url: url + "&" + ed.settings.query,
                                mimetype: "image/" + value,
                                quality: quality
                            }, images = tinymce.grep(ed.dom.select("img[src]"), function(image) {
                                return image.src == marker.src;
                            }), ed.setProgressState(!0), void function(settings, blobInfo, success, failure, progress) {
                                var formData, xhr = new XMLHttpRequest();
                                xhr.open("POST", settings.url), xhr.upload.onprogress = function(e) {
                                    progress(e.loaded / e.total * 100);
                                }, xhr.onerror = function() {
                                    failure("Image upload failed due to a XHR Transport error. Code: " + xhr.status);
                                }, xhr.onload = function() {
                                    var json;
                                    xhr.status < 200 || 300 <= xhr.status ? failure("HTTP Error: " + xhr.status) : (json = JSON.parse(xhr.responseText)) && !json.error && json.result && json.result.files ? success(json.result.files[0]) : failure(json.error.message || "Invalid JSON response!");
                                }, (formData = new FormData()).append("file", blobInfo.blob(), blobInfo.filename()), 
                                each(settings, function(value, name) {
                                    if ("url" == name || "multipart" == name) return !0;
                                    formData.append(name, value);
                                }), xhr.send(formData);
                            }(filename, blobInfo, function(data) {
                                data.marker = images[0];
                                data = uploader.insertUploadedFile(data);
                                data && (ed.undoManager.add(), ed.dom.replace(data, images[0]), 
                                ed.selection.select(data)), ed.setProgressState(!1), 
                                win.close(), resolve();
                            }, function(error) {
                                ed.windowManager.alert({
                                    text: error,
                                    title: ed.getLang("upload.error", "Upload Error")
                                }), ed.setProgressState(!1), resolve();
                            }, function() {})) : (removeMarker(marker), resolve()))) : (removeMarker(marker), 
                            resolve());
                        },
                        classes: "primary"
                    } ],
                    open: function() {
                        window.setTimeout(function() {
                            DOM.get(ed.id + "_blob_input").focus();
                        }, 10);
                    },
                    close: function() {
                        return removeMarker(marker), resolve();
                    }
                });
            });
        }
        ed.onPreInit.add(function() {
            each(ed.plugins, function(plg, name) {
                var data;
                tinymce.is(plg.getUploadConfig, "function") && (data = plg.getUploadConfig()).inline && data.filetypes && uploaders.push(plg);
            });
        }), ed.onInit.add(function() {
            ed.onPasteBeforeInsert.add(function(ed, o) {
                var promises, o = ed.dom.create("div", 0, o.content), o = tinymce.grep(ed.dom.select("img[src]", o), function(img) {
                    var src = img.getAttribute("src");
                    return !(img.hasAttribute("data-mce-bogus") || img.hasAttribute("data-mce-placeholder") || img.hasAttribute("data-mce-upload-marker") || !src || "data:image/gif;base64,R0lGODlhAQABAIAAAAAAAP///yH5BAEAAAAALAAAAAABAAEAAAIBRAA7" == src || 0 !== src.indexOf("blob:") && 0 !== src.indexOf("data:"));
                });
                o.length && (promises = [], processImages(o).then(function(result) {
                    each(result, function(item) {
                        "string" != typeof item && (ed.selection.select(findMarker(item.image)), 
                        ed.selection.scrollIntoView(), promises.push(uploadPastedImage(item.image, item.blobInfo)));
                    });
                }), Promise.all(promises).then());
            });
        });
    });
}();tinymce/plugins/lists/plugin.js000060400000067213152456167170012712 0ustar00/* jce - 2.9.99.2 | 2026-04-22 | https://www.joomlacontenteditor.net | Source: https://github.com/widgetfactory/jce | Copyright (C) 2006 - 2026 Ryan Demmer. All rights reserved | GNU/GPL Version 2 or later - http://www.gnu.org/licenses/gpl-2.0.html */
!function() {
    "use strict";
    function isBr(node) {
        return node && "BR" === node.nodeName;
    }
    function getNormalizedEndPoint(container, offset) {
        var node = RangeUtils$1.getNode(container, offset);
        return NodeType.isListItemNode(container) && NodeType.isTextNode(node) ? {
            container: node,
            offset: offset >= container.childNodes.length ? node.data.length : 0
        } : {
            container: container,
            offset: offset
        };
    }
    function getParentList(editor) {
        return editor.dom.getParent(editor.selection.getStart(!0), "OL,UL,DL");
    }
    function normalizeList(dom, ul) {
        var sibling, parentNode = ul.parentNode;
        "LI" === parentNode.nodeName && parentNode.firstChild === ul && ((sibling = parentNode.previousSibling) && "LI" === sibling.nodeName ? (sibling.appendChild(ul), 
        NodeType.isEmpty(dom, parentNode) && DOM$3.remove(parentNode)) : DOM$3.setStyle(parentNode, "listStyleType", "none")), 
        NodeType.isListNode(parentNode) && (sibling = parentNode.previousSibling) && "LI" === sibling.nodeName && sibling.appendChild(ul);
    }
    function removeEmptyLi(dom, li) {
        NodeType.isEmpty(dom, li) && DOM.remove(li);
    }
    function outdent(editor, li) {
        var ul = li.parentNode, ulParent = ul.parentNode;
        return ul !== editor.getBody() && ("DD" === li.nodeName ? DOM.rename(li, "DT") : NodeType.isFirstChild(li) && NodeType.isLastChild(li) ? "LI" === ulParent.nodeName ? (DOM.insertAfter(li, ulParent), 
        removeEmptyLi(editor.dom, ulParent), DOM.remove(ul)) : NodeType.isListNode(ulParent) ? DOM.remove(ul, !0) : (ulParent.insertBefore(TextBlock_createNewTextBlock(editor, li), ul), 
        DOM.remove(ul)) : NodeType.isFirstChild(li) ? "LI" === ulParent.nodeName ? (DOM.insertAfter(li, ulParent), 
        li.appendChild(ul), removeEmptyLi(editor.dom, ulParent)) : NodeType.isListNode(ulParent) ? ulParent.insertBefore(li, ul) : (ulParent.insertBefore(TextBlock_createNewTextBlock(editor, li), ul), 
        DOM.remove(li)) : NodeType.isLastChild(li) ? "LI" === ulParent.nodeName ? DOM.insertAfter(li, ulParent) : NodeType.isListNode(ulParent) ? DOM.insertAfter(li, ul) : (DOM.insertAfter(TextBlock_createNewTextBlock(editor, li), ul), 
        DOM.remove(li)) : (ulParent = "LI" === ulParent.nodeName ? (ul = ulParent, 
        TextBlock_createNewTextBlock(editor, li, "LI")) : NodeType.isListNode(ulParent) ? TextBlock_createNewTextBlock(editor, li, "LI") : TextBlock_createNewTextBlock(editor, li), 
        SplitList_splitList(editor, ul, li, ulParent), NormalizeLists_normalizeLists(editor.dom, ul.parentNode))), 
        !0;
    }
    function setAttribs(elm, attrs) {
        tinymce.each(attrs, function(value, key) {
            elm.setAttribute(key, value);
        });
    }
    function getEndPointNode(editor, rng, start) {
        var root = getRoot(editor), container = rng[start ? "startContainer" : "endContainer"], rng = rng[start ? "startOffset" : "endOffset"];
        for (1 === container.nodeType && (container = container.childNodes[Math.min(rng, container.childNodes.length - 1)] || container); container.parentNode !== root; ) {
            if (NodeType.isTextBlock(editor, container)) return container;
            if (/^(TD|TH)$/.test(container.parentNode.nodeName)) return container;
            container = container.parentNode;
        }
        return container;
    }
    function shouldMerge(dom, list1, list2) {
        return isValidLists(list1, list2) && hasSameListStyle(dom, list1, list2) && hasSameClasses(list1, list2);
    }
    function findNextCaretContainer(editor, rng, isForward) {
        var nonEmptyBlocks, walker, node = rng.startContainer, rng = rng.startOffset;
        if (3 === node.nodeType && (isForward ? rng < node.data.length : 0 < rng)) return node;
        for (nonEmptyBlocks = editor.schema.getNonEmptyElements(), 1 === node.nodeType && (node = RangeUtils.getNode(node, rng)), 
        walker = new TreeWalker(node, editor.getBody()), isForward && NodeType.isBogusBr(editor.dom, node) && walker.next(); node = walker[isForward ? "next" : "prev2"](); ) {
            if ("LI" === node.nodeName && !node.hasChildNodes()) return node;
            if (nonEmptyBlocks[node.nodeName]) return node;
            if (3 === node.nodeType && 0 < node.data.length) return node;
        }
    }
    function hasOnlyOneBlockChild(dom, elm) {
        return 1 === (elm = elm.childNodes).length && !NodeType.isListNode(elm[0]) && dom.isBlock(elm[0]);
    }
    function moveChildren(dom, fromElm, toElm) {
        var node, targetElm = hasOnlyOneBlockChild(dom, toElm) ? toElm.firstChild : toElm;
        if (!function(dom, elm) {
            hasOnlyOneBlockChild(dom, elm) && dom.remove(elm.firstChild, !0);
        }(dom, fromElm), !NodeType.isEmpty(dom, fromElm, !0)) for (;node = fromElm.firstChild; ) targetElm.appendChild(node);
    }
    function mergeLiElements(dom, fromElm, toElm) {
        var node, listNode, ul = fromElm.parentNode;
        NodeType.isChildOfBody(dom, fromElm) && NodeType.isChildOfBody(dom, toElm) && (NodeType.isListNode(toElm.lastChild) && (listNode = toElm.lastChild), 
        ul === toElm.lastChild && NodeType.isBr(ul.previousSibling) && dom.remove(ul.previousSibling), 
        (node = toElm.lastChild) && NodeType.isBr(node) && fromElm.hasChildNodes() && dom.remove(node), 
        NodeType.isEmpty(dom, toElm, !0) && dom.empty(toElm), moveChildren(dom, fromElm, toElm), 
        listNode && toElm.appendChild(listNode), dom.remove(fromElm), NodeType.isEmpty(dom, ul)) && ul !== dom.getRoot() && dom.remove(ul);
    }
    function mergeForward(editor, rng, fromLi, toLi) {
        var dom = editor.dom;
        dom.isEmpty(toLi) ? function(editor, fromLi, toLi) {
            editor.dom.empty(toLi), mergeLiElements(editor.dom, fromLi, toLi), editor.selection.setCursorLocation(toLi);
        }(editor, fromLi, toLi) : (rng = Bookmark.createBookmark(rng), mergeLiElements(dom, fromLi, toLi), 
        editor.selection.setRng(Bookmark.resolveBookmark(rng)));
    }
    function backspaceDeleteFromListToListCaret(editor, isForward) {
        var ul, dom = editor.dom, selection = editor.selection, li = dom.getParent(selection.getStart(), "LI");
        if (li) {
            if ((ul = li.parentNode) === editor.getBody() && NodeType.isEmpty(dom, ul)) return !0;
            if (selection = Range_normalizeRange(selection.getRng(!0)), (dom = dom.getParent(findNextCaretContainer(editor, selection, isForward), "LI")) && dom !== li) return isForward ? mergeForward(editor, selection, dom, li) : function(editor, rng, fromLi, toLi) {
                rng = Bookmark.createBookmark(rng);
                mergeLiElements(editor.dom, fromLi, toLi), editor.selection.setRng(Bookmark.resolveBookmark(rng));
            }(editor, selection, li, dom), !0;
            if (!dom && !isForward && ToggleList_removeList(editor, ul.nodeName)) return !0;
        }
        return !1;
    }
    function backspaceDelete(editor, isForward) {
        return editor.selection.isCollapsed() ? backspaceDeleteCaret(editor, isForward) : backspaceDeleteRange(editor);
    }
    function queryListCommandState(editor, listName) {
        return function() {
            var parentList = editor.dom.getParent(editor.selection.getStart(), "UL,OL,DL");
            return parentList && parentList.nodeName === listName;
        };
    }
    var NodeType = {
        isTextNode: function(node) {
            return node && 3 === node.nodeType;
        },
        isListNode: function(node) {
            return node && /^(OL|UL|DL)$/.test(node.nodeName);
        },
        isListItemNode: function(node) {
            return node && /^(LI|DT|DD)$/.test(node.nodeName);
        },
        isBr: isBr,
        isFirstChild: function(node) {
            return node.parentNode.firstChild === node;
        },
        isLastChild: function(node) {
            return node.parentNode.lastChild === node;
        },
        isTextBlock: function(editor, node) {
            return node && !!editor.schema.getTextBlockElements()[node.nodeName];
        },
        isBlock: function(node, blockElements) {
            return node && node.nodeName in blockElements;
        },
        isBogusBr: function(dom, node) {
            return !!isBr(node) && !(!dom.isBlock(node.nextSibling) || isBr(node.previousSibling));
        },
        isEmpty: function(dom, elm, keepBookmarks) {
            var empty = dom.isEmpty(elm);
            return !(keepBookmarks && 0 < dom.select("span[data-mce-type=bookmark]", elm).length) && empty;
        },
        isChildOfBody: function(dom, elm) {
            return dom.isChildOf(elm, dom.getRoot());
        }
    }, RangeUtils$1 = tinymce.dom.RangeUtils, Range_normalizeRange = function(rng) {
        var outRng = rng.cloneRange(), rangeStart = getNormalizedEndPoint(rng.startContainer, rng.startOffset), rangeStart = (outRng.setStart(rangeStart.container, rangeStart.offset), 
        getNormalizedEndPoint(rng.endContainer, rng.endOffset));
        return outRng.setEnd(rangeStart.container, rangeStart.offset), outRng;
    }, DOM$5 = tinymce.DOM, Bookmark = {
        createBookmark: function(rng) {
            function setupEndPoint(start) {
                var offsetNode, container = rng[start ? "startContainer" : "endContainer"], offset = rng[start ? "startOffset" : "endOffset"];
                1 === container.nodeType && (offsetNode = DOM$5.create("span", {
                    "data-mce-type": "bookmark"
                }), container.hasChildNodes() ? (offset = Math.min(offset, container.childNodes.length - 1), 
                start ? container.insertBefore(offsetNode, container.childNodes[offset]) : DOM$5.insertAfter(offsetNode, container.childNodes[offset])) : container.appendChild(offsetNode), 
                container = offsetNode, offset = 0), bookmark[start ? "startContainer" : "endContainer"] = container, 
                bookmark[start ? "startOffset" : "endOffset"] = offset;
            }
            var bookmark = {};
            return setupEndPoint(!0), rng.collapsed || setupEndPoint(), bookmark;
        },
        resolveBookmark: function(bookmark) {
            function restoreEndPoint(start) {
                var node, container = node = bookmark[start ? "startContainer" : "endContainer"], offset = bookmark[start ? "startOffset" : "endOffset"];
                container && (1 === container.nodeType && (offset = function(container) {
                    for (var node = container.parentNode.firstChild, idx = 0; node; ) {
                        if (node === container) return idx;
                        1 === node.nodeType && "bookmark" === node.getAttribute("data-mce-type") || idx++, 
                        node = node.nextSibling;
                    }
                    return -1;
                }(container), container = container.parentNode, DOM$5.remove(node)), 
                bookmark[start ? "startContainer" : "endContainer"] = container, 
                bookmark[start ? "startOffset" : "endOffset"] = offset);
            }
            restoreEndPoint(!0), restoreEndPoint();
            var rng = DOM$5.createRng();
            return rng.setStart(bookmark.startContainer, bookmark.startOffset), 
            bookmark.endContainer && rng.setEnd(bookmark.endContainer, bookmark.endOffset), 
            Range_normalizeRange(rng);
        }
    }, Selection_getParentList = getParentList, Selection_getSelectedSubLists = function(editor) {
        var parentList = getParentList(editor);
        return tinymce.grep(editor.selection.getSelectedBlocks(), function(elm) {
            return NodeType.isListNode(elm) && parentList !== elm;
        });
    }, Selection_getSelectedListItems = function(editor) {
        var selectedBlocks = editor.selection.getSelectedBlocks();
        return tinymce.grep(function(editor, elms) {
            elms = tinymce.map(elms, function(elm) {
                var parentLi = editor.dom.getParent(elm, "li,dd,dt", editor.getBody());
                return parentLi || elm;
            });
            return editor.dom.unique(elms);
        }(editor, selectedBlocks), function(block) {
            return NodeType.isListItemNode(block);
        });
    }, DOM$4 = tinymce.DOM, mergeLists = function(from, to) {
        var node;
        if (NodeType.isListNode(from)) {
            for (;node = from.firstChild; ) to.appendChild(node);
            DOM$4.remove(from);
        }
    }, Indent_indentSelection = function(editor) {
        var li, sibling, newList, listStyle, listElements = Selection_getSelectedListItems(editor);
        if (listElements.length) {
            for (var bookmark = Bookmark.createBookmark(editor.selection.getRng(!0)), i = 0; i < listElements.length && (li = listElements[i], 
            listStyle = newList = sibling = void 0, ("DT" === li.nodeName ? (DOM$4.rename(li, "DD"), 
            !0) : (sibling = li.previousSibling) && NodeType.isListNode(sibling) ? (sibling.appendChild(li), 
            !0) : sibling && "LI" === sibling.nodeName && NodeType.isListNode(sibling.lastChild) ? (sibling.lastChild.appendChild(li), 
            mergeLists(li.lastChild, sibling.lastChild), !0) : (sibling = li.nextSibling) && NodeType.isListNode(sibling) ? (sibling.insertBefore(li, sibling.firstChild), 
            !0) : !(!(sibling = li.previousSibling) || "LI" !== sibling.nodeName || (newList = DOM$4.create(li.parentNode.nodeName), 
            (listStyle = DOM$4.getStyle(li.parentNode, "listStyleType")) && DOM$4.setStyle(newList, "listStyleType", listStyle), 
            sibling.appendChild(newList), newList.appendChild(li), mergeLists(li.lastChild, newList), 
            0))) || 0 !== i); i++);
            return editor.selection.setRng(Bookmark.resolveBookmark(bookmark)), 
            editor.nodeChanged(), !0;
        }
    }, DOM$3 = tinymce.DOM, NormalizeLists_normalizeLists = function(dom, element) {
        tinymce.each(tinymce.grep(dom.select("ol,ul", element)), function(ul) {
            normalizeList(dom, ul);
        });
    }, DOM$2 = tinymce.DOM, TextBlock_createNewTextBlock = function(editor, contentNode, blockName) {
        var node, textBlock, hasContentNode, fragment = DOM$2.createFragment(), blockElements = editor.schema.getBlockElements();
        if ((blockName = editor.settings.forced_root_block ? blockName || editor.settings.forced_root_block : blockName) && ((textBlock = DOM$2.create(blockName)).tagName === editor.settings.forced_root_block && DOM$2.setAttribs(textBlock, editor.settings.forced_root_block_attrs), 
        NodeType.isBlock(contentNode.firstChild, blockElements) || fragment.appendChild(textBlock)), 
        contentNode) for (;node = contentNode.firstChild; ) {
            var nodeName = node.nodeName;
            hasContentNode || "SPAN" === nodeName && "bookmark" === node.getAttribute("data-mce-type") || (hasContentNode = !0), 
            NodeType.isBlock(node, blockElements) ? (fragment.appendChild(node), 
            textBlock = null) : (blockName ? (textBlock || (textBlock = DOM$2.create(blockName), 
            fragment.appendChild(textBlock)), textBlock) : fragment).appendChild(node);
        }
        return editor.settings.forced_root_block ? hasContentNode || textBlock.appendChild(DOM$2.create("br", {
            "data-mce-bogus": "1"
        })) : fragment.appendChild(DOM$2.create("br")), fragment;
    }, DOM$1 = tinymce.DOM, SplitList_splitList = function(editor, ul, li, newBlock) {
        var tmpRng, node, targetNode, bookmarks = DOM$1.select('span[data-mce-type="bookmark"]', ul);
        for (newBlock = newBlock || TextBlock_createNewTextBlock(editor, li), (tmpRng = DOM$1.createRng()).setStartAfter(li), 
        tmpRng.setEndAfter(ul), node = (tmpRng = tmpRng.extractContents()).firstChild; node; node = node.firstChild) if ("LI" === node.nodeName && editor.dom.isEmpty(node)) {
            DOM$1.remove(node);
            break;
        }
        editor.dom.isEmpty(tmpRng) || DOM$1.insertAfter(tmpRng, ul), DOM$1.insertAfter(newBlock, ul), 
        NodeType.isEmpty(editor.dom, li.parentNode) && (targetNode = li.parentNode, 
        tinymce.each(bookmarks, function(node) {
            targetNode.parentNode.insertBefore(node, li.parentNode);
        }), DOM$1.remove(targetNode)), DOM$1.remove(li), NodeType.isEmpty(editor.dom, ul) && DOM$1.remove(ul);
    }, DOM = tinymce.DOM, Outdent_outdent = outdent, Outdent_outdentSelection = function(editor) {
        var listElements = Selection_getSelectedListItems(editor);
        if (listElements.length) {
            for (var y, bookmark = Bookmark.createBookmark(editor.selection.getRng(!0)), root = editor.dom.getRoot(), i = listElements.length; i--; ) for (var node = listElements[i].parentNode; node && node !== root; ) {
                for (y = listElements.length; y--; ) if (listElements[y] === node) {
                    listElements.splice(i, 1);
                    break;
                }
                node = node.parentNode;
            }
            for (i = 0; i < listElements.length && (outdent(editor, listElements[i]) || 0 !== i); i++);
            return editor.selection.setRng(Bookmark.resolveBookmark(bookmark)), 
            editor.nodeChanged(), !0;
        }
    }, BookmarkManager = tinymce.dom.BookmarkManager, getRoot = function(editor) {
        return editor.dom.getRoot();
    }, updateListWithDetails = function(dom, el, detail) {
        !function(dom, el, detail) {
            detail = detail["list-style-type"] || null;
            dom.setStyle(el, "list-style-type", detail);
        }(dom, el, detail), function(dom, el, detail) {
            setAttribs(el, detail["list-attributes"]), tinymce.each(dom.select("li", el), function(li) {
                setAttribs(li, detail["list-item-attributes"]);
            });
        }(dom, el, detail);
    }, applyList = function(editor, listName, detail) {
        var bookmark, rng = editor.selection.getRng(!0), listItemName = "LI", dom = editor.dom;
        detail = detail || {}, "false" !== dom.getContentEditable(editor.selection.getNode()) && ("DL" === (listName = listName.toUpperCase()) && (listItemName = "DT"), 
        bookmark = Bookmark.createBookmark(rng), tinymce.each(function(editor, rng) {
            for (var block, textBlocks = [], root = getRoot(editor), dom = editor.dom, startNode = getEndPointNode(editor, rng, !0), endNode = getEndPointNode(editor, rng, !1), siblings = [], node = startNode; node && (siblings.push(node), 
            node !== endNode); node = node.nextSibling);
            return tinymce.each(siblings, function(node) {
                var nextSibling;
                NodeType.isTextBlock(editor, node) ? (textBlocks.push(node), block = null) : dom.isBlock(node) || NodeType.isBr(node) ? (NodeType.isBr(node) && dom.remove(node), 
                block = null) : (nextSibling = node.nextSibling, BookmarkManager.isBookmarkNode(node) && (NodeType.isTextBlock(editor, nextSibling) || !nextSibling && node.parentNode === root) ? block = null : (block || (block = dom.create("p"), 
                node.parentNode.insertBefore(block, node), textBlocks.push(block)), 
                block.appendChild(node)));
            }), textBlocks;
        }(editor, rng), function(block, idx) {
            var listBlock, detailStyle, sibling = block.previousSibling;
            "DL" === listName && 0 < idx && (listItemName = "DD"), sibling && NodeType.isListNode(sibling) && sibling.nodeName === listName && (idx = sibling, 
            idx = dom.getStyle(idx, "list-style-type"), detailStyle = detail ? detail["list-style-type"] : "", 
            idx === (null === detailStyle ? "" : detailStyle)) ? (listBlock = sibling, 
            block = dom.rename(block, listItemName), sibling.appendChild(block)) : (listBlock = dom.create(listName), 
            block.parentNode.insertBefore(listBlock, block), listBlock.appendChild(block), 
            block = dom.rename(block, listItemName)), updateListWithDetails(dom, listBlock, detail), 
            mergeWithAdjacentLists(editor.dom, listBlock);
        }), editor.selection.setRng(Bookmark.resolveBookmark(bookmark)));
    }, removeList = function(editor) {
        var bookmark = Bookmark.createBookmark(editor.selection.getRng(!0)), root = getRoot(editor), listItems = Selection_getSelectedListItems(editor), emptyListItems = tinymce.grep(listItems, function(li) {
            return editor.dom.isEmpty(li);
        }), listItems = tinymce.grep(listItems, function(li) {
            return !editor.dom.isEmpty(li);
        });
        tinymce.each(emptyListItems, function(li) {
            NodeType.isEmpty(editor.dom, li) && Outdent_outdent(editor, li);
        }), tinymce.each(listItems, function(li) {
            var node, rootList;
            if (li.parentNode !== editor.getBody()) {
                for (node = li; node && node !== root; node = node.parentNode) NodeType.isListNode(node) && (rootList = node);
                SplitList_splitList(editor, rootList, li), NormalizeLists_normalizeLists(editor.dom, rootList.parentNode);
            }
        }), editor.selection.setRng(Bookmark.resolveBookmark(bookmark));
    }, isValidLists = function(list1, list2) {
        return list1 && list2 && NodeType.isListNode(list1) && list1.nodeName === list2.nodeName;
    }, hasSameListStyle = function(dom, list1, list2) {
        return dom.getStyle(list1, "list-style-type", !0) === dom.getStyle(list2, "list-style-type", !0);
    }, hasSameClasses = function(elm1, elm2) {
        return elm1.className === elm2.className;
    }, mergeWithAdjacentLists = function(dom, listBlock) {
        var node, sibling = listBlock.nextSibling;
        if (shouldMerge(dom, listBlock, sibling)) {
            for (;node = sibling.firstChild; ) listBlock.appendChild(node);
            dom.remove(sibling);
        }
        if (sibling = listBlock.previousSibling, shouldMerge(dom, listBlock, sibling)) {
            for (;node = sibling.lastChild; ) listBlock.insertBefore(node, listBlock.firstChild);
            dom.remove(sibling);
        }
    }, updateList = function(dom, list, listName, detail) {
        list.nodeName !== listName ? (listName = dom.rename(list, listName), updateListWithDetails(dom, listName, detail)) : updateListWithDetails(dom, list, detail);
    }, hasListStyleDetail = function(detail) {
        return "list-style-type" in detail;
    }, ToggleList_toggleList = function(editor, listName, detail) {
        var parentList = Selection_getParentList(editor), selectedSubLists = Selection_getSelectedSubLists(editor);
        detail = detail || {}, parentList && 0 < selectedSubLists.length ? function(editor, parentList, lists, listName, detail) {
            var bookmark;
            parentList.nodeName !== listName || hasListStyleDetail(detail) ? (bookmark = Bookmark.createBookmark(editor.selection.getRng(!0)), 
            tinymce.each([ parentList ].concat(lists), function(elm) {
                updateList(editor.dom, elm, listName, detail);
            }), editor.selection.setRng(Bookmark.resolveBookmark(bookmark))) : removeList(editor);
        }(editor, parentList, selectedSubLists, listName, detail) : function(editor, parentList, listName, detail) {
            var bookmark;
            parentList !== getRoot(editor) && (parentList ? parentList.nodeName !== listName || hasListStyleDetail(detail) ? (bookmark = Bookmark.createBookmark(editor.selection.getRng(!0)), 
            updateListWithDetails(editor.dom, parentList, detail), mergeWithAdjacentLists(editor.dom, editor.dom.rename(parentList, listName)), 
            editor.selection.setRng(Bookmark.resolveBookmark(bookmark))) : removeList(editor) : applyList(editor, listName, detail));
        }(editor, parentList, listName, detail);
    }, ToggleList_removeList = removeList, ToggleList_mergeWithAdjacentLists = mergeWithAdjacentLists, RangeUtils = tinymce.dom.RangeUtils, TreeWalker = tinymce.dom.TreeWalker, VK$1 = tinymce.VK, backspaceDeleteCaret = function(editor, isForward) {
        return backspaceDeleteFromListToListCaret(editor, isForward) || function(editor, isForward) {
            var dom = editor.dom, block = dom.getParent(editor.selection.getStart(), dom.isBlock);
            if (block && dom.isEmpty(block)) {
                var rng = Range_normalizeRange(editor.selection.getRng(!0)), rng = dom.getParent(findNextCaretContainer(editor, rng, isForward), "LI");
                if (rng) return editor.undoManager.add(), function(dom, block) {
                    var parentBlock = dom.getParent(block.parentNode, dom.isBlock);
                    dom.remove(block), parentBlock && dom.isEmpty(parentBlock) && dom.remove(parentBlock);
                }(dom, block), ToggleList_mergeWithAdjacentLists(dom, rng.parentNode), 
                editor.selection.select(rng, !0), editor.selection.collapse(isForward), 
                !0;
            }
            return !1;
        }(editor, isForward);
    }, backspaceDeleteRange = function(editor) {
        return !!(editor.dom.getParent(editor.selection.getStart(), "LI,DT,DD") || 0 < Selection_getSelectedListItems(editor).length) && (editor.undoManager.add(), 
        editor.execCommand("Delete"), NormalizeLists_normalizeLists(editor.dom, editor.getBody()), 
        !0);
    }, Delete_setup = function(editor) {
        editor.onKeyDown.add(function(ed, e) {
            e.keyCode === VK$1.BACKSPACE ? backspaceDelete(editor, !1) && e.preventDefault() : e.keyCode === VK$1.DELETE && backspaceDelete(editor, !0) && e.preventDefault();
        });
    }, Delete_backspaceDelete = backspaceDelete, VK = tinymce.VK;
    tinymce.PluginManager.add("lists", function(editor) {
        Delete_setup(editor), editor.onInit.add(function() {
            !function(editor) {
                editor.onBeforeExecCommand.add(function(ed, cmd, ui, v, o) {
                    var isHandled;
                    if ("indent" === cmd ? Indent_indentSelection(editor) && (isHandled = !0) : "outdent" === cmd && Outdent_outdentSelection(editor) && (isHandled = !0), 
                    isHandled) return editor.execCommand(cmd), o.terminate = !0;
                }), editor.addCommand("InsertUnorderedList", function(ui, detail) {
                    ToggleList_toggleList(editor, "UL", detail);
                }), editor.addCommand("InsertOrderedList", function(ui, detail) {
                    ToggleList_toggleList(editor, "OL", detail);
                }), editor.addCommand("InsertDefinitionList", function(ui, detail) {
                    ToggleList_toggleList(editor, "DL", detail);
                });
            }(editor), function(editor) {
                editor.addQueryStateHandler("InsertUnorderedList", queryListCommandState(editor, "UL")), 
                editor.addQueryStateHandler("InsertOrderedList", queryListCommandState(editor, "OL")), 
                editor.addQueryStateHandler("InsertDefinitionList", queryListCommandState(editor, "DL"));
            }(editor), editor.getParam("lists_indent_on_tab", !0) && function(editor) {
                editor.onKeyDown.add(function(ed, e) {
                    9 !== e.keyCode || VK.metaKeyPressed(e) || editor.dom.getParent(editor.selection.getStart(), "LI,DT,DD") && (e.preventDefault(), 
                    (e.shiftKey ? Outdent_outdentSelection : Indent_indentSelection)(editor));
                });
            }(editor);
        });
        var iconMap = {
            numlist: "OL",
            bullist: "UL"
        };
        editor.onNodeChange.add(function(ed, cm, n, collapsed, args) {
            var lists = tinymce.grep(args.parents, NodeType.isListNode);
            tinymce.each(iconMap, function(listName, btnName) {
                cm.setActive(btnName, 0 < lists.length && lists[0].nodeName === listName);
            });
        }), this.backspaceDelete = function(isForward) {
            return Delete_backspaceDelete(editor, isForward);
        };
    });
}();tinymce/plugins/lists/tests/lists_applying.html000060400000055102152456167170016141 0ustar00<!DOCTYPE html>
<html>
<head>
<title>Applying and Unapplying List Tests</title>
<meta http-equiv="X-UA-Compatible" content="IE=edge" />
	<link rel="stylesheet" href="http://code.jquery.com/qunit/qunit-1.14.0.css" type="text/css" />
	<script src="http://code.jquery.com/qunit/qunit-1.14.0.js"></script>
	<script src="../../../../../../../../tinymce-muon-retina/tests/qunit/connector.js"></script>
	<script type="text/javascript" src="../../../../../../../../tinymce-muon-retina/tests/qunit/runner.js"></script>
	<script type="text/javascript" src="../../../../../../../../tinymce-muon-retina/tests/js/utils.js"></script>
	<script type="text/javascript" src="../../../tinymce.js"></script>
	<script type="text/javascript" src="../../../../../../../../tinymce-muon-retina/tests/js/dsl/dsl.js"></script>
	<script type="text/javascript" src="../../../../../../../../tinymce-muon-retina/tests/js/dsl/states.js"></script>
	<script type="text/javascript" src="../../../../../../../../tinymce-muon-retina/tests/js/lists/actions.js"></script>
	<script type="text/javascript" src="../plugin.js"></script>
<script>
// Expected Results
var EmptyOLConvertedToP = '<ol><li>Before</li></ol>\n<p>&nbsp;</p>\n<ol><li>After</li></ol>';
var EmptyULConvertedToP = '<ul>\n<li>Before</li>\n</ul>\n<p>&nbsp;</p>\n<ul>\n<li>After</li>\n</ul>';
var NonEmptyOLConvertedToP = '<ol>\n<li>Before</li>\n</ol>\n<p>Test</p>\n<ol>\n<li>After</li>\n</ol>';
var NonEmptyULConvertedToP = '<ul>\n<li>Before</li>\n</ul>\n<p>Test</p>\n<ul>\n<li>After</li>\n</ul>';

QUnit.config.reorder = false;
QUnit.config.autostart = false;

module('Lists - Applying', {
	autostart: false,
	setup: function() {
		window.queue = new dsl.Queue();
	}
});

// Tests
asyncTest('Collapsed Selection - Apply OL Actions', function() {
	ApplyingOL.to(EmptyParagraph).gives('<ol>\n<li></li>\n</ol>');
	ApplyingOL.to(EmptyHeading).gives('<ol>\n<li>\n<h1></h1>\n</li>\n</ol>');

	ApplyingOL.to(NonEmptyParagraph).enablesState('Outdent').andGives('<ol>\n<li>Test</li>\n</ol>');
	ApplyingOL.to(NonEmptyHeading).enablesState('Outdent').andGives('<ol>\n<li>\n<h1>Test</h1>\n</li>\n</ol>');

	ApplyingOL.to(TableCellWithoutBrs).enablesState('Outdent').andGives('<table><tbody><tr>\n<td><ol>\n<li>Test</li>\n</ol></td>\n<td>&nbsp;</td>\n</tr></tbody></table>');

	ApplyingOL.to(TableCellWithBrsFirstLine).enablesState('Outdent').andGives('<table><tbody><tr>\n<td><ol>\n<li>Test</li>\n</ol>Line 2</td>\n<td>&nbsp;</td>\n</tr></tbody></table>');
	ApplyingOL.to(TableCellWithBrsMiddleLine).enablesState('Outdent').andGives('<table><tbody><tr>\n<td>Test<ol>\n<li>Line 2</li>\n</ol>Line 3</td>\n<td>&nbsp;</td>\n</tr></tbody></table>');
	ApplyingOL.to(TableCellWithBrsLastLine).enablesState('Outdent').andGives('<table><tbody><tr>\n<td>Test<ol>\n<li>Line 2</li>\n</ol></td>\n<td>&nbsp;</td>\n</tr></tbody></table>');
	ApplyingOL.to(TableCellWithAdjacentBrsFirstLine).enablesState('Outdent').andGives('<table><tbody><tr>\n<td><ol>\n<li>Test</li>\n</ol><br />Line 2</td>\n<td>&nbsp;</td>\n</tr></tbody></table>');

	ApplyingOL.to(HeadingInOrderedList).gives('<h2>Test</h2>');
	ApplyingOL.to(HeadingInUnorderedList).gives('<ol>\n<li>\n<h2>Test</h2>\n</li>\n</ol>');

	ApplyingOL.to(EndOfParagraphBeforeOL).enablesState('Outdent').andGives('<ol>\n<li>Test</li>\n<li>Item</li>\n</ol>');
	ApplyingOL.to(EndOfParagraphBeforeUL).enablesState('Outdent').andGives('<ol>\n<li>Test</li>\n</ol>\n<ul>\n<li>Item</li>\n</ul>');

	ApplyingOL.to(EndOfParagraphBeforeOLWithListType).enablesState('Outdent').andGives('<ol style="list-style-type: lower-alpha;">\n<li>Test</li>\n<li>Item</li>\n</ol>');

	ApplyingOL.to(StartOfParagraphAfterOL).enablesState('Outdent').andGives('<ol>\n<li>Item</li>\n<li>Test</li>\n</ol>');
	ApplyingOL.to(StartOfParagraphAfterUL).enablesState('Outdent').andGives('<ul>\n<li>Item</li>\n</ul>\n<ol>\n<li>Test</li>\n</ol>');
	ApplyingOL.to(StartOfParagraphAfterOLWithListType).enablesState('Outdent').andGives('<ol style="list-style-type: lower-alpha;">\n<li>Item</li>\n<li>Test</li>\n</ol>');

	ApplyingOL.to(ParagraphBetweenOrderedLists).enablesState('Outdent').andGives('<ol>\n<li>Item1</li>\n<li>Test</li>\n<li>Item2</li>\n</ol>');
	ApplyingOL.to(ParagraphBetweenUnorderedLists).enablesState('Outdent').andGives('<ul>\n<li>Item1</li>\n</ul>\n<ol>\n<li>Test</li>\n</ol>\n<ul>\n<li>Item2</li>\n</ul>');
	ApplyingOL.to(ParagraphBetweenMixedLists).enablesState('Outdent').andGives('<ol>\n<li>Item1</li>\n<li>Test</li>\n</ol>\n<ul>\n<li>Item2</li>\n</ul>');

	ApplyingOL.to(EmptyOrderedListItem).disablesState('Outdent').andGives(EmptyOLConvertedToP);
	ApplyingOL.to(EmptyUnorderedListItem).gives('<ul>\n<li>Before</li>\n</ul>\n<ol>\n<li>&nbsp;</li>\n</ol>\n<ul>\n<li>After</li>\n</ul>');

	ApplyingOL.to(NonEmptyOrderedListItem).disablesState('Outdent').andGives(NonEmptyOLConvertedToP);
	ApplyingOL.to(NonEmptyUnorderedListItem).gives('<ul>\n<li>Before</li>\n</ul>\n<ol>\n<li>Test</li>\n</ol>\n<ul>\n<li>After</li>\n</ul>');

	ApplyingOL.to(OrderedListItemInsideDiv).disablesState('Outdent').andGives('<div id="div">\n<p>Item1</p>\n<ol>\n<li>Item2</li>\n</ol></div>');
	ApplyingOL.to(UnorderedListItemInsideDiv).enablesState('Outdent').andGives('<div id="div"><ol>\n<li>Item1</li>\n</ol>\n<ul>\n<li>Item2</li>\n</ul>\n</div>');

	ApplyingOL.to(NestedEmptyOrderedListItem).disablesState('Outdent').andGives('<ol>\n<li>Before</li>\n</ol>\n<p>&nbsp;</p>\n<ol>\n<li>After</li>\n</ol>');
	ApplyingOL.to(NestedEmptyUnorderedListItem).enablesState('Outdent').andGives('<ul>\n<li>Before<ol>\n<li>&nbsp;</li>\n</ol></li>\n<li>After</li>\n</ul>');

	ApplyingOL.to(NestedNonEmptyOrderedListItem).disablesState('Outdent').andGives('<ol>\n<li>Before</li>\n</ol>\n<p>Test</p>\n<ol>\n<li>After</li>\n</ol>');
	ApplyingOL.to(NestedNonEmptyUnorderedListItem).enablesState('Outdent').andGives('<ul>\n<li>Before<ol>\n<li>Test</li>\n</ol></li>\n<li>After</li>\n</ul>');


	ApplyingOL.to(OrderedListItemWithNestedChild).disablesState('Outdent').andGives('<p>Item1</p>\n<ol>\n<li style="list-style-type: none;"><ol>\n<li>Nested</li>\n</ol></li>\n</ol>');
	ApplyingOL.to(UnorderedListItemWithNestedChild).enablesState('Outdent').andGives('<ol>\n<li>Item1\n<ul>\n<li>Nested</li>\n</ul>\n</li>\n</ol>');

	// Actually not allowed by HTML. ApplyingOL.to(DefinitionListTerm).enablesState('Outdent').andGives('<dl><dt><ol>\n<li>Term</li>\n</ol></dt><dd>Description</dd></dl>');
	ApplyingOL.to(DefinitionListDescription).enablesState('Outdent').andGives('<dl><dt>Term</dt><dd><ol>\n<li>Description</li>\n</ol></dd></dl>');

	ApplyingOL.to(ParagraphWithMarginLeft).enablesState('Outdent').andGives('<ol>\n<li style="margin-left: 30px;">Test</li>\n</ol>');
	ApplyingOL.to(ParagraphWithPaddingLeft).enablesState('Outdent').andGives('<ol>\n<li style="margin-left: 30px;">Test</li>\n</ol>'); // TODO: Padding-left renders weird, should it be removed?
	ApplyingOL.to(ParagraphWithMarginAndPaddingLeft).enablesState('Outdent').andGives('<ol>\n<li style="margin-left: 90px;">Test</li>\n</ol>');

	queue.done();
});

asyncTest('Collapsed Selection - Apply UL Actions', function() {
	ApplyingUL.to(EmptyParagraph).gives('<ul>\n<li></li>\n</ul>');
	ApplyingUL.to(EmptyHeading).gives('<ul>\n<li>\n<h1></h1>\n</li>\n</ul>');

	ApplyingUL.to(NonEmptyParagraph).gives('<ul>\n<li>Test</li>\n</ul>');
	ApplyingUL.to(NonEmptyHeading).gives('<ul>\n<li>\n<h1>Test</h1>\n</li>\n</ul>');

	ApplyingUL.to(TableCellWithoutBrs).gives('<table><tbody><tr>\n<td>\n<ul>\n<li>Test</li>\n</ul>\n</td>\n<td>&nbsp;</td>\n</tr></tbody></table>');
	ApplyingUL.to(TableCellWithBrsFirstLine).gives('<table><tbody><tr>\n<td>\n<ul>\n<li>Test</li>\n</ul>\nLine 2</td>\n<td>&nbsp;</td>\n</tr></tbody></table>');
	ApplyingUL.to(TableCellWithBrsMiddleLine).gives('<table><tbody><tr>\n<td>Test\n<ul>\n<li>Line 2</li>\n</ul>\nLine 3</td>\n<td>&nbsp;</td>\n</tr></tbody></table>');
	ApplyingUL.to(TableCellWithBrsLastLine).gives('<table><tbody><tr>\n<td>Test\n<ul>\n<li>Line 2</li>\n</ul>\n</td>\n<td>&nbsp;</td>\n</tr></tbody></table>');
	ApplyingUL.to(TableCellWithAdjacentBrsFirstLine).gives('<table><tbody><tr>\n<td>\n<ul>\n<li>Test</li>\n</ul>\n<br />Line 2</td>\n<td>&nbsp;</td>\n</tr></tbody></table>');

	ApplyingUL.to(HeadingInOrderedList).gives('<ul>\n<li>\n<h2>Test</h2>\n</li>\n</ul>');
	ApplyingUL.to(HeadingInUnorderedList).gives('<h2>Test</h2>');

	ApplyingUL.to(EndOfParagraphBeforeOL).gives('<ul>\n<li>Test</li>\n</ul>\n<ol>\n<li>Item</li>\n</ol>');
	ApplyingUL.to(EndOfParagraphBeforeUL).gives('<ul>\n<li>Test</li>\n<li>Item</li>\n</ul>');

	ApplyingUL.to(StartOfParagraphAfterOL).gives('<ol>\n<li>Item</li>\n</ol>\n<ul>\n<li>Test</li>\n</ul>');
	ApplyingUL.to(StartOfParagraphAfterUL).gives('<ul>\n<li>Item</li>\n<li>Test</li>\n</ul>');

	ApplyingUL.to(ParagraphBetweenOrderedLists).gives('<ol>\n<li>Item1</li>\n</ol>\n<ul>\n<li>Test</li>\n</ul>\n<ol>\n<li>Item2</li>\n</ol>');
	ApplyingUL.to(ParagraphBetweenUnorderedLists).gives('<ul>\n<li>Item1</li>\n<li>Test</li>\n<li>Item2</li>\n</ul>');
	ApplyingUL.to(ParagraphBetweenMixedLists).gives('<ol>\n<li>Item1</li>\n</ol>\n<ul>\n<li>Test</li>\n<li>Item2</li>\n</ul>');

	ApplyingUL.to(EmptyOrderedListItem).gives('<ol>\n<li>Before</li>\n</ol>\n<ul>\n<li>&nbsp;</li>\n</ul>\n<ol>\n<li>After</li>\n</ol>');
	ApplyingUL.to(EmptyUnorderedListItem).gives(EmptyULConvertedToP);

	ApplyingUL.to(NonEmptyOrderedListItem).gives('<ol>\n<li>Before</li>\n</ol>\n<ul>\n<li>Test</li>\n</ul>\n<ol>\n<li>After</li>\n</ol>');
	ApplyingUL.to(NonEmptyUnorderedListItem).gives(NonEmptyULConvertedToP);

	ApplyingUL.to(OrderedListItemInsideDiv).gives('<div id="div">\n<ul>\n<li>Item1</li>\n</ul>\n<ol>\n<li>Item2</li>\n</ol></div>');
	ApplyingUL.to(UnorderedListItemInsideDiv).gives('<div id="div">\n<p>Item1</p>\n<ul>\n<li>Item2</li>\n</ul>\n</div>');

	ApplyingUL.to(NestedEmptyOrderedListItem).gives('<ol>\n<li>Before\n<ul>\n<li>&nbsp;</li>\n</ul>\n</li>\n<li>After</li>\n</ol>');
	ApplyingUL.to(NestedEmptyUnorderedListItem).gives('<ul>\n<li>Before</li>\n</ul>\n<p>&nbsp;</p>\n<ul>\n<li>After</li>\n</ul>');


	ApplyingUL.to(NestedNonEmptyOrderedListItem).gives('<ol>\n<li>Before<ul>\n<li>Test</li>\n</ul></li>\n<li>After</li>\n</ol>');
	ApplyingUL.to(NestedNonEmptyUnorderedListItem).gives('<ul>\n<li>Before</li>\n</ul>\n<p>Test</p>\n<ul>\n<li>After</li>\n</ul>');


	ApplyingUL.to(OrderedListItemWithNestedChild).gives('<ul>\n<li>Item1<ol>\n<li>Nested</li>\n</ol></li>\n</ul>');
	ApplyingUL.to(UnorderedListItemWithNestedChild).gives('<p>Item1</p>\n<ul><li style="list-style-type: none;"><ul>\n<li>Nested</li>\n</ul></li>\n</ul>');

	// Actually not allowed by HTML ApplyingUL.to(DefinitionListTerm).gives('<dl><dt><ul>\n<li>Term</li>\n</ul></dt><dd>Description</dd></dl>');
	ApplyingUL.to(DefinitionListDescription).gives('<dl><dt>Term</dt><dd><ul>\n<li>Description</li>\n</ul></dd></dl>');

	ApplyingUL.to(ParagraphWithMarginLeft).gives('<ul><li style="margin-left: 30px;">Test</li>\n</ul>');
	ApplyingUL.to(ParagraphWithPaddingLeft).gives('<ul><li style="margin-left: 30px;">Test</li>\n</ul>'); // TODO: Padding-left renders weird, should it be removed?
	ApplyingUL.to(ParagraphWithMarginAndPaddingLeft).gives('<ul><li style="margin-left: 90px;">Test</li>\n</ul>');
	queue.done();
});

asyncTest('Collapsed Selection - Apply OL in Divs', function() {
	ApplyingOL.to(ParagraphInDiv).gives('\n<div><ol>\n<li>Item</li>\n</ol></div>');
	ApplyingOL.to(TextInDiv).gives('\n<div><ol>\n<li>Item</li>\n</ol></div>');
	ApplyingOL.to(TextWithBrsInDivFirstLine).gives('\n<div><ol>\n<li>Item1</li>\n</ol>Item2</div>');
	ApplyingOL.to(TextWithBrsInDivMiddleLine).gives('\n<div>Item1<ol>\n<li>Item2</li>\n</ol>Item3</div>');
	ApplyingOL.to(TextWithBrsInDivLastLine).gives('\n<div>Item1<ol>\n<li>Item2</li>\n</ol></div>');
	queue.done();
});

asyncTest('Collapsed Selection - Apply UL in Divs', function() {
	ApplyingUL.to(ParagraphInDiv).gives('\n<div><ul>\n<li>Item</li>\n</ul></div>');
	ApplyingUL.to(TextInDiv).gives('\n<div><ul>\n<li>Item</li>\n</ul></div>');
	ApplyingUL.to(TextWithBrsInDivFirstLine).gives('\n<div><ul>\n<li>Item1</li>\n</ul>Item2</div>');
	ApplyingUL.to(TextWithBrsInDivMiddleLine).gives('\n<div>Item1<ul>\n<li>Item2</li>\n</ul>Item3</div>');
	ApplyingUL.to(TextWithBrsInDivLastLine).gives('\n<div>Item1<ul>\n<li>Item2</li>\n</ul></div>');
	queue.done();
});

asyncTest('Collapsed Selection - Type Enter', function() {
	TypingEnter.inA(EmptyOrderedListItem).gives('<ol>\n<li>Before</li>\n<li></li>\n<li>&nbsp;</li>\n<li>After</li>\n</ol>');
	TypingEnter.inA(EmptyUnorderedListItem).gives('<ul>\n<li>Before</li>\n<li></li>\n<li>&nbsp;</li>\n<li>After</li>\n</ul>');
	TypingEnter.inA(NonEmptyOrderedListItem).gives('<ol>\n<li>Before</li>\n<li></li>\n<li>Test</li>\n<li>After</li>\n</ol>');
	TypingEnter.inA(NonEmptyUnorderedListItem).gives('<ul>\n<li>Before</li>\n<li></li>\n<li>Test</li>\n<li>After</li>\n</ul>');

	TypingEnter.inA(NestedNonEmptyOrderedListItem).gives('<ol>\n<li>Before<ol>\n<li></li>\n<li>Test</li>\n</ol></li>\n<li>After</li>\n</ol>');
	TypingEnter.inA(NestedNonEmptyUnorderedListItem).gives('<ul>\n<li>Before<ul>\n<li></li>\n<li>Test</li>\n</ul></li>\n<li>After</li>\n</ul>');

	// TODO: Typing enter in correctly nested lists
	queue.done();
});

// TODO: Typing backspace in a paragraph between two lists should merge the lists.

asyncTest('Expanded Selection, List Types - Ordered List Action', function() {
	ApplyingOL.to(SingleLiOlSelection).gives('<p>Item 1</p>');
	ApplyingOL.to(MultiLiOlSelection).gives('<p>Item 1</p><p>Item 2</p>');
	ApplyingOL.to(SingleLiUlSelection).gives('<ol>\n<li>Item 1</li>\n</ol>');
	ApplyingOL.to(MultiLiUlSelection).gives('<ol>\n<li>Item 1</li>\n<li>Item 2</li>\n</ol>');

	ApplyingOL.to(IndentedOlInOlCorrectSelection).gives('<p>Item 1</p><p>Indented</p>');
	ApplyingOL.to(IndentedOlInOlIncorrectSelection).gives('<p>Item 1</p><p>Indented</p>');

	// TODO: Selection only in indented list.

	ApplyingOL.to(IndentedUlInUlCorrectSelection).gives('<ol>\n<li>Item 1<ol>\n<li>Indented</li>\n</ol></li>\n</ol>');
	ApplyingOL.to(IndentedUlInUlIncorrectSelection).gives('<ol>\n<li>Item 1<ol>\n<li>Indented</li>\n</ol></li>\n</ol>');

	ApplyingOL.to(IndentedOlInUlCorrectSelection).gives('<ol>\n<li>Item 1<ol>\n<li>Indented</li>\n</ol></li>\n</ol>');
	ApplyingOL.to(IndentedUlInOlCorrectSelection).gives('<ol>\n<li>Item 1<ol>\n<li>Indented</li>\n</ol></li>\n</ol>');
	ApplyingOL.to(IndentedOlInUlIncorrectSelection).gives('<ol>\n<li>Item 1<ol>\n<li>Indented</li>\n</ol></li>\n</ol>');
	ApplyingOL.to(IndentedUlInOlIncorrectSelection).gives('<ol>\n<li>Item 1<ol>\n<li>Indented</li>\n</ol></li>\n</ol>');
	queue.done();
});

asyncTest('Expanded Selection, List Types - Unordered List Action', function() {
	ApplyingUL.to(SingleLiOlSelection).gives('<ul>\n<li>Item 1</li>\n</ul>');
	ApplyingUL.to(MultiLiOlSelection).gives('<ul>\n<li>Item 1</li>\n<li>Item 2</li>\n</ul>');
	ApplyingUL.to(SingleLiUlSelection).gives('<p>Item 1</p>');
	ApplyingUL.to(MultiLiUlSelection).gives('<p>Item 1</p><p>Item 2</p>');

	ApplyingUL.to(IndentedOlInOlCorrectSelection).gives('<ul>\n<li>Item 1<ul>\n<li>Indented</li>\n</ul></li>\n</ul>');
	ApplyingUL.to(IndentedOlInOlIncorrectSelection).gives('<ul>\n<li>Item 1<ul>\n<li>Indented</li>\n</ul></li>\n</ul>');

	// TODO: Selection only in indented list.

	ApplyingUL.to(IndentedUlInUlCorrectSelection).gives('<p>Item 1</p><p>Indented</p>');
	ApplyingUL.to(IndentedUlInUlIncorrectSelection).gives('<p>Item 1</p><p>Indented</p>');

	ApplyingUL.to(IndentedOlInUlCorrectSelection).gives('<ul>\n<li>Item 1<ul>\n<li>Indented</li>\n</ul></li>\n</ul>');
	ApplyingUL.to(IndentedUlInOlCorrectSelection).gives('<ul>\n<li>Item 1<ul>\n<li>Indented</li>\n</ul></li>\n</ul>');
	ApplyingUL.to(IndentedOlInUlIncorrectSelection).gives('<ul>\n<li>Item 1<ul>\n<li>Indented</li>\n</ul></li>\n</ul>');
	ApplyingUL.to(IndentedUlInOlIncorrectSelection).gives('<ul>\n<li>Item 1<ul>\n<li>Indented</li>\n</ul></li>\n</ul>');
	if (!tinymce.isIE9) { // there is a IE9 selection in tables bug that this test exposes. Don't run the test in IE9
		ApplyingUL.to(TableCellWithTextAfterUL).gives('<table><tbody><tr>\n<td><ul>\n<li>Existing</li>\n<li><span id="start">Line1</span></li>\n<li>Line2</li>\n<li>Line3</li>\n</ul>Line4</td>\n</tr></tbody></table>');
	}
	queue.done();
});

asyncTest('Expanded Selection, Paragraph Types - Ordered List Action', function() {
	ApplyingOL.to(SingleParagraphSelection).gives('<ol>\n<li>This is a test</li>\n</ol>');
	ApplyingOL.to(MultipleParagraphSelection).gives('<ol>\n<li>This is a test</li>\n<li>Second paragraph</li>\n</ol>');
	ApplyingOL.to(SingleHeadingSelection).gives('<ol>\n<li>\n<h1>This is a test</h1>\n</li>\n</ol>');
	ApplyingOL.to(MultipleHeadingSelection).gives('<ol>\n<li>\n<h1>This is a test</h1>\n</li>\n<li>\n<h1>Second paragraph</h1>\n</li>\n</ol>');

	ApplyingOL.to(SingleBlockSelection).gives('\n<div><ol>\n<li>This is a test</li>\n</ol></div>');
	ApplyingOL.to(SingleBlockWithBrSelection).gives('\n<div><ol>\n<li>Item1</li>\n<li>Item2</li>\n</ol></div>');
	ApplyingOL.to(MultipleBlockSelection).gives('<ol>\n<li>This is a test</li>\n<li>Second paragraph</li>\n</ol>');
	ApplyingOL.to(MultipleBlockWithBrSelection).gives('<ol>\n<li>Item1</li>\n<li>Item2</li>\n<li>Item3</li>\n</ol>');
	ApplyingOL.to(MultipleBlockWithBrPartialSelection).gives('<ol>\n<li>Item1</li>\n<li>Item2</li>\n<li>Item3</li>\n</ol>\n<div>Item4</div>');
	ApplyingOL.to(MultipleBlockWithEmptyDivsAllSelected).gives('<div id=\"start\">&nbsp;</div><ol><li>a</li></ol><div>&nbsp;</div><ol><li>b</li></ol><div>&nbsp;</div><div id=\"end\">&nbsp;</div>');
	ApplyingOL.to(ThreeBoldDivsWithBrSelection).gives('<ol><li><strong>One</strong></li><li><strong>Two</strong></li><li><strong>Three</strong></li></ol>');

	ApplyingOL.to(ParagraphToHeadingSelection).gives('<ol>\n<li>This is a test</li>\n<li>\n<h1>Second paragraph</h1>\n</li>\n</ol>');
	ApplyingOL.to(ParagraphToBlockSelection).gives('<ol>\n<li>This is a test</li>\n<li>Second paragraph</li>\n</ol>');
	ApplyingOL.to(HeadingToParagraphSelection).gives('<ol>\n<li>\n<h1>This is a test</h1>\n</li>\n<li>Second paragraph</li>\n</ol>');
	ApplyingOL.to(BlockToParagraphSelection).gives('<ol>\n<li>This is a test</li>\n<li>Second paragraph</li>\n</ol>');
	ApplyingOL.to(MultipleParagraphAndHeadingSelection).gives('<ol>\n<li>This is a test</li>\n<li>\n<h1>Second paragraph</h1>\n</li>\n<li>Third paragraph</li>\n</ol>');

	ApplyingOL.to(TextWithBrsInFormattingInDiv).gives('<div><strong>Before</strong><ol><li>Item1</li><li>Item2</li><li>Item3</li></ol></div>');
	ApplyingOL.to(TextWithBrInsideFormatting).gives('<div><em><strong>Before</strong></em><ol><li><em><strong><span class="foo">Item1</span></strong></em>Item2</li><li>Item3</li></ol></div>');
	queue.done();
});

asyncTest('Expanded Selection, Paragraph Types - Unordered List Action', function() {
	ApplyingUL.to(SingleParagraphSelection).gives('<ul>\n<li>This is a test</li>\n</ul>');
	ApplyingUL.to(MultipleParagraphSelection).gives('<ul>\n<li>This is a test</li>\n<li>Second paragraph</li>\n</ul>');
	ApplyingUL.to(SingleHeadingSelection).gives('<ul>\n<li>\n<h1>This is a test</h1>\n</li>\n</ul>');
	ApplyingUL.to(MultipleHeadingSelection).gives('<ul>\n<li>\n<h1>This is a test</h1>\n</li>\n<li>\n<h1>Second paragraph</h1>\n</li>\n</ul>');

	ApplyingUL.to(SingleBlockSelection).gives('\n<div><ul>\n<li>This is a test</li>\n</ul></div>');
	ApplyingUL.to(SingleBlockWithBrSelection).gives('\n<div><ul>\n<li>Item1</li>\n<li>Item2</li>\n</ul></div>');
	ApplyingUL.to(MultipleBlockSelection).gives('<ul>\n<li>This is a test</li>\n<li>Second paragraph</li>\n</ul>');
	ApplyingUL.to(MultipleBlockWithBrSelection).gives('<ul>\n<li>Item1</li>\n<li>Item2</li>\n<li>Item3</li>\n</ul>');
	ApplyingUL.to(MultipleBlockWithBrPartialSelection).gives('<ul>\n<li>Item1</li>\n<li>Item2</li>\n<li>Item3</li>\n</ul>\n<div>Item4</div>');
	ApplyingUL.to(MultipleBlockWithBrPartialSelectionAtEnd).gives('\n<div>Item1</div>\n<ul>\n<li>Item2</li>\n<li>Item3</li>\n<li>Item4</li>\n</ul>');
	ApplyingUL.to(MultipleBlockWithEmptyDivsAllSelected).gives('<div id=\"start\">&nbsp;</div><ul><li>a</li></ul><div>&nbsp;</div><ul><li>b</li></ul><div>&nbsp;</div><div id=\"end\">&nbsp;</div>');
	ApplyingUL.to(ThreeBoldDivsWithBrSelection).gives('<ul><li><strong>One</strong></li>\n<li><strong>Two</strong></li>\n<li><strong>Three</strong></li></ul>');

	// TODO: Divs with BRs and Paragraphs.
	// TODO: Divs with BRs in paragraphs?  Divs with a mix of BRs and paragraph child.
	
	ApplyingUL.to(ParagraphToHeadingSelection).gives('<ul>\n<li>This is a test</li>\n<li>\n<h1>Second paragraph</h1>\n</li>\n</ul>');
	ApplyingUL.to(ParagraphToBlockSelection).gives('<ul>\n<li>This is a test</li>\n<li>Second paragraph</li>\n</ul>');
	ApplyingUL.to(HeadingToParagraphSelection).gives('<ul>\n<li>\n<h1>This is a test</h1>\n</li>\n<li>Second paragraph</li>\n</ul>');
	ApplyingUL.to(BlockToParagraphSelection).gives('<ul>\n<li>This is a test</li>\n<li>Second paragraph</li>\n</ul>');
	ApplyingUL.to(MultipleParagraphAndHeadingSelection).gives('<ul>\n<li>This is a test</li>\n<li>\n<h1>Second paragraph</h1>\n</li>\n<li>Third paragraph</li>\n</ul>');

	ApplyingUL.to(TextWithBrsInFormattingInDiv).gives('<div><strong>Before</strong><ul><li>Item1</li>\n<li>Item2</li>\n<li>Item3</li></ul></div>');
	queue.done();
});

asyncTest('Expanded Selection, Table Types - Ordered List Action', function() {
	ApplyingOL.to(CellWithoutBrSelection).gives('<table><tbody><tr>\n<td><ol>\n<li>Cell 1</li>\n</ol></td>\n</tr></tbody></table>');
	// TODO: Cells with BR selection
	queue.done();
	// TODO: Tables with BRs.
});

asyncTest('Expanded Selection, Table Types - Unordered List Action', function() {
	ApplyingUL.to(CellWithoutBrSelection).gives('<table><tbody><tr>\n<td><ul>\n<li>Cell 1</li>\n</ul></td>\n</tr></tbody></table>');
	queue.done();
	// TODO: Tables with BRs.
});
var initTinyFunction = function(){
	tinymce.init({
			mode: "exact",
			elements: "elm1",
			theme: "advanced",
			add_unload_trigger: false,
			language_load: false,
			// TODO: Determine why TinyMCE defaults to stripping out empty h1,ul,ol and li element since it results in invalid HTML (but only on FF3.0 and IE).
		extended_valid_elements: 'li[style],ul[type|compact|style],ol[type|compact|style],h1',
		// Turn this off because we want the list actions to create the right DOM structure from the start.
		fix_list_elements: false,
			plugins: 'lists',
			schema: 'mixed',
			compress: {
				'css': true,
				'javascript': true
			},
			init_instance_callback: function (ed) {
				editor = ed;
				QUnit.start();
			}
		});
};
</script>
</head>
<body>
	<h1 id="qunit-header">Applying and Unapplying List Tests</h1>
	<h2 id="qunit-banner"></h2>
	<div id="qunit-testrunner-toolbar"></div>
	<h2 id="qunit-userAgent"></h2>
	<ol id="qunit-tests"></ol>
	<div id="content">
		<textarea id="elm1" name="elm1"></textarea>
	</div>
	<p><input type="text" id="state"><input type="button" value="Load state" onclick="loadState();"></p>
	<script>
	initTinyFunction();

	function loadState() {
		window[document.getElementById('state').value]();
		editor.focus();
	}
	</script>
</body>
</html>
tinymce/plugins/lists/tests/lists_indenting.html000060400000034574152456167170016307 0ustar00<!DOCTYPE html>
<html>
<head>
<title>List Indenting and Outdenting Tests</title>
<link rel="stylesheet" href="http://code.jquery.com/qunit/qunit-1.14.0.css" type="text/css" />
	<script src="http://code.jquery.com/qunit/qunit-1.14.0.js"></script>
	<script src="../../../../../../../../tinymce-muon-retina/tests/qunit/connector.js"></script>
	<script type="text/javascript" src="../../../../../../../../tinymce-muon-retina/tests/qunit/runner.js"></script>
	<script type="text/javascript" src="../../../../../../../../tinymce-muon-retina/tests/js/utils.js"></script>
	<script type="text/javascript" src="../../../tinymce.js"></script>
	<script type="text/javascript" src="../../../../../../../../tinymce-muon-retina/tests/js/dsl/dsl.js"></script>
	<script type="text/javascript" src="../../../../../../../../tinymce-muon-retina/tests/js/dsl/states.js"></script>
	<script type="text/javascript" src="../../../../../../../../tinymce-muon-retina/tests/js/lists/actions.js"></script>
	<script type="text/javascript" src="../plugin.js"></script>
<script>
// Expected Results
var EmptyOL = "<ol><li></li></ol>";
var EmptyUL = "<ul><li></li></ul>";
var NonEmptyOL = "<ol><li>Test</li></ol>";
var NonEmptyUL = "<ul><li>Test</li></ul>";
var EmptyOLConvertedToP = '<ol><li>Before</li></ol><p>&nbsp;</p><ol><li>After</li></ol>';
var EmptyULConvertedToP = '<ul><li>Before</li></ul><p>&nbsp;</p><ul><li>After</li></ul>';
var NonEmptyOLConvertedToP = '<ol><li>Before</li></ol><p>Test</p><ol><li>After</li></ol>';
var NonEmptyULConvertedToP = '<ul><li>Before</li></ul><p>Test</p><ul><li>After</li></ul>';

QUnit.config.reorder = false;
QUnit.config.autostart = false;

module('Lists - Indenting', {
	autostart: false,
	setup: function() {
		window.queue = new dsl.Queue();
	}
});

// Tests
asyncTest('Collapsed Selection - Indent Actions', function() {
	Indenting.a(NonEmptyParagraph).enablesState('outdent').andGives('<p style="margin-left: 30px;">Test</p>');
	Indenting.a(NonEmptyHeading).enablesState('outdent').andGives('<h1 style="margin-left: 30px;">Test</h1>');
	Indenting.a(ParagraphWithMarginLeft).enablesState('outdent').andGives('<p style="margin-left: 90px;">Test</p>');
	Indenting.a(ParagraphWithPaddingLeft).enablesState('outdent').andGives('<p style="margin-left: 90px;">Test</p>');
	Indenting.a(ParagraphWithMarginAndPaddingLeft).enablesState('outdent').andGives('<p style="margin-left: 150px;">Test</p>');
	
	Indenting.a(EmptyOrderedListItem).enablesState('outdent').andGives('<ol><li>Before<ol><li>&nbsp;</li></ol></li><li>After</li></ol>');
	Indenting.a(EmptyUnorderedListItem).enablesState('outdent').andGives('<ul><li>Before<ul><li>&nbsp;</li></ul></li><li>After</li></ul>');
	Indenting.a(NonEmptyOrderedListItem).enablesState('outdent').andGives('<ol><li>Before<ol><li>Test</li></ol></li><li>After</li></ol>');
	Indenting.a(NonEmptyUnorderedListItem).enablesState('outdent').andGives('<ul><li>Before<ul><li>Test</li></ul></li><li>After</li></ul>');
	
	// TODO: Test invalid starting point like <ol><li>Before</li><ol><li>Indented</li></ol></ol>
	Indenting.a(NestedEmptyOrderedListItem).enablesState('outdent').andGives('<ol><li>Before<ol><li style="list-style-type: none;"><ol><li>&nbsp;</li></ol></li></ol></li><li>After</li></ol>');
	Indenting.a(NestedEmptyUnorderedListItem).enablesState('outdent').andGives('<ul><li>Before<ul><li style="list-style-type: none;"><ul><li>&nbsp;</li></ul></li></ul></li><li>After</li></ul>');
	Indenting.a(NestedNonEmptyOrderedListItem).enablesState('outdent').andGives('<ol><li>Before<ol><li style="list-style-type: none;"><ol><li>Test</li></ol></li></ol></li><li>After</li></ol>');
	Indenting.a(NestedNonEmptyUnorderedListItem).enablesState('outdent').andGives('<ul><li>Before<ul><li style="list-style-type: none;"><ul><li>Test</li></ul></li></ul></li><li>After</li></ul>');

	Indenting.a(OrderedListItemWithNestedChild).enablesState('outdent').andGives('<ol><li style="list-style-type: none;"><ol><li>Item1</li><li>Nested</li></ol></li></ol>');
	Indenting.a(UnorderedListItemWithNestedChild).enablesState('outdent').andGives('<ul><li style="list-style-type: none;"><ul><li>Item1</li><li>Nested</li></ul></li></ul>');

	Indenting.a(OrderedListWithAdjacentNestedLists).enablesState('outdent').andGives('<ol><li style="list-style-type: none;"><ol><li>Item 1</li><li>Item 2</li><li>Item 3</li></ol></li></ol>');
	Indenting.a(UnorderedListWithAdjacentNestedLists).enablesState('outdent').andGives('<ul><li style="list-style-type: none;"><ul><li>Item 1</li><li>Item 2</li><li>Item 3</li></ul></li></ul>');

	Indenting.a(OrderedListItemWithNestedAlphaList).gives('<ol><li style="list-style-type: none;"><ol><li>Item</li></ol><ol style="list-style-type: lower-alpha;"><li>Nested</li></ol></li></ol>');

	Indenting.a(OrderedLowerAlphaListItem).enablesState('outdent').andGives('<ol style="list-style-type: lower-alpha;"><li>Item 1<ol style="list-style-type: lower-alpha;"><li>Item 2</li></ol></li></ol>');
	Indenting.a(UnorderedSquareListItem).enablesState('outdent').andGives('<ul style="list-style-type: square;"><li>Item 1<ul style="list-style-type: square;"><li>Item 2</li></ul></li></ul>');
	queue.done();
});

asyncTest('Collapsed Selection - Outdent Actions', function() {
	Outdenting.a(NonEmptyParagraph).disablesState('outdent').andGives('<p>Test</p>');
	Outdenting.a(NonEmptyHeading).disablesState('outdent').andGives('<h1>Test</h1>');
	Outdenting.a(ParagraphWithMarginLeft).enablesState('outdent').andGives('<p style="margin-left: 30px;">Test</p>');
	Outdenting.a(ParagraphWithPaddingLeft).enablesState('outdent').andGives('<p style="margin-left: 30px;">Test</p>');
	Outdenting.a(ParagraphWithMarginAndPaddingLeft).gives('<p style="margin-left: 90px;">Test</p>');

	Outdenting.a(EmptyOrderedListItem).disablesState('outdent').andGives(EmptyOLConvertedToP);
	Outdenting.a(EmptyUnorderedListItem).disablesState('outdent').andGives(EmptyULConvertedToP);
	Outdenting.a(NonEmptyOrderedListItem).disablesState('outdent').andGives(NonEmptyOLConvertedToP);
	Outdenting.a(NonEmptyUnorderedListItem).disablesState('outdent').andGives(NonEmptyULConvertedToP);
	
	Outdenting.a(NestedEmptyOrderedListItem).enablesState('outdent').andGives('<ol><li>Before</li><li>&nbsp;</li><li>After</li></ol>');
	Outdenting.a(NestedEmptyUnorderedListItem).enablesState('outdent').andGives('<ul><li>Before</li><li>&nbsp;</li><li>After</li></ul>');
	Outdenting.a(NestedNonEmptyOrderedListItem).enablesState('outdent').andGives('<ol><li>Before</li><li>Test</li><li>After</li></ol>');
	Outdenting.a(NestedNonEmptyUnorderedListItem).enablesState('outdent').andGives('<ul><li>Before</li><li>Test</li><li>After</li></ul>');

	Outdenting.a(OrderedListItemWithNestedChild).disablesState('outdent').andGives('<p>Item1</p><ol><li style="list-style-type: none;"><ol><li>Nested</li></ol></li></ol>');
	Outdenting.a(UnorderedListItemWithNestedChild).disablesState('outdent').andGives('<p>Item1</p><ul><li style="list-style-type: none;"><ul><li>Nested</li></ul></li></ul>');

	Outdenting.a(NestedOrderedListWithMultipleItems).enablesState('outdent').andGives('<ol><li>Before</li><li>Item1<ol><li>Item2</li></ol></li></ol>');
	Outdenting.a(NestedUnorderedListWithMultipleItems).enablesState('outdent').andGives('<ul><li>Before</li><li>Item1<ul><li>Item2</li></ul></li></ul>');

	Outdenting.a(OrderedListItemWithMargin).enablesState('outdent').andGives('<ol><li style="margin-left: 30px;">Test</li></ol>');
	Outdenting.a(UnorderedListItemWithMargin).enablesState('outdent').andGives('<ul><li style="margin-left: 30px;">Test</li></ul>');

	Outdenting.a(CenteredListItem).enablesState('outdent').andGives('<ul><li style="text-align: left;">Item1</li><li>Item2</li></ul>');
	Outdenting.a(ItemInCenteredList).enablesState('outdent').andGives('<ul style="text-align: center;"><li style="text-align: left;">Item1</li><li>Item2</li></ul>');
	Outdenting.a(RightAlignedListItem).enablesState('outdent').andGives('<ul><li style="text-align: left;">Item1</li><li>Item2</li></ul>');
	Outdenting.a(ItemInRightAlignedList).enablesState('outdent').andGives('<ul style="text-align: right;"><li style="text-align: left;">Item1</li><li>Item2</li></ul>');
	queue.done();
});

asyncTest('Type Tab in List', function() {
	editor.setContent('<ol><li>Test</li></ol>');
	setSelection('li', 0);
	checkIfKeystrokeFiresAction('\t', false, 'Indent', true);
});

asyncTest('Type Shift-Tab in List', function() {
	editor.setContent('<ol><li>Test</li></ol>');
	setSelection('li', 0);
	checkIfKeystrokeFiresAction('\t', true, 'Outdent', true);
});

function checkIfKeystrokeFiresAction(keystroke, shift, actionName, expected) {
	expect(1);
	var actionFired = false;
	function listener(ed, e) {
		if (e == actionName) {
			actionFired = true;
			return true;
		}
	}
	editor.onBeforeExecCommand.add(listener);
	
	fakeKeyPressAction(keystroke, shift)(function() {
		equal(actionFired, expected, actionName + ' command triggered?');
		editor.onBeforeExecCommand.remove(listener);
		QUnit.start();
	}, editor.getWin());
}

asyncTest('Expanded Selection, List Types - Indent Action', function() {
	Indenting.a(SingleLiOlSelection).enablesState('Outdent').andGives('<ol><li style="list-style-type: none;"><ol><li>Item 1</li></ol></li></ol>');
	Indenting.a(MultiLiOlSelection).enablesState('Outdent').andGives('<ol><li style="list-style-type: none;"><ol><li>Item 1</li><li>Item 2</li></ol></li></ol>');
	Indenting.a(SingleLiUlSelection).enablesState('Outdent').andGives('<ul><li style="list-style-type: none;"><ul><li>Item 1</li></ul></li></ul>');
	Indenting.a(MultiLiUlSelection).enablesState('Outdent').andGives('<ul><li style="list-style-type: none;"><ul><li>Item 1</li><li>Item 2</li></ul></li></ul>');

	Indenting.a(IndentedOlInOlCorrectSelection).enablesState('Outdent').andGives('<ol><li style="list-style-type: none;"><ol><li>Item 1<ol><li>Indented</li></ol></li></ol></li></ol>');
	Indenting.a(IndentedOlInOlIncorrectSelection).enablesState('Outdent').andGives('<ol><li style="list-style-type: none;"><ol><li>Item 1<ol><li>Indented</li></ol></li></ol></li></ol>');

	// TODO: Selection only in indented list.
	
	Indenting.a(IndentedUlInUlCorrectSelection).enablesState('Outdent').andGives('<ul><li style="list-style-type: none;"><ul><li>Item 1<ul><li>Indented</li></ul></li></ul></li></ul>');
	Indenting.a(IndentedUlInUlIncorrectSelection).enablesState('Outdent').andGives('<ul><li style="list-style-type: none;"><ul><li>Item 1<ul><li>Indented</li></ul></li></ul></li></ul>');

	Indenting.a(ParagraphBeforeOlSelection).enablesState('Outdent').andGives('<p style="margin-left: 30px;">Before</p><ol><li style="list-style-type: none;"><ol><li>Item 1</li></ol></li></ol>');
	Indenting.a(ParagraphBeforeUlSelection).enablesState('Outdent').andGives('<p style="margin-left: 30px;">Before</p><ul><li style="list-style-type: none;"><ul><li>Item 1</li></ul></li></ul>');
	
	Indenting.a(ParagraphAfterOlSelection).enablesState('Outdent').andGives('<ol><li style="list-style-type: none;"><ol><li>Item 1</li></ol></li></ol><p style="margin-left: 30px;">After</p>');
	Indenting.a(ParagraphAfterUlSelection).enablesState('Outdent').andGives('<ul><li style="list-style-type: none;"><ul><li>Item 1</li></ul></li></ul><p style="margin-left: 30px;">After</p>');

	
	Indenting.a(ParagraphBeforeAndAfterOlSelection).enablesState('Outdent').andGives('<p style="margin-left: 30px;">Before</p><ol><li style="list-style-type: none;"><ol><li>Item 1</li></ol></li></ol><p id="after" style="margin-left: 30px;">After</p>');
	Indenting.a(ParagraphBeforeAndAfterUlSelection).enablesState('Outdent').andGives('<p style="margin-left: 30px;">Before</p><ul><li style="list-style-type: none;"><ul><li>Item 1</li></ul></li></ul><p id="after" style="margin-left: 30px;">After</p>');
	queue.done();
});

asyncTest('Expanded Selection, List Types - Outdent Action', function() {
	Outdenting.a(SingleLiOlSelection).disablesState('Outdent').andGives('<p>Item 1</p>');
	Outdenting.a(MultiLiOlSelection).disablesState('Outdent').andGives('<p>Item 1</p><p>Item 2</p>');
	Outdenting.a(SingleLiUlSelection).disablesState('Outdent').andGives('<p>Item 1</p>');
	Outdenting.a(MultiLiUlSelection).disablesState('Outdent').andGives('<p>Item 1</p><p>Item 2</p>');

	Outdenting.a(IndentedOlInOlCorrectSelection).disablesState('Outdent').andGives('<p>Item 1</p><ol><li>Indented</li></ol>');
	Outdenting.a(IndentedOlInOlIncorrectSelection).disablesState('Outdent').andGives('<p>Item 1</p><ol><li>Indented</li></ol>');

	// TODO: Selection only in indented list.
	
	Outdenting.a(IndentedUlInUlCorrectSelection).disablesState('Outdent').andGives('<p>Item 1</p><ul><li>Indented</li></ul>');
	Outdenting.a(IndentedUlInUlIncorrectSelection).disablesState('Outdent').andGives('<p>Item 1</p><ul><li>Indented</li></ul>');

	Outdenting.a(MultiNestedLiOlSelection).enablesState('Outdent').andGives('<ol><li>Item 1</li><li>Item 2</li></ol>');

	Outdenting.a(ParagraphBeforeOlSelection).disablesState('Outdent').andGives('<p>Before</p><p>Item 1</p>');
	Outdenting.a(ParagraphBeforeUlSelection).disablesState('Outdent').andGives('<p>Before</p><p>Item 1</p>');
	
	Outdenting.a(ParagraphAfterOlSelection).disablesState('Outdent').andGives('<p>Item 1</p><p>After</p>');
	Outdenting.a(ParagraphAfterUlSelection).disablesState('Outdent').andGives('<p>Item 1</p><p>After</p>');

	
	Outdenting.a(ParagraphBeforeAndAfterOlSelection).disablesState('Outdent').andGives('<p>Before</p><p>Item 1</p><p id="after">After</p>');
	Outdenting.a(ParagraphBeforeAndAfterUlSelection).disablesState('Outdent').andGives('<p>Before</p><p>Item 1</p><p id="after">After</p>');
	queue.done();
});
var initTinyFunction = function(){
	tinymce.init({
		mode : "exact",
		elements : "elm1",
		theme : "advanced",
		cleanup: true,
		// Turn this off because we want the list actions to create the right DOM structure from the start.
		fix_list_elements: false,
		plugins : 'lists',
		add_unload_trigger : false,
		apply_source_formatting : 0,
		init_instance_callback : function(ed) {
			editor = ed;

			ed.onNodeChange.addToTop(function() {
				return false;
			});
		}
	});
};
</script>
</head>
<body>
	<h1 id="qunit-header">List Indenting and Outdenting Tests</h1>
	<h2 id="qunit-banner"></h2>
	<div id="qunit-testrunner-toolbar"></div>
	<h2 id="qunit-userAgent"></h2>
	<ol id="qunit-tests"></ol>
	<div id="content">
		<textarea id="elm1" name="elm1"></textarea>
	</div>
	<p><input type="text" id="state"><input type="button" value="Load state" onclick="loadState();"></p>
	<script type="text/javascript" language="JavaScript" src="jsrobot/robot.js"></script>
	<script>
	initWhenTinyAndRobotAreReady(initTinyFunction);

	function loadState() {
		window[document.getElementById('state').value]();
		editor.focus();
	}
	</script>
</body>
</html>
tinymce/plugins/lists/tests/lists_general.html000060400000130556152456167170015742 0ustar00<!DOCTYPE html>
<html>

<head>
	<title>List General Tests</title>
	<meta http-equiv="X-UA-Compatible" content="IE=edge" />
	<link rel="stylesheet" href="http://code.jquery.com/qunit/qunit-1.14.0.css" type="text/css" />
	<script src="http://code.jquery.com/qunit/qunit-1.14.0.js"></script>
	<script src="../../../../../../../../tinymce-muon-retina/tests/qunit/connector.js"></script>
	<script type="text/javascript" src="../../../../../../../../tinymce-muon-retina/tests/qunit/runner.js"></script>
	<script type="text/javascript" src="../../../../../../../../tinymce-muon-retina/tests/js/utils.js"></script>
	<script type="text/javascript" src="../../../tinymce.js"></script>
	<script type="text/javascript" src="../../../../../../../../tinymce-muon-retina/tests/js/dsl/dsl.js"></script>
	<script type="text/javascript" src="../../../../../../../../tinymce-muon-retina/tests/js/dsl/states.js"></script>
	<script type="text/javascript" src="../../../../../../../../tinymce-muon-retina/tests/js/lists/actions.js"></script>
	<script type="text/javascript" src="../plugin.js"></script>
	<script>
		var editor, rng;

		QUnit.config.reorder = false;
		QUnit.config.autostart = false;

		var ENTER = 0xA;
		var TAB = 0x9;
		var BACKSPACE = 0x8;
		var ZERO_SIZED_NBSP = "\uFEFF";
		var LEFT = 0x26;

		module('Lists - General', {
			autostart: false,
			teardown: function () {
				editor.settings.forced_root_block = 'p';
			}
		});

		function trimBrs(html) {
			return html.toLowerCase().replace(/<br[^>]*>|[\r\n]+/gi, '');
		}

		function execCommand(cmd) {
			//if (editor.editorCommands.hasCustomCommand(cmd)) {
			editor.execCommand(cmd);
			//}
		}

		test('Apply UL list to single P', function () {
			editor.getBody().innerHTML = trimBrs(
				'<p>a</p>'
			);

			editor.focus();
			Utils.setSelection('p', 0);
			execCommand('InsertUnorderedList');

			equal(editor.getContent(), '<ul><li>a</li></ul>');
			equal(editor.selection.getNode().nodeName, 'LI');
		});

		test('Apply UL list to single empty P', function () {
			editor.getBody().innerHTML = trimBrs(
				'<p><br></p>'
			);

			editor.focus();
			Utils.setSelection('p', 0);
			execCommand('InsertUnorderedList');

			equal(trimBrs(editor.getContent({ format: 'raw' })), '<ul><li></li></ul>');
			equal(editor.selection.getNode().nodeName, 'LI');
		});

		test('Apply UL list to multiple Ps', function () {
			editor.getBody().innerHTML = trimBrs(
				'<p>a</p>' +
				'<p>b</p>' +
				'<p>c</p>'
			);

			editor.focus();
			Utils.setSelection('p', 0, 'p:last', 0);
			execCommand('InsertUnorderedList');

			equal(editor.getContent(),
				'<ul>' +
				'<li>a</li>' +
				'<li>b</li>' +
				'<li>c</li>' +
				'</ul>'
			);
			equal(editor.selection.getStart().nodeName, 'LI');
		});

		test('Apply OL list to single P', function () {
			editor.getBody().innerHTML = trimBrs(
				'<p>a</p>'
			);

			editor.focus();
			Utils.setSelection('p', 0);
			execCommand('InsertOrderedList');

			equal(editor.getContent(), '<ol><li>a</li></ol>');
			equal(editor.selection.getNode().nodeName, 'LI');
		});

		test('Apply OL list to single empty P', function () {
			editor.getBody().innerHTML = trimBrs(
				'<p><br></p>'
			);

			editor.focus();
			Utils.setSelection('p', 0);
			execCommand('InsertOrderedList');

			equal(trimBrs(editor.getContent({ format: 'raw' })), '<ol><li></li></ol>');
			equal(editor.selection.getNode().nodeName, 'LI');
		});

		test('Apply OL list to multiple Ps', function () {
			editor.getBody().innerHTML = trimBrs(
				'<p>a</p>' +
				'<p>b</p>' +
				'<p>c</p>'
			);

			editor.focus();
			Utils.setSelection('p', 0, 'p:last', 0);
			execCommand('InsertOrderedList');

			equal(editor.getContent(),
				'<ol>' +
				'<li>a</li>' +
				'<li>b</li>' +
				'<li>c</li>' +
				'</ol>'
			);
			equal(editor.selection.getStart().nodeName, 'LI');
		});

		test('Apply OL to UL list', function () {
			editor.getBody().innerHTML = trimBrs(
				'<ul>' +
				'<li>a</li>' +
				'<li>b</li>' +
				'<li>c</li>' +
				'</ul>'
			);

			editor.focus();
			Utils.setSelection('li', 0, 'li:last', 0);
			execCommand('InsertOrderedList');

			equal(editor.getContent(),
				'<ol>' +
				'<li>a</li>' +
				'<li>b</li>' +
				'<li>c</li>' +
				'</ol>'
			);
			equal(editor.selection.getStart().nodeName, 'LI');
		});

		test('Apply OL to UL list with collapsed selection', function () {
			editor.getBody().innerHTML = trimBrs(
				'<ul>' +
				'<li>a</li>' +
				'<li>b</li>' +
				'<li>c</li>' +
				'</ul>'
			);

			editor.focus();
			Utils.setSelection('li:nth-child(2)');
			execCommand('InsertOrderedList');

			equal(editor.getContent(),
				'<ol>' +
				'<li>a</li>' +
				'<li>b</li>' +
				'<li>c</li>' +
				'</ol>'
			);
			equal(editor.selection.getStart().nodeName, 'LI');
		});

		test('Apply UL to OL list', function () {
			editor.getBody().innerHTML = trimBrs(
				'<ol>' +
				'<li>a</li>' +
				'<li>b</li>' +
				'<li>c</li>' +
				'</ol>'
			);

			editor.focus();
			Utils.setSelection('li', 0, 'li:last', 0);
			execCommand('InsertUnorderedList');

			equal(editor.getContent(),
				'<ul>' +
				'<li>a</li>' +
				'<li>b</li>' +
				'<li>c</li>' +
				'</ul>'
			);
			equal(editor.selection.getStart().nodeName, 'LI');
		});

		test('Apply UL to OL list collapsed selection', function () {
			editor.getBody().innerHTML = trimBrs(
				'<ol>' +
				'<li>a</li>' +
				'<li>b</li>' +
				'<li>c</li>' +
				'</ol>'
			);

			editor.focus();
			Utils.setSelection('li:nth-child(2)');
			execCommand('InsertUnorderedList');

			equal(editor.getContent(),
				'<ul>' +
				'<li>a</li>' +
				'<li>b</li>' +
				'<li>c</li>' +
				'</ul>'
			);
			equal(editor.selection.getStart().nodeName, 'LI');
		});

		test('Apply UL to P and merge with adjacent lists', function () {
			editor.getBody().innerHTML = trimBrs(
				'<ul>' +
				'<li>a</li>' +
				'</ul>' +
				'<p>b</p>' +
				'<ul>' +
				'<li>c</li>' +
				'</ul>'
			);

			editor.focus();
			Utils.setSelection('p', 1);
			execCommand('InsertUnorderedList');

			equal(editor.getContent(),
				'<ul>' +
				'<li>a</li>' +
				'<li>b</li>' +
				'<li>c</li>' +
				'</ul>'
			);
			equal(editor.selection.getStart().nodeName, 'LI');
		});

		test('Apply UL to OL and merge with adjacent lists', function () {
			editor.getBody().innerHTML = trimBrs(
				'<ul>' +
				'<li>a</li>' +
				'</ul>' +
				'<ol><li>b</li></ol>' +
				'<ul>' +
				'<li>c</li>' +
				'</ul>'
			);

			editor.focus();
			Utils.setSelection('ol li', 1);
			execCommand('InsertUnorderedList');

			equal(editor.getContent(),
				'<ul>' +
				'<li>a</li>' +
				'<li>b</li>' +
				'<li>c</li>' +
				'</ul>'
			);
			equal(editor.selection.getStart().nodeName, 'LI');
		});

		test('Apply OL to P and merge with adjacent lists', function () {
			editor.getBody().innerHTML = trimBrs(
				'<ol>' +
				'<li>a</li>' +
				'</ol>' +
				'<p>b</p>' +
				'<ol>' +
				'<li>c</li>' +
				'</ol>'
			);

			editor.focus();
			Utils.setSelection('p', 1);
			execCommand('InsertOrderedList');

			equal(editor.getContent(),
				'<ol>' +
				'<li>a</li>' +
				'<li>b</li>' +
				'<li>c</li>' +
				'</ol>'
			);
			equal(editor.selection.getStart().nodeName, 'LI');
		});

		test('Apply OL to UL and merge with adjacent lists', function () {
			editor.getBody().innerHTML = trimBrs(
				'<ol>' +
				'<li>a</li>' +
				'</ol>' +
				'<ul><li>b</li></ul>' +
				'<ol>' +
				'<li>c</li>' +
				'</ol>'
			);

			editor.focus();
			Utils.setSelection('ul li', 1);
			execCommand('InsertOrderedList');

			equal(editor.getContent(),
				'<ol>' +
				'<li>a</li>' +
				'<li>b</li>' +
				'<li>c</li>' +
				'</ol>'
			);
			equal(editor.selection.getStart().nodeName, 'LI');
		});

		test('Apply UL list to single text line', function () {
			editor.settings.forced_root_block = false;

			editor.getBody().innerHTML = (
				'a'
			);

			editor.focus();
			Utils.setSelection('body', 0);
			execCommand('InsertUnorderedList');

			equal(editor.getContent(), '<ul><li>a</li></ul>');
			equal(editor.selection.getNode().nodeName, 'LI');
		});

		test('Apply UL list to single text line with BR', function () {
			editor.settings.forced_root_block = false;

			editor.getBody().innerHTML = (
				'a<br>'
			);

			editor.focus();
			Utils.setSelection('body', 0);
			execCommand('InsertUnorderedList');

			equal(editor.getContent(), '<ul><li>a</li></ul>');
			equal(editor.selection.getNode().nodeName, 'LI');
		});

		test('Apply UL list to multiple lines separated by BR', function () {
			editor.settings.forced_root_block = false;

			editor.getBody().innerHTML = (
				'a<br>' +
				'b<br>' +
				'c'
			);

			editor.focus();
			editor.execCommand('SelectAll');
			execCommand('InsertUnorderedList');

			equal(editor.getContent(),
				'<ul>' +
				'<li>a</li>' +
				'<li>b</li>' +
				'<li>c</li>' +
				'</ul>'
			);
			equal(editor.selection.getStart().nodeName, 'LI');
		});

		test('Apply UL list to multiple lines separated by BR and with trailing BR', function () {
			editor.settings.forced_root_block = false;

			editor.getBody().innerHTML = (
				'a<br>' +
				'b<br>' +
				'c<br>'
			);

			editor.focus();
			editor.execCommand('SelectAll');
			execCommand('InsertUnorderedList');

			equal(editor.getContent(),
				'<ul>' +
				'<li>a</li>' +
				'<li>b</li>' +
				'<li>c</li>' +
				'</ul>'
			);
			equal(editor.selection.getStart().nodeName, 'LI');
		});

		test('Apply UL list to multiple formatted lines separated by BR', function () {
			editor.settings.forced_root_block = false;

			editor.getBody().innerHTML = (
				'<strong>a</strong><br>' +
				'<span>b</span><br>' +
				'<em>c</em>'
			);

			editor.focus();
			Utils.setSelection('strong', 0, 'em', 0);
			execCommand('InsertUnorderedList');

			equal(editor.getContent(),
				'<ul>' +
				'<li><strong>a</strong></li>' +
				'<li><span>b</span></li>' +
				'<li><em>c</em></li>' +
				'</ul>'
			);

			equal(editor.selection.getStart().nodeName, 'STRONG');
			equal(editor.selection.getEnd().nodeName, tinymce.isIE && tinymce.isIE < 9 ? 'LI' : 'EM'); // Old IE will return the end LI not a big deal
		});

		// Ignore on IE 7, 8 this is a known bug not worth fixing
		if (!tinymce.isIE || tinymce.isIE > 8) {
			test('Apply UL list to br line and text block line', function () {
				editor.settings.forced_root_block = false;

				editor.setContent(
					'a' +
					'<p>b</p>'
				);

				var rng = editor.dom.createRng();
				rng.setStart(editor.getBody().firstChild, 0);
				rng.setEnd(editor.getBody().lastChild.firstChild, 1);
				editor.selection.setRng(rng);
				execCommand('InsertUnorderedList');

				equal(editor.getContent(),
					'<ul>' +
					'<li>a</li>' +
					'<li>b</li>' +
					'</ul>'
				);

				equal(editor.selection.getStart().nodeName, 'LI');
				equal(editor.selection.getEnd().nodeName, 'LI');
			});
		}

		test('Apply UL list to text block line and br line', function () {
			editor.settings.forced_root_block = false;

			editor.getBody().innerHTML = (
				'<p>a</p>' +
				'b'
			);

			editor.focus();
			var rng = editor.dom.createRng();
			rng.setStart(editor.getBody().firstChild.firstChild, 0);
			rng.setEnd(editor.getBody().lastChild, 1);
			editor.selection.setRng(rng);
			execCommand('InsertUnorderedList');

			equal(editor.getContent(),
				'<ul>' +
				'<li>a</li>' +
				'<li>b</li>' +
				'</ul>'
			);

			equal(editor.selection.getStart().nodeName, 'LI');
			equal(editor.selection.getEnd().nodeName, 'LI');
		});

		test('Apply UL list to all BR lines (SelectAll)', function () {
			editor.settings.forced_root_block = false;

			editor.getBody().innerHTML = (
				'a<br>' +
				'b<br>' +
				'c<br>'
			);

			editor.focus();
			editor.execCommand('SelectAll');
			execCommand('InsertUnorderedList');

			equal(editor.getContent(),
				'<ul>' +
				'<li>a</li>' +
				'<li>b</li>' +
				'<li>c</li>' +
				'</ul>'
			);
		});

		test('Apply UL list to all P lines (SelectAll)', function () {
			editor.getBody().innerHTML = (
				'<p>a</p>' +
				'<p>b</p>' +
				'<p>c</p>'
			);

			editor.focus();
			editor.execCommand('SelectAll');
			execCommand('InsertUnorderedList');

			equal(editor.getContent(),
				'<ul>' +
				'<li>a</li>' +
				'<li>b</li>' +
				'<li>c</li>' +
				'</ul>'
			);
		});

		// Remove

		test('Remove UL at single LI', function () {
			editor.getBody().innerHTML = trimBrs(
				'<ul>' +
				'<li>a</li>' +
				'</ul>'
			);

			editor.focus();
			Utils.setSelection('li');
			execCommand('InsertUnorderedList');

			equal(editor.getContent(),
				'<p>a</p>'
			);
			equal(editor.selection.getStart().nodeName, 'P');
		});

		test('Remove UL at start LI', function () {
			editor.getBody().innerHTML = trimBrs(
				'<ul>' +
				'<li>a</li>' +
				'<li>b</li>' +
				'<li>c</li>' +
				'</ul>'
			);

			editor.focus();
			Utils.setSelection('li');
			execCommand('InsertUnorderedList');

			equal(editor.getContent(),
				'<p>a</p>' +
				'<ul>' +
				'<li>b</li>' +
				'<li>c</li>' +
				'</ul>'
			);
			equal(editor.selection.getStart().nodeName, 'P');
		});

		test('Remove UL at start empty LI', function () {
			editor.getBody().innerHTML = trimBrs(
				'<ul>' +
				'<li><br></li>' +
				'<li>b</li>' +
				'<li>c</li>' +
				'</ul>'
			);

			editor.focus();
			Utils.setSelection('li');
			execCommand('InsertUnorderedList');

			equal(editor.getContent(),
				'<p>\u00a0</p>' +
				'<ul>' +
				'<li>b</li>' +
				'<li>c</li>' +
				'</ul>'
			);
			equal(editor.selection.getNode().nodeName, 'P');
		});

		test('Remove UL at middle LI', function () {
			editor.getBody().innerHTML = trimBrs(
				'<ul>' +
				'<li>a</li>' +
				'<li>b</li>' +
				'<li>c</li>' +
				'</ul>'
			);

			editor.focus();
			Utils.setSelection('li:nth-child(2)', 1);
			execCommand('InsertUnorderedList');

			equal(editor.getContent(),
				'<ul>' +
				'<li>a</li>' +
				'</ul>' +
				'<p>b</p>' +
				'<ul>' +
				'<li>c</li>' +
				'</ul>'
			);
			equal(editor.selection.getStart().nodeName, 'P');
		});

		test('Remove UL at middle empty LI', function () {
			editor.getBody().innerHTML = trimBrs(
				'<ul>' +
				'<li>a</li>' +
				'<li><br></li>' +
				'<li>c</li>' +
				'</ul>'
			);

			editor.focus();
			Utils.setSelection('li:nth-child(2)', 0);
			execCommand('InsertUnorderedList');

			equal(editor.getContent(),
				'<ul>' +
				'<li>a</li>' +
				'</ul>' +
				'<p>\u00a0</p>' +
				'<ul>' +
				'<li>c</li>' +
				'</ul>'
			);
			equal(editor.selection.getNode().nodeName, 'P');
		});

		test('Remove UL at end LI', function () {
			editor.getBody().innerHTML = trimBrs(
				'<ul>' +
				'<li>a</li>' +
				'<li>b</li>' +
				'<li>c</li>' +
				'</ul>'
			);

			editor.focus();
			Utils.setSelection('li:last', 1);
			execCommand('InsertUnorderedList');

			equal(editor.getContent(),
				'<ul>' +
				'<li>a</li>' +
				'<li>b</li>' +
				'</ul>' +
				'<p>c</p>'
			);
			equal(editor.selection.getStart().nodeName, 'P');
		});

		test('Remove UL at end empty LI', function () {
			editor.getBody().innerHTML = trimBrs(
				'<ul>' +
				'<li>a</li>' +
				'<li>b</li>' +
				'<li><br></li>' +
				'</ul>'
			);

			editor.focus();
			Utils.setSelection('li:last', 0);
			execCommand('InsertUnorderedList');

			equal(editor.getContent(),
				'<ul>' +
				'<li>a</li>' +
				'<li>b</li>' +
				'</ul>' +
				'<p>\u00a0</p>'
			);
			equal(editor.selection.getNode().nodeName, 'P');
		});

		test('Remove UL at middle LI inside parent OL', function () {
			editor.getBody().innerHTML = trimBrs(
				'<ol>' +
				'<li>a</li>' +
				'<ul>' +
				'<li>b</li>' +
				'<li>c</li>' +
				'<li>d</li>' +
				'</ul>' +
				'<li>e</li>' +
				'</ol>'
			);

			editor.focus();
			Utils.setSelection('ul li:nth-child(2)', 1);
			execCommand('InsertUnorderedList');

			equal(editor.getContent(),
				'<ol>' +
				'<li>a</li>' +
				'<ul>' +
				'<li>b</li>' +
				'</ul>' +
				'</ol>' +
				'<p>c</p>' +
				'<ol>' +
				'<ul>' +
				'<li>d</li>' +
				'</ul>' +
				'<li>e</li>' +
				'</ol>'
			);
			equal(editor.selection.getStart().nodeName, 'P');
		});

		test('Remove UL at middle LI inside parent OL (html5)', function () {
			editor.getBody().innerHTML = trimBrs(
				'<ol>' +
				'<li>a' +
				'<ul>' +
				'<li>b</li>' +
				'<li>c</li>' +
				'<li>d</li>' +
				'</ul>' +
				'</li>' +
				'<li>e</li>' +
				'</ol>'
			);

			editor.focus();
			Utils.setSelection('ul li:nth-child(2)', 1);
			execCommand('InsertUnorderedList');

			equal(editor.getContent(),
				'<ol>' +
				'<li>a' +
				'<ul>' +
				'<li>b</li>' +
				'</ul>' +
				'</li>' +
				'</ol>' +
				'<p>c</p>' +
				'<ol>' +
				'<li>' +
				'<ul>' +
				'<li>d</li>' +
				'</ul>' +
				'</li>' +
				'<li>e</li>' +
				'</ol>'
			);
			equal(editor.selection.getStart().nodeName, 'P');
		});

		test('Remove UL with single LI in BR mode', function () {
			editor.settings.forced_root_block = false;

			editor.getBody().innerHTML = trimBrs(
				'<ul>' +
				'<li>a</li>' +
				'</ul>'
			);

			editor.focus();
			Utils.setSelection('li', 1);
			execCommand('InsertUnorderedList');

			equal(editor.getContent(),
				'a'
			);
			equal(editor.selection.getStart().nodeName, 'BODY');
		});

		test('Remove UL with multiple LI in BR mode', function () {
			editor.settings.forced_root_block = false;

			editor.getBody().innerHTML = trimBrs(
				'<ul>' +
				'<li>a</li>' +
				'<li>b</li>' +
				'</ul>'
			);

			editor.focus();
			Utils.setSelection('li:first', 1, 'li:last', 1);
			execCommand('InsertUnorderedList');

			equal(editor.getContent(),
				'a<br />' +
				'b'
			);
			equal(editor.selection.getStart().nodeName, 'BODY');
		});

		test('Remove empty UL between two textblocks', function () {
			editor.getBody().innerHTML = trimBrs(
				'<div>a</div>' +
				'<ul>' +
				'<li></li>' +
				'</ul>' +
				'<div>b</div>'
			);

			editor.focus();
			Utils.setSelection('li:first', 0);
			execCommand('InsertUnorderedList');

			equal(editor.getContent(),
				'<div>a</div>' +
				'<p>\u00a0</p>' +
				'<div>b</div>'
			);
			equal(editor.selection.getNode().nodeName, 'P');
		});

		test('Remove indented list with single item', function () {
			editor.getBody().innerHTML = trimBrs(
				'<ul>' +
				'<li>a' +
				'<ul>' +
				'<li>b</li>' +
				'</ul>' +
				'</li>' +
				'<li>c</li>' +
				'</ul>'
			);

			editor.focus();
			Utils.setSelection('li li', 0, 'li li', 1);
			execCommand('InsertUnorderedList');

			equal(editor.getContent(),
				'<ul>' +
				'<li>a</li>' +
				'</ul>' +
				'<p>b</p>' +
				'<ul>' +
				'<li>c</li>' +
				'</ul>'
			);
			equal(editor.selection.getNode().nodeName, 'P');
		});

		test('Remove indented list with multiple items', function () {
			editor.getBody().innerHTML = trimBrs(
				'<ul>' +
				'<li>a' +
				'<ul>' +
				'<li>b</li>' +
				'<li>c</li>' +
				'</ul>' +
				'</li>' +
				'<li>d</li>' +
				'</ul>'
			);

			editor.focus();
			Utils.setSelection('li li:first', 0, 'li li:last', 1);
			execCommand('InsertUnorderedList');

			equal(editor.getContent(),
				'<ul>' +
				'<li>a</li>' +
				'</ul>' +
				'<p>b</p>' +
				'<p>c</p>' +
				'<ul>' +
				'<li>d</li>' +
				'</ul>'
			);
			equal(editor.selection.getStart().firstChild.data, 'b');
			equal(editor.selection.getEnd().firstChild.data, 'c');
		});

		// Ignore on IE 7, 8 this is a known bug not worth fixing
		if (!tinymce.isIE || tinymce.isIE > 8) {
			test('Remove empty UL between two textblocks in BR mode', function () {
				editor.settings.forced_root_block = false;

				editor.getBody().innerHTML = trimBrs(
					'<div>a</div>' +
					'<ul>' +
					'<li></li>' +
					'</ul>' +
					'<div>b</div>'
				);

				editor.focus();
				Utils.setSelection('li:first', 0);
				execCommand('InsertUnorderedList');

				equal(editor.getContent(),
					'<div>a</div>' +
					'<br />' +
					'<div>b</div>'
				);
				equal(editor.selection.getStart().nodeName, 'BR');
			});
		}

		// Outdent

		test('Outdent inside LI in beginning of OL in LI', function () {
			editor.getBody().innerHTML = trimBrs(
				'<ol>' +
				'<li>a' +
				'<ol>' +
				'<li>b</li>' +
				'<li>c</li>' +
				'</ol>' +
				'</li>' +
				'</ol>'
			);

			editor.focus();
			Utils.setSelection('li li', 1);
			execCommand('Outdent');

			equal(editor.getContent(),
				'<ol>' +
				'<li>a</li>' +
				'<li>b' +
				'<ol>' +
				'<li>c</li>' +
				'</ol>' +
				'</li>' +
				'</ol>'
			);

			equal(editor.selection.getNode().nodeName, 'LI');
		});

		test('Outdent inside LI in middle of OL in LI', function () {
			editor.getBody().innerHTML = trimBrs(
				'<ol>' +
				'<li>a' +
				'<ol>' +
				'<li>b</li>' +
				'<li>c</li>' +
				'<li>d</li>' +
				'</ol>' +
				'</li>' +
				'</ol>'
			);

			editor.focus();
			Utils.setSelection('li li:nth-child(2)', 1);
			execCommand('Outdent');

			equal(editor.getContent(),
				'<ol>' +
				'<li>a' +
				'<ol>' +
				'<li>b</li>' +
				'</ol>' +
				'</li>' +
				'<li>c' +
				'<ol>' +
				'<li>d</li>' +
				'</ol>' +
				'</li>' +
				'</ol>'
			);

			equal(editor.selection.getNode().nodeName, 'LI');
		});

		test('Outdent inside LI in end of OL in LI', function () {
			editor.getBody().innerHTML = trimBrs(
				'<ol>' +
				'<li>a' +
				'<ol>' +
				'<li>b</li>' +
				'<li>c</li>' +
				'</ol>' +
				'</li>' +
				'</ol>'
			);

			editor.focus();
			Utils.setSelection('li li:last', 1);
			execCommand('Outdent');

			equal(editor.getContent(),
				'<ol>' +
				'<li>a' +
				'<ol>' +
				'<li>b</li>' +
				'</ol>' +
				'</li>' +
				'<li>c</li>' +
				'</ol>'
			);

			equal(editor.selection.getNode().nodeName, 'LI');
		});

		// Nested lists in OL elements

		test('Outdent inside LI in beginning of OL in OL', function () {
			editor.getBody().innerHTML = trimBrs(
				'<ol>' +
				'<li>a</li>' +
				'<ol>' +
				'<li>b</li>' +
				'<li>c</li>' +
				'</ol>' +
				'</ol>'
			);

			editor.focus();
			Utils.setSelection('ol ol li', 1);
			execCommand('Outdent');

			equal(editor.getContent(),
				'<ol>' +
				'<li>a</li>' +
				'<li>b</li>' +
				'<ol>' +
				'<li>c</li>' +
				'</ol>' +
				'</ol>'
			);

			equal(editor.selection.getNode().nodeName, 'LI');
		});

		test('Outdent inside LI in middle of OL in OL', function () {
			editor.getBody().innerHTML = trimBrs(
				'<ol>' +
				'<li>a</li>' +
				'<ol>' +
				'<li>b</li>' +
				'<li>c</li>' +
				'<li>d</li>' +
				'</ol>' +
				'</ol>'
			);

			editor.focus();
			Utils.setSelection('ol ol li:nth-child(2)', 1);
			execCommand('Outdent');

			equal(editor.getContent(),
				'<ol>' +
				'<li>a</li>' +
				'<ol>' +
				'<li>b</li>' +
				'</ol>' +
				'<li>c</li>' +
				'<ol>' +
				'<li>d</li>' +
				'</ol>' +
				'</ol>'
			);

			equal(editor.selection.getNode().nodeName, 'LI');
		});

		test('Outdent inside first/last LI in inner OL', function () {
			editor.getBody().innerHTML = trimBrs(
				'<ol>' +
				'<li>1' +
				'<ol>' +
				'<li>2</li>' +
				'<li>3</li>' +
				'</ol>' +
				'</li>' +
				'<li>4</li>' +
				'</ol>'
			);

			editor.focus();
			Utils.setSelection('ol ol li:nth-child(1)', 0, 'ol ol li:nth-child(2)', 1);
			execCommand('Outdent');

			equal(editor.getContent(),
				'<ol>' +
				'<li>1</li>' +
				'<li>2</li>' +
				'<li>3</li>' +
				'<li>4</li>' +
				'</ol>'
			);

			equal(editor.selection.getRng(true).startContainer.nodeValue, '2');
			equal(editor.selection.getRng(true).endContainer.nodeValue, '3');
		});

		test('Outdent inside first LI in inner OL where OL is single child of parent LI', function () {
			editor.getBody().innerHTML = trimBrs(
				'<ol>' +
				'<li>a</li>' +
				'<li>' +
				'<ol>' +
				'<li>b</li>' +
				'<li>c</li>' +
				'</ol>' +
				'</li>' +
				'</ol>'
			);

			editor.focus();
			Utils.setSelection('ol ol li:first', 0);
			execCommand('Outdent');

			equal(editor.getContent(),
				'<ol>' +
				'<li>a</li>' +
				'<li>b' +
				'<ol>' +
				'<li>c</li>' +
				'</ol>' +
				'</li>' +
				'</ol>'
			);

			equal(editor.selection.getNode().nodeName, 'LI');
		});

		test('Outdent inside LI in end of OL in OL', function () {
			editor.getBody().innerHTML = trimBrs(
				'<ol>' +
				'<li>a</li>' +
				'<ol>' +
				'<li>b</li>' +
				'<li>c</li>' +
				'</ol>' +
				'</ol>'
			);

			editor.focus();
			Utils.setSelection('ol ol li:last', 1);
			execCommand('Outdent');

			equal(editor.getContent(),
				'<ol>' +
				'<li>a</li>' +
				'<ol>' +
				'<li>b</li>' +
				'</ol>' +
				'<li>c</li>' +
				'</ol>'
			);

			equal(editor.selection.getNode().nodeName, 'LI');
		});

		test('Outdent inside only child LI in OL in OL', function () {
			editor.getBody().innerHTML = trimBrs(
				'<ol>' +
				'<li>a' +
				'<ol>' +
				'<li>b</li>' +
				'</ol>' +
				'</li>' +
				'</ol>'
			);

			editor.focus();
			Utils.setSelection('ol ol li', 0);
			execCommand('Outdent');

			equal(editor.getContent(),
				'<ol>' +
				'<li>a</li>' +
				'<li>b</li>' +
				'</ol>'
			);

			equal(editor.selection.getNode().nodeName, 'LI');
		});

		test('Outdent multiple LI in OL and nested OL', function () {
			editor.getBody().innerHTML = trimBrs(
				'<ol>' +
				'<li>a' +
				'<ol>' +
				'<li>b</li>' +
				'</ol>' +
				'</li>' +
				'</ol>'
			);

			editor.focus();
			Utils.setSelection('li', 0, 'li li', 1);
			execCommand('Outdent');

			equal(editor.getContent(),
				'<p>a</p>' +
				'<ol>' +
				'<li>b</li>' +
				'</ol>'
			);
		});

		// Indent

		test('Indent single LI in OL', function () {
			editor.getBody().innerHTML = trimBrs(
				'<ol>' +
				'<li>a</li>' +
				'</ol>'
			);

			editor.focus();
			Utils.setSelection('li', 0);
			execCommand('Indent');

			equal(editor.getContent(),
				'<ol>' +
				'<li>a</li>' +
				'</ol>'
			);

			equal(editor.selection.getNode().nodeName, 'LI');
		});

		test('Indent middle LI in OL', function () {
			editor.getBody().innerHTML = trimBrs(
				'<ol>' +
				'<li>a</li>' +
				'<li>b</li>' +
				'<li>c</li>' +
				'</ol>'
			);

			editor.focus();
			Utils.setSelection('li:nth-child(2)', 0);
			execCommand('Indent');

			equal(editor.getContent(),
				'<ol>' +
				'<li>a' +
				'<ol>' +
				'<li>b</li>' +
				'</ol>' +
				'</li>' +
				'<li>c</li>' +
				'</ol>'
			);

			equal(editor.selection.getNode().nodeName, 'LI');
		});

		test('Indent last LI in OL', function () {
			editor.getBody().innerHTML = trimBrs(
				'<ol>' +
				'<li>a</li>' +
				'<li>b</li>' +
				'</ol>'
			);

			editor.focus();
			Utils.setSelection('li:last', 0);
			execCommand('Indent');

			equal(editor.getContent(),
				'<ol>' +
				'<li>a' +
				'<ol>' +
				'<li>b</li>' +
				'</ol>' +
				'</li>' +
				'</ol>'
			);

			equal(editor.selection.getNode().nodeName, 'LI');
		});

		test('Indent last LI to same level as middle LI', function () {
			editor.getBody().innerHTML = trimBrs(
				'<ol>' +
				'<li>a' +
				'<ol>' +
				'<li>b</li>' +
				'</ol>' +
				'</li>' +
				'<li>c</li>' +
				'</ol>'
			);

			editor.focus();
			Utils.setSelection('li:last', 1);
			execCommand('Indent');

			equal(editor.getContent(),
				'<ol>' +
				'<li>a' +
				'<ol>' +
				'<li>b</li>' +
				'<li>c</li>' +
				'</ol>' +
				'</li>' +
				'</ol>'
			);

			equal(editor.selection.getNode().nodeName, 'LI');
		});

		test('Indent first LI and nested LI OL', function () {
			editor.getBody().innerHTML = trimBrs(
				'<ol>' +
				'<li>a' +
				'<ol>' +
				'<li>b</li>' +
				'</ol>' +
				'</li>' +
				'</ol>'
			);

			editor.focus();
			Utils.setSelection('li', 0, 'li li', 0);
			execCommand('Indent');

			equal(editor.getContent(),
				'<ol>' +
				'<li>a' +
				'<ol>' +
				'<li>b</li>' +
				'</ol>' +
				'</li>' +
				'</ol>'
			);

			equal(editor.selection.getNode().nodeName, 'LI');
		});

		test('Indent second LI to same level as nested LI', function () {
			editor.getBody().innerHTML = trimBrs(
				'<ul>' +
				'<li>a</li>' +
				'<li>b' +
				'<ul>' +
				'<li>c</li>' +
				'</ul>' +
				'</li>' +
				'</ul>'
			);

			editor.focus();
			Utils.setSelection('li:nth-child(2)', 0);
			execCommand('Indent');

			equal(editor.getContent(),
				'<ul>' +
				'<li>a' +
				'<ul>' +
				'<li>b</li>' +
				'<li>c</li>' +
				'</ul>' +
				'</li>' +
				'</ul>'
			);

			equal(editor.selection.getNode().nodeName, 'LI');
		});

		test('Indent second LI to same level as nested LI 2', function () {
			editor.getBody().innerHTML = trimBrs(
				'<ul>' +
				'<li>a' +
				'<ul>' +
				'<li>b</li>' +
				'</ul>' +
				'</li>' +
				'<li>cd' +
				'<ul>' +
				'<li>e</li>' +
				'</ul>' +
				'</li>' +
				'</ul>'
			);

			editor.focus();
			Utils.setSelection('li:nth-child(2)', 1);
			execCommand('Indent');

			equal(editor.getContent(),
				'<ul>' +
				'<li>a' +
				'<ul>' +
				'<li>b</li>' +
				'<li>cd</li>' +
				'<li>e</li>' +
				'</ul>' +
				'</li>' +
				'</ul>'
			);

			equal(editor.selection.getNode().nodeName, 'LI');
		});

		test('Indent second and third LI', function () {
			editor.getBody().innerHTML = trimBrs(
				'<ul>' +
				'<li>a</li>' +
				'<li>b</li>' +
				'<li>c</li>' +
				'</ul>'
			);

			editor.focus();
			Utils.setSelection('li:nth-child(2)', 0, 'li:last', 0);
			execCommand('Indent');

			equal(editor.getContent(),
				'<ul>' +
				'<li>a' +
				'<ul>' +
				'<li>b</li>' +
				'<li>c</li>' +
				'</ul>' +
				'</li>' +
				'</ul>'
			);
		});

		test('Indent second second li with next sibling to nested li', function () {
			editor.getBody().innerHTML = trimBrs(
				'<ul>' +
				'<li>a</li>' +
				'<li>b' +
				'<ul>' +
				'<li>c</li>' +
				'</ul>' +
				'</li>' +
				'<li>d</li>' +
				'</ul>'
			);

			editor.focus();
			Utils.setSelection('ul > li:nth-child(2)', 1);
			execCommand('Indent');

			equal(editor.getContent(),
				'<ul>' +
				'<li>a' +
				'<ul>' +
				'<li>b</li>' +
				'<li>c</li>' +
				'</ul>' +
				'</li>' +
				'<li>d</li>' +
				'</ul>'
			);
		});

		// Backspace

		test('Backspace at beginning of single LI in UL', function () {
			editor.getBody().innerHTML = trimBrs(
				'<ul>' +
				'<li>a</li>' +
				'</ul>'
			);

			console.log(editor);

			editor.focus();
			Utils.setSelection('li', 0);
			editor.plugins.lists.backspaceDelete();

			equal(editor.getContent(),
				'<p>a</p>'
			);

			equal(editor.selection.getNode().nodeName, 'P');
		});

		test('Backspace at beginning of first LI in UL', function () {
			editor.getBody().innerHTML = trimBrs(
				'<ul>' +
				'<li>a</li>' +
				'<li>b</li>' +
				'</ul>'
			);

			editor.focus();
			Utils.setSelection('li', 0);
			editor.plugins.lists.backspaceDelete();

			equal(editor.getContent(),
				'<p>a</p>' +
				'<ul>' +
				'<li>b</li>' +
				'</ul>'
			);

			equal(editor.selection.getNode().nodeName, 'P');
		});

		test('Backspace at beginning of middle LI in UL', function () {
			editor.getBody().innerHTML = trimBrs(
				'<ul>' +
				'<li>a</li>' +
				'<li>b</li>' +
				'<li>c</li>' +
				'</ul>'
			);

			editor.focus();
			Utils.setSelection('li:nth-child(2)', 0);
			editor.plugins.lists.backspaceDelete();

			equal(editor.getContent(),
				'<ul>' +
				'<li>ab</li>' +
				'<li>c</li>' +
				'</ul>'
			);

			equal(editor.selection.getNode().nodeName, 'LI');
		});

		test('Backspace at beginning of start LI in UL inside UL', function () {
			editor.getBody().innerHTML = trimBrs(
				'<ul>' +
				'<li>a' +
				'<ul>' +
				'<li>b</li>' +
				'<li>c</li>' +
				'</ul>' +
				'</li>' +
				'</ul>'
			);

			editor.focus();
			Utils.setSelection('li li', 0);
			editor.plugins.lists.backspaceDelete();

			equal(editor.getContent(),
				'<ul>' +
				'<li>ab' +
				'<ul>' +
				'<li>c</li>' +
				'</ul>' +
				'</li>' +
				'</ul>'
			);

			equal(editor.selection.getNode().nodeName, 'LI');
		});

		test('Backspace at beginning of middle LI in UL inside UL', function () {
			editor.getBody().innerHTML = trimBrs(
				'<ul>' +
				'<li>a' +
				'<ul>' +
				'<li>b</li>' +
				'<li>c</li>' +
				'<li>d</li>' +
				'</ul>' +
				'</li>' +
				'</ul>'
			);

			editor.focus();
			Utils.setSelection('li li:nth-child(2)', 0);
			editor.plugins.lists.backspaceDelete();

			equal(editor.getContent(),
				'<ul>' +
				'<li>a' +
				'<ul>' +
				'<li>bc</li>' +
				'<li>d</li>' +
				'</ul>' +
				'</li>' +
				'</ul>'
			);

			equal(editor.selection.getNode().nodeName, 'LI');
		});

		test('Backspace at beginning of single LI in UL', function () {
			editor.getBody().innerHTML = trimBrs(
				'<ul>' +
				'<li>a</li>' +
				'</ul>'
			);

			editor.focus();
			Utils.setSelection('li', 0);
			editor.plugins.lists.backspaceDelete();

			equal(editor.getContent(),
				'<p>a</p>'
			);

			equal(editor.selection.getNode().nodeName, 'P');
		});

		test('Backspace at beginning of first LI in UL', function () {
			editor.getBody().innerHTML = trimBrs(
				'<ul>' +
				'<li>a</li>' +
				'<li>b</li>' +
				'</ul>'
			);

			editor.focus();
			Utils.setSelection('li', 0);
			editor.plugins.lists.backspaceDelete();

			equal(editor.getContent(),
				'<p>a</p>' +
				'<ul>' +
				'<li>b</li>' +
				'</ul>'
			);

			equal(editor.selection.getNode().nodeName, 'P');
		});

		test('Backspace at beginning of middle LI in UL', function () {
			editor.getBody().innerHTML = trimBrs(
				'<ul>' +
				'<li>a</li>' +
				'<li>b</li>' +
				'<li>c</li>' +
				'</ul>'
			);

			editor.focus();
			Utils.setSelection('li:nth-child(2)', 0);
			editor.plugins.lists.backspaceDelete();

			equal(editor.getContent(),
				'<ul>' +
				'<li>ab</li>' +
				'<li>c</li>' +
				'</ul>'
			);

			equal(editor.selection.getNode().nodeName, 'LI');
		});

		test('Backspace at beginning of start LI in UL inside UL', function () {
			editor.getBody().innerHTML = trimBrs(
				'<ul>' +
				'<li>a' +
				'<ul>' +
				'<li>b</li>' +
				'<li>c</li>' +
				'</ul>' +
				'</li>' +
				'</ul>'
			);

			editor.focus();
			Utils.setSelection('li li', 0);
			editor.plugins.lists.backspaceDelete();

			equal(editor.getContent(),
				'<ul>' +
				'<li>ab' +
				'<ul>' +
				'<li>c</li>' +
				'</ul>' +
				'</li>' +
				'</ul>'
			);

			equal(editor.selection.getNode().nodeName, 'LI');
		});

		test('Backspace at beginning of middle LI in UL inside UL', function () {
			editor.getBody().innerHTML = trimBrs(
				'<ul>' +
				'<li>a' +
				'<ul>' +
				'<li>b</li>' +
				'<li>c</li>' +
				'<li>d</li>' +
				'</ul>' +
				'</li>' +
				'</ul>'
			);

			editor.focus();
			Utils.setSelection('li li:nth-child(2)', 0);
			editor.plugins.lists.backspaceDelete();

			equal(editor.getContent(),
				'<ul>' +
				'<li>a' +
				'<ul>' +
				'<li>bc</li>' +
				'<li>d</li>' +
				'</ul>' +
				'</li>' +
				'</ul>'
			);

			equal(editor.selection.getNode().nodeName, 'LI');
		});

		test('Backspace at beginning of LI with empty LI above in UL', function () {
			editor.getBody().innerHTML = trimBrs(
				'<ul>' +
				'<li>a</li>' +
				'<li></li>' +
				'<li>b</li>' +
				'</ul>'
			);

			editor.focus();
			Utils.setSelection('li:nth-child(3)', 0);
			editor.plugins.lists.backspaceDelete();

			equal(editor.getContent(),
				'<ul>' +
				'<li>a</li>' +
				'<li>b</li>' +
				'</ul>'
			);

			equal(editor.selection.getNode().innerHTML, 'b');
		});

		test('Backspace at beginning of LI with BR padded empty LI above in UL', function () {
			editor.getBody().innerHTML = (
				'<ul>' +
				'<li>a</li>' +
				'<li><br></li>' +
				'<li>b</li>' +
				'</ul>'
			);

			editor.focus();
			Utils.setSelection('li:nth-child(3)', 0);
			editor.plugins.lists.backspaceDelete();

			equal(editor.getContent(),
				'<ul>' +
				'<li>a</li>' +
				'<li>b</li>' +
				'</ul>'
			);

			equal(editor.selection.getNode().innerHTML, 'b');
		});

		test('Backspace at empty LI (IE)', function () {
			editor.getBody().innerHTML = (
				'<ul>' +
				'<li>a</li>' +
				'<li></li>' +
				'<li>b</li>' +
				'</ul>'
			);

			editor.focus();
			Utils.setSelection('li:nth-child(2)', 0);
			editor.plugins.lists.backspaceDelete();

			equal(editor.getContent(),
				'<ul>' +
				'<li>a</li>' +
				'<li>b</li>' +
				'</ul>'
			);

			equal(editor.selection.getNode().innerHTML, 'a');
		});

		test('Backspace at beginning of LI with empty LI with STRING and BR above in UL', function () {
			editor.getBody().innerHTML = (
				'<ul>' +
				'<li>a</li>' +
				'<li><strong><br></strong></li>' +
				'<li>b</li>' +
				'</ul>'
			);

			editor.focus();
			Utils.setSelection('li:nth-child(3)', 0);
			editor.plugins.lists.backspaceDelete();

			equal(editor.getContent(),
				'<ul>' +
				'<li>a</li>' +
				'<li>b</li>' +
				'</ul>'
			);

			equal(editor.selection.getNode().innerHTML, 'b');
		});

		test('Backspace at nested LI with adjacent BR', function () {
			editor.getBody().innerHTML = (
				'<ul>' +
				'<li>1' +
				'<ul>' +
				'<li>' +
				'<br>' +
				'<ul>' +
				'<li>2</li>' +
				'</ul>' +
				'</li>' +
				'</ul>' +
				'</li>' +
				'<li>3</li>' +
				'</ul>'
			);

			editor.focus();
			Utils.setSelection('ul ul ul li', 0);
			editor.plugins.lists.backspaceDelete();

			equal(editor.getContent(), '<ul><li>1<ul><li>2</li></ul></li><li>3</li></ul>');
			equal(editor.selection.getNode().nodeName, 'LI');
		});

		// Delete

		test('Delete at end of single LI in UL', function () {
			editor.getBody().innerHTML = trimBrs(
				'<ul>' +
				'<li>a</li>' +
				'</ul>'
			);

			editor.focus();
			Utils.setSelection('li', 1);
			editor.plugins.lists.backspaceDelete(true);

			equal(editor.getContent(),
				'<ul>' +
				'<li>a</li>' +
				'</ul>'
			);

			equal(editor.selection.getNode().nodeName, 'LI');
		});

		test('Delete at end of first LI in UL', function () {
			editor.getBody().innerHTML = trimBrs(
				'<ul>' +
				'<li>a</li>' +
				'<li>b</li>' +
				'</ul>'
			);

			editor.focus();
			Utils.setSelection('li', 1);
			editor.plugins.lists.backspaceDelete(true);

			equal(editor.getContent(),
				'<ul>' +
				'<li>ab</li>' +
				'</ul>'
			);

			equal(editor.selection.getNode().nodeName, 'LI');
		});

		test('Delete at end of middle LI in UL', function () {
			editor.getBody().innerHTML = trimBrs(
				'<ul>' +
				'<li>a</li>' +
				'<li>b</li>' +
				'<li>c</li>' +
				'</ul>'
			);

			editor.focus();
			Utils.setSelection('li:nth-child(2)', 1);
			editor.plugins.lists.backspaceDelete(true);

			equal(editor.getContent(),
				'<ul>' +
				'<li>a</li>' +
				'<li>bc</li>' +
				'</ul>'
			);

			equal(editor.selection.getNode().nodeName, 'LI');
		});

		test('Delete at end of start LI in UL inside UL', function () {
			editor.getBody().innerHTML = trimBrs(
				'<ul>' +
				'<li>a' +
				'<ul>' +
				'<li>b</li>' +
				'<li>c</li>' +
				'</ul>' +
				'</li>' +
				'</ul>'
			);

			editor.focus();
			Utils.setSelection('li li', 1);
			editor.plugins.lists.backspaceDelete(true);

			equal(editor.getContent(),
				'<ul>' +
				'<li>a' +
				'<ul>' +
				'<li>bc</li>' +
				'</ul>' +
				'</li>' +
				'</ul>'
			);

			equal(editor.selection.getNode().nodeName, 'LI');
		});

		test('Delete at end of middle LI in UL inside UL', function () {
			editor.getBody().innerHTML = trimBrs(
				'<ul>' +
				'<li>a' +
				'<ul>' +
				'<li>b</li>' +
				'<li>c</li>' +
				'<li>d</li>' +
				'</ul>' +
				'</li>' +
				'</ul>'
			);

			editor.focus();
			Utils.setSelection('li li:nth-child(2)', 1);
			editor.plugins.lists.backspaceDelete(true);

			equal(editor.getContent(),
				'<ul>' +
				'<li>a' +
				'<ul>' +
				'<li>b</li>' +
				'<li>cd</li>' +
				'</ul>' +
				'</li>' +
				'</ul>'
			);

			equal(editor.selection.getNode().nodeName, 'LI');
		});

		test('Delete at end of LI before empty LI', function () {
			editor.getBody().innerHTML = (
				'<ul>' +
				'<li>a</li>' +
				'<li></li>' +
				'<li>b</li>' +
				'</ul>'
			);

			editor.focus();
			Utils.setSelection('li', 1);
			editor.plugins.lists.backspaceDelete(true);

			equal(editor.getContent(),
				'<ul>' +
				'<li>a</li>' +
				'<li>b</li>' +
				'</ul>'
			);

			equal(editor.selection.getNode().innerHTML, 'a');
		});

		test('Delete at end of LI before BR padded empty LI', function () {
			editor.getBody().innerHTML = (
				'<ul>' +
				'<li>a</li>' +
				'<li><br></li>' +
				'<li>b</li>' +
				'</ul>'
			);

			editor.focus();
			Utils.setSelection('li', 1);
			editor.plugins.lists.backspaceDelete(true);

			equal(editor.getContent(),
				'<ul>' +
				'<li>a</li>' +
				'<li>b</li>' +
				'</ul>'
			);

			equal(editor.selection.getNode().innerHTML, 'a');
		});

		test('Delete at end of LI before empty LI with STRONG', function () {
			editor.getBody().innerHTML = (
				'<ul>' +
				'<li>a</li>' +
				'<li><strong><br></strong></li>' +
				'<li>b</li>' +
				'</ul>'
			);

			editor.focus();
			Utils.setSelection('li', 1);
			editor.plugins.lists.backspaceDelete(true);

			equal(editor.getContent(),
				'<ul>' +
				'<li>a</li>' +
				'<li>b</li>' +
				'</ul>'
			);

			equal(editor.selection.getNode().innerHTML, 'a');
		});

		test('Delete at nested LI with adjacent BR', function () {
			editor.getBody().innerHTML = (
				'<ul>' +
				'<li>1' +
				'<ul>' +
				'<li>' +
				'<br>' +
				'<ul>' +
				'<li>2</li>' +
				'</ul>' +
				'</li>' +
				'</ul>' +
				'</li>' +
				'<li>3</li>' +
				'</ul>'
			);

			editor.focus();
			editor.selection.setCursorLocation(editor.dom.select('ul ul li')[0], 0);
			editor.plugins.lists.backspaceDelete(true);

			equal(editor.getContent(), '<ul><li>1<ul><li>2</li></ul></li><li>3</li></ul>');
			equal(editor.selection.getNode().nodeName, 'LI');
		});

		test('Delete at BR before text in LI', function () {
			editor.getBody().innerHTML = (
				'<ul>' +
				'<li>1</li>' +
				'<li>2<br></li>' +
				'<li>3</li>' +
				'</ul>'
			);

			editor.focus();
			editor.selection.setCursorLocation(editor.dom.select('li')[1], 1);
			editor.plugins.lists.backspaceDelete(false);

			equal(editor.getContent(), '<ul><li>1</li><li>2</li><li>3</li></ul>');
			equal(editor.selection.getNode().nodeName, 'LI');
		});

		test('Apply DL list to multiple Ps', function () {
			editor.getBody().innerHTML = trimBrs(
				'<p>a</p>' +
				'<p>b</p>' +
				'<p>c</p>'
			);

			editor.focus();
			Utils.setSelection('p', 0, 'p:last', 0);
			execCommand('InsertDefinitionList');

			equal(editor.getContent(),
				'<dl>' +
				'<dt>a</dt>' +
				'<dt>b</dt>' +
				'<dt>c</dt>' +
				'</dl>'
			);
			equal(editor.selection.getStart().nodeName, 'DT');
		});

		test('Apply OL list to single P', function () {
			editor.getBody().innerHTML = trimBrs(
				'<p>a</p>'
			);

			editor.focus();
			Utils.setSelection('p', 0);
			execCommand('InsertDefinitionList');

			equal(editor.getContent(), '<dl><dt>a</dt></dl>');
			equal(editor.selection.getNode().nodeName, 'DT');
		});

		test('Apply DL to P and merge with adjacent lists', function () {
			editor.getBody().innerHTML = trimBrs(
				'<dl>' +
				'<dt>a</dt>' +
				'</dl>' +
				'<p>b</p>' +
				'<dl>' +
				'<dt>c</dt>' +
				'</dl>'
			);

			editor.focus();
			Utils.setSelection('p', 1);
			execCommand('InsertDefinitionList');

			equal(editor.getContent(),
				'<dl>' +
				'<dt>a</dt>' +
				'<dt>b</dt>' +
				'<dt>c</dt>' +
				'</dl>'
			);
			equal(editor.selection.getStart().nodeName, 'DT');
		});

		test('Indent single DT in DL', function () {
			editor.getBody().innerHTML = trimBrs(
				'<dl>' +
				'<dt>a</dt>' +
				'</dl>'
			);

			editor.focus();
			Utils.setSelection('dt', 0);
			execCommand('Indent');

			equal(editor.getContent(),
				'<dl>' +
				'<dd>a</dd>' +
				'</dl>'
			);

			equal(editor.selection.getNode().nodeName, 'DD');
		});

		test('Outdent single DD in DL', function () {
			editor.getBody().innerHTML = trimBrs(
				'<dl>' +
				'<dd>a</dd>' +
				'</dl>'
			);

			editor.focus();
			Utils.setSelection('dd', 1);
			execCommand('Outdent');

			equal(editor.getContent(),
				'<dl>' +
				'<dt>a</dt>' +
				'</dl>'
			);

			equal(editor.selection.getNode().nodeName, 'DT');
		});

		test('Apply UL list to single P', function () {
			editor.getBody().innerHTML = trimBrs(
				'<p>a</p>'
			);

			editor.focus();
			Utils.setSelection('p', 0);
			execCommand('InsertUnorderedList');

			equal(editor.getContent(), '<ul><li>a</li></ul>');
			equal(editor.selection.getNode().nodeName, 'LI');
		});

		tinymce.init({
			mode: "exact",
			elements: "elm1",
			theme: "advanced",
			cleanup: true,
			// Turn this off because we want the list actions to create the right DOM structure from the start.
			fix_list_elements: false,
			plugins: 'lists',
			add_unload_trigger: false,
			language_load: false,
			apply_source_formatting: 0,
			schema: 'html5',
			entities: 'raw',
			valid_elements: 'li,ol,ul,dl,dt,dd,em,strong,span,#p,div,br',
			valid_styles: {
				'*': 'color,font-size,font-family,background-color,font-weight,font-style,text-decoration,float,margin,margin-top,margin-right,margin-bottom,margin-left,display,position,top,left'
			},
			init_instance_callback: function (ed) {
				editor = ed;
				QUnit.start();
			},
			compress: {
				'css': true,
				'javascript': true
			}
		});
	</script>
</head>

<body>
	<h1 id="qunit-header">List General Tests</h1>
	<h2 id="qunit-banner"></h2>
	<div id="qunit-testrunner-toolbar"></div>
	<h2 id="qunit-userAgent"></h2>
	<ol id="qunit-tests"></ol>
	<div id="content">
		<textarea id="elm1" name="elm1"></textarea>
	</div>
	<div>
		<a href="javascript:alert(tinymce.EditorManager.get('elm1').getContent({format : 'raw'}));">[getRawContents]</a>
		<a href="javascript:alert(tinymce.EditorManager.get('elm1').getContent());">[getContents]</a>
	</div>
</body>

</html>tinymce/plugins/lists/tests/lists_forced_brs.html000060400000011040152456167170016417 0ustar00<!DOCTYPE html>
<html>
<head>
<title>Forced BRs List Tests</title>
<link rel="stylesheet" href="http://code.jquery.com/qunit/qunit-1.14.0.css" type="text/css" />
	<script src="http://code.jquery.com/qunit/qunit-1.14.0.js"></script>
	<script src="../../../../../../../../tinymce-muon-retina/tests/qunit/connector.js"></script>
	<script type="text/javascript" src="../../../../../../../../tinymce-muon-retina/tests/qunit/runner.js"></script>
	<script type="text/javascript" src="../../../../../../../../tinymce-muon-retina/tests/js/utils.js"></script>
	<script type="text/javascript" src="../../../tinymce.js"></script>
	<script type="text/javascript" src="../../../../../../../../tinymce-muon-retina/tests/js/dsl/dsl.js"></script>
	<script type="text/javascript" src="../../../../../../../../tinymce-muon-retina/tests/js/dsl/states.js"></script>
	<script type="text/javascript" src="../../../../../../../../tinymce-muon-retina/tests/js/lists/actions.js"></script>
	<script type="text/javascript" src="../plugin.js"></script>
<script>
QUnit.config.reorder = false;
QUnit.config.autostart = false;

module('Lists - Applying', {
	autostart: false,
	setup: function() {
		window.queue = new dsl.Queue();
	}
});

// Tests

asyncTest('Force BRs - Expanded Selection, List Types - Unordered List Action', function() {
	ApplyingUL.to(TextAfterUL).gives('<ul><li>Item</li><li>Test</li></ul>');
	ApplyingUL.to(TextAfterOL).gives('<ol><li>Item</li></ol><ul><li>Test</li></ul>');
	ApplyingUL.to(EmptyContent).gives('<ul><li></li></ul>');
	ApplyingUL.to(PlainText).gives('<ul><li>Test</li></ul>');
	ApplyingUL.to(SingleLiUlSelection).gives('<p>Item 1</p>');
	ApplyingUL.to(MultiLiUlSelection).gives('<p>Item 1<br />Item 2</p>');

	ApplyingUL.to(IndentedUlInUlCorrectSelection).gives('<p>Item 1<br />Indented</p>');
	ApplyingUL.to(IndentedUlInUlIncorrectSelection).gives('<p>Item 1<br />Indented</p>');
	queue.done();
});

asyncTest('Force BRs - Expanded Selection, List Types - Ordered List Action', function() {
	ApplyingOL.to(TextAfterOL).gives('<ol><li>Item</li><li>Test</li></ol>');
	ApplyingOL.to(TextAfterUL).gives('<ul><li>Item</li></ul><ol><li>Test</li></ol>');
	ApplyingOL.to(EmptyContent).gives('<ol><li></li></ol>');
	ApplyingOL.to(PlainText).gives('<ol><li>Test</li></ol>');
	ApplyingOL.to(SingleLiOlSelection).gives('<p>Item 1</p>');
	ApplyingOL.to(MultiLiOlSelection).gives('<p>Item 1<br />Item 2</p>');
	
	ApplyingOL.to(HeadingInOrderedListBeforeParagraph).gives('<h2>Test</h2><p>Content<br />After</p>');
	
	ApplyingOL.to(IndentedOlInOlCorrectSelection).gives('<p>Item 1<br />Indented</p>');
	ApplyingOL.to(IndentedOlInOlIncorrectSelection).gives('<p>Item 1<br />Indented</p>');
	queue.done();
});

asyncTest('Force BRs - Selection boundaries at BR', function() {
	ApplyingOL.to(SelectionEndingAtBr).gives('<ol><li>Item</li></ol><p>After</p>');
	ApplyingUL.to(SelectionEndingAtBr).gives('<ul><li>Item</li></ul><p>After</p>');
	if (!tinymce.isIE) {
		// This type of selection never occurs on IE.
		ApplyingOL.to(SelectionStartingAtBr).gives('<p>Before</p><ol><li>Item</li></ol>');
		ApplyingUL.to(SelectionStartingAtBr).gives('<p>Before</p><ul><li>Item</li></ul>');
	}
	queue.done();
});
var initTinyFunction = function(){
	tinymce.init({
		mode : "exact",
		elements : "elm1",
		theme : "advanced",
		cleanup: true,
		force_br_newlines: true,
		force_p_newlines: false,
		forced_root_block: '',
		// TODO: Determine why TinyMCE defaults to stripping out empty h1,ul,ol and li element since it results in invalid HTML (but only on FF3.0 and IE).
		extended_valid_elements: 'li[style],ul[type|compact|style],ol[type|compact|style],h1',
		// Turn this off because we want the list actions to create the right DOM structure from the start.
		fix_list_elements: false,
		plugins : 'lists',
		add_unload_trigger : false,
		apply_source_formatting : 0,
		init_instance_callback : function(ed) {
			editor = ed;

			ed.onNodeChange.addToTop(function() {
				return false;
			});
		}
	});
};
</script>
</head>
<body>
	<h1 id="qunit-header">Forced BRs List Tests</h1>
	<h2 id="qunit-banner"></h2>
	<div id="qunit-testrunner-toolbar"></div>
	<h2 id="qunit-userAgent"></h2>
	<ol id="qunit-tests"></ol>
	<div id="content">
		<textarea id="elm1" name="elm1"></textarea>
	</div>
	<p><input type="text" id="state"><input type="button" value="Load state" onclick="loadState();"></p>
	<script type="text/javascript" language="JavaScript" src="jsrobot/robot.js"></script>
	<script>
	initWhenTinyAndRobotAreReady(initTinyFunction);

	function loadState() {
		window[document.getElementById('state').value]();
		editor.focus();
	}
	</script>
</body>
</html>
tinymce/plugins/code/plugin.js000060400000061410152456167170012457 0ustar00/* jce - 2.9.99.2 | 2026-04-22 | https://www.joomlacontenteditor.net | Source: https://github.com/widgetfactory/jce | Copyright (C) 2006 - 2026 Ryan Demmer. All rights reserved | GNU/GPL Version 2 or later - http://www.gnu.org/licenses/gpl-2.0.html */
!function() {
    "use strict";
    const Node$1 = tinymce.html.Node;
    var Content = {
        createTextNode: function(value, raw) {
            var text = new Node$1("#text", 3);
            return text.raw = !1 !== raw, text.value = value, text;
        },
        createShortcodeHtml: function(editor, data, tag) {
            return data = (data = editor.dom.decode(data)).replace(/[\n\r]/gi, "<br />"), 
            editor.dom.createHTML(tag || "pre", {
                "data-mce-code": "shortcode"
            }, editor.dom.encode(data));
        },
        createHtml: function(editor, data, type, tag) {
            return type = type || "script", tag = tag || "pre", !1 !== editor.settings.code_use_blocks ? editor.dom.createHTML(tag, {
                "data-mce-code": type
            }, editor.dom.encode(data)) : (data = data.replace(/<br[^>]*?>/gi, "\n"), 
            editor.dom.createHTML("img", {
                src: "data:image/gif;base64,R0lGODlhAQABAIAAAAAAAP///yH5BAEAAAAALAAAAAABAAEAAAIBRAA7",
                "data-mce-resize": "false",
                "data-mce-code": type,
                "data-mce-type": "placeholder",
                "data-mce-value": escape(data)
            }));
        }
    };
    const each$1 = tinymce.each;
    let htmlSchema, shortEndedElements = {}, booleanAttributes = {};
    function canKeepCode(editor, type) {
        return !1 === editor.settings.validate || editor.getParam("code_allow_" + type);
    }
    function isXmlElement(editor, name) {
        return !htmlSchema.isValid(name) && !function(editor, name) {
            return editor = editor.settings.invalid_elements.split(","), -1 !== tinymce.inArray(editor, name);
        }(editor, name);
    }
    function isValid(editor, tag, attr) {
        return isXmlElement(editor, tag) || !1 === editor.settings.validate || editor.schema.isValid(tag, attr);
    }
    function validateXml(editor, xml) {
        return function sanitizeNode(editor, node) {
            var html = [];
            switch (node.nodeType) {
              case 1:
                var name, value, tagName = node.nodeName.toLowerCase();
                if (!isValid(editor, tagName)) return "";
                html.push("<", tagName);
                for ({
                    name,
                    value
                } of Array.from(node.attributes)) !isValid(editor, tagName, name) || !editor.settings.allow_event_attributes && name.startsWith("on") || (!booleanAttributes[name] || "" !== value && "true" !== value && value !== name ? html.push(" ", name, '="', editor.dom.encode(value, !0), '"') : html.push(" ", name));
                if (shortEndedElements[tagName]) "html5-strict" === editor.settings.schema ? html.push(">") : html.push(" />"); else {
                    html.push(">");
                    for (var child of Array.from(node.childNodes)) html.push(sanitizeNode(editor, child));
                    html.push("</", tagName, ">");
                }
                break;

              case 3:
                var text = node.nodeValue;
                html.push(text);
                break;

              case 5:
                html.push("<![CDATA[", editor.dom.encode(node.nodeValue, !0), "]]>");
                break;

              case 8:
                html.push("\x3c!--", editor.dom.encode(node.nodeValue, !0), "--\x3e");
            }
            return html.join("");
        }(editor, new DOMParser().parseFromString(xml, "text/xml").documentElement);
    }
    function processXML(editor, content) {
        return content.replace(/<([a-z0-9\-_\:\.]+)(?:[^>]*?)\/?>((?:[\s\S]*?)<\/\1>)?/gi, function(match, tag) {
            return ("svg" !== (tag = tag.toLowerCase()) || !1 !== editor.settings.code_allow_svg_in_xml) && ("math" !== tag || !1 !== editor.settings.code_allow_mathml_in_xml) && isXmlElement(editor, tag) ? (!1 !== editor.settings.code_validate_xml && (match = validateXml(editor, match)), 
            Content.createHtml(editor, match, "xml")) : match;
        });
    }
    function processShortcode(editor, html, tagName) {
        var attrPlaceholders;
        return -1 === html.indexOf("{") || "{" == html.charAt(0) && html.length < 3 || (-1 != html.indexOf("{/source}") && (html = function(editor, html) {
            return -1 === html.indexOf("{/source}") ? html : html.replace(/(?:(<(code|pre|samp|span)[^>]*(data-mce-type="code")?>|")?)\{source(.*?)\}([\s\S]+?)\{\/source\}/g, function(match) {
                return "<" === match.charAt(0) || '"' === match.charAt(0) ? match : (match = editor.dom.decode(match), 
                '<pre data-mce-code="shortcode" data-mce-label="sourcerer">' + editor.dom.encode(match) + "</pre>");
            });
        }(editor, html)), tagName = tagName || "span", attrPlaceholders = [], html = (html = html.replace(/=("[^"]*\{[^"]*"|'[^']*\{[^']*')/g, function(match) {
            return attrPlaceholders.push(match), '="__SHORTCODE_ATTR_' + (attrPlaceholders.length - 1) + '__"';
        })).replace(/(?:(<(code|pre|samp|span)[^>]*(data-mce-type="code")?>)?)(?:\{)([\w-]+)(.*?)(?:\/?\})(?:([\s\S]+?)\{\/\4\})?/g, function(match) {
            return "<" === match.charAt(0) ? match : Content.createShortcodeHtml(editor, match, tagName);
        }), attrPlaceholders.length && (html = html.replace(/="__SHORTCODE_ATTR_(\d+)__"/g, function(_match, index) {
            return attrPlaceholders[parseInt(index, 10)];
        }))), html;
    }
    function processPhp(editor, content) {
        return canKeepCode(editor, "php") ? (content = content.replace(/\="([^"]+?)"/g, function(_a, b) {
            return '="' + (b = b.replace(/<\?(php)?(.+?)\?>/gi, function(_x, _y, z) {
                return "__php_start__" + editor.dom.encode(z) + "__php_end__";
            })) + '"';
        }), (content = (content = /<textarea/.test(content) ? content.replace(/<textarea([^>]*)>([\s\S]*?)<\/textarea>/gi, function(_a, b, c) {
            return "<textarea" + b + ">" + (c = c.replace(/<\?(php)?(.+?)\?>/gi, function(_x, _y, z) {
                return "__php_start__" + editor.dom.encode(z) + "__php_end__";
            })) + "</textarea>";
        }) : content).replace(/<([^>]+)<\?(php)?(.+?)\?>([^>]*?)>/gi, function(_a, b, _c, d, e) {
            return " " !== b.charAt(b.length) && (b += " "), "<" + b + 'data-mce-php="' + d + '" ' + e + ">";
        })).replace(/<\?(php)?([\s\S]+?)\?>/gi, function(match) {
            return match = match.replace(/\n/g, "<br />"), Content.createHtml(editor, match, "php");
        })) : content.replace(/<\?(php)?([\s\S]*?)\?>/gi, "");
    }
    var Process = {
        init: function(editor) {
            htmlSchema = new tinymce.html.Schema({
                schema: "mixed",
                invalid_elements: editor.settings.invalid_elements
            }), each$1(editor.schema.getShortEndedElements(), function(_shortEnded, name) {
                shortEndedElements[name.toLowerCase()] = !0;
            }), each$1(editor.schema.getBoolAttrs(), function(_boolAttr, name) {
                booleanAttributes[name.toLowerCase()] = !0;
            });
        },
        processOnInsert: function(editor, value, _node) {
            return /\{.+\}/gi.test(value) && editor.settings.code_protect_shortcode && (value = processShortcode(editor, value, void 0)), 
            canKeepCode(editor, "custom_xml") && (value = processXML(editor, value)), 
            /<(\?|script|style)/.test(value) && (value = value.replace(/<(script|style)([^>]*?)>([\s\S]*?)<\/\1>/gi, function(match, type) {
                return canKeepCode(editor, type) ? (match = match.replace(/<br[^>]*?>/gi, "\n"), 
                Content.createHtml(editor, match, type)) : "";
            }), value = processPhp(editor, value)), value = /<link[^>]*?rel="stylesheet"[^>]*?>/gi.test(value) ? value.replace(/<link[^>]*?rel="stylesheet"[^>]*?>/gi, function(match) {
                return canKeepCode(editor, "style") ? Content.createHtml(editor, match, "link") : "";
            }) : value;
        },
        processShortcode: processShortcode,
        processPhp: processPhp,
        processXML: processXML
    };
    const each = tinymce.each, Node = tinymce.html.Node, VK = tinymce.VK, DomParser = tinymce.html.DomParser, Serializer = tinymce.html.Serializer;
    function isOnlyChild(node) {
        var child = node.parent.firstChild, count = 0;
        if (child) do {
            if (1 === child.type) {
                if (child.attributes.map["data-mce-type"] || child.attributes.map["data-mce-bogus"]) continue;
                if (child === node) continue;
                count++;
            }
            8 === child.type && count++, 3 !== child.type || /^[ \t\r\n]*$/.test(child.value) || count++;
        } while (child = child.next);
        return 0 === count;
    }
    tinymce.PluginManager.add("code", function(editor, url) {
        function canKeepCode(type) {
            return !1 === editor.settings.validate || !!editor.getParam("code_allow_" + type);
        }
        var blockElements = [], inlineElements = [], code_blocks = !1 !== editor.settings.code_use_blocks;
        function handleEnterInPre(ed, node, before) {
            var node = ed.dom.getParents(node, blockElements.join(",")), newBlockName = ed.settings.forced_root_block || "p", node = (!1 === ed.settings.force_block_newlines && (newBlockName = "br"), 
            node.shift());
            node !== ed.getBody() && (newBlockName = ed.dom.create(newBlockName, {}, "\xa0"), 
            before ? node.parentNode.insertBefore(newBlockName, node) : ed.dom.insertAfter(newBlockName, node), 
            (before = ed.selection.getRng()).setStart(newBlockName, 0), before.setEnd(newBlockName, 0), 
            ed.selection.setRng(before), ed.selection.scrollIntoView(newBlockName));
        }
        editor.settings.code_allow_script && (editor.settings.allow_script_urls = !0), 
        editor.addCommand("InsertShortCode", function(ui, html) {
            return editor.settings.code_protect_shortcode && (html = Process.processShortcode(editor, html, "pre"), 
            tinymce.is(html)) && editor.execCommand("mceReplaceContent", !1, html), 
            !1;
        }), editor.onKeyDown.add(function(ed, e) {
            var node;
            if (e.keyCode == VK.ENTER) {
                if ("PRE" === (node = ed.selection.getNode()).nodeName && "shortcode" === node.getAttribute("data-mce-code")) return void (e.shiftKey || (ed.execCommand("InsertLineBreak", !1, e), 
                e.preventDefault()));
                "SPAN" === node.nodeName && node.getAttribute("data-mce-code") && (handleEnterInPre(ed, node), 
                e.preventDefault());
            }
            e.keyCode == VK.UP && e.altKey && "PRE" == (node = ed.selection.getNode()).nodeName && (handleEnterInPre(ed, node, !0), 
            e.preventDefault()), 9 != e.keyCode || VK.metaKeyPressed(e) || "PRE" === (node = ed.selection.getNode()).nodeName && node.getAttribute("data-mce-code") && (ed.selection.setContent("\t", {
                no_events: !0
            }), e.preventDefault()), e.keyCode !== VK.BACKSPACE && e.keyCode !== VK.DELETE || "SPAN" === (node = ed.selection.getNode()).nodeName && node.getAttribute("data-mce-code") && "placeholder" === node.getAttribute("data-mce-type") && (ed.undoManager.add(), 
            ed.dom.remove(node), e.preventDefault());
        }), editor.onPreInit.add(function() {
            function isCodePlaceholder(node) {
                return "SPAN" === node.nodeName && node.getAttribute("data-mce-code") && "placeholder" == node.getAttribute("data-mce-type");
            }
            Process.init(editor), editor.dom.bind(editor.getDoc(), "keyup click", function(e) {
                var node = e.target, sel = editor.selection.getNode();
                editor.dom.removeClass(editor.dom.select(".mce-item-selected"), "mce-item-selected"), 
                node === editor.getBody() && isCodePlaceholder(sel) ? sel.parentNode !== node || sel.nextSibling || editor.dom.insertAfter(editor.dom.create("br", {
                    "data-mce-bogus": 1
                }), sel) : isCodePlaceholder(node) && (e.preventDefault(), e.stopImmediatePropagation(), 
                editor.selection.select(node), window.setTimeout(function() {
                    editor.dom.addClass(node, "mce-item-selected");
                }, 10), e.preventDefault());
            });
            function onSetContent() {
                each(editor.dom.select("pre[data-mce-code]", editor.getBody()), function(elm) {
                    var clone, clonedElm, elm = editor.dom.getParent(elm, "p");
                    elm && ((clonedElm = (clone = elm.cloneNode(!0)).querySelector("[data-mce-code]")) && clone.removeChild(clonedElm), 
                    editor.dom.isEmpty(clone)) && editor.dom.remove(elm, 1);
                });
            }
            var ctrl = editor.controlManager.get("formatselect");
            ctrl && each([ "script", "style", "php", "shortcode", "xml" ], function(key) {
                var title = editor.getLang("code." + key, key);
                if ("shortcode" === key && editor.settings.code_protect_shortcode) return ctrl.add(title, key, {
                    class: "mce-code-" + key
                }), editor.formatter.register("shortcode", {
                    block: "pre",
                    attributes: {
                        "data-mce-code": "shortcode"
                    }
                }), !0;
                "xml" === key && (editor.settings.code_allow_xml = !!editor.settings.code_allow_custom_xml), 
                canKeepCode(key) && code_blocks && (ctrl.add(title, key, {
                    class: "mce-code-" + key
                }), editor.formatter.register(key, {
                    block: "pre",
                    attributes: {
                        "data-mce-code": key
                    },
                    onformat: function(elm) {
                        each(editor.dom.select("br", elm), function(br) {
                            editor.dom.replace(editor.dom.doc.createTextNode("\n"), br);
                        });
                    }
                }));
            }), each(editor.schema.getBlockElements(), function(_block, blockName) {
                blockElements.push(blockName);
            }), each(editor.schema.getTextInlineElements(), function(_inline, name) {
                inlineElements.push(name);
            }), editor.settings.code_protect_shortcode && (editor.textpattern.addPattern({
                start: "{",
                end: "}",
                cmd: "InsertShortCode",
                remove: !0
            }), editor.textpattern.addPattern({
                start: " {",
                end: "}",
                format: "inline-shortcode",
                remove: !1
            })), editor.formatter.register("inline-shortcode", {
                inline: "span",
                attributes: {
                    "data-mce-code": "shortcode"
                }
            }), editor.selection.onBeforeSetContent.addToTop(function(sel, o) {
                sel = sel.getNode();
                sel && "PRE" === sel.nodeName || (o.content = Process.processOnInsert(editor, o.content, sel));
            });
            editor.onSetContent.add(onSetContent), editor.selection.onSetContent.add(onSetContent), 
            editor.parser.addNodeFilter("script,style,link", function(nodes) {
                for (var i = nodes.length; i--; ) {
                    var node, text, value, placeholder, parent = (node = nodes[i]).parent;
                    parent && "pre" === parent.name || ("link" == node.name && "stylesheet" != node.attr("rel") ? node.remove() : (node.attr("data-mce-fragment", null), 
                    node.firstChild && (node.firstChild.value = node.firstChild.value.replace(/<span([^>]+)>([\s\S]+?)<\/span>/gi, function(match, attr, content) {
                        return -1 === attr.indexOf("data-mce-code") ? match : editor.dom.decode(content);
                    })), code_blocks ? (value = new Serializer({
                        validate: !1
                    }).serialize(node), value = tinymce.trim(value), (parent = new Node("pre", 1)).attr({
                        "data-mce-code": node.name
                    }), text = Content.createTextNode(value, !1), parent.append(text), 
                    node.replace(parent)) : (value = "", node.firstChild && (value = tinymce.trim(node.firstChild.value)), 
                    placeholder = Node.create("img", {
                        src: "data:image/gif;base64,R0lGODlhAQABAIAAAAAAAP///yH5BAEAAAAALAAAAAABAAEAAAIBRAA7",
                        "data-mce-code": node.name,
                        "data-mce-type": "placeholder",
                        "data-mce-resize": "false",
                        title: editor.dom.encode(value)
                    }), each(node.attributes, function(attr) {
                        placeholder.attr("data-mce-p-" + attr.name, attr.value);
                    }), value && placeholder.attr("data-mce-value", escape(value)), 
                    node.replace(placeholder))));
                }
            }), editor.parser.addAttributeFilter("data-mce-code", function(nodes, name) {
                var node, i = nodes.length;
                function isBlockNode(node) {
                    return -1 != tinymce.inArray(blockElements, node.name);
                }
                for (;i--; ) {
                    var type, parent = (node = nodes[i]).parent;
                    "placeholder" == node.attr("data-mce-type") || "shortcode" !== (type = node.attr(name)) && "php" !== type || ((type = node.firstChild.value) && (node.firstChild.value = type.replace(/<br[\s\/]*>/g, "\n")), 
                    parent && (parent.attr(name) ? node.unwrap() : ("body" !== parent.name && !isOnlyChild(node) && function(node) {
                        return "span" == node.name && (node.next && ("#text" == node.next.type || !isBlockNode(node.next)) || node.prev && ("#text" == node.prev.type || !isBlockNode(node.prev)) || !(!node.parent || isBlockNode(node.parent)));
                    }(node) || (node.name = "pre", node.parent && function(node) {
                        return -1 != tinymce.inArray(inlineElements, node.name);
                    }(node.parent) && (node.name = "span"), "pre" == node.name && parent && "p" == parent.name && isOnlyChild(node) && parent.parent && parent.replace(node)), 
                    "span" == node.name && node === parent.lastChild && (type = Content.createTextNode("\xa0"), 
                    parent.append(type)))));
                }
            }), editor.serializer.addAttributeFilter("data-mce-code", function(nodes, name) {
                var i = nodes.length;
                for (;i--; ) {
                    var node, root_block = !1, type = (node = nodes[i]).attr(name);
                    if ("img" === node.name) {
                        var key, elm = new Node(type, 1);
                        for (key in node.attributes.map) {
                            var val = node.attributes.map[key];
                            -1 !== key.indexOf("data-mce-p-") ? key = key.substr(11) : val = null, 
                            elm.attr(key, val);
                        }
                        var imgValue = node.attr("data-mce-value");
                        imgValue && (imgValue = Content.createTextNode(unescape(imgValue)), 
                        "php" == type || "shortcode" == type ? elm = imgValue : elm.append(imgValue)), 
                        node.replace(elm);
                    } else if (node.isEmpty() && node.remove(), "xml" !== type) {
                        "script" !== type && "style" !== type || (root_block = type);
                        var childVal, parser, child = node.firstChild, imgValue = node.clone(!0), text = "";
                        if (child) do {} while (/(shortcode|php)/.test(node.attr("data-mce-code")) || (childVal = "br" == child.name ? "\n" : child.value) && (text += childVal), 
                        child = child.next);
                        text && (imgValue.empty(), parser = new DomParser({
                            validate: !1
                        }), "script" !== type && "style" !== type || parser.addNodeFilter(type, function(items, filterName) {
                            for (var n = items.length; n--; ) {
                                var item = items[n];
                                each(item.attributes, function(attr) {
                                    return !attr || 0 === attr.name.indexOf("data-") && -1 === attr.name.indexOf("data-mce-") || void (!1 === editor.schema.isValid(filterName, attr.name) && item.attr(attr.name, null));
                                });
                            }
                        }), parser = parser.parse(text, {
                            forced_root_block: root_block
                        }), imgValue.append(parser)), node.replace(imgValue), "shortcode" === type && "pre" === imgValue.name && (root_block = Content.createTextNode("\n"), 
                        imgValue.append(root_block), imgValue.unwrap());
                    }
                }
            }), editor.onContextMenu.addToTop(function(ed, e) {
                ed = ed.selection.getNode();
                if (ed && ed.hasAttribute("data-mce-code")) return !1;
            });
        }), editor.onInit.add(function() {
            editor.theme && editor.theme.onResolveName && editor.theme.onResolveName.add(function(theme, o) {
                var node = o.node;
                node.getAttribute("data-mce-code") && (o.name = node.getAttribute("data-mce-code"));
            });
        });
        editor.onMouseDown.add(function(ed, e) {
            var clientY, top, right, pre = e.target.closest("pre[data-mce-code]");
            pre && ({
                clientX: e,
                clientY
            } = e, {
                top,
                right
            } = pre.getBoundingClientRect(), right - 32 <= e) && clientY <= top + 32 && ed.dom.toggleClass(pre, "mce-code-toggle");
        }), editor.onBeforeSetContent.addToTop(function(ed, o) {
            editor.settings.code_protect_shortcode && -1 === o.content.indexOf('data-mce-code="shortcode"') && (o.content = Process.processShortcode(editor, o.content)), 
            canKeepCode("custom_xml") && o.content && o.load && (o.content = Process.processXML(editor, o.content)), 
            /<(\?|script|style|link)/.test(o.content) && (canKeepCode("script") || (o.content = o.content.replace(/<script[^>]*>([\s\S]*?)<\/script>/gi, "")), 
            canKeepCode("style") || (o.content = o.content.replace(/<style[^>]*>([\s\S]*?)<\/style>/gi, ""), 
            o.content = o.content.replace(/<link[^>]*?rel="stylesheet"[^>]*?>/gi, "")), 
            o.content = Process.processPhp(editor, o.content));
        }), editor.onPostProcess.add(function(ed, o) {
            o.get && (/(data-mce-php|__php_start__)/.test(o.content) && (o.content = o.content.replace(/({source})?__php_start__(.*?)__php_end__/g, function(match, pre, code) {
                return (pre || "") + "<?php" + ed.dom.decode(code) + "?>";
            }), o.content = o.content.replace(/<textarea([^>]*)>([\s\S]*?)<\/textarea>/gi, function(a, b, c) {
                return "<textarea" + b + ">" + (c = /&lt;\?php/.test(c) ? ed.dom.decode(c) : c) + "</textarea>";
            }), o.content = o.content.replace(/data-mce-php="([^"]+?)"/g, function(a, b) {
                return "<?php" + ed.dom.decode(b) + "?>";
            })), editor.settings.code_protect_shortcode && (o.content = o.content.replace(/\{([\s\S]+?)\}/gi, function(match, content) {
                return "{" + ed.dom.decode(content) + "}";
            }), o.content = o.content.replace(/\{source([^\}]*?)\}([\s\S]+?)\{\/source\}/gi, function(match, start, content) {
                return "{source" + start + "}" + ed.dom.decode(content) + "{/source}";
            }), o.content = o.content.replace(/\{([\w-]+)(.*?)\}([\s\S]+)\{\/\1\}/gi, function(match, start, attr, content) {
                return "{" + start + attr + "}" + ed.dom.decode(content) + "{/" + start + "}";
            })), o.content = o.content.replace(/<(pre|span)([^>]+?)>([\s\S]*?)<\/\1>/gi, function(match, tag, attr, content) {
                if (-1 === attr.indexOf("data-mce-code")) return match;
                content = tinymce.trim(content);
                attr = ed.dom.create("div", {}, match).firstChild.getAttribute("data-mce-code");
                return "script" != attr && (content = content.replace(/<br[^>]*?>/gi, "\n")), 
                content = ed.dom.decode(content), "php" == attr && (content = content.replace(/<\?(php)?/gi, "").replace(/\?>/g, ""), 
                content = "<?php\n" + tinymce.trim(content) + "\n?>"), content;
            }), o.content = o.content.replace(/<!--mce:protected ([\s\S]+?)-->/gi, function(match, content) {
                return unescape(content);
            }));
        });
    });
}();tinymce/plugins/format/plugin.js000060400000015677152456167170013053 0ustar00/* jce - 2.9.99.2 | 2026-04-22 | https://www.joomlacontenteditor.net | Source: https://github.com/widgetfactory/jce | Copyright (C) 2006 - 2026 Ryan Demmer. All rights reserved | GNU/GPL Version 2 or later - http://www.gnu.org/licenses/gpl-2.0.html */
!function() {
    var VK = tinymce.VK, each = tinymce.each, blocks = [];
    tinymce.PluginManager.add("format", function(ed, url) {
        var keyCode;
        function clearBlocks(e) {
            var n = ed.selection.getNode(), tag = (tag = ed.getParam("forced_root_block", "p")) || (ed.getParam("force_block_newlines") ? "p" : "br"), p = ed.dom.getParents(n, blocks.join(","));
            (p = ed.dom.getParent(n, "td,th") ? ed.dom.getParents(n, "td,th,tr,tfoot,thead,table") : p) && 1 < p.length && (e.preventDefault(), 
            (n = p[p.length - 1]) !== ed.getBody()) && (p = ed.dom.create(tag, {}, "\xa0"), 
            e.keyCode === VK.ENTER || e.keyCode === VK.DOWN ? ed.dom.insertAfter(p, n) : ed.dom.insertBefore(p, n), 
            ed.selection.select(p), ed.selection.collapse(1));
        }
        ed.addButton("italic", {
            title: "advanced.italic_desc",
            onclick: function(e) {
                e.preventDefault(), ed.focus(), e.shiftKey ? ed.formatter.toggle("italic-i") : ed.formatter.toggle("italic"), 
                ed.undoManager.add();
            }
        }), ed.addShortcut("meta+shift+i", "italic.desc", function() {
            ed.formatter.apply("italic-i");
        }), ed.addCommand("mceSoftHyphen", function() {
            ed.execCommand("mceInsertContent", !1, ed.plugins.visualchars && ed.plugins.visualchars.state ? '<span data-mce-bogus="1" class="mce-item-hidden mce-item-shy">&shy;</span>' : "&shy;");
        }), keyCode = 189, tinymce.isGecko && (keyCode = 173), ed.addShortcut("ctrl+shift+" + keyCode, "softhyphen.desc", "mceSoftHyphen"), 
        ed.onPreInit.add(function(ed) {
            each(ed.schema.getBlockElements(), function(v, k) {
                if (/\W/.test(k)) return !0;
                blocks.push(k.toLowerCase());
            }), ed.formatter.register("aside", {
                block: "aside",
                remove: "all",
                wrapper: !0
            }), ed.formatter.register("p", {
                block: "p",
                remove: "all"
            }), ed.formatter.register("div", {
                block: "div",
                onmatch: !!ed.settings.forced_root_block && function() {
                    return !1;
                }
            }), ed.formatter.register("div_container", {
                block: "div",
                wrapper: !0,
                onmatch: !!ed.settings.forced_root_block && function() {
                    return !1;
                }
            }), ed.formatter.register("span", {
                inline: "span",
                remove: "all",
                onmatch: function() {
                    return !1;
                }
            }), ed.formatter.register("section", {
                block: "section",
                remove: "all",
                wrapper: !0,
                merge_siblings: !1
            }), ed.formatter.register("article", {
                block: "article",
                remove: "all",
                wrapper: !0,
                merge_siblings: !1
            }), ed.formatter.register("footer", {
                block: "footer",
                remove: "all",
                wrapper: !0,
                merge_siblings: !1
            }), ed.formatter.register("header", {
                block: "header",
                remove: "all",
                wrapper: !0,
                merge_siblings: !1
            }), ed.formatter.register("nav", {
                block: "nav",
                remove: "all",
                wrapper: !0,
                merge_siblings: !1
            }), ed.formatter.register("code", {
                inline: "code",
                remove: "all"
            }), ed.formatter.register("samp", {
                inline: "samp",
                remove: "all"
            }), ed.formatter.register("blockquote", {
                block: "blockquote",
                wrapper: 1,
                remove: "all",
                merge_siblings: !1
            }), ed.formatter.register("italic-i", {
                inline: "i",
                remove: "all"
            });
            var doc, head, values, custom_css = ed.getParam("custom_css", "");
            custom_css && (head = (doc = ed.getDoc()).getElementsByTagName("head")[0], 
            ed = ed.dom.create("style", {
                type: "text/css",
                id: "mceCustomStyles"
            }), values = [], each(custom_css.split(";"), function(value) {
                values.push(".mceContentBody " + value);
            }), ed.appendChild(doc.createTextNode(values.join(";"))), head.appendChild(ed));
        }), ed.settings.removeformat = [ {
            selector: "b,strong,em,i,font,u,strike,sub,sup,dfn,code,samp,kbd,var,cite,mark,q,footer",
            remove: "all",
            split: !0,
            expand: !1,
            block_expand: !0,
            deep: !0
        } ], ed.onKeyDown.add(function(ed, e) {
            e.keyCode !== VK.ENTER && e.keyCode !== VK.UP && e.keyCode !== VK.DOWN || !e.altKey || clearBlocks(e);
        }), ed.onKeyUp.addToTop(function(ed, e) {
            e.keyCode === VK.ENTER && "DIV" === (e = ed.selection.getNode()).nodeName && ed.settings.force_block_newlines && (!1 === ed.settings.keep_styles && ed.dom.removeAllAttribs(e), 
            ed.formatter.apply("p"));
        }), ed.onBeforeExecCommand.add(function(ed, cmd, ui, v, o) {
            var p, n = ed.selection.getNode();
            switch (cmd) {
              case "FormatBlock":
                if (!v) {
                    if (o.terminate = !0, n === ed.getBody()) return;
                    ed.undoManager.add(), (p = ed.dom.getParent(n, blocks.join(",")) || "") && (name = p.nodeName.toLowerCase(), 
                    ed.formatter.get(name)) && ed.formatter.remove(name);
                    var name = ed.controlManager.get("formatselect");
                    name && name.select(p);
                }
                "dl" === v && (ed.execCommand("InsertDefinitionList"), o.terminate = !0), 
                "dt" !== v && "dd" !== v || (n && !ed.dom.getParent(n, "dl") && ed.execCommand("InsertDefinitionList"), 
                "dt" === v && "DD" === n.nodeName && ed.dom.rename(n, "DT"), "dd" === v && "DT" === n.nodeName && ed.dom.rename(n, "DD"), 
                o.terminate = !0);
                break;

              case "RemoveFormat":
                v || ed.dom.isBlock(n) || (name = ed.controlManager.get("styleselect")) && name.selectedValue && ed.execCommand("mceToggleFormat", !1, name.selectedValue);
            }
        }), ed.onExecCommand.add(function(ed, cmd, ui, v, o) {
            var n = ed.selection.getNode();
            "mceToggleFormat" !== cmd || "dt" !== v && "dd" !== v || "DL" === n.nodeName && 0 === ed.dom.select("dt,dd", n).length && ed.formatter.remove("dl");
        });
    });
}();tinymce/plugins/cleanup/plugin.js000060400000014516152456167170013201 0ustar00/* jce - 2.9.99.2 | 2026-04-22 | https://www.joomlacontenteditor.net | Source: https://github.com/widgetfactory/jce | Copyright (C) 2006 - 2026 Ryan Demmer. All rights reserved | GNU/GPL Version 2 or later - http://www.gnu.org/licenses/gpl-2.0.html */
import split from "./src/utils/split";

import {
    TAGS,
    PADDED_RX
} from "./src/constants";

import createPadding from "./src/filters/padding";

import {
    processAttributes
} from "./src/filters/processAttributes";

import {
    convertFromGeshi,
    convertToGeshi
} from "./src/geshi";

var each = tinymce.each, Node = tinymce.html.Node;

tinymce.PluginManager.add("cleanup", function(ed, url) {
    !1 === ed.settings.verify_html && (ed.settings.validate = !1);
    var padding = createPadding(Node);
    ed.onPreInit.add(function() {
        var elements;
        ed.serializer.addAttributeFilter("data-mce-caret", function(nodes) {
            for (var i = nodes.length; i--; ) nodes[i].remove();
        }), !1 === ed.settings.remove_trailing_brs && ed.serializer.addAttributeFilter("data-mce-bogus", function(nodes) {
            for (var node, textNode, i = nodes.length; i--; ) "br" === (node = nodes[i]).name && (node.prev || node.next ? node.remove() : ((textNode = new Node("#text", 3)).value = "\xa0", 
            node.replace(textNode)));
        }), ed.serializer.addAttributeFilter("data-mce-tmp", function(nodes, name) {
            for (var i = nodes.length; i--; ) nodes[i].attr("data-mce-tmp", null);
        }), ed.parser.addAttributeFilter("data-mce-tmp", function(nodes, name) {
            for (var i = nodes.length; i--; ) nodes[i].attr("data-mce-tmp", null);
        }), !1 !== ed.settings.verify_html && (ed.settings.allow_event_attributes || each(ed.schema.elements, function(elm) {
            if (!elm.attributesOrder || 0 === elm.attributesOrder.length) return !0;
            each(elm.attributes, function(obj, name) {
                0 === name.indexOf("on") && (delete elm.attributes[name], elm.attributesOrder.splice(tinymce.inArray(elm, elm.attributesOrder, name), 1));
            });
        }), elements = ed.schema.elements, each(split("ol ul sub sup blockquote font table tbody tr strong b"), function(name) {
            elements[name] && (elements[name].removeEmpty = !1);
        }), ed.getParam("pad_empty_tags", !0) || each(elements, function(v, k) {
            v.paddEmpty && (v.paddEmpty = !1);
        }), ed.getParam("table_pad_empty_cells", !0) || (elements.th.paddEmpty = !1, 
        elements.td.paddEmpty = !1), each(elements, function(v, k) {
            if (0 === k.indexOf("mce:")) return !0;
            -1 === tinymce.inArray(TAGS, k) && ed.schema.addCustomElements(k);
        })), ed.parser.addNodeFilter("a,i,span,li", function(nodes, name) {
            padding.ensureEmptyInlineNodes(nodes, name);
        }), ed.serializer.addAttributeFilter("data-mce-empty", function(nodes) {
            padding.cleanupEmptyInlineNodes(nodes);
        });
    }), !1 === ed.settings.verify_html && ed.addCommand("mceCleanup", function() {
        var s = ed.settings, se = ed.selection, bm = se.getBookmark(), content = ed.getContent({
            cleanup: !0
        }), s = (s.verify_html = !0, new tinymce.html.Schema(s)), content = new tinymce.html.Serializer({
            validate: !0
        }, s).serialize(new tinymce.html.DomParser({
            validate: !0,
            allow_event_attributes: !!ed.settings.allow_event_attributes
        }, s).parse(content));
        ed.setContent(content, {
            cleanup: !0
        }), se.moveToBookmark(bm);
    }), ed.onBeforeSetContent.add(function(ed, o) {
        o.content = o.content.replace(/^<br>/, ""), o.content = convertFromGeshi(o.content), 
        o.content = padding.paddEmptyTags(o.content), o.content = processAttributes(ed, o.content);
    }), ed.onPostProcess.add(function(ed, o) {
        o.set && (o.content = convertFromGeshi(o.content)), o.get && (o.content = convertToGeshi(o.content), 
        o.content = o.content.replace(/<a([^>]*)class="jce(box|popup|lightbox|tooltip|_tooltip)"([^>]*)><\/a>/gi, ""), 
        o.content = o.content.replace(/<span class="jce(box|popup|lightbox|tooltip|_tooltip)">(.*?)<\/span>/gi, "$2"), 
        o.content = o.content.replace(/_mce_(src|href|style|coords|shape)="([^"]+)"\s*?/gi, ""), 
        !1 === ed.settings.validate && (o.content = o.content.replace(/<body([^>]*)>([\s\S]*)<\/body>/, "$2"), 
        ed.getParam("remove_tag_padding") || (o.content = o.content.replace(/<(p|h1|h2|h3|h4|h5|h6|th|td|pre|div|address|caption)\b([^>]*)><\/\1>/gi, "<$1$2>&nbsp;</$1>"))), 
        ed.getParam("table_pad_empty_cells", !0) || (o.content = o.content.replace(/<(th|td)([^>]*)>(&nbsp;|\u00a0)<\/\1>/gi, "<$1$2></$1>")), 
        o.content = o.content.replace(/<(a|i|span)([^>]+)>(&nbsp;|\u00a0)<\/\1>/gi, function(match, tag, attribs) {
            return attribs = attribs.replace('data-mce-empty="1"', ""), "<" + tag + " " + tinymce.trim(attribs) + "></" + tag + ">";
        }), o.content = o.content.replace(/<li data-mce-empty="1">(&nbsp;|\u00a0)<\/li>/gi, "<li></li>"), 
        ed.getParam("remove_div_padding") && (o.content = o.content.replace(/<div([^>]*)>(&nbsp;|\u00a0)<\/div>/g, "<div$1></div>")), 
        !1 === ed.getParam("pad_empty_tags", !0) && (o.content = o.content.replace(PADDED_RX, "<$1$2></$1>")), 
        ed.getParam("keep_nbsp", !0) && "raw" === ed.settings.entity_encoding && (o.content = o.content.replace(/\u00a0/g, "&nbsp;")), 
        o.content = o.content.replace(/(uk|v|ng|data)-([\w-]+)=""(\s|>)/gi, "$1-$2$3"), 
        ed.settings.padd_empty_editor && (o.content = o.content.replace(/^(<div>(&nbsp;|&#160;|\s|\u00a0|)<\/div>[\r\n]*|<br(\s*\/)?>[\r\n]*)$/, "")), 
        o.content = o.content.replace(/<hr(.*)class="system-pagebreak"(.*?)\/?>/gi, '<hr$1class="system-pagebreak"$2/>'), 
        o.content = o.content.replace(/<hr id="system-readmore"(.*?)>/gi, '<hr id="system-readmore" />'));
    }), ed.onSaveContent.add(function(ed, o) {
        var entities;
        ed.getParam("cleanup_pluginmode") && (entities = {
            "&#39;": "'",
            "&amp;": "&",
            "&quot;": '"',
            "&apos;": "'"
        }, o.content = o.content.replace(/&(#39|apos|amp|quot);/gi, function(a) {
            return entities[a];
        }));
    }), ed.addButton("cleanup", {
        title: "advanced.cleanup_desc",
        cmd: "mceCleanup"
    }), this.paddEmptyTags = padding.paddEmptyTags;
});tinymce/plugins/attributes/plugin.js000060400000024746152456167170013746 0ustar00/* jce - 2.9.99.2 | 2026-04-22 | https://www.joomlacontenteditor.net | Source: https://github.com/widgetfactory/jce | Copyright (C) 2006 - 2026 Ryan Demmer. All rights reserved | GNU/GPL Version 2 or later - http://www.gnu.org/licenses/gpl-2.0.html */
!function() {
    var languageValues = {
        Afrikaans: "af",
        Albanian: "sq",
        "Arabic (Algeria)": "ar-DZ",
        "Arabic (Bahrain)": "ar-BH",
        "Arabic (Egypt)": "ar-EG",
        "Arabic (Iraq)": "ar-IQ",
        "Arabic (Jordan)": "ar-JO",
        "Arabic (Kuwait)": "ar-KW",
        "Arabic (Lebanon)": "ar-LB",
        "Arabic (Libya)": "ar-LY",
        "Arabic (Morocco)": "ar-MA",
        "Arabic (Oman)": "ar-OM",
        "Arabic (Qatar)": "ar-QA",
        "Arabic (Saudi Arabia)": "ar-SA",
        "Arabic (Syria)": "ar-SY",
        "Arabic (Tunisia)": "ar-TN",
        "Arabic (U.A.E.)": "ar-AE",
        "Arabic (Yemen)": "ar-YE",
        Basque: "eu",
        Belarusian: "be",
        Bulgarian: "bg",
        Catalan: "ca",
        "Chinese (Hong Kong)": "zh-HK",
        "Chinese (PRC)": "zh-CN",
        "Chinese (Singapore)": "zh-SG",
        "Chinese (Taiwan)": "zh-TW",
        Croatian: "hr",
        Czech: "cs",
        Danish: "da",
        "Dutch (Belgium)": "nl-BE",
        "Dutch (Standard)": "nl",
        English: "en",
        "English (Australia)": "en-AU",
        "English (Belize)": "en-BZ",
        "English (Canada)": "en-CA",
        "English (Ireland)": "en-IE",
        "English (Jamaica)": "en-JM",
        "English (New Zealand)": "en-NZ",
        "English (South Africa)": "en-ZA",
        "English (Trinidad)": "en-TT",
        "English (United Kingdom)": "en-GB",
        "English (United States)": "en-US",
        Estonian: "et",
        Faeroese: "fo",
        Farsi: "fa",
        Finnish: "fi",
        "French (Belgium)": "fr-BE",
        "French (Canada)": "fr-CA",
        "French (Luxembourg)": "fr-LU",
        "French (Standard)": "fr",
        "French (Switzerland)": "fr-CH",
        "Gaelic (Scotland)": "gd",
        "German (Austria)": "de-AT",
        "German (Liechtenstein)": "de-LI",
        "German (Luxembourg)": "de-LU",
        "German (Standard)": "de",
        "German (Switzerland)": "de-CH",
        Greek: "el",
        Hebrew: "he",
        Hindi: "hi",
        Hungarian: "hu",
        Icelandic: "is",
        Indonesian: "id",
        Irish: "ga",
        "Italian (Standard)": "it",
        "Italian (Switzerland)": "it-CH",
        Japanese: "ja",
        Korean: "ko",
        "Korean (Johab)": "ko",
        Kurdish: "ku",
        Latvian: "lv",
        Lithuanian: "lt",
        "Macedonian (FYROM)": "mk",
        Malayalam: "ml",
        Malaysian: "ms",
        Maltese: "mt",
        Norwegian: "no",
        "Norwegian (Bokm\xe5l)": "nb",
        "Norwegian (Nynorsk)": "nn",
        Polish: "pl",
        "Portuguese (Brazil)": "pt-BR",
        "Portuguese (Portugal)": "pt",
        Punjabi: "pa",
        "Rhaeto-Romanic": "rm",
        Romanian: "ro",
        "Romanian (Republic of Moldova)": "ro-MD",
        Russian: "ru",
        "Russian (Republic of Moldova)": "ru-MD",
        Serbian: "sr",
        Slovak: "sk",
        Slovenian: "sl",
        Sorbian: "sb",
        "Spanish (Argentina)": "es-AR",
        "Spanish (Bolivia)": "es-BO",
        "Spanish (Chile)": "es-CL",
        "Spanish (Colombia)": "es-CO",
        "Spanish (Costa Rica)": "es-CR",
        "Spanish (Dominican Republic)": "es-DO",
        "Spanish (Ecuador)": "es-EC",
        "Spanish (El Salvador)": "es-SV",
        "Spanish (Guatemala)": "es-GT",
        "Spanish (Honduras)": "es-HN",
        "Spanish (Mexico)": "es-MX",
        "Spanish (Nicaragua)": "es-NI",
        "Spanish (Panama)": "es-PA",
        "Spanish (Paraguay)": "es-PY",
        "Spanish (Peru)": "es-PE",
        "Spanish (Puerto Rico)": "es-PR",
        "Spanish (Spain)": "es",
        "Spanish (Uruguay)": "es-UY",
        "Spanish (Venezuela)": "es-VE",
        Swedish: "sv",
        "Swedish (Finland)": "sv-FI",
        Thai: "th",
        Tsonga: "ts",
        Tswana: "tn",
        Turkish: "tr",
        Ukrainian: "ua",
        Urdu: "ur",
        Venda: "ve",
        Vietnamese: "vi",
        Welsh: "cy",
        Xhosa: "xh",
        Yiddish: "ji",
        Zulu: "zu"
    }, each = tinymce.each, extend = tinymce.extend;
    tinymce.PluginManager.add("attributes", function(ed, url) {
        function isRootNode(node) {
            return node == ed.dom.getRoot();
        }
        ed.onPreInit.add(function() {
            ed.formatter.register({
                attributes: {
                    inline: "span",
                    remove: "all",
                    onformat: function(elm, fmt, vars) {
                        each(vars, function(value, key) {
                            ed.dom.setAttrib(elm, key, value);
                        });
                    }
                }
            });
        }), ed.addButton("attribs", {
            title: "attributes.desc",
            onclick: function() {
                var mediaApi, cm = ed.controlManager, node = ed.selection.getNode(), nodeAttribs = function(node) {
                    var attribs = {};
                    if (node) for (var attrs = node.attributes, i = attrs.length - 1; 0 <= i; i--) {
                        var name = attrs[i].name;
                        "_" !== name.charAt(0) && -1 === name.indexOf("-mce-") && (attribs[name] = node.getAttribute(name));
                    }
                    return attribs;
                }(node = isRootNode(node = ed.dom.getParent(node, function(n) {
                    return "false" != n.getAttribute("contenteditable");
                }, ed.getBody())) ? null : node), attribsMap = {
                    id: "",
                    title: "",
                    class: "",
                    lang: "",
                    dir: ""
                }, custom = [], form = ((mediaApi = ed.plugins.media ? ed.plugins.media : mediaApi) && mediaApi.isMediaObject(node) && (nodeAttribs = mediaApi.getMediaData()), 
                each(nodeAttribs, function(value, name) {
                    if (name in attribsMap) "class" == name && (value = value.replace(/\bmce-\S+\s*/g, "").replace(/\s+$/, " ").trim()), 
                    attribsMap[name] = value; else {
                        var attr = {};
                        if ("_" === name.charAt(0) || -1 !== name.indexOf("-mce-")) return !0;
                        value && (0 == name.indexOf("on") && (value = ed.dom.getAttrib(node, "data-mce-" + name) || value), 
                        attr[name] = value, custom.push(attr));
                    }
                }), cm.createForm("attributes_form")), stylesList = (each([ "title", "id" ], function(name) {
                    form.add(cm.createTextBox("attributes_" + name, {
                        label: ed.getLang("attributes.label_" + name, name),
                        name: name
                    }));
                }), cm.createStylesBox("attributes_class", {
                    label: ed.getLang("attributes.label_class", "Classes"),
                    onselect: function() {},
                    name: "class"
                })), langList = (form.add(stylesList), cm.createListBox("attributes_lang", {
                    label: ed.getLang("attributes.label_lang", "Language"),
                    onselect: function(v) {},
                    name: "lang",
                    filter: !0
                })), dirList = (langList.add("--", ""), each(languageValues, function(value, name) {
                    langList.add(name, value);
                }), form.add(langList), cm.createListBox("attributes_dir", {
                    label: ed.getLang("attributes.label_dir", "Text Direction"),
                    onselect: function(v) {},
                    name: "dir"
                })), repeatable = (dirList.add(ed.getLang("common.not_set", "-- Not set --"), ""), 
                each([ "ltr", "rtl" ], function(value) {
                    dirList.add(ed.getLang("attributes.label_dir_" + value, value), value);
                }), form.add(dirList), cm.createRepeatable("attributes_custom_repeatable", {
                    label: "Other",
                    name: "custom",
                    item: {
                        type: "CustomValue",
                        id: "attributes_custom",
                        settings: {}
                    }
                }));
                form.add(repeatable), ed.windowManager.open({
                    title: ed.getLang("attributes.title", "Attributes"),
                    items: [ form ],
                    size: "mce-modal-landscape-large",
                    open: function() {
                        form.update(attribsMap), repeatable.value(custom);
                    },
                    buttons: [ {
                        title: ed.getLang("common.cancel", "Cancel"),
                        id: "cancel"
                    }, {
                        title: ed.getLang("common.update", "Update"),
                        id: "insert",
                        onsubmit: function(e) {
                            var node = ed.selection.getNode(), selection = ed.selection, data = form.submit();
                            data.custom && (each(data.custom, function(item) {
                                data = extend(data, item);
                            }), delete data.custom), each(data, function(value, name) {
                                "onclick" != name && "ondblclick" != name || (delete data[name], 
                                data["data-mce-" + name] = value, delete nodeAttribs["data-mce-" + name]), 
                                delete nodeAttribs[name];
                            }), !selection.isCollapsed() && selection.getContent() == selection.getContent({
                                format: "text"
                            }) ? ed.formatter.apply("attributes", data) : node && !isRootNode(node) && (each(nodeAttribs, function(val, name) {
                                data[name] = null, "onclick" != name && "ondblclick" != name || (data["data-mce-" + name] = null);
                            }), mediaApi && mediaApi.isMediaObject(node) ? mediaApi.updateMedia(data) : ed.dom.setAttribs(node, data)), 
                            tinymce.dom.Event.cancel(e);
                        },
                        classes: "primary",
                        autofocus: !0
                    } ]
                });
            }
        }), ed.onNodeChange.add(function(ed, cm, n, co) {
            cm.setDisabled("attributes", n && isRootNode(n) && co);
        });
    });
}();tinymce/plugins/effects/plugin.js000060400000010245152456167170013164 0ustar00/* jce - 2.9.99.2 | 2026-04-22 | https://www.joomlacontenteditor.net | Source: https://github.com/widgetfactory/jce | Copyright (C) 2006 - 2026 Ryan Demmer. All rights reserved | GNU/GPL Version 2 or later - http://www.gnu.org/licenses/gpl-2.0.html */
!function() {
    var each = tinymce.each;
    tinymce.PluginManager.add("effects", function(ed, url) {
        function cleanEventAttribute(val) {
            return val ? val.replace(/^\s*this.src\s*=\s*\'([^\']+)\';?\s*$/, "$1").replace(/^\s*|\s*$/g, "") : "";
        }
        function bindMouseoverEvent(ed) {
            each(ed.dom.select("img"), function(elm) {
                var src = elm.getAttribute("src"), mouseover = elm.getAttribute("data-mouseover"), mouseout = elm.getAttribute("data-mouseout");
                if (elm.onmouseover = elm.onmouseout = null, !src || !mouseover || !mouseout) return !0;
                elm.onmouseover = function() {
                    elm.setAttribute("src", elm.getAttribute("data-mouseover"));
                }, elm.onmouseout = function() {
                    elm.setAttribute("src", elm.getAttribute("data-mouseout") || src);
                };
            });
        }
        ed.onPreInit.add(function() {
            ed.onBeforeSetContent.add(function(ed, o) {
                var div;
                -1 !== o.content.indexOf("onmouseover=") && (div = ed.dom.create("div", {}, o.content), 
                each(ed.dom.select("img[onmouseover]", div), function(node) {
                    var mouseover = node.getAttribute("onmouseover"), mouseout = node.getAttribute("onmouseout");
                    return !mouseover || 0 !== mouseover.indexOf("this.src") || (mouseover = cleanEventAttribute(mouseover), 
                    node.removeAttribute("onmouseover"), !mouseover) || (node.setAttribute("data-mouseover", mouseover), 
                    void (mouseout && 0 === mouseout.indexOf("this.src") && (mouseout = cleanEventAttribute(mouseout), 
                    node.removeAttribute("onmouseout"), mouseout) && node.setAttribute("data-mouseout", mouseout)));
                }), o.content = div.innerHTML);
            }), ed.parser.addAttributeFilter("onmouseover", function(nodes) {
                for (var i = nodes.length; i--; ) {
                    var mouseover, mouseout, node = nodes[i];
                    "img" === node.name && (mouseover = node.attr("onmouseover"), 
                    mouseout = node.attr("onmouseout"), mouseover && 0 === mouseover.indexOf("this.src") && (mouseover = cleanEventAttribute(mouseover), 
                    node.attr("data-mouseover", mouseover), node.attr("onmouseover", null), 
                    mouseout) && 0 === mouseout.indexOf("this.src")) && (mouseout = cleanEventAttribute(mouseout), 
                    node.attr("data-mouseout", mouseout), node.attr("onmouseout", null));
                }
            }), ed.serializer.addAttributeFilter("data-mouseover", function(nodes) {
                for (var i = nodes.length; i--; ) {
                    var mouseout, mouseover, node = nodes[i];
                    "img" === node.name && (mouseover = node.attr("data-mouseover"), 
                    mouseout = node.attr("data-mouseout"), mouseover = cleanEventAttribute(mouseover), 
                    node.attr("data-mouseover", null), node.attr("data-mouseout", null), 
                    mouseover && (node.attr("onmouseover", "this.src='" + mouseover + "';"), 
                    mouseout = cleanEventAttribute(mouseout))) && node.attr("onmouseout", "this.src='" + mouseout + "';");
                }
            }), ed.onSetContent.add(function() {
                bindMouseoverEvent(ed);
            }), ed.onUpdateMedia.add(function(ed, o) {
                bindMouseoverEvent(ed), o.before && o.after && each(ed.dom.select("img[data-mouseover]"), function(elm) {
                    var mouseover = elm.getAttribute("data-mouseover"), mouseout = elm.getAttribute("data-mouseout");
                    if (!mouseover) return !0;
                    mouseover == o.before && elm.setAttribute("data-mouseover", o.after), 
                    mouseout == o.before && elm.setAttribute("data-mouseout", o.after);
                });
            });
        });
    });
}();tinymce/plugins/source/plugin.js000060400000015022152456167170013043 0ustar00/* jce - 2.9.99.2 | 2026-04-22 | https://www.joomlacontenteditor.net | Source: https://github.com/widgetfactory/jce | Copyright (C) 2006 - 2026 Ryan Demmer. All rights reserved | GNU/GPL Version 2 or later - http://www.gnu.org/licenses/gpl-2.0.html */
!function() {
    var DOM = tinymce.DOM, Event = tinymce.dom.Event;
    tinymce.PluginManager.add("source", function(ed, url) {
        var self = this;
        function isEditorActive() {
            return 0 == DOM.hasClass(ed.getElement(), "wf-no-editor");
        }
        function getSourceEditor() {
            return DOM.get(ed.id + "_editor_source_textarea") || null;
        }
        ed.onSetContent.add(function(ed, o) {
            self.setContent(ed.getContent(), !0);
        }), ed.onInit.add(function(ed) {
            0 != isEditorActive() && "wf-editor-source" === (ed.settings.active_tab || "") && (DOM.hide(ed.getContainer()), 
            DOM.hide(ed.getElement()), window.setTimeout(function() {
                self.toggle();
            }, 10));
        }), this.ControlManager = new tinymce.ControlManager(ed), this.setContent = function(v) {
            var editor = getSourceEditor();
            return !!editor && (editor.value = v);
        }, this.insertContent = function(v) {
            var editor = getSourceEditor();
            return editor && (editor.focus(), document.selection ? document.selection.createRange().text = v : editor.setRangeText(v, editor.selectionStart, editor.selectionEnd, "end")), 
            !1;
        }, this.getContent = function() {
            var editor = getSourceEditor();
            return editor ? editor.value : null;
        }, this.hide = function() {
            DOM.hide(ed.id + "_editor_source");
        }, this.isHidden = function() {
            return DOM.isHidden(ed.id + "_editor_source");
        }, this.save = function(content, debounced) {
            var args, el = ed.getElement();
            return el ? (args = {
                content: content = tinymce.is(content) ? content : this.getContent(),
                no_events: !0,
                format: "raw"
            }, ed.onWfEditorSave.dispatch(ed, args), /TEXTAREA|INPUT/i.test(el.nodeName) ? el.value = args.content : el.innerHTML = args.content, 
            debounced && ed.onWfEditorChange.dispatch(ed, args), args.content) : content;
        }, this.toggle = function() {
            var self = this, s = ed.settings, element = ed.getElement(), container = element.parentNode, header = DOM.getPrev(element, ".wf-editor-header"), div = DOM.get(ed.id + "_editor_source"), textarea = DOM.get(ed.id + "_editor_source_textarea"), ifrHeight = parseInt(DOM.get(ed.id + "_ifr").style.height, 10) || s.height, o = tinymce.util.Storage.getHash("TinyMCE_" + ed.id + "_size");
            o && o.height && (ifrHeight = o.height);
            var statusbar, resize, keyup, callback, time, timer, o = (tinymce.is(element.value) ? element.value : element.innerHTML).replace(/<br data-mce-bogus="1"([^>]+)>/gi, ""), element = (div ? (DOM.show(div), 
            textarea.value = o) : (div = DOM.add(container, "div", {
                role: "textbox",
                id: ed.id + "_editor_source",
                class: "wf-editor-source"
            }), element = s.skin_class || "defaultSkin", DOM.addClass(div, element), 
            textarea = DOM.create("textarea", {
                id: ed.id + "_editor_source_textarea"
            }), DOM.add(div, textarea), textarea.value = o, statusbar = DOM.add(div, "div", {
                id: ed.id + "_editor_source_statusbar",
                class: "mceStatusbar mceLast"
            }, '<div class="mcePathRow"></div><div tabindex="-1" class="mceResize" id="' + ed.id + '_editor_source_resize"><span class="mceIcon mce_resize"></span></div>'), 
            resize = DOM.get(ed.id + "_editor_source_resize"), Event.add(resize, "click", function(e) {
                e.preventDefault();
            }), Event.add(resize, "mousedown", function(e) {
                var mm1, mu1, sx, sy, sw, sh, w, h;
                function resizeTo(w, h) {
                    w = Math.max(w, 300), h = Math.max(h, 200), textarea.style.height = h + "px", 
                    container.style.maxWidth = w + "px", ed.settings.container_width = w, 
                    ed.settings.container_height = h + statusbar.offsetHeight, h -= ed.settings.interface_height || 0, 
                    ed.theme.resizeTo(w, h);
                }
                function endResize(e) {
                    e.preventDefault(), Event.remove(DOM.doc, "mousemove", mm1), 
                    Event.remove(DOM.doc, "mouseup", mu1), w = sw + (e.screenX - sx), 
                    h = sh + (e.screenY - sy), resizeTo(w, h), DOM.removeClass(resize, "wf-editor-source-resizing");
                }
                if (e.preventDefault(), DOM.hasClass(resize, "wf-editor-source-resizing")) return endResize(e), 
                !1;
                sx = e.screenX, sy = e.screenY, sw = w = container.offsetWidth, 
                sh = h = textarea.clientHeight, mm1 = Event.add(DOM.doc, "mousemove", function(e) {
                    e.preventDefault(), w = sw + (e.screenX - sx), h = sh + (e.screenY - sy), 
                    resizeTo(w, h), DOM.addClass(resize, "wf-editor-source-resizing");
                }), mu1 = Event.add(DOM.doc, "mouseup", endResize);
            }), function(ed) {
                return window.widgetkit && -1 !== ed.id.indexOf("wk_") || -1 !== ed.id.indexOf("sppb-editor-");
            }(ed) && (callback = function(e) {
                var value = (value = textarea.value).replace(/^\s*|\s*$/g, "");
                self.save(value, !0);
            }, time = 300, (s = function() {
                var args = arguments;
                clearTimeout(timer), timer = setTimeout(function() {
                    callback.apply(this, args);
                }, time);
            }).stop = function() {
                clearTimeout(timer);
            }, keyup = s, DOM.bind(textarea, "input blur", function() {
                keyup();
            }))), DOM.removeClass(container, "mce-loading"), ed.settings.container_height || sessionStorage.getItem("wf-editor-container-height") || ifrHeight + statusbar.offsetHeight);
            DOM.hasClass(container, "mce-fullscreen") && (element = DOM.getViewPort().h - header.offsetHeight - statusbar.offsetHeight - 4), 
            DOM.setStyles(textarea, {
                height: element
            });
        }, this.getSelection = function() {
            return document.getSelection().toString();
        }, this.getCursorPos = function() {
            return 0;
        };
    });
}();tinymce/plugins/advlist/plugin.js000060400000022420152456167170013211 0ustar00/* jce - 2.9.99.2 | 2026-04-22 | https://www.joomlacontenteditor.net | Source: https://github.com/widgetfactory/jce | Copyright (C) 2006 - 2026 Ryan Demmer. All rights reserved | GNU/GPL Version 2 or later - http://www.gnu.org/licenses/gpl-2.0.html */
!function() {
    var each = tinymce.each, DOM = tinymce.DOM, Event = tinymce.dom.Event;
    tinymce.PluginManager.add("advlist", function(editor, url) {
        function buildFormats(str) {
            var formats = [];
            return each(str.split(/,/), function(type) {
                var title = type.replace(/-/g, "_");
                formats.push({
                    title: "advlist." + (title = "default" === type ? "def" : title),
                    styles: {
                        listStyleType: "default" === type ? "" : type
                    }
                });
            }), formats;
        }
        var numlist = editor.getParam("advlist_number_styles", "default,lower-alpha,lower-greek,lower-roman,upper-alpha,upper-roman"), numlist = (numlist && (this.numlist = buildFormats(numlist)), 
        editor.getParam("advlist_bullist_styles", "default,circle,disc,square"));
        numlist && (this.bullist = buildFormats(numlist)), this.createControl = function(name, cm) {
            var btn, format, self = this;
            function hasFormat(node, format) {
                var state = !0;
                return each(format.styles, function(value, name) {
                    if (editor.dom.getStyle(node, name) != value) return state = !1;
                }), state;
            }
            function applyListFormat() {
                var list, dom = editor.dom, sel = editor.selection;
                (list = dom.getParent(sel.getNode(), "ol,ul")) && list.nodeName != ("bullist" == name ? "OL" : "UL") && format && !hasFormat(list, format) || editor.execCommand("bullist" == name ? "InsertUnorderedList" : "InsertOrderedList"), 
                format && (list = dom.getParent(sel.getNode(), "ol,ul")) && (dom.setStyles(list, format.styles), 
                list.removeAttribute("data-mce-style"), sel = editor.getParam("advlist_" + name + "_classes", "")) && (sel = sel.trim()).split(/\s+/).forEach(function(cls) {
                    cls && editor.dom.addClass(list, cls);
                }), editor.focus();
            }
            if ("numlist" == name || "bullist" == name) return self[name] && "advlist.def" === self[name][0].title && (format = self[name][0]), 
            self[name] ? ((btn = cm.createSplitButton(name, {
                title: "advanced." + name + "_desc",
                class: "mce_" + name,
                onclick: function(e) {
                    var start_ctrl, reversed_ctrl, form, type_ctrl, styles_ctrl;
                    if (editor.dom.getParent(editor.selection.getNode(), "bullist" == name ? "ul" : "ol") && !e.altKey) return (form = cm.createForm(name + "_form")).empty(), 
                    type_ctrl = cm.createListBox(name + "_type_ctrl", {
                        label: editor.getLang("advlist.type", "Type"),
                        name: "type",
                        onselect: function() {}
                    }), form.add(type_ctrl), each(self[name], function(item) {
                        var icon = (style = item.styles.listStyleType).replace(/-/g, "_"), style = style || "default";
                        type_ctrl.add(editor.getLang(item.title), style, {
                            icon: icon ? "list_" + icon : ""
                        });
                    }), "numlist" == name && (start_ctrl = cm.createTextBox("numlist_start_ctrl", {
                        label: editor.getLang("advlist.start", "Start"),
                        name: "start",
                        subtype: "number",
                        attributes: {
                            min: "1"
                        }
                    }), form.add(start_ctrl), reversed_ctrl = cm.createCheckBox("numlist_reversed_ctrl", {
                        label: editor.getLang("advlist.reversed", "Reversed"),
                        name: "reversed"
                    }), form.add(reversed_ctrl)), e = editor.getParam("advlist_" + name + "_custom_classes", "").trim().split(",").filter(function(cls) {
                        return "" !== cls.trim();
                    }), styles_ctrl = cm.createStylesBox(name + "_class", {
                        label: editor.getLang("adlist.class", "Classes"),
                        onselect: function() {},
                        name: "classes",
                        styles: e
                    }), form.add(styles_ctrl), void editor.windowManager.open({
                        title: editor.getLang("advanced." + name + "_desc", "List"),
                        items: [ form ],
                        size: "mce-modal-landscape-small",
                        open: function() {
                            var label = editor.getLang("update", "Update"), node = editor.selection.getNode(), node = editor.dom.getParent(node, "bullist" == name ? "ul" : "ol"), classes = editor.getParam("advlist_" + name + "_classes", "").trim().split(" ").filter(function(cls) {
                                return "" !== cls.trim();
                            });
                            node && ("numlist" == name && (start_ctrl.value(editor.dom.getAttrib(node, "start") || 1), 
                            reversed_ctrl.checked(!!editor.dom.getAttrib(node, "reversed"))), 
                            classes = (classes = editor.dom.getAttrib(node, "class")).replace(/mce-[\w\-]+/g, "").replace(/\s+/g, " ").trim().split(" ").filter(function(cls) {
                                return "" !== cls.trim();
                            }), node = editor.dom.getStyle(node, "list-style-type") || "default", 
                            type_ctrl.value(node)), styles_ctrl.value(classes), 
                            DOM.setHTML(this.id + "_insert", label);
                        },
                        buttons: [ {
                            title: editor.getLang("remove", "Remove"),
                            id: "remove",
                            onclick: function() {
                                applyListFormat(), this.close();
                            }
                        }, {
                            title: editor.getLang("cancel", "Cancel"),
                            id: "cancel"
                        }, {
                            title: editor.getLang("insert", "Insert"),
                            id: "insert",
                            onsubmit: function(e) {
                                var data = form.submit(), list = (Event.cancel(e), 
                                editor.dom.getParent(editor.selection.getNode(), "bullist" == name ? "ul" : "ol"));
                                list && ("default" == data.type ? editor.dom.setStyles(list, {
                                    "list-style-type": ""
                                }) : editor.dom.setStyles(list, {
                                    "list-style-type": data.type
                                }), list.removeAttribute("data-mce-style"), each(data, function(value, key) {
                                    value = value || null, "start" == key && "1" == value && (value = null), 
                                    "type" == key && (value = null), editor.dom.setAttrib(list, key = "classes" == key ? "class" : key, value);
                                }), editor.undoManager.add());
                            },
                            classes: "primary",
                            scope: self
                        } ]
                    });
                    applyListFormat();
                }
            })).onRenderMenu.add(function(btn, menu) {
                menu.onHideMenu.add(function() {
                    self.bookmark && (editor.selection.moveToBookmark(self.bookmark), 
                    self.bookmark = 0);
                }), menu.onShowMenu.add(function() {
                    var fmtList, list = editor.dom.getParent(editor.selection.getNode(), "ol,ul");
                    (list || format) && (fmtList = self[name], each(menu.items, function(item) {
                        var state = !0;
                        item.setSelected(0), list && !item.isDisabled() && (each(fmtList, function(fmt) {
                            if (fmt.id == item.id && !hasFormat(list, fmt)) return state = !1;
                        }), state) && item.setSelected(1);
                    }), list || menu.items[format.id].setSelected(1)), editor.focus(), 
                    tinymce.isIE && (self.bookmark = editor.selection.getBookmark(1));
                }), each(self[name], function(item) {
                    item.id = editor.dom.uniqueId();
                    var icon = item.styles.listStyleType.replace(/-/g, "_");
                    menu.add({
                        id: item.id,
                        title: item.title,
                        icon: "list_" + icon,
                        onclick: function() {
                            format = item, applyListFormat();
                        }
                    });
                });
            }), btn) : cm.createButton(name, {
                title: "advanced." + name + "_desc",
                class: "mce_" + name,
                onclick: function() {
                    applyListFormat();
                }
            });
        };
    });
}();tinymce/plugins/charmap/plugin.js000060400000030056152456167170013162 0ustar00/* jce - 2.9.99.2 | 2026-04-22 | https://www.joomlacontenteditor.net | Source: https://github.com/widgetfactory/jce | Copyright (C) 2006 - 2026 Ryan Demmer. All rights reserved | GNU/GPL Version 2 or later - http://www.gnu.org/licenses/gpl-2.0.html */
!function() {
    var each = tinymce.each, Entities = tinymce.html.Entities, DOM = tinymce.DOM;
    function isArray(arr) {
        return Array.isArray(arr);
    }
    function getCharsFromSetting(settingValue) {
        var values;
        return isArray(settingValue) ? [].concat(settingValue.filter(function(item) {
            return isArray(item) && 2 == item.length;
        })) : tinymce.is(settingValue, "object") ? (values = [], tinymce.each(settingValue, function(value, key) {
            key = (key = Entities.encodeNumeric(Entities.decode(key))).replace(/\D+/g, ""), 
            values.push([ key, value ]);
        }), values) : "function" == typeof settingValue ? settingValue() : [];
    }
    tinymce.PluginManager.add("charmap", function(ed, url) {
        function getCharMap() {
            return charmap = [ [ "160", "no-break space" ], [ "173", "soft hyphen" ], [ "34", "quotation mark" ], [ "162", "cent sign" ], [ "8364", "euro sign" ], [ "163", "pound sign" ], [ "165", "yen sign" ], [ "169", "copyright sign" ], [ "174", "registered sign" ], [ "8482", "trade mark sign" ], [ "8240", "per mille sign" ], [ "181", "micro sign" ], [ "183", "middle dot" ], [ "8226", "bullet" ], [ "8230", "three dot leader" ], [ "8242", "minutes / feet" ], [ "8243", "seconds / inches" ], [ "167", "section sign" ], [ "182", "paragraph sign" ], [ "223", "sharp s / ess-zed" ], [ "8249", "single left-pointing angle quotation mark" ], [ "8250", "single right-pointing angle quotation mark" ], [ "171", "left pointing guillemet" ], [ "187", "right pointing guillemet" ], [ "8216", "left single quotation mark" ], [ "8217", "right single quotation mark" ], [ "8220", "left double quotation mark" ], [ "8221", "right double quotation mark" ], [ "8218", "single low-9 quotation mark" ], [ "8222", "double low-9 quotation mark" ], [ "60", "less-than sign" ], [ "62", "greater-than sign" ], [ "8804", "less-than or equal to" ], [ "8805", "greater-than or equal to" ], [ "8211", "en dash" ], [ "8212", "em dash" ], [ "175", "macron" ], [ "8254", "overline" ], [ "164", "currency sign" ], [ "166", "broken bar" ], [ "168", "diaeresis" ], [ "161", "inverted exclamation mark" ], [ "191", "turned question mark" ], [ "710", "circumflex accent" ], [ "732", "small tilde" ], [ "176", "degree sign" ], [ "8722", "minus sign" ], [ "177", "plus-minus sign" ], [ "247", "division sign" ], [ "8260", "fraction slash" ], [ "215", "multiplication sign" ], [ "185", "superscript one" ], [ "178", "superscript two" ], [ "179", "superscript three" ], [ "188", "fraction one quarter" ], [ "189", "fraction one half" ], [ "190", "fraction three quarters" ], [ "402", "function / florin" ], [ "8747", "integral" ], [ "8721", "n-ary sumation" ], [ "8734", "infinity" ], [ "8730", "square root" ], [ "8764", "similar to" ], [ "8773", "approximately equal to" ], [ "8776", "almost equal to" ], [ "8800", "not equal to" ], [ "8801", "identical to" ], [ "8712", "element of" ], [ "8713", "not an element of" ], [ "8715", "contains as member" ], [ "8719", "n-ary product" ], [ "8743", "logical and" ], [ "8744", "logical or" ], [ "172", "not sign" ], [ "8745", "intersection" ], [ "8746", "union" ], [ "8706", "partial differential" ], [ "8704", "for all" ], [ "8707", "there exists" ], [ "8709", "diameter" ], [ "8711", "backward difference" ], [ "8727", "asterisk operator" ], [ "8733", "proportional to" ], [ "8736", "angle" ], [ "180", "acute accent" ], [ "184", "cedilla" ], [ "170", "feminine ordinal indicator" ], [ "186", "masculine ordinal indicator" ], [ "8224", "dagger" ], [ "8225", "double dagger" ], [ "192", "A - grave" ], [ "193", "A - acute" ], [ "194", "A - circumflex" ], [ "195", "A - tilde" ], [ "196", "A - diaeresis" ], [ "197", "A - ring above" ], [ "256", "A - macron" ], [ "198", "ligature AE" ], [ "199", "C - cedilla" ], [ "200", "E - grave" ], [ "201", "E - acute" ], [ "202", "E - circumflex" ], [ "203", "E - diaeresis" ], [ "274", "E - macron" ], [ "204", "I - grave" ], [ "205", "I - acute" ], [ "206", "I - circumflex" ], [ "207", "I - diaeresis" ], [ "298", "I - macron" ], [ "208", "ETH" ], [ "209", "N - tilde" ], [ "210", "O - grave" ], [ "211", "O - acute" ], [ "212", "O - circumflex" ], [ "213", "O - tilde" ], [ "214", "O - diaeresis" ], [ "216", "O - slash" ], [ "332", "O - macron" ], [ "338", "ligature OE" ], [ "352", "S - caron" ], [ "217", "U - grave" ], [ "218", "U - acute" ], [ "219", "U - circumflex" ], [ "220", "U - diaeresis" ], [ "362", "U - macron" ], [ "221", "Y - acute" ], [ "376", "Y - diaeresis" ], [ "562", "Y - macron" ], [ "222", "THORN" ], [ "224", "a - grave" ], [ "225", "a - acute" ], [ "226", "a - circumflex" ], [ "227", "a - tilde" ], [ "228", "a - diaeresis" ], [ "229", "a - ring above" ], [ "257", "a - macron" ], [ "230", "ligature ae" ], [ "231", "c - cedilla" ], [ "232", "e - grave" ], [ "233", "e - acute" ], [ "234", "e - circumflex" ], [ "235", "e - diaeresis" ], [ "275", "e - macron" ], [ "236", "i - grave" ], [ "237", "i - acute" ], [ "238", "i - circumflex" ], [ "239", "i - diaeresis" ], [ "299", "i - macron" ], [ "240", "eth" ], [ "241", "n - tilde" ], [ "242", "o - grave" ], [ "243", "o - acute" ], [ "244", "o - circumflex" ], [ "245", "o - tilde" ], [ "246", "o - diaeresis" ], [ "248", "o slash" ], [ "333", "o macron" ], [ "339", "ligature oe" ], [ "353", "s - caron" ], [ "249", "u - grave" ], [ "250", "u - acute" ], [ "251", "u - circumflex" ], [ "252", "u - diaeresis" ], [ "363", "u - macron" ], [ "253", "y - acute" ], [ "254", "thorn" ], [ "255", "y - diaeresis" ], [ "563", "y - macron" ], [ "913", "Alpha" ], [ "914", "Beta" ], [ "915", "Gamma" ], [ "916", "Delta" ], [ "917", "Epsilon" ], [ "918", "Zeta" ], [ "919", "Eta" ], [ "920", "Theta" ], [ "921", "Iota" ], [ "922", "Kappa" ], [ "923", "Lambda" ], [ "924", "Mu" ], [ "925", "Nu" ], [ "926", "Xi" ], [ "927", "Omicron" ], [ "928", "Pi" ], [ "929", "Rho" ], [ "931", "Sigma" ], [ "932", "Tau" ], [ "933", "Upsilon" ], [ "934", "Phi" ], [ "935", "Chi" ], [ "936", "Psi" ], [ "937", "Omega" ], [ "945", "alpha" ], [ "946", "beta" ], [ "947", "gamma" ], [ "948", "delta" ], [ "949", "epsilon" ], [ "950", "zeta" ], [ "951", "eta" ], [ "952", "theta" ], [ "953", "iota" ], [ "954", "kappa" ], [ "955", "lambda" ], [ "956", "mu" ], [ "957", "nu" ], [ "958", "xi" ], [ "959", "omicron" ], [ "960", "pi" ], [ "961", "rho" ], [ "962", "final sigma" ], [ "963", "sigma" ], [ "964", "tau" ], [ "965", "upsilon" ], [ "966", "phi" ], [ "967", "chi" ], [ "968", "psi" ], [ "969", "omega" ], [ "8501", "alef symbol" ], [ "982", "pi symbol" ], [ "8476", "real part symbol" ], [ "978", "upsilon - hook symbol" ], [ "8472", "Weierstrass p" ], [ "8465", "imaginary part" ], [ "8592", "leftwards arrow" ], [ "8593", "upwards arrow" ], [ "8594", "rightwards arrow" ], [ "8595", "downwards arrow" ], [ "8596", "left right arrow" ], [ "8629", "carriage return" ], [ "8656", "leftwards double arrow" ], [ "8657", "upwards double arrow" ], [ "8658", "rightwards double arrow" ], [ "8659", "downwards double arrow" ], [ "8660", "left right double arrow" ], [ "8756", "therefore" ], [ "8834", "subset of" ], [ "8835", "superset of" ], [ "8836", "not a subset of" ], [ "8838", "subset of or equal to" ], [ "8839", "superset of or equal to" ], [ "8853", "circled plus" ], [ "8855", "circled times" ], [ "8869", "perpendicular" ], [ "8901", "dot operator" ], [ "8968", "left ceiling" ], [ "8969", "right ceiling" ], [ "8970", "left floor" ], [ "8971", "right floor" ], [ "9001", "left-pointing angle bracket" ], [ "9002", "right-pointing angle bracket" ], [ "9674", "lozenge" ], [ "9824", "black spade suit" ], [ "9827", "black club suit" ], [ "9829", "black heart suit" ], [ "9830", "black diamond suit" ], [ "8194", "en space" ], [ "8195", "em space" ], [ "8201", "thin space" ], [ "8204", "zero width non-joiner" ], [ "8205", "zero width joiner" ], [ "8206", "left-to-right mark" ], [ "8207", "right-to-left mark" ] ], 
            (settings = ed.settings).charmap && (charmap = getCharsFromSetting(settings.charmap)), 
            settings.charmap_append ? [].concat(charmap).concat(getCharsFromSetting(settings.charmap_append)) : charmap;
            var charmap, settings;
        }
        var html = '<div role="presentation" class="mceCharacterMap mceModalRow">\t<div id="' + ed.id + '_charmapView" role="group"></div>\t<div class="mceCharacterMapDescription">\t\t<h1 id="' + ed.id + '_charmapCodeV"></h1>\t\t<h4 id="' + ed.id + '_charmapCodeN"></h4>\t\t<h3 id="' + ed.id + '_charmapCodeA"></h3>\t\t<h3 id="' + ed.id + '_charmapCodeB"></h3>\t</div></div>';
        ed.addCommand("mceCharacterMap", function(v) {
            ed.windowManager.open({
                title: ed.getLang("advanced.charmap_desc"),
                content: html,
                size: "mce-modal-landscape-xlarge",
                open: function() {
                    var win = this, elm = DOM.get(ed.id + "_charmapView");
                    DOM.setHTML(elm, function() {
                        for (var chr, chrText, named, html = "", charmap = getCharMap(), i = 0; i < charmap.length; i++) i < charmap.length ? (chrText = (chr = charmap[i]) ? String.fromCharCode(parseInt(chr[0], 10)) : "&nbsp;", 
                        named = (named = Entities.encodeNamed(chrText)).substring(1), 
                        html += '<button title="' + chr[1] + '" data-numeric="' + chr[0] + '" data-named="' + named + '">' + chrText + "</button>") : html += "";
                        return html += "";
                    }()), DOM.bind(elm, "mouseover", function(e) {
                        var chrA, chrB, elmA, elmB, elmV, elmN, e = e.target;
                        "BUTTON" === e.nodeName && (chrA = "#" + e.getAttribute("data-numeric") + ";", 
                        chrB = e.getAttribute("data-named"), e = e.getAttribute("title"), 
                        chrA = chrA, chrB = chrB, e = e, elmA = DOM.get(ed.id + "_charmapCodeA"), 
                        elmB = DOM.get(ed.id + "_charmapCodeB"), elmV = DOM.get(ed.id + "_charmapCodeV"), 
                        elmN = DOM.get(ed.id + "_charmapCodeN"), elmV.innerHTML = "#160;" == chrA ? "__" : "&" + chrA, 
                        elmB.innerHTML = "&amp;" + chrA, elmA.innerHTML = "&amp;" + chrB, 
                        elmN.innerHTML = e);
                    }), DOM.bind(elm, "click", function(e) {
                        var node = e.target;
                        e.preventDefault(), "BUTTON" === node.nodeName && (e = node.getAttribute("data-numeric"), 
                        ed.execCommand("mceInsertContent", !1, "&#" + e + ";"), 
                        win.close());
                    }), new tinymce.ui.KeyboardNavigation({
                        root: elm,
                        items: DOM.select("button", elm),
                        excludeFromTabOrder: !1,
                        onCancel: function() {
                            ed.focus();
                        }
                    }, DOM);
                }
            });
        }), this.createControl = function(name, cm) {
            var btn;
            if ("charmap" === name) return ed.getParam("charmap_custom") ? (btn = cm.createSplitButton(name, {
                title: "advanced.charmap_desc",
                cmd: "mceCharacterMap"
            })).onRenderMenu.add(function(btn, menu) {
                each(ed.getParam("charmap_custom", "", "hash"), function(v, k) {
                    var id = ed.dom.uniqueId();
                    v = v.replace(/[^a-z0-9]/gi, ""), menu.add({
                        id: id,
                        title: k + " &" + v + ";",
                        onclick: function() {
                            var chr;
                            chr = v, ed.execCommand("mceInsertContent", !1, "&" + chr + ";"), 
                            ed.focus();
                        }
                    });
                });
            }) : btn = cm.createButton(name, {
                title: "advanced.charmap_desc",
                cmd: "mceCharacterMap"
            }), btn;
        };
    });
}();tinymce/plugins/table/css/table.css000060400000000171152456167170013366 0ustar00#merge_tab .uk-width-3-10{width:30%!important}#merge_tab .uk-width-7-10{width:70%!important}#numcols,#numrows{width:50px}tinymce/plugins/table/plugin.js000060400000226366152456167170012651 0ustar00/* jce - 2.9.99.2 | 2026-04-22 | https://www.joomlacontenteditor.net | Source: https://github.com/widgetfactory/jce | Copyright (C) 2006 - 2026 Ryan Demmer. All rights reserved | GNU/GPL Version 2 or later - http://www.gnu.org/licenses/gpl-2.0.html */
!function(tinymce) {
    var DOM = tinymce.DOM, Event = tinymce.dom.Event, each = tinymce.each, extend = tinymce.extend, VK = tinymce.VK, TreeWalker = tinymce.dom.TreeWalker, Delay = tinymce.util.Delay;
    function getSpanVal(td, name) {
        return parseInt(td.getAttribute(name) || 1, 10);
    }
    function TableGrid(table, dom, selection, settings) {
        var grid, startPos, endPos, selectedCell, gridWidth, maxX, maxY;
        function cloneNode(node, children) {
            return (node = node.cloneNode(children)).removeAttribute("id"), node;
        }
        function buildGrid() {
            var startY = 0;
            grid = [], gridWidth = 0, each([ "thead", "tbody", "tfoot" ], function(part) {
                var rows = dom.select("> " + part + " tr", table);
                each(rows, function(tr, y) {
                    y += startY, each(dom.select("> td, > th", tr), function(td, x) {
                        var x2, y2, rowspan, colspan;
                        if (grid[y]) for (;grid[y][x]; ) x++;
                        for (rowspan = getSpanVal(td, "rowspan"), colspan = getSpanVal(td, "colspan"), 
                        y2 = y; y2 < y + rowspan; y2++) for (grid[y2] || (grid[y2] = []), 
                        x2 = x; x2 < x + colspan; x2++) grid[y2][x2] = {
                            part: part,
                            real: y2 == y && x2 == x,
                            elm: td,
                            rowspan: rowspan,
                            colspan: colspan
                        };
                        gridWidth = Math.max(gridWidth, x + 1);
                    });
                }), startY += rows.length;
            });
        }
        function getCell(x, y) {
            y = grid[y];
            if (y) return y[x];
        }
        function setSpanVal(td, name, val) {
            td && (1 === (val = parseInt(val, 10)) ? td.removeAttribute(name, 1) : td.setAttribute(name, val, 1));
        }
        function isCellSelected(cell) {
            return cell && (dom.hasClass(cell.elm, "mceSelected") || cell == selectedCell);
        }
        function getSelectedRows() {
            var rows = [];
            return each(table.rows, function(row) {
                each(row.cells, function(cell) {
                    if (dom.hasClass(cell, "mceSelected") || cell == selectedCell.elm) return rows.push(row), 
                    !1;
                });
            }), rows;
        }
        function cloneCell(cell) {
            var formatNode, cloneFormats = {};
            return settings.table_clone_elements && (cloneFormats = tinymce.makeMap((settings.table_clone_elements || "strong em b i span font h1 h2 h3 h4 h5 h6 p div").toUpperCase(), /[ ,]/)), 
            tinymce.walk(cell, function(node) {
                var curNode;
                if (3 == node.nodeType) return each(dom.getParents(node.parentNode, null, cell).reverse(), function(node) {
                    cloneFormats[node.nodeName] && (node = cloneNode(node, !1), 
                    formatNode ? curNode && curNode.appendChild(node) : formatNode = curNode = node, 
                    curNode = node);
                }), curNode && (curNode.innerHTML = '<br data-mce-bogus="1" />'), 
                !1;
            }, "childNodes"), setSpanVal(cell = cloneNode(cell, !1), "rowSpan", 1), 
            setSpanVal(cell, "colSpan", 1), formatNode ? cell.appendChild(formatNode) : tinymce.isIE && !tinymce.isIE11 || (cell.innerHTML = '<br data-mce-bogus="1" />'), 
            cell;
        }
        function cleanup() {
            var rng = dom.createRng();
            each(dom.select("tr", table), function(tr) {
                0 == tr.cells.length && dom.remove(tr);
            }), 0 == dom.select("tr", table).length ? (rng.setStartAfter(table), 
            rng.setEndAfter(table), selection.setRng(rng), dom.remove(table)) : (each(dom.select("thead,tbody,tfoot", table), function(part) {
                0 == part.rows.length && dom.remove(part);
            }), buildGrid(), (rng = grid[Math.min(grid.length - 1, startPos.y)]) && (selection.select(rng[Math.min(rng.length - 1, startPos.x)].elm, !0), 
            selection.collapse(!0)));
        }
        function fillLeftDown(x, y, rows, cols) {
            for (var x2, c, cell, tr = grid[y][x].elm.parentNode, r = 1; r <= rows; r++) if (tr = dom.getNext(tr, "tr")) {
                for (x2 = x; 0 <= x2; x2--) if ((cell = grid[y + r][x2].elm).parentNode == tr) {
                    for (c = 1; c <= cols; c++) dom.insertAfter(cloneCell(cell), cell);
                    break;
                }
                if (-1 == x2) for (c = 1; c <= cols; c++) tr.insertBefore(cloneCell(tr.cells[0]), tr.cells[0]);
            }
        }
        function split() {
            each(grid, function(row, y) {
                each(row, function(cell, x) {
                    var colSpan, rowSpan, i;
                    if (isCellSelected(cell) && (colSpan = getSpanVal(cell = cell.elm, "colspan"), 
                    rowSpan = getSpanVal(cell, "rowspan"), 1 < colSpan || 1 < rowSpan)) {
                        for (setSpanVal(cell, "rowSpan", 1), setSpanVal(cell, "colSpan", 1), 
                        i = 0; i < colSpan - 1; i++) dom.insertAfter(cloneCell(cell), cell);
                        fillLeftDown(x, y, rowSpan - 1, colSpan);
                    }
                });
            });
        }
        function getPos(target) {
            var pos;
            return each(grid, function(row, y) {
                return each(row, function(cell, x) {
                    if (cell.elm == target) return !(pos = {
                        x: x,
                        y: y
                    });
                }), !pos;
            }), pos;
        }
        buildGrid(), (selectedCell = dom.getParent(selection.getStart(), "th,td")) && (startPos = getPos(selectedCell), 
        maxX = maxY = 0, each(grid, function(row, y) {
            each(row, function(cell, x) {
                var colSpan;
                isCellSelected(cell) && (cell = grid[y][x], maxX < x && (maxX = x), 
                maxY < y && (maxY = y), cell.real) && (colSpan = cell.colspan - 1, 
                cell = cell.rowspan - 1, colSpan && maxX < x + colSpan && (maxX = x + colSpan), 
                cell) && maxY < y + cell && (maxY = y + cell);
            });
        }), endPos = {
            x: maxX,
            y: maxY
        }, selectedCell = getCell(startPos.x, startPos.y)), tinymce.extend(this, {
            deleteTable: function() {
                var rng = dom.createRng();
                rng.setStartAfter(table), rng.setEndAfter(table), selection.setRng(rng), 
                dom.remove(table);
            },
            split: split,
            merge: function(cell, cols, rows) {
                var startX, endX, x, y, children, count, pos, endY = cell ? (endX = (startX = (pos = getPos(cell)).x) + (cols - 1), 
                (pos = pos.y) + (rows - 1)) : (startPos = endPos = null, each(grid, function(row, y) {
                    each(row, function(cell, x) {
                        isCellSelected(cell) && (startPos = startPos || {
                            x: x,
                            y: y
                        }, endPos = {
                            x: x,
                            y: y
                        });
                    });
                }), startX = startPos.x, pos = startPos.y, endX = endPos.x, endPos.y), startCell = getCell(startX, pos), cols = getCell(endX, endY);
                if (startCell && cols && startCell.part == cols.part) {
                    for (split(), buildGrid(), setSpanVal(startCell = getCell(startX, pos).elm, "colSpan", endX - startX + 1), 
                    setSpanVal(startCell, "rowSpan", endY - pos + 1), y = pos; y <= endY; y++) for (x = startX; x <= endX; x++) grid[y] && grid[y][x] && (cell = grid[y][x].elm) != startCell && (children = tinymce.grep(cell.childNodes), 
                    each(children, function(node) {
                        startCell.appendChild(node);
                    }), children.length && (children = tinymce.grep(startCell.childNodes), 
                    count = 0, each(children, function(node) {
                        "BR" == node.nodeName && dom.getAttrib(node, "data-mce-bogus") && count++ < children.length - 1 && startCell.removeChild(node);
                    })), dom.remove(cell));
                    cleanup();
                }
            },
            insertRow: function(before) {
                var posY, cell, lastCell, x, rowElm, newRow, otherCell, rowSpan;
                for (each(grid, function(row, y) {
                    if (each(row, function(cell, x) {
                        if (isCellSelected(cell) && (cell = cell.elm, rowElm = cell.parentNode, 
                        newRow = cloneNode(rowElm, !1), posY = y, before)) return !1;
                    }), before) return !posY;
                }), x = 0; x < grid[0].length; x++) if (grid[posY][x] && (cell = grid[posY][x].elm) != lastCell) {
                    if (before) {
                        if (0 < posY && grid[posY - 1][x] && 1 < (rowSpan = getSpanVal(otherCell = grid[posY - 1][x].elm, "rowSpan"))) {
                            setSpanVal(otherCell, "rowSpan", rowSpan + 1);
                            continue;
                        }
                    } else if (1 < (rowSpan = getSpanVal(cell, "rowspan"))) {
                        setSpanVal(cell, "rowSpan", rowSpan + 1);
                        continue;
                    }
                    setSpanVal(otherCell = cloneCell(cell), "colSpan", cell.colSpan), 
                    newRow.appendChild(otherCell), lastCell = cell;
                }
                newRow.hasChildNodes() && (before ? rowElm.parentNode.insertBefore(newRow, rowElm) : dom.insertAfter(newRow, rowElm));
            },
            insertCol: function(before) {
                var posX, lastCell;
                each(grid, function(row, y) {
                    if (each(row, function(cell, x) {
                        if (isCellSelected(cell) && (posX = x, before)) return !1;
                    }), before) return !posX;
                }), each(grid, function(row, y) {
                    var rowSpan, colSpan;
                    row[posX] && (row = row[posX].elm) != lastCell && (colSpan = getSpanVal(row, "colspan"), 
                    rowSpan = getSpanVal(row, "rowspan"), 1 == colSpan ? (before ? row.parentNode.insertBefore(cloneCell(row), row) : dom.insertAfter(cloneCell(row), row), 
                    fillLeftDown(posX, y, rowSpan - 1, colSpan)) : getSpanVal(row, "colSpan", row.colSpan), 
                    lastCell = row);
                });
            },
            deleteCols: function() {
                var cols = [];
                each(grid, function(row, y) {
                    each(row, function(cell, x) {
                        isCellSelected(cell) && -1 === tinymce.inArray(cols, x) && (each(grid, function(row) {
                            var row = row[x].elm, colSpan = getSpanVal(row, "colSpan");
                            1 < colSpan ? setSpanVal(row, "colSpan", colSpan - 1) : dom.remove(row);
                        }), cols.push(x));
                    });
                }), cleanup();
            },
            deleteRows: function() {
                var rows;
                rows = getSelectedRows(), each(rows.reverse(), function(tr) {
                    !function(tr) {
                        var pos, lastCell;
                        each(tr.cells, function(cell) {
                            var rowSpan = getSpanVal(cell, "rowSpan");
                            1 < rowSpan && (setSpanVal(cell, "rowSpan", rowSpan - 1), 
                            fillLeftDown((pos = getPos(cell)).x, pos.y, 1, 1));
                        }), pos = getPos(tr.cells[0]), each(grid[pos.y], function(cell) {
                            var rowSpan;
                            (cell = cell.elm) != lastCell && ((rowSpan = getSpanVal(cell, "rowSpan")) <= 1 ? dom.remove(cell) : setSpanVal(cell, "rowSpan", rowSpan - 1), 
                            lastCell = cell);
                        });
                    }(tr);
                }), cleanup();
            },
            cutRows: function() {
                var rows = getSelectedRows();
                return dom.remove(rows), cleanup(), rows;
            },
            copyRows: function() {
                var rows = getSelectedRows();
                return each(rows, function(row, i) {
                    rows[i] = cloneNode(row, !0);
                }), rows;
            },
            pasteRows: function(rows, before) {
                var selectedRows, targetRow, targetCellCount;
                rows && (selectedRows = getSelectedRows(), targetRow = selectedRows[before ? 0 : selectedRows.length - 1], 
                targetCellCount = targetRow.cells.length, each(grid, function(row) {
                    var match;
                    if (targetCellCount = 0, each(row, function(cell, x) {
                        cell.real && (targetCellCount += cell.colspan), cell.elm.parentNode == targetRow && (match = 1);
                    }), match) return !1;
                }), before || rows.reverse(), each(rows, function(row) {
                    for (var cell, cellCount = row.cells.length, i = 0; i < cellCount; i++) setSpanVal(cell = row.cells[i], "colSpan", 1), 
                    setSpanVal(cell, "rowSpan", 1);
                    for (i = cellCount; i < targetCellCount; i++) row.appendChild(cloneCell(row.cells[cellCount - 1]));
                    for (i = targetCellCount; i < cellCount; i++) dom.remove(row.cells[i]);
                    before ? targetRow.parentNode.insertBefore(row, targetRow) : dom.insertAfter(row, targetRow);
                }), dom.removeClass(dom.select("td.mceSelected,th.mceSelected"), "mceSelected"));
            },
            getPos: getPos,
            setStartCell: function(cell) {
                startPos = getPos(cell);
            },
            setEndCell: function(cell) {
                var colSpan;
                if (endPos = getPos(cell), startPos && endPos) {
                    for (var endX, endY, startX = Math.min(startPos.x, endPos.x), startY = Math.min(startPos.y, endPos.y), maxX = endX = Math.max(startPos.x, endPos.x), maxY = endY = Math.max(startPos.y, endPos.y), y = startY; y <= maxY; y++) (cell = grid[y][startX]).real || startX - (cell.colspan - 1) < startX && (startX -= cell.colspan - 1);
                    for (var x = startX; x <= maxX; x++) (cell = grid[startY][x]).real || startY - (cell.rowspan - 1) < startY && (startY -= cell.rowspan - 1);
                    for (y = startY; y <= endY; y++) for (x = startX; x <= endX; x++) (cell = grid[y][x]).real && ((colSpan = cell.colspan - 1) && maxX < x + colSpan && (maxX = x + colSpan), 
                    colSpan = cell.rowspan - 1) && maxY < y + colSpan && (maxY = y + colSpan);
                    for (dom.removeClass(dom.select("td.mceSelected,th.mceSelected"), "mceSelected"), 
                    y = startY; y <= maxY; y++) for (x = startX; x <= maxX; x++) grid[y][x] && dom.addClass(grid[y][x].elm, "mceSelected");
                }
            },
            moveRelIdx: function(cellElm, delta) {
                var cell, pos = getPos(cellElm), index = pos.y * gridWidth + pos.x;
                do {
                    if (!(cell = getCell((index += delta) % gridWidth, Math.floor(index / gridWidth)))) break;
                    if (cell.elm != cellElm) return selection.select(cell.elm, !0), 
                    dom.isEmpty(cell.elm) && selection.collapse(!0), !0;
                } while (cell.elm == cellElm);
                return !1;
            },
            refresh: buildGrid
        });
    }
    function updateCells(ed, data) {
        var elm = ed.selection.getStart(), tdElm = ed.dom.getParent(elm, "td,th"), elm = ed.dom.getParent(elm, "table"), elm = ed.dom.select("td.mceSelected,th.mceSelected", elm);
        elm.length || elm.push(tdElm), each(elm, function(td) {
            !function(ed, td, data) {
                var doc = ed.getDoc(), curCellType = td.nodeName.toLowerCase();
                if (ed.dom.setAttrib(td, "style", data.style), ed.dom.setAttrib(td, "class", data.class), 
                curCellType != data.celltype) {
                    for (var newCell = doc.createElement(data.celltype), c = 0; c < td.childNodes.length; c++) newCell.appendChild(td.childNodes[c].cloneNode(1));
                    for (var a = 0; a < td.attributes.length; a++) ed.dom.setAttrib(newCell, td.attributes[a].name, ed.dom.getAttrib(td, td.attributes[a].name));
                    td.parentNode.replaceChild(newCell, td), td = newCell;
                }
            }(ed, td, data);
        }), ed.addVisual(), ed.nodeChanged(), ed.undoManager.add();
    }
    function updateRows(ed, data) {
        var dom = ed.dom, trElm = dom.getParent(ed.selection.getStart(), "tr"), tableElm = dom.getParent(ed.selection.getStart(), "table"), rows = [];
        dom.select("td.mceSelected,th.mceSelected", trElm).length ? (data.skip_parent = !0, 
        each(tableElm.rows, function(tr) {
            for (var i = 0; i < tr.cells.length; i++) if (dom.hasClass(tr.cells[i], "mceSelected")) return void rows.push(tr);
        })) : rows.push(trElm), each(rows, function(tr) {
            !function(ed, tr, data) {
                var dom = ed.dom, doc = ed.getDoc(), curRowType = tr.parentNode.nodeName.toLowerCase(), rowtype = data.rowtype;
                if ((rows = dom.getParent(ed.selection.getStart(), "table").rows).length || rows.push(tr), 
                dom.setAttrib(tr, "style", data.style), dom.setAttrib(tr, "class", data.class), 
                curRowType != rowtype && !data.skip_parent) {
                    for (var rows = tr.cloneNode(1), theTable = dom.getParent(tr, "table"), dest = rowtype, newParent = null, i = 0; i < theTable.childNodes.length; i++) theTable.childNodes[i].nodeName.toLowerCase() == dest && (newParent = theTable.childNodes[i]);
                    null == newParent && (newParent = doc.createElement(dest), "thead" == dest ? "CAPTION" == theTable.firstChild.nodeName ? ed.dom.insertAfter(newParent, theTable.firstChild) : theTable.insertBefore(newParent, theTable.firstChild) : theTable.appendChild(newParent)), 
                    newParent.appendChild(rows), tr.parentNode.removeChild(tr);
                    curRowType = ed.dom.select("td", tr = rows);
                    each(curRowType, function(cell) {
                        ed.dom.rename(cell, "th");
                    });
                }
            }(ed, tr, data);
        }), ed.addVisual(), ed.nodeChanged(), ed.undoManager.add();
    }
    function insertTableHtml(ed, tableHtml) {
        var patt;
        ed.settings.fix_table_elements ? (patt = "", ed.focus(), ed.selection.setContent('<br class="_mce_marker" />'), 
        tinymce.each("h1,h2,h3,h4,h5,h6,p".split(","), function(n) {
            patt && (patt += ","), patt += n + " ._mce_marker";
        }), each(ed.dom.select(patt), function(n) {
            ed.dom.split(ed.dom.getParent(n, "h1,h2,h3,h4,h5,h6,p"), n);
        }), ed.dom.setOuterHTML(ed.dom.select("br._mce_marker")[0], tableHtml)) : ed.execCommand("mceInsertContent", !1, tableHtml);
    }
    tinymce.PluginManager.add("table", function(ed, url) {
        var winMan, clipboardRows, hasCellSelection = !0;
        function createTableGrid(node) {
            var selection = ed.selection, node = ed.dom.getParent(node || selection.getNode(), "table");
            if (node) return new TableGrid(node, ed.dom, selection, ed.settings);
        }
        function cleanup(force) {
            ed.getBody().style.webkitUserSelect = "", (force || hasCellSelection) && (ed.dom.removeClass(ed.dom.select("td.mceSelected,th.mceSelected"), "mceSelected"), 
            hasCellSelection = !1);
        }
        ed.addButton("table", "table.desc", "mceInsertTable", !0), ed.getParam("table_buttons", 1) && each([ [ "table", "table.desc", "mceInsertTable", !0 ], [ "delete_table", "table.del", "mceTableDelete" ], [ "delete_col", "table.delete_col_desc", "mceTableDeleteCol" ], [ "delete_row", "table.delete_row_desc", "mceTableDeleteRow" ], [ "col_after", "table.col_after_desc", "mceTableInsertColAfter" ], [ "col_before", "table.col_before_desc", "mceTableInsertColBefore" ], [ "row_after", "table.row_after_desc", "mceTableInsertRowAfter" ], [ "row_before", "table.row_before_desc", "mceTableInsertRowBefore" ], [ "row_props", "table.row_desc", "mceTableRowProps", !0 ], [ "cell_props", "table.cell_desc", "mceTableCellProps", !0 ], [ "split_cells", "table.split_cells_desc", "mceTableSplitCells", !0 ], [ "merge_cells", "table.merge_cells_desc", "mceTableMergeCells", !0 ] ], function(c) {
            ed.addButton(c[0], {
                title: c[1],
                cmd: c[2],
                ui: c[3]
            });
        }), ed.onPreInit.add(function() {
            var basic_dialog, isMobile;
            ed.onSetContent.add(function(ed, e) {
                cleanup(!0), ed.onSetContent.add(function(ed, e) {
                    cleanup(!0), each(ed.dom.select("table"), function(table) {
                        ed.dom.addClass(table, "mce-item-table"), each(ed.dom.select("td,th", table), function(cell) {
                            cell.hasChildNodes() || (cell.innerHTML = '<br data-mce-bogus="1" />');
                        });
                    });
                });
            }), ed.onPastePostProcess.add(function(ed, args) {
                var dom = ed.dom;
                dom.addClass(dom.select("table", args.node), "mce-item-table"), 
                each(dom.select("td[valign]", args.node), function(elm) {
                    dom.setStyle(elm, "vertical-align", elm.getAttribute("valign")), 
                    elm.removeAttribute("valign");
                });
            }), !1 !== ed.settings.table_merge_content_on_paste && ed.onPasteBeforeInsert.add(function(ed, o) {
                var table, dom = ed.dom, elm = o.node;
                (elm = o.internal && !elm ? ed.dom.create("div", {}, o.content) : elm) && (table = elm.firstChild) && "TABLE" === table.nodeName && 1 === elm.childNodes.length && (elm = ed.selection.getNode(), 
                dom = dom.getParent(elm, "td,th")) && function(ed, startCell, table) {
                    for (var dom = ed.dom, existingTable = dom.getParent(startCell, "table"), startRowIndex = startCell.parentNode.rowIndex, startColIndex = Array.prototype.indexOf.call(startCell.parentNode.cells, startCell), maxCellsInNewContent = 0, i = 0; i < table.rows.length; i++) maxCellsInNewContent = Math.max(maxCellsInNewContent, table.rows[i].cells.length);
                    var requiredCellCount = startColIndex + maxCellsInNewContent, extraCellsNeeded = 0;
                    for ((ed = existingTable.rows[startRowIndex]) && (extraCellsNeeded = Math.max(0, requiredCellCount - ed.cells.length)), 
                    i = 0; i < existingTable.rows.length; i++) {
                        var currentRow = existingTable.rows[i];
                        if ("THEAD" !== currentRow.parentNode.tagName && "TH" !== currentRow.cells[0].tagName) for (var j = 0; j < extraCellsNeeded; j++) currentRow.insertCell(-1).innerHTML = '<br data-mce-bogus="1" />';
                    }
                    0 < extraCellsNeeded && existingTable.querySelectorAll("thead > tr").forEach(function(headerRow) {
                        for (var i = 0; i < extraCellsNeeded; i++) {
                            var newCell = dom.create("th");
                            newCell.innerHTML = '<br data-mce-bogus="1" />', headerRow.appendChild(newCell);
                        }
                    });
                    for (var totalRowsNeeded = startRowIndex + table.rows.length; existingTable.rows.length < totalRowsNeeded; ) for (var newRow = existingTable.insertRow(-1), i = 0; i < requiredCellCount; i++) newRow.insertCell(-1).innerHTML = '<br data-mce-bogus="1" />';
                    for (i = 0; i < table.rows.length; i++) for (currentRow = existingTable.rows[startRowIndex + i] || existingTable.insertRow(startRowIndex + i), 
                    j = 0; j < table.rows[i].cells.length; j++) {
                        for (var targetCellIndex = startColIndex + j; currentRow.cells.length <= targetCellIndex; ) currentRow.insertCell(-1).innerHTML = '<br data-mce-bogus="1" />';
                        var cell = table.rows[i].cells[j];
                        "" === cell.innerHTML.trim() && (cell.innerHTML = '<br data-mce-bogus="1" />'), 
                        currentRow.cells[targetCellIndex].innerHTML = cell.innerHTML;
                    }
                    return 1;
                }(ed, dom, table) && (o.terminate = !0, ed.undoManager.add());
            }), ed.onGetContent.add(function(ed, o) {
                var rows, sel;
                (o.selection || o.contextual) && (sel = ed.selection, sel = ed.dom.getParent(sel.getStart(), "table")) && (rows = [], 
                each(sel.rows, function(row) {
                    var cells = [];
                    each(row.cells, function(cell) {
                        ed.dom.hasClass(cell, "mceSelected") && cells.push(cell);
                    }), cells.length && (cells.length === row.cells.length ? rows.push(row) : rows.push(cells));
                }), rows.length) && (rows.length === sel.rows.length ? (sel = sel.cloneNode(!0), 
                ed.dom.removeClass(ed.dom.select("td.mceSelected,th.mceSelected", sel), "mceSelected"), 
                o.content = sel.outerHTML) : (sel = rows.map(function(row) {
                    return "<tr>" + row.map(function(cell) {
                        cell = cell.cloneNode(!0);
                        return ed.dom.removeClass(cell, "mceSelected"), cell.outerHTML;
                    }).join("") + "</tr>";
                }), o.content = "<table>" + sel.join("") + "</table>"));
            }), basic_dialog = ed.getParam("table_basic_dialog"), isMobile = window.matchMedia("(max-width: 600px)").matches, 
            (basic_dialog || isMobile) && (function(ed) {
                var cm = ed.controlManager, form = cm.createForm("table_form"), colsCtrl = cm.createTextBox("table_cols", {
                    label: ed.getLang("table.cols", "Columns"),
                    name: "cols",
                    subtype: "number",
                    attributes: {
                        step: 1,
                        min: 1
                    },
                    value: ed.getParam("table_default_cols", 2)
                }), rowCtrl = (form.add(colsCtrl), cm.createTextBox("table_rows", {
                    label: ed.getLang("table.rows", "Rows"),
                    name: "rows",
                    subtype: "number",
                    attributes: {
                        step: 1,
                        min: 1
                    },
                    value: ed.getParam("table_default_rows", 2)
                })), cellspacingCtrl = (form.add(rowCtrl), cm.createTextBox("table_cellspacing", {
                    label: ed.getLang("table.cellspacing", "Cell Spacing"),
                    name: "cellspacing",
                    subtype: "number",
                    attributes: {
                        step: 1,
                        min: 1
                    },
                    value: ed.getParam("table_default_cellspacing", "")
                })), cellspacingCtrl = (form.add(cellspacingCtrl), cm.createTextBox("table_cellpadding", {
                    label: ed.getLang("table.cellpadding", "Cell Padding"),
                    name: "cellpadding",
                    subtype: "number",
                    attributes: {
                        step: 1,
                        min: 1
                    },
                    value: ed.getParam("table_default_cellpadding", "")
                })), cellspacingCtrl = (form.add(cellspacingCtrl), cm.createTextBox("table_width", {
                    label: ed.getLang("table.width", "Width"),
                    name: "width",
                    value: ed.getParam("table_default_width", "")
                })), cellspacingCtrl = (form.add(cellspacingCtrl), cm.createTextBox("table_height", {
                    label: ed.getLang("table.height", "Height"),
                    name: "height",
                    value: ed.getParam("table_default_height", "")
                })), cellspacingCtrl = (form.add(cellspacingCtrl), cm.createStylesBox("table_classes", {
                    label: ed.getLang("table.classes", "Classes"),
                    onselect: function(v) {},
                    name: "classes",
                    styles: ed.getParam("table_classes_custom", [])
                })), cellspacingCtrl = (form.add(cellspacingCtrl), cm.createCheckBox("table_caption", {
                    label: ed.getLang("table.caption", "Caption"),
                    name: "caption"
                }));
                function setValue(key, value) {
                    key = cm.get(ed.id + "_table_" + key);
                    key && key.value(value);
                }
                form.add(cellspacingCtrl), ed.addCommand("mceInsertTable", function() {
                    ed.windowManager.open({
                        title: ed.getLang("table.desc", "Table"),
                        items: [ form ],
                        size: "mce-modal-landscape-small",
                        open: function() {
                            var label = ed.getLang("insert", "Insert"), elm = ed.dom.getParent(ed.selection.getNode(), "table"), classes = ed.getParam("table_classes", "");
                            if (classes.trim().split(" ").filter(function(cls) {
                                return "" !== cls.trim();
                            }), elm) {
                                for (var label = ed.getLang("update", "Update"), rowsAr = elm.rows, rows = rowsAr.length, cols = 0, i = 0; i < rows; i++) rowsAr[i].cells.length > cols && (cols = rowsAr[i].cells.length);
                                setValue("caption", 0 < elm.getElementsByTagName("caption").length), 
                                rowCtrl.setDisabled(!0), colsCtrl.setDisabled(!0), 
                                setValue("cellspacing", elm.cellSpacing || ""), 
                                setValue("cellpadding", elm.cellPadding || "");
                                var styles = ed.dom.parseStyle(ed.dom.getAttrib(elm, "style")), width = styles.width || elm.width || "", styles = styles.height || elm.height || "";
                                width = width.replace("px", ""), styles = styles.replace("px", ""), 
                                setValue("width", width), setValue("height", styles), 
                                classes = (classes = ed.dom.getAttrib(elm, "class")).replace(/mce-[\w\-]+/g, "").replace(/\s+/g, " ").trim().split(" ").filter(function(cls) {
                                    return "" !== cls.trim();
                                });
                            }
                            setValue("classes", classes), DOM.setHTML(this.id + "_insert", label);
                        },
                        buttons: [ {
                            title: ed.getLang("common.cancel", "Cancel"),
                            id: "cancel"
                        }, {
                            title: ed.getLang("insert", "Insert"),
                            id: "insert",
                            onsubmit: function(e) {
                                var data = form.submit(), args = (data.width && !isNaN(data.width) && (data.width += "px"), 
                                data.height && !isNaN(data.height) && (data.height += "px"), 
                                {
                                    cellspacing: data.cellspacing,
                                    cellpadding: data.cellpadding,
                                    style: {
                                        width: data.width,
                                        height: data.height
                                    },
                                    class: data.classes
                                }), elm = ed.dom.getParent(ed.selection.getNode(), "table");
                                if (elm) {
                                    var styles = ed.dom.parseStyle(ed.dom.getAttrib(elm, "style"));
                                    extend(styles, args.style), args.style = ed.dom.serializeStyle(styles), 
                                    ed.dom.setAttribs(elm, args), data.caption ? elm.getElementsByTagName("caption").length || ((styles = elm.ownerDocument.createElement("caption")).innerHTML = '<br data-mce-bogus="1"/>', 
                                    elm.insertBefore(styles, elm.firstChild)) : (styles = elm.getElementsByTagName("caption")).length && elm.removeChild(styles[0]);
                                } else {
                                    var html = "";
                                    data.caption && (html += '<caption><br data-mce-bogus="1" /></caption>');
                                    for (var y = 0; y < data.rows; y++) {
                                        html += "<tr>";
                                        for (var x = 0; x < data.cols; x++) html += "<td>&nbsp;</td>";
                                        html += "</tr>";
                                    }
                                    args.style = ed.dom.serializeStyle(args.style);
                                    elm = ed.dom.createHTML("table", args, html);
                                    insertTableHtml(ed, elm);
                                }
                                ed.addVisual(), Event.cancel(e);
                            },
                            classes: "primary",
                            scope: self
                        } ]
                    });
                });
            }(ed), function(ed) {
                var cm = ed.controlManager, form = cm.createForm("table_row_form"), rowtypeCtrl = cm.createListBox("table_row_type", {
                    label: ed.getLang("table.rowtype", "Row Type"),
                    name: "rowtype",
                    onselect: function() {}
                }), items = [ {
                    title: ed.getLang("table.thead", "Header"),
                    value: "thead"
                }, {
                    title: ed.getLang("table.tbody", "Body"),
                    value: "tbody"
                }, {
                    title: ed.getLang("table.tfoot", "Footer"),
                    value: "tfoot"
                } ], heightCtrl = (each(items, function(item) {
                    rowtypeCtrl.add(item.title, item.value);
                }), form.add(rowtypeCtrl), cm.createTextBox("table_row_height", {
                    label: ed.getLang("table.height", "Height"),
                    name: "height"
                })), stylesList = (form.add(heightCtrl), cm.createStylesBox("table_row_classes", {
                    label: ed.getLang("table.classes", "Classes"),
                    onselect: function(v) {},
                    name: "classes",
                    styles: ed.getParam("table_classes_custom", [])
                }));
                form.add(stylesList), ed.addCommand("mceTableRowProps", function() {
                    ed.windowManager.open({
                        title: ed.getLang("table.row_desc", "Table Rows"),
                        items: [ form ],
                        size: "mce-modal-landscape-small",
                        open: function() {
                            var label = ed.getLang("insert", "Insert"), elm = ed.dom.getParent(ed.selection.getStart(), "tr"), rowtype = elm.parentNode.nodeName.toLowerCase(), height = "";
                            elm && (label = ed.getLang("update", "Update"), height = elm.style.height || elm.height || ""), 
                            -1 !== height.indexOf("px") && (height = height.replace("px", "")), 
                            heightCtrl.value(height), rowtypeCtrl.value(rowtype);
                            height = (height = ed.dom.getAttrib(elm, "class")).replace(/mce-[\w\-]+/g, "").replace(/\s+/g, " ").trim().split(" ").filter(function(cls) {
                                return "" !== cls.trim();
                            });
                            stylesList.value(height), DOM.setHTML(this.id + "_insert", label);
                        },
                        buttons: [ {
                            title: ed.getLang("common.cancel", "Cancel"),
                            id: "cancel"
                        }, {
                            title: ed.getLang("insert", "Insert"),
                            id: "insert",
                            onsubmit: function(e) {
                                var data = form.submit(), elm = ed.dom.getParent(ed.selection.getStart(), "tr"), selected = ed.dom.select("td.mceSelected,th.mceSelected", elm), selected = (data.action = selected.length ? "all" : "insert", 
                                data.style = ed.dom.parseStyle(ed.dom.getAttrib(elm, "style")), 
                                data.height && !isNaN(data.height) && (data.height += "px"), 
                                data.style.height = data.height, {
                                    style: ed.dom.serializeStyle(data.style),
                                    rowtype: data.rowtype,
                                    action: data.action,
                                    class: data.classes
                                });
                                updateRows(ed, selected), Event.cancel(e);
                            },
                            classes: "primary",
                            scope: self
                        } ]
                    });
                });
            }(ed), function(ed) {
                var cm = ed.controlManager, form = cm.createForm("table_cell_form"), celltypeCtrl = cm.createListBox("table_cell_type", {
                    label: ed.getLang("table.celltype", "Cell Type"),
                    name: "celltype",
                    onselect: function() {}
                }), items = [ {
                    title: ed.getLang("table.th", "Header"),
                    value: "th"
                }, {
                    title: ed.getLang("table.td", "Data"),
                    value: "td"
                } ], widthCtrl = (each(items, function(item) {
                    celltypeCtrl.add(item.title, item.value);
                }), form.add(celltypeCtrl), cm.createTextBox("table_cell_width", {
                    label: ed.getLang("table.width", "Width"),
                    name: "width"
                })), heightCtrl = (form.add(widthCtrl), cm.createTextBox("table_cell_height", {
                    label: ed.getLang("table.height", "Height"),
                    name: "height"
                })), stylesList = (form.add(heightCtrl), cm.createStylesBox("table_cell_classes", {
                    label: ed.getLang("table.classes", "Classes"),
                    onselect: function(v) {},
                    name: "classes",
                    styles: ed.getParam("table_classes_custom", [])
                }));
                form.add(stylesList), ed.addCommand("mceTableCellProps", function() {
                    ed.windowManager.open({
                        title: ed.getLang("table.row_desc", "Table Cells"),
                        items: [ form ],
                        size: "mce-modal-landscape-small",
                        open: function() {
                            var label = ed.getLang("insert", "Insert"), elm = ed.dom.getParent(ed.selection.getStart(), "td,th"), celltype = elm.nodeName.toLowerCase(), width = "", height = "";
                            elm && (label = ed.getLang("update", "Update"), width = elm.width || "", 
                            height = elm.height || "", width = (styles = ed.dom.parseStyle(ed.dom.getAttrib(elm, "style"))).width || "", 
                            height = styles.height || ""), width = width.replace("px", ""), 
                            height = height.replace("px", ""), widthCtrl.value(width), 
                            heightCtrl.value(height), celltypeCtrl.value(celltype);
                            var styles = (styles = ed.dom.getAttrib(elm, "class")).replace(/mce-[\w\-]+/g, "").replace(/\s+/g, " ").trim().split(" ").filter(function(cls) {
                                return "" !== cls.trim();
                            });
                            stylesList.value(styles), DOM.setHTML(this.id + "_insert", label);
                        },
                        buttons: [ {
                            title: ed.getLang("common.cancel", "Cancel"),
                            id: "cancel"
                        }, {
                            title: ed.getLang("insert", "Insert"),
                            id: "insert",
                            onsubmit: function(e) {
                                var data = form.submit(), elm = ed.dom.getParent(ed.selection.getStart(), "tr"), elm = (data.style = ed.dom.parseStyle(ed.dom.getAttrib(elm, "style")), 
                                data.width && !isNaN(data.width) && (data.width += "px"), 
                                data.height && !isNaN(data.height) && (data.height += "px"), 
                                data.style.width = data.width, data.style.height = data.height, 
                                {
                                    style: ed.dom.serializeStyle(data.style),
                                    celltype: data.celltype,
                                    class: data.classes
                                });
                                updateCells(ed, elm), Event.cancel(e);
                            },
                            classes: "primary",
                            scope: self
                        } ]
                    });
                });
            }(ed)), function(ed) {
                var cm = ed.controlManager, form = cm.createForm("table_merge_form"), colsCtrl = cm.createTextBox("table_merge_cols", {
                    label: ed.getLang("table.cols", "Columns"),
                    name: "cols",
                    subtype: "number",
                    value: 1
                }), rowsCtrl = (form.add(colsCtrl), cm.createTextBox("table_merge_rows", {
                    label: ed.getLang("table.rows", "Rows"),
                    name: "rows",
                    subtype: "number",
                    value: 1
                }));
                form.add(rowsCtrl), ed.addCommand("mceTableMergeCells", function() {
                    var grid = createTableGrid();
                    ed.dom.select("td.mceSelected,th.mceSelected").length ? (grid.merge(), 
                    ed.execCommand("mceRepaint"), cleanup()) : ed.windowManager.open({
                        title: ed.getLang("table.merge_cells_desc", "Merge Cells"),
                        items: [ form ],
                        size: "mce-modal-landscape-small",
                        open: function() {
                            var cell = ed.dom.getParent(ed.selection.getNode(), "th,td"), rowSpan = 1, colSpan = 1;
                            cell && (rowSpan = cell.rowSpan, colSpan = cell.colSpan), 
                            colsCtrl.value(colSpan), rowsCtrl.value(rowSpan);
                        },
                        buttons: [ {
                            title: ed.getLang("common.cancel", "Cancel"),
                            id: "cancel"
                        }, {
                            title: ed.getLang("update", "Update"),
                            id: "insert",
                            onsubmit: function(e) {
                                var data = form.submit(), grid = createTableGrid(), node = ed.selection.getNode(), node = ed.dom.getParent(node, "th,td");
                                grid.merge(node, data.cols, data.rows), ed.execCommand("mceRepaint"), 
                                cleanup(), Event.cancel(e);
                            },
                            classes: "primary",
                            scope: self
                        } ]
                    });
                });
            }(ed);
        }), ed.onPreProcess.add(function(ed, args) {
            var nodes, i, node, value, dom = ed.dom;
            if ("html4" === ed.settings.schema) for (i = (nodes = dom.select("table,td,th,tr", args.node)).length; i--; ) {
                node = nodes[i], dom.setAttrib(node, "data-mce-style", ""), "auto" === dom.getStyle(node, "margin-left") && "auto" === dom.getStyle(node, "margin-right") && (dom.setAttrib(node, "align", "center"), 
                dom.setStyles(node, {
                    "margin-left": "",
                    "margin-right": ""
                }));
                var flt = dom.getStyle(node, "float"), flt = ("left" !== flt && "right" !== flt || (dom.setAttrib(node, "align", flt), 
                dom.setStyle(node, "float", "")), dom.getStyle(node, "text-align"));
                flt && (dom.setAttrib(node, "align", flt), dom.setStyle(node, "text-align", ""));
            }
            for (i = (nodes = dom.select("table, td, th", args.node)).length; i--; ) node = nodes[i], 
            (value = dom.getAttrib(node, "width")) && (dom.setStyle(node, "width", value), 
            dom.setAttrib(node, "width", "")), (value = dom.getAttrib(node, "height")) && (dom.setStyle(node, "height", value), 
            dom.setAttrib(node, "height", ""));
        }), ed.onNodeChange.add(function(ed, cm, n) {
            var p;
            n = ed.selection.getStart(), p = ed.dom.getParent(n, "td,th,caption"), 
            cm.setActive("table", "TABLE" === n.nodeName || !!p), p && "CAPTION" === p.nodeName && (p = 0), 
            ed.getParam("table_buttons", 1) && (cm.setDisabled("delete_table", !p), 
            cm.setDisabled("delete_col", !p), cm.setDisabled("delete_table", !p), 
            cm.setDisabled("delete_row", !p), cm.setDisabled("col_after", !p), cm.setDisabled("col_before", !p), 
            cm.setDisabled("row_after", !p), cm.setDisabled("row_before", !p), cm.setDisabled("row_props", !p), 
            cm.setDisabled("cell_props", !p), cm.setDisabled("split_cells", !p), 
            cm.setDisabled("merge_cells", !p), cm.setDisabled("table_props", !p));
        }), ed.onClick.add(function(ed, e) {
            var n = e.target;
            "TABLE" == (n = e.altKey && ed.dom.is(n, "td,th,caption") ? ed.dom.getParent(n, "table") : n).nodeName && (ed.selection.select(n), 
            ed.nodeChanged());
        }), ed.onInit.add(function(ed) {
            var tableGrid, getSingleChildNode, isTextNode, startCell, startTable, lastMouseOverTarget, dom = ed.dom;
            function isCellInTable(table, cell) {
                return table && cell && table === dom.getParent(cell, "table");
            }
            function moveWebKitSelection() {
                function eventHandler(e) {
                    var preBrowserNode, node, key = e.keyCode;
                    function handle(upBool, sourceNode) {
                        var siblingDirection = upBool ? "previousSibling" : "nextSibling", currentRow = ed.dom.getParent(sourceNode, "tr"), siblingRow = currentRow[siblingDirection];
                        if (siblingRow) return moveCursorToRow(ed, sourceNode, siblingRow, upBool), 
                        e.preventDefault(), !0;
                        var siblingRow = ed.dom.getParent(currentRow, "table"), middleNode = currentRow.parentNode, parentNodeName = middleNode.nodeName.toLowerCase();
                        if ("tbody" === parentNodeName || parentNodeName === (upBool ? "tfoot" : "thead")) {
                            parentNodeName = function(upBool, topNode, secondNode, nodeName) {
                                var nodeName = ed.dom.select(">" + nodeName, topNode), position = nodeName.indexOf(secondNode);
                                {
                                    if (upBool && 0 === position || !upBool && position === nodeName.length - 1) return function(upBool, parent) {
                                        upBool = upBool ? "thead" : "tfoot", upBool = ed.dom.select(">" + upBool, parent);
                                        return 0 !== upBool.length ? upBool[0] : null;
                                    }(upBool, topNode);
                                    if (-1 === position) return topNode = "thead" === secondNode.tagName.toLowerCase() ? 0 : nodeName.length - 1, 
                                    nodeName[topNode];
                                }
                                return nodeName[position + (upBool ? -1 : 1)];
                            }(upBool, siblingRow, middleNode, "tbody");
                            if (null !== parentNodeName) return function(upBool, targetParent, sourceNode) {
                                targetParent = getChildForDirection(targetParent, upBool);
                                targetParent && moveCursorToRow(ed, sourceNode, targetParent, upBool);
                                return e.preventDefault(), !0;
                            }(upBool, parentNodeName, sourceNode);
                        }
                        return function(upBool, currentRow, siblingDirection, table) {
                            siblingDirection = table[siblingDirection];
                            if (siblingDirection) return moveCursorToStartOfElement(siblingDirection), 
                            !0;
                            siblingDirection = ed.dom.getParent(table, "td,th");
                            if (siblingDirection) return handle(upBool, siblingDirection);
                            return moveCursorToStartOfElement(getChildForDirection(currentRow, !upBool)), 
                            e.preventDefault(), !1;
                        }(upBool, currentRow, siblingDirection, siblingRow);
                    }
                    function getChildForDirection(parent, up) {
                        parent = parent && parent[up ? "lastChild" : "firstChild"];
                        return parent && "BR" === parent.nodeName ? ed.dom.getParent(parent, "td,th") : parent;
                    }
                    function moveCursorToStartOfElement(n) {
                        ed.selection.setCursorLocation(n, 0);
                    }
                    function moveCursorToRow(ed, node, row, upBool) {
                        ed = function(rowElement, columnIndex) {
                            var c = 0, r = 0;
                            return each(rowElement.children, function(cell, i) {
                                if (c += getSpanVal(cell, "colspan"), r = i, columnIndex < c) return !1;
                            }), r;
                        }(row, function(column) {
                            for (var colIndex = 0, c = column; c.previousSibling; ) colIndex += getSpanVal(c = c.previousSibling, "colspan");
                            return colIndex;
                        }(ed.dom.getParent(node, "td,th"))), node = row.childNodes[ed];
                        moveCursorToStartOfElement(getChildForDirection(node, upBool) || node);
                    }
                    function shouldFixCaret(preBrowserNode) {
                        var newNode = ed.selection.getNode(), newNode = ed.dom.getParent(newNode, "td,th"), preBrowserNode = ed.dom.getParent(preBrowserNode, "td,th");
                        return newNode && newNode !== preBrowserNode && (preBrowserNode = preBrowserNode, 
                        ed.dom.getParent(newNode, "TABLE") === ed.dom.getParent(preBrowserNode, "TABLE"));
                    }
                    key != VK.UP && key != VK.DOWN || (node = ed.selection.getNode(), 
                    null === ed.dom.getParent(node, "tr")) || (preBrowserNode = ed.selection.getNode(), 
                    Delay.setEditorTimeout(ed, function() {
                        shouldFixCaret(preBrowserNode) && handle(!e.shiftKey && key === VK.UP, preBrowserNode);
                    }, 0));
                }
                ed.onKeyDown.add(function(e) {
                    eventHandler(e);
                });
            }
            function fixBeforeTableCaretBug() {
                ed.onKeyDown.add(function(e) {
                    var rng, table, dom = ed.dom;
                    (37 == e.keyCode || 38 == e.keyCode) && (rng = ed.selection.getRng(), 
                    table = dom.getParent(rng.startContainer, "table")) && ed.getBody().firstChild == table && function(rng, par) {
                        var doc = par.ownerDocument, rng2 = doc.createRange();
                        return rng2.setStartBefore(par), rng2.setEnd(rng.endContainer, rng.endOffset), 
                        (par = doc.createElement("body")).appendChild(rng2.cloneContents()), 
                        0 === par.innerHTML.replace(/<(br|img|object|embed|input|textarea)[^>]*>/gi, "-").replace(/<[^>]+>/g, "").length;
                    }(rng, table) && ((rng = dom.createRng()).setStartBefore(table), 
                    rng.setEndBefore(table), ed.selection.setRng(rng), e.preventDefault());
                });
            }
            function fixTableCaretPos() {
                ed.dom.bind("KeyDown SetContent VisualAid", function() {
                    for (var last = ed.getBody().lastChild; last; last = last.previousSibling) if (3 == last.nodeType) {
                        if (0 < last.nodeValue.length) break;
                    } else if (1 == last.nodeType && ("BR" == last.tagName || !last.getAttribute("data-mce-bogus"))) break;
                    last && "TABLE" == last.nodeName && (ed.settings.forced_root_block ? ed.dom.add(ed.getBody(), ed.settings.forced_root_block, ed.settings.forced_root_block_attrs, '<br data-mce-bogus="1" />') : ed.dom.add(ed.getBody(), "br", {
                        "data-mce-bogus": "1"
                    }));
                }), ed.onPreProcess.add(function(ed, o) {
                    o = o.node.lastChild;
                    o && ("BR" == o.nodeName || 1 == o.childNodes.length && ("BR" == o.firstChild.nodeName || "\xa0" == o.firstChild.nodeValue)) && o.previousSibling && "TABLE" == o.previousSibling.nodeName && ed.dom.remove(o);
                });
            }
            function fixTableCellSelection() {
                function fixSelection() {
                    var rng = ed.selection.getRng(), n = ed.selection.getNode(), currentCell = ed.dom.getParent(rng.startContainer, "TD,TH");
                    if (function(ed, rng, n, currentCell) {
                        var tableParent;
                        return (ed = ed.dom.getParent(rng.startContainer, "TABLE")) && (tableParent = ed.parentNode), 
                        ed = 3 == rng.startContainer.nodeType && 0 === rng.startOffset && 0 === rng.endOffset && currentCell && ("TR" == n.nodeName || n == tableParent), 
                        rng = ("TD" == n.nodeName || "TH" == n.nodeName) && !currentCell, 
                        ed || rng;
                    }(ed, rng, n, currentCell)) {
                        for (var end = (currentCell = currentCell || n).lastChild; end.lastChild; ) end = end.lastChild;
                        3 == end.nodeType && (rng.setEnd(end, end.data.length), 
                        ed.selection.setRng(rng));
                    }
                }
                ed.onKeyDown.add(function() {
                    fixSelection();
                }), ed.onMouseDown.add(function(e) {
                    2 != e.button && fixSelection();
                });
            }
            function placeCaretInCell(cell) {
                ed.selection.select(cell, !0), ed.selection.collapse(!0);
            }
            function clearCell(cell) {
                ed.dom.empty(cell), function(cell) {
                    cell.hasChildNodes() || (cell.innerHTML = '<br data-mce-bogus="1" />');
                }(cell);
            }
            function restoreCaretPlaceholder(node, insertCaret) {
                var rng = ed.selection.getRng(), caretNode = node.ownerDocument.createTextNode("\xa0");
                rng.startOffset ? node.insertBefore(caretNode, node.firstChild) : node.appendChild(caretNode), 
                insertCaret && (ed.selection.select(caretNode, !0), ed.selection.collapse(!0));
            }
            function getSingleChr(node) {
                return node = getSingleChildNode(node), isTextNode(node) && 1 === node.data.length ? node.data : null;
            }
            function isEmptyNode(node) {
                return ed.dom.isEmpty(node) || "\xa0" === getSingleChr(node);
            }
            winMan = ed.windowManager, "html4" === ed.settings.schema && tinymce.each("left,center,right,full".split(","), function(name) {
                var fmts = ed.formatter.get("align" + name);
                tinymce.each(fmts, function(fmt) {
                    fmt.onformat = function(elm, fmt) {
                        /^(TABLE|TH|TD|TR)$/.test(elm.nodeName) && ("full" === name && (name = "justify"), 
                        ed.dom.setAttrib(elm, "align", name));
                    };
                });
            }), ed.onKeyUp.add(function(ed, e) {
                cleanup();
            }), ed.onKeyDown.add(function(e) {
                var selectedTableCells, cell, table;
                e.keyCode != VK.DELETE && e.keyCode != VK.BACKSPACE || e.isDefaultPrevented() || (table = ed.dom.getParent(ed.selection.getStart(), "table")) && (table = ed.dom.select("td,th", table), 
                0 === (selectedTableCells = tinymce.grep(table, function(cell) {
                    return !!ed.dom.getAttrib(cell, "data-mce-selected");
                })).length ? (cell = ed.dom.getParent(ed.selection.getStart(), "td,th"), 
                ed.selection.isCollapsed() && cell && ed.dom.isEmpty(cell) && (e.preventDefault(), 
                clearCell(cell), placeCaretInCell(cell))) : (e.preventDefault(), 
                ed.undoManager.add(), table.length == selectedTableCells.length ? ed.execCommand("mceTableDelete") : (tinymce.each(selectedTableCells, clearCell), 
                placeCaretInCell(selectedTableCells[0]))));
            }), getSingleChildNode = function(node) {
                return node.firstChild === node.lastChild && node.firstChild;
            }, isTextNode = function(node) {
                return node && 3 === node.nodeType;
            }, ed.onKeyDown.add(function(e) {
                var container, node;
                (function(e) {
                    return (e.keyCode == VK.DELETE || e.keyCode == VK.BACKSPACE) && !e.isDefaultPrevented();
                })(e) && (container = ed.dom.getParent(ed.selection.getStart(), "caption"), 
                node = container) && "CAPTION" == node.nodeName && "TABLE" == node.parentNode.nodeName && (tinymce.isIE && (ed.selection.isCollapsed() ? function(node) {
                    var childNode = getSingleChildNode(node), node = getSingleChr(node);
                    return childNode && !isTextNode(childNode) || node && !("\xa0" === node);
                }(container) && restoreCaretPlaceholder(container) : (ed.undoManager.add(), 
                ed.execCommand("Delete"), isEmptyNode(container) && restoreCaretPlaceholder(container, !0), 
                e.preventDefault())), isEmptyNode(container)) && e.preventDefault();
            }), ed.onMouseDown.add(function(ed, e) {
                2 != e.button && (cleanup(), startCell = dom.getParent(e.target, "td,th"), 
                startTable = dom.getParent(startCell, "table"));
            }), dom.bind(ed.getDoc(), "mouseover", function(e) {
                var currentCell, target = e.target;
                if (target !== lastMouseOverTarget && (lastMouseOverTarget = target, 
                startTable) && startCell && (currentCell = dom.getParent(target, "td,th"), 
                isCellInTable(startTable, currentCell) || (currentCell = dom.getParent(startTable, "td,th")), 
                startCell !== currentCell || hasCellSelection) && isCellInTable(startTable, currentCell)) {
                    e.preventDefault(), tableGrid || ((tableGrid = createTableGrid(startTable)).setStartCell(startCell), 
                    ed.getBody().style.webkitUserSelect = "none"), tableGrid.setEndCell(currentCell), 
                    hasCellSelection = !0, target = ed.selection.getSel();
                    try {
                        target.removeAllRanges ? target.removeAllRanges() : target.empty();
                    } catch (ex) {}
                }
            }), ed.onMouseUp.add(function() {
                var selectedCells, walker, lastNode, sel = ed.selection;
                function setPoint(node, start) {
                    var walker = new TreeWalker(node, node);
                    do {
                        if (3 == node.nodeType) return void (start ? rng.setStart(node, 0) : rng.setEnd(node, node.nodeValue.length));
                        if ("BR" == node.nodeName) return void (start ? rng.setStartBefore(node) : rng.setEndBefore(node));
                    } while (node = start ? walker.next() : walker.prev());
                }
                if (startCell) {
                    if (tableGrid && (ed.getBody().style.webkitUserSelect = ""), 
                    0 < (selectedCells = dom.select("td.mceSelected,th.mceSelected")).length) {
                        var parent = dom.getParent(selectedCells[0], "table"), rng = dom.createRng(), node = selectedCells[0];
                        rng.setStartBefore(node), rng.setEndAfter(node), setPoint(node, 1), 
                        walker = new TreeWalker(node, parent);
                        do {
                            if ("TD" == node.nodeName || "TH" == node.nodeName) {
                                if (!dom.hasClass(node, "mceSelected")) break;
                                lastNode = node;
                            }
                        } while (node = walker.next());
                        setPoint(lastNode), sel.setRng(rng);
                    }
                    ed.nodeChanged(), startCell = tableGrid = startTable = lastMouseOverTarget = null;
                }
            }), tinymce.isWebKit && (moveWebKitSelection(), fixTableCellSelection()), 
            tinymce.isGecko && (fixBeforeTableCaretBug(), fixTableCaretPos()), (9 < tinymce.isIE || tinymce.isIE12) && (fixBeforeTableCaretBug(), 
            fixTableCaretPos()), ed && ed.plugins.contextmenu && ed.plugins.contextmenu.onContextMenu.add(function(th, m, e) {
                ed.dom.getParent(e, "td") || ed.dom.getParent(e, "th") || ed.dom.select("td.mceSelected,th.mceSelected").length ? (m.add({
                    title: "table.desc",
                    icon: "table",
                    cmd: "mceInsertTable",
                    value: {
                        action: "insert"
                    }
                }), m.add({
                    title: "table.props_desc",
                    icon: "table_props",
                    cmd: "mceInsertTable"
                }), m.add({
                    title: "table.del",
                    icon: "delete_table",
                    cmd: "mceTableDelete"
                }), m.addSeparator(), (e = m.addMenu({
                    title: "table.cell"
                })).add({
                    title: "table.cell_desc",
                    icon: "cell_props",
                    cmd: "mceTableCellProps"
                }), e.add({
                    title: "table.split_cells_desc",
                    icon: "split_cells",
                    cmd: "mceTableSplitCells"
                }), e.add({
                    title: "table.merge_cells_desc",
                    icon: "merge_cells",
                    cmd: "mceTableMergeCells"
                }), (e = m.addMenu({
                    title: "table.row"
                })).add({
                    title: "table.row_desc",
                    icon: "row_props",
                    cmd: "mceTableRowProps"
                }), e.add({
                    title: "table.row_before_desc",
                    icon: "row_before",
                    cmd: "mceTableInsertRowBefore"
                }), e.add({
                    title: "table.row_after_desc",
                    icon: "row_after",
                    cmd: "mceTableInsertRowAfter"
                }), e.add({
                    title: "table.delete_row_desc",
                    icon: "delete_row",
                    cmd: "mceTableDeleteRow"
                }), e.addSeparator(), e.add({
                    title: "table.cut_row_desc",
                    icon: "cut",
                    cmd: "mceTableCutRow"
                }), e.add({
                    title: "table.copy_row_desc",
                    icon: "copy",
                    cmd: "mceTableCopyRow"
                }), e.add({
                    title: "table.paste_row_before_desc",
                    icon: "paste",
                    cmd: "mceTablePasteRowBefore"
                }).setDisabled(!clipboardRows), e.add({
                    title: "table.paste_row_after_desc",
                    icon: "paste",
                    cmd: "mceTablePasteRowAfter"
                }).setDisabled(!clipboardRows), (e = m.addMenu({
                    title: "table.col"
                })).add({
                    title: "table.col_before_desc",
                    icon: "col_before",
                    cmd: "mceTableInsertColBefore"
                }), e.add({
                    title: "table.col_after_desc",
                    icon: "col_after",
                    cmd: "mceTableInsertColAfter"
                }), e.add({
                    title: "table.delete_col_desc",
                    icon: "delete_col",
                    cmd: "mceTableDeleteCol"
                })) : m.add({
                    title: "table.desc",
                    icon: "table",
                    cmd: "mceInsertTable"
                });
            });
        });
        url = ed.getParam("site_url") + "index.php?option=com_jce&task=plugin.display&plugin=table";
        each({
            mceTableSplitCells: function(grid) {
                grid.split();
            },
            mceTableInsertRowBefore: function(grid) {
                grid.insertRow(!0);
            },
            mceTableInsertRowAfter: function(grid) {
                grid.insertRow();
            },
            mceTableInsertColBefore: function(grid) {
                grid.insertCol(!0);
            },
            mceTableInsertColAfter: function(grid) {
                grid.insertCol();
            },
            mceTableDeleteCol: function(grid) {
                grid.deleteCols();
            },
            mceTableDeleteRow: function(grid) {
                grid.deleteRows();
            },
            mceTableCutRow: function(grid) {
                clipboardRows = grid.cutRows();
            },
            mceTableCopyRow: function(grid) {
                clipboardRows = grid.copyRows();
            },
            mceTablePasteRowBefore: function(grid) {
                grid.pasteRows(clipboardRows, !0);
            },
            mceTablePasteRowAfter: function(grid) {
                grid.pasteRows(clipboardRows);
            },
            mceTableDelete: function(grid) {
                grid.deleteTable();
            }
        }, function(func, name) {
            ed.addCommand(name, function() {
                var grid = createTableGrid();
                grid && (func(grid), ed.execCommand("mceRepaint"), cleanup());
            });
        }), each({
            mceInsertTable: function(val) {
                winMan.open({
                    url: url,
                    size: "mce-modal-landscape-xlarge"
                }, {
                    plugin_url: url,
                    action: val ? val.action : 0,
                    layout: "table"
                });
            },
            mceTableRowProps: function() {
                winMan.open({
                    url: url + "&slot=row",
                    size: "mce-modal-landscape-xlarge"
                }, {
                    plugin_url: url,
                    layout: "row"
                });
            },
            mceTableCellProps: function() {
                winMan.open({
                    url: url + "&slot=cell",
                    size: "mce-modal-landscape-xlarge"
                }, {
                    plugin_url: url,
                    layout: "cell"
                });
            }
        }, function(func, name) {
            ed.addCommand(name, function(ui, val) {
                func(val);
            });
        }), !1 !== ed.settings.table_tab_navigation && ed.onKeyDown.add(function(ed, e) {
            var cellElm, grid;
            9 == e.keyCode && (cellElm = ed.dom.getParent(ed.selection.getStart(), "th,td")) && (e.preventDefault(), 
            grid = createTableGrid(), e = e.shiftKey ? -1 : 1, ed.undoManager.add(), 
            !grid.moveRelIdx(cellElm, e)) && 0 < e && (grid.insertRow(), grid.refresh(), 
            grid.moveRelIdx(cellElm, e));
        }), this.createControl = function(n, cm) {
            function createMenuGrid(cols, rows) {
                for (var html = '<table role="presentation" class="mceTableSplitMenu"><tbody>', i = 0; i < rows; i++) {
                    html += "<tr>";
                    for (var x = 0; x < cols; x++) html += '<td><a href="#"></a></td>';
                    html += "</tr>";
                }
                return html = (html += "</tbody>") + ('<tfoot><tr><td colspan="' + rows + '" class="mceTableGridCount">&nbsp;</td></tr></tfoot>') + "</table>";
            }
            function menuGridMouseOver(e) {
                var e = e.target, tbody = ("TD" !== e.nodeName && (e = e.parentNode), 
                DOM.getParent(e, "tbody"));
                if (tbody) {
                    var i, rows = tbody.childNodes, tbody = e.parentNode, x = tinymce.inArray(tbody.childNodes, e), y = tinymce.inArray(rows, tbody);
                    if (!(x < 0 || y < 0)) {
                        for (i = 0; i < rows.length; i++) for (var cells = rows[i].childNodes, z = 0; z < cells.length; z++) x < z || y < i ? DOM.removeClass(cells[z], "selected") : DOM.addClass(cells[z], "selected");
                        DOM.setHTML(DOM.select("td.mceTableGridCount", n), y + 1 + " x " + (x + 1));
                    }
                }
            }
            function menuGridClick(e) {
                for (var el = e.target, el = ("TD" !== el.nodeName && (el = el.parentNode), 
                DOM.getParent(el, "table")), styles = [], width = ed.getParam("table_default_width"), width = (/^[0-9\.]+$/.test(width) && (width += "px"), 
                width && styles.push("width:" + width), ed.getParam("table_default_height")), width = (/^[0-9\.]+$/.test(width) && (width += "px"), 
                width && styles.push("height:" + width), ed.getParam("table_default_border", "")), html = "<table", width = ("" != (width = "html5" == ed.settings.schema && ed.settings.validate ? width && 1 : width) && (html += ' border="' + width + '"'), 
                ed.getParam("table_default_align", "")), classes = ed.getParam("table_classes", ""), rows = ("" != width && "html4" === ed.settings.schema && (html += ' align="' + width + '"'), 
                "" != width && "html4" !== ed.settings.schema && ("center" === width ? (styles.push("margin-left: auto"), 
                styles.push("margin-right: auto")) : styles.push("float: " + width)), 
                classes && (html += ' class="' + classes + '"'), styles.length && (html += ' style="' + styles.join(";") + ';"'), 
                html += ">", tinymce.grep(DOM.select("tr", el), function(row) {
                    return DOM.select("td.selected", row).length;
                })), y = 0; y < rows.length; y++) {
                    html += "<tr>";
                    for (var cols = DOM.select("td.selected", rows[y]).length, x = 0; x < cols; x++) html += "<td>" + (ed.settings.validate ? '<br data-mce-bogus="1"/>' : "&nbsp;") + "</td>";
                    html += "</tr>";
                }
                insertTableHtml(ed, html += "</table>"), ed.addVisual(), Event.cancel(e);
            }
            return "table_insert" === n ? ((cm = cm.createSplitButton("table_insert", {
                title: "table.desc",
                cmd: "mceInsertTable",
                class: "mce_table"
            })).onRenderMenu.add(function(c, m) {
                var tm, sm, sb = (ed.getParam("table_buttons", 1) ? m : tm = m.addMenu({
                    title: "table.desc",
                    icon: "table",
                    cmd: "mceInsertTable"
                })).add({
                    onmouseover: menuGridMouseOver,
                    onclick: menuGridClick,
                    html: createMenuGrid(8, 8)
                });
                m.onShowMenu.add(function() {
                    var n = DOM.get(sb.id);
                    n && (DOM.removeClass(DOM.select(".mceTableSplitMenu td", n), "selected"), 
                    DOM.setHTML(DOM.select(".mceTableSplitMenu .mceTableGridCount", n), "&nbsp;"));
                    var n = ed.selection.getNode(), p = DOM.getParent(n, "table");
                    tinymce.walk(m, function(o) {
                        if (o === sb || o === tm) return !1;
                        o.settings.cmd && o.setDisabled(!p);
                    }, "items", m);
                }), ed.getParam("table_buttons", 1) || (m.add({
                    title: "table.del",
                    icon: "delete_table",
                    cmd: "mceTableDelete"
                }), m.addSeparator(), (sm = m.addMenu({
                    title: "table.cell"
                })).add({
                    title: "table.cell_desc",
                    icon: "cell_props",
                    cmd: "mceTableCellProps"
                }), sm.add({
                    title: "table.split_cells_desc",
                    icon: "split_cells",
                    cmd: "mceTableSplitCells"
                }), sm.add({
                    title: "table.merge_cells_desc",
                    icon: "merge_cells",
                    cmd: "mceTableMergeCells"
                }), (sm = m.addMenu({
                    title: "table.row"
                })).add({
                    title: "table.row_desc",
                    icon: "row_props",
                    cmd: "mceTableRowProps"
                }), sm.add({
                    title: "table.row_before_desc",
                    icon: "row_before",
                    cmd: "mceTableInsertRowBefore"
                }), sm.add({
                    title: "table.row_after_desc",
                    icon: "row_after",
                    cmd: "mceTableInsertRowAfter"
                }), sm.add({
                    title: "table.delete_row_desc",
                    icon: "delete_row",
                    cmd: "mceTableDeleteRow"
                }), sm.addSeparator(), sm.add({
                    title: "table.cut_row_desc",
                    icon: "cut",
                    cmd: "mceTableCutRow"
                }), sm.add({
                    title: "table.copy_row_desc",
                    icon: "copy",
                    cmd: "mceTableCopyRow"
                }), sm.add({
                    title: "table.paste_row_before_desc",
                    icon: "paste",
                    cmd: "mceTablePasteRowBefore"
                }), sm.add({
                    title: "table.paste_row_after_desc",
                    icon: "paste",
                    cmd: "mceTablePasteRowAfter"
                }), (sm = m.addMenu({
                    title: "table.col"
                })).add({
                    title: "table.col_before_desc",
                    icon: "col_before",
                    cmd: "mceTableInsertColBefore"
                }), sm.add({
                    title: "table.col_after_desc",
                    icon: "col_after",
                    cmd: "mceTableInsertColAfter"
                }), sm.add({
                    title: "table.delete_col_desc",
                    icon: "delete_col",
                    cmd: "mceTableDeleteCol"
                }));
            }), cm) : null;
        };
    });
}(tinymce);tinymce/plugins/table/js/table.js000060400000060060152456167170013041 0ustar00/* jce - 2.9.99.2 | 2026-04-22 | https://www.joomlacontenteditor.net | Source: https://github.com/widgetfactory/jce | Copyright (C) 2006 - 2026 Ryan Demmer. All rights reserved | GNU/GPL Version 2 or later - http://www.gnu.org/licenses/gpl-2.0.html */
!function(tinymce, tinyMCEPopup, $) {
    function trimSize(size) {
        return (size = size.replace(/([0-9\.]+)(px|%|in|cm|mm|em|ex|pt|pc)/i, "$1$2")) ? size.replace(/px$/, "") : "";
    }
    function valueToHex(val) {
        return val && "#" !== val.charAt(0) ? "#" + val : val;
    }
    Wf.setStyles = function() {
        var key, ed = tinyMCEPopup.editor, $proxy = $("<div></div>"), proxy = $proxy.get(0), map = ($proxy.attr("style", $("#style").val()), 
        {
            "background-image": "backgroundimage",
            "border-spacing": "cellspacing",
            "border-collapse": "cellspacing",
            "vertical-align": "valign",
            "background-color": "bgcolor",
            float: "align",
            "text-align": "align"
        }), legacy = [ "align", "valign" ], border = ($.each([ "background-image", "width", "height", "border-spacing", "border-collapse", "vertical-align", "background-color", "text-align", "float" ], function(i, k) {
            var col, r, g, re, v = ed.dom.getStyle(proxy, k);
            return !("" != v && ($proxy.css(k, ""), "width" !== k && "height" !== k || (v = trimSize(v))) && ("background-image" === k && (v = v.replace(new RegExp("url\\(['\"]?([^'\"]*)['\"]?\\)", "gi"), "$1")), 
            "background-color" === k && (col = v, re = new RegExp("rgb\\s*\\(\\s*([0-9]+).*,\\s*([0-9]+).*,\\s*([0-9]+).*\\)", "gi"), 
            v = 3 == (re = col.replace(re, "$1,$2,$3").split(",")).length ? (r = parseInt(re[0], 10).toString(16), 
            g = parseInt(re[1], 10).toString(16), re = parseInt(re[2], 10).toString(16), 
            "#" + (1 == r.length ? "0" + r : r) + (1 == g.length ? "0" + g : g) + (1 == re.length ? "0" + re : re)) : col), 
            "border-spacing" === k && (v = trimSize(v)), "border-collapse" === k && "collapse" === v && (v = 0), 
            "float" !== k || "" === $("#align").val()) && (k = map[k] || k, !isHTML4 || -1 === $.inArray(k, legacy))) || void $("#" + k).val(v).trigger("change");
        }), "auto" === proxy.style.marginLeft && "auto" === proxy.style.marginRight && "" === $("#align").val() && ($("#align").val("center"), 
        $proxy.css({
            "margin-left": "",
            "margin-right": ""
        })), !1), initialStyles = {
            width: "medium",
            style: "none",
            color: "currentcolor"
        }, styles = ($.each([ "width", "color", "style" ], function(i, k) {
            var v = ed.dom.getStyle($proxy.get(0), "border-" + k);
            $.each([ "top", "right", "bottom", "left" ], function(i, n) {
                n = "border-" + n + "-" + k, n = ed.dom.getStyle($proxy.get(0), n);
                ("" !== (n = initialStyles[k] === v ? "" : n) || n !== v && "" !== v) && (v = ""), 
                "" !== n && (v = n);
            }), "" !== v && (border = !0, $proxy.css("border-" + k, "")), "width" == k && (v = /[0-9][a-z]/.test(v) ? parseInt(v, 10) : v), 
            "color" == k && v && "#" === (v = Wf.String.toHex(v)).charAt(0) && (v = v.substr(1)), 
            border && ($("#border").attr("checked", "checked").trigger("change"), 
            "width" === k && 0 == $('option[value="' + v + '"]', "#border_width").length && $("#border_width").append(new Option(v, v)), 
            $("#border_" + k).val(v).trigger("change"));
        }), ed.dom.parseStyle($proxy.attr("style")));
        for (key in styles) (0 <= key.indexOf("-moz-") || 0 <= key.indexOf("-webkit-") || "border-image" === key) && delete styles[key];
        $("#style").val(ed.dom.serializeStyle(styles));
    }, Wf.updateStyles = function() {};
    var isHTML4 = "html4" === tinyMCEPopup.editor.settings.schema, isHTML5 = "html5-strict" === tinyMCEPopup.editor.settings.schema, TableDialog = {
        settings: {},
        init: function() {
            var ed = tinyMCEPopup.editor, layout = tinyMCEPopup.getWindowArg("layout", "table");
            if (this.settings.file_browser || $("input.browser").removeClass("browser"), 
            Wf.init({
                classes: ed.getParam("table_classes_custom", [])
            }), "merge" == layout) return this.initMerge();
            switch (isHTML5 && $("#axis, #abbr, #scope, #summary, #char, #charoff, #tframe, #nowrap, #rules, #cellpadding, #cellspacing").each(function() {
                $(this).add('label[for="' + this.id + '"]').hide();
            }), layout) {
              case "table":
                this.initTable();
                break;

              case "cell":
                this.initCell();
                break;

              case "row":
                this.initRow();
            }
            $(".uk-form-controls select").datalist().trigger("datalist:update"), 
            $(".uk-datalist").trigger("datalist:update");
        },
        insert: function() {
            switch (tinyMCEPopup.getWindowArg("layout", "table")) {
              case "table":
                this.insertTable();
                break;

              case "cell":
                this.updateCells();
                break;

              case "row":
                this.updateRows();
                break;

              case "merge":
                this.merge();
            }
        },
        initMerge: function() {
            $("#numcols").val(tinyMCEPopup.getWindowArg("cols", 1)), $("#numrows").val(tinyMCEPopup.getWindowArg("rows", 1)), 
            $("#insert").button("option", "label", tinyMCEPopup.getLang("update", "Update", !0));
        },
        updateClasses: function(values) {
            values = values.replace(/(?:^|\s)mce-item-(\w+)(?!\S)/g, ""), values = $.trim(values), 
            $("#classes").val(values).trigger("change");
        },
        initTable: function() {
            var ed = tinyMCEPopup.editor, elm = ed.dom.getParent(ed.selection.getNode(), "table"), action = (action = tinyMCEPopup.getWindowArg("action")) || (elm ? "update" : "insert");
            if (isHTML4 && ($("#table_border").replaceWith('<input type="checkbox" id="table_border" value="" />'), 
            $("#table_border").on("click", function() {
                this.value = this.checked ? 1 : "";
            })), elm && "insert" != action) {
                for (var rowsAr = elm.rows, cols = 0, i = 0; i < rowsAr.length; i++) rowsAr[i].cells.length > cols && (cols = rowsAr[i].cells.length);
                $("#cols").val(cols), $("#rows").val(rowsAr.length), $("#caption").prop("checked", 0 < elm.getElementsByTagName("caption").length), 
                $.each([ "align", "width", "height", "cellpadding", "cellspacing", "id", "summary", "dir", "lang", "bgcolor", "background", "frame", "rules", "border" ], function(i, k) {
                    var v = ed.dom.getAttrib(elm, k);
                    if ("background" === k && "" !== v && (v = v.replace(new RegExp("url\\(['\"]?([^'\"]*)['\"]?\\)", "gi"), "$1")), 
                    "border" === k && "" !== v) return $("#table_border").val(function() {
                        return v = parseInt(v, 10), "checkbox" === this.type && (this.checked = !!v), 
                        v;
                    }), !0;
                    $("#" + k).val(v);
                }), this.updateClasses(ed.dom.getAttrib(elm, "class")), $("#style").val(ed.dom.getAttrib(elm, "style")).trigger("change"), 
                this.orgTableWidth = $("#width").val(), this.orgTableHeight = $("#height").val(), 
                $("#insert .uk-button-text").text(tinyMCEPopup.getLang("update", "Update", !0));
            } else Wf.setDefaults(this.settings.defaults);
            "update" == action && $("#cols, #rows").prop("disabled", !0), $(".uk-datalist").trigger("datalist:update");
        },
        initRow: function() {
            var self = this, ed = tinyMCEPopup.editor, dom = tinyMCEPopup.dom, elm = dom.getParent(ed.selection.getStart(), "tr"), selected = dom.select("td.mceSelected,th.mceSelected", elm), dom = elm.parentNode.nodeName.toLowerCase();
            $("#style").val(ed.dom.getAttrib(elm, "style")).trigger("change"), $.each([ "align", "width", "height", "cellpadding", "cellspacing", "id", "summary", "dir", "lang", "bgcolor", "background" ], function(i, k) {
                var v = ed.dom.getAttrib(elm, k), dv = $("#" + k).val();
                "background" === k && "" !== v && (v = v.replace(new RegExp("url\\(['\"]?([^'\"]*)['\"]?\\)", "gi"), "$1")), 
                "" !== dv && (v = dv), selected.length && -1 !== $.inArray(k, [ "bgcolor", "background", "height", "id", "lang", "align" ]) && (v = isHTML4 ? v : ""), 
                $("#" + k).val(v);
            }), this.updateClasses(ed.dom.getAttrib(elm, "class")), $("#rowtype").on("change", function() {
                self.setActionforRowType();
            }).val(dom).trigger("change"), 0 === selected.length ? $("#insert .uk-button-text").text(tinyMCEPopup.getLang("update", "Update", !0)) : $("#action").hide();
        },
        initCell: function() {
            var ed = tinyMCEPopup.editor, dom = ed.dom, elm = dom.getParent(ed.selection.getStart(), "td,th");
            dom.hasClass(elm, "mceSelected") ? $("#action").hide() : ($("#style").val(ed.dom.getAttrib(elm, "style")).trigger("change"), 
            $.each([ "align", "valign", "width", "height", "cellpadding", "cellspacing", "id", "summary", "dir", "lang", "bgcolor", "background", "scope" ], function(i, k) {
                var v = ed.dom.getAttrib(elm, k), dv = $("#" + k).val();
                "background" === k && "" !== v && (v = v.replace(new RegExp("url\\(['\"]?([^'\"]*)['\"]?\\)", "gi"), "$1")), 
                "" !== dv && (v = dv), $("#" + k).val(v);
            }), this.updateClasses(ed.dom.getAttrib(elm, "class")), $("#celltype").val(elm.nodeName.toLowerCase()), 
            $("#insert .uk-button-text").text(tinyMCEPopup.getLang("update", "Update", !0)));
        },
        merge: function() {
            tinyMCEPopup.restoreSelection(), tinyMCEPopup.getWindowArg("onaction")({
                cols: $("#numcols").val(),
                rows: $("#numrows").val()
            }), tinyMCEPopup.close();
        },
        getStyles: function() {
            var styles, dom = tinyMCEPopup.editor.dom, style = $("#style").val();
            return isHTML4 || (styles = {
                "vertical-align": "",
                float: ""
            }, $.each([ "width", "height", "backgroundimage", "border", "bgcolor" ], function(i, k) {
                var v = $("#" + k).val();
                if ("backgroundimage" === k && ("" !== v && (v = 'url("' + v + '")'), 
                k = "background-image"), "bgcolor" === k && v && ("" !== v && (v = valueToHex(v)), 
                k = "background-color"), "width" !== k && "height" !== k || v && !/\D/.test(v) && (v = parseInt(v, 10) + "px"), 
                "border" === k) return $("#border").is(":checked") && $.each([ "width", "style", "color" ], function(i, n) {
                    var s = $("#border_" + n).val();
                    "width" !== n || "" === s || /\D/.test(s) || (s = parseInt(s, 10) + "px"), 
                    "color" === n && (s = valueToHex(s)), styles["border-" + n] = s;
                }), !0;
                styles[k] = v;
            }), style = dom.serializeStyle($.extend(dom.parseStyle(style), styles)), 
            style = dom.serializeStyle(dom.parseStyle(style))), style;
        },
        insertTable: function() {
            var ed = tinyMCEPopup.editor, dom = ed.dom, elm = (tinyMCEPopup.restoreSelection(), 
            ed.dom.getParent(ed.selection.getNode(), "table")), action = (action = tinyMCEPopup.getWindowArg("action")) || (elm ? "update" : "insert"), border = 0, html = "", width = $("#width").val(), height = $("#height").val(), align = $("#align").val(), cols = $("#cols").val(), rows = $("#rows").val(), cellpadding = $("#cellpadding").val(), cellspacing = $("#cellspacing").val(), frame = $("#tframe").val(), rules = $("#rules").val(), className = $("#classes").val(), id = $("#id").val(), summary = $("#summary").val(), dir = $("#dir").val(), lang = $("#lang").val(), caption = $("#caption").is(":checked"), bgColor = valueToHex($("#bgcolor").val()), style = this.getStyles(), border = $("#table_border").val();
            if ($("#table_border").is(":checkbox") && (border = $("#table_border").is(":checked") ? "1" : ""), 
            isHTML4 || (bgColor = height = width = align = ""), "update" == action) return ed.execCommand("mceBeginUndoLevel"), 
            isHTML5 || (dom.setAttrib(elm, "cellPadding", cellpadding, !0), dom.setAttrib(elm, "cellSpacing", cellspacing, !0)), 
            dom.setAttribs(elm, {
                width: width,
                height: height,
                align: align,
                border: border,
                bgColor: bgColor
            }), dom.setAttrib(elm, "frame", frame), dom.setAttrib(elm, "rules", rules), 
            dom.setAttrib(elm, "class", className), dom.setAttrib(elm, "style", style), 
            dom.setAttrib(elm, "id", id), dom.setAttrib(elm, "summary", summary), 
            dom.setAttrib(elm, "dir", dir), dom.setAttrib(elm, "lang", lang), (action = ed.dom.select("caption", elm)[0]) && !caption && action.parentNode.removeChild(action), 
            !action && caption && ((action = elm.ownerDocument.createElement("caption")).innerHTML = '<br data-mce-bogus="1"/>', 
            elm.insertBefore(action, elm.firstChild)), isHTML4 || $("#align").val() && ed.formatter.apply("align" + $("#align").val(), {}, elm), 
            ed.addVisual(), ed.nodeChanged(), ed.execCommand("mceEndUndoLevel", !1, {}, {
                skip_undo: !0
            }), ed.execCommand("mceRepaint"), tinyMCEPopup.close(), !0;
            html = (html += "<table") + this.makeAttrib("id", id), border && (html += this.makeAttrib("border", border)), 
            html = (html = (html = (html = (html = (html = (html = (html = (html = (html = (html = (html = (html = (html += this.makeAttrib("cellpadding", cellpadding)) + this.makeAttrib("cellspacing", cellspacing)) + this.makeAttrib("data-mce-new", "1")) + this.makeAttrib("width", width)) + this.makeAttrib("height", height)) + this.makeAttrib("align", align)) + this.makeAttrib("frame", frame)) + this.makeAttrib("rules", rules)) + this.makeAttrib("class", className)) + this.makeAttrib("style", style)) + this.makeAttrib("summary", summary)) + this.makeAttrib("dir", dir)) + this.makeAttrib("lang", lang)) + this.makeAttrib("bgcolor", bgColor) + ">", 
            caption && (html += '<caption><br data-mce-bogus="1" /></caption>');
            for (var patt, y = 0; y < rows; y++) {
                html += "<tr>";
                for (var x = 0; x < cols; x++) html += '<td><br data-mce-bogus="1" /></td>';
                html += "</tr>";
            }
            html += "</table>", ed.execCommand("mceBeginUndoLevel"), ed.settings.fix_table_elements ? (patt = "", 
            ed.focus(), ed.selection.setContent('<br class="_mce_marker" />'), tinymce.each("h1,h2,h3,h4,h5,h6,p".split(","), function(n) {
                patt && (patt += ","), patt += n + " ._mce_marker";
            }), tinymce.each(ed.dom.select(patt), function(n) {
                ed.dom.split(ed.dom.getParent(n, "h1,h2,h3,h4,h5,h6,p"), n);
            }), dom.setOuterHTML(dom.select("br._mce_marker")[0], html)) : ed.execCommand("mceInsertContent", !1, html), 
            tinymce.each(dom.select("table[data-mce-new]"), function(node) {
                var tdorth = dom.select("td,th", node);
                tinymce.isIE && !tinymce.isIE11 && null == node.nextSibling && (ed.settings.forced_root_block ? dom.insertAfter(dom.create(ed.settings.forced_root_block), node) : dom.insertAfter(dom.create("br", {
                    "data-mce-bogus": "1"
                }), node));
                try {
                    ed.selection.setCursorLocation(tdorth[0], 0);
                } catch (ex) {}
                isHTML4 || $("#align").val() && ed.formatter.apply("align" + $("#align").val(), {}, node), 
                dom.setAttrib(node, "data-mce-new", "");
            }), ed.addVisual(), ed.execCommand("mceEndUndoLevel", !1, {}, {
                skip_undo: !0
            }), tinyMCEPopup.close();
        },
        updateCell: function(td, skip_id) {
            var v, align, valign, width, height, bgColor, self = this, ed = tinyMCEPopup.editor, dom = ed.dom, doc = ed.getDoc(), curCellType = td.nodeName.toLowerCase(), celltype = $("#celltype").val(), cells = ed.dom.select("td.mceSelected,th.mceSelected");
            if (cells.length || cells.push(td), width = $("#width").val(), height = $("#height").val(), 
            align = $("#align").val(), valign = $("#valign").val(), bgColor = valueToHex($("#bgcolor").val()), 
            isHTML4 || (bgColor = height = width = valign = align = ""), dom.setAttribs(td, {
                width: width,
                height: height,
                bgColor: bgColor,
                align: align,
                valign: valign
            }), $.each([ "id", "lang", "dir", "classes", "scope", "style" ], function(i, k) {
                if (v = $("#" + k).val(), "id" === k && skip_id) return !0;
                var elm, value;
                "style" === k && (v = self.getStyles()), elm = td, k = k = "classes" === k ? "class" : k, 
                value = v, 1 !== cells.length && !tinymce.is(value) || dom.setAttrib(elm, k, value);
            }), isHTML4 || ($("#align").val() && ed.formatter.apply("align" + $("#align").val(), {}, td), 
            $("#valign").val() && ed.formatter.apply("valign" + $("#valign").val(), {}, td)), 
            curCellType != celltype) {
                for (var newCell = doc.createElement(celltype), c = 0; c < td.childNodes.length; c++) newCell.appendChild(td.childNodes[c].cloneNode(1));
                for (var a = 0; a < td.attributes.length; a++) ed.dom.setAttrib(newCell, td.attributes[a].name, ed.dom.getAttrib(td, td.attributes[a].name));
                td.parentNode.replaceChild(newCell, td), td = newCell;
            }
            return td;
        },
        updateCells: function() {
            var el, tdElm, trElm, tableElm, self = this, ed = tinyMCEPopup.editor, inst = ed;
            if (tinyMCEPopup.restoreSelection(), el = ed.selection.getStart(), tdElm = ed.dom.getParent(el, "td,th"), 
            trElm = ed.dom.getParent(el, "tr"), tableElm = ed.dom.getParent(el, "table"), 
            ed.dom.hasClass(tdElm, "mceSelected")) tinymce.each(ed.dom.select("td.mceSelected,th.mceSelected"), function(td) {
                self.updateCell(td);
            }); else switch (ed.execCommand("mceBeginUndoLevel"), $("#action").val()) {
              case "cell":
                var celltype = $("#celltype").val(), scope = $("#scope").val();
                if (ed.getParam("accessibility_warnings", 1)) return void ("th" == celltype && "" == scope ? tinyMCEPopup.confirm(ed.getLang("table_dlg.missing_scope", "Missing Scope", !0), doUpdate) : doUpdate(!0));
                this.updateCell(tdElm);
                break;

              case "row":
                var cell = trElm.firstChild;
                for ("TD" != cell.nodeName && "TH" != cell.nodeName && (cell = this.nextCell(cell)); cell = this.updateCell(cell, !0), 
                null != (cell = this.nextCell(cell)); );
                break;

              case "all":
                for (var rows = tableElm.getElementsByTagName("tr"), i = 0; i < rows.length; i++) {
                    cell = rows[i].firstChild;
                    for ("TD" != cell.nodeName && "TH" != cell.nodeName && (cell = this.nextCell(cell)); cell = this.updateCell(cell, !0), 
                    null != (cell = this.nextCell(cell)); );
                }
            }
            function doUpdate(state) {
                state && (self.updateCell(tdElm), ed.addVisual(), ed.nodeChanged(), 
                inst.execCommand("mceEndUndoLevel"), tinyMCEPopup.close());
            }
            ed.addVisual(), ed.nodeChanged(), inst.execCommand("mceEndUndoLevel"), 
            tinyMCEPopup.close();
        },
        updateRow: function(tr, skip_id, skip_parent) {
            var v, self = this, ed = tinyMCEPopup.editor, dom = ed.dom, doc = ed.getDoc(), curRowType = tr.parentNode.nodeName.toLowerCase(), rowtype = $("#rowtype").val(), rows = dom.getParent(ed.selection.getStart(), "table").rows;
            if (rows.length || rows.push(tr), dom.setAttribs(tr, {
                height: "",
                align: "",
                valign: "",
                bgColor: ""
            }), $.each([ "id", "lang", "dir", "classes", "scope", "style" ], function(i, k) {
                if (v = $("#" + k).val(), "id" === k && skip_id) return !0;
                var elm, value;
                "style" === k && (v = self.getStyles()), elm = tr, k = k = "classes" === k ? "class" : k, 
                value = v, 1 !== rows.length && !tinymce.is(value) || dom.setAttrib(elm, k, value);
            }), isHTML4 || $("#align").val() && ed.formatter.apply("align" + $("#align").val(), {}, tr), 
            curRowType != rowtype && !skip_parent) {
                for (var curRowType = tr.cloneNode(1), theTable = dom.getParent(tr, "table"), dest = rowtype, newParent = null, i = 0; i < theTable.childNodes.length; i++) theTable.childNodes[i].nodeName.toLowerCase() == dest && (newParent = theTable.childNodes[i]);
                null == newParent && (newParent = doc.createElement(dest), "thead" == dest ? "CAPTION" == theTable.firstChild.nodeName ? ed.dom.insertAfter(newParent, theTable.firstChild) : theTable.insertBefore(newParent, theTable.firstChild) : theTable.appendChild(newParent)), 
                newParent.appendChild(curRowType), tr.parentNode.removeChild(tr), 
                tr = curRowType;
                skip_parent = ed.dom.select("td", tr);
                tinymce.each(skip_parent, function(cell) {
                    ed.dom.rename(cell, "th");
                });
            }
        },
        updateRows: function() {
            var trElm, tableElm, self = this, ed = tinyMCEPopup.editor, dom = ed.dom, action = $("#action").val();
            if (tinyMCEPopup.restoreSelection(), trElm = dom.getParent(ed.selection.getStart(), "tr"), 
            tableElm = dom.getParent(ed.selection.getStart(), "table"), 0 < dom.select("td.mceSelected,th.mceSelected", trElm).length) tinymce.each(tableElm.rows, function(tr) {
                for (var i = 0; i < tr.cells.length; i++) if (dom.hasClass(tr.cells[i], "mceSelected")) return void self.updateRow(tr, !0);
            }); else switch (ed.execCommand("mceBeginUndoLevel"), action) {
              case "row":
                this.updateRow(trElm);
                break;

              case "all":
                for (var rows = tableElm.getElementsByTagName("tr"), i = 0; i < rows.length; i++) this.updateRow(rows[i], !0);
                break;

              case "odd":
              case "even":
                for (rows = tableElm.getElementsByTagName("tr"), i = 0; i < rows.length; i++) (i % 2 == 0 && "odd" == action || i % 2 != 0 && "even" == action) && this.updateRow(rows[i], !0, !0);
            }
            ed.addVisual(), ed.nodeChanged(), ed.execCommand("mceEndUndoLevel"), 
            tinyMCEPopup.close();
        },
        makeAttrib: function(attrib, value) {
            return "" == (value = void 0 !== value && null != value ? value : $("#" + attrib).val()) ? "" : " " + attrib + '="' + (value = (value = (value = (value = value.replace(/&/g, "&amp;")).replace(/\"/g, "&quot;")).replace(/</g, "&lt;")).replace(/>/g, "&gt;")) + '"';
        },
        nextCell: function(elm) {
            for (;null != (elm = elm.nextSibling); ) if ("TD" == elm.nodeName || "TH" == elm.nodeName) return elm;
            return null;
        },
        isCssSize: function(value) {
            return /^[0-9.]+(%|in|cm|mm|em|ex|pt|pc|px)$/.test(value);
        },
        cssSize: function(value, def) {
            return value = tinymce.trim(value || def), this.isCssSize(value) ? value : parseInt(value, 10) + "px";
        },
        setActionforRowType: function() {
            "tbody" === $("#rowtype").val() ? $("#action").prop("disabled", !1) : $("#action").val("row").prop("disabled", !0);
        }
    };
    tinyMCEPopup.onInit.add(TableDialog.init, TableDialog), window.TableDialog = TableDialog;
}(tinymce, tinyMCEPopup, jQuery);tinymce/plugins/colorpicker/plugin.js000060400000001247152456167170014063 0ustar00/* jce - 2.9.99.2 | 2026-04-22 | https://www.joomlacontenteditor.net | Source: https://github.com/widgetfactory/jce | Copyright (C) 2006 - 2026 Ryan Demmer. All rights reserved | GNU/GPL Version 2 or later - http://www.gnu.org/licenses/gpl-2.0.html */
tinymce.PluginManager.add("colorpicker", function(ed, url) {
    ed.addCommand("mceColorPicker", function(ui, v) {
        ed.windowManager.open({
            url: ed.getParam("site_url") + "index.php?option=com_jce&task=plugin.display&plugin=colorpicker",
            size: "mce-modal-portrait-320",
            close_previous: !1
        }, {
            input_color: v.color,
            func: v.func
        });
    });
});tinymce/plugins/colorpicker/js/colorpicker.js000060400000003230152456167170015507 0ustar00/* jce - 2.9.99.2 | 2026-04-22 | https://www.joomlacontenteditor.net | Source: https://github.com/widgetfactory/jce | Copyright (C) 2006 - 2026 Ryan Demmer. All rights reserved | GNU/GPL Version 2 or later - http://www.gnu.org/licenses/gpl-2.0.html */
!function($) {
    var ColorPicker = {
        settings: {},
        init: function() {
            var ed = tinyMCEPopup.editor, color = tinyMCEPopup.getWindowArg("input_color") || "#FFFFFF", doc = ed.getDoc(), stylesheets = [];
            doc.styleSheets.length && $.each(doc.styleSheets, function(i, s) {
                s.href && -1 == s.href.indexOf("tinymce") && stylesheets.push(s);
            }), $("#tmp_color").val(color).colorpicker($.extend(this.settings, {
                dialog: !0,
                stylesheets: stylesheets,
                custom_colors: ed.getParam("colorpicker_custom_colors"),
                labels: {
                    name: ed.getLang("colorpicker.name", "Name")
                }
            })).on("colorpicker:insert", function() {
                return ColorPicker.insert();
            }).on("colorpicker:close", function() {
                return tinyMCEPopup.close();
            }), $("button#insert").button({
                icons: {
                    primary: "uk-icon-check"
                }
            }), $("#jce").css("display", "block");
        },
        insert: function() {
            var color = $("#colorpicker_color").val(), f = tinyMCEPopup.getWindowArg("func"), color = color && "#" + color;
            tinyMCEPopup.restoreSelection(), f && f(color), tinyMCEPopup.close();
        }
    };
    tinyMCEPopup.onInit.add(ColorPicker.init, ColorPicker);
}(jQuery);tinymce/plugins/colorpicker/css/colorpicker.css000060400000000064152456167170016041 0ustar00#colorpicker_picker div.farbtastic{margin:10px auto}tinymce/plugins/importcss/plugin.js000060400000021460152456167170013571 0ustar00/* jce - 2.9.99.2 | 2026-04-22 | https://www.joomlacontenteditor.net | Source: https://github.com/widgetfactory/jce | Copyright (C) 2006 - 2026 Ryan Demmer. All rights reserved | GNU/GPL Version 2 or later - http://www.gnu.org/licenses/gpl-2.0.html */
!function() {
    var each = tinymce.each, DOM = tinymce.DOM, PreviewCss = tinymce.util.PreviewCss;
    var rgba = {}, luma = {};
    function getLuminance(val) {
        var RsRGB, GsRGB, col;
        return luma[val] || (RsRGB = (col = function(val) {
            var r, b, g, a, values, match;
            return rgba[val] || (g = b = r = 0, -(a = 1) !== val.indexOf("#") ? (3 === (val = val.substr(1)).length && (val += val), 
            r = parseInt(val.substring(0, 2), 16), g = parseInt(val.substring(2, 4), 16), 
            b = parseInt(val.substring(4, 6), 16), 6 < val.length && (a = +((a = parseInt(val.substring(6, 8), 16)) / 255).toFixed(2))) : (val = val.replace(/\s/g, ""), 
            (values = (match = /^(?:rgb|rgba)\(([^\)]*)\)$/.exec(val)) ? match[1].split(",").map(function(x, i) {
                return parseFloat(x);
            }) : values) && (r = values[0], g = values[1], b = values[2], 4 === values.length) && (a = values[3] || 1)), 
            rgba[val] = {
                r: r,
                g: g,
                b: b,
                a: a
            }), rgba[val];
        }(val)).r / 255, GsRGB = col.g / 255, col = col.b / 255, RsRGB = RsRGB <= .03928 ? RsRGB / 12.92 : Math.pow((.055 + RsRGB) / 1.055, 2.4), 
        GsRGB = GsRGB <= .03928 ? GsRGB / 12.92 : Math.pow((.055 + GsRGB) / 1.055, 2.4), 
        col = col <= .03928 ? col / 12.92 : Math.pow((.055 + col) / 1.055, 2.4), 
        luma[val] = .2126 * RsRGB + .7152 * GsRGB + .0722 * col), luma[val];
    }
    function isReadable(color1, color2, wcag2, limit) {
        color1 = getLuminance(color1), color2 = getLuminance(color2), color1 = (Math.max(color1, color2) + .05) / (Math.min(color1, color2) + .05);
        return wcag2 = wcag2 || 4.5, limit = limit || 21, color1 >= parseFloat(wcag2) && color1 < parseFloat(limit);
    }
    tinymce.PluginManager.add("importcss", function(ed, url) {
        var self = this;
        function setGuideLinesColor() {
            var gray = [ "#000000", "#080808", "#101010", "#181818", "#202020", "#282828", "#303030", "#383838", "#404040", "#484848", "#505050", "#585858", "#606060", "#686868", "#696969", "#707070", "#787878", "#808080", "#888888", "#909090", "#989898", "#a0a0a0", "#a8a8a8", "#a9a9a9", "#b0b0b0", "#b8b8b8", "#bebebe", "#c0c0c0", "#c8c8c8", "#d0d0d0", "#d3d3d3", "#d8d8d8", "#dcdcdc", "#e0e0e0", "#e8e8e8", "#f0f0f0", "#f5f5f5", "#f8f8f8", "#ffffff" ], blue = [ "#0d47a1", "#1565c0", "#1976d2", "#1e88e5", "#2196f3", "#42a5f5", "#64b5f6", "#90caf9", "#bbdefb", "#e3f2fd" ], guidelines = "#787878", control = "#1e88e5", bodybg = ed.dom.getStyle(ed.getBody(), "background-color", !0), color = ed.dom.getStyle(ed.getBody(), "color", !0);
            if (bodybg) {
                ed._hasGuidelines = !0;
                for (var i = 0; i < gray.length; i++) if (isReadable(gray[i], bodybg, 4.5, 5) && ed.dom.toHex(color) !== ed.dom.toHex(gray[i])) {
                    guidelines = gray[i];
                    break;
                }
                for (var css, i = 0; i < blue.length; i++) if (isReadable(blue[i], bodybg, 4.5, 5)) {
                    control = blue[i];
                    break;
                }
                (guidelines || control) && (css = ":root{", guidelines && (css = css + "--mce-guidelines: " + guidelines + ";--mce-visualchars: #a8a8a8;"), 
                css += "--mce-placeholder: #efefef;", control && (css = css + "--mce-control-selection: " + control + ";--mce-control-selection-bg: #b4d7ff;"), 
                ed.dom.addStyle(css += "}"));
            }
        }
        ed.onImportCSS = new tinymce.util.Dispatcher(), ed.onImportCSS.add(function() {
            tinymce.is(ed.settings.importcss_classes) || self.get();
        }), ed.onInit.add(function() {
            var hex, bodybg, color;
            ed.onImportCSS.dispatch(), "auto" !== ed.settings.content_style_reset || ed.dom.hasClass(ed.getBody(), "mceContentReset") || (bodybg = ed.dom.getStyle(ed.getBody(), "background-color", !0), 
            color = ed.dom.getStyle(ed.getBody(), "color", !0), bodybg && color && ((hex = ed.dom.toHex(bodybg)) == ed.dom.toHex(color) && "#000000" === hex || isReadable(color, bodybg, 3) || ed.dom.addClass(ed.getBody(), "mceContentReset"))), 
            setGuideLinesColor();
        }), ed.onFocus.add(function(ed) {
            ed._hasGuidelines || setGuideLinesColor();
        }), this.get = function() {
            var self = this, doc = ed.getDoc(), href = "", rules = [], fontface = [], filtered = {}, classes = [];
            var bodyRx = !!ed.settings.body_class && new RegExp(".(" + ed.settings.body_class.split(" ").join("|") + ")");
            function parseCSS(stylesheet) {
                each(stylesheet.imports, function(r) {
                    var v;
                    0 < r.href.indexOf("://fonts.googleapis.com") ? (v = "@import url(" + r.href + ");", 
                    -1 === self.fontface.indexOf(v) && self.fontface.unshift(v)) : parseCSS(r);
                });
                try {
                    if (rules = stylesheet.cssRules || stylesheet.rules, !(href = stylesheet.href)) return;
                    if (url = href, -1 !== /\/(tinymce|plugins\/jce)\//.match(url) && -1 !== url.indexOf("content.css")) return;
                    href = href.substr(0, href.lastIndexOf("/") + 1), ed.hasStyleSheets = !0;
                } catch (e) {}
                var url;
                each(rules, function(r) {
                    switch (r.type || 1) {
                      case 1:
                        if (!function(href) {
                            var styleselect = ed.getParam("styleselect_stylesheets");
                            return !styleselect || (void 0 === filtered[href] && (filtered[href] = -1 !== href.indexOf(styleselect)), 
                            filtered[href]);
                        }(stylesheet.href)) return !0;
                        r.selectorText && each(r.selectorText.split(","), function(v) {
                            var value;
                            v = v.trim(), /\.mce[-A-Za-z0-9]/.test(v) || /\.wf[e]?-/.test(v) || (value = v, 
                            bodyRx && bodyRx.test(value)) || /\.[\w\-\:]+$/.test(v) && classes.push(v);
                        });
                        break;

                      case 3:
                        0 < r.href.indexOf("//fonts.googleapis.com") && (v = "@import url(" + r.href + ");", 
                        -1 === fontface.indexOf(v)) && fontface.unshift(v), -1 === r.href.indexOf("//") && parseCSS(r.styleSheet);
                        break;

                      case 5:
                        var v;
                        r.cssText && !1 === /(fontawesome|glyphicons|icomoon)/i.test(r.cssText) && (u = r.cssText, 
                        p = href, v = u.replace(/url\(["']?(.+?)["']?\)/gi, function(a, b) {
                            return b.indexOf("://") < 0 ? 'url("' + p + b + '")' : a;
                        }), -1 === fontface.indexOf(v)) && fontface.push(v);
                    }
                    var u, p;
                });
            }
            if (!classes.length) try {
                each(doc.styleSheets, function(styleSheet) {
                    parseCSS(styleSheet);
                });
            } catch (ex) {}
            if (!fontface.length) try {
                var setCss, head = DOM.doc.getElementsByTagName("head")[0], style = DOM.create("style", {
                    type: "text/css"
                }), css = self.fontface.join("\n");
                style.styleSheet ? (setCss = function() {
                    try {
                        style.styleSheet.cssText = css;
                    } catch (e) {}
                }, style.styleSheet.disabled ? setTimeout(setCss, 10) : setCss()) : style.appendChild(DOM.doc.createTextNode(css)), 
                head.appendChild(style);
            } catch (e) {}
            if (classes.length) return classes = classes.filter(function(val, ind, arr) {
                return arr.indexOf(val) === ind;
            }), ed.getParam("styleselect_sort", 1) && classes.sort(), ed.settings.importcss_classes = tinymce.map(classes, function(val) {
                var selectorText = (selectorText = /^(?:([a-z0-9\-_]+))?(\.[a-z0-9_\-\.]+)$/i.exec(selectorText = val)) && "body" !== selectorText[1] ? selectorText[2].substr(1).split(".").join(" ") : "", style = PreviewCss.getCssText(ed, {
                    classes: selectorText.split(" ")
                });
                return {
                    selector: val,
                    class: selectorText,
                    style: style
                };
            }), PreviewCss.reset(), ed.settings.importcss_classes;
        };
    });
}();tinymce/plugins/joomla/plugin.js000060400000012066152456167170013031 0ustar00/* jce - 2.9.99.2 | 2026-04-22 | https://www.joomlacontenteditor.net | Source: https://github.com/widgetfactory/jce | Copyright (C) 2006 - 2026 Ryan Demmer. All rights reserved | GNU/GPL Version 2 or later - http://www.gnu.org/licenses/gpl-2.0.html */
!function() {
    var Joomla = window.Joomla || null, each = tinymce.each, DOM = tinymce.DOM;
    tinymce.PluginManager.add("joomla", function(ed, url) {
        this.createControl = function(n, cm) {
            var plugins, ctrl;
            return "joomla" === n && ((n = ed.settings.joomla_xtd_buttons || {})[ed.id] || n.__jce__ || n.ckeditor) && (plugins = n[ed.id] || n.__jce__ || n.ckeditor || []).length ? (ctrl = cm.createSplitButton("joomla", {
                title: "joomla.buttons",
                icon: "joomla"
            }), function(ed) {
                var ckModal = DOM.select('.modal[id^="ckeditor_"][id$="_modal"]');
                each(ckModal, function(modal) {
                    var newModal = modal.cloneNode(!0), id = newModal.id, url = newModal.getAttribute("data-url"), ifr = newModal.getAttribute("data-iframe"), ifr = (url && id && (id = id.replace("ckeditor_", ed.id + "_"), 
                    url = url.replace(/=ckeditor\b/g, "=" + ed.id)), DOM.create("div", {}, DOM.decode(ifr))), iframe = ifr.firstChild;
                    iframe && iframe.setAttribute("src", url), newModal.setAttribute("id", id), 
                    newModal.setAttribute("data-url", url), newModal.setAttribute("data-iframe", ifr.innerHTML), 
                    newModal.innerHTML = newModal.innerHTML.replace(/'ckeditor'/g, `'${ed.id}'`), 
                    document.body.appendChild(newModal), Joomla.initialiseModal(newModal), 
                    DOM.remove(modal);
                });
            }(ed), ctrl.onRenderMenu.add(function(ctrl, menu) {
                var ed = ctrl.editor, vp = ed.dom.getViewPort(), jModalCloseCore = (each(plugins, function(plg, name) {
                    var href = (href = plg.href || "") && (href = (href = ed.dom.decode(href)).replace(/(__jce__|ckeditor)/gi, ed.id)).replace(/(e_name|editor)=([\w_]+)/gi, "$1=" + ed.id), item = (plg.id = plg.id.replace(/(__jce__|ckeditor)/gi, ed.id), 
                    menu.add({
                        id: ed.dom.uniqueId(),
                        title: plg.title,
                        icon: plg.icon,
                        svg: plg.svg || "",
                        onclick: function(e) {
                            var buttons = [ {
                                id: "cancel",
                                title: ed.getLang("cancel", "Cancel")
                            } ];
                            if (ed.lastSelectionBookmark = ed.selection.getBookmark(1), 
                            href) {
                                plg.options && plg.options.confirmCallback && buttons.unshift({
                                    id: "confirm",
                                    title: plg.options.confirmText || ed.getLang("insert", "Insert"),
                                    classes: "primary",
                                    onsubmit: function(e) {
                                        new Function(plg.options.confirmCallback).apply();
                                    }
                                });
                                var modal = DOM.get(plg.id + "_modal");
                                if (modal) modal.open(); else if (plg.action) try {
                                    ed.editorXtdButtons(plg);
                                } catch (e) {
                                    console.log("This option is not supported");
                                } else ed.windowManager.open({
                                    file: href,
                                    title: plg.title,
                                    width: Math.max(vp.w - 40, 896),
                                    height: Math.max(vp.h - 40, 707),
                                    size: "mce-modal-landscape-full",
                                    addver: !1,
                                    buttons: buttons
                                }), Joomla && Joomla.Modal && Joomla.Modal.setCurrent(ed.windowManager);
                            }
                            return plg.onclick && new Function(plg.onclick).apply(), 
                            item.setSelected(!1), !1;
                        }
                    }));
                }), function() {}), SBoxClose = (window.jModalClose && (jModalCloseCore = window.jModalClose), 
                window.jModalClose = function() {
                    var wm = ed.windowManager;
                    return wm.count ? wm.close() : jModalCloseCore();
                }, function() {});
                window.SqueezeBox ? SBoxClose = window.SqueezeBox.close : window.SqueezeBox = {}, 
                window.SqueezeBox.close = function() {
                    var wm = ed.windowManager;
                    return wm.count ? wm.close() : SBoxClose();
                };
            }), ed.onRemove.add(function() {
                ctrl.destroy();
            }), ctrl) : null;
        };
    });
}();tinymce/plugins/spellchecker/plugin.js000060400000030350152456167170014210 0ustar00/* jce - 2.9.99.2 | 2026-04-22 | https://www.joomlacontenteditor.net | Source: https://github.com/widgetfactory/jce | Copyright (C) 2006 - 2026 Ryan Demmer. All rights reserved | GNU/GPL Version 2 or later - http://www.gnu.org/licenses/gpl-2.0.html */
!function() {
    var each = tinymce.each, DOM = tinymce.DOM, counter = 0;
    tinymce.PluginManager.add("spellchecker", function(ed, url) {
        var self = this, languages = (self.menu = null, self.native_spellchecker = "browser" == ed.getParam("spellchecker_engine", "browser"), 
        self.native_spellchecker && ed.getParam("spellchecker_suggestions", !0) && ed.onContextMenu.addToTop(function(ed, e) {
            if (self.active) return !1;
        }), ed.addCommand("mceSpellCheck", function() {
            self.native_spellchecker ? (ed.getBody().spellcheck = self.active = !self.active, 
            ed.focus()) : self.active ? done() : (ed.setProgressState(1), sendRPC("checkWords", [ self.selectedLang, function() {
                var wl = [], tx = "", lo = {}, rawWords = [];
                walk(ed.getBody(), function(n) {
                    3 == n.nodeType && (tx += n.nodeValue + " ");
                }), rawWords = ed.getParam("spellchecker_word_pattern") ? tx.match("(" + ed.getParam("spellchecker_word_pattern") + ")", "gi") : (tx = tx.replace(new RegExp("([0-9]|[" + getSeparators() + "])", "g"), " "), 
                tx = tinymce.trim(tx.replace(/(\s+)/g, " ")), tx.split(" "));
                return each(rawWords, function(v) {
                    lo[v] || (wl.push(v), lo[v] = 1);
                }), wl;
            }() ], function(r) {
                0 < r.length ? (self.active = 1, function(wl) {
                    var dom = ed.dom, doc = ed.getDoc(), se = ed.selection, r = se.getRng(!0), nl = [], wl = wl.join("|"), re = getSeparators(), rx = new RegExp("(^|[" + re + "])(" + wl + ")(?=[" + re + "]|$)", "g");
                    walk(ed.getBody(), function(n) {
                        3 == n.nodeType && nl.push(n);
                    }), each(nl, function(n) {
                        var node, elem, txt, pos, v = n.nodeValue;
                        if (rx.lastIndex = 0, rx.test(v)) {
                            if (v = dom.encode(v), elem = dom.create("span", {
                                class: "mce-item-hidden"
                            }), tinymce.isIE) {
                                for (v = v.replace(rx, "$1<mcespell>$2</mcespell>"); -1 != (pos = v.indexOf("<mcespell>")); ) (txt = v.substring(0, pos)).length && (node = doc.createTextNode(dom.decode(txt)), 
                                elem.appendChild(node)), pos = (v = v.substring(pos + 10)).indexOf("</mcespell>"), 
                                txt = v.substring(0, pos), v = v.substring(pos + 11), 
                                elem.appendChild(dom.create("span", {
                                    class: "mce-item-hiddenspellword"
                                }, txt));
                                v.length && (node = doc.createTextNode(dom.decode(v)), 
                                elem.appendChild(node));
                            } else elem.innerHTML = v.replace(rx, '$1<span class="mce-item-hiddenspellword">$2</span>');
                            dom.replace(elem, n);
                        }
                    }), se.setRng(r);
                }(r), ed.setProgressState(0), ed.nodeChanged()) : (ed.setProgressState(0), 
                ed.getParam("spellchecker_report_no_misspellings", !0) && ed.windowManager.alert("spellchecker.no_mpell"));
            }));
        }), ed.onNodeChange.add(function(ed, cm) {
            cm.setActive("spellchecker", !!self.active);
        }), self.native_spellchecker || (ed.getParam("spellchecker_suggestions", !0) && (ed.onClick.add(showMenu, self), 
        ed.onContextMenu.add(showMenu, self)), ed.onBeforeGetContent.add(function() {
            self.active && removeWords();
        }), ed.onNodeChange.add(function(ed, cm) {
            cm.setActive("spellchecker", !!self.active);
        }), ed.onSetContent.add(function() {
            done();
        }), ed.onBeforeGetContent.add(function() {
            done();
        }), ed.onBeforeExecCommand.add(function(ed, cmd) {
            "mceFullScreen" == cmd && done();
        })), {});
        function updateMenu(mi) {
            mi.setSelected(1), this.selectedItem.setSelected(0), this.selectedItem = mi;
        }
        function walk(n, f) {
            var w, d = ed.getDoc();
            if (d.createTreeWalker) for (w = d.createTreeWalker(n, NodeFilter.SHOW_TEXT, null, !1); null != (n = w.nextNode()); ) f.call(this, n); else tinymce.walk(n, f, "childNodes");
        }
        function getSeparators() {
            for (var re = "", str = ed.getParam("spellchecker_word_separator_chars", '\\s!"#$%&()*+,-./:;<=>?@[]^_{|}\xdf\xa9\xb4\xc6\xb1\u2202\u2211\u220f\xaa\xba\u03a9\xe6\xf8\u25ca\u02dc\xa7\u201d\u201c'), i = 0; i < str.length; i++) re += "\\" + str.charAt(i);
            return re;
        }
        function removeWords(w) {
            var dom = ed.dom, se = ed.selection, r = se.getRng(!0);
            each(dom.select("span").reverse(), function(n) {
                !n || !dom.hasClass(n, "mce-item-hiddenspellword") && !dom.hasClass(n, "mce-item-hidden") || w && dom.decode(n.innerHTML) != w || dom.remove(n, 1);
            }), se.setRng(r);
        }
        function showMenu(ed, e) {
            var p1, m = self.menu, dom = ed.dom, vp = dom.getViewPort(ed.getWin()), wordSpan = e.target;
            if (e = 0, m || (m = ed.controlManager.createDropMenu("spellcheckermenu", {
                keyboard_focus: !0
            }), self.menu = m), dom.hasClass(wordSpan, "mce-item-hiddenspellword")) return m.removeAll(), 
            m.add({
                title: "spellchecker.wait",
                class: "mceMenuItemTitle"
            }).setDisabled(1), sendRPC("getSuggestions", [ self.selectedLang, dom.decode(wordSpan.innerHTML) ], function(r) {
                var ignoreRpc;
                m.removeAll(), 0 < r.length ? (m.add({
                    title: "spellchecker.sug",
                    class: "mceMenuItemTitle"
                }).setDisabled(1), each(r, function(v) {
                    m.add({
                        title: v,
                        onclick: function() {
                            dom.replace(ed.getDoc().createTextNode(v), wordSpan), 
                            checkDone();
                        }
                    });
                })) : m.add({
                    title: "spellchecker.no_sug",
                    class: "mceMenuItemTitle"
                }).setDisabled(1), ed.getParam("show_ignore_words", !0) && (m.addSeparator(), 
                ignoreRpc = ed.getParam("spellchecker_enable_ignore_rpc", ""), m.add({
                    title: "spellchecker.ignore_word",
                    onclick: function() {
                        var word = wordSpan.innerHTML;
                        dom.remove(wordSpan, 1), checkDone(), ignoreRpc && (ed.setProgressState(1), 
                        sendRPC("ignoreWord", [ self.selectedLang, word ], function(r) {
                            ed.setProgressState(0);
                        }));
                    }
                }), m.add({
                    title: "spellchecker.ignore_words",
                    onclick: function() {
                        var word = wordSpan.innerHTML;
                        removeWords(dom.decode(word)), checkDone(), ignoreRpc && (ed.setProgressState(1), 
                        sendRPC("ignoreWords", [ self.selectedLang, word ], function(r) {
                            ed.setProgressState(0);
                        }));
                    }
                })), ed.getParam("spellchecker_enable_learn_rpc") && m.add({
                    title: "spellchecker.learn_word",
                    onclick: function() {
                        var word = wordSpan.innerHTML;
                        dom.remove(wordSpan, 1), checkDone(), ed.setProgressState(1), 
                        sendRPC("learnWord", [ self.selectedLang, word ], function(r) {
                            ed.setProgressState(0);
                        });
                    }
                }), m.update();
            }), p1 = DOM.getPos(ed.getContentAreaContainer()), m.settings.offset_x = p1.x, 
            m.settings.offset_y = p1.y, ed.selection.select(wordSpan), p1 = dom.getPos(wordSpan), 
            m.showMenu(p1.x, p1.y + wordSpan.offsetHeight - vp.y), tinymce.dom.Event.cancel(e);
            m.hideMenu();
        }
        function checkDone() {
            var o, dom = ed.dom;
            each(dom.select("span"), function(n) {
                if (n && dom.hasClass(n, "mce-item-hiddenspellword")) return !(o = !0);
            }), o || done();
        }
        function done() {
            var la = this.active;
            this.active && (removeWords(), this.menu && this.menu.hideMenu(), la && ed.nodeChanged(), 
            this.active = !1);
        }
        function sendRPC(m, p, cb) {
            m = {
                id: function() {
                    for (var guid = new Date().getTime().toString(32), i = 0; i < 5; i++) guid += Math.floor(65535 * Math.random()).toString(32);
                    return "wf_" + guid + (counter++).toString(32);
                }(),
                method: m,
                params: p
            };
            tinymce.util.XHR.send({
                url: ed.getParam("site_url") + "index.php?option=com_jce&task=plugin.rpc&plugin=spellchecker&" + ed.settings.query,
                data: "json=" + JSON.stringify(m),
                content_type: "application/x-www-form-urlencoded",
                success: function(o) {
                    var c, e;
                    try {
                        c = JSON.parse(o);
                    } catch (e) {
                        c = {
                            error: "JSON Parse error"
                        };
                    }
                    !c || c.error ? (ed.setProgressState(0), e = c.error || "JSON Parse error", 
                    ed.windowManager.alert(e.errstr || "Error response: " + e)) : cb.call(self, c.result || "");
                },
                error: function(x) {
                    ed.setProgressState(0), ed.windowManager.alert("Error response: " + x);
                }
            });
        }
        each(ed.getParam("spellchecker_languages", "+English=en,Danish=da,Dutch=nl,Finnish=fi,French=fr,German=de,Italian=it,Polish=pl,Portuguese=pt,Spanish=es,Swedish=sv", "hash"), function(v, k) {
            0 === k.indexOf("+") && (k = k.substring(1), self.selectedLang = v), 
            languages[k] = v;
        }), ed.onInit.add(function() {
            self.native_spellchecker && ed.getParam("spellchecker_browser_state", 0) && (ed.getBody().spellcheck = self.active = !self.active);
        }), this.createControl = function(n, cm) {
            var self = this;
            if ("spellchecker" == n) return self.native_spellchecker ? cm.createButton(n, {
                title: "spellchecker.desc",
                cmd: "mceSpellCheck",
                scope: self
            }) : ((cm = cm.createSplitButton(n, {
                title: "spellchecker.desc",
                cmd: "mceSpellCheck",
                scope: self
            })).onRenderMenu.add(function(c, m) {
                m.add({
                    title: "spellchecker.langs",
                    class: "mceMenuItemTitle"
                }).setDisabled(1), self.menuItems = {}, each(languages, function(v, k) {
                    var mi, o = {
                        onclick: function() {
                            v != self.selectedLang && (updateMenu(mi), self.selectedLang = v);
                        }
                    };
                    o.title = k, (mi = m.add(o)).setSelected(v == self.selectedLang), 
                    self.menuItems[v] = mi, v == self.selectedLang && (self.selectedItem = mi);
                });
            }), cm);
        }, this.setLanguage = function(lang) {
            if (lang != this.selectedLang) {
                if (0 === tinymce.grep(this.languages, function(v) {
                    return v === lang;
                }).length) throw "Unknown language: " + lang;
                this.selectedLang = lang, this.menuItems && updateMenu(this.menuItems[lang]), 
                this.active && done();
            }
        };
    });
}();tinymce/plugins/spellchecker/img/wline.gif000060400000000056152456167170014735 0ustar00GIF89a��**���!�,Df;tinymce/plugins/browser/plugin.js000060400000001475152456167170013235 0ustar00/* jce - 2.9.99.2 | 2026-04-22 | https://www.joomlacontenteditor.net | Source: https://github.com/widgetfactory/jce | Copyright (C) 2006 - 2026 Ryan Demmer. All rights reserved | GNU/GPL Version 2 or later - http://www.gnu.org/licenses/gpl-2.0.html */
tinymce.PluginManager.add("browser", function(ed, url) {
    var self = this;
    ed.addCommand("mceFileBrowser", function(ui, args, win) {
        self.open(args, win);
    }), this.open = function(args, win) {
        return args = args || {}, ed.windowManager.open({
            file: ed.getParam("site_url") + "index.php?option=com_jce&task=plugin.display&plugin=browser" + (args.caller ? "." + args.caller : "") + (args.filter ? "&filter=" + args.filter : ""),
            close_previous: "no",
            size: "mce-modal-landscape-full"
        }, args), !1;
    };
});tinymce/plugins/browser/css/browser.min.css000060400000000260152456167170015137 0ustar00.ui-browser{left:0;right:0}.ui-modal-footer{border:1px solid #ddd}.ui-inline-help .ui-modal-dialog{top:0;height:100%}.ui-inline-help iframe{height:calc(100% - 41px);width:100%}tinymce/plugins/browser/js/popup.min.js000060400000002211152456167170014265 0ustar00/* jce - 2.9.99.2 | 2026-04-22 | https://www.joomlacontenteditor.net | Source: https://github.com/widgetfactory/jce | Copyright (C) 2006 - 2026 Ryan Demmer. All rights reserved | GNU/GPL Version 2 or later - http://www.gnu.org/licenses/gpl-2.0.html */
var tinyMCE = window.tinymce || window.parent.tinymce, tinyMCEPopup = {
    getParam: function(n, dv) {
        return this.editor.getParam(n, dv);
    },
    getLang: function(n, dv) {
        return this.editor.getLang(n, dv);
    },
    getWindowArg: function(n, dv) {
        n = this.editor.windowManager.params[n];
        return void 0 !== n ? n : dv;
    },
    close: function() {
        return this.editor.windowManager.close();
    }
};

tinyMCEPopup.editor = tinyMCE, jQuery(document).ready(function($) {
    var el, win = window.parent, s = tinyMCEPopup.editor.settings;
    s.element && (el = win.document.getElementById(s.element)) && (tinyMCEPopup.editor.windowManager.params.value = el.value), 
    s.callback && "function" == typeof (win = win[s.callback]) && (tinyMCEPopup.editor.windowManager.params.callback = win), 
    el || s.callback || s.element || $("#cancel, #insert").hide();
});tinymce/plugins/browser/js/browser.js000060400000003576152456167170014042 0ustar00/* jce - 2.9.99.2 | 2026-04-22 | https://www.joomlacontenteditor.net | Source: https://github.com/widgetfactory/jce | Copyright (C) 2006 - 2026 Ryan Demmer. All rights reserved | GNU/GPL Version 2 or later - http://www.gnu.org/licenses/gpl-2.0.html */
!function($) {
    function insert() {
        var win = tinyMCEPopup.getWindowArg("window"), callback = tinyMCEPopup.getWindowArg("callback");
        if (!callback) return tinyMCEPopup.close();
        $("[data-filebrowser]").trigger("filebrowser:insert", function(selected, data) {
            data.length || (data = [ {
                title: "",
                url: ""
            } ]), "string" == typeof callback && (selectFile(data[0]), win.document.getElementById(callback).value = $("[data-filebrowser]").val()), 
            "function" == typeof callback && callback(selected, data), tinyMCEPopup.close();
        });
    }
    function selectFile(file) {
        file = (file = file.url || "").replace(/^\//, "");
        $("[data-filebrowser]").val(file);
    }
    $(document).ready(function() {
        $("#insert").on("click", function(e) {
            e.preventDefault(), insert();
        }), $("#cancel").on("click", function(e) {
            e.preventDefault(), tinyMCEPopup.close();
        });
        var ed = tinyMCEPopup.editor, src = tinyMCEPopup.getWindowArg("value");
        Wf.init(), src && -1 != src.indexOf("#joomlaImage") && (src = src.substring(0, src.indexOf("#"))), 
        (src = /(:\/\/|www|index.php(.*)\?option)/gi.test(src) ? "" : src) && (src = ed.convertURL(src), 
        $(".uk-button-text", "#insert").text(tinyMCEPopup.getLang("update", "Update", !0))), 
        $("[data-filebrowser]").val(src).filebrowser().on("filebrowser:onfileclick", function(e, file, data) {
            selectFile(data);
        }).on("filebrowser:onfileinsert", function(e, file, data) {
            insert();
        });
    });
}(jQuery);tinymce/plugins/nonbreaking/plugin.js000060400000001731152456167170014042 0ustar00/* jce - 2.9.99.2 | 2026-04-22 | https://www.joomlacontenteditor.net | Source: https://github.com/widgetfactory/jce | Copyright (C) 2006 - 2026 Ryan Demmer. All rights reserved | GNU/GPL Version 2 or later - http://www.gnu.org/licenses/gpl-2.0.html */
tinymce.PluginManager.add("nonbreaking", function(ed, url) {
    ed.addCommand("mceNonBreaking", function() {
        ed.execCommand("mceInsertContent", !1, ed.plugins.visualchars && ed.plugins.visualchars.state ? '<span data-mce-bogus="1" class="mce-item-hidden mce-item-nbsp">&nbsp;</span>' : "&nbsp;");
    }), ed.addButton("nonbreaking", {
        title: "nonbreaking.desc",
        cmd: "mceNonBreaking"
    }), ed.getParam("nonbreaking_force_tab") && ed.onKeyDown.add(function(ed, e) {
        9 == e.keyCode && (e.preventDefault(), ed.execCommand("mceNonBreaking"), 
        ed.execCommand("mceNonBreaking"), ed.execCommand("mceNonBreaking"));
    }), ed.addShortcut("ctrl+shift+32", "nonbreaking.desc", "mceNonBreaking");
});tinymce/plugins/figure/plugin.js000060400000014246152456167170013033 0ustar00/* jce - 2.9.99.2 | 2026-04-22 | https://www.joomlacontenteditor.net | Source: https://github.com/widgetfactory/jce | Copyright (C) 2006 - 2026 Ryan Demmer. All rights reserved | GNU/GPL Version 2 or later - http://www.gnu.org/licenses/gpl-2.0.html */
!function() {
    var VK = tinymce.VK, Node = tinymce.html.Node, each = tinymce.each, blocks = [];
    tinymce.PluginManager.add("figure", function(ed, url) {
        ed.onPreInit.add(function(ed) {
            function setClipboardData(ed, e) {
                var node, content, clipboardData = e.clipboardData;
                clipboardData && (node = ed.dom.getParent(ed.selection.getNode(), "figure")) && (ed.selection.select(node), 
                content = {
                    html: content = ed.selection.getContent({
                        contextual: !0
                    }),
                    text: content.toString()
                }, clipboardData.clearData(), clipboardData.setData("text/html", content.html), 
                clipboardData.setData("text/plain", content.text), "cut" == e.type) && ed.dom.remove(node);
            }
            ed.parser.addNodeFilter("figure", function(nodes, name) {
                for (var figcaption, node, i = nodes.length; i--; ) 0 === (node = nodes[i]).getAll("figcaption").length && ((figcaption = new Node("figcaption", 1)).attr("data-mce-empty", ed.getLang("figcaption.default", "Write a caption...")), 
                figcaption.attr("contenteditable", !0), node.append(figcaption)), 
                node.attr("data-mce-image", "1"), node.attr("contenteditable", "false"), 
                each(node.getAll("img"), function(img) {
                    img.attr("data-mce-contenteditable", "true");
                }), !1 !== ed.settings.figure_data_attribute && node.attr("data-wf-figure", "1");
            }), ed.parser.addNodeFilter("figcaption", function(nodes, name) {
                for (var node, i = nodes.length; i--; ) (node = nodes[i]).firstChild || node.attr("data-mce-empty", ed.getLang("figcaption.default", "Write a caption...")), 
                node.attr("contenteditable", "true");
            }), ed.serializer.addNodeFilter("figure", function(nodes, name) {
                for (var node, i = nodes.length; i--; ) (node = nodes[i]).attr("contenteditable", null), 
                each(node.getAll("img"), function(img) {
                    img.attr("data-mce-contenteditable", null);
                });
            }), ed.serializer.addNodeFilter("figcaption", function(nodes, name) {
                for (var node, i = nodes.length; i--; ) (node = nodes[i]).firstChild ? node.attr("contenteditable", null) : node.remove();
            }), ed.serializer.addAttributeFilter("data-mce-image", function(nodes, name) {
                for (var i = nodes.length; i--; ) nodes[i].attr(name, null);
            }), each(ed.schema.getBlockElements(), function(v, k) {
                if (/\W/.test(k)) return !0;
                blocks.push(k.toLowerCase());
            }), ed.formatter.register("figure", {
                block: "figure",
                remove: "all",
                ceFalseOverride: !0,
                deep: !1,
                onformat: function(elm, fmt, vars, node) {
                    vars = vars || {}, ed.dom.select("img,video,iframe", elm) && (ed.dom.setAttribs(elm, {
                        "data-mce-image": 1,
                        contenteditable: !1
                    }), ed.dom.setAttrib(ed.dom.select("img", elm), "data-mce-contenteditable", "true"), 
                    ed.dom.add(elm, "figcaption", {
                        "data-mce-empty": ed.getLang("figcaption.default", "Write a caption..."),
                        contenteditable: !0
                    }, vars.caption || ""), !1 !== ed.settings.figure_data_attribute) && ed.dom.setAttribs(elm, {
                        "data-wf-figure": "1"
                    });
                },
                onremove: function(node) {
                    ed.dom.remove(ed.dom.select("figcaption", node)), ed.dom.remove(ed.dom.getParent("figure", node), 1);
                }
            }), ed.onBeforeExecCommand.add(function(ed, cmd, ui, v, o) {
                var parent, se = ed.selection, n = se.getNode();
                switch (cmd) {
                  case "JustifyRight":
                  case "JustifyLeft":
                  case "JustifyCenter":
                    n && ed.dom.is(n, "img,span[data-mce-object]") && (parent = ed.dom.getParent(n, "FIGURE")) && (se.select(parent), 
                    ed.execCommand(cmd, !1), o.terminate = !0);
                }
            }), ed.onClick.add(function(ed, e) {
                "IMG" === e.target.nodeName && VK.metaKeyPressed(e) && (e = ed.dom.getParent(e.target, "figure")) && (ed.selection.select(e), 
                ed.nodeChanged());
            }), ed.onNodeChange.add(function(ed, cm, n) {
                "FIGURE" !== n.nodeName && ed.dom.removeAttrib(ed.dom.select("figure"), "data-mce-selected");
            }), ed.onCopy.add(setClipboardData), ed.onCut.add(setClipboardData), 
            ed.onKeyDown.add(function(ed, e) {
                var container, offset, isDelete = e.keyCode == VK.DELETE;
                if (!e.isDefaultPrevented() && (isDelete || e.keyCode == VK.BACKSPACE) && !VK.modifierPressed(e) && (container = (isDelete = ed.selection.getRng()).startContainer, 
                offset = isDelete.startOffset, isDelete = isDelete.collapsed, container = ed.dom.getParent(container, "FIGURE"))) {
                    var node = ed.selection.getNode();
                    if ("IMG" === node.nodeName) ed.dom.remove(container), ed.nodeChanged(), 
                    e.preventDefault(); else if ("FIGCAPTION" != node.nodeName || node.nodeValue && 0 !== node.nodeValue.length || 0 !== node.childNodes.length || e.preventDefault(), 
                    3 === node.nodeType && !isDelete && !offset) {
                        var figcaption = ed.dom.getParent(node, "FIGCAPTION");
                        if (figcaption) {
                            for (;figcaption.firstChild; ) figcaption.removeChild(figcaption.firstChild);
                            e.preventDefault();
                        }
                    }
                }
            });
        });
    });
}();tinymce/plugins/style/css/style.css000060400000000000152456167170013477 0ustar00tinymce/plugins/style/js/style.js000060400000103441152456167170013164 0ustar00/* jce - 2.9.99.2 | 2026-04-22 | https://www.joomlacontenteditor.net | Source: https://github.com/widgetfactory/jce | Copyright (C) 2006 - 2026 Ryan Demmer. All rights reserved | GNU/GPL Version 2 or later - http://www.gnu.org/licenses/gpl-2.0.html */
!function(tinymce, tinyMCEPopup, $) {
    function selectByValue(field_name, value, add_custom, ignore_case) {
        value = value || "";
        var sel = document.getElementById(field_name);
        if (sel) {
            sel.list && (sel.value = value, sel = sel.list);
            for (var option, found = !1, i = 0; i < sel.options.length; i++) (option = sel.options[i]).value == value || ignore_case && option.value.toLowerCase() == value.toLowerCase() ? found = option.selected = !0 : option.selected = !1;
            !found && add_custom && "" != value && ((option = new Option(value, value)).selected = !0, 
            sel.appendChild(option), sel.selectedIndex = sel.options.length - 1);
        }
    }
    function addSelectValue(field_name, name, value) {
        field_name = (field_name = document.getElementById(field_name)).list || field_name, 
        name = new Option(name, value);
        field_name.appendChild(name);
    }
    function getColor(n) {
        n = $(n).val();
        return -1 !== n.indexOf("#") ? n : "#" + n;
    }
    var StyleDialog = {
        settings: {},
        defaults: {
            Fonts: "Arial, Helvetica, sans-serif=Arial, Helvetica, sans-serif;Times New Roman, Times, serif=Times New Roman, Times, serif;Courier New, Courier, mono=Courier New, Courier, mono;Times New Roman, Times, serif=Times New Roman, Times, serif;Georgia, Times New Roman, Times, serif=Georgia, Times New Roman, Times, serif;Verdana, Arial, Helvetica, sans-serif=Verdana, Arial, Helvetica, sans-serif;Geneva, Arial, Helvetica, sans-serif=Geneva, Arial, Helvetica, sans-serif",
            Sizes: "9;10;12;14;16;18;24;xx-small;x-small;small;medium;large;x-large;xx-large;smaller;larger",
            Measurement: "+pixels=px;points=pt;inches=in;centimetres=cm;millimetres=mm;picas=pc;ems=em;exs=ex;%",
            SpacingMeasurement: "pixels=px;points=pt;inches=in;centimetres=cm;millimetres=mm;picas=pc;+ems=em;exs=ex;%",
            IndentMeasurement: "pixels=px;+points=pt;inches=in;centimetres=cm;millimetres=mm;picas=pc;ems=em;exs=ex;%",
            Weight: "normal;bold;bolder;lighter;100;200;300;400;500;600;700;800;900",
            TextStyle: "normal;italic;oblique",
            Variant: "normal;small-caps",
            LineHeight: "normal",
            Attachment: "fixed;scroll",
            Repeat: "no-repeat;repeat;repeat-x;repeat-y",
            PosH: "left;center;right",
            PosV: "top;center;bottom",
            VAlign: "baseline;sub;super;top;text-top;middle;bottom;text-bottom",
            Display: "inline;block;list-item;run-in;compact;marker;table;inline-table;table-row-group;table-header-group;table-footer-group;table-row;table-column-group;table-column;table-cell;table-caption;none",
            BorderStyle: "none;solid;dashed;dotted;double;groove;ridge;inset;outset",
            BorderWidth: "thin;medium;thick",
            ListType: "disc;circle;square;decimal;lower-roman;upper-roman;lower-alpha;upper-alpha;none"
        },
        aggregateStyles: function(allStyles) {
            var mergedStyles = {};
            return tinymce.each(allStyles, function(style) {
                if ("" !== style) {
                    var name, parsedStyles = tinyMCEPopup.editor.dom.parseStyle(style);
                    for (name in parsedStyles) parsedStyles.hasOwnProperty(name) && (void 0 === mergedStyles[name] ? mergedStyles[name] = parsedStyles[name] : "text-decoration" === name && -1 === mergedStyles[name].indexOf(parsedStyles[name]) && (mergedStyles[name] = mergedStyles[name] + " " + parsedStyles[name]));
                }
            }), mergedStyles;
        },
        init: function() {
            var self = this, ed = tinyMCEPopup.editor, ce = document.getElementById("container");
            this.settings.file_browser || $(".browser").removeClass("browser"), 
            this.existingStyles = this.aggregateStyles(tinyMCEPopup.getWindowArg("styles")), 
            ce.style.cssText = ed.dom.serializeStyle(this.existingStyles), this.applyActionIsInsert = ed.getParam("edit_css_style_insert_span", !1), 
            $("#insert").on("click", function(e) {
                e.preventDefault(), self.updateAction();
            }), $("#apply").on("click", function(e) {
                e.preventDefault(), self.applyAction();
            }), $("#toggle_insert_span").prop("checked", this.applyActionIsInsert), 
            this.fillSelect("text_font", "style_font", ed.getParam("theme_fonts", this.defaults.Fonts), ";", !0), 
            this.fillSelect("text_size", "style_font_size", this.defaults.Sizes, ";", !0), 
            this.fillSelect("text_size_measurement", "style_font_size_measurement", this.defaults.Measurement, ";", !0), 
            this.fillSelect("text_case", "style_text_case", "capitalize;uppercase;lowercase", ";", !0), 
            this.fillSelect("text_weight", "style_font_weight", this.defaults.Weight, ";", !0), 
            this.fillSelect("text_style", "style_font_style", this.defaults.TextStyle, ";", !0), 
            this.fillSelect("text_variant", "style_font_variant", this.defaults.Variant, ";", !0), 
            this.fillSelect("text_lineheight", "style_font_line_height", this.defaults.LineHeight, ";", !0), 
            this.fillSelect("text_lineheight_measurement", "style_font_line_height_measurement", this.defaults.Measurement, ";", !0), 
            this.fillSelect("background_attachment", "style_background_attachment", this.defaults.Attachment, ";", !0), 
            this.fillSelect("background_repeat", "style_background_repeat", this.defaults.Repeat, ";", !0), 
            this.fillSelect("background_hpos_measurement", "style_background_hpos_measurement", this.defaults.Measurement, ";", !0), 
            this.fillSelect("background_vpos_measurement", "style_background_vpos_measurement", this.defaults.Measurement, ";", !0), 
            this.fillSelect("background_hpos", "style_background_hpos", this.defaults.PosH, ";", !0), 
            this.fillSelect("background_vpos", "style_background_vpos", this.defaults.PosV, ";", !0), 
            this.fillSelect("block_wordspacing", "style_wordspacing", "normal", ";", !0), 
            this.fillSelect("block_wordspacing_measurement", "style_wordspacing_measurement", this.defaults.SpacingMeasurement, ";", !0), 
            this.fillSelect("block_letterspacing", "style_letterspacing", "normal", ";", !0), 
            this.fillSelect("block_letterspacing_measurement", "style_letterspacing_measurement", this.defaults.SpacingMeasurement, ";", !0), 
            this.fillSelect("block_vertical_alignment", "style_vertical_alignment", this.defaults.VAlign, ";", !0), 
            this.fillSelect("block_text_align", "style_text_align", "left;right;center;justify", ";", !0), 
            this.fillSelect("block_whitespace", "style_whitespace", "normal;pre;pre-wrap;pre-line;nowrap", ";", !0), 
            this.fillSelect("block_display", "style_display", this.defaults.Display, ";", !0), 
            this.fillSelect("block_text_indent_measurement", "style_text_indent_measurement", this.defaults.IndentMeasurement, ";", !0), 
            this.fillSelect("box_width_measurement", "style_box_width_measurement", this.defaults.Measurement, ";", !0), 
            this.fillSelect("box_height_measurement", "style_box_height_measurement", this.defaults.Measurement, ";", !0), 
            this.fillSelect("box_float", "style_float", "left;right;none", ";", !0), 
            this.fillSelect("box_clear", "style_clear", "left;right;both;none", ";", !0), 
            this.fillSelect("box_padding_left_measurement", "style_padding_left_measurement", this.defaults.Measurement, ";", !0), 
            this.fillSelect("box_padding_top_measurement", "style_padding_top_measurement", this.defaults.Measurement, ";", !0), 
            this.fillSelect("box_padding_bottom_measurement", "style_padding_bottom_measurement", this.defaults.Measurement, ";", !0), 
            this.fillSelect("box_padding_right_measurement", "style_padding_right_measurement", this.defaults.Measurement, ";", !0), 
            this.fillSelect("box_margin_left_measurement", "style_margin_left_measurement", this.defaults.Measurement, ";", !0), 
            this.fillSelect("box_margin_top_measurement", "style_margin_top_measurement", this.defaults.Measurement, ";", !0), 
            this.fillSelect("box_margin_bottom_measurement", "style_margin_bottom_measurement", this.defaults.Measurement, ";", !0), 
            this.fillSelect("box_margin_right_measurement", "style_margin_right_measurement", this.defaults.Measurement, ";", !0), 
            this.fillSelect("border_style_top", "style_border_style_top", this.defaults.BorderStyle, ";", !0), 
            this.fillSelect("border_style_right", "style_border_style_right", this.defaults.BorderStyle, ";", !0), 
            this.fillSelect("border_style_bottom", "style_border_style_bottom", this.defaults.BorderStyle, ";", !0), 
            this.fillSelect("border_style_left", "style_border_style_left", this.defaults.BorderStyle, ";", !0), 
            this.fillSelect("border_width_top", "style_border_width_top", this.defaults.BorderWidth, ";", !0), 
            this.fillSelect("border_width_right", "style_border_width_right", this.defaults.BorderWidth, ";", !0), 
            this.fillSelect("border_width_bottom", "style_border_width_bottom", this.defaults.BorderWidth, ";", !0), 
            this.fillSelect("border_width_left", "style_border_width_left", this.defaults.BorderWidth, ";", !0), 
            this.fillSelect("border_width_top_measurement", "style_border_width_top_measurement", this.defaults.Measurement, ";", !0), 
            this.fillSelect("border_width_right_measurement", "style_border_width_right_measurement", this.defaults.Measurement, ";", !0), 
            this.fillSelect("border_width_bottom_measurement", "style_border_width_bottom_measurement", this.defaults.Measurement, ";", !0), 
            this.fillSelect("border_width_left_measurement", "style_border_width_left_measurement", this.defaults.Measurement, ";", !0), 
            this.fillSelect("list_type", "style_list_type", this.defaults.ListType, ";", !0), 
            this.fillSelect("list_position", "style_list_position", "inside;outside", ";", !0), 
            this.fillSelect("positioning_type", "style_positioning_type", "absolute;relative;static", ";", !0), 
            this.fillSelect("positioning_visibility", "style_positioning_visibility", "inherit;visible;hidden", ";", !0), 
            this.fillSelect("positioning_width_measurement", "style_positioning_width_measurement", this.defaults.Measurement, ";", !0), 
            this.fillSelect("positioning_height_measurement", "style_positioning_height_measurement", this.defaults.Measurement, ";", !0), 
            this.fillSelect("positioning_overflow", "style_positioning_overflow", "visible;hidden;scroll;auto", ";", !0), 
            this.fillSelect("positioning_placement_top_measurement", "style_positioning_placement_top_measurement", this.defaults.Measurement, ";", !0), 
            this.fillSelect("positioning_placement_right_measurement", "style_positioning_placement_right_measurement", this.defaults.Measurement, ";", !0), 
            this.fillSelect("positioning_placement_bottom_measurement", "style_positioning_placement_bottom_measurement", this.defaults.Measurement, ";", !0), 
            this.fillSelect("positioning_placement_left_measurement", "style_positioning_placement_left_measurement", this.defaults.Measurement, ";", !0), 
            this.fillSelect("positioning_clip_top_measurement", "style_positioning_clip_top_measurement", this.defaults.Measurement, ";", !0), 
            this.fillSelect("positioning_clip_right_measurement", "style_positioning_clip_right_measurement", this.defaults.Measurement, ";", !0), 
            this.fillSelect("positioning_clip_bottom_measurement", "style_positioning_clip_bottom_measurement", this.defaults.Measurement, ";", !0), 
            this.fillSelect("positioning_clip_left_measurement", "style_positioning_clip_left_measurement", this.defaults.Measurement, ";", !0), 
            this.setupFormData(), this.showDisabledControls(), Wf.init(), $(".uk-form-controls select").datalist().trigger("datalist:update"), 
            $(".uk-datalist").trigger("datalist:update");
        },
        setupFormData: function() {
            var v, ed = tinyMCEPopup.editor, ce = document.getElementById("container");
            selectByValue("text_font", ce.style.fontFamily, !0, !0), selectByValue("text_size", this.getNum(ce.style.fontSize), !0, !0), 
            selectByValue("text_size_measurement", this.getMeasurement(ce.style.fontSize)), 
            selectByValue("text_weight", ce.style.fontWeight, !0, !0), selectByValue("text_style", ce.style.fontStyle, !0, !0), 
            selectByValue("text_lineheight", this.getNum(ce.style.lineHeight), !0, !0), 
            selectByValue("text_lineheight_measurement", this.getMeasurement(ce.style.lineHeight)), 
            selectByValue("text_case", ce.style.textTransform, !0, !0), selectByValue("text_variant", ce.style.fontVariant, !0, !0), 
            $("#text_color").val(ed.dom.toHex(ce.style.color)), $("#text_underline").prop("checked", this.inStr(ce.style.textDecoration, "underline")), 
            $("#text_overline").prop("checked", this.inStr(ce.style.textDecoration, "overline")), 
            $("#text_linethrough").prop("checked", this.inStr(ce.style.textDecoration, "line-through")), 
            $("#text_blink").prop("checked", this.inStr(ce.style.textDecoration, "blink")), 
            $("#text_none").prop("checked", this.inStr(ce.style.textDecoration, "none")), 
            this.updateTextDecorations(), $("#background_color").val(ed.dom.toHex(ce.style.backgroundColor)), 
            $("#background_image").val(ce.style.backgroundImage.replace(new RegExp("url\\('?([^']*)'?\\)", "gi"), function(a, b) {
                return ed.convertURL(b);
            })), selectByValue("background_repeat", ce.style.backgroundRepeat, !0, !0), 
            selectByValue("background_attachment", ce.style.backgroundAttachment, !0, !0), 
            selectByValue("background_hpos", this.getNum(this.getVal(ce.style.backgroundPosition, 0)), !0, !0), 
            selectByValue("background_hpos_measurement", this.getMeasurement(this.getVal(ce.style.backgroundPosition, 0))), 
            selectByValue("background_vpos", this.getNum(this.getVal(ce.style.backgroundPosition, 1)), !0, !0), 
            selectByValue("background_vpos_measurement", this.getMeasurement(this.getVal(ce.style.backgroundPosition, 1))), 
            selectByValue("block_wordspacing", this.getNum(ce.style.wordSpacing), !0, !0), 
            selectByValue("block_wordspacing_measurement", this.getMeasurement(ce.style.wordSpacing)), 
            selectByValue("block_letterspacing", this.getNum(ce.style.letterSpacing), !0, !0), 
            selectByValue("block_letterspacing_measurement", this.getMeasurement(ce.style.letterSpacing)), 
            selectByValue("block_vertical_alignment", ce.style.verticalAlign, !0, !0), 
            selectByValue("block_text_align", ce.style.textAlign, !0, !0), $("#block_text_indent").val(this.getNum(ce.style.textIndent)), 
            selectByValue("block_text_indent_measurement", this.getMeasurement(ce.style.textIndent)), 
            selectByValue("block_whitespace", ce.style.whiteSpace, !0, !0), selectByValue("block_display", ce.style.display, !0, !0), 
            $("#box_width").val(this.getNum(ce.style.width)), selectByValue("box_width_measurement", this.getMeasurement(ce.style.width)), 
            $("#box_height").val(this.getNum(ce.style.height)), selectByValue("box_height_measurement", this.getMeasurement(ce.style.height)), 
            selectByValue("box_float", ce.style.cssFloat || ce.style.styleFloat, !0, !0), 
            selectByValue("box_clear", ce.style.clear, !0, !0), this.setupBox(ce, "box_padding", "padding", ""), 
            this.setupBox(ce, "box_margin", "margin", ""), this.setupBox(ce, "border_style", "border", "Style"), 
            this.setupBox(ce, "border_width", "border", "Width"), this.setupBox(ce, "border_color", "border", "Color"), 
            $.each([ "top", "right", "bottom", "left" ], function(i, k) {
                $("#border_color_" + k).val(function() {
                    return ed.dom.toHex(this.value);
                });
            }), selectByValue("list_type", ce.style.listStyleType, !0, !0), selectByValue("list_position", ce.style.listStylePosition, !0, !0), 
            $("#list_bullet_image").val(ce.style.listStyleImage.replace(new RegExp("url\\('?([^']*)'?\\)", "gi"), "$1")), 
            selectByValue("positioning_type", ce.style.position, !0, !0), selectByValue("positioning_visibility", ce.style.visibility, !0, !0), 
            selectByValue("positioning_overflow", ce.style.overflow, !0, !0), $("#positioning_zindex").val(ce.style.zIndex || ""), 
            $("#positioning_width").val(this.getNum(ce.style.width)), selectByValue("positioning_width_measurement", this.getMeasurement(ce.style.width)), 
            $("#positioning_height").val(this.getNum(ce.style.height)), selectByValue("positioning_height_measurement", this.getMeasurement(ce.style.height)), 
            this.setupBox(ce, "positioning_placement", "", "", [ "top", "right", "bottom", "left" ]), 
            ce = (ce = ce.style.clip.replace(new RegExp("rect\\('?([^']*)'?\\)", "gi"), "$1")).replace(/,/g, " "), 
            this.hasEqualValues([ this.getVal(ce, 0), this.getVal(ce, 1), this.getVal(ce, 2), this.getVal(ce, 3) ]) ? ($("#positioning_clip_top").val(this.getNum(this.getVal(ce, 0))), 
            selectByValue("positioning_clip_top_measurement", this.getMeasurement(this.getVal(ce, 0))), 
            v = $("#positioning_clip_left").val(), $("#positioning_clip_right").val(v), 
            $("#positioning_clip_bottom").val(v)) : ($("#positioning_clip_top").val(this.getNum(this.getVal(ce, 0))), 
            selectByValue("positioning_clip_top_measurement", this.getMeasurement(this.getVal(ce, 0))), 
            $("#positioning_clip_right").val(this.getNum(this.getVal(ce, 1))), selectByValue("positioning_clip_right_measurement", this.getMeasurement(this.getVal(ce, 1))), 
            $("#positioning_clip_bottom").val(this.getNum(this.getVal(ce, 2))), 
            selectByValue("positioning_clip_bottom_measurement", this.getMeasurement(this.getVal(ce, 2))), 
            $("#positioning_clip_left").val(this.getNum(this.getVal(ce, 3))), selectByValue("positioning_clip_left_measurement", this.getMeasurement(this.getVal(ce, 3))));
        },
        getMeasurement: function(s) {
            return s.replace(/^([0-9.]+)(.*)$/, "$2");
        },
        getNum: function(s) {
            return new RegExp("^(?:[0-9.]+)(?:[a-z%]+)$", "gi").test(s) ? s.replace(/[^0-9.]/g, "") : s;
        },
        inStr: function(s, n) {
            return new RegExp(n, "gi").test(s);
        },
        getVal: function(s, i) {
            s = s.split(" ");
            return 1 < s.length ? s[i] : "";
        },
        setValue: function(n, v) {
            var el = document.getElementById(n);
            "select" == el.type ? selectByValue(n, v, !0, !0) : el.value = v;
        },
        setProp: function(n, p, v) {
            n = document.getElementById(n);
            $(n).prop(p, v);
        },
        setupBox: function(ce, fp, pr, sf, b) {
            this.isSame(ce, pr, sf, b = void 0 === b ? [ "Top", "Right", "Bottom", "Left" ] : b) ? (this.setProp(fp + "_same", "checked", !0), 
            this.setValue(fp + "_top", this.getNum(ce.style[pr + b[0] + sf])), this.setProp(fp + "_top", "disabled", !1), 
            this.setValue(fp + "_right", ""), this.setProp(fp + "_right", "disabled", !0), 
            this.setValue(fp + "_bottom", ""), this.setProp(fp + "_bottom", "disabled", !0), 
            this.setValue(fp + "_left", ""), this.setProp(fp + "_left", "disabled", !0), 
            $("#" + fp + "_top_measurement").get(0) && (selectByValue(fp + "_top_measurement", this.getMeasurement(ce.style[pr + b[0] + sf])), 
            this.setProp(fp + "_left_measurement", "disabled", !0), this.setProp(fp + "_bottom_measurement", "disabled", !0), 
            this.setProp(fp + "_right_measurement", "disabled", !0))) : (this.setProp(fp + "_same", "checked", !1), 
            this.setValue(fp + "_top", this.getNum(ce.style[pr + b[0] + sf])), this.setProp(fp + "_top", "disabled", !1), 
            this.setValue(fp + "_right", this.getNum(ce.style[pr + b[1] + sf])), 
            this.setProp(fp + "_right", "disabled", !1), this.setValue(fp + "_bottom", this.getNum(ce.style[pr + b[2] + sf])), 
            this.setProp(fp + "_bottom", "disabled", !1), this.setValue(fp + "_left", this.getNum(ce.style[pr + b[3] + sf])), 
            this.setProp(fp + "_left", "disabled", !1), $("#" + fp + "_top_measurement").get(0) && (selectByValue(fp + "_top_measurement", this.getMeasurement(ce.style[pr + b[0] + sf])), 
            selectByValue(fp + "_right_measurement", this.getMeasurement(ce.style[pr + b[1] + sf])), 
            selectByValue(fp + "_bottom_measurement", this.getMeasurement(ce.style[pr + b[2] + sf])), 
            selectByValue(fp + "_left_measurement", this.getMeasurement(ce.style[pr + b[3] + sf])), 
            this.setProp(fp + "_left_measurement", "disabled", !1), this.setProp(fp + "_bottom_measurement", "disabled", !1), 
            this.setProp(fp + "_right_measurement", "disabled", !1)));
        },
        isSame: function(e, pr, sf, b) {
            var i, x, a = [];
            for (a[0] = e.style[pr + (b = void 0 === b ? [ "Top", "Right", "Bottom", "Left" ] : b)[0] + (sf = void 0 !== sf && null != sf ? sf : "")], 
            a[1] = e.style[pr + b[1] + sf], a[2] = e.style[pr + b[2] + sf], a[3] = e.style[pr + b[3] + sf], 
            i = 0; i < a.length; i++) {
                if (null == a[i]) return !1;
                for (x = 0; x < a.length; x++) if (a[x] != a[i]) return !1;
            }
            return !0;
        },
        hasEqualValues: function(a) {
            for (var x, i = 0; i < a.length; i++) {
                if (null == a[i]) return !1;
                for (x = 0; x < a.length; x++) if (a[x] != a[i]) return !1;
            }
            return !0;
        },
        toggleApplyAction: function() {
            this.applyActionIsInsert = !this.applyActionIsInsert;
        },
        applyAction: function() {
            var nodes, ce = document.getElementById("container"), ed = tinyMCEPopup.editor, ce = (this.generateCSS(), 
            tinyMCEPopup.restoreSelection(), tinyMCEPopup.editor.dom.parseStyle(ce.style.cssText));
            this.applyActionIsInsert ? (ed.formatter.register("plugin_style", {
                inline: "span",
                styles: this.existingStyles
            }), ed.formatter.remove("plugin_style"), ed.formatter.register("plugin_style", {
                inline: "span",
                styles: ce
            }), ed.formatter.apply("plugin_style")) : (nodes = tinyMCEPopup.getWindowArg("applyStyleToBlocks") ? ed.selection.getSelectedBlocks() : ed.selection.getNode(), 
            ed.dom.setAttrib(nodes, "style", tinyMCEPopup.editor.dom.serializeStyle(ce))), 
            ed.undoManager.add(), ed.nodeChanged();
        },
        updateAction: function() {
            this.applyAction(), tinyMCEPopup.close();
        },
        generateCSS: function() {
            var s, t, ce = document.getElementById("container");
            ce.style.cssText = "", ce.style.fontFamily = $("#text_font").val(), 
            ce.style.fontSize = $("#text_size").val() + (this.isNum($("#text_size").val()) ? $("#text_size_measurement").val() || "px" : ""), 
            ce.style.fontStyle = $("#text_style").val(), ce.style.lineHeight = $("#text_lineheight").val() + (this.isNum($("#text_lineheight").val()) ? $("#text_lineheight_measurement").val() : ""), 
            ce.style.textTransform = $("#text_case").val(), ce.style.fontWeight = $("#text_weight").val(), 
            ce.style.fontVariant = $("#text_variant").val(), ce.style.color = getColor("#text_color"), 
            s = "", s = 0 < (s = (s = (s = (s += $("#text_underline").prop("checked") ? " underline" : "") + ($("#text_overline").prop("checked") ? " overline" : "")) + ($("#text_linethrough").prop("checked") ? " line-through" : "")) + ($("#text_blink").prop("checked") ? " blink" : "")).length ? s.substring(1) : s, 
            $("#text_none").prop("checked") && (s = "none"), ce.style.textDecoration = s, 
            ce.style.backgroundColor = getColor("#background_color"), ce.style.backgroundImage = "" != $("#background_image").val() ? "url(" + $("#background_image").val() + ")" : "", 
            ce.style.backgroundRepeat = $("#background_repeat").val(), ce.style.backgroundAttachment = $("#background_attachment").val(), 
            "" != $("#background_hpos").val() && (s = "", s = (s += $("#background_hpos").val() + (this.isNum($("#background_hpos").val()) ? $("#background_hpos_measurement").val() : "") + " ") + ($("#background_vpos").val() + (this.isNum($("#background_vpos").val()) ? $("#background_vpos_measurement").val() : "")), 
            ce.style.backgroundPosition = s), ce.style.wordSpacing = $("#block_wordspacing").val() + (this.isNum($("#block_wordspacing").val()) ? $("#block_wordspacing_measurement").val() : ""), 
            ce.style.letterSpacing = $("#block_letterspacing").val() + (this.isNum($("#block_letterspacing").val()) ? $("#block_letterspacing_measurement").val() : ""), 
            ce.style.verticalAlign = $("#block_vertical_alignment").val(), ce.style.textAlign = $("#block_text_align").val(), 
            ce.style.textIndent = $("#block_text_indent").val() + (this.isNum($("#block_text_indent").val()) ? $("#block_text_indent_measurement").val() : ""), 
            ce.style.whiteSpace = $("#block_whitespace").val(), ce.style.display = $("#block_display").val(), 
            ce.style.width = $("#box_width").val() + (this.isNum($("#box_width").val()) ? $("#box_width_measurement").val() : ""), 
            ce.style.height = $("#box_height").val() + (this.isNum($("#box_height").val()) ? $("#box_height_measurement").val() : ""), 
            tinymce.isIE ? ce.style.styleFloat = $("#box_float").val() : ce.style.cssFloat = $("#box_float").val(), 
            ce.style.clear = $("#box_clear").val(), $("#box_padding_same").prop("checked") ? ce.style.padding = $("#box_padding_top").val() + (this.isNum($("#box_padding_top").val()) ? $("#box_padding_top_measurement").val() : "") : (ce.style.paddingTop = $("#box_padding_top").val() + (this.isNum($("#box_padding_top").val()) ? $("#box_padding_top_measurement").val() : ""), 
            ce.style.paddingRight = $("#box_padding_right").val() + (this.isNum($("#box_padding_right").val()) ? $("#box_padding_right_measurement").val() : ""), 
            ce.style.paddingBottom = $("#box_padding_bottom").val() + (this.isNum($("#box_padding_bottom").val()) ? $("#box_padding_bottom_measurement").val() : ""), 
            ce.style.paddingLeft = $("#box_padding_left").val() + (this.isNum($("#box_padding_left").val()) ? $("#box_padding_left_measurement").val() : "")), 
            $("#box_margin_same").prop("checked") ? ce.style.margin = $("#box_margin_top").val() + (this.isNum($("#box_margin_top").val()) ? $("#box_margin_top_measurement").val() : "") : (ce.style.marginTop = $("#box_margin_top").val() + (this.isNum($("#box_margin_top").val()) ? $("#box_margin_top_measurement").val() : ""), 
            ce.style.marginRight = $("#box_margin_right").val() + (this.isNum($("#box_margin_right").val()) ? $("#box_margin_right_measurement").val() : ""), 
            ce.style.marginBottom = $("#box_margin_bottom").val() + (this.isNum($("#box_margin_bottom").val()) ? $("#box_margin_bottom_measurement").val() : ""), 
            ce.style.marginLeft = $("#box_margin_left").val() + (this.isNum($("#box_margin_left").val()) ? $("#box_margin_left_measurement").val() : "")), 
            $("#border_style_same").prop("checked") ? ce.style.borderStyle = $("#border_style_top").val() : (ce.style.borderTopStyle = $("#border_style_top").val(), 
            ce.style.borderRightStyle = $("#border_style_right").val(), ce.style.borderBottomStyle = $("#border_style_bottom").val(), 
            ce.style.borderLeftStyle = $("#border_style_left").val()), $("#border_width_same").prop("checked") ? ce.style.borderWidth = $("#border_width_top").val() + (this.isNum($("#border_width_top").val()) ? $("#border_width_top_measurement").val() : "") : (ce.style.borderTopWidth = $("#border_width_top").val() + (this.isNum($("#border_width_top").val()) ? $("#border_width_top_measurement").val() : ""), 
            ce.style.borderRightWidth = $("#border_width_right").val() + (this.isNum($("#border_width_right").val()) ? $("#border_width_right_measurement").val() : ""), 
            ce.style.borderBottomWidth = $("#border_width_bottom").val() + (this.isNum($("#border_width_bottom").val()) ? $("#border_width_bottom_measurement").val() : ""), 
            ce.style.borderLeftWidth = $("#border_width_left").val() + (this.isNum($("#border_width_left").val()) ? $("#border_width_left_measurement").val() : "")), 
            $("#border_color_same").prop("checked") ? ce.style.borderColor = getColor("#border_color_top") : (ce.style.borderTopColor = getColor("#border_color_top"), 
            ce.style.borderRightColor = getColor("#border_color_right"), ce.style.borderBottomColor = getColor("#border_color_bottom"), 
            ce.style.borderLeftColor = getColor("#border_color_left")), ce.style.listStyleType = $("#list_type").val(), 
            ce.style.listStylePosition = $("#list_position").val(), ce.style.listStyleImage = "" != $("#list_bullet_image").val() ? "url(" + $("#list_bullet_image").val() + ")" : "", 
            ce.style.position = $("#positioning_type").val(), ce.style.visibility = $("#positioning_visibility").val(), 
            "" == ce.style.width && (ce.style.width = $("#positioning_width").val() + (this.isNum($("#positioning_width").val()) ? $("#positioning_width_measurement").val() : "")), 
            "" == ce.style.height && (ce.style.height = $("#positioning_height").val() + (this.isNum($("#positioning_height").val()) ? $("#positioning_height_measurement").val() : "")), 
            ce.style.zIndex = $("#positioning_zindex").val(), ce.style.overflow = $("#positioning_overflow").val(), 
            $("#positioning_placement_same").prop("checked") ? (s = $("#positioning_placement_top").val() + (this.isNum($("#positioning_placement_top").val()) ? $("#positioning_placement_top_measurement").val() : ""), 
            ce.style.top = s, ce.style.right = s, ce.style.bottom = s, ce.style.left = s) : (ce.style.top = $("#positioning_placement_top").val() + (this.isNum($("#positioning_placement_top").val()) ? $("#positioning_placement_top_measurement").val() : ""), 
            ce.style.right = $("#positioning_placement_right").val() + (this.isNum($("#positioning_placement_right").val()) ? $("#positioning_placement_right_measurement").val() : ""), 
            ce.style.bottom = $("#positioning_placement_bottom").val() + (this.isNum($("#positioning_placement_bottom").val()) ? $("#positioning_placement_bottom_measurement").val() : ""), 
            ce.style.left = $("#positioning_placement_left").val() + (this.isNum($("#positioning_placement_left").val()) ? $("#positioning_placement_left_measurement").val() : "")), 
            $("#positioning_clip_same").prop("checked") ? "rect(auto auto auto auto)" != (s = (s = (s = "rect(") + ((t = this.isNum($("#positioning_clip_top").val()) ? $("#positioning_clip_top").val() + $("#positioning_clip_top_measurement").val() : "auto") + " ") + (t + " ")) + (t + " ") + (t + ")")) && (ce.style.clip = s) : (s = "rect(", 
            "rect(auto auto auto auto)" != (s = (s = (s = (s += (this.isNum($("#positioning_clip_top").val()) ? $("#positioning_clip_top").val() + $("#positioning_clip_top_measurement").val() : "auto") + " ") + ((this.isNum($("#positioning_clip_right").val()) ? $("#positioning_clip_right").val() + $("#positioning_clip_right_measurement").val() : "auto") + " ")) + ((this.isNum($("#positioning_clip_bottom").val()) ? $("#positioning_clip_bottom").val() + $("#positioning_clip_bottom_measurement").val() : "auto") + " ")) + (this.isNum($("#positioning_clip_left").val()) ? $("#positioning_clip_left").val() + $("#positioning_clip_left_measurement").val() : "auto") + ")") && (ce.style.clip = s));
        },
        isNum: function(s) {
            return new RegExp("[0-9]+", "g").test(s);
        },
        showDisabledControls: function() {},
        fillSelect: function(s, param, dval, sep, em) {
            var i, ar, p, se;
            for (sep = void 0 === sep ? ";" : sep, em && addSelectValue(s, "", ""), 
            ar = tinyMCEPopup.getParam(param, dval).split(sep), i = 0; i < ar.length; i++) se = !1, 
            "+" == ar[i].charAt(0) && (ar[i] = ar[i].substring(1), se = !0), 1 < (p = ar[i].split("=")).length ? (addSelectValue(s, p[0], p[1]), 
            se && selectByValue(s, p[1])) : (addSelectValue(s, p[0], p[0]), se && selectByValue(s, p[0]));
        },
        toggleSame: function(ce, pre) {
            ce = ce.checked;
            $("#" + pre + "_right, #" + pre + "_bottom, #" + pre + "_left").attr("disabled", ce).toggleClass("disabled", ce).trigger("change"), 
            $("#" + pre + "_right_measurement, #" + pre + "_bottom_measurement, #" + pre + "_left_measurement").attr("disabled", ce).toggleClass("disabled", ce).trigger("change");
        },
        synch: function(fr, to) {
            $("#" + to).val($("#" + fr).val()), document.getElementById[fr + "_measurement"] && selectByValue(to + "_measurement", $("#" + fr + "_measurement").val());
        },
        updateTextDecorations: function() {
            var noneChecked = $("#text_none").is(":checked");
            $("#text_underline, #text_overline, #text_linethrough, #text_blink").each(function() {
                $(this).prop("disabled", noneChecked), noneChecked && $(this).prop("checked", !1);
            });
        }
    };
    tinyMCEPopup.onInit.add(StyleDialog.init, StyleDialog), window.StyleDialog = StyleDialog;
}(tinymce, tinyMCEPopup, jQuery);tinymce/plugins/style/plugin.js000060400000002775152456167170012716 0ustar00/* jce - 2.9.99.2 | 2026-04-22 | https://www.joomlacontenteditor.net | Source: https://github.com/widgetfactory/jce | Copyright (C) 2006 - 2026 Ryan Demmer. All rights reserved | GNU/GPL Version 2 or later - http://www.gnu.org/licenses/gpl-2.0.html */
tinymce.PluginManager.add("style", function(ed, url) {
    function isRootNode(node) {
        return node == ed.dom.getRoot();
    }
    window.matchMedia("(max-width: 600px)").matches || (ed.addCommand("mceStyleProps", function() {
        var applyStyleToBlocks = !1, blocks = ed.selection.getSelectedBlocks(), styles = [];
        1 === blocks.length ? styles.push(ed.selection.getNode().style.cssText) : (tinymce.each(blocks, function(block) {
            styles.push(ed.dom.getAttrib(block, "style"));
        }), applyStyleToBlocks = !0), ed.windowManager.open({
            file: ed.getParam("site_url") + "index.php?option=com_jce&task=plugin.display&plugin=style",
            size: "mce-modal-landscape-xxlarge"
        }, {
            applyStyleToBlocks: applyStyleToBlocks,
            plugin_url: url,
            styles: styles
        });
    }), ed.addCommand("mceSetElementStyle", function(ui, v) {
        var node = ed.selection.getNode();
        node && (ed.dom.setAttrib(node, "style", v), ed.execCommand("mceRepaint"));
    }), ed.onNodeChange.add(function(ed, cm, n) {
        cm.setDisabled("style", isRootNode(n) || n.hasAttribute("data-mce-bogus"));
    }), ed.addButton("style", {
        title: "style.desc",
        cmd: "mceStyleProps"
    }));
});tinymce/plugins/upload/plugin.js000060400000034377152456167170013045 0ustar00/* jce - 2.9.99.2 | 2026-04-22 | https://www.joomlacontenteditor.net | Source: https://github.com/widgetfactory/jce | Copyright (C) 2006 - 2026 Ryan Demmer. All rights reserved | GNU/GPL Version 2 or later - http://www.gnu.org/licenses/gpl-2.0.html */
!function() {
    var each = tinymce.each, JSON = tinymce.util.JSON, RangeUtils = tinymce.dom.RangeUtils, Uuid = tinymce.util.Uuid, Env = tinymce.util.Env;
    tinymce.PluginManager.add("upload", function(ed, url) {
        var plugins = [], files = [];
        ed.onPreInit.add(function() {
            function bindUploadEvents(ed) {
                each(ed.dom.select(".mce-item-upload-marker", ed.getBody()), function(n) {
                    0 == plugins.length ? ed.dom.remove(n) : bindUploadMarkerEvents(n);
                });
            }
            each(ed.plugins, function(plg, name) {
                var data;
                tinymce.is(plg.getUploadConfig, "function") && (data = plg.getUploadConfig()).inline && data.filetypes && plugins.push(plg);
            }), ed.onBeforeSetContent.add(function(ed, o) {
                o.content = o.content.replace(/<\/media>/g, "&nbsp;</media>");
            }), ed.onPostProcess.add(function(ed, o) {
                o.content = o.content.replace(/(&nbsp;|\u00a0)<\/media>/g, "</media>");
            }), ed.schema.addValidElements("+media[type|width|height|class|style|title|*]"), 
            ed.serializer.addAttributeFilter("data-mce-marker", function(nodes, name, args) {
                for (var i = nodes.length; i--; ) nodes[i].remove();
            }), ed.parser.addNodeFilter("img,media", function(nodes) {
                for (var node, i = nodes.length; i--; ) !function(node) {
                    if ("media" === node.name) return 1;
                    if ("img" === node.name) {
                        if (node.attr("data-mce-upload-marker")) return 1;
                        node = node.attr("class");
                        if (node && -1 != node.indexOf("upload-placeholder")) return 1;
                    }
                }(node = nodes[i]) || (0 == plugins.length ? node.remove() : function(node) {
                    var src = node.attr("src") || "", style = {}, cls = [];
                    node.attr("alt") || /data:image/.test(src) || (src = src.substring(src.length, src.lastIndexOf("/") + 1), 
                    node.attr("alt", src));
                    node.attr("style") && (style = ed.dom.styles.parse(node.attr("style")));
                    node.attr("hspace") && (style["margin-left"] = style["margin-right"] = node.attr("hspace"));
                    node.attr("vspace") && (style["margin-top"] = style["margin-bottom"] = node.attr("vspace"));
                    node.attr("align") && (style.float = node.attr("align"));
                    node.attr("class") && (cls = node.attr("class").replace(/\s*upload-placeholder\s*/, "").split(" "));
                    cls.push("mce-item-upload"), cls.push("mce-item-upload-marker"), 
                    "media" === node.name && (node.name = "img", node.shortEnded = !0);
                    node.attr({
                        src: Env.transparentSrc,
                        class: tinymce.trim(cls.join(" "))
                    });
                    src = ed.dom.create("span", {
                        style: style
                    });
                    (cls = ed.dom.getAttrib(src, "style")) && node.attr({
                        style: cls,
                        "data-mce-style": cls
                    });
                }(node));
            }), ed.serializer.addNodeFilter("img", function(nodes) {
                for (var node, cls, i = nodes.length; i--; ) (cls = (node = nodes[i]).attr("class")) && /mce-item-upload-marker/.test(cls) && (cls = cls.replace(/(?:^|\s)(mce-item-)(?!)(upload|upload-marker|upload-placeholder)(?!\S)/g, ""), 
                node.attr({
                    "data-mce-src": "",
                    src: "",
                    class: tinymce.trim(cls)
                }), node.name = "media", node.shortEnded = !1, node.attr("alt", null), 
                node.attr("data-mce-upload-marker", null));
            }), ed.onSetContent.add(function() {
                bindUploadEvents(ed);
            }), ed.onFullScreen && ed.onFullScreen.add(function(editor) {
                bindUploadEvents(editor);
            });
        }), ed.onInit.add(function() {
            function cancelEvent(e) {
                e.preventDefault(), e.stopPropagation();
            }
            0 == plugins.length ? (ed.dom.bind(ed.getBody(), "dragover", function(e) {
                var dataTransfer = e.dataTransfer;
                dataTransfer && dataTransfer.files && dataTransfer.files.length && e.preventDefault();
            }), ed.dom.bind(ed.getBody(), "drop", function(e) {
                var dataTransfer = e.dataTransfer;
                dataTransfer && dataTransfer.files && dataTransfer.files.length && e.preventDefault();
            })) : (ed.theme && ed.theme.onResolveName && ed.theme.onResolveName.add(function(theme, o) {
                var n = o.node;
                n && "IMG" === n.nodeName && /mce-item-upload/.test(n.className) && (o.name = "placeholder");
            }), ed.dom.bind(ed.getBody(), "dragover", function(e) {
                e.dataTransfer.dropEffect = tinymce.VK.metaKeyPressed(e) ? "copy" : "move";
            }), ed.dom.bind(ed.getBody(), "drop", function(e) {
                var rng, dataTransfer = e.dataTransfer;
                dataTransfer && dataTransfer.files && dataTransfer.files.length && (each(dataTransfer.files, function(file) {
                    rng || (rng = RangeUtils.getCaretRangeFromPoint(e.clientX, e.clientY, ed.getDoc())) && ed.selection.setRng(rng), 
                    addFile(file);
                }), cancelEvent(e)), files.length && each(files, function(file) {
                    uploadFile(file);
                }), tinymce.isGecko && "IMG" == e.target.nodeName && cancelEvent(e);
            }));
        });
        var noop = function() {};
        function uploadHandler(file, success, failure, progress) {
            success = success || noop, failure = failure || noop, progress = progress || noop;
            var xhr, formData, args = {
                method: "upload",
                id: Uuid.uuid("wf_"),
                inline: 1,
                name: file.filename
            }, url = file.upload_url;
            url += "&" + ed.settings.query, (xhr = new XMLHttpRequest()).open("POST", url), 
            xhr.upload.onprogress = function(e) {
                progress(e.loaded / e.total * 100);
            }, xhr.onerror = function() {
                failure("Image upload failed due to a XHR Transport error. Code: " + xhr.status);
            }, xhr.onload = function() {
                var json;
                xhr.status < 200 || 300 <= xhr.status ? failure("HTTP Error: " + xhr.status) : ((json = JSON.parse(xhr.responseText)) || failure("Invalid JSON response!"), 
                json.error || !json.result ? failure(json.error.message || "Invalid JSON response!") : success(json.result));
            }, formData = new FormData(), each(args, function(value, name) {
                formData.append(name, value);
            }), formData.append("file", file, file.name), xhr.send(formData);
        }
        function addFile(file) {
            if (!/\.(php([0-9]*)|phtml|pl|py|jsp|asp|htm|html|shtml|sh|cgi)\./i.test(file.name) && (each(plugins, function(plg) {
                if (!file.upload_url) {
                    var url = plg.getUploadURL(file);
                    if (url) return file.upload_url = url, file.uploader = plg, 
                    !1;
                }
            }), file.upload_url)) {
                if (tinymce.is(file.uploader.getUploadConfig, "function")) {
                    var config = file.uploader.getUploadConfig(), name = file.target_name || file.name;
                    if (file.filename = name.replace(/[\+\\\/\?\#%&<>"\'=\[\]\{\},;@\^\(\)\xa3\u20ac$~]/g, ""), 
                    !new RegExp(".(" + config.filetypes.join("|") + ")$", "i").test(file.name)) return void ed.windowManager.alert({
                        text: ed.getLang("upload.file_extension_error", "File type not supported"),
                        title: ed.getLang("upload.error", "Upload Error")
                    });
                    if (file.size) {
                        name = parseInt(config.max_size, 10) || 1024;
                        if (file.size > 1024 * name) return void ed.windowManager.alert({
                            text: ed.getLang("upload.file_size_error", "File size exceeds maximum allowed size"),
                            title: ed.getLang("upload.error", "Upload Error")
                        });
                    }
                }
                var w;
                return file.marker || !1 === ed.settings.upload_use_placeholder || (config = Uuid.uuid("wf-tmp-"), 
                ed.execCommand("mceInsertContent", !1, '<span data-mce-marker="1" id="' + config + '">\ufeff</span>', {
                    skip_undo: 1
                }), name = ed.dom.get(config), /image\/(gif|png|jpeg|jpg)/.test(file.type) && file.size ? (config = Math.round(Math.sqrt(file.size)), 
                w = Math.max(300, config), config = Math.max(300, config), ed.dom.setStyles(name, {
                    width: w,
                    height: config
                }), ed.dom.addClass(name, "mce-item-upload")) : ed.setProgressState(!0), 
                file.marker = name), files.push(file), 1;
            }
            ed.windowManager.alert({
                text: ed.getLang("upload.file_extension_error", "File type not supported"),
                title: ed.getLang("upload.error", "Upload Error")
            });
        }
        function bindUploadMarkerEvents(marker) {
            var dom = tinymce.DOM;
            function removeUpload() {
                dom.setStyles("wf_upload_button", {
                    top: "",
                    left: "",
                    display: "none",
                    zIndex: ""
                });
            }
            ed.onNodeChange.add(removeUpload), ed.dom.bind(ed.getWin(), "scroll", removeUpload);
            var btn, input = dom.get("wf_upload_input");
            dom.get("wf_upload_button") || (btn = dom.add(dom.doc.body, "div", {
                id: "wf_upload_button",
                class: "btn",
                role: "button",
                title: ed.getLang("upload.button_description", "Click to upload a file")
            }, '<label for="wf_upload_input"><span class="icon-upload"></span>&nbsp;' + ed.getLang("upload.label", "Upload") + "</label>"), 
            input = dom.add(btn, "input", {
                type: "file",
                id: "wf_upload_input"
            })), ed.dom.bind(marker, "mouseover", function(e) {
                var p2, x, p1, vp;
                ed.dom.getAttrib(marker, "data-mce-selected") || (vp = ed.dom.getViewPort(ed.getWin()), 
                p1 = dom.getRect(ed.getContentAreaContainer()), p2 = ed.dom.getRect(marker), 
                vp.y > p2.y + p2.h / 2 - 25) || vp.y < p2.y + p2.h / 2 + 25 - p1.h || (x = Math.max(p2.x - vp.x, 0) + p1.x, 
                p1 = Math.max(p2.y - vp.y, 0) + p1.y - Math.max(vp.y - p2.y, 0), 
                vp = "mce_fullscreen" == ed.id ? dom.get("mce_fullscreen_container").style.zIndex : 0, 
                dom.setStyles("wf_upload_button", {
                    top: p1 + p2.h / 2 - 16,
                    left: x + p2.w / 2 - 50,
                    display: "block",
                    zIndex: vp + 1
                }), dom.setStyles("wf_select_button", {
                    top: p1 + p2.h / 2 - 16,
                    left: x + p2.w / 2 - 50,
                    display: "block",
                    zIndex: vp + 1
                }), input.onchange = function() {
                    var file;
                    input.files && (file = input.files[0]) && (file.marker = marker, 
                    addFile(file)) && (each([ "width", "height" ], function(key) {
                        ed.dom.setStyle(marker, key, ed.dom.getAttrib(marker, key));
                    }), file.marker = ed.dom.rename(marker, "span"), uploadFile(file), 
                    removeUpload());
                });
            }), ed.dom.bind(marker, "mouseout", function(e) {
                !e.relatedTarget && 0 < e.clientY || removeUpload();
            });
        }
        function removeFile(file) {
            for (var i = 0; i < files.length; i++) files[i] === file && files.splice(i, 1);
            files.splice(tinymce.inArray(files, file), 1);
        }
        function uploadFile(file) {
            uploadHandler(file, function(response) {
                var response = response.files || [], response = response.length ? response[0] : {};
                file.uploader && (response = tinymce.extend({
                    type: file.type,
                    name: file.name
                }, response), function(file, data) {
                    var w, h, marker = file.marker, file = file.uploader;
                    ed.selection.select(marker), (file = file.insertUploadedFile(data)) && ("object" == typeof file && file.nodeType && (ed.dom.hasClass(marker, "mce-item-upload-marker") && (data = ed.dom.getAttrib(marker, "data-mce-style"), 
                    w = marker.width || 0, h = marker.height || 0, data && ((data = ed.dom.styles.parse(data)).width && (w = data.width, 
                    delete data.width), data.height && (h = data.height, delete data.height), 
                    ed.dom.setStyles(file, data)), w && ed.dom.setAttrib(file, "width", w), 
                    h) && ed.dom.setAttrib(file, "height", h = w ? "" : h), ed.undoManager.add(), 
                    ed.dom.replace(file, marker)), ed.nodeChanged());
                }(file, response)), removeFile(file), file.marker && ed.dom.remove(file.marker), 
                ed.setProgressState(!1);
            }, function(message) {
                ed.windowManager.alert({
                    text: message,
                    title: ed.getLang("upload.error", "Upload Error")
                }), removeFile(file), file.marker && ed.dom.remove(file.marker), 
                ed.setProgressState(!1);
            }, function(value) {
                file.marker && ed.dom.setAttrib(file.marker, "data-progress", value);
            });
        }
        this.plugins = plugins, this.upload = uploadHandler;
    });
}();tinymce/plugins/print/plugin.js000060400000000726152456167170012704 0ustar00/* jce - 2.9.99.2 | 2026-04-22 | https://www.joomlacontenteditor.net | Source: https://github.com/widgetfactory/jce | Copyright (C) 2006 - 2026 Ryan Demmer. All rights reserved | GNU/GPL Version 2 or later - http://www.gnu.org/licenses/gpl-2.0.html */
tinymce.PluginManager.add("print", function(ed) {
    ed.addCommand("mcePrint", function() {
        ed.getWin().print();
    }), ed.addButton("print", {
        title: "print.desc",
        cmd: "mcePrint"
    });
});tinymce/plugins/link/plugin.js000060400000032430152456167170012502 0ustar00/* jce - 2.9.99.2 | 2026-04-22 | https://www.joomlacontenteditor.net | Source: https://github.com/widgetfactory/jce | Copyright (C) 2006 - 2026 Ryan Demmer. All rights reserved | GNU/GPL Version 2 or later - http://www.gnu.org/licenses/gpl-2.0.html */
!function() {
    function isAnchor(elm) {
        return elm && "a" === elm.nodeName.toLowerCase();
    }
    function hasFileSpan(elm) {
        return isAnchor(elm) && elm.querySelector("span.wf_file_text") && 1 === elm.childNodes.length;
    }
    var DOM = tinymce.DOM, Event = tinymce.dom.Event, each = tinymce.each, extend = tinymce.extend;
    function collectNodesInRange(rng, predicate) {
        if (rng.collapsed) return [];
        for (var rng = rng.cloneContents(), walker = new tinymce.dom.TreeWalker(rng.firstChild, rng), elements = [], nodes = [], current = rng.firstChild; (predicate(current) ? elements : nodes).push(current), 
        current = walker.next(); );
        return nodes.length && function(nodes) {
            for (var hasTextNodes = !1, hasElementNodes = !1, i = 0; i < nodes.length; i++) {
                var node = nodes[i];
                if (3 === node.nodeType ? hasTextNodes = !0 : 1 === node.nodeType && "A" != node.tagName && (hasElementNodes = !0), 
                hasTextNodes && hasElementNodes) return 1;
            }
        }(nodes) ? nodes : elements;
    }
    function isOnlyTextSelected(ed) {
        var inlineTextElements = ed.schema.getTextInlineElements();
        return 0 === collectNodesInRange(ed.selection.getRng(), function(elm) {
            return 1 === elm.nodeType && !isAnchor(elm) && !inlineTextElements[elm.nodeName.toLowerCase()];
        }).length;
    }
    function getAnchorText(selection, anchorElm) {
        return (anchorElm ? anchorElm.innerText || anchorElm.textContent : selection.getContent({
            format: "text"
        })).replace(/\uFEFF/g, "");
    }
    function updateTextContent(elm, text) {
        tinymce.each(elm.childNodes, function(node) {
            3 == node.nodeType && "" !== node.nodeValue.trim() && (node.textContent = text);
        });
    }
    function createLink(ed, data) {
        var text, node = ed.selection.getNode(), anchor = ed.dom.getParent(node, "a[href]"), params = ed.getParam("link", {});
        (data = "string" == typeof data ? {
            url: data,
            text: data
        } : data).url ? (text = getAnchorText(ed.selection, isAnchor(node) ? node : null) || "", 
        node && node.hasAttribute("data-mce-item") && (text = "", ed.selection.select(node)), 
        data.text = data.text || text || data.url, /^\s*www\./i.test(data.url) && (data.url = "https://" + data.url), 
        text = {
            href: data.url,
            title: data.title || "",
            target: data.target || ""
        }, text = tinymce.extend(text, params.attributes || {}), ed.selection.isCollapsed() ? ed.execCommand("mceInsertContent", !1, ed.dom.createHTML("a", text, data.text)) : (text["data-mce-tmp"] = "1", 
        ed.execCommand("mceInsertLink", !1, text), isAnchor(anchor) && updateTextContent(node, data.text), 
        params = ed.dom.select('[data-mce-tmp="1"]'), each(params, function(elm) {
            elm.removeAttribute("data-mce-tmp"), updateTextContent(elm, data.text);
        })), ed.undoManager.add(), ed.nodeChanged()) : isAnchor(node) && ed.execCommand("unlink", !1);
    }
    tinymce.PluginManager.add("link", function(ed, url) {
        var urlCtrl, textCtrl, titleCtrl, targetCtrl;
        ed.addCommand("mceLink", function() {
            var se = ed.selection, n = se.getNode();
            "A" != n.nodeName || isAnchor(n) || se.select(n), ed.windowManager.open({
                file: ed.getParam("site_url") + "index.php?option=com_jce&task=plugin.display&plugin=link",
                size: "mce-modal-square-xlarge"
            }, {
                plugin_url: url
            });
        }), ed.addShortcut("meta+k", "link.desc", "mceLink"), ed.onPreInit.add(function() {
            var form, args, stylesListCtrl, params = ed.getParam("link", {}), params = extend({
                attributes: {}
            }, params), isMobile = window.matchMedia("(max-width: 600px)").matches;
            !0 !== params.basic_dialog && !isMobile || (isMobile = ed.controlManager, 
            form = isMobile.createForm("link_form"), args = {
                label: ed.getLang("url", "URL"),
                name: "url",
                clear: !0,
                attributes: {
                    required: !0
                }
            }, params.file_browser && tinymce.extend(args, {
                picker: !0,
                picker_label: "browse",
                picker_icon: "files",
                onpick: function(e) {
                    ed.execCommand("mceFileBrowser", !0, {
                        caller: "link",
                        callback: function(selected, data) {
                            var src;
                            data.length && (src = data[0].url, data = data[0].title, 
                            urlCtrl.value(src), data = data.replace(/\.[^.]+$/i, ""), 
                            textCtrl.value(data), window.setTimeout(function() {
                                urlCtrl.focus();
                            }, 10));
                        },
                        filter: params.filetypes || "files",
                        value: urlCtrl.value()
                    });
                }
            }), urlCtrl = isMobile.createUrlBox("link_url", args), form.add(urlCtrl), 
            textCtrl = isMobile.createTextBox("link_text", {
                label: ed.getLang("link.text", "Text"),
                name: "text",
                clear: !0,
                attributes: {
                    required: !0
                }
            }), form.add(textCtrl), !1 !== params.title_ctrl && (titleCtrl = isMobile.createTextBox("link_title", {
                label: ed.getLang("link.title", "Title"),
                name: "title",
                clear: !0
            }), form.add(titleCtrl)), !1 !== params.target_ctrl && (targetCtrl = isMobile.createListBox("link_target", {
                label: ed.getLang("link.target", "Taget"),
                name: "target",
                onselect: function(v) {}
            }), args = {
                "": "--",
                _blank: ed.getLang("link.target_blank", "Open in new window"),
                _self: ed.getLang("link.target_self", "Open in same window"),
                _parent: ed.getLang("link.target_parent", "Open in parent window"),
                _top: ed.getLang("link.target_top", "Open in top window")
            }, each(args, function(name, value) {
                targetCtrl.add(name, value);
            }), form.add(targetCtrl)), !1 !== params.classes_ctrl && (stylesListCtrl = isMobile.createStylesBox("link_class", {
                label: ed.getLang("link.class", "Classes"),
                onselect: function() {},
                name: "classes",
                styles: params.custom_classes || []
            }), form.add(stylesListCtrl)), ed.addCommand("mceLink", function() {
                ed.windowManager.open({
                    title: ed.getLang("link.desc", "Link"),
                    items: [ form ],
                    size: "mce-modal-landscape-small",
                    open: function() {
                        var label = ed.getLang("insert", "Insert"), node = ed.selection.getNode(), src = "", title = "", target = params.attributes.target || "", state = isOnlyTextSelected(ed), anchorNode = ed.dom.getParent(node, "a[href]"), classes = params.attributes.classes || "", start = (classes.trim().split(" ").filter(function(cls) {
                            return "" !== cls.trim();
                        }), anchorNode && (ed.selection.select(anchorNode), (src = ed.dom.getAttrib(anchorNode, "href")) && (label = ed.getLang("update", "Update")), 
                        tinymce.isIE && (start = ed.selection.getStart()) === ed.selection.getEnd() && "A" === start.nodeName && (anchorNode = start), 
                        hasFileSpan(anchorNode) && (state = !0), title = ed.dom.getAttrib(anchorNode, "title"), 
                        target = ed.dom.getAttrib(anchorNode, "target"), classes = (classes = ed.dom.getAttrib(node, "class")).replace(/mce-[\w\-]+/g, "").replace(/\s+/g, " ").trim().split(" ").filter(function(cls) {
                            return "" !== cls.trim();
                        })), getAnchorText(ed.selection, isAnchor(node) ? node : null) || "");
                        node && node.hasAttribute("data-mce-item") && (state = !1), 
                        urlCtrl.value(src), textCtrl.value(start), textCtrl.setDisabled(!state), 
                        titleCtrl && titleCtrl.value(title), targetCtrl && targetCtrl.value(target), 
                        stylesListCtrl && stylesListCtrl.value(classes), window.setTimeout(function() {
                            urlCtrl.focus();
                        }, 10), DOM.setHTML(this.id + "_insert", label);
                    },
                    buttons: [ {
                        title: ed.getLang("common.cancel", "Cancel"),
                        id: "cancel"
                    }, {
                        title: ed.getLang("insert", "Insert"),
                        id: "insert",
                        onsubmit: function(e) {
                            var data = form.submit();
                            Event.cancel(e), createLink(ed, data);
                        },
                        classes: "primary",
                        scope: self
                    } ]
                });
            }));
        }), ed.onInit.add(function() {
            ed && ed.plugins.contextmenu && ed.plugins.contextmenu.onContextMenu.add(function(th, m, e) {
                m.addSeparator(), m.add({
                    title: "link.desc",
                    icon: "link",
                    cmd: "mceLink",
                    ui: !0
                }), "A" != e.nodeName || ed.dom.getAttrib(e, "name") || m.add({
                    title: "advanced.unlink_desc",
                    icon: "unlink",
                    cmd: "UnLink"
                });
            });
        }), ed.onNodeChange.add(function(ed, cm, n, co) {
            n = ed.dom.getParent(n, "a[href]"), ed = n && ed.dom.hasClass(n, "mce-item-anchor");
            cm.setActive("unlink", n), cm.setActive("link", n), cm.setDisabled("link", ed);
        }), this.createControl = function(n, cm) {
            var html;
            return "link" !== n ? null : !1 === (n = ed.getParam("link", {})).quicklink || !0 === n.basic_dialog ? cm.createButton("link", {
                title: "link.desc",
                cmd: "mceLink"
            }) : (html = '<div class="mceToolbarRow">   <div class="mceToolbarItem">       <input type="text" id="' + ed.id + '_link_input" aria-label="' + ed.getLang("dlg.url", "URL") + '" />       <button type="button" id="' + ed.id + '_link_submit" class="mceButton mceButtonLink" title="' + ed.getLang("advanced.link_desc", "Insert Link") + '" aria-label="' + ed.getLang("link.insert", "Insert Link") + '">           <span class="mceIcon mce_link"></span>       </button>       <button type="button" id="' + ed.id + '_link_unlink" class="mceButton mceButtonUnlink" disabled="disabled" title="' + ed.getLang("advanced.unlink_desc", "Remove Link") + '" aria-label="' + ed.getLang("advanced.unlink_desc", "Remove Link") + '">           <span class="mceIcon mce_unlink"></span>       </button>   </div></div>', 
            (n = cm.createSplitButton("link", {
                title: "link.desc",
                cmd: "mceLink",
                max_width: 264,
                onselect: function(node) {
                    createLink(ed, {
                        url: node.value,
                        text: ""
                    });
                }
            })) ? (n.onRenderMenu.add(function(c, m) {
                var item = m.add({
                    onclick: function(e) {
                        e.preventDefault(), item.setSelected(!1);
                        var value, e = ed.dom.getParent(e.target, ".mceButton");
                        e.disabled || (ed.dom.hasClass(e, "mceButtonLink") && (value = DOM.getValue(ed.id + "_link_input"), 
                        createLink(ed, {
                            url: value,
                            text: ""
                        })), ed.dom.hasClass(e, "mceButtonUnlink") && ed.execCommand("unlink", !1), 
                        m.hideMenu());
                    },
                    html: html
                });
                m.onShowMenu.add(function() {
                    var selection = ed.selection, value = "", node = (DOM.setAttrib(ed.id + "_link_unlink", "disabled", "disabled"), 
                    ed.dom.getParent(selection.getNode(), "a[href]"));
                    isAnchor(node) && (selection.select(node), value = node.getAttribute("href"), 
                    DOM.setAttrib(ed.id + "_link_unlink", "disabled", null)), window.setTimeout(function() {
                        DOM.get(ed.id + "_link_input").focus();
                    }, 10), DOM.setValue(ed.id + "_link_input", value);
                });
            }), n) : void 0);
        }, extend(this, {
            isAnchor: isAnchor,
            hasFileSpan: hasFileSpan,
            isOnlyTextSelected: isOnlyTextSelected,
            getAnchorText: getAnchorText,
            updateTextContent: updateTextContent
        });
    });
}();tinymce/plugins/link/img/icons.png000060400000004141152456167170013241 0ustar00�PNG


IHDRd���(IDATx��PT�ǝŇu�bI&c'Bl���hDCl-�K1�&��!Q��(N����h���`�M-��+�
*�e%��_�<]���;˝�ܻ�t��pg��-�Ώ�{�w�����{ܐ�H
��%��}��
**���G/�6l+�1..��䔔���c6�cx,۰������i`kO.ݸ!�����d1�m�V\�h|�&��(,�%w�m�V|-""z��c��5��"-/�[�}lö��֭1}��蠘��4���H�r��z��>�'�c��_~��]=���h���Sq��Ъ<�2+�ſ�>E�;��[�7J"�6l+�z���##hhkCɽ{B���[P�V�����w����m�V�Upp\yw����͸��)���0xd���{~��,_8�
	�?��E�nA�ۋ�AYy}���I��џ�I�s��œ���l���n� q^;�ð�
��-�4���vu`n��M��-۰�8�+��3��gWsk�Η��h�&�6;r�eyY���C��Dž�����֡!�K��|�&x��!���x��!P;-QM�\i::p��z���#���۳'|ȼ��AO���r���'
q۰!��

	Q��rn.�srp��I����%\�vM�@�D�P(º��P@ n[[[%��EO����HY````��`@y�풸Lx��mG&<���ڑ"�_E����mTT�,���?R��!;;�.?\�M���w'na�g�P�o�Wef�1��-\�z�{


�$n_?S�R��3w�z�;��/�T�NP�@__�5e4�Jn�ܹ�-����T���{�,$d�,���gWMM
Ο?nO�>���R����SR�pdD�Ы��7ߌ�z{{�_UU�R	noQ~)//�h��ӳg1@Se(��/m��,p�…�8u����t�d�ôϡl�G�S''�hgg�XϺ��HLLĤ<��҉�'�oi�#|��?^�C�s$W��O�����n!5�`V��&Z<F�<��>>��D5G�[�1�c���ι�vD<�m�v&���.NV&)ǀ\p�2�L���-�����}J��{����U�Ç���^{����>�](;Š���\�������ۍ��$)9��)����Z���bN�ڟ�Y�7ת�Q���(��G3�[��U`����$]).�ͺ:䗗K���T
�DKI�g�*4t�U �ϥ{�y���E2E%�j
�S75	)�-[vZ����++��r��B����S(o����7��z+�*�����>y���i�i�� L�oYY��
P��7��@v��UVri&zZL��x�i�
�hr�T(��	6R��=���?(�<�Q��+��'
�ոZU���jSt[�溓���I�]� �S�,���'��(��0��YL�k�&�C����>�{:�`��籁���v��!�t����Jj�N�f�bȵ}����J�;@q��M�-��S���0����!D]�ڌn���t�H�-�Sl����vK?6�q�����W�C|zw�ҵ(Ҵ�u�] �cO����.�j@�v{���Ŷ	��/��@�=x�yeW:�%��H9V����d
^��a�X�+M�S����k�v%��l‚C�pM��KB)V�3b�2�wV�S�_2��[���`	^<�����/uX�K�!�h�X��r�uz#V(��c��B@r'^&�ߡk��v�u�] ����Y-�%�
z�\-��1J�k�9�g��`�\:���)a�N��)+��9��M�mV�\�AG��ju-*iVRR���*�J���7�y����ׇ����0.\���|"99�g���00888�7O��c$@kq�#��|�d��抺N�c�^�J&�	�T�V\\�<J�=�_�)���EK�S����Džõ^��.]�4V�j��$ꊋ��~���H�S������G�t�fk�9���N+n6��.ql8FR���&�c±�I%7�@�	ņc$�eܜRL�̱�%��e�����W!���퀟IEND�B`�tinymce/plugins/link/js/link.js000060400000046177152456167170012572 0ustar00/* jce - 2.9.99.2 | 2026-04-22 | https://www.joomlacontenteditor.net | Source: https://github.com/widgetfactory/jce | Copyright (C) 2006 - 2026 Ryan Demmer. All rights reserved | GNU/GPL Version 2 or later - http://www.gnu.org/licenses/gpl-2.0.html */
!function($, tinyMCEPopup) {
    var anchorElm, currNode, emailRex = /(([^<>()\[\]\.,;:\s@\"]+(\.[^<>()\[\]\.,;:\s@\"]+)*)|(\".+\"))@(([^<>()[\]\.,;:\s@\"]+\.)+[^<>()[\]\.,;:\s@\"]{2,})/;
    var LinkDialog = {
        settings: {},
        init: function() {
            var data, x, $repeatable, self = this, ed = tinyMCEPopup.editor, se = ed.selection, api = ed.plugins.link, params = ed.getParam("link", {}), params = (tinyMCEPopup.restoreSelection(), 
            $("button#insert").on("click", function(e) {
                self.insert(), e.preventDefault();
            }), this.settings.file_browser || $("#href").removeClass("browser"), 
            $(".email").on("click", function(e) {
                e.preventDefault(), LinkDialog.createEmail();
            }), $("#anchor_container").html(this.getAnchorListHTML("anchor", "href")), 
            $("#link-browser").tree({
                collapseTree: !0,
                charLength: 50
            }).on("tree:nodeclick", function(e, evt, node) {
                var url;
                $(evt.target).is("button.link-preview") ? (e.preventDefault(), e.stopImmediatePropagation(), 
                url = $(node).attr("data-id") || $(node).attr("id"), evt = $(node).attr("aria-label"), 
                -1 !== url.indexOf("index.php") && (url = ed.documentBaseURI.toAbsolute(url += "&tmpl=component", !0)), 
                Wf.Modal.iframe(evt, url, {
                    width: "100%",
                    height: 480
                })) : ($(node).hasClass("folder") && $(this).trigger("tree:togglenode", [ e, node ]), 
                $(node).hasClass("nolink") || (url = $("a", node).attr("href"), 
                evt = $("a", node).attr("title") || "", "#" == url && (url = $(node).attr("data-id") || $(node).attr("id")), 
                url = Wf.String.decode(url), evt = $.trim(evt.split("/")[0]), self.insertLink({
                    url: url,
                    text: evt
                })));
            }).on("tree:nodeload", function(e, node) {
                var self = this, id = ($(this).trigger("tree:toggleloader", node), 
                $(node).attr("data-id") || $(node).attr("id")), id = Wf.String.query(Wf.String.unescape(id));
                Wf.JSON.request("getLinks", {
                    json: id
                }, function(o) {
                    var ul;
                    o && (o.error ? Wf.Modal.alert(o.error) : ((ul = $("ul:first", node)) && $(ul).remove(), 
                    o.folders && o.folders.length && $(self).trigger("tree:createnode", [ o.folders, node, !1 ]), 
                    $(node).find("li.file").not(".anchor").append('<button type="button" aria-label="' + ed.getLang("dlg.preview", "Preview") + '" class="uk-button uk-button-link link-preview"><i class="uk-icon uk-icon-preview" role="presentation"></i></button>'), 
                    $(self).trigger("tree:togglenodestate", [ node, !0 ]))), $(self).trigger("tree:toggleloader", node);
                }, self);
            }).trigger("tree:init"), $("#search-button").on("click", function(e) {
                self._search(), e.preventDefault();
            }).button({
                icons: {
                    primary: "uk-icon-search"
                }
            }), $("#search-clear").on("click", function(e) {
                $(this).hasClass("uk-active") && ($(this).removeClass("uk-active"), 
                $("#search-input").val(""), $("#search-result").empty().hide());
            }), $("#search-options-button").on("click", function(e) {
                e.preventDefault(), $(this).hasClass("uk-active") ? $(this).removeClass("uk-active") : $(this).addClass("uk-active");
                e = $("#search-options").parent();
                $("#search-options").height(e.parent().height() - e.outerHeight() - 15).toggle();
            }).on("close", function() {
                $(this).removeClass("uk-active"), $("#search-options").hide();
            }), $(void 0).on("change keyup", function() {
                "" === this.value && ($("#search-result").empty().hide(), $("#search-clear").removeClass("uk-active"));
            }), $(window).on("keydown", function(e) {
                13 === e.keyCode && $("#search-input").is(":focus") && (self._search(), 
                e.preventDefault(), e.stopPropagation());
            }), WFPopups.setup(), Wf.init({
                classes: params.custom_classes || []
            }), $("#text").on("change", function() {
                $(this).data("text", this.value);
            }).data("text", ""), api.isOnlyTextSelected(ed));
            currNode = se.getNode(), anchorElm = ed.dom.getParent(currNode, "a[href]"), 
            api.isAnchor(anchorElm) ? (se.select(anchorElm), tinymce.isIE && (start = se.getStart()) === se.getEnd() && "A" === start.nodeName && (anchorElm = start), 
            api.hasFileSpan(anchorElm) && (params = !0), $(".uk-button-text", "#insert").text(tinyMCEPopup.getLang("update", "Update", !0)), 
            start = ed.convertURL(ed.dom.getAttrib(anchorElm, "href")), $("#href").val(start), 
            $.each([ "title", "id", "style", "dir", "lang", "tabindex", "accesskey", "charset", "hreflang", "target" ], function(i, k) {
                $("#" + k).val(ed.dom.getAttrib(anchorElm, k));
            }), $("#rev").val(ed.dom.getAttrib(anchorElm, "rev"), !0), "#" == start.charAt(0) && $("#anchor").val(start), 
            $("#classes").val(function() {
                var values = ed.dom.getAttrib(anchorElm, "class");
                return $.trim(values);
            }).trigger("change"), data = WFPopups.getPopup(anchorElm) || {}, $("#rel").val(function() {
                var v = data.rel;
                return (v = "string" !== $.type(v) ? ed.dom.getAttrib(anchorElm, "rel") : v) ? (v = $.trim(v), 
                ed.dom.encode(v)) : "";
            }).trigger("change"), x = 0, start = function(node) {
                for (var ed = tinyMCEPopup.editor, attrs = node.attributes, attribs = {}, i = attrs.length - 1; 0 <= i; i--) {
                    var name = attrs[i].name, value = ed.dom.getAttrib(node, name);
                    "_" !== name.charAt(0) && -1 === name.indexOf("-mce-") && (attribs[name] = value);
                }
                return attribs;
            }(anchorElm), $repeatable = $(".uk-repeatable", "#custom_attributes"), 
            $.each(start, function(key, val) {
                if ("data-mouseover" === key || "data-mouseout" === key || 0 === key.indexOf("on")) return !0;
                if (document.getElementById(key) || "class" == key) return !0;
                try {
                    val = decodeURIComponent(val);
                } catch (e) {}
                0 < x && ($repeatable.eq(0).clone(!0).appendTo($repeatable.parent()), 
                $repeatable = $(".uk-repeatable", "#custom_attributes"));
                var elements = $repeatable.eq(x).find("input, select");
                $(elements).eq(0).val(key), $(elements).eq(1).val(val), x++;
            })) : Wf.setDefaults(this.settings.defaults);
            var start = api.getAnchorText(se, api.isAnchor(anchorElm) ? anchorElm : null) || "";
            currNode && currNode.hasAttribute("data-mce-item") && (params = !1, 
            ed.selection.select(currNode)), function(state, txt) {
                (state ? $("#text").val(txt).attr("disabled", !1) : $("#text").val("").attr("disabled", !0)).trigger("change");
            }(params, start), $.each(this.settings.attributes, function(k, v) {
                0 === parseInt(v, 10) && $("#attributes-" + k).hide();
            }), "html5" == ed.settings.schema && ed.settings.validate && $("#rev").parent().parent().hide(), 
            $("select").datalist().trigger("datalist:update"), $(".uk-datalist").trigger("datalist:update"), 
            $(".uk-repeatable").on("repeatable:delete", function(e, ctrl, elm) {
                $(elm).find("input, select").eq(1).val("");
            }), window.focus();
        },
        getAnchorListHTML: function(id, target) {
            var name, ed = tinyMCEPopup.editor, nodes = ed.dom.select(".mce-item-anchor"), html = "", html = (html += '<select id="' + id + '" class="mceAnchorList" onchange="this.form.' + target + ".value=") + 'this.options[this.selectedIndex].value;">' + '<option value="">---</option>';
            return $.each(nodes, function(i, n) {
                "SPAN" == n.nodeName ? name = ed.dom.getAttrib(n, "data-mce-name") || ed.dom.getAttrib(n, "id") : n.href || (name = ed.dom.getAttrib(n, "name") || ed.dom.getAttrib(n, "id")), 
                name && (html += '<option value="#' + name + '">' + name + "</option>");
            }), html += "</select>";
        },
        checkPrefix: function(n) {
            var self = this, v = $(n).val();
            emailRex.test(v) && !/^\s*mailto:/i.test(v) ? Wf.Modal.confirm(tinyMCEPopup.getLang("link_dlg.is_email", "The URL you entered seems to be an email address, do you want to add the required mailto: prefix?"), function(state) {
                state && $(n).val("mailto:" + v), self.insertAndClose();
            }) : /^\s*www./i.test(v) ? Wf.Modal.confirm(tinyMCEPopup.getLang("link_dlg.is_external", "The URL you entered seems to be an external link, do you want to add the required https:// prefix?"), function(state) {
                state && $(n).val("https://" + v), self.insertAndClose();
            }) : this.insertAndClose();
        },
        insert: function() {
            tinyMCEPopup.restoreSelection();
            var ed = tinyMCEPopup.editor;
            return "" == $("#href").val() ? (Wf.Modal.alert(ed.getLang("link_dlg.no_href", "A URL is required. Please select a link or enter a URL"), {
                close: function() {
                    $("#href").focus();
                }
            }), !1) : ed.selection.isCollapsed() && "" == $("#text").not(":disabled").val() ? (Wf.Modal.alert(ed.getLang("link_dlg.no_text", "Please enter some text for the link"), {
                close: function() {
                    $("#text").focus();
                }
            }), !1) : this.checkPrefix($("#href"));
        },
        insertAndClose: function() {
            tinyMCEPopup.restoreSelection();
            var el, rel, rules, ed = tinyMCEPopup.editor, se = ed.selection, node = se.getNode(), args = {}, api = ed.plugins.link;
            function removeTargetRules(rel) {
                return rel.filter(function(val) {
                    return -1 === $.inArray(val, rules);
                });
            }
            tinymce.each([ "href", "title", "target", "id", "style", "class", "rel", "rev", "charset", "hreflang", "dir", "lang", "tabindex", "accesskey", "type" ], function(k) {
                var v = $("#" + k).val(), v = tinymce.trim(v);
                "href" == k && (v = Wf.String.buildURI(v)), "class" == k && (v = $("#classes").val() || "", 
                v = $.trim(v)), args[k] = v;
            }), $(".uk-repeatable", "#custom_attributes").each(function() {
                var elements = $("input, select", this), key = $(elements).eq(0).val(), elements = $(elements).eq(1).val();
                key && (args[key] = elements);
            }), ed.settings.allow_unsafe_link_target || (args.rel = (rel = args.rel, 
            isUnsafe = "_blank" == args.target && /:\/\//.test(args.href), rules = [ "noopener" ], 
            rel = rel ? rel.split(/\s+/) : [], (rel = (isUnsafe ? function(rel) {
                return (rel = removeTargetRules(rel)).length ? rel.concat(rules) : rules;
            } : removeTargetRules)(rel)).length ? function(rel) {
                return $.trim(rel.sort().join(" "));
            }(rel) : null));
            var isUnsafe, txt = $("#text").val();
            se.isCollapsed() ? (ed.execCommand("mceInsertContent", !1, '<a href="' + args.href + '" id="__mce_tmp">' + txt + "</a>", {
                skip_undo: 1
            }), el = ed.dom.get("__mce_tmp"), ed.dom.setAttribs(el, args)) : (api.isAnchor(node) ? ed.dom.setAttribs(node, {
                href: args.href,
                "data-mce-tmp": "1"
            }) : ed.execCommand("mceInsertLink", !1, {
                href: args.href,
                "data-mce-tmp": "1"
            }, {
                skip_undo: 1
            }), ed.dom.setAttrib(node, "style", ed.dom.getAttrib(node, "data-mce-style")), 
            isUnsafe = ed.dom.select("a[data-mce-tmp]"), args["data-mce-tmp"] = null, 
            tinymce.each(isUnsafe, function(elm, i) {
                ed.dom.setAttribs(elm, args), 0 < i && args.id && ed.dom.setAttrib(elm, "id", ""), 
                txt && api.updateTextContent(elm, txt);
            }), isUnsafe.length && (el = isUnsafe[0])), txt && (ed.selection.select(el), 
            ed.selection.collapse(0)), el = el || node, WFPopups.createPopup(el), 
            ed.undoManager.add(), ed.nodeChanged(), tinyMCEPopup.close();
        },
        setClasses: function(v) {
            Wf.setClasses(v);
        },
        setTargetList: function(v) {
            $("#target").val(v);
        },
        setClassList: function(v) {
            $("#classlist").val(v);
        },
        insertLink: function(args) {
            var url = tinyMCEPopup.editor.documentBaseURI.toRelative(args.url);
            $("#href").val(url), "" != $("#text").data("text") || $("#text").prop("disabled") || $("#text").val(args.text);
        },
        createEmail: function() {
            var ed = tinyMCEPopup.editor, fields = '<div class="uk-form-horizontal">';
            $.each([ "mailto", "cc", "bcc", "subject", "body" ], function(i, name) {
                fields += '<div class="uk-form-row uk-grid uk-grid-collapse">   <label class="uk-form-label uk-width-3-10" for="email_' + name + '">' + ed.getLang("link_dlg." + name, name) + '</label>   <div class="uk-form-controls uk-width-7-10">       <textarea id="email_' + name + '"></textarea>   </div></div>';
            }), fields += "</div>", Wf.Modal.open(ed.getLang("link_dlg.email", "Create E-Mail Address"), {
                width: 300,
                open: function() {
                    var address, v = $("#href").val();
                    v && emailRex.test(v) && (address = (v = v.replace(/\?/, "&").replace(/\&amp;/g, "&").split("&")).shift(), 
                    $("#email_mailto").val(address.replace(/^mailto\:/, "")), $.each(v, function(i, s) {
                        s = s.split("=");
                        if (2 === s.length) {
                            var val = s[1];
                            try {
                                val = decodeURIComponent(val);
                            } catch (e) {}
                            $("#email_" + s[0]).val(val);
                        }
                    }));
                },
                buttons: [ {
                    text: ed.getLang("link_dlg.create_email", "Create Email"),
                    click: function() {
                        var args = [], errors = 0;
                        $.each([ "mailto", "cc", "bcc", "subject", "body" ], function(i, key) {
                            var val = $("#email_" + key).val();
                            val && (val = val.replace(/\n\r/g, ""), $.each(val.split(","), function(i, str) {
                                var msg;
                                /^(mailto|cc|bcc)$/.test(key) && !/@/.test(str) && (msg = ed.getLang("link_dlg.invalid_email", "%s is not a valid e-mail address!"), 
                                Wf.Modal.alert(msg.replace(/%s/, ed.dom.encode(str))), 
                                errors++);
                            }), /^(subject|body)$/.test(key) && (val = encodeURIComponent(val)), 
                            args.push("mailto" == key ? val : key + "=" + val));
                        }), 0 === errors && (args.length && $("#href").val("mailto:" + args.join("&").replace(/&/, "?")), 
                        $(this).trigger("modal.close"));
                    },
                    attributes: {
                        class: "uk-button-primary"
                    },
                    icon: "uk-icon-check"
                }, {
                    text: ed.getLang("dlg.cancel", "Cancel"),
                    icon: "uk-icon-close",
                    attributes: {
                        class: "uk-modal-close"
                    }
                } ]
            }, fields);
        },
        openHelp: function() {
            Wf.help("link");
        },
        _search: function() {
            var self = this, $p = $("#search-result").parent(), query = $("#search-input").val();
            query && !$("#search-input").hasClass("placeholder") && ($("#search-clear").removeClass("uk-active"), 
            $("#search-browser").addClass("loading"), query = $.trim(query.replace(/[\///<>#]/g, "")), 
            Wf.JSON.request("doSearch", {
                json: [ query ]
            }, function(results) {
                results && !results.error ? ($("#search-result").empty(), results.length && ($.each(results, function(i, values) {
                    $.each(values, function(name, items) {
                        $('<h3 class="uk-margin-top uk-margin-left uk-text-bold">' + name + "</h3>").appendTo("#search-result"), 
                        $.each(items, function(i, item) {
                            var $dl = $('<dl class="uk-margin-small"></dl>').appendTo("#search-result");
                            $('<dt class="link uk-margin-small"></dt>').text(item.title).on("click", function() {
                                var url = item.link, text = item.title, url = Wf.String.decode(url), text = $.trim(text.split("/")[0]);
                                self.insertLink({
                                    url: url,
                                    text: text
                                });
                            }).prepend('<i class="uk-icon uk-icon-file-text uk-margin-small-right"></i>').appendTo($dl), 
                            $('<dd class="text">' + item.text + "</dd>").appendTo($dl), 
                            item.anchors && $.each(item.anchors, function(i, a) {
                                $('<dd class="anchor"><i role="presentation" class="uk-icon uk-icon-anchor uk-margin-small-right"></i>#' + a + "</dd>").on("click", function() {
                                    var url = Wf.String.decode(item.link) + "#" + a;
                                    self.insertLink({
                                        url: url,
                                        text: a
                                    });
                                }).appendTo($dl);
                            });
                        });
                    });
                }), $("dl:odd", "#search-result").addClass("odd")), $("#search-options-button").trigger("close"), 
                $("#search-result").height($p.parent().height() - $p.outerHeight() - 5).show()) : (results = results ? results.error : "The server return an invalid response", 
                Wf.Modal.alert(results)), $("#search-browser").removeClass("loading"), 
                $("#search-clear").addClass("uk-active");
            }, self));
        }
    };
    window.LinkDialog = LinkDialog, tinyMCEPopup.onInit.add(LinkDialog.init, LinkDialog);
}(jQuery, tinyMCEPopup);tinymce/plugins/link/css/link.css000060400000002416152456167170013106 0ustar00#href{padding-right:2px!important;width:calc(100% - 60px);overflow:hidden;text-overflow:ellipsis}#link_tab{height:100%}#link_tab fieldset{margin:10px 0;padding:2px}#link-options{padding:5px;margin:5px 0;height:calc(100% - 200px);box-sizing:border-box}#link-browser{overflow:auto;padding:0 5px;box-sizing:border-box;height:calc(100% - 42px);margin-top:5px}#text::-moz-placeholder{color:transparent!important}#text::-webkit-input-placeholder{color:transparent!important}#text:-ms-input-placeholder{color:transparent!important}#text[disabled]::-webkit-input-placeholder{color:inherit!important}#text[disabled]::-moz-placeholder{color:inherit!important}.anchor .uk-icon-file-text:before{content:"\eca0"}.uk-tree{display:flex;flex-wrap:wrap}.uk-tree li{flex:1 0 auto;width:100%}.uk-tree-node li{position:relative}.file .uk-tree-row>a{padding:0 0 0 32px}.uk-tree-node li.anchor{padding:0 0 0 64px}.uk-tree-node li button.link-preview{visibility:hidden;pointer-events:none;position:absolute;right:0;top:0}.uk-tree-node li.file:focus button.link-preview,.uk-tree-node li.file:hover button.link-preview{visibility:visible;pointer-events:inherit}.uk-tree a{width:calc(100% - 64px)}.uk-tree-row .uk-tree-text{width:calc(100% - 38px)}.uk-button-link:hover{text-decoration:none}.uk-icon{pointer-events:none}tinymce/plugins/fontselect/plugin.js000060400000004401152456167170013710 0ustar00/* jce - 2.9.99.2 | 2026-04-22 | https://www.joomlacontenteditor.net | Source: https://github.com/widgetfactory/jce | Copyright (C) 2006 - 2026 Ryan Demmer. All rights reserved | GNU/GPL Version 2 or later - http://www.gnu.org/licenses/gpl-2.0.html */
!function() {
    var each = tinymce.each;
    tinymce.PluginManager.add("fontselect", function(ed, url) {
        ed.onNodeChange.add(function(ed, cm, n, collapsed, o) {
            var fv, c = cm.get("fontselect");
            c && n && each(o.parents, function(n) {
                if (n.style && (fv = (fv = n.style.fontFamily || ed.dom.getStyle(n, "fontFamily")).replace(/[\"\']+/g, "").replace(/^([^,]+).*/, "$1").toLowerCase(), 
                c.select(function(v) {
                    return v.replace(/^([^,]+).*/, "$1").toLowerCase() === fv;
                }), fv)) return !1;
            });
        }), this.createControl = function(n, cf) {
            if ("fontselect" === n) return ctrl = ed.controlManager.createListBox("fontselect", {
                title: "advanced.fontdefault",
                max_height: 384,
                onselect: function(v) {
                    var cur = ctrl.items[ctrl.selectedIndex];
                    !v && cur ? ed.execCommand("FontName", !1, cur.value) : (ed.execCommand("FontName", !1, v), 
                    ctrl.select(function(sv) {
                        return v == sv;
                    }), cur && cur.value == v && ctrl.select(null));
                }
            }), each(ed.getParam("fontselect_fonts", "Andale Mono=andale mono,times;Arial=arial,helvetica,sans-serif;Arial Black=arial black,avant garde;Book Antiqua=book antiqua,palatino;Comic Sans MS=comic sans ms,sans-serif;Courier New=courier new,courier;Georgia=georgia,palatino;Helvetica=helvetica;Impact=impact,chicago;Symbol=symbol;Tahoma=tahoma,arial,helvetica,sans-serif;Terminal=terminal,monaco;Times New Roman=times new roman,times;Trebuchet MS=trebuchet ms,geneva;Verdana=verdana,geneva;Webdings=webdings;Wingdings=wingdings,zapf dingbats", "hash"), function(v, k) {
                /\d/.test(v) && (v = "'" + v + "'"), ctrl.add(ed.translate(k), v, {
                    style: -1 == v.indexOf("dings") ? "font-family:" + v : ""
                });
            }), ctrl;
            var ctrl;
        };
    });
}();tinymce/plugins/textcase/plugin.js000060400000005043152456167170013365 0ustar00/* jce - 2.9.99.2 | 2026-04-22 | https://www.joomlacontenteditor.net | Source: https://github.com/widgetfactory/jce | Copyright (C) 2006 - 2026 Ryan Demmer. All rights reserved | GNU/GPL Version 2 or later - http://www.gnu.org/licenses/gpl-2.0.html */
tinymce.PluginManager.add("textcase", function(ed, url) {
    ed.addCommand("mceUpperCase", function() {
        var s, text;
        s = ed.selection, text = s.getContent(), s.setContent(text.toUpperCase());
    }), ed.addCommand("mceLowerCase", function() {
        var s, text;
        s = ed.selection, text = s.getContent(), s.setContent(text.toLowerCase());
    }), ed.addCommand("mceTitleCase", function() {
        var s, text;
        s = ed.selection, text = (text = (text = s.getContent()).toLowerCase()).replace(/(?:^|\s)[\u0000-\u1FFF]/g, function(match) {
            return match.toUpperCase();
        }), s.setContent(text);
    }), ed.addCommand("mceSentenceCase", function() {
        var s, text;
        s = ed.selection, text = (text = s.getContent()).toLowerCase().replace(/([\u0000-\u1FFF])/, function(a, b) {
            return b.toUpperCase();
        }).replace(/(\.\s?)([\u0000-\u1FFF])/gi, function(a, b, c) {
            return b + c.toUpperCase();
        }), s.setContent(text);
    }), ed.onNodeChange.add(function(ed, cm, n, co) {
        cm.setDisabled("textcase", co);
    }), this.createControl = function(n, cm) {
        return "textcase" !== n ? null : ((n = cm.createSplitButton("textcase", {
            title: "textcase.uppercase",
            icon: "uppercase",
            onclick: function() {
                ed.execCommand("mceUpperCase");
            }
        })).onRenderMenu.add(function(c, m) {
            m.add({
                title: "textcase.uppercase",
                icon: "uppercase",
                onclick: function() {
                    ed.execCommand("mceUpperCase");
                }
            }), m.add({
                title: "textcase.lowercase",
                icon: "lowercase",
                onclick: function() {
                    ed.execCommand("mceLowerCase");
                }
            }), m.add({
                title: "textcase.sentencecase",
                icon: "sentencecase",
                onclick: function() {
                    ed.execCommand("mceSentenceCase");
                }
            }), m.add({
                title: "textcase.titlecase",
                icon: "titlecase",
                onclick: function() {
                    ed.execCommand("mceTitleCase");
                }
            });
        }), n);
    };
});tinymce/plugins/textcase/img/uppercase.png000060400000000773152456167170015007 0ustar00�PNG


IHDR��
sBIT|d�	pHYs��~�tEXtSoftwareAdobe FireworksO�NyIDAT8���1hTA���\ΐ���`q"1��BbaZA8,R�Z	"iM#�֢Ebmm%j)��F&b,5�X�=�\�&�.���3�̴������X�tC����.�~j��U|�E,�ޔ����>�]�.��X�S`��o�.��x�ؖ��,~C8X|
|SU��03dfo3�qf�����Uo���������#'���4v��'@D���q("n�sG�߯���c����9�{�ٜ~xf��U8���;���%��e�ױ�'E��Q���g�l����_>������징gp-�.��h6L���P5�%�E�S=��.m���0":�Z��b��s�X���\�f�v׿?Ӑ�К��IEND�B`�tinymce/plugins/textcase/img/sentencecase.png000060400000000572152456167170015455 0ustar00�PNG


IHDR��
sBIT|d�	pHYs��~�tEXtSoftwareAdobe FireworksO�N�IDAT8���1JA��o�Ƥ�A+o`�"�E�� X�!7�R<��
,-D�@,�
���%��f��0�{og~��)%M�jԶ6�ʏ�Us��|^�]`�������3W(�e����툫���7�CO!���p�x�p_X�+6��Y5��C��t�p�\�,�)�K�e�ua�M�$���c�2��~7�_RJY��F1oıF��e%��(;RJ��YQ�h�cr�5RJo��U����	�u�E+��&�IEND�B`�tinymce/plugins/textcase/img/lowercase.png000060400000000766152456167170015006 0ustar00�PNG


IHDR��
sBIT|d�	pHYs��~�tEXtSoftwareAdobe FireworksO�NtIDAT8��Կk�A��ץiq�	���]��
u���QZ��tPpt��M\��A��A�䤢t�`��4t*�Zr�|%�`5����}�9xs���R�� U(�VK�J��(����v�����u��
x0����x�������Pd}���lG�'{�	��ʟ���vxWp*�62��U\§���s�e<�Z�p2�k��R�I)�M)�*�����\�9����ֺ�Kw�Q��\�uc��3���Fz7Xj�ќr��K����mrt|��B��yr�@���
b�30`p�sn�D�oj��p#q<ǰ�ҏ�s���0|�����3����E,��r�`�nPJ�X	��]u������&�A����x�jX�IEND�B`�tinymce/plugins/preview/plugin.js000060400000010651152456167170013227 0ustar00/* jce - 2.9.99.2 | 2026-04-22 | https://www.joomlacontenteditor.net | Source: https://github.com/widgetfactory/jce | Copyright (C) 2006 - 2026 Ryan Demmer. All rights reserved | GNU/GPL Version 2 or later - http://www.gnu.org/licenses/gpl-2.0.html */
!function() {
    var DOM = tinymce.DOM, counter = 0;
    tinymce.PluginManager.add("preview", function(ed, url) {
        var self = this;
        function isEditorActive() {
            return 0 == DOM.hasClass(ed.getElement(), "wf-no-editor");
        }
        ed.onInit.add(function(ed) {
            0 != isEditorActive() && "wf-editor-preview" === (ed.settings.active_tab || "") && (ed.hide(), 
            DOM.hide(ed.getElement()), self.toggle());
        }), this.hide = function() {
            DOM.hide(ed.id + "_editor_preview");
        }, this.isHidden = function() {
            return DOM.isHidden(ed.id + "_editor_preview");
        }, this.toggle = function() {
            var k, s = ed.settings, element = ed.getElement(), container = element.parentNode, element = DOM.getPrev(element, ".wf-editor-header"), ifrHeight = parseInt(DOM.get(ed.id + "_ifr").style.height, 10) || s.height, preview = DOM.get(ed.id + "_editor_preview"), iframe = DOM.get(ed.id + "_editor_preview_iframe"), o = tinymce.util.Storage.getHash("TinyMCE_" + ed.id + "_size"), o = (o && o.height && (ifrHeight = o.height), 
            preview || (preview = DOM.add(container, "div", {
                role: "textbox",
                id: ed.id + "_editor_preview",
                class: "wf-editor-preview"
            }), iframe = DOM.add(preview, "iframe", {
                frameborder: 0,
                src: 'javascript:""',
                id: ed.id + "_editor_preview_iframe"
            })), ed.settings.container_height || sessionStorage.getItem("wf-editor-container-height") || ifrHeight), ifrHeight = (DOM.hasClass(container, "mce-fullscreen") && (o = DOM.getViewPort().h - element.offsetHeight), 
            DOM.setStyle(preview, "height", o), DOM.setStyle(preview, "max-width", "100%"), 
            ed.settings.container_width || sessionStorage.getItem("wf-editor-container-width")), query = (ifrHeight && !DOM.hasClass(container, "mce-fullscreen") && DOM.setStyle(preview, "max-width", ifrHeight), 
            DOM.show(preview), ""), args = {}, content = ed.getContent();
            for (k in tinymce.extend(args, {
                data: content,
                id: function() {
                    for (var guid = new Date().getTime().toString(32), i = 0; i < 5; i++) guid += Math.floor(65535 * Math.random()).toString(32);
                    return "wf_" + guid + (counter++).toString(32);
                }()
            }), args) query += "&" + k + "=" + encodeURIComponent(args[k]);
            function update(text) {
                var doc = iframe.contentWindow.document, css = [], html = "<!DOCTYPE html>", html = (html = (html += '<head xmlns="http://www.w3.org/1999/xhtml">') + ('<base href="' + s.document_base_url + '" />')) + '<meta http-equiv="X-UA-Compatible" content="IE=7" />' + '<meta http-equiv="Content-Type" content="text/html; charset=UTF-8" />', css = s.compress.css ? [ s.site_url + "index.php?option=com_jce&task=editor.pack&type=css&slot=preview&" + s.query ] : ed.contentCSS;
                tinymce.each(css, function(url) {
                    html += '<link href="' + url + '" rel="stylesheet" type="text/css" />';
                }), html = (html += '</head><body style="margin:5px;">') + text + "</body></html>", 
                doc.open(), doc.write(html), doc.close(), DOM.removeClass(container, "mce-loading");
            }
            tinymce.util.XHR.send({
                url: s.site_url + "index.php?option=com_jce&task=plugin.display&plugin=preview&" + tinymce.query,
                data: "json=" + JSON.stringify({
                    method: "showPreview"
                }) + "&" + query,
                content_type: "application/x-www-form-urlencoded",
                success: function(x) {
                    var o = {};
                    try {
                        o = JSON.parse(x);
                    } catch (e) {
                        o.error = /[{}]/.test(o) ? "The server returned an invalid JSON response" : x;
                    }
                    var r = o.result;
                    update(r = x && !o.error ? r : content);
                },
                error: function(e, x) {
                    update(content);
                }
            });
        };
    });
}();tinymce/plugins/preview/css/preview.css000060400000000021152456167170014344 0ustar00html{height:100%}tinymce/plugins/anchor/plugin.js000060400000015427152456167170013026 0ustar00/* jce - 2.9.99.2 | 2026-04-22 | https://www.joomlacontenteditor.net | Source: https://github.com/widgetfactory/jce | Copyright (C) 2006 - 2026 Ryan Demmer. All rights reserved | GNU/GPL Version 2 or later - http://www.gnu.org/licenses/gpl-2.0.html */
!function() {
    var DOM = tinymce.DOM, each = tinymce.each, VK = tinymce.VK;
    tinymce.PluginManager.add("anchor", function(ed, url) {
        var self = this;
        function isAnchor(n) {
            return ed.dom.getParent(n, "a.mce-item-anchor");
        }
        function removeAnchor(e) {
            var s = ed.selection, n = s.getNode();
            !s.isCollapsed() && ed.dom.getParent(n, "a.mce-item-anchor") && (ed.undoManager.add(), 
            ed.formatter.remove("link"), e) && e.preventDefault();
        }
        function insertAnchor(v) {
            var attrib;
            if (!v) return ed.windowManager.alert("anchor.invalid"), !1;
            if (!/^[a-z][a-z0-9\-\_:\.]*$/i.test(v)) return ed.windowManager.alert("anchor.invalid"), 
            !1;
            attrib = "name", "html4" !== ed.settings.schema && (attrib = "id");
            var n = ed.selection.getNode(), at = {
                class: "mce-item-anchor"
            };
            if (n = ed.dom.getParent(n, "A")) at[attrib] = v, ed.dom.setAttribs(n, at); else {
                if (ed.dom.select("a[" + attrib + '="' + v + '"], img[data-mce-name="' + v + '"], img[id="' + v + '"]', ed.getBody()).length) return ed.windowManager.alert("anchor.exists"), 
                !1;
                ed.selection.isCollapsed() ? (at[attrib] = v, ed.execCommand("mceInsertContent", 0, ed.dom.createHTML("a", {
                    id: "__mce_tmp"
                }, "\ufeff"), {
                    skip_undo: 1
                }), n = ed.dom.get("__mce_tmp"), at.id = at.id || null, ed.dom.setAttribs(n, at), 
                ed.selection.select(n)) : (at[attrib] = v, ed.execCommand("mceInsertLink", !1, "#mce_temp_url#", {
                    skip_undo: 1
                }), at.href = at["data-mce-href"] = null, each(ed.dom.select('a[href="#mce_temp_url#"]'), function(link) {
                    ed.dom.setAttribs(link, at);
                }));
            }
            return ed.execCommand("mceEndUndoLevel"), ed.nodeChanged(), !0;
        }
        ed.settings.allow_html_in_named_anchor = !0, ed.addCommand("mceInsertAnchor", function(ui, value) {
            return insertAnchor(value);
        }), ed.onBeforeExecCommand.add(function(ed, cmd, ui, v, o) {
            var n = ed.selection.getNode();
            if ("unlink" === cmd) {
                if (isAnchor(n)) {
                    var id = n.id || n.name || "";
                    if (!id) return;
                    each(ed.dom.select("a[href]", ed.getBody()), function(node) {
                        ed.dom.getAttrib(node, "href") === "#" + id && ed.dom.remove(node, 1);
                    });
                }
                var href = ed.dom.getAttrib(n, "href");
                href && "#" === href.charAt(0) && each(ed.dom.select("a[id],a[name]", ed.getBody()), function(node) {
                    var id = node.id || node.name;
                    id && href === "#" + id && ed.dom.remove(node, 1);
                });
            }
        }), ed.onNodeChange.add(function(ed, cm, n, co) {
            var s = isAnchor(n);
            ed.dom.removeClass(ed.dom.select(".mce-item-anchor.mce-item-selected"), "mce-item-selected"), 
            cm.setActive("anchor", s), s && ed.dom.addClass(n, "mce-item-selected");
        }), ed.onKeyDown.add(function(ed, e) {
            e.keyCode !== VK.BACKSPACE && e.keyCode !== VK.DELETE || removeAnchor(e);
        }), ed.onInit.add(function() {
            ed.theme && ed.theme.onResolveName && ed.theme.onResolveName.add(function(theme, o) {
                var v, n = o.node, href = n.href;
                (v = "a" !== o.name || href && "#" != href.charAt(0) || !n.name && !n.id ? v : n.name || n.id) && (o.name = "a#" + v);
            });
        }), ed.onPreInit.add(function() {
            ed.parser.addNodeFilter("a", function(nodes) {
                for (var i = 0, len = nodes.length; i < len; i++) {
                    var node = nodes[i], cls = node.attr("class") || "";
                    !function(node) {
                        var href = node.attr("href");
                        return (node.attr("name") || node.attr("id")) && (!href || "#" === href.charAt(0) && 1 < href.length);
                    }(node) || cls && !1 !== /mce-item-anchor/.test(cls) || (cls += " mce-item-anchor", 
                    node.attr("class", tinymce.trim(cls)));
                }
            });
        }), ed.onBeforeSetContent.add(function(ed, o) {
            o.content = o.content.replace(/<a id="([^"]+)"><\/a>/gi, '<a id="$1">\ufeff</a>');
        }), ed.addButton("anchor", {
            title: "anchor.desc",
            onclick: function() {
                var html = '<div class="mceModalRow">   <label for="' + ed.id + '_anchor_input">' + ed.getLang("anchor.name", "Name") + '</label>   <div class="mceModalControl">       <input type="text" id="' + ed.id + '_anchor_input" autofocus />   </div></div>';
                ed.windowManager.open({
                    title: ed.getLang("anchor.desc", "Anchor"),
                    content: html,
                    size: "mce-modal-landscape-small",
                    open: function() {
                        var input = DOM.get(ed.id + "_anchor_input"), label = (input.value = "", 
                        ed.getLang("insert", "Insert")), n = (n = ed.selection.getNode(), 
                        n = ed.dom.getParent(n, "a.mce-item-anchor"), ed.dom.getAttrib(n, "name") || ed.dom.getAttrib(n, "id"));
                        n && (input.value = n, label = ed.getLang("update", "Update")), 
                        DOM.setHTML(this.id + "_insert", label), window.setTimeout(function() {
                            input.focus();
                        }, 10);
                    },
                    buttons: [ {
                        title: ed.getLang("anchor.remove", "Remove"),
                        id: "remove",
                        onsubmit: function(e) {
                            e.target.disabled || removeAnchor();
                        },
                        scope: self
                    }, {
                        title: ed.getLang("insert", "Insert"),
                        id: "insert",
                        onsubmit: function(e) {
                            var value = DOM.getValue(ed.id + "_anchor_input");
                            (value = value.replace(/[^\w\:\.-]/g, "")) || (e.cancelSubmit = !0), 
                            insertAnchor(value);
                        },
                        classes: "primary",
                        scope: self
                    } ]
                });
            }
        });
    });
}();tinymce/plugins/emotions/img/smiley-mad.gif000060400000000454152456167170015053 0ustar00GIF89a���������������n�ӱ��L��f��>��H�]��;�W�I�C�;ڭZܭC�4��f̙3��WŽ%f�̽�;��E��s3f����!�,��'�di�E�4OR�b�8�`s`�A�6��#9��D:H��1�0,��y�	�="�M� �gEb2� ���
n
�
���
|"�f��#���$���%`	��&`�0��0���#!;tinymce/plugins/emotions/img/smiley-money-mouth.gif000060400000000501152456167170016564 0ustar00GIF89a�)�����¨"¬Q��nX6��R��j��1���>^*��
��n��9��$J3�s� ��V���Mw9ZF>2B�噚�6Ѿ&�ӿrx$�~���!�,��'�Ti�cJn��0�Q*I0��4����1���n�~(
�D>t�s�h8",n0f��!�$lw2*��ۑW�]Hm��%�x����%��D%o���pu���%
Q��Y
4
��#�����B
���*���N!;tinymce/plugins/emotions/img/smiley-cool.gif000060400000000457152456167170015251 0ustar00GIF89a����������i�ӱ��h��f��R��I�]��@�f�<�Oװf�;ԤCբ5��f��;�����E��"�v)LLLSJ3:<?:20(
���!�,��'�di���4�1�b� `s`�!�6���#)�˅!`(�
�A@8z��Ap�DL���t��Ι1�8�͆�d2�!2� 0�
�m
�,��|"
,	���#�	33	�$	JJ[	%
��E$�
�&�0���#!;tinymce/plugins/emotions/img/smiley-embarassed.gif000060400000000452152456167170016416 0ustar00GIF89a������������}��s�ӱ��f��i��K��[��A��S�W�I�C��;ׯf߬OܭD��4�5Ԡ5̙3—Wf���(��"��C3f����!�,��'�di�DEPB���4E`�#��c���ؑ�B�"H.Ʉ�D�Q0��B|��
��@8<�B:�,�F
�"�etiT*x�p
m����{"����#�
�
�$
��%n��zF$�&�ɩ0���#!;tinymce/plugins/emotions/img/smiley-undecided.gif000060400000000521152456167170016231 0ustar00GIF89a�*��Ɗy��ʶj��%��N����YֺdN��2��
��-��G��q����غB/ê��9ļ�������YVC��7vb��ο$!�,��'�Qi�cJJF� �!E*I4LA	���AId��#��8���A&���@�HU�D�������h��[�0��N��T�}	`r

������y	��
����tw�
�%��“�[�	��	AKGP)�DN�5�����!;tinymce/plugins/emotions/img/smiley-laughing.gif000060400000000454152456167170016110 0ustar00GIF89a������������������~��a�ֽ��h��V�ͽ��I�����]�I�E���ҹ�۰\ۦ=ԤCբ5��f��W��%��E��!���r���!�,��'�di��E�B���@�`�3�Ck�6Վ�PRyP<H�y<:V�R��bQ��Α�n�/����p4xM����,
��
#��#		�		$		�%yC$E�&0���$!;tinymce/plugins/emotions/img/smiley-wink.gif000060400000000450152456167170015256 0ustar00GIF89a���������������}����h�ӱ��L��f��c��N��A�C�[�I��8�<ڭZܭCڥ5��f̙3��Wf�̽�;��#��E3f����!�,��'�di��LS�b5�`
�A��ّ ���$��D (S!�DH��i,*�C!uc�ڲ|8��E��
#
��
y"���#	��
�	$
K\

%���&�0	�0���#!;tinymce/plugins/emotions/img/smiley-yell.gif000060400000000460152456167170015254 0ustar00GIF89a���������������i��s�ҿ��^��I��G�]��?�EݴO٧AǦeբ5œ-��W��;��"��C���u�f�CC�R�**�(���!�,��'�di�E�4KR�b�,�`��r5��ؑ���<H��0$ �cI/#�XX,]�y�HHE]�|NoCF�D#���-|
	#

��
w"{�
#
��
$%X\�F$c0�ִ����!;tinymce/plugins/emotions/img/smiley-tongue_out.gif000060400000000454152456167170016502 0ustar00GIF89a��������������h�ӱ��L��f��f��N��A�[�I�=ڭZۦ=��f̙3��Wf�̽�;��"�yF��C�w�ZZ�^+�??3f����!�,��'�di���
q�A�!K��c����ؑ���(����s8��Qu�
��Y$����"�Py ��a��"���~o������#�����$�g�%f

		&�m�/��/���#!;tinymce/plugins/emotions/img/smiley-evil.gif000060400000000464152456167170015252 0ustar00GIF89a����������n�н����f��N��>�]��?�C�:�;ڭZ�4٭C��f̙3��Wf���'��C�}�cS�ff�R13f��@@�33���!�,��'�dYj�'L��Wh��m�0:�u�Z��+�� i� L�ǧbC0��E1QX"#&R�����b9$��c_8#w�

�	t	��	Y#�ll�#���)#���%f��&f
�&"������&!;tinymce/plugins/emotions/img/smiley-neutral.gif000060400000000455152456167170015765 0ustar00GIF89a����������������ӱ��h��^��L��f��[��N��A��k��H��?�Y�=�OڭZأCբ5��f��Wf�̽�;��E��"3f����!�,��'�di�F2��q���B]4R`25�Aё$I��<�H	��kPz"�At�	�i$D�x�,	���(&�đ��.
���
o
���
~"����#����$K�%��&�/�/���#!;tinymce/plugins/emotions/img/smiley-surprised.gif000060400000000461152456167170016330 0ustar00GIF89a���������������s�ӱ��h��L��f��[��N�ƕ��A��@�[��8�GڭZۦ=��f̙3��Wf�̽�;��E��"���w
3f����!�,��'�di��"E�R��1�`4��d5�� ّ �f� (�H� AH�d[��DEB�0@�PHE����%�Á��(	���	~p����+K,#����$

%F$��&��0���#!;tinymce/plugins/emotions/img/smiley-frown.gif000060400000000524152456167170015443 0ustar00GIF89a�A'��Ơ�����2ʶj��N�����Xν"��7hT��
��-��q��ZA
����غ��Gīļ�����7��Z��"������%x`��0!�,��'�Qi�cJJ�&�!E*Y0�8���ԡAA`&
���4��!�x<��đ0�"FU��$�Jc&%`..�cރ1�w~�bp
��������z
�r����r
x�%�	��]�
̘��
AKGP)�DN�5�����!;tinymce/plugins/emotions/img/smiley-tongue-out.gif000060400000000510152456167170016411 0ustar00GIF89a�&
��Ɨ}���ʶj��#��N���Ҿ��XR=
���
��2��.�::nX��F��q����غ��Z�/'ļ���7�����1��"�RT!�,��'�Ti�cJV��4�QQ*Y4�2M
���aQ($H���@�(��D��h4U�$q�Q*��&���5���P\e
��ptE�9��*-aWW��

������xn���	�	�vE��
%�	
�
\����A-1N)��5�����!;tinymce/plugins/emotions/img/smiley-roll.gif000060400000000453152456167170015261 0ustar00GIF89a�����������������}�ӱ��V��^��f��k�˝��N�]��@�f��8�L�O�>֭Zۦ=��f̙3��W��;��E��"3f����!�,��'�di�Ic�b�8�`������1ّ�G�)D���0QT.Ɓq�L��(��G��("��"#�Wt{9��4
~�	q+��",���#����$�K�%��&��0�0���#!;tinymce/plugins/emotions/img/smiley-eek.gif000060400000000454152456167170015056 0ustar00GIF89a�����������������������؄�Ը��f��Q�]�Cҹo�I׷b߬O��|ۦ=��������_Π>��q��W��"��C3f����!�,��'�di���Kq�A�B}0M`�$5A�q�F�0x��r�D��!��f�х��Ÿ|��2�1aL���{�0(&�}z"+��#�+��#
+��+
$��%��:�

�'
��/���#!;tinymce/plugins/emotions/img/smiley-kiss.gif000060400000000522152456167170015257 0ustar00GIF89a�R=����44�s��Yʶj���
��2���!��N�*����)��"��m��q������غ��>�9)ښļ���9��ֽ�)����Y!�,��'�Ti�cJV�s�RQ*Y!Ir�T�3!x�C�p#ʂ!X�׫���Q*��y$���0�.9@��8�n�H��5q}M		a}
�����
����{�
/
��H

�

J	�%	S�
\���A	HJP)�DN�5�����!;tinymce/plugins/emotions/img/smiley-sad.gif000060400000000445152456167170015061 0ustar00GIF89a������������}��s�ӱ��L��^��f��i��N��A��]�C�W��8�I�Dװf߬O۩Bբ5̙3��Wf�̽�;��"��C3f����!�,��'�di���D�B���0E`�#��d�� ّ ���BP.��D�Y0���B|� 	��a$����,��X�~hԍ�etA4���
#��{"��
�#���$
�
��%�
��F$��&��0���#!;tinymce/plugins/emotions/img/smiley-confused.gif000060400000000453152456167170016117 0ustar00GIF89a������������}��s�ӱ��L��^��f��i��N��A�X��?�W�K�=װf߬OܭCۥ5��f̙3��Wf�̽�;��E��"3f����!�,��'�di��"�q���A]0�`
�1��!�#A�f2�`��Ы`*Pke�A���H8<�"!U
	@#AH4I#QY
���
#���}"���#��$�
�%
��E$��&�/���#!;tinymce/plugins/emotions/img/smiley-foot-in-mouth.gif000060400000000530152456167170017012 0ustar00GIF89a�&
��Ɩ~��ʶj�� ��
���MR:	��Zѽ��1mT��+��H����غ��oļ���O��'ª����6��0:"��
��6����7!�,��'�Pi�cJFH�mA*I%ITf��aQ *N��8#b!�88���"Y h��A��d2�3�!1̤�H��s�{�(s	v�s
cst


�
�������}
�
	��
�
{E��	M%�Ƃ^�ƚ
A�P)�DN�5�����};tinymce/plugins/emotions/img/smiley-smile.gif000060400000000446152456167170015424 0ustar00GIF89a�������������s�Ӻ��V��f��C��W��@�f�=�J�T�JڭZܭCԤCբ5��f̙3��Wf�̽�1��E��"���w3f����!�,��'�di�Ҭq���A=Ȃ)8�@׵�#GR�
c�H>

��xX�V�K�8���^�HrH�1
7�8HF��b��/#
~{�
#II�#
�+$���%����D$

�&��/���#!;tinymce/plugins/emotions/img/smiley-cry.gif000060400000000454152456167170015107 0ustar00GIF89a�������������x����ӱ��L��^��i��O��F�X�I�fɺ��E�7�PװfܭCި7ףG��f̙3��W��;��E��"���!�,��'�di���L�R���0�`�3��c5���ؑ�BC!P4Ʌ�T�Y4���B|� �ăAV��	ddQ4&�C�4��%1
@	#}v
�o�#���#q�$����%���F$�&�0���#!;tinymce/plugins/emotions/img/smiley-innocent.gif000060400000000520152456167170016121 0ustar00GIF89a�8*�˭���q˱���Z��U��쳏����� ��8wi٫��T���̵ �����q��N��*aK
�z����0��-��VھB��2�u"!�,��'�Ri��x��eH�dbK,R=�ɣ����!�Q<6�Ph�'0�*����d��i;�pg��P:���t|NR
��RUR}			
�
�m�	_���Q���	�w����
�	���%����Q�S*
�P
8)�<MV�)#����#!;tinymce/plugins/emotions/img/smiley-sealed.gif000060400000000505152456167170015544 0ustar00GIF89a�R=�������	����ھ����R��I�����ͷ�����Jʶj��5�� ��(��\���lU
�����N���û?��:��o��"�ֶ����/!�,��'�Si�cJ�6RL*�ޡi�g8��"ґ` �#�D�	b��D�l�Y h�A�yx<�3Vc�I���3��Wa�gw�Yx
|ds	���/����}'��p���
W
N���%��`����A

[
P)DN�5���)!;tinymce/plugins/emotions/plugin.js000060400000020327152456167170013404 0ustar00/* jce - 2.9.99.2 | 2026-04-22 | https://www.joomlacontenteditor.net | Source: https://github.com/widgetfactory/jce | Copyright (C) 2006 - 2026 Ryan Demmer. All rights reserved | GNU/GPL Version 2 or later - http://www.gnu.org/licenses/gpl-2.0.html */
!function() {
    var DOM = tinymce.DOM, each = tinymce.each, emoji = [ {
        "\ud83d\ude00": "grinning_face"
    }, {
        "\ud83d\ude01": "grinning_face_with_smiling_eyes"
    }, {
        "\ud83d\ude02": "face_with_tears_of_joy"
    }, {
        "\ud83d\ude03": "smiling_face_with_open_mouth"
    }, {
        "\ud83d\ude04": "smiling_face_with_open_mouth_and_smiling_eyes"
    }, {
        "\ud83d\ude05": "smiling_face_with_open_mouth_and_cold_sweat"
    }, {
        "\ud83d\ude06": "smiling_face_with_open_mouth_and_tightly_closed_eyes"
    }, {
        "\ud83d\ude07": "smiling_face_with_halo"
    }, {
        "\ud83d\ude08": "smiling_face_with_horns"
    }, {
        "\ud83d\ude09": "winking_face"
    }, {
        "\ud83d\ude0a": "smiling_face_with_smiling_eyes"
    }, {
        "\ud83d\ude0b": "face_savouring_delicious_food"
    }, {
        "\ud83d\ude0c": "relieved_face"
    }, {
        "\ud83d\ude0d": "smiling_face_with_heart_shaped_eyes"
    }, {
        "\ud83d\ude0e": "smiling_face_with_sunglasses"
    }, {
        "\ud83d\ude0f": "smirking_face"
    }, {
        "\ud83d\ude10": "neutral_face"
    }, {
        "\ud83d\ude11": "expressionless_face"
    }, {
        "\ud83d\ude12": "unamused_face"
    }, {
        "\ud83d\ude13": "face_with_cold_sweat"
    }, {
        "\ud83d\ude14": "pensive_face"
    }, {
        "\ud83d\ude15": "confused_face"
    }, {
        "\ud83d\ude16": "confounded_face"
    }, {
        "\ud83d\ude17": "kissing_face"
    }, {
        "\ud83d\ude18": "face_throwing_a_kiss"
    }, {
        "\ud83d\ude19": "kissing_face_with_smiling_eyes"
    }, {
        "\ud83d\ude1a": "kissing_face_with_closed_eyes"
    }, {
        "\ud83d\ude1b": "face_with_stuck_out_tongue"
    }, {
        "\ud83d\ude1c": "face_with_stuck_out_tongue_and_winking_eye"
    }, {
        "\ud83d\ude1d": "face_with_stuck_out_tongue_and_tightly_closed_eyes"
    }, {
        "\ud83d\ude1e": "disappointed_face"
    }, {
        "\ud83d\ude1f": "worried_face"
    }, {
        "\ud83d\ude20": "angry_face"
    }, {
        "\ud83d\ude21": "pouting_face"
    }, {
        "\ud83d\ude22": "crying_face"
    }, {
        "\ud83d\ude23": "persevering_face"
    }, {
        "\ud83d\ude24": "face_with_look_of_triumph"
    }, {
        "\ud83d\ude25": "disappointed_but_relieved_face"
    }, {
        "\ud83d\ude26": "frowning_face_with_open_mouth"
    }, {
        "\ud83d\ude27": "anguished_face"
    }, {
        "\ud83d\ude28": "fearful_face"
    }, {
        "\ud83d\ude29": "weary_face"
    }, {
        "\ud83d\ude2a": "sleepy_face"
    }, {
        "\ud83d\ude2b": "tired_face"
    }, {
        "\ud83d\ude2c": "grimacing_face"
    }, {
        "\ud83d\ude2d": "loudly_crying_face"
    }, {
        "\ud83d\ude2e": "face_with_open_mouth"
    }, {
        "\ud83d\ude2f": "hushed_face"
    }, {
        "\ud83d\ude30": "face_with_open_mouth_and_cold_sweat"
    }, {
        "\ud83d\ude31": "face_screaming_in_fear"
    }, {
        "\ud83d\ude32": "astonished_face"
    }, {
        "\ud83d\ude33": "flushed_face"
    }, {
        "\ud83d\ude34": "sleeping_face"
    }, {
        "\ud83d\ude35": "dizzy_face"
    }, {
        "\ud83d\ude36": "face_without_mouth"
    }, {
        "\ud83d\ude37": "face_with_medical_mask"
    }, {
        "\ud83d\ude38": "grinning_cat_face_with_smiling_eyes"
    }, {
        "\ud83d\ude39": "cat_face_with_tears_of_joy"
    }, {
        "\ud83d\ude3a": "smiling_cat_face_with_open_mouth"
    }, {
        "\ud83d\ude3b": "smiling_cat_face_with_heart_shaped_eyes"
    }, {
        "\ud83d\ude3c": "cat_face_with_wry_smile"
    }, {
        "\ud83d\ude3d": "kissing_cat_face_with_closed_eyes"
    }, {
        "\ud83d\ude3e": "pouting_cat_face"
    }, {
        "\ud83d\ude3f": "crying_cat_face"
    }, {
        "\ud83d\ude40": "weary_cat_face"
    }, {
        "\ud83d\ude41": "slightly_frowning_face"
    }, {
        "\ud83d\ude42": "slightly_smiling_face"
    }, {
        "\ud83d\ude43": "upside_down_face"
    }, {
        "\ud83d\ude44": "face_with_rolling_eyes"
    }, {
        "\ud83d\ude45": "face_with_no_good_gesture"
    }, {
        "\ud83d\ude46": "face_with_ok_gesture"
    }, {
        "\ud83d\ude47": "person_bowing_deeply"
    }, {
        "\ud83d\ude48": "see_no_evil_monkey"
    }, {
        "\ud83d\ude49": "hear_no_evil_monkey"
    }, {
        "\ud83d\ude4a": "speak_no_evil_monkey"
    }, {
        "\ud83d\ude4b": "happy_person_raising_one_hand"
    }, {
        "\ud83d\ude4c": "person_raising_both_hands_in_celebration"
    }, {
        "\ud83d\ude4d": "person_frowning"
    }, {
        "\ud83d\ude4e": "person_with_pouting_face"
    }, {
        "\ud83d\ude4f": "person_with_folded_hands"
    } ];
    tinymce.PluginManager.add("emotions", function(ed, url) {
        var self = this;
        function createEmojiContent(icons, path) {
            var content = document.createElement("div");
            return path && -1 === path.indexOf("://") && (path = ed.documentBaseURI.toAbsolute(path, !0)), 
            each(icons, function(data) {
                var label, src, item;
                "string" == typeof data && (label = "", src = data, item = {}, path && (src = path + "/" + data), 
                /\.(png|jpg|jpeg|gif)$/i.test(data) && (label = data.replace(/\.[^.]+$/i, ""), 
                data = '<img src="' + src + '" alt="' + ed.getLang("emotions." + label, label) + '" />'), 
                item[data] = label, data = item), each(data, function(label, key) {
                    var src;
                    /\.(png|jpg|jpeg|gif)$/i.test(key) && (src = key, path && (src = path + "/" + src), 
                    key = '<img src="' + (src = ed.documentBaseURI.toAbsolute(src, !0)) + '" alt="' + ed.getLang("emotions." + label, label) + '" />'), 
                    DOM.add(content, "button", {
                        class: "mce_emotions_icon",
                        title: ed.getLang("emotions." + label, label)
                    }, key);
                });
            }), content.innerHTML;
        }
        ed.addButton("emotions", {
            title: "emotions.desc",
            cmd: "mceEmotion"
        }), self.content = "";
        var path = ed.getParam("emotions_url", url + "/img"), icons = ed.getParam("emotions_smilies", emoji, "hash");
        this.content = createEmojiContent(icons, path), this.loaded = !1, path && /\.(json|txt)$/.test(path) && !this.loaded && (-1 === path.indexOf("://") && (path = ed.documentBaseURI.toAbsolute(path, !0)), 
        this.loaded = !0, tinymce.util.XHR.send({
            url: path,
            success: function(text) {
                try {
                    icons = JSON.parse(text);
                } catch (e) {}
                path = path.substring(0, path.lastIndexOf("/")), self.content = createEmojiContent(icons, path);
            }
        })), this.createControl = function(n, cm) {
            var ctrl, self = this;
            return "emotions" !== n ? null : ((ctrl = cm.createSplitButton("emotions", {
                title: "emotions.desc",
                onselect: function(elm) {
                    insertEmoticon(elm);
                }
            })).onRenderMenu.add(function(c, m) {
                var item = m.add({
                    onclick: function(e) {
                        e.preventDefault(), item.setSelected(!1), insertEmoticon(e.target), 
                        m.hideMenu();
                    },
                    html: '<div id="' + ed.id + '_emotions_panel" class="mceEmoticonsMenu"></div>'
                });
                m.onShowMenu.add(function() {
                    DOM.setHTML(ed.id + "_emotions_panel", self.content);
                });
            }), ed.onRemove.add(function() {
                ctrl.destroy();
            }), ctrl);
            function insertEmoticon(n) {
                var html, p = DOM.getParent(n, ".mce_emotions_icon");
                p && (html = p.innerText, "IMG" === n.nodeName && (n.setAttribute("src", ed.documentBaseURI.toRelative(n.src)), 
                html = p.innerHTML), ed.execCommand("mceInsertContent", !1, html));
            }
        };
    });
}();tinymce/plugins/visualblocks/plugin.js000060400000002622152456167170014246 0ustar00/* jce - 2.9.99.2 | 2026-04-22 | https://www.joomlacontenteditor.net | Source: https://github.com/widgetfactory/jce | Copyright (C) 2006 - 2026 Ryan Demmer. All rights reserved | GNU/GPL Version 2 or later - http://www.gnu.org/licenses/gpl-2.0.html */
!function() {
    var Storage = tinymce.util.Storage;
    tinymce.PluginManager.add("visualblocks", function(ed, url) {
        var state = !1;
        function toggleVisualBlocks() {
            ed.controlManager.setActive("visualblocks", state), ed.getParam("use_state_cookies", !0) && Storage.set("wf_visualblocks_state", state), 
            state ? ed.dom.addClass(ed.getBody(), "mceVisualBlocks") : ed.dom.removeClass(ed.getBody(), "mceVisualBlocks");
        }
        ed.getParam("use_state_cookies", !0) && (state = Storage.get("wf_visualblocks_state")), 
        tinymce.is(state, "string") && (state = !!(state = "null" !== state && "false" !== state ? state : !1)), 
        state = ed.getParam("visualblocks_default_state", state), ed.addCommand("mceVisualBlocks", function() {
            state = !state, toggleVisualBlocks();
        }), ed.onSetContent.add(function() {
            ed.controlManager.setActive("visualblocks", state);
        }), ed.addButton("visualblocks", {
            title: "visualblocks.desc",
            cmd: "mceVisualBlocks"
        }), ed.onInit.add(function() {
            state && toggleVisualBlocks();
        });
    });
}();tinymce/plugins/media/plugin.js000060400000142247152456167170012634 0ustar00/* jce - 2.9.99.2 | 2026-04-22 | https://www.joomlacontenteditor.net | Source: https://github.com/widgetfactory/jce | Copyright (C) 2006 - 2026 Ryan Demmer. All rights reserved | GNU/GPL Version 2 or later - http://www.gnu.org/licenses/gpl-2.0.html */
!function() {
    var each = tinymce.each, extend = tinymce.extend, Node = tinymce.html.Node, VK = tinymce.VK, Serializer = tinymce.html.Serializer, DomParser = tinymce.html.DomParser, SaxParser = tinymce.html.SaxParser, DOM = tinymce.DOM;
    function indexOf(array, item) {
        for (var i = 0; i < array.length; i++) if (array[i] === item) return i;
        return -1;
    }
    String.prototype.startsWith || (String.prototype.startsWith = function(search, pos) {
        return this.substring(pos = pos || 0, pos + search.length) === search;
    });
    var htmlSchema = new tinymce.html.Schema({
        schema: "mixed"
    }), transparentSrc = "data:image/gif;base64,R0lGODlhAQABAIAAAAAAAP///yH5BAEAAAAALAAAAAABAAEAAAIBRAA7";
    function isNonEditable(ed, node) {
        ed = ed.settings.noneditable_noneditable_class || "mceNonEditable";
        return node.attr ? node.hasClass(ed) : DOM.hasClass(node, ed);
    }
    var alignStylesMap = {
        left: {
            float: "left"
        },
        center: {
            display: "block",
            "margin-left": "auto",
            "margin-right": "auto"
        },
        right: {
            float: "right"
        }
    };
    function isResponsiveMedia(node) {
        var valid, pStyles, nStyles, parent = node.parent;
        if (parent && "div" == parent.name) return valid = !0, pStyles = DOM.parseStyle(parent.attr("style")), 
        nStyles = DOM.parseStyle(node.attr("style")), each({
            "padding-bottom": "56.25%",
            position: "relative"
        }, function(val, key) {
            tinymce.is(pStyles[key]) && pStyles[key] == val || (valid = !1);
        }), each({
            position: "absolute"
        }, function(val, key) {
            tinymce.is(nStyles[key]) && nStyles[key] == val || (valid = !1);
        }), valid;
    }
    function isPreviewMedia(type) {
        return "iframe" == type || "video" == type || "audio" == type;
    }
    function isObjectEmbed(type) {
        return !isPreviewMedia(type);
    }
    function isCenterAligned(style) {
        return "block" == style.display && "auto" == style["margin-left"] && "auto" == style["margin-right"];
    }
    var sandbox_iframes_exclusions = [ "youtube.com", "youtube-nocookie.com", "youtu.be", "vimeo.com", "player.vimeo.com", "dailymotion.com", "embed.music.apple.com", "open.spotify.com", "giphy.com", "dai.ly", "codepen.io", "maps.google.com", "google.com/maps", "docs.google.com", "google.com/docs", "sheets.google.com", "google.com/sheets", "slides.google.com", "google.com/slides", "forms.google.com", "google.com/forms", "canva.com", "slideshare.net", "slides.com", "facebook.com", "instagram.com", "bandcamp.com", "calendly.com" ], mediaProviders = {
        youtube: /youtu(\.)?be(.+)?\/(.+)/,
        vimeo: /vimeo(.+)?\/(.+)/,
        dailymotion: /dai\.?ly(motion)?(\.com)?/,
        scribd: /scribd\.com\/(.+)/,
        slideshare: /slideshare\.net\/(.+)\/(.+)/,
        soundcloud: /soundcloud\.com\/(.+)/,
        spotify: /spotify\.com\/(.+)/,
        ted: /ted\.com\/talks\/(.+)/,
        twitch: /twitch\.tv\/(.+)/,
        facebook: /facebook\.com\/(.+)/,
        instagram: /instagram\.com\/(.+)/,
        bandcamp: /bandcamp\.com\/(.+)/,
        calendly: /calendly\.com\/(.+)/
    };
    function getMediaProps(ed, data, provider) {
        var id, matches, src, defaultValues = {
            youtube: {
                src: data = data.src || "",
                width: 560,
                height: 315,
                frameborder: 0,
                allowfullscreen: "allowfullscreen",
                allow: "accelerometer; autoplay; encrypted-media; gyroscope; picture-in-picture",
                sandbox: !1,
                oembed: !0
            },
            vimeo: {
                src: data,
                width: 560,
                height: 315,
                frameborder: 0,
                allowfullscreen: "allowfullscreen",
                allow: "autoplay; fullscreen",
                sandbox: !1,
                oembed: !0
            },
            dailymotion: {
                src: data,
                width: 640,
                height: 360,
                frameborder: 0,
                allowfullscreen: "allowfullscreen",
                allow: "autoplay; fullscreen",
                sandbox: !1,
                oembed: !0
            },
            video: {
                src: data,
                controls: !0,
                type: "video/mpeg"
            },
            slideshare: {
                src: "",
                width: 427,
                height: 356,
                frameborder: 0,
                allowfullscreen: "allowfullscreen",
                allow: "fullscreen",
                sandbox: !1,
                oembed: !0
            },
            soundcloud: {
                src: "",
                width: "100%",
                height: 400,
                frameborder: 0,
                scrolling: "no",
                allow: "autoplay; fullscreen",
                sandbox: !1,
                oembed: !0
            },
            spotify: {
                src: data,
                width: 300,
                height: 380,
                frameborder: 0,
                allowtransparency: !0,
                allow: "encrypted-media",
                sandbox: !1,
                oembed: !0
            },
            ted: {
                src: "",
                width: 560,
                height: 316,
                frameborder: 0,
                allowfullscreen: "allowfullscreen",
                allow: "fullscreen",
                sandbox: !1,
                oembed: !0
            },
            twitch: {
                src: "",
                width: 500,
                height: 281,
                frameborder: 0,
                allowfullscreen: "allowfullscreen",
                allow: "autoplay; fullscreen",
                sandbox: !1,
                oembed: !0
            },
            instagram: {
                src: "",
                width: 400,
                height: 480,
                frameborder: 0,
                allowfullscreen: "allowfullscreen",
                sandbox: !1,
                oembed: !1
            },
            facebook: {
                src: "",
                frameborder: 0,
                width: 500,
                height: 280,
                allowtransparency: "allowtransparency",
                allowfullscreen: "allowfullscreen",
                scrolling: "no",
                allow: "encrypted-media;fullscreen",
                sandbox: !1,
                oembed: !1
            },
            calendly: {
                src: "",
                width: "100%",
                height: 700,
                frameborder: 0,
                style: "min-width:320px",
                allowtransparency: !0,
                sandbox: !1,
                oembed: !1
            }
        }, data = data.replace(/[^a-z0-9-_:&;=%\?\[\]\/\.]/gi, "");
        return defaultValues[provider] || (defaultValues[provider] = {}), defaultValues[provider].src = data, 
        "youtube" === provider && (src = data.replace(/youtu(\.)?be([^\/]+)?\/(.+)/, function(a, b, c, d) {
            return d = d.replace(/(watch\?v=|v\/|embed\/)/, ""), "youtube" + (c = b && !c ? ".com" : c) + "/embed/" + (id = d.replace(/([^\?&#]+)/, function($0, $1) {
                return $1;
            }));
        }), defaultValues[provider].src = src), "vimeo" === provider && (-1 == data.indexOf("player.vimeo.com/video/") && (src = id = "", 
        matches = /vimeo\.com\/(?:\w+\/){0,3}((?:[0-9]+\b)(?:\/[a-z0-9]+)?)/.exec(data)) && tinymce.is(matches, "array") && (matches = matches[1].split("/"), 
        id = matches[0], 2 == matches.length && (src = matches[1]), data = "https://player.vimeo.com/video/" + id + (src ? "?h=" + src : "")), 
        defaultValues[provider].src = data), "dailymotion" === provider && (id = "", 
        (matches = /dai\.?ly(motion)?(.+)?\/(swf|video)?\/?([a-z0-9]+)_?/.exec(data)) && tinymce.is(matches, "array") && (id = matches.pop()), 
        defaultValues[provider].src = "https://dailymotion.com/embed/video/" + id, 
        -1 !== matches.indexOf("player.html?video=")) && (defaultValues[provider].src = matches), 
        "spotify" === provider && (defaultValues[provider].src = data.replace(/open\.spotify\.com\/track\//, "open.spotify.com/embed/track/")), 
        "ted" === provider && (defaultValues[provider].src = data.replace(/www\.ted.com\/talks\//, "embed.ted.com/talks/")), 
        "twitch" === provider && (defaultValues[provider].src = data.replace(/twitch\.tv\//, "player.twitch.tv/?channel=")), 
        "instagram" === provider && (data = (data = data.replace(/\/\?.+$/gi, "")).replace(/\/$/, ""), 
        defaultValues[provider].src = data + "/embed/captioned"), "facebook" === provider && (src = "https://www.facebook.com/plugins/", 
        -1 !== data.indexOf("/videos/") && (src += "video.php?href="), -1 !== data.indexOf("/posts/") && (src += "post.php?href=", 
        defaultValues[provider].height = 247, data = data.replace(/\?.+$/, "")), 
        defaultValues[provider].src = src + encodeURIComponent(data)), "calendly" === provider && (data = (data = data.replace(/\?.+$/, "")).replace(/\/$/, ""), 
        defaultValues[provider].src = data), defaultValues[provider];
    }
    function updateSandbox(editor, node) {
        var src = node.attr("src");
        if (!node.attr("sandbox")) {
            var defaultAttributes = getMediaProps(0, {
                src: src
            }, isSupportedMedia(editor, src));
            if (!1 === defaultAttributes.sandbox ? node.attr("sandbox", null) : node.attr("sandbox", defaultAttributes.sandbox || ""), 
            isLocalUrl(editor, src)) node.attr("sandbox", null); else if (!1 === editor.getParam("media_iframes_sandbox", !0)) node.attr("sandbox", null); else try {
                var url = new URL(src), host = url.host.toLowerCase(), path = url.pathname.toLowerCase(), cleanHost = 0 === host.indexOf("www.") ? host.substring(4) : host, site = cleanHost + path;
                sandbox_iframes_exclusions.some(function(value) {
                    return !!value && (value = (value = 0 === (value = (value = String(value).toLowerCase()).replace(/^[a-z0-9.+-]+:\/\//, "")).indexOf("www.") ? value.substring(4) : value).replace(/\/+$/, ""), 
                    0 === site.indexOf(value) || 0 === cleanHost.indexOf(value));
                }) && node.attr("sandbox", null);
            } catch (e) {}
        }
    }
    function normalizeUrl(u) {
        (u = (u || "").trim()).startsWith("//") ? u = "placeholder:" + u : /:\/\//i.test(u) || (u = "placeholder://" + u);
        try {
            var p = new URL(u);
            return (p.hostname.replace(/^www\./i, "") + p.pathname.replace(/\/+$/, "")).toLowerCase();
        } catch (e) {
            return u.replace(/^https?:\/\//i, "").replace(/^www\./i, "").replace(/\/+$/, "").toLowerCase();
        }
    }
    function isSupportedProvider(editor, url) {
        for (var providers = editor.settings.media_iframes_supported_media || Object.keys(mediaProviders), supported = !1, testUrl = ("string" == typeof providers && (providers = providers.split(",").map(function(s) {
            return s.trim();
        })), normalizeUrl(url)), i = 0; i < providers.length; i++) {
            var key = providers[i];
            if (key) {
                var trimmed = key.replace(/\/+$/, "");
                if ((mediaProviders[key] || (trimmed = normalizeUrl(trimmed), trimmed = String(trimmed).replace(/[.*+?^${}()|[\]\\]/g, "\\$&"), 
                new RegExp("^" + trimmed))).test(testUrl)) {
                    supported = mediaProviders[key] ? key : "iframe";
                    break;
                }
            }
        }
        return supported;
    }
    function isSupportedIframe(editor, url) {
        var value;
        return !!isValidElement(editor, "iframe") && !!url && (editor.settings.media_iframes_allow_local ? isLocalUrl(editor, url) : (value = isSupportedProvider(editor, url), 
        editor.settings.media_iframes_allow_supported ? !!isLocalUrl(editor, url) || value : value || !0));
    }
    function isValidElement(editor, value) {
        return editor.getParam("media_valid_elements", "", "hash")[value];
    }
    function isSupportedUrl(editor, tag, url) {
        return !editor.settings["media_" + tag + "_allow_local"] || isLocalUrl(editor, url);
    }
    function isSupportedMedia(editor, url, type) {
        var ext = (url = stripQuery(url = url || "")).split(".").pop().toLowerCase(), audioExts = [ "mp3", "ogg", "webm", "wav", "m4a", "aiff" ], videoExts = [ "mp4", "ogv", "ogg", "webm", "mov", "qt", "mpg", "mpeg", "divx" ];
        if ((type = (type || "").toLowerCase()).startsWith("audio/")) {
            if (-1 === indexOf(audioExts, ext)) return !1;
            if (isValidElement(editor, "audio") && isSupportedUrl(editor, "audio", url)) return "audio";
        }
        if (type.startsWith("video/")) {
            if (-1 === indexOf(videoExts, ext)) return !1;
            if (isValidElement(editor, "video") && isSupportedUrl(editor, "video", url)) return "video";
        }
        return -1 !== indexOf(videoExts, ext) && isValidElement(editor, "video") && isSupportedUrl(editor, "video", url) ? "video" : -1 !== indexOf(audioExts, ext) && isValidElement(editor, "audio") && isSupportedUrl(editor, "audio", url) ? "audio" : -1 !== indexOf([ "swf", "pdf" ], ext) && isValidElement(editor, "object") && isSupportedUrl(editor, "object", url) ? "object" : !!isSupportedIframe(editor, url) && "iframe";
    }
    var isAbsoluteUrl = function(url) {
        return !!url && (0 === url.indexOf("//") || 0 < url.indexOf("://"));
    }, isLocalUrl = function(editor, url) {
        return !isAbsoluteUrl(url) || (editor = editor.documentBaseURI.toRelative(url), 
        !1 === isAbsoluteUrl(editor));
    }, validateIframe = function(editor, node) {
        var src = node.attr("src");
        return !!isNonEditable(editor, node) || 0 !== node.attributes.length && isSupportedIframe(editor, src);
    }, sanitize = function(editor, html) {
        var blocked, writer = new tinymce.html.Writer();
        return new tinymce.html.SaxParser({
            validate: !1,
            allow_conditional_comments: !1,
            special: "script,noscript",
            comment: function(text) {
                writer.comment(text);
            },
            cdata: function(text) {
                writer.cdata(text);
            },
            text: function(text, raw) {
                writer.text(text, raw);
            },
            start: function(name, attrs, empty) {
                if (blocked = !0, "script" !== name && "noscript" !== name && "svg" !== name && !(attrs.map && "bookmark" == attrs.map["data-mce-type"] || attrs.map["data-mce-bogus"])) {
                    for (var i = attrs.length - 1; 0 <= i; i--) {
                        var attrName = attrs[i].name;
                        0 === attrName.indexOf("on") && (delete attrs.map[attrName], 
                        attrs.splice(i, 1)), "style" === attrName && (attrs[i].value = editor.dom.serializeStyle(editor.dom.parseStyle(attrs[i].value), name));
                    }
                    writer.start(name, attrs, empty), blocked = !1;
                }
            },
            end: function(name) {
                blocked || writer.end(name);
            }
        }, htmlSchema).parse(html), writer.getContent();
    };
    function parseHTML(value) {
        var nodes = [], settings = (new SaxParser({
            start: function(name, attrs) {
                ("source" !== name || !attrs.map) && "param" !== name && "embed" !== name && "track" !== name || nodes.push({
                    name: name,
                    value: attrs.map
                });
            }
        }).parse(value), {
            invalid_elements: "source,param,embed,track",
            forced_root_block: !1,
            verify_html: !0,
            validate: !0
        }), schema = new tinymce.html.Schema(settings), settings = new Serializer(settings, schema).serialize(new DomParser(settings, schema).parse(value));
        return nodes.push({
            name: "html",
            value: settings
        }), nodes;
    }
    function stripQuery(value) {
        var match;
        return value && ((match = value.match(/^(.*?\.[a-z0-9]{2,10})(?:[?#&].*|$)/i)) ? match[1] : value);
    }
    for (var y, ext, lookup = {}, mimes = {}, items = "video/divx,divx,application/pdf,pdf,application/x-shockwave-flash,swf swfl,audio/mpeg,mpga mpega mp2 mp3,audio/ogg,ogg spx oga,audio/x-wav,wav,video/mpeg,mpeg mpg mpe,video/mp4,mp4 m4v,video/ogg,ogg ogv,video/webm,webm,video/quicktime,qt mov,video/x-flv,flv,video/3gpp,3gp,video/x-matroska,mkv".split(/,/), i = 0; i < items.length; i += 2) for (ext = items[i + 1].split(/ /), 
    y = 0; y < ext.length; y++) mimes[ext[y]] = items[i];
    each({
        flash: {
            type: "application/x-shockwave-flash"
        },
        quicktime: {
            type: "video/quicktime"
        },
        divx: {
            type: "video/divx"
        },
        video: {
            type: "video/mpeg"
        },
        audio: {
            type: "audio/mpeg"
        },
        iframe: {},
        pdf: {
            type: "application/pdf"
        }
    }, function(value, key) {
        value.name = key, value.classid && (lookup[value.classid] = value), value.type && (lookup[value.type] = value), 
        lookup[key.toLowerCase()] = value;
    });
    var createPlaceholderNode = function(editor, node) {
        var placeHolder = new Node("img", 1);
        return placeHolder.shortEnded = !0, retainAttributesAndInnerHtml(editor, node, placeHolder), 
        placeHolder.attr({
            src: transparentSrc,
            "data-mce-object": node.name
        }), isNonEditable(editor, node) && (placeHolder.attr("contenteditable", "false"), 
        placeHolder.attr("data-mce-resize", "false")), placeHolder;
    };
    function createReplacementNode(editor, node) {
        node = new tinymce.html.Serializer().serialize(node);
        return editor.dom.create("div", {}, node).firstChild;
    }
    var createPreviewNode = function(editor, node) {
        var name = node.name, msg = (msg = editor.getLang("media.preview_hint", "Click to activate, ALT + Click to toggle placeholder")).replace(/%s/g, "ALT"), src = (node.attr("autoplay") && (node.attr("data-mce-p-autoplay", node.attr("autoplay")), 
        node.attr("autoplay", null)), "iframe" == name && node.attr("src") && (src = node.attr("src"), 
        node.attr("data-mce-p-src", src), node.attr("src", src.replace("autoplay=1", "autoplay=0"))), 
        [ "mce-object-preview", "mce-object-" + name ]), styles = {}, styleVal = editor.dom.parseStyle(node.attr("style"));
        return each([ "width", "height" ], function(key) {
            var val = node.attr(key) || styleVal[key] || "";
            val && !/(%|[a-z]{1,3})$/.test(val) && (val += "px"), styles[key] = val;
        }), each(styleVal, function(value, key) {
            /(margin|float|align)/.test(key) && (styles[key] = value);
        }), isCenterAligned(styleVal) && (src.push("mce-object-preview-center"), 
        delete styles["margin-left"], delete styles["margin-right"]), styleVal.float && (src.push("mce-object-preview-" + styleVal.float), 
        delete styles.float), src = Node.create("span", {
            contentEditable: "false",
            "data-mce-contenteditable": "true",
            "data-mce-object": name,
            class: src.join(" "),
            "aria-details": msg,
            "data-mce-resize": function(node) {
                return "video" === node.name ? "proportional" : "iframe" === node.name ? isSupportedMedia(editor, node.attr("src")) ? "proportional" : "true" : "false";
            }(node),
            style: editor.dom.serializeStyle(styles)
        }), msg = Node.create(name, {
            src: node.attr("src")
        }), retainAttributesAndInnerHtml(editor, node, msg), name = Node.create("span", {
            class: "mce-object-shim"
        }), src.append(msg), src.append(name), src;
    };
    function processNodeAttributes(editor, tag, node) {
        var key, params, attribs = {}, styles = {}, boolAttrs = editor.schema.getBoolAttrs();
        for (key in node.attributes.map) {
            var align, styleObject, value = node.attributes.map[key];
            "src" === key && "img" === node.name || "draggable" === key || "contenteditable" === key || 0 === key.indexOf("on") || 0 === (key = "data-mce-width" !== (key = 0 === key.indexOf("data-mce-p-") ? key.substring(11) : key) && "data-mce-height" !== key ? key : key.substring(9)).indexOf("data-mce-") || "span" == node.name && node.attr("data-mce-object") || !editor.schema.isValid(tag, key) && -1 == key.indexOf("-") || ("class" === key && ((align = value.match(/mce-object-preview-(left|center|right)/)) && (styles = extend(styles, alignStylesMap[align[1]]), 
            node.attr("style") || node.attr("style", editor.dom.serializeStyle(styles))), 
            value = function(value) {
                return value && (value = value.replace(/\s?mce-([\w-]+)/g, "").replace(/\s+/g, " "), 
                value = 0 < (value = tinymce.trim(value)).length ? value : null), 
                value || null;
            }(value)), "style" === key && value && (styleObject = editor.dom.parseStyle(value), 
            each([ "width", "height" ], function(key) {
                var attrValue;
                return "audio" === tag || !styleObject[key] || ((attrValue = tinymce.is(node.attr(key)) ? node.attr(key) : "") && !/\D/.test(attrValue) && (attrValue += "px"), 
                void (attrValue && attrValue == styleObject[key] && delete styleObject[key]));
            }), styleObject = extend(styleObject, styles), value = (value = editor.dom.serializeStyle(styleObject)) || null), 
            "src" !== key && "poster" !== key && "data" !== key || (value = editor.convertURL(value)), 
            boolAttrs[key] && (value = key), attribs[key] = value);
        }
        return node.attr("data") || (params = node.getAll("param")).length && (value = (params = params[0]).attr("src") || params.attr("url") || null) && (attribs.src = editor.convertURL(value), 
        params.remove()), attribs;
    }
    function nodeToMedia(editor, node) {
        var elm, parent, embed, tag = node.attr("data-mce-object"), node = (isResponsiveMedia(node) && ((parent = node.parent).attr("contenteditable", null), 
        parent.attr("data-mce-contenteditable", null)), elm = new Node(tag, 1), 
        parent = processNodeAttributes(editor, tag, node), /\s*mce-object-preview\s*/.test(node.attr("class")) && node.firstChild && node.firstChild.name === tag && (node = node.firstChild), 
        parent = extend(parent, processNodeAttributes(editor, tag, node)), elm.attr(parent), 
        node.attr("data-mce-html"));
        return node && (node = parseHTML(unescape(node)), each(node, function(child) {
            var inner;
            "html" === child.name ? ((inner = new Node("#text", 3)).raw = !0, inner.value = sanitize(editor, child.value), 
            elm.append(inner)) : ((inner = new Node(child.name, 1)).shortEnded = !0, 
            each(child.value, function(val, key) {
                htmlSchema.isValid(inner.name, key) && inner.attr(key, val);
            }), elm.append(inner), "source" == inner.name && inner.attr("src") == elm.attr("src") && elm.attr("src", null));
        })), elm.attr("data-mce-html", null), "object" === tag && 0 === elm.getAll("embed").length && "application/x-shockwave-flash" != (node = elm.attr("type")) && "application/pdf" != node && ((embed = new Node("embed", 1)).shortEnded = !0, 
        each(parent, function(value, name) {
            "data" === name && embed.attr("src", value), htmlSchema.isValid("embed", name) && embed.attr(name, value);
        }), elm.append(embed)), "iframe" === tag && updateSandbox(editor, elm), 
        elm;
    }
    function convertMediaToPlaceholder(editor, node) {
        var media_live_embed = editor.settings.media_live_embed, strict_embed = !1 !== editor.settings.media_strict_embed;
        if (node.parent.attr("data-mce-object")) return !1;
        if (node.firstChild && "bookmark" == node.firstChild.attr("data-mce-type") && node.firstChild.remove(), 
        "iframe" === node.name) if (node.attr("src")) {
            if (!1 === validateIframe(editor, node)) return node.remove(), !1;
        } else media_live_embed = !1;
        if (!isValidElement(editor, node.name) && !isNonEditable(editor, node)) return node.remove(), 
        !1;
        if ("iframe" !== node.name) {
            var src = node.attr("src") || node.attr("data") || "", type = node.attr("type") || node.attr("data-mce-p-type") || "";
            if (!src) {
                if ("video" === node.name || "audio" === node.name) {
                    for (var sources = node.getAll("source"), j = 0; j < sources.length; j++) {
                        var source = sources[j];
                        !source.attr("src") || isSupportedUrl(editor, node.name, source.attr("src")) || (source.remove(), 
                        sources.splice(j, 1));
                    }
                    sources.length && (src = sources[0].attr("src"), type = sources[0].attr("type") || type);
                }
                if ("object" === node.name) {
                    var params = node.getAll("param");
                    if (params.length) for (j = 0; j < params.length; j++) {
                        var param = params[j];
                        param.attr("movie") && (src = param.attr("value"));
                    }
                    src || (embed = node.getAll("embed")).length && (src = embed[0].attr("src"), 
                    type = embed[0].attr("type") || type);
                }
            }
            if (!src) return media_live_embed = !1;
            if (!isSupportedUrl(editor, node.name, src)) return node.remove(), !1;
            if (strict_embed) {
                var embed, newName = isSupportedMedia(editor, src, type);
                if (!newName) return node.remove(), !1;
                if ("iframe" == newName && !isSupportedProvider(editor, src)) return node.remove(), 
                !1;
                newName !== node.name && each(node.children(), function(elm) {
                    editor.schema.isValidChild(newName, elm.name) || elm.remove();
                }), node.name = newName, node.attr("src", src), "object" == newName && (node.attr("data", src), 
                node.attr("src", null), embed = stripQuery(src).split(".").pop(), 
                node.attr("type", mimes[embed] || "application/octet-stream"));
            }
        }
        !media_live_embed || isObjectEmbed(node.name) || isResponsiveMedia(node) || isNonEditable(editor, node) ? isWithinEmbed(node) || (isResponsiveMedia(node) && node.parent.attr({
            contentEditable: "false",
            "data-mce-contenteditable": "true"
        }), node.replace(createPlaceholderNode(editor, node))) : isWithinEmbed(node) || node.replace(createPreviewNode(editor, node));
    }
    var retainAttributesAndInnerHtml = function(editor, sourceNode, targetNode) {
        var attrName, attrValue, attribs, ai, innerHtml, boolAttrs = editor.schema.getBoolAttrs(), src = sourceNode.attr("src"), style = (src && (defaultAttributes = getMediaProps(0, {
            src: src
        }, isSupportedMedia(editor, src)), each(defaultAttributes, function(val, name) {
            tinymce.is(sourceNode.attr(name)) || name in boolAttrs || ("style" === name && tinymce.is(val, "object") && (val = editor.dom.serializeStyle(val)), 
            sourceNode.attr(name, val));
        }), updateSandbox(editor, sourceNode)), editor.dom.parseStyle(sourceNode.attr("style"))), defaultAttributes = sourceNode.attr("width") || style.width || "", height = sourceNode.attr("height") || style.height || "", style = editor.dom.parseStyle(sourceNode.attr("style"));
        for (each([ "bgcolor", "align", "border", "vspace", "hspace" ], function(na) {
            var v = sourceNode.attr(na);
            if (v) {
                switch (na) {
                  case "bgcolor":
                    style["background-color"] = v;
                    break;

                  case "align":
                    /^(left|right)$/.test(v) ? style.float = v : style["vertical-align"] = v;
                    break;

                  case "vspace":
                    style["margin-top"] = v, style["margin-bottom"] = v;
                    break;

                  case "hspace":
                    style["margin-left"] = v, style["margin-right"] = v;
                    break;

                  default:
                    style[na] = v;
                }
                sourceNode.attr(na, null);
            }
        }), ai = (attribs = sourceNode.attributes).length; ai--; ) attrName = attribs[ai].name, 
        attrValue = attribs[ai].value, "data-mce-html" === attrName || "data-mce-clipboard-media" === attrName ? targetNode.attr(attrName, attrValue) : -1 !== attrName.indexOf("data-mce") && -1 === attrName.indexOf("data-mce-p-") || (-1 !== (attrName = 0 === (attrName = "img" !== targetNode.name || htmlSchema.isValid("img", attrName) && "src" != attrName ? attrName : "data-mce-p-" + attrName).indexOf("on") && editor.settings.allow_event_attributes ? "data-mce-p-" + attrName : attrName).indexOf("-") ? targetNode.attr(attrName, attrValue) : (htmlSchema.isValid(targetNode.name, attrName) && targetNode.attr(attrName, attrValue), 
        tinymce.is(boolAttrs[attrName]) && "false" == attrValue && targetNode.attr(attrName, null), 
        "sandbox" == attrName && !1 === attrValue && targetNode.attr(attrName, null)));
        defaultAttributes && !style.width && (style.width = /^[0-9.]+$/.test(defaultAttributes) ? defaultAttributes + "px" : defaultAttributes), 
        height && !style.height && (style.height = /^[0-9.]+$/.test(height) ? height + "px" : height);
        var agent, defaultAttributes = [], height = (sourceNode.attr("class") && (defaultAttributes = sourceNode.attr("class").replace(/mce-(\S+)/g, "").replace(/\s+/g, " ").trim().split(" ")), 
        lookup[sourceNode.attr("type")] || lookup[sourceNode.attr("classid")] || {
            name: sourceNode.name
        });
        defaultAttributes.push("mce-object mce-object-" + height.name), "audio" == sourceNode.name && (agent = navigator.userAgent.match(/(Chrome|Safari|Gecko)/)) && defaultAttributes.push("mce-object-agent-" + agent[0].toLowerCase()), 
        targetNode.attr("class", tinymce.trim(defaultAttributes.join(" "))), (agent = editor.dom.serializeStyle(style)) && targetNode.attr("style", agent), 
        src || (defaultAttributes = sourceNode.getAll("source")).length && (agent = defaultAttributes[0], 
        src = "src", "img" === targetNode.name && (src = "data-mce-p-" + src), targetNode.attr(src, agent.attr("src"))), 
        "object" === sourceNode.name && (sourceNode.attr("data") || (defaultAttributes = sourceNode.getAll("param"), 
        each(defaultAttributes, function(param) {
            if ("src" === param.attr("name") || "url" === param.attr("name")) return targetNode.attr({
                "data-mce-p-data": param.attr("value")
            }), !1;
        })), targetNode.attr("data-mce-p-type", height.type)), (innerHtml = sourceNode.firstChild ? new tinymce.html.Serializer({
            inner: !0
        }).serialize(sourceNode) : innerHtml) && (targetNode.attr("data-mce-html", escape(sanitize(editor, innerHtml))), 
        targetNode.empty());
    }, isWithinEmbed = function(node) {
        for (;node = node.parent; ) if (node.attr("data-mce-object")) return !0;
        return !1;
    };
    function htmlToData(ed, mediatype, html) {
        var data = {
            innerHTML: ""
        };
        try {
            html = unescape(html);
        } catch (e) {}
        html = parseHTML(html);
        return each(html, function(node, i) {
            var val;
            "source" == node.name && (data.source || (data.source = []), val = ed.convertURL(node.value.src), 
            data.source.push(val)), "param" == node.name && (val = node.value.name, 
            -1 !== tinymce.inArray([ "src", "data", "movie", "url", "source" ], val) && (node.value.value = ed.convertURL(node.value.value)), 
            data[node.value.name] = node.value.value), "track" == node.name && (data.innerHTML += ed.dom.createHTML(node.name, node.value)), 
            "html" == node.name && (data.innerHTML += node.value);
        }), data;
    }
    function updateMedia(ed, data, elm) {
        var preview, attribs = {}, node = ed.dom.getParent(elm || ed.selection.getNode(), "[data-mce-object]"), boolAttrs = ed.schema.getBoolAttrs(), nodeName = (boolAttrs.preload = !0, 
        node.nodeName.toLowerCase()), elm = (each([ "block", "center", "left", "right" ], function(val) {
            ed.dom.removeClass(node, "mce-object-preview-" + val);
        }), -1 !== node.className.indexOf("mce-object-preview") && (nodeName = (preview = node).getAttribute("data-mce-object"), 
        node = ed.dom.select(nodeName, node)[0]), preview && preview.removeAttribute("style"), 
        each(data, function(value, name) {
            if ("innerHTML" === name && value) return attribs["data-mce-html"] = escape(value), 
            !0;
            if ("img" !== nodeName && !htmlSchema.isValid(nodeName, name) && -1 == name.indexOf("-")) return !0;
            if (name in boolAttrs && ("false" == value || !value) && (value = null, 
            "autoplay" == name) && (attribs["data-mce-p-" + name] = null), "img" === nodeName && (!htmlSchema.isValid(nodeName, name) || "src" === name) && null !== value) return attribs["data-mce-p-" + name] = value, 
            !0;
            if ("iframe" == nodeName && "src" == name && (value = (attribs["data-mce-p-" + name] = value).replace("autoplay=1", "autoplay=1")), 
            "class" == name && value) return ed.dom.addClass(node, value), !0;
            if ("style" == name) {
                if (value) return tinymce.is(value, "object") && (value = ed.dom.serializeStyle(value)), 
                ed.dom.setStyles(node, ed.dom.parseStyle(value)), !0;
                value = null;
            }
            attribs[name] = value = "sandbox" == name && !1 === value ? null : value;
        }), ed.dom.setAttribs(node, attribs), ed.dom.parseStyle(node.getAttribute("style")));
        preview && (isCenterAligned(elm) && ed.dom.addClass(preview, "mce-object-preview-center"), 
        elm.float) && ed.dom.addClass(preview, "mce-object-preview-" + elm.float), 
        each([ "width", "height" ], function(key) {
            attribs[key] && (ed.dom.setStyle(node, key, attribs[key]), preview) && ed.dom.setStyle(preview, key, attribs[key]);
        });
    }
    tinymce.PluginManager.add("media", function(ed, url) {
        var custom_sandbox_iframes_exclusions = ed.getParam("media_iframes_sandbox_exclusions");
        function isMediaObject(node) {
            return node = node || ed.selection.getNode(), ed.dom.getParent(node, "[data-mce-object]");
        }
        function isMediaNode(node) {
            return node && isMediaObject(node);
        }
        function findMediaNode(elm, nodeName) {
            nodeName = ed.dom.select(nodeName, elm);
            return nodeName.length ? nodeName[0] : null;
        }
        function objectActivate(ed, e) {
            var node = isMediaObject(e.target);
            node && !isNonEditable(ed, node) && (ed.selection.select(node), ed.dom.getAttrib(node, "data-mce-selected") && node.setAttribute("data-mce-selected", "2"), 
            "mousedown" === e.type && e.altKey && "IMG" !== node.nodeName && (e.target = function(editor, node) {
                var ifr = new tinymce.html.DomParser({}, editor.schema).parse(node.innerHTML).firstChild, ifr = createReplacementNode(editor, createPlaceholderNode(editor, ifr));
                return editor.dom.replace(ifr, node), ifr;
            }(ed, node)), e.stopImmediatePropagation(), e.preventDefault());
        }
        function setClipboardData(ed, e) {
            var node, e = e.clipboardData;
            e && (node = isMediaObject()) && (isNonEditable(ed, node) ? e.clearData() : (ed.selection.select(node), 
            ed = {
                html: node = ed.selection.getContent({
                    contextual: !0
                }),
                text: node.toString()
            }, e.clearData(), e.setData("text/html", ed.html), e.setData("text/plain", ed.text)));
        }
        function updatePreviewSelection(ed) {
            each(ed.dom.select(".mce-object-preview", ed.getBody()), function(node) {
                !ed.dom.isBlock(node.parentNode) || node.previousSibling || node.nextSibling || ed.dom.insertAfter(ed.dom.create("br", {
                    "data-mce-bogus": 1
                }), node);
            });
        }
        custom_sandbox_iframes_exclusions && "string" == typeof custom_sandbox_iframes_exclusions && (custom_sandbox_iframes_exclusions = custom_sandbox_iframes_exclusions.split(",").map(function(item) {
            return item.trim();
        })), sandbox_iframes_exclusions = sandbox_iframes_exclusions.concat(custom_sandbox_iframes_exclusions), 
        ed.onMouseDown.add(objectActivate), ed.onKeyDown.add(objectActivate), ed.onNodeChange.addToTop(function(ed, cm, n, collapsed, o) {
            !isMediaNode(n) || isNonEditable(ed, n) || o.contenteditable || (o.contenteditable = !0);
        }), ed.onPreInit.add(function() {
            var editor;
            ed.onUpdateMedia.add(function(ed, o) {
                o.before && o.after && isSupportedMedia(ed, o.before) && each(ed.dom.select("video.mce-object, audio.mce-object, iframe.mce-object, img.mce-object"), function(elm) {
                    var html, src = elm.getAttribute("src");
                    "IMG" === elm.nodeName && (src = elm.getAttribute("data-mce-p-src")), 
                    "VIDEO" !== elm.nodeName && "AUDIO" !== elm.nodeName || ((html = elm.getAttribute("data-mce-html")) && (html = ed.dom.create(elm.nodeName, {}, unescape(html)), 
                    each(html.childNodes, function(el) {
                        "SOURCE" == el.nodeName && el.getAttribute("src") == o.before && el.setAttribute("src", o.after);
                    }), elm.setAttribute("data-mce-html", escape(html.innerHTML))), 
                    (html = elm.getAttribute("poster")) && html == o.before && elm.setAttribute("poster", o.after)), 
                    src == o.before && updateMedia(ed, {
                        src: o.after
                    }, elm);
                });
            }), "html4" === ed.settings.schema && (ed.schema.addValidElements("iframe[longdesc|name|src|frameborder|marginwidth|marginheight|scrolling|align|width|height|allowfullscreen|seamless|*]"), 
            ed.schema.addValidElements("video[src|autobuffer|autoplay|loop|controls|width|height|poster|*],audio[src|autobuffer|autoplay|loop|controls|*],source[src|type|media|*],embed[src|type|width|height|*]")), 
            ed.parser.addNodeFilter("iframe,video,audio,object,embed", (editor = ed, 
            function(nodes) {
                for (var node, i = nodes.length; i--; ) (node = nodes[i]).parent && convertMediaToPlaceholder(editor, node);
            })), ed.serializer.addAttributeFilter("data-mce-object", function(nodes, name) {
                for (var node, i = nodes.length; i--; ) (node = nodes[i]).parent && !function(editor, node) {
                    editor = nodeToMedia(editor, node);
                    isObjectEmbed(editor.name) || node.empty(), node.replace(editor), 
                    node.empty();
                }(ed, node);
            }), ed.dom.bind(ed.getDoc(), "touchstart", function(e) {
                objectActivate(ed, e);
            });
        }), ed.onInit.add(function() {
            var settings = ed.settings;
            each([ "left", "right", "center" ], function(align) {
                ed.formatter.register("align" + align, {
                    selector: "span[data-mce-object]",
                    collapsed: !1,
                    ceFalseOverride: !0,
                    classes: "mce-object-preview-" + align,
                    deep: !0,
                    onremove: function(elm) {
                        each([ "left", "right", "center" ], function(val) {
                            ed.dom.removeClass(elm, "mce-object-preview-" + val);
                        });
                    }
                });
            }), ed.theme.onResolveName.add(function(theme, o) {
                var name, node = ed.dom.getParent(o.node, "[data-mce-object]");
                node && (name = node.getAttribute("data-mce-object"), o.node !== node ? o.name = "" : ("IMG" !== node.nodeName && (node = ed.dom.select("iframe,audio,video", node), 
                node = ed.dom.getAttrib(node, "src") || ed.dom.getAttrib(node, "data-mce-p-src") || "") && (node = isSupportedMedia(ed, node) || "") && (name = node[0].toUpperCase() + node.slice(1)), 
                o.name = name = "object" === name ? "media" : name));
            }), ed.onObjectResized.add(function(ed, elm, width, height) {
                isMediaNode(elm) && (ed.dom.hasClass(elm, "mce-object-preview") && (ed.dom.setStyles(elm, {
                    width: "",
                    height: ""
                }), elm = elm.firstChild), ed.dom.setAttrib(elm, "data-mce-width", width), 
                ed.dom.setAttrib(elm, "data-mce-height", height), ed.dom.removeAttrib(elm, "width"), 
                ed.dom.removeAttrib(elm, "height"), ed.dom.setStyles(elm, {
                    width: width,
                    height: height
                }));
            }), ed.dom.bind(ed.getDoc(), "keyup click", function(e) {
                var node = ed.selection.getNode();
                node.hasAttribute("data-mce-object") && (each(ed.dom.select(".mce-object-preview video, .mce-object-preview audio"), function(elm) {
                    elm.pause();
                }), node) && "IMG" === node.nodeName && "object" !== node.getAttribute("data-mce-object") && !isNonEditable(ed, node) && "click" === e.type && e.altKey && (e.target = function(editor, node) {
                    for (var name, placeholder = new Node("img", 1), attributes = (placeholder.shortEnded = !0, 
                    node.attributes), i = attributes.length; i--; ) name = attributes[i].nodeName, 
                    placeholder.attr(name, "" + node.getAttribute(name));
                    var elm = nodeToMedia(editor, placeholder), elm = createReplacementNode(editor, createPreviewNode(editor, elm));
                    return editor.dom.replace(elm, node), elm;
                }(ed, node));
            }), ed.onBeforeExecCommand.add(function(ed, cmd, ui, values, o) {
                var range;
                !cmd || "ApplyFormat" != cmd && "RemoveFormat" != cmd && "ToggleFormat" != cmd || (cmd = ed.selection.getNode(), 
                isMediaNode(cmd = tinymce.is(values, "object") && values.node ? values.node : cmd) && "IMG" !== cmd.nodeName && ((cmd = findMediaNode(cmd, cmd.getAttribute("data-mce-object"))) && ((range = ed.dom.createRng()).setStart(cmd, 0), 
                range.setEnd(cmd, 0), (ed = ed.selection.getSel()).removeAllRanges(), 
                ed.addRange(range)), cmd) && tinymce.is(values, "object") && (values.node = cmd));
            }), ed.onBeforeSetContent.add(function(ed, o) {
                settings.media_live_embed && (o.content = o.content.replace(/<br data-mce-caret="1"[^>]+>/gi, ""), 
                /^<(iframe|video|audio)([^>]+)><\/(iframe|video|audio)>$/.test(o.content)) && (o.content += '<br data-mce-caret="1" />');
            });
        }), ed.onKeyDown.add(function(ed, e) {
            var node = ed.selection.getNode();
            e.keyCode !== VK.BACKSPACE && e.keyCode !== VK.DELETE || node && isMediaNode(node = node === ed.getBody() ? e.target : node) && (isNonEditable(ed, node) ? e.preventDefault() : (node = ed.dom.getParent(node, "[data-mce-object]") || node, 
            ed.dom.remove(node), ed.nodeChanged()));
        }), ed.onCopy.add(setClipboardData), ed.onCut.add(setClipboardData), ed.onSetContent.add(function(ed, o) {
            updatePreviewSelection(ed);
        }), ed.onWfEditorSave.add(function(ed, o) {
            var body = DOM.create("div", {}, o.content);
            each(DOM.select("audio,video,object,iframe,embed", body), function(tag) {
                var name = tag.nodeName.toLowerCase();
                isValidElement(ed, name) || isNonEditable(ed, tag) || DOM.remove(tag);
            }), o.content = body.innerHTML;
        }), tinymce.util.MediaEmbed = {
            dataToHtml: function(name, data, innerHtml) {
                var html = "";
                return html = "iframe" !== name && "video" !== name && "audio" !== name ? html : "string" == typeof data ? data : ed.dom.createHTML(name, data, innerHtml);
            }
        }, ed.addCommand("insertMediaHtml", function(ui, value) {
            var data = {}, name = "iframe", innerHtml = "", value = ("string" == typeof value ? data = value : value.name && value.data && (name = value.name, 
            data = value.data, innerHtml = value.innerHtml || ""), tinymce.util.MediaEmbed.dataToHtml(name, data, innerHtml));
            ed.execCommand("mceInsertContent", !1, value, {
                skip_undo: 1
            }), updatePreviewSelection(ed), ed.undoManager.add();
        }), extend(this, {
            getMediaData: function() {
                return function(ed) {
                    var data = {}, node = ed.dom.getParent(ed.selection.getNode(), "[data-mce-object]"), boolAttrs = ed.schema.getBoolAttrs();
                    if (node && 1 == node.nodeType) {
                        if (-1 !== node.className.indexOf("mce-object-preview")) {
                            for (i = (attribs = node.attributes).length - 1; 0 <= i; i--) "contenteditable" != (name = attribs.item(i).name) && -1 == name.indexOf("data-mce-") && -1 == name.indexOf("aria-") && (data[name] = ed.dom.getAttrib(node, name));
                            node = ed.dom.select("audio,video,iframe", node)[0];
                        }
                        var i, attribs, mediatype = node.getAttribute("data-mce-object") || node.nodeName.toLowerCase(), html = ed.dom.getAttrib(node, "data-mce-html");
                        for ((data = html ? extend(data, htmlToData(ed, 0, html)) : data).src = ed.dom.getAttrib(node, "data-mce-p-src") || ed.dom.getAttrib(node, "data-mce-p-data") || ed.dom.getAttrib(node, "src"), 
                        data.src = ed.convertURL(data.src), data.src == transparentSrc && (data.src = ""), 
                        i = (attribs = node.attributes).length - 1; 0 <= i; i--) {
                            var value, name = attribs.item(i).name;
                            value = ed.dom.getAttrib(node, name), "data" !== (name = -1 !== name.indexOf("data-mce-p-") ? name.substr(11) : name) && "src" !== name && "type" !== name && "codebase" !== name && "classid" !== name && ("poster" === name && (value = ed.convertURL(value)), 
                            "flashvars" === name && (value = decodeURIComponent(value)), 
                            -1 === name.indexOf("data-mce-")) && ("class" == name && (value = value.replace(/mce-[\w\-]+/g, "").replace(/\s+/g, " ").trim()), 
                            boolAttrs[name] && (value = !0), data[name] = value);
                        }
                        each([ "width", "height" ], function(key) {
                            var val = ed.dom.getAttrib(node, key);
                            val ? data[key] = val : (val = ed.dom.getStyle(node, key)) && -1 === val.indexOf("%") && !isNaN(parseInt(val, 10)) && (data[key] = parseInt(val, 10));
                        }), data.mediatype = mediatype;
                    }
                    return data;
                }(ed);
            },
            getMediaProps: function(data, provider) {
                return getMediaProps(0, data, provider);
            },
            updateMedia: function(data) {
                return updateMedia(ed, data);
            },
            isMediaObject: isMediaObject,
            isSupportedMedia: function(url) {
                return isSupportedMedia(ed, url);
            },
            getMediaHtml: function(data) {
                return function(ed, value) {
                    var nodeName = "iframe", attribs = {}, innerHTML = "", src = stripQuery((value = "string" == typeof value ? {
                        src: value
                    } : value).src), boolAttrs = (/\.(mp4|m4v|ogg|webm|ogv)$/.test(src) ? nodeName = "video" : /\.(mp3|m4a|oga)$/.test(src) && (nodeName = "audio"), 
                    nodeName = value.mediatype || nodeName, ed.schema.getBoolAttrs());
                    return each(value, function(val, name) {
                        if ("" == val && !boolAttrs[name]) return !0;
                        value.innerHTML && (innerHTML = value.innerHTML), !ed.schema.isValid(nodeName, name) && -1 === name.indexOf("-") || ("class" == name && (val = val.replace(/mce-(\S+)/g, "").replace(/\s+/g, " ").trim()), 
                        attribs[name] = val);
                    }), "iframe" != nodeName || attribs.sandbox || (attribs.sandbox = ""), 
                    ed.dom.createHTML(nodeName, attribs, innerHTML);
                }(ed, data);
            },
            isMediaHtml: function(html) {
                return !!(html = html.trim().match(/^<([a-zA-Z0-9]+)\b/)) && isPreviewMedia(html[1].toLowerCase());
            },
            convertMediaToPlaceholder: function(node) {
                return convertMediaToPlaceholder(ed, node);
            }
        });
    });
}();tinymce/plugins/media/tests/media.html000060400000021052152456167170014075 0ustar00<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">

<head>
	<title>Unit tests for the Media plugin</title>
	<meta http-equiv="X-UA-Compatible" content="IE=edge" />
	<link rel="stylesheet" href="http://code.jquery.com/qunit/qunit-1.14.0.css" type="text/css" />
	<script src="http://code.jquery.com/qunit/qunit-1.14.0.js"></script>
	<script src="../../../../../../../../tinymce-muon-retina/tests/qunit/connector.js"></script>
	<script type="text/javascript" src="../../../../../../../../tinymce-muon-retina/tests/qunit/runner.js"></script>
	<script type="text/javascript" src="../../../../../../../../tinymce-muon-retina/tests/js/utils.js"></script>
	<script type="text/javascript" src="../../../tinymce.js"></script>
	<script type="text/javascript" src="../plugin.js"></script>
</head>

<body>
	<script type="text/javascript">
		var editor;

		QUnit.config.reorder = false;
		QUnit.config.autostart = false;

		module("Media plugin", {
			autostart: false
		});

		function getEditorContent() {
			return editor.getContent().replace(/[\r\n]+/g, '');
		}

		function trimContent(value) {
			return value.trim();
		}

		function findContainer(selector) {
			var container;
			if (tinymce.is(selector, 'string')) {
				container = editor.dom.select(selector)[0];
			} else {
				container = selector;
			}
			if (container.firstChild) {
				container = container.firstChild;
			}
			return container;
		}

		var evt = function (data) {
			return tinymce.extend(data, { isDefaultPrevented: function () { return false; }, preventDefault: function () { } });
		};

		function setSelection(startSelector, startOffset, endSelector, endOffset) {
			if (!endSelector) {
				endSelector = startSelector;
				endOffset = startOffset;
			}
			var startContainer = findContainer(startSelector);
			var endContainer = findContainer(endSelector);
			var rng = editor.dom.createRng();

			function setRange(container, offset, start) {
				offset = offset || 0;

				if (offset === 'after') {
					if (start) {
						rng.setStartAfter(container);
					} else {
						rng.setEndAfter(container);
					}
					return;
				} else if (offset === 'afterNextCharacter') {
					container = container.nextSibling;
					offset = 1;
				}
				if (start) {
					rng.setStart(container, offset);
				} else {
					rng.setEnd(container, offset);
				}
			}

			setRange(startContainer, startOffset, true);
			setRange(endContainer, endOffset, false);
			editor.selection.setRng(rng);
		}

		test("Object retain as is", function () {
			editor.setContent(
				'<object classid="clsid:d27cdb6e-ae6d-11cf-96b8-444553540000" width="425" height="355">' +
				'<param name="movie" value="someurl">' +
				'<param name="wmode" value="transparent">' +
				'<embed src="someurl" type="application/x-shockwave-flash" wmode="transparent" width="425" height="355" />' +
				'</object>'
			);

			equal(getEditorContent(),
				'<p><object width="425" height="355" classid="clsid:d27cdb6e-ae6d-11cf-96b8-444553540000"><param name="movie" value="someurl"/><param name="wmode" value="transparent"/><embed src="someurl" type="application/x-shockwave-flash" width="425" height="355"></embed></p></object></p>'
			);
		});

		test("Embed retain as is", function () {
			editor.setContent(
				'<embed src="320x240.ogg" width="100" height="200">text<a href="#">link</a></embed>'
			);

			equal(
				getEditorContent(),
				'<p><embed src="320x240.ogg" width="100" height="200"></embed>text<a href="#">link</a></p>'
			);
		});

		test("Video retain as is", function () {
			editor.setContent(
				'<video src="320x240.ogg" autoplay loop controls>text<a href="#">link</a></video>'
			);

			equal(
				getEditorContent(),
				'<p><video src="320x240.ogg" autoplay="autoplay" loop="loop" controls="controls">text<a href="#">link</a></video></p>'
			);
		});

		test("Iframe retain as is", function () {
			editor.setContent(
				'<iframe src="320x240.ogg" allowfullscreen>text<a href="#">link</a></iframe>'
			);

			equal(getEditorContent(),
				'<p><iframe src="320x240.ogg" allowfullscreen="allowfullscreen">text<a href="#">link</a></iframe></p>'
			);
		});

		test("Audio retain as is", function () {
			editor.setContent(
				'<audio src="sound.mp3">' +
				'<track kind="captions" src="foo.en.vtt" srclang="en" label="English">' +
				'<track kind="captions" src="foo.sv.vtt" srclang="sv" label="Svenska">' +
				'text<a href="#">link</a>' +
				'</audio>'
			);

			equal(getEditorContent(),
				'<p>' +
				'<audio src="sound.mp3">' +
				'<track kind="captions" src="foo.en.vtt" srclang="en" label="English" />' +
				'<track kind="captions" src="foo.sv.vtt" srclang="sv" label="Svenska" />' +
				'text<a href="#">link</a>' +
				'</audio>' +
				'</p>'
			);
		});

		test("XSS content", function () {
			function testXss(input, expectedOutput) {
				editor.setContent(input);
				equal(getEditorContent(), expectedOutput);
			}

			testXss('<video><a href="javascript:alert(1);">a</a></video>', '<p><video><a>a</a></video></p>');
			testXss('<video><img src="x" onload="alert(1)"></video>', '<p><video><img src="x" alt="" /></video></p>');
			testXss('<video><img src="x"></video>', '<p><video><img src="x" alt="" /></video></p>');
			testXss('<video><!--[if IE]><img src="x" alt="" /><![endif]--></video>', '<p><video><!-- [if IE]><img src="x" alt="" /><![endif]--></video></p>');
			testXss('<p><p><audio><audio src=x onerror=alert(1)>', '<p><audio src="x"></audio></p>');
			testXss('<p><html><audio><br /><audio src=x onerror=alert(1)></p>', '');
			testXss('<p><audio><img src="javascript:alert(1)"></audio>', '<p><audio><img /></audio></p>');
			testXss('<p><audio><img src="x" style="behavior:url(x); width: 1px"></audio>', '<p><audio><img src="x" style="width: 1px;" /></audio></p>');
			testXss(
				'<p><video><noscript><svg onload="javascript:alert(1)"></svg></noscript></video>',
				'<p><video width="300" height="150"></video></p>'
			);
			testXss(
				'<p><video><script><svg onload="javascript:alert(1)"></svg></s' + 'cript></video>',
				'<p><video width="300" height="150"></video></p>'
			);
			testXss(
				'<p><audio><noscript><svg onload="javascript:alert(1)"></svg></noscript></audio>',
				'<p><audio></audio></p>'
			);
			testXss(
				'<p><audio><script><svg onload="javascript:alert(1)"></svg></s' + 'cript></audio>',
				'<p><audio></audio></p>'
			);
		});

		test("Generic iframe with an absolute URL should have a sandbox attribute", function () {
			editor.setContent('<iframe src="http://example.com"></iframe>');

			equal(getEditorContent(),
				'<p><iframe src="http://example.com" sandbox></iframe></p>',
				"Sandbox attribute should be added for generic iframes with absolute URLs"
			);
		});

		test("Iframe from a media provider (e.g., YouTube) should not have a sandbox", function () {
			editor.setContent('<iframe src="https://www.youtube.com/embed/1234"></iframe>');

			equal(getEditorContent(),
				'<p><iframe src="https://www.youtube.com/embed/videoID"></iframe></p>',
				"Sandbox attribute should not be added for iframes from media providers"
			);
		});

		test("Iframe with an existing sandbox should retain its sandbox attribute", function () {
			editor.setContent('<iframe src="http://example.com" sandbox="allow-scripts allow-same-origin"></iframe>');

			equal(getEditorContent(),
				'<p><iframe src="http://example.com" sandbox="allow-scripts allow-same-origin"></iframe></p>',
				"Existing sandbox attribute should be retained"
			);
		});

		test("Iframe with a relative URL should not have a sandbox", function () {			
			console.log(editor);
			
			editor.setContent('<iframe src="/relative/path"></iframe>');

			equal(getEditorContent(),
				'<p><iframe src="/relative/path"></iframe></p>',
				"Sandbox attribute should not be added for iframes with relative URLs"
			);
		});

		tinymce.init({
			mode: "exact",
			elements: "elm1",
			theme: "advanced",
			add_unload_trigger: false,
			language_load: false,
			plugins: 'textpattern',
			schema: 'mixed',
			compress: {
				'css': true,
				'javascript': true
			},
			init_instance_callback: function (ed) {
				editor = ed;
				QUnit.start();
			}
		});
	</script>

	<h1 id="qunit-header">Unit tests for the Paste plugin</h1>
	<h2 id="qunit-banner"></h2>
	<div id="qunit-testrunner-toolbar"></div>
	<h2 id="qunit-userAgent"></h2>
	<ol id="qunit-tests"></ol>

	<textarea id="elm1" name="elm1"></textarea>
	<div>
		<a href="javascript:alert(tinymce.EditorManager.get('elm1').getContent({format : 'raw'}));">[getRawContents]</a>
		<a href="javascript:alert(tinymce.EditorManager.get('elm1').getContent());">[getContents]</a>
	</div>
</body>

</html>tinymce/plugins/styleselect/plugin.js000060400000032031152456167170014102 0ustar00/* jce - 2.9.99.2 | 2026-04-22 | https://www.joomlacontenteditor.net | Source: https://github.com/widgetfactory/jce | Copyright (C) 2006 - 2026 Ryan Demmer. All rights reserved | GNU/GPL Version 2 or later - http://www.gnu.org/licenses/gpl-2.0.html */
!function() {
    var each = tinymce.each, PreviewCss = tinymce.util.PreviewCss, NodeType = tinymce.dom.NodeType, DOM = tinymce.DOM, Event = tinymce.dom.Event;
    function compileFilter(filter) {
        var filters;
        return Array.isArray(filter) ? (filters = filter.map(compileFilter), function(value) {
            return filters.every(function(filterFunc) {
                return filterFunc(value);
            });
        }) : "string" == typeof filter && filter ? function(value) {
            return -1 !== value.indexOf(filter);
        } : filter instanceof RegExp ? function(value) {
            return filter.test(value);
        } : filter;
    }
    tinymce.PluginManager.add("styleselect", function(ed, url) {
        this.createControl = function(n, cf) {
            return "styleselect" !== n ? null : !1 !== ed.getParam("styleselect_stylesheets") || ed.getParam("style_formats") || ed.getParam("styleselect_custom_classes") ? ((ctrl = ed.controlManager.createListBox("styleselect", {
                title: "advanced.style_select",
                max_height: 384,
                filter: !0,
                keepopen: !0,
                menu_class: "mceStylesListMenu",
                onselect: function(name) {
                    function isRoot(node) {
                        return node === ed.dom.getRoot();
                    }
                    var fmt, removedFormat, matches = [], selection = ed.selection, node = selection.getNode(), collectNodesInRange = function(rng, predicate) {
                        if (rng.collapsed) return [];
                        for (var rng = rng.cloneContents(), walker = new tinymce.dom.TreeWalker(rng.firstChild, rng), elements = [], current = rng.firstChild; predicate(current) && elements.push(current), 
                        current = walker.next(); );
                        return elements;
                    }, inlineTextElements = ed.schema.getTextInlineElements(), isElement = function(elm) {
                        return NodeType.isElement(elm) && !NodeType.isInternal(elm) && !inlineTextElements[elm.nodeName.toLowerCase()];
                    }, nodes = (ed.focus(), ed.undoManager.add(), [ node ]), isCollapsed = selection.isCollapsed();
                    if (isRoot(node)) {
                        if (isCollapsed) return !1;
                        node = selection.getSelectedBlocks();
                        node.length && (nodes = node);
                    }
                    return each(nodes, function(node) {
                        var sel, bookmark = selection.getBookmark();
                        each(ctrl.items, function(item) {
                            (fmt = ed.formatter.matchNode(node, item.value)) && matches.push(fmt);
                        }), isCollapsed || 0 !== collectNodesInRange(ed.selection.getRng(), isElement).length || (node = null), 
                        isRoot(node) && (node = null), selection.moveToBookmark(bookmark), 
                        !node && isCollapsed && (sel = selection.getSel()).anchorNode && NodeType.isElement(sel.anchorNode) && !ed.dom.isBlock(sel.anchorNode) && !isRoot(sel.anchorNode) && (node = sel.anchorNode), 
                        each(matches, function(match) {
                            name && match.name != name || (ed.execCommand("RemoveFormat", !1, {
                                name: match.name,
                                node: match.block ? null : node
                            }), removedFormat = !0);
                        }), removedFormat || (ed.formatter.get(name) ? ed.execCommand("ToggleFormat", !1, {
                            name: name,
                            node: node
                        }) : (node = selection.getNode(), ed.execCommand("ToggleFormat", !1, {
                            name: "classname",
                            node: node
                        }), ctrl.add(name, name))), selection.moveToBookmark(bookmark), 
                        selection.isCollapsed() && node && node.parentNode && ((sel = ed.dom.createRng()).setStart(node, 0), 
                        sel.setEnd(node, 0), sel.collapse(), ed.selection.setRng(sel), 
                        ed.nodeChanged());
                    }), !1;
                }
            })).onBeforeRenderMenu.add(function(ctrl, menu) {
                loadClasses(), menu.onShowMenu.add(function() {
                    removeFilterTags(), each(ctrl.items, function(item) {
                        item.selected && addFilterTag(item);
                    });
                });
            }), ctrl.onRenderMenu.add(function(ctrl, menu) {
                menu.onFilterInput.add(function(menu, evt) {
                    var elm, tags, val;
                    8 != evt.keyCode || (elm = evt.target).value || (tags = DOM.select("button", elm.parentNode.parentNode)).length && (val = (tags = tags.pop()).textContent, 
                    removeFilterTag(tags), evt.preventDefault(), elm.value = val, 
                    elm.focus());
                });
            }), !1 === ed.settings.styleselect_stylesheets && (ctrl.hasClasses = !0), 
            counter = 0, ed.onNodeChange.add(function(ed, cm, node) {
                var matches, cm = cm.get("styleselect");
                cm && (loadClasses(), matches = [], removeFilterTags(), each(cm.items, function(item) {
                    ed.formatter.matchNode(node, item.value) && (matches.push(item.value), 
                    addFilterTag(item));
                }), cm.select(matches));
            }), ed.onPreInit.add(function() {
                var formats = ed.getParam("style_formats"), styles = ed.getParam("styleselect_custom_classes", "", "hash"), preview_styles = ed.getParam("styleselect_preview_styles", !0);
                if (ed.formatter.register("classname", {
                    attributes: {
                        class: "%value"
                    },
                    selector: "*",
                    ceFalseOverride: !0
                }), formats) {
                    if ("string" == typeof formats) try {
                        formats = JSON.parse(formats);
                    } catch (e) {
                        formats = [];
                    }
                    each(formats, function(fmt) {
                        var frag, name, keys = 0;
                        each(fmt, function() {
                            keys++;
                        }), 1 < keys ? (name = fmt.name = fmt.name || "style_format_" + counter++, 
                        tinymce.is(fmt.attributes, "string") && (fmt.attributes = ed.dom.decode(fmt.attributes), 
                        frag = ed.dom.createFragment("<div " + tinymce.trim(fmt.attributes) + "></div>"), 
                        frag = ed.dom.getAttribs(frag.firstChild), fmt.attributes = {}, 
                        each(frag, function(node) {
                            var name, isvalid, invalid, key = node.name, node = "" + node.value;
                            if (name = key, isvalid = !0, (invalid = ed.settings.invalid_attributes) && (each(invalid.split(","), function(val) {
                                name === val && (isvalid = !1);
                            }), !isvalid)) return !0;
                            "onclick" !== key && "ondblclick" !== key || (fmt.attributes[key] = "return false;", 
                            key = "data-mce-" + key), fmt.attributes[key] = ed.dom.decode(node);
                        })), tinymce.is(fmt.styles, "string") && (fmt.styles = ed.dom.parseStyle(fmt.styles), 
                        each(fmt.styles, function(value, key) {
                            fmt.styles[key] = ed.dom.decode(value = "" + value);
                        })), tinymce.is(fmt.ceFalseOverride) || (fmt.ceFalseOverride = !0), 
                        ed.formatter.register(name, fmt), ctrl.add(fmt.title, name, {
                            style: function() {
                                return preview_styles ? PreviewCss.getCssText(ed, fmt, !0) : "";
                            }
                        })) : ctrl.add(fmt.title);
                    });
                }
                styles && each(styles, function(val, key) {
                    var name, fmt, element;
                    val && (val = 1 < (val = (val = (val = val).replace(/^\./, "")).split(".")).length ? (element = val[0] || "*", 
                    val.slice(1).join(".")) : (element = "*", val[0]), name = "style_custom_" + counter++, 
                    fmt = {
                        classes: (val = {
                            element: element,
                            className: val
                        }).className,
                        selector: val.element,
                        ceFalseOverride: !0
                    }, "*" == val.element && (fmt.inline = "span"), ed.formatter.register(name, fmt), 
                    key = key && key.replace(/^\./, ""), ctrl.add(ed.translate(key), name, {
                        style: function() {
                            return preview_styles ? PreviewCss.getCssText(ed, fmt, !0) : "";
                        }
                    }));
                });
            }), ctrl) : void 0;
            function removeFilterTags() {
                var filter = DOM.get("menu_" + ctrl.id + "_menu_filter");
                filter && DOM.remove(DOM.select("button.mceButton", filter));
            }
            function removeFilterTag(tag, item) {
                DOM.remove(tag), item || each(ctrl.items, function(n) {
                    if (n.value == tag.value) return item = n, !1;
                }), item && item.onAction && item.onAction();
            }
            function addFilterTag(item) {
                var filter, btn;
                ctrl.menu && (filter = DOM.get("menu_" + ctrl.id + "_menu_filter"), 
                btn = DOM.create("button", {
                    class: "mceButton",
                    value: item.value
                }, "<label>" + item.title + "</label>"), filter) && (DOM.insertBefore(btn, filter.lastChild), 
                Event.add(btn, "click", function(evt) {
                    evt.preventDefault(), "LABEL" !== evt.target.nodeName && removeFilterTag(btn, item);
                }));
            }
            function loadClasses() {
                var preview_styles;
                ed.settings.importcss_classes || ed.onImportCSS.dispatch(), Array.isArray(ed.settings.importcss_classes) && !ctrl.hasClasses && (preview_styles = ed.getParam("styleselect_preview_styles", !0), 
                each(ed.settings.importcss_classes, function(item, idx) {
                    var idx = "style_import_" + (counter + idx), fmt = function(selectorText) {
                        var format;
                        if (selectorText) {
                            if (ed.settings.styleselect_selector_filter) if (compileFilter(ed.settings.styleselect_selector_filter)(selectorText)) return;
                            var selector = /^(?:([a-z0-9\-_]+))?(\.[a-z0-9_\-\.]+)$/i.exec(selectorText);
                            if (selector) {
                                var classes, inlineSelectorElements, elementName = selector[1];
                                if ("body" !== elementName) return classes = selector[2].substr(1).split(".").join(" "), 
                                inlineSelectorElements = tinymce.makeMap("a,img"), 
                                elementName ? (format = {
                                    title: selectorText
                                }, ed.schema.getTextBlockElements()[elementName] ? format.block = elementName : ed.schema.getBlockElements()[elementName] || inlineSelectorElements[elementName.toLowerCase()] ? format.selector = elementName : format.inline = elementName) : selector[2] && (format = {
                                    inline: "span",
                                    selector: "*",
                                    title: selectorText.substr(1),
                                    split: !1,
                                    expand: !1,
                                    deep: !0
                                }), !1 !== ed.settings.importcss_merge_classes ? format.classes = classes : format.attributes = {
                                    class: classes
                                }, format.ceFalseOverride = !0, format;
                            }
                        }
                    }((item = "string" == typeof item ? {
                        selector: item,
                        class: "",
                        style: ""
                    } : item).selector);
                    fmt && (ed.formatter.register(idx, fmt), ctrl.add(fmt.title, idx, {
                        style: function() {
                            return preview_styles && item.style || "";
                        }
                    }));
                }), Array.isArray(ed.settings.importcss_classes)) && (ctrl.hasClasses = !0);
            }
            var ctrl, counter;
        };
    });
}();tinymce/plugins/article/plugin.js000060400000022444152456167170013174 0ustar00/* jce - 2.9.99.2 | 2026-04-22 | https://www.joomlacontenteditor.net | Source: https://github.com/widgetfactory/jce | Copyright (C) 2006 - 2026 Ryan Demmer. All rights reserved | GNU/GPL Version 2 or later - http://www.gnu.org/licenses/gpl-2.0.html */
!function() {
    var DOM = tinymce.DOM, each = tinymce.each, VK = tinymce.VK, BACKSPACE = VK.BACKSPACE, DELETE = VK.DELETE;
    tinymce.PluginManager.add("article", function(ed, url) {
        function isReadMore(n) {
            return ed.dom.is(n, "hr.mce-item-readmore");
        }
        function isPageBreak(n) {
            return ed.dom.is(n, "hr.mce-item-pagebreak");
        }
        function _cancelResize() {
            each(ed.dom.select("hr.mce-item-pagebreak, hr.mce-item-readmore"), function(n) {
                n.onresizestart = function() {
                    return !1;
                }, n.onbeforeeditfocus = function() {
                    return !1;
                };
            });
        }
        function insertBreak(s, args) {
            var h, dom = ed.dom, n = ed.selection.getNode(), blocks = "H1,H2,H3,H4,H5,H6,P,DIV,ADDRESS,PRE,FORM,TABLE,OL,UL,CAPTION,BLOCKQUOTE,CENTER,DL,DIR,FIELDSET,NOSCRIPT,NOFRAMES,MENU,ISINDEX,SAMP,SECTION,ARTICLE,HGROUP,ASIDE,FIGURE", n = dom.getParent(n, blocks, "BODY") || n, marker = (tinymce.extend(args, {
                class: "pagebreak" == s ? "mce-item-pagebreak" : "mce-item-readmore",
                "data-alt": args.alt || null
            }), args.alt = null, "readmore" == s && (args.id = "system-readmore"), 
            ed.execCommand("mceInsertContent", !1, '<span id="mce_hr_marker" data-mce-type="bookmark">\ufeff</span>', {
                skip_undo: 1
            }), dom.get("mce_hr_marker")), args = dom.create("hr", args);
            if (dom.isBlock(n)) {
                var ns, p = dom.getParent(marker, blocks, "BODY");
                if ("P" == p.nodeName || "DIV" == p.nodeName) -1 !== p.className.indexOf("wf-column") ? (blocks = dom.getParent(n, ".wf-columns"), 
                dom.insertAfter(marker, blocks)) : (dom.split(p, marker), (ns = marker.nextSibling) && ns.nodeName == p.nodeName && /^(\s|&nbsp;|\u00a00)*?$/.test(h) && dom.remove(ns)); else for (p ? "BODY" == p.parentNode.nodeName ? dom.insertAfter(marker, p) : p.parentNode.insertBefore(marker, p) : "BODY" == n.parentNode.nodeName ? dom.insertAfter(marker, n) : n.parentNode.insertBefore(marker, n), 
                p = marker.parentNode; /^(H[1-6]|ADDRESS|PRE|FORM|TABLE|OL|UL|CAPTION|BLOCKQUOTE|CENTER|DL|DIR|FIELDSET|NOSCRIPT|NOFRAMES|MENU|ISINDEX|SAMP)$/.test(p.nodeName); ) p.parentNode.insertBefore(marker, p), 
                p = marker.parentNode;
                (ns = marker.nextSibling) || (blocks = ed.getParam("forced_root_block") || "br", 
                ns = ed.dom.create(blocks), "br" != blocks && (ns.innerHTML = "\xa0"), 
                ed.dom.insertAfter(ns, marker), s = ed.selection.select(ns), ed.selection.collapse(1));
            }
            ed.dom.replace(args, marker), ed.undoManager.add();
        }
        ed.addCommand("mceReadMore", function() {
            if (ed.dom.get("system-readmore")) return alert(ed.getLang("article.readmore_alert", "There is already a Read More break inserted in this article. Only one such break is permitted. Use a Pagebreak to split the page up further.")), 
            !1;
            insertBreak("readmore", {
                id: "system-readmore"
            });
        }), ed.addCommand("mcePageBreak", function(ui, v) {
            var n = ed.selection.getNode();
            isPageBreak(n) ? function(n, v) {
                tinymce.extend(v, {
                    "data-alt": v.alt || ""
                }), v.alt = null, ed.dom.setAttribs(n, v);
            }(n, v) : insertBreak("pagebreak", v);
        }), ed.getParam("article_show_readmore", !0) && ed.addButton("readmore", {
            title: "article.readmore",
            cmd: "mceReadMore"
        }), ed.onInit.add(function() {
            ed.theme && ed.theme.onResolveName && ed.theme.onResolveName.add(function(theme, o) {
                var v, n = o.node;
                n && "HR" === n.nodeName && /mce-item-pagebreak/.test(n.className) && (v = "pagebreak"), 
                (v = n && "HR" === n.nodeName && /mce-item-readmore/.test(n.className) ? "readmore" : v) && (o.name = v);
            });
        }), ed.onNodeChange.add(function(ed, cm, n) {
            cm.setActive("readmore", isReadMore(n)), cm.setActive("pagebreak", isPageBreak(n)), 
            ed.dom.removeClass(ed.dom.select("hr.mce-item-pagebreak.mce-item-selected, hr.mce-item-readmore.mce-item-selected"), "mce-item-selected"), 
            (isPageBreak(n) || isReadMore(n)) && ed.dom.addClass(n, "mce-item-selected");
        }), ed.onBeforeSetContent.add(function(ed, o) {
            o.content = o.content.replace(/<hr(.*?) alt="([^"]+)"([^>]*?)>/gi, '<hr$1 data-alt="$2"$3>');
        }), ed.onPostProcess.add(function(ed, o) {
            o.get && (o.content = o.content.replace(/<hr(.*?)data-alt="([^"]+)"([^>]*?)>/gi, '<hr$1alt="$2"$3>'));
        }), ed.onSetContent.add(function() {
            tinymce.isIE && _cancelResize();
        }), ed.onGetContent.add(function() {
            tinymce.isIE && _cancelResize();
        }), ed.onKeyDown.add(function(ed, e) {
            var n;
            e.keyCode != BACKSPACE && e.keyCode != DELETE || (n = ed.selection.getNode(), 
            ed.dom.is(n, "hr.mce-item-pagebreak, hr.mce-item-readmore") && (ed.dom.remove(n), 
            e.preventDefault()));
        }), ed.onPreInit.add(function() {
            ed.onBeforeSetContent.addToTop(function(ed, o) {
                o.content = o.content.replace(/<hr([^>]*)\salt="([^"]+)"([^>]*)>/gi, '<hr$1 data-alt="$2"$3>');
            }), ed.parser.addNodeFilter("hr", function(nodes) {
                for (var i = 0; i < nodes.length; i++) {
                    var node = nodes[i], id = node.attr("id") || "", cls = node.attr("class") || "";
                    ("system-readmore" == id || /(mce-item|system)-pagebreak/.test(cls)) && (cls = /(mce-item|system)-pagebreak/.test(cls) ? "mce-item-pagebreak" : "mce-item-readmore", 
                    node.attr("class", cls), node.attr("alt")) && (node.attr("data-alt", node.attr("alt")), 
                    node.attr("alt", null));
                }
            }), ed.serializer.addNodeFilter("hr", function(nodes, name, args) {
                for (var i = 0; i < nodes.length; i++) {
                    var node = nodes[i], cls = node.attr("class") || "";
                    /mce-item-(pagebreak|readmore)/.test(cls) && (/mce-item-pagebreak/.test(node.attr("class")) ? node.attr("class", "system-pagebreak") : (node.attr("class", null), 
                    node.attr("id", "system-readmore")), node.attr("data-alt")) && (node.attr("alt", node.attr("data-alt")), 
                    node.attr("data-alt", null));
                }
            });
        }), ed.getParam("article_show_pagebreak", !0) && ed.addButton("pagebreak", {
            title: "article.pagebreak",
            onclick: function() {
                var html = '<div class="mceFormRow">   <label for="' + ed.id + 'article_title">' + ed.getLang("article.title", "Title") + '</label>   <div class="mceFormControl">       <input type="text" id="' + ed.id + '_article_title" autofocus />   </div></div><div class="mceFormRow">   <label for="' + ed.id + '_article_alt">' + ed.getLang("article.alias", "Alias") + '</label>   <div class="mceFormControl">       <input type="text" id="' + ed.id + '_article_alt" />   </div></div>';
                ed.windowManager.open({
                    title: ed.getLang("article.pagebreak", "PageBreak"),
                    content: html,
                    size: "mce-modal-landscape-small",
                    open: function() {
                        var label = ed.getLang("insert", "Insert"), title = DOM.get(ed.id + "_article_title"), alt = DOM.get(ed.id + "_article_alt"), o = function() {
                            var o, n = ed.selection.getNode();
                            ed.dom.is(n, "hr.mce-item-pagebreak") && (o = {
                                title: ed.dom.getAttrib(n, "title", ""),
                                alt: ed.dom.getAttrib(n, "data-alt", "")
                            });
                            return o;
                        }();
                        o && (label = ed.getLang("update", "Update"), title.value = o.title || "", 
                        alt.value = o.alt || ""), DOM.setHTML(this.id + "_insert", label), 
                        window.setTimeout(function() {
                            title.focus();
                        }, 10);
                    },
                    buttons: [ {
                        title: ed.getLang("cancel", "Cancel"),
                        id: "cancel"
                    }, {
                        title: ed.getLang("insert", "Insert"),
                        id: "insert",
                        onsubmit: function(e) {
                            var title = DOM.getValue(ed.id + "_article_title"), alt = DOM.getValue(ed.id + "_article_alt");
                            ed.execCommand("mcePageBreak", !1, {
                                title: title,
                                alt: alt
                            });
                        },
                        classes: "primary"
                    } ]
                });
            }
        });
    });
}();tinymce/plugins/tabfocus/plugin.js000060400000004227152456167170013356 0ustar00/* jce - 2.9.99.2 | 2026-04-22 | https://www.joomlacontenteditor.net | Source: https://github.com/widgetfactory/jce | Copyright (C) 2006 - 2026 Ryan Demmer. All rights reserved | GNU/GPL Version 2 or later - http://www.gnu.org/licenses/gpl-2.0.html */
!function() {
    var DOM = tinymce.DOM, each = tinymce.each, explode = tinymce.explode;
    tinymce.PluginManager.add("tabfocus", function(ed, url) {
        function tabCancel(e) {
            9 !== e.keyCode || e.ctrlKey || e.altKey || e.metaKey || e.preventDefault();
        }
        function tabHandler(e) {
            var x, el, i, v;
            function find(direction) {
                function canSelect(el) {
                    return /INPUT|TEXTAREA|BUTTON/.test(el.tagName) && tinymce.get(e.id) && -1 != el.tabIndex && function canSelectRecursive(e) {
                        return "BODY" === e.nodeName || "hidden" != e.type && "none" != e.style.display && "hidden" != e.style.visibility && canSelectRecursive(e.parentNode);
                    }(el);
                }
                if (el = DOM.select(":input:enabled,*[tabindex]:not(iframe)"), each(el, function(e, i) {
                    if (e.id == ed.id) return x = i, !1;
                }), 0 < direction) {
                    for (i = x + 1; i < el.length; i++) if (canSelect(el[i])) return el[i];
                } else for (i = x - 1; 0 <= i; i--) if (canSelect(el[i])) return el[i];
                return null;
            }
            9 !== e.keyCode || e.ctrlKey || e.altKey || e.metaKey || e.isDefaultPrevented() || (1 == (v = explode(ed.getParam("tab_focus", ed.getParam("tabfocus_elements", ":prev,:next")))).length && (v[1] = v[0], 
            v[0] = ":prev"), (el = e.shiftKey ? ":prev" == v[0] ? find(-1) : DOM.get(v[0]) : ":next" == v[1] ? find(1) : DOM.get(v[1])) && (v = tinymce.get(el.id || el.name), 
            el.id && v ? v.focus() : setTimeout(function() {
                tinymce.isWebkit || window.focus(), el.focus();
            }, 10), e.preventDefault()));
        }
        ed.onKeyUp.add(tabCancel), tinymce.isGecko ? (ed.onKeyPress.add(tabHandler), 
        ed.onKeyDown.add(tabCancel)) : ed.onKeyDown.add(tabHandler);
    });
}();tinymce/plugins/fontcolor/plugin.js000060400000007335152456167170013560 0ustar00/* jce - 2.9.99.2 | 2026-04-22 | https://www.joomlacontenteditor.net | Source: https://github.com/widgetfactory/jce | Copyright (C) 2006 - 2026 Ryan Demmer. All rights reserved | GNU/GPL Version 2 or later - http://www.gnu.org/licenses/gpl-2.0.html */
!function() {
    var each = tinymce.each, colors = "000000,993300,333300,003300,003366,000080,333399,333333,800000,FF6600,808000,008000,008080,0000FF,666699,808080,FF0000,FF9900,99CC00,339966,33CCCC,3366FF,800080,999999,FF00FF,FFCC00,FFFF00,00FF00,00FFFF,00CCFF,993366,FFFFFF,FF99CC,FFCC99,FFFF99,CCFFCC,CCFFFF,99CCFF,CC99FF";
    tinymce.PluginManager.add("fontcolor", function(ed, url) {
        ed.onNodeChange.add(function(ed, cm, n, collapsed, o) {
            var c, fc, bc;
            function updateColor(controlId, color) {
                (c = cm.get(controlId)) && (color = color || c.settings.default_color) !== c.value && c.displayColor(color);
            }
            each(o.parents, function(n) {
                if (n.style && (n.style.color && (updateColor("forecolor", n.style.color), 
                fc = !0), n.style.backgroundColor && (updateColor("backcolor", n.style.backgroundColor), 
                bc = !0), fc) && bc) return !1;
            });
        }), this.createControl = function(n) {
            return "forecolor" === n ? function() {
                var c, v, s = ed.settings, o = {
                    more_colors_func: function() {
                        ed.execCommand("mceColorPicker", !1, {
                            color: c.value,
                            func: function(co) {
                                c.setColor(co);
                            }
                        });
                    }
                };
                (v = s.fontcolor_foreground_colors || "") && (o.colors = v.replace("$default", colors));
                o.default_color = s.fontcolor_foreground_color || "#000000", o.title = "advanced.forecolor_desc";
                function applyColor(color) {
                    if (!color) return ed.formatter.remove("forecolor");
                    ed.formatter.apply("forecolor", {
                        value: color
                    }), ed.undoManager.add(), ed.nodeChanged();
                }
                return o.onselect = function(val) {
                    applyColor(val);
                }, o.onclick = function(e, val) {
                    applyColor(val);
                }, o.scope = this, c = ed.controlManager.createColorSplitButton("forecolor", o);
            }() : "backcolor" === n ? function() {
                var c, v, s = ed.settings, o = {
                    more_colors_func: function() {
                        ed.execCommand("mceColorPicker", !1, {
                            color: c.value,
                            func: function(co) {
                                c.setColor(co);
                            }
                        });
                    }
                };
                (v = s.fontcolor_background_colors || "") && (o.colors = v.replace("$default", colors));
                o.default_color = s.fontcolor_background_color || "#FFFF00", o.title = "advanced.backcolor_desc";
                function applyColor(color) {
                    if (!color) return ed.formatter.remove("hilitecolor");
                    ed.formatter.apply("hilitecolor", {
                        value: color
                    }), ed.undoManager.add(), ed.nodeChanged();
                }
                return o.onselect = function(val) {
                    applyColor(val);
                }, o.onclick = function(e, val) {
                    applyColor(val);
                }, o.scope = this, c = ed.controlManager.createColorSplitButton("backcolor", o);
            }() : void 0;
        };
    });
}();tinymce/plugins/fullscreen/plugin.js000060400000006237152456167170013715 0ustar00/* jce - 2.9.99.2 | 2026-04-22 | https://www.joomlacontenteditor.net | Source: https://github.com/widgetfactory/jce | Copyright (C) 2006 - 2026 Ryan Demmer. All rights reserved | GNU/GPL Version 2 or later - http://www.gnu.org/licenses/gpl-2.0.html */
!function() {
    var DOM = tinymce.DOM, Event = tinymce.dom.Event;
    tinymce.PluginManager.add("fullscreen", function(ed, url) {
        var width, height, bookmark, resize, overflow, de = DOM.doc.documentElement, element = (ed.onFullScreen = new tinymce.util.Dispatcher(), 
        ed.onFullScreenResize = new tinymce.util.Dispatcher(), ed.getElement()), container = element.parentNode;
        ed.addCommand("mceFullScreen", function() {
            var iframe = DOM.get(ed.id + "_ifr"), s = ed.settings;
            try {
                bookmark = ed.selection.getBookmark();
            } catch (e) {}
            var ih, h, ca, p, vp = DOM.getViewPort(), header = DOM.getPrev(element, ".wf-editor-header");
            ed.getParam("fullscreen_enabled") ? (DOM.removeClass(container, "mce-fullscreen"), 
            DOM.setStyle(container, "max-width", width + "px"), DOM.setStyle(iframe, "height", height), 
            de.style.overflow = overflow, bookmark && ed.selection.moveToBookmark(bookmark), 
            DOM.setStyle(element, "height", height), s.fullscreen_enabled = !1, 
            resize && Event.remove(DOM.win, "resize", resize)) : (width = container.clientWidth, 
            height = parseInt(iframe.style.height, 10), overflow = de.style.overflow, 
            DOM.setStyle(container, "max-width", "100%"), DOM.setStyle(iframe, "max-width", "100%"), 
            DOM.win.scrollTo(0, 0), ih = ed.settings.interface_height || (h = 0, 
            ca = ed.getContentAreaContainer(), p = ca.parentNode, tinymce.each(p.childNodes, function(n) {
                n !== ca && (h += n.offsetHeight);
            }), h), ed.isHidden() || (ed.settings.container_height = ed.getContainer().offsetHeight, 
            sessionStorage.setItem("wf-editor-container-height", ed.settings.container_height)), 
            DOM.addClass(container, "mce-fullscreen"), window.setTimeout(function() {
                DOM.setStyle(iframe, "height", vp.h - ih - header.offsetHeight), 
                DOM.setStyle(element, "height", vp.h - header.offsetHeight - 10), 
                DOM.setStyle(element, "width", "100%");
            }, 0), bookmark && ed.selection.moveToBookmark(bookmark), resize = Event.add(DOM.win, "resize", function() {
                vp = DOM.getViewPort(), DOM.setStyles(iframe, {
                    height: vp.h - ih,
                    "max-width": vp.w + "px"
                }), ed.onFullScreenResize.dispatch(ed, vp);
            }), de.style.overflow = "hidden", vp.h < 640 && (de.style.overflow = "scroll"), 
            s.fullscreen_enabled = !0), ed.onFullScreen.dispatch(ed, s.fullscreen_enabled);
        }), ed.addButton("fullscreen", {
            title: "fullscreen.desc",
            cmd: "mceFullScreen"
        }), ed.addShortcut("meta+shift+f", "fullscreen.desc", "mceFullScreen"), 
        ed.onNodeChange.add(function(ed, cm) {
            cm.setActive("fullscreen", ed.getParam("fullscreen_enabled"));
        });
    });
}();tinymce/plugins/autosave/plugin.js000060400000010553152456167170013376 0ustar00/* jce - 2.9.99.2 | 2026-04-22 | https://www.joomlacontenteditor.net | Source: https://github.com/widgetfactory/jce | Copyright (C) 2006 - 2026 Ryan Demmer. All rights reserved | GNU/GPL Version 2 or later - http://www.gnu.org/licenses/gpl-2.0.html */
!function(tinymce) {
    var Dispatcher = tinymce.util.Dispatcher, Storage = window.localStorage;
    Storage && (tinymce.onBeforeUnload.add(function(tinymce, e) {
        var msg;
        tinymce.each(tinymce.editors, function(editor) {
            editor.plugins.autosave && editor.plugins.autosave.storeDraft(), !msg && editor.isDirty() && editor.getParam("autosave_ask_before_unload") && (msg = editor.translate("You have unsaved changes are you sure you want to navigate away?"), 
            "undefined" != typeof Joomla) && Joomla.loadingLayer && Joomla.loadingLayer("hide");
        }), msg && (e.preventDefault(), e.returnValue = msg);
    }), tinymce.PluginManager.add("autosave", function(ed) {
        var prefix, started, self = this, settings = ed.settings;
        function parseTime(time, defaultTime) {
            return ((time = /^(\d+)([ms]?)$/.exec("" + (time || defaultTime)))[2] ? {
                s: 1e3,
                m: 6e4
            }[time[2]] : 1) * parseInt(time, 10);
        }
        function hasDraft() {
            var time = parseInt(Storage.getItem(prefix + "time"), 10) || 0;
            if (!(new Date().getTime() - time > settings.autosave_retention)) return 1;
            removeDraft(!1);
        }
        function removeDraft(fire) {
            var content = Storage.getItem(prefix + "draft");
            Storage.removeItem(prefix + "draft"), Storage.removeItem(prefix + "time"), 
            !1 !== fire && content && self.onRemoveDraft.dispatch(self, {
                content: content
            });
        }
        function storeDraft() {
            var content, expires;
            !isEmpty() && ed.isDirty() && (content = ed.getContent({
                format: "raw",
                no_events: !0
            }), expires = new Date().getTime(), Storage.setItem(prefix + "draft", content), 
            Storage.setItem(prefix + "time", expires), self.onStoreDraft.dispatch(self, {
                expires: expires,
                content: content
            }));
        }
        function restoreDraft() {
            var content;
            hasDraft() && (content = Storage.getItem(prefix + "draft"), ed.setContent(content, {
                format: "raw"
            }), self.onRestoreDraft.dispatch(self, {
                content: content
            }));
        }
        function isEmpty(html) {
            var forcedRootBlockName = ed.settings.forced_root_block;
            return "" === (html = tinymce.trim(void 0 === html ? ed.getBody().innerHTML : html)) || new RegExp("^<" + forcedRootBlockName + "[^>]*>((\xa0|&nbsp;|[ \t]|<br[^>]*>)+?|)</" + forcedRootBlockName + ">|<br>$", "i").test(html);
        }
        self.onStoreDraft = new Dispatcher(self), self.onRestoreDraft = new Dispatcher(self), 
        self.onRemoveDraft = new Dispatcher(self), prefix = (prefix = (prefix = (prefix = settings.autosave_prefix || "tinymce-autosave-{path}{query}-{id}-").replace(/\{path\}/g, document.location.pathname)).replace(/\{query\}/g, document.location.search)).replace(/\{id\}/g, ed.id), 
        settings.autosave_interval = parseTime(settings.autosave_interval, "30s"), 
        settings.autosave_retention = parseTime(settings.autosave_retention, "20m"), 
        ed.addButton("autosave", {
            title: "autosave.restore_content",
            onclick: function() {
                ed.undoManager.beforeChange(), restoreDraft(), removeDraft(), ed.undoManager.add(), 
                ed.nodeChanged();
            }
        }), ed.onNodeChange.add(function() {
            var controlManager = ed.controlManager;
            controlManager.get("autosave") && controlManager.setDisabled("autosave", !hasDraft());
        }), ed.onInit.add(function() {
            !ed.controlManager.get("autosave") || started || (setInterval(function() {
                ed.removed || storeDraft();
            }, settings.autosave_interval), started = !0);
        }), !1 !== ed.settings.autosave_restore_when_empty && (ed.onInit.add(function() {
            hasDraft() && isEmpty() && restoreDraft();
        }), ed.onSaveContent.add(function() {
            removeDraft();
        })), self.storeDraft = storeDraft;
    }));
}(tinymce);tinymce/plugins/formatselect/plugin.js000060400000005675152456167170014250 0ustar00/* jce - 2.9.99.2 | 2026-04-22 | https://www.joomlacontenteditor.net | Source: https://github.com/widgetfactory/jce | Copyright (C) 2006 - 2026 Ryan Demmer. All rights reserved | GNU/GPL Version 2 or later - http://www.gnu.org/licenses/gpl-2.0.html */
!function() {
    var each = tinymce.each, fmts = {
        p: "advanced.paragraph",
        address: "advanced.address",
        pre: "advanced.pre",
        h1: "advanced.h1",
        h2: "advanced.h2",
        h3: "advanced.h3",
        h4: "advanced.h4",
        h5: "advanced.h5",
        h6: "advanced.h6",
        div: "advanced.div",
        div_container: "advanced.div_container",
        blockquote: "advanced.blockquote",
        code: "advanced.code",
        samp: "advanced.samp",
        span: "advanced.span",
        section: "advanced.section",
        article: "advanced.article",
        aside: "advanced.aside",
        header: "advanced.header",
        footer: "advanced.footer",
        nav: "advanced.nav",
        figure: "advanced.figure",
        dl: "advanced.dl",
        dt: "advanced.dt",
        dd: "advanced.dd"
    };
    tinymce.PluginManager.add("formatselect", function(ed, url) {
        var nodes = [];
        function isFormat(n) {
            return !(n.getAttribute("data-mce-bogus") || -1 === tinymce.inArray(nodes, n.nodeName) || n.className && -1 !== n.className.indexOf("mce-item-"));
        }
        each(ed.getParam("formatselect_blockformats", fmts, "hash"), function(value, key) {
            "span" !== key && nodes.push(key.toUpperCase());
        }), ed.onNodeChange.add(function(ed, cm, n) {
            var cm = cm.get("formatselect"), value = "";
            cm && ((n = ed.dom.getParent(n, isFormat, ed.getBody())) && n.nodeName && "pre" === (value = n.nodeName.toLowerCase()) && (value = n.getAttribute("data-mce-code") || n.getAttribute("data-mce-type") || value), 
            cm.select(value));
        }), this.createControl = function(n, cf) {
            var ctrl, PreviewCss, preview_styles;
            if ("formatselect" === n) return PreviewCss = tinymce.util.PreviewCss, 
            ctrl = ed.controlManager.createListBox("formatselect", {
                title: "advanced.block",
                max_height: 384,
                onselect: function(v) {
                    ed.execCommand("FormatBlock", !1, v);
                },
                menu_class: "mceFormatListMenu"
            }), preview_styles = ed.getParam("formatselect_preview_styles", !0), 
            ctrl && (each(ed.getParam("formatselect_blockformats", fmts, "hash"), function(value, key) {
                ctrl.add(ed.getLang(value, key), key, {
                    class: "mce_formatPreview mce_" + key,
                    style: function() {
                        return preview_styles ? PreviewCss.getCssText(ed, {
                            block: key
                        }) : "";
                    }
                });
            }), PreviewCss.reset()), ctrl;
        };
    });
}();tinymce/plugins/directionality/plugin.js000060400000002650152456167170014571 0ustar00/* jce - 2.9.99.2 | 2026-04-22 | https://www.joomlacontenteditor.net | Source: https://github.com/widgetfactory/jce | Copyright (C) 2006 - 2026 Ryan Demmer. All rights reserved | GNU/GPL Version 2 or later - http://www.gnu.org/licenses/gpl-2.0.html */
tinymce.PluginManager.add("directionality", function(ed, url) {
    function setDir(dir) {
        var curDir, dom = ed.dom, blocks = ed.selection.getSelectedBlocks();
        blocks.length && (curDir = dom.getAttrib(blocks[0], "dir"), tinymce.each(blocks, function(block) {
            dom.getParent(block.parentNode, "*[dir='" + dir + "']", dom.getRoot()) || (curDir != dir ? dom.setAttrib(block, "dir", dir) : dom.setAttrib(block, "dir", null));
        }), ed.nodeChanged());
    }
    ed.addCommand("mceDirectionLTR", function() {
        setDir("ltr");
    }), ed.addCommand("mceDirectionRTL", function() {
        setDir("rtl");
    }), ed.addButton("ltr", {
        title: "directionality.ltr_desc",
        cmd: "mceDirectionLTR"
    }), ed.addButton("rtl", {
        title: "directionality.rtl_desc",
        cmd: "mceDirectionRTL"
    }), ed.onNodeChange.add(function(ed, cm, n) {
        var ed = ed.dom;
        (n = ed.getParent(n, ed.isBlock)) ? (ed = ed.getAttrib(n, "dir"), cm.setActive("ltr", "ltr" == ed), 
        cm.setDisabled("ltr", 0), cm.setActive("rtl", "rtl" == ed), cm.setDisabled("rtl", 0)) : (cm.setDisabled("ltr", 1), 
        cm.setDisabled("rtl", 1));
    });
});tinymce/plugins/kitchensink/plugin.js000060400000003342152456167170014057 0ustar00/* jce - 2.9.99.2 | 2026-04-22 | https://www.joomlacontenteditor.net | Source: https://github.com/widgetfactory/jce | Copyright (C) 2006 - 2026 Ryan Demmer. All rights reserved | GNU/GPL Version 2 or later - http://www.gnu.org/licenses/gpl-2.0.html */
!function() {
    var DOM = tinymce.DOM, Storage = tinymce.util.Storage;
    tinymce.PluginManager.add("kitchensink", function(ed, url) {
        var state = !1, h = 0, el = ed.getElement(), s = ed.settings;
        function toggle() {
            var row = DOM.getParents(ed.id + "_kitchensink", ".mceToolbarRow");
            if (row) {
                for (var n = DOM.getNext(row[0], ".mceToolbarRow"); n; ) state ? DOM.setStyle(n, "display", "") : DOM.hide(n), 
                n = DOM.getNext(n, ".mceToolbarRow");
                (h = s.height || el.style.height || el.offsetHeight) && DOM.setStyle(ed.id + "_ifr", "height", h), 
                ed.getParam("use_state_cookies", !0) && Storage.set("wf_toggletoolbars_state_" + ed.id, state), 
                ed.controlManager.setActive("kitchensink", state);
            }
        }
        ed.getParam("use_state_cookies", !0) && (state = Storage.get("wf_toggletoolbars_state_" + ed.id, !1)), 
        ed.addCommand("mceKitchenSink", function() {
            state = !state, toggle();
        }), ed.onSetContent.add(function() {
            ed.controlManager.setActive("visualblocks", state);
        }), ed.addButton("kitchensink", {
            title: "kitchensink.desc",
            cmd: "mceKitchenSink"
        }), ed.onPostRender.add(function(ed, cm) {
            DOM.get("mce_fullscreen") ? state = !0 : toggle();
        }), ed.onInit.add(function(ed) {
            ed.controlManager.setActive("kitchensink", state);
        });
    });
}();tinymce/plugins/noneditable/plugin.js000060400000007047152456167170014037 0ustar00/* jce - 2.9.99.2 | 2026-04-22 | https://www.joomlacontenteditor.net | Source: https://github.com/widgetfactory/jce | Copyright (C) 2006 - 2026 Ryan Demmer. All rights reserved | GNU/GPL Version 2 or later - http://www.gnu.org/licenses/gpl-2.0.html */
!function() {
    var DOM = tinymce.DOM;
    tinymce.PluginManager.add("noneditable", function(editor) {
        var editClass = tinymce.trim(editor.getParam("noneditable_editable_class", "mceEditable")), nonEditClass = tinymce.trim(editor.getParam("noneditable_noneditable_class", "mceNonEditable"));
        function hasClass(checkClassName) {
            return function(node) {
                return -1 !== (" " + node.attr("class") + " ").indexOf(checkClassName);
            };
        }
        var nonEditableRegExps, hasEditClass = hasClass(editClass), hasNonEditClass = hasClass(nonEditClass);
        (nonEditableRegExps = editor.getParam("noneditable_regexp")) && !nonEditableRegExps.length && (nonEditableRegExps = [ nonEditableRegExps ]), 
        editor.onPreInit.add(function() {
            editor.formatter.register("noneditable", {
                block: "div",
                wrapper: !0,
                onformat: function(elm, fmt, vars) {
                    tinymce.each(vars, function(value, key) {
                        editor.dom.setAttrib(elm, key, value);
                    });
                }
            }), nonEditableRegExps && editor.onBeforeSetContent.add(function(ed, e) {
                !function(e) {
                    var i = nonEditableRegExps.length, content = e.content, cls = tinymce.trim(nonEditClass);
                    function replaceMatchWithSpan(match) {
                        var args = arguments, index = args[args.length - 2], prevChar = 0 < index ? content.charAt(index - 1) : "";
                        if ('"' === prevChar) return match;
                        if (">" === prevChar) {
                            prevChar = content.lastIndexOf("<", index);
                            if (-1 !== prevChar) if (-1 !== content.substring(prevChar, index).indexOf('contenteditable="false"')) return match;
                        }
                        return '<span class="' + cls + '" data-mce-content="' + editor.dom.encode(args[0]) + '">' + editor.dom.encode("string" == typeof args[1] ? args[1] : args[0]) + "</span>";
                    }
                    if ("raw" != e.format) {
                        for (;i--; ) content = content.replace(nonEditableRegExps[i], replaceMatchWithSpan);
                        e.content = content;
                    }
                }(e);
            }), editor.parser.addAttributeFilter("class", function(nodes) {
                for (var node, i = nodes.length; i--; ) node = nodes[i], hasEditClass(node) ? node.attr("contenteditable", "true") : hasNonEditClass(node) && node.attr("contenteditable", "false");
            }), editor.serializer.addAttributeFilter("contenteditable", function(nodes) {
                for (var node, i = nodes.length; i--; ) node = nodes[i], (hasEditClass(node) || hasNonEditClass(node)) && (nonEditableRegExps && node.attr("data-mce-content") ? (node.name = "#text", 
                node.type = 3, node.raw = !0, node.value = node.attr("data-mce-content")) : node.attr("contenteditable", null));
            });
        }), this.isEditable = function(node) {
            return node.attr ? node.hasClass(editClass) : DOM.hasClass(node, editClass);
        }, this.isNonEditable = function(node) {
            return node.attr ? node.hasClass(nonEditClass) : DOM.hasClass(node, nonEditClass);
        };
    });
}();tinymce/plugins/visualchars/plugin.js000060400000006205152456167170014072 0ustar00/* jce - 2.9.99.2 | 2026-04-22 | https://www.joomlacontenteditor.net | Source: https://github.com/widgetfactory/jce | Copyright (C) 2006 - 2026 Ryan Demmer. All rights reserved | GNU/GPL Version 2 or later - http://www.gnu.org/licenses/gpl-2.0.html */
!function() {
    var Storage = tinymce.util.Storage;
    tinymce.PluginManager.add("visualchars", function(ed, url) {
        function toggleVisualChars(state, o) {
            var node, nodeList, i, nodeValue, div, charMap, visualCharsRegExp, o = o || ed.getBody();
            function wrapCharWithSpan(value) {
                return '<span data-mce-bogus="1" class="mce-item-' + charMap[value] + '">' + value + "</span>";
            }
            if (charMap = {
                "\xa0": "nbsp",
                "\xad": "shy"
            }, visualCharsRegExp = function() {
                var key, regExp = "";
                for (key in charMap) regExp += key;
                return new RegExp("[" + regExp + "]", "g");
            }(), state) for (nodeList = [], tinymce.walk(o, function(n) {
                (function(n) {
                    return 3 === n.nodeType && !ed.dom.getParent(n, ".mce-item-nbsp, .mce-item-shy");
                })(n) && n.nodeValue && visualCharsRegExp.test(n.nodeValue) && nodeList.push(n);
            }, "childNodes"), i = 0; i < nodeList.length; i++) {
                for (nodeValue = nodeList[i].nodeValue, nodeValue = (nodeValue = ed.dom.encode(nodeValue)).replace(visualCharsRegExp, wrapCharWithSpan), 
                div = ed.dom.create("div", null, nodeValue); node = div.lastChild; ) ed.dom.insertAfter(node, nodeList[i]);
                ed.dom.remove(nodeList[i]);
            } else for (i = (nodeList = ed.dom.select(function() {
                var key, selector = "";
                for (key in charMap) selector && (selector += ","), selector += "span.mce-item-" + charMap[key];
                return selector;
            }(), o)).length - 1; 0 <= i; i--) ed.dom.remove(nodeList[i], 1);
        }
        var state;
        ed.getParam("use_state_cookies", !0) && (state = Storage.get("wf_visualchars_state")), 
        state = tinymce.is(state, "string") ? parseFloat(state) : ed.getParam("visualchars_default_state", 0), 
        ed.onInit.add(function() {
            ed.controlManager.setActive("visualchars", state), toggleVisualChars(state);
        }), ed.addButton("visualchars", {
            title: "visualchars.desc",
            cmd: "mceVisualChars"
        }), ed.onExecCommand.add(function(ed, cmd, ui, v, o) {
            "mceNonBreaking" === cmd && toggleVisualChars(state);
        }), ed.addCommand("mceVisualChars", function() {
            state = !state, ed.controlManager.setActive("visualchars", state), toggleVisualChars(state), 
            ed.getParam("use_state_cookies", !0) && Storage.set("wf_visualchars_state", state ? 1 : 0);
        }, self), ed.onKeyUp.add(function(ed, e) {
            state && 13 == e.keyCode && toggleVisualChars(state);
        }), ed.onPreProcess.add(function(ed, o) {
            o.get && toggleVisualChars(!1, o.node);
        }), ed.onSetContent.add(function(ed, o) {
            toggleVisualChars(state);
        });
    });
}();tinymce/plugins/searchreplace/plugin.js000060400000044427152456167170014357 0ustar00/* jce - 2.9.99.2 | 2026-04-22 | https://www.joomlacontenteditor.net | Source: https://github.com/widgetfactory/jce | Copyright (C) 2006 - 2026 Ryan Demmer. All rights reserved | GNU/GPL Version 2 or later - http://www.gnu.org/licenses/gpl-2.0.html */
!function() {
    var DOM = tinymce.DOM;
    function findAndReplaceDOMText(regex, node, replacementNode, captureGroup, schema) {
        var m, text, doc, blockElementsMap, hiddenTextElementsMap, shortEndedElementsMap, stencilNode, makeReplacementNode, matches = [], count = 0;
        function getMatchIndexes(m, captureGroup) {
            if (!m[0]) throw "findAndReplaceDOMText cannot handle zero-length matches";
            var index = m.index;
            if (0 < (captureGroup = captureGroup || 0)) {
                captureGroup = m[captureGroup];
                if (!captureGroup) throw "Invalid capture group";
                index += m[0].indexOf(captureGroup), m[0] = captureGroup;
            }
            return [ index, index + m[0].length, [ m[0] ] ];
        }
        if (doc = node.ownerDocument, blockElementsMap = schema.getBlockElements(), 
        hiddenTextElementsMap = schema.getWhiteSpaceElements(), shortEndedElementsMap = schema.getShortEndedElements(), 
        text = function getText(node) {
            var txt;
            if (3 === node.nodeType) return node.data;
            if (hiddenTextElementsMap[node.nodeName] && !blockElementsMap[node.nodeName]) return "";
            if (txt = "", (blockElementsMap[node.nodeName] || shortEndedElementsMap[node.nodeName]) && (txt += "\n"), 
            node = node.firstChild) for (;txt += getText(node), node = node.nextSibling; );
            return txt;
        }(node)) {
            if (regex.global) for (;m = regex.exec(text); ) matches.push(getMatchIndexes(m, captureGroup)); else m = text.match(regex), 
            matches.push(getMatchIndexes(m, captureGroup));
            return matches.length && (count = matches.length, function(node, matches, replaceFn) {
                var startNode, endNode, startNodeIndex, endNodeIndex, innerNodes = [], atIndex = 0, curNode = node, matchLocation = matches.shift(), matchIndex = 0;
                out: for (;;) {
                    if ((blockElementsMap[curNode.nodeName] || shortEndedElementsMap[curNode.nodeName]) && atIndex++, 
                    3 === curNode.nodeType && (!endNode && curNode.length + atIndex >= matchLocation[1] ? (endNode = curNode, 
                    endNodeIndex = matchLocation[1] - atIndex) : startNode && innerNodes.push(curNode), 
                    !startNode && curNode.length + atIndex > matchLocation[0] && (startNode = curNode, 
                    startNodeIndex = matchLocation[0] - atIndex), atIndex += curNode.length), 
                    startNode && endNode) {
                        if (curNode = replaceFn({
                            startNode: startNode,
                            startNodeIndex: startNodeIndex,
                            endNode: endNode,
                            endNodeIndex: endNodeIndex,
                            innerNodes: innerNodes,
                            match: matchLocation[2],
                            matchIndex: matchIndex
                        }), atIndex -= endNode.length - endNodeIndex, endNode = startNode = null, 
                        innerNodes = [], matchIndex++, !(matchLocation = matches.shift())) break;
                    } else {
                        if ((!hiddenTextElementsMap[curNode.nodeName] || blockElementsMap[curNode.nodeName]) && curNode.firstChild) {
                            curNode = curNode.firstChild;
                            continue;
                        }
                        if (curNode.nextSibling) {
                            curNode = curNode.nextSibling;
                            continue;
                        }
                    }
                    for (;;) {
                        if (curNode.nextSibling) {
                            curNode = curNode.nextSibling;
                            break;
                        }
                        if (curNode.parentNode === node) break out;
                        curNode = curNode.parentNode;
                    }
                }
            }(node, matches, (makeReplacementNode = "function" != typeof (schema = replacementNode) ? (stencilNode = schema.nodeType ? schema : doc.createElement(schema), 
            function(fill, matchIndex) {
                var clone = stencilNode.cloneNode(!1);
                return clone.setAttribute("data-mce-index", matchIndex), fill && clone.appendChild(doc.createTextNode(fill)), 
                clone;
            }) : schema, function(range) {
                var parentNode, startNode = range.startNode, endNode = range.endNode, matchIndex = range.matchIndex;
                if (startNode === endNode) return parentNode = (node = startNode).parentNode, 
                0 < range.startNodeIndex && (before = doc.createTextNode(node.data.substring(0, range.startNodeIndex)), 
                parentNode.insertBefore(before, node)), el = makeReplacementNode(range.match[0], matchIndex), 
                parentNode.insertBefore(el, node), range.endNodeIndex < node.length && (after = doc.createTextNode(node.data.substring(range.endNodeIndex)), 
                parentNode.insertBefore(after, node)), node.parentNode.removeChild(node), 
                el;
                for (var before = doc.createTextNode(startNode.data.substring(0, range.startNodeIndex)), after = doc.createTextNode(endNode.data.substring(range.endNodeIndex)), node = makeReplacementNode(startNode.data.substring(range.startNodeIndex), matchIndex), innerEls = [], i = 0, l = range.innerNodes.length; i < l; ++i) {
                    var innerNode = range.innerNodes[i], innerEl = makeReplacementNode(innerNode.data, matchIndex);
                    innerNode.parentNode.replaceChild(innerEl, innerNode), innerEls.push(innerEl);
                }
                var el = makeReplacementNode(endNode.data.substring(0, range.endNodeIndex), matchIndex);
                return (parentNode = startNode.parentNode).insertBefore(before, startNode), 
                parentNode.insertBefore(node, startNode), parentNode.removeChild(startNode), 
                (parentNode = endNode.parentNode).insertBefore(el, endNode), parentNode.insertBefore(after, endNode), 
                parentNode.removeChild(endNode), el;
            }))), count;
        }
    }
    tinymce.PluginManager.add("searchreplace", function(editor, url) {
        var last, self = this, currentIndex = -1;
        function notFoundAlert() {
            editor.windowManager.alert(editor.getLang("searchreplace.notfound", "The search has been completed. The search string could not be found."));
        }
        function updateButtonStates() {
            editor.updateSearchButtonStates.dispatch({
                next: !findSpansByIndex(currentIndex + 1).length,
                prev: !findSpansByIndex(currentIndex - 1).length
            });
        }
        function resetButtonStates() {
            editor.updateSearchButtonStates.dispatch({
                replace: !0,
                replaceAll: !0,
                next: !0,
                prev: !0
            });
        }
        function getElmIndex(elm) {
            elm = elm.getAttribute("data-mce-index");
            return "number" == typeof elm ? "" + elm : elm;
        }
        function unwrap(node) {
            var parentNode = node.parentNode;
            node.firstChild && parentNode.insertBefore(node.firstChild, node), node.parentNode.removeChild(node);
        }
        function findSpansByIndex(index) {
            var spans = [], nodes = tinymce.toArray(editor.getBody().getElementsByTagName("span"));
            if (nodes.length) for (var i = 0; i < nodes.length; i++) {
                var nodeIndex = getElmIndex(nodes[i]);
                null !== nodeIndex && nodeIndex.length && nodeIndex === index.toString() && spans.push(nodes[i]);
            }
            return spans;
        }
        function moveSelection(forward) {
            var testIndex = currentIndex, dom = editor.dom, forward = ((forward = !1 !== forward) ? testIndex++ : testIndex--, 
            dom.removeClass(findSpansByIndex(currentIndex), "mce-match-marker-selected"), 
            findSpansByIndex(testIndex));
            return forward.length ? (dom.addClass(findSpansByIndex(testIndex), "mce-match-marker-selected"), 
            editor.selection.scrollIntoView(forward[0]), testIndex) : -1;
        }
        function removeNode(node) {
            var dom = editor.dom, parent = node.parentNode;
            dom.remove(node), dom.isEmpty(parent) && dom.remove(parent);
        }
        function isMatchSpan(node) {
            node = getElmIndex(node);
            return null !== node && 0 < node.length;
        }
        function isMatchSpan(node) {
            node = getElmIndex(node);
            return null !== node && 0 < node.length;
        }
        editor.updateSearchButtonStates = new tinymce.util.Dispatcher(this), editor.addCommand("mceSearchReplace", function() {
            last = {};
            var html = '<div class="mceForm"><div class="mceModalRow">   <label for="' + editor.id + '_search_string">' + editor.getLang("searchreplace.findwhat", "Search") + '</label>   <div class="mceModalControl">       <input type="text" id="' + editor.id + '_search_string" />   </div>   <div class="mceModalControl mceModalFlexNone">       <button class="mceButton" id="' + editor.id + '_search_prev" title="' + editor.getLang("searchreplace.prev", "Previous") + '" disabled><i class="mceIcon mce_arrow-up"></i></button>       <button class="mceButton" id="' + editor.id + '_search_next" title="' + editor.getLang("searchreplace.next", "Next") + '" disabled><i class="mceIcon mce_arrow-down"></i></button>   </div></div><div class="mceModalRow">   <label for="' + editor.id + '_replace_string">' + editor.getLang("searchreplace.replacewith", "Replace") + '</label>   <div class="mceModalControl">       <input type="text" id="' + editor.id + '_replace_string" />   </div></div><div class="mceModalRow">   <div class="mceModalControl">       <input id="' + editor.id + '_matchcase" type="checkbox" />       <label for="' + editor.id + '_matchcase">' + editor.getLang("searchreplace.mcase", "Match Case") + '</label>   </div>   <div class="mceModalControl">       <input id="' + editor.id + '_wholewords" type="checkbox" />       <label for="' + editor.id + '_wholewords">' + editor.getLang("searchreplace.wholewords", "Whole Words") + "</label>   </div></div></div>";
            editor.windowManager.open({
                title: editor.getLang("searchreplace.search_desc", "Search and Replace"),
                content: html,
                size: "mce-modal-landscape-small",
                overlay: !1,
                open: function() {
                    var id = this.id, search = DOM.get(editor.id + "_search_string");
                    search.value = editor.selection.getContent({
                        format: "text"
                    }), DOM.bind(editor.id + "_search_next", "click", function(e) {
                        e.preventDefault(), editor.execCommand("mceSearchNext", !1);
                    }), DOM.bind(editor.id + "_search_prev", "click", function(e) {
                        e.preventDefault(), editor.execCommand("mceSearchPrev", !1);
                    }), window.setTimeout(function() {
                        search.focus();
                    }, 10), editor.updateSearchButtonStates.add(function(obj) {
                        tinymce.each(obj, function(val, key) {
                            key = DOM.get(editor.id + "_search_" + key) || DOM.get(id + "_search_" + key);
                            key && (key.disabled = !!val);
                        });
                    });
                },
                close: function() {
                    DOM.unbind(editor.id + "_search_next", "click"), DOM.unbind(editor.id + "_search_prev", "click"), 
                    editor.execCommand("mceSearchDone", !1);
                },
                buttons: [ {
                    title: editor.getLang("searchreplace.find", "Find"),
                    id: "find",
                    onclick: function(e) {
                        e.preventDefault();
                        var e = DOM.get(editor.id + "_matchcase"), wholeword = DOM.get(editor.id + "_wholewords"), text = DOM.getValue(editor.id + "_search_string");
                        editor.execCommand("mceSearch", !1, {
                            textcase: !!e.checked,
                            text: text,
                            wholeword: !!wholeword.checked
                        });
                    },
                    classes: "primary"
                }, {
                    title: editor.getLang("searchreplace.replace", "Replace"),
                    id: "search_replace",
                    onclick: function(e) {
                        e.preventDefault();
                        e = DOM.getValue(editor.id + "_replace_string");
                        editor.execCommand("mceReplace", !1, e);
                    }
                }, {
                    title: editor.getLang("searchreplace.replaceall", "Replace All"),
                    id: "search_replaceall",
                    onclick: function(e) {
                        e.preventDefault();
                        e = DOM.getValue(editor.id + "_replace_string");
                        editor.execCommand("mceReplaceAll", !1, e);
                    }
                } ]
            });
        }), editor.addCommand("mceSearch", function(ui, e) {
            var count, text = e.text, caseState = e.textcase, e = e.wholeword;
            if (text.length) {
                if (last.text == text && last.caseState == caseState && last.wholeWord == e) return 0 === findSpansByIndex(currentIndex + 1).length ? void notFoundAlert() : (self.next(), 
                void updateButtonStates());
                (count = self.find(text, caseState, e)) || notFoundAlert(), updateButtonStates(), 
                editor.updateSearchButtonStates.dispatch({
                    replace: !count,
                    replaceAll: !count
                }), last = {
                    text: text,
                    caseState: caseState,
                    wholeWord: e
                };
            } else self.done(!1), resetButtonStates();
        }), editor.addCommand("mceSearchNext", function() {
            self.next(), updateButtonStates();
        }), editor.addCommand("mceSearchPrev", function() {
            self.prev(), updateButtonStates();
        }), editor.addCommand("mceReplace", function(ui, text) {
            self.replace(text) || (resetButtonStates(), currentIndex = -1, last = {});
        }), editor.addCommand("mceReplaceAll", function(ui, text) {
            self.replace(text, !0, !0) || (resetButtonStates(), last = {});
        }), editor.addCommand("mceSearchDone", function() {
            self.done();
        }), editor.addButton("search", {
            title: "searchreplace.search_desc",
            cmd: "mceSearchReplace"
        }), editor.addShortcut("meta+f", "searchreplace.search_desc", function() {
            return editor.execCommand("mceSearchReplace");
        }), self.find = function(text, matchCase, wholeWord) {
            text = text.replace(/[\-\[\]\/\{\}\(\)\*\+\?\.\\\^\$\|]/g, "\\$&"), 
            text = wholeWord ? "\\b" + text + "\\b" : text;
            wholeWord = new RegExp(text, matchCase ? "g" : "gi"), (text = editor.dom.create("span", {
                "data-mce-bogus": 1
            })).className = "mce-match-marker", matchCase = editor.getBody(), self.done(!1);
            wholeWord = findAndReplaceDOMText(wholeWord, matchCase, text, !1, editor.schema);
            return wholeWord && (currentIndex = -1, currentIndex = moveSelection(!0)), 
            wholeWord;
        }, self.next = function() {
            var index = moveSelection(!0);
            -1 !== index && (currentIndex = index);
        }, self.prev = function() {
            var index = moveSelection(!1);
            -1 !== index && (currentIndex = index);
        }, self.replace = function(text, forward, all) {
            var i, nodes, node, currentMatchIndex, hasMore, nextIndex = currentIndex;
            for (forward = !1 !== forward, node = editor.getBody(), nodes = tinymce.grep(tinymce.toArray(node.getElementsByTagName("span")), isMatchSpan), 
            nodes = tinymce.grep(nodes, function(node) {
                var parent = editor.dom.getParent(node, "[contenteditable]");
                return (!parent || "false" !== parent.contentEditable) && "false" !== node.contentEditable;
            }), i = 0; i < nodes.length; i++) {
                var nodeIndex = getElmIndex(nodes[i]), matchIndex = currentMatchIndex = parseInt(nodeIndex, 10);
                if (all || matchIndex === currentIndex) {
                    for ((text.length ? (nodes[i].firstChild.nodeValue = text, unwrap) : removeNode)(nodes[i]); nodes[++i]; ) {
                        if ((matchIndex = parseInt(getElmIndex(nodes[i]), 10)) !== currentMatchIndex) {
                            i--;
                            break;
                        }
                        removeNode(nodes[i]);
                    }
                    forward && nextIndex--;
                } else currentIndex < currentMatchIndex && nodes[i].setAttribute("data-mce-index", currentMatchIndex - 1);
            }
            return editor.undoManager.add(), currentIndex = nextIndex, forward ? (hasMore = 0 < findSpansByIndex(nextIndex + 1).length, 
            self.next()) : (hasMore = 0 < findSpansByIndex(nextIndex - 1).length, 
            self.prev()), !all && hasMore;
        }, self.done = function(keepEditorSelection) {
            for (var startContainer, endContainer, rng, nodes = tinymce.toArray(editor.getBody().getElementsByTagName("span")), i = 0; i < nodes.length; i++) {
                var nodeIndex = getElmIndex(nodes[i]);
                null !== nodeIndex && nodeIndex.length && (nodeIndex === currentIndex.toString() && (startContainer = startContainer || nodes[i].firstChild, 
                endContainer = nodes[i].firstChild), unwrap(nodes[i]));
            }
            if (startContainer && endContainer) return (rng = editor.dom.createRng()).setStart(startContainer, 0), 
            rng.setEnd(endContainer, endContainer.data.length), !1 !== keepEditorSelection && editor.selection.setRng(rng), 
            rng;
        };
    });
}();tinymce/themes/advanced/theme.js000060400000045062152456167170012727 0ustar00/* This file includes original and modified code from various versions of TinyMCE, relicensed under GPL v2+ per LGPL 2.1 §3 where applicable. Source: https://github.com/widgetfactory/tinymce-muon; Copyright (c) Tiny Technologies, Inc. All rights reserved.; Copyright (c) 1999–2015 Ephox Corp. All rights reserved.; Copyright (c) 2009       Moxiecode Systems AB. All rights reserved.; Copyright (c) 2009–2025  Ryan Demmer. All rights reserved.; For a detailed history of modifications, refer to the Git commit history.; Licensed under the GNU General Public License version 2 or later (GPL v2+): https://www.gnu.org/licenses/gpl-2.0.html */
!function() {
    var DOM = tinymce.DOM, Event = tinymce.dom.Event, extend = tinymce.extend, each = tinymce.each, Storage = tinymce.util.Storage, Delay = tinymce.util.Delay, explode = tinymce.explode;
    tinymce.create("tinymce.themes.AdvancedTheme", {
        controls: {
            bold: [ "bold_desc", "Bold" ],
            italic: [ "italic_desc", "Italic" ],
            underline: [ "underline_desc", "Underline" ],
            strikethrough: [ "striketrough_desc", "Strikethrough" ],
            justifyleft: [ "justifyleft_desc", "JustifyLeft" ],
            justifycenter: [ "justifycenter_desc", "JustifyCenter" ],
            justifyright: [ "justifyright_desc", "JustifyRight" ],
            justifyfull: [ "justifyfull_desc", "JustifyFull" ],
            outdent: [ "outdent_desc", "Outdent" ],
            indent: [ "indent_desc", "Indent" ],
            undo: [ "undo_desc", "Undo" ],
            redo: [ "redo_desc", "Redo" ],
            unlink: [ "unlink_desc", "unlink" ],
            cleanup: [ "cleanup_desc", "mceCleanup" ],
            code: [ "code_desc", "mceCodeEditor" ],
            removeformat: [ "removeformat_desc", "RemoveFormat" ],
            sub: [ "sub_desc", "subscript" ],
            sup: [ "sup_desc", "superscript" ],
            forecolor: [ "forecolor_desc", "ForeColor" ],
            forecolorpicker: [ "forecolor_desc", "mceForeColor" ],
            backcolor: [ "backcolor_desc", "HiliteColor" ],
            backcolorpicker: [ "backcolor_desc", "mceBackColor" ],
            visualaid: [ "visualaid_desc", "mceToggleVisualAid" ],
            newdocument: [ "newdocument_desc", "mceNewDocument" ],
            blockquote: [ "blockquote_desc", "mceBlockQuote" ]
        },
        stateControls: [ "bold", "italic", "underline", "strikethrough", "justifyleft", "justifycenter", "justifyright", "justifyfull", "sub", "sup", "blockquote" ],
        init: function(ed, url) {
            var s, v, self = this;
            self.editor = ed, self.url = url, self.onResolveName = new tinymce.util.Dispatcher(this), 
            self.onResize = new tinymce.util.Dispatcher(this), s = ed.settings, 
            self.settings = s = extend({
                theme_path: !0,
                theme_toolbar_location: "top",
                theme_blockformats: "p,address,pre,h1,h2,h3,h4,h5,h6",
                theme_toolbar_align: "left",
                theme_statusbar_location: "bottom",
                theme_fonts: "Andale Mono=andale mono,times;Arial=arial,helvetica,sans-serif;Arial Black=arial black,avant garde;Book Antiqua=book antiqua,palatino;Comic Sans MS=comic sans ms,sans-serif;Courier New=courier new,courier;Georgia=georgia,palatino;Helvetica=helvetica;Impact=impact,chicago;Symbol=symbol;Tahoma=tahoma,arial,helvetica,sans-serif;Terminal=terminal,monaco;Times New Roman=times new roman,times;Trebuchet MS=trebuchet ms,geneva;Verdana=verdana,geneva;Webdings=webdings;Wingdings=wingdings,zapf dingbats",
                theme_more_colors: 1,
                theme_row_height: 23,
                theme_resize_horizontal: 1,
                theme_font_sizes: "1,2,3,4,5,6,7",
                theme_font_selector: "span",
                theme_show_current_color: 0,
                readonly: ed.settings.readonly
            }, s), (v = s.theme_path_location) && "none" != v && (s.theme_statusbar_location = s.theme_path_location), 
            "none" == s.theme_statusbar_location && (s.theme_statusbar_location = 0), 
            ed.onInit.add(function() {
                ed.settings.readonly || (ed.onNodeChange.add(self._nodeChanged, self), 
                ed.onKeyUp.add(self._updateUndoStatus, self), ed.onMouseUp.add(self._updateUndoStatus, self), 
                ed.dom.bind(ed.dom.getRoot(), "dragend", function() {
                    self._updateUndoStatus(ed);
                }), ed.addShortcut("alt+F10,F10", "", function() {
                    self.toolbarGroup.focus();
                }), ed.addShortcut("alt+F11", "", function() {
                    DOM.get(ed.id + "_path_row").focus();
                }));
            }), ed.onPostRender.add(function() {
                var el = ed.getElement(), e = (DOM.setStyle(ed.id + "_tbl", "width", ""), 
                DOM.get(ed.id + "_parent")), ifr = DOM.get(ed.id + "_ifr"), width = s.width || el.style.width;
                (el = s.height || el.style.height) && DOM.setStyle(ifr, "height", el), 
                width && (DOM.setStyle(e.parentNode, "max-width", width), /%/.test(width) || DOM.setStyle(ifr, "max-width", width));
            }), ed.onSetProgressState.add(function(ed, b, ti) {
                var co, tb, id = ed.id;
                b ? self.progressTimer = setTimeout(function() {
                    co = (co = ed.getContainer()).insertBefore(DOM.create("DIV", {
                        style: "position:relative"
                    }), co.firstChild), tb = DOM.get(ed.id + "_tbl"), DOM.add(co, "div", {
                        id: id + "_blocker",
                        class: "mceBlocker",
                        style: {
                            width: tb.clientWidth + 2,
                            height: tb.clientHeight + 2
                        }
                    }), DOM.add(co, "div", {
                        id: id + "_progress",
                        class: "mceProgress",
                        style: {
                            left: tb.clientWidth / 2,
                            top: tb.clientHeight / 2
                        }
                    });
                }, ti || 0) : (DOM.remove(id + "_blocker"), DOM.remove(id + "_progress"), 
                clearTimeout(self.progressTimer));
            }), !1 !== ed.settings.content_css && ed.contentCSS.push(ed.baseURI.toAbsolute(url + "/skins/" + ed.settings.skin + "/content.css"));
        },
        createControl: function(n, cf) {
            var c;
            return cf.createControl(n) || ((c = this.controls[n]) ? cf.createButton(n, {
                title: "advanced." + c[0],
                cmd: c[1],
                ui: c[2],
                value: c[3]
            }) : void 0);
        },
        execCommand: function(cmd, ui, val) {
            return !!(cmd = this["_" + cmd]) && (cmd.call(this, ui, val), !0);
        },
        renderUI: function(o) {
            var n, ic, sc, ed = this.editor, s = this.settings, skin = (ed.settings && (ed.settings.aria_label = s.aria_label + ed.getLang("advanced.help_shortcut")), 
            "mobile" === ed.settings.skin && (ed.settings.skin = "default", s.skin_variant = "touch"), 
            "mce" + this._ufirst(ed.settings.skin) + "Skin");
            return s.skin_variant && (skin += " " + skin + this._ufirst(s.skin_variant)), 
            "default" !== ed.settings.skin && (skin = "mceDefaultSkin " + skin), 
            "rtl" == ed.settings.skin_directionality && (skin += " mceRtl"), ed.settings.skin_class = skin, 
            skin = DOM.create("div", {
                role: "application",
                "aria-label": s.aria_label,
                id: ed.id + "_parent",
                class: "mceEditor " + skin
            }), sc = DOM.add(skin, "div", {
                role: "presentation",
                id: ed.id + "_tbl",
                class: "mceLayout"
            }), ic = this._createLayout(s, sc, o, skin), n = o.targetNode, DOM.insertAfter(skin, n), 
            Event.add(ed.id + "_path_row", "click", function(e) {
                if ((e = DOM.getParent(e.target, "a")) && "A" == e.nodeName) return ed.execCommand("mceSelectNodeDepth", !1, e.getAttribute("data-index") || 0), 
                !1;
            }), "external" == s.theme_toolbar_location && (o.deltaHeight = 0), this.deltaHeight = o.deltaHeight, 
            o.targetNode = null, {
                iframeContainer: ic,
                editorContainer: ed.id + "_parent",
                sizeContainer: sc,
                deltaHeight: o.deltaHeight
            };
        },
        resizeBy: function(dw, dh) {
            var e = DOM.get(this.editor.id + "_ifr");
            this.resizeTo(e.clientWidth + dw, e.clientHeight + dh);
        },
        resizeTo: function(w, h, store) {
            var ed = this.editor, s = this.settings, e = DOM.get(ed.id + "_parent"), ifr = DOM.get(ed.id + "_ifr");
            w = Math.max(s.theme_resizing_min_width || 100, w), h = Math.max(s.theme_resizing_min_height || 100, h), 
            w = Math.min(s.theme_resizing_max_width || 65535, w), h = Math.min(s.theme_resizing_max_height || 65535, h), 
            DOM.setStyle(ifr, "height", h), s.theme_resize_horizontal && (DOM.setStyle(e.parentNode, "max-width", w + "px"), 
            DOM.setStyle(ifr, "max-width", w + "px")), store && !1 !== s.use_state_cookies && Storage.setHash("wf_editor_size_" + ed.id, {
                cw: w,
                ch: h
            }), this.onResize.dispatch();
        },
        destroy: function() {
            var id = this.editor.id;
            Event.clear(id + "_resize"), Event.clear(id + "_path_row"), Event.clear(id + "_external_close");
        },
        _createLayout: function(s, tb, o, p) {
            var lo = s.theme_toolbar_location, sl = s.theme_statusbar_location;
            return s.readonly ? DOM.add(tb, "div", {
                class: "mceIframeContainer"
            }) : ("top" == lo && this._addToolbars(tb, o), "top" == sl && this._addStatusBar(tb, o), 
            s = DOM.add(tb, "div", {
                class: "mceIframeContainer"
            }), "bottom" == lo && this._addToolbars(tb, o), "bottom" == sl && this._addStatusBar(tb, o), 
            s);
        },
        _addControls: function(v, tb) {
            var di, self = this, s = self.settings, cf = self.editor.controlManager;
            s.theme_disable && !self._disabled ? (di = {}, each(explode(s.theme_disable), function(v) {
                di[v] = 1;
            }), self._disabled = di) : di = self._disabled, each(explode(v), function(n) {
                di && di[n] || (n = self.createControl(n, cf)) && tb.add(n);
            });
        },
        _addToolbars: function(c, o) {
            var i, tb, v, a, ed = this.editor, s = this.settings, cf = ed.controlManager, h = [], toolbarsExist = !1, toolbarGroup = cf.createToolbarGroup("toolbargroup", {
                name: ed.getLang("advanced.toolbar"),
                tab_focus_toolbar: ed.getParam("theme_tab_focus_toolbar"),
                class: "ToolbarGroup"
            });
            for (this.toolbarGroup = toolbarGroup, a = s.theme_toolbar_align.toLowerCase(), 
            a = cf.classPrefix + this._ufirst(a), c = DOM.add(c, "div", {
                class: cf.classPrefix + "Toolbar " + a,
                role: "toolbar",
                id: ed.id + "_toolbar"
            }), i = 1; v = s["theme_buttons" + i]; i++) toolbarsExist = !0, tb = cf.createToolbar("toolbar" + i, {
                class: "mceToolbarRow" + i,
                "aria-label": "Toolbar Row " + i
            }), s["theme_buttons" + i + "_add"] && (v += "," + s["theme_buttons" + i + "_add"]), 
            s["theme_buttons" + i + "_add_before"] && (v = s["theme_buttons" + i + "_add_before"] + "," + v), 
            this._addControls(v, tb), toolbarGroup.add(tb), o.deltaHeight -= s.theme_row_height;
            toolbarsExist || (o.deltaHeight -= s.theme_row_height), h.push(toolbarGroup.renderHTML()), 
            DOM.setHTML(c, h.join(""));
        },
        _addStatusBar: function(tb, o) {
            var self = this, ed = self.editor, s = self.settings, n = tb = DOM.add(tb, "div", {
                class: "mceStatusbar"
            });
            s.theme_path && (n = DOM.add(n, "div", {
                id: ed.id + "_path_row",
                role: "group",
                "aria-labelledby": ed.id + "_path_voice",
                class: "mcePathRow"
            }), DOM.add(n, "span", {
                id: ed.id + "_path_voice",
                class: "mcePathLabel"
            }, ed.translate("advanced.path") + ": ")), s.theme_resizing && (DOM.add(tb, "div", {
                id: ed.id + "_resize",
                class: "mceResize",
                tabIndex: "-1"
            }, '<span class="mceIcon mce_resize"></span>'), !1 !== s.use_state_cookies && ed.onPostRender.add(function() {
                var o = Storage.getHash("wf_editor_size_" + ed.id);
                o && self.resizeTo(o.cw, o.ch, !1);
            }), ed.onPostRender.add(function() {
                var elm, parent;
                Event.add(ed.id + "_resize", "click", function(e) {
                    e.preventDefault();
                }), Event.add(ed.id + "_resize", "mousedown", function(e) {
                    var mouseMoveHandler1, mouseMoveHandler2, mouseUpHandler1, mouseUpHandler2, startX, startY, startWidth, startHeight, width, height;
                    function resizeOnMove(e) {
                        e.preventDefault(), width = startWidth + (e.screenX - startX), 
                        height = startHeight + (e.screenY - startY), self.resizeTo(width, height);
                    }
                    function endResize(e) {
                        Event.remove(DOM.doc, "mousemove", mouseMoveHandler1), Event.remove(ed.getDoc(), "mousemove", mouseMoveHandler2), 
                        Event.remove(DOM.doc, "mouseup", mouseUpHandler1), Event.remove(ed.getDoc(), "mouseup", mouseUpHandler2), 
                        width = startWidth + (e.screenX - startX), height = startHeight + (e.screenY - startY), 
                        self.resizeTo(width, height, !0), ed.nodeChanged();
                    }
                    e.preventDefault(), startX = e.screenX, startY = e.screenY, 
                    e = DOM.get(self.editor.id + "_ifr"), startWidth = width = e.clientWidth, 
                    startHeight = height = e.clientHeight, mouseMoveHandler1 = Event.add(DOM.doc, "mousemove", resizeOnMove), 
                    mouseMoveHandler2 = Event.add(ed.getDoc(), "mousemove", resizeOnMove), 
                    mouseUpHandler1 = Event.add(DOM.doc, "mouseup", endResize), 
                    mouseUpHandler2 = Event.add(ed.getDoc(), "mouseup", endResize);
                }), ed.settings.floating_toolbar && (elm = ed.getContainer(), parent = elm.parentNode, 
                Event.add(window, "scroll", Delay.debounce(function() {
                    ed.settings.fullscreen_enabled || (window.pageYOffset > parent.offsetTop ? DOM.addClass(elm, "mceToolbarFixed") : DOM.removeClass(elm, "mceToolbarFixed"));
                }, 128)));
            })), o.deltaHeight -= 21;
        },
        _updateUndoStatus: function(ed) {
            var cm = ed.controlManager, ed = ed.undoManager;
            cm.setDisabled("undo", !ed.hasUndo() && !ed.typing), cm.setDisabled("redo", !ed.hasRedo());
        },
        _nodeChanged: function(ed, cm, n, co, ob) {
            var p, self = this, s = self.settings;
            if (tinymce.each(self.stateControls, function(c) {
                cm.setActive(c, ed.queryCommandState(self.controls[c][1]));
            }), cm.setActive("visualaid", ed.hasVisual), self._updateUndoStatus(ed), 
            cm.setDisabled("outdent", !ed.queryCommandState("Outdent")), s.theme_path && s.theme_statusbar_location) {
                p = DOM.get(ed.id + "_path") || DOM.add(ed.id + "_path_row", "span", {
                    id: ed.id + "_path",
                    class: "mcePathPath"
                }), self.statusKeyboardNavigation && (self.statusKeyboardNavigation.destroy(), 
                self.statusKeyboardNavigation = null), DOM.setHTML(p, "");
                for (var parents = function() {
                    for (var outParents = [], parents = ob.parents, i = parents.length, i = 0, l = parents.length; i < l; i++) 1 != (parent = parents[i]).nodeType || function(node) {
                        return node.hasAttribute("data-mce-bogus") || "bookmark" == node.getAttribute("data-mce-type") || "caret" == node.getAttribute("data-mce-type") || "_mce_caret" == node.id;
                    }(parent) || "BR" == parent.nodeName || parent.hasAttribute("data-mce-bogus") || parent.hasAttribute("data-mce-root") || parent.hasAttribute("data-mce-internal") || outParents.push(parent);
                    return outParents;
                }(), html = "", i = 0, l = parents.length; i < l; i++) {
                    var parent = parents[i], name = {
                        name: name = parent.nodeName.toLowerCase(),
                        node: parent,
                        title: name
                    };
                    self.onResolveName.dispatch(self, name), name.name && (html = name.disabled ? '<span class="mceText">' + name.name + "</span>" + html : '<a role="button" title="' + name.title + '" data-index="' + i + '"><span class="mceText">' + name.name + "</span></a>" + html);
                }
                DOM.setHTML(p, html), 0 < DOM.select("a", p).length && (self.statusKeyboardNavigation = new tinymce.ui.KeyboardNavigation({
                    root: ed.id + "_path_row",
                    items: DOM.select("a", p),
                    excludeFromTabOrder: !0,
                    onCancel: function() {
                        ed.focus();
                    }
                }, DOM));
                var status = DOM.get(ed.id + "_path_row").parentNode, mod = 20;
                tinymce.each(status.childNodes, function(n) {
                    if (DOM.hasClass(n, "mcePathRow")) return !0;
                    mod += n.offsetWidth;
                }), tinymce.each(DOM.select("a", p), function(n) {
                    DOM.removeClass(n, "mcePathHidden"), p.offsetWidth + mod + DOM.getPrev(p, ".mcePathLabel").offsetWidth > status.offsetWidth && DOM.addClass(n, "mcePathHidden");
                });
            }
        },
        _mceNewDocument: function() {
            var ed = this.editor;
            ed.windowManager.confirm({
                title: "advanced.newdocument_desc",
                text: "advanced.newdocument"
            }, function(s) {
                s && ed.execCommand("mceSetContent", !1, "");
            });
        },
        _ufirst: function(s) {
            return s.substring(0, 1).toUpperCase() + s.substring(1);
        }
    }), tinymce.ThemeManager.add("advanced", tinymce.themes.AdvancedTheme);
}();tinymce/themes/advanced/img/icons.png000060400000117312152456167170013662 0ustar00�PNG


IHDR�<��@;iTXtXML:com.adobe.xmp<?xpacket begin="" id="W5M0MpCehiHzreSzNTczkc9d"?>
<x:xmpmeta xmlns:x="adobe:ns:meta/" x:xmptk="XMP Core 5.5.0">
 <rdf:RDF xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#">
  <rdf:Description rdf:about=""
    xmlns:exif="http://ns.adobe.com/exif/1.0/"
    xmlns:photoshop="http://ns.adobe.com/photoshop/1.0/"
    xmlns:tiff="http://ns.adobe.com/tiff/1.0/"
    xmlns:xmp="http://ns.adobe.com/xap/1.0/"
    xmlns:xmpMM="http://ns.adobe.com/xap/1.0/mm/"
    xmlns:stEvt="http://ns.adobe.com/xap/1.0/sType/ResourceEvent#"
   exif:ColorSpace="1"
   exif:PixelXDimension="1000"
   exif:PixelYDimension="60"
   photoshop:ColorMode="3"
   photoshop:ICCProfile="sRGB IEC61966-2.1"
   tiff:ImageLength="60"
   tiff:ImageWidth="1000"
   tiff:ResolutionUnit="2"
   tiff:XResolution="72/1"
   tiff:YResolution="72/1"
   xmp:MetadataDate="2024-05-21T11:32:29+01:00"
   xmp:ModifyDate="2024-05-21T11:32:29+01:00">
   <xmpMM:History>
    <rdf:Seq>
     <rdf:li
      xmpMM:action="produced"
      xmpMM:softwareAgent="Affinity Photo 1.10.8"
      xmpMM:when="2024-02-28T12:20:03Z"/>
     <rdf:li
      stEvt:action="produced"
      stEvt:softwareAgent="Affinity Photo 1.10.8"
      stEvt:when="2024-05-21T11:32:29+01:00"/>
    </rdf:Seq>
   </xmpMM:History>
  </rdf:Description>
 </rdf:RDF>
</x:xmpmeta>
<?xpacket end="r"?>�َ~�iCCPsRGB IEC61966-2.1(�u��+DQ�?3C#?��������QFJ��(��̛_j~��{�d�l%6~-��*k����gMl���f�H���=������=쑬��<��Z8p/F����tьL�ՉPh����͊wCV����DRW��$<���!<-<�f��
w*�XB�\xP�
�[z��%��U��X��'��.�N��/V2ZNX^N_.[T~�c��5�_���+ރN� ��0�$>F���^�eE�|O%���*2����J����zRbJ�,�V���UO�z��[�b�o��܁�i~�f��p������.�vM�;�&\\״�\nA���b�!nO��ڢ�q��՞��s��
���?�9�Z�g�g���	pHYs�� IDATx��]w\SW����B����ZŁ"��.о����j��u�V��U�֪���Z���v:�}뮳bъe( ;����;~$7��q��������$�s��y�s<��…�\׮q���<�<��[�Vs�����SLa�y��;�<��A������x�x���?=��L��|�u�W!��
x������G����}��
����;1iٲ�4u�'���ș��e�Sv}e>�P(�H�Dw��b#@g�@���Nmƃ�/�?p'�PJ�����Of#[�w|��}�Q��3�=�.�:��nr�Oì3�6^��x�
��A��(b�3����@|��&>3��E|����!�x���?z��ٯ�کSǘ˗�\�={�lvVnҲe#ZVW7��;s���/[��1�����ŋ7�9c ��@�z��_����f����0U:]�o�/�T�q���%|���g�=�L�aO�-/����9{�S�t)�
=x`�!W�lx��:�Y„q�'��ic�<�z�w4۞����nq? �WP4���co��H�Ʋ��{��n���w����9�	]��$W�a�#���+[�W]�ɽ�˸�rf8��xr>�Б��ip���������я�YX���d<���۷��{N���w�x���z�%L�c'����X��|�z{�����|���h�����F%���H1�8	I���|�-��+NjIҫs��Í�>��P(0����3ֶj�Ⅴ�M�z���x�1���2nr����2��?1��v��Om2ŝ�W辥��ʹ�7��FH}ﳺ�������?��[y+/o�6yn���n�jժ
�y�…g5�<�"@D��p������S�5�q��O,XPoFD�!^�Z���ի?"S!��I�	�?�����BMF*��{B�yr>jؐ�O�3�ȅ���K����"P��f�Ǵ��?o��}{ٹ�t!�P{��d��	�^"T�z�6��?pg{a:�k��v�<u�Hxv|$�Ȥ��3|#ƾ��u$Z����V�w�o�
Kr�)(L?td�߉���7�WX��$p���$9�Ϗ9SYI���cv��f�=y���o�x�0�'�1�Q�G���o�f���+X��\�~���<I_����M��È�3ֶ
-<=�>e��������r���?�L�=hT�N1̸��Y�z5�}�U6�xUf�'
lC��c��}В�WǏ_�կk��zc�dlXׯ��MX�2��|�,�j?�?P�#	P2]�5�6?{��K}~�D�~���j.�?�ml�N+
1�wT߄�˒��cÍ��G��J��Z|���S�])l@R�D"s>/��%yZ�ee��� �||��
9hd��0�U��h�v���ӏ��j1��앷&�Qb��?�Vk�*�$^�h�/wI��v�O;V�^��]Í7�,x}�����p��󑣆���~�`�ȶ����D?,����],y6q,��} ��'�t��W���>e�X��y��wF��.Vk�������DC���^4�%D�N��
F[����Ҫt�Zy\�i	[�4E�~���[����E�-�\�1g��
f�J�W���a'��ʁ[��}}c�Gv��t��b�{�Z��i�q����[5�`I�-C�'>3�!6�~��8{�����G�#��*�N_��#�BG�a��__��=�Eг�1w��q]���(`Kl���לv�n�������iC��M�.�H:Q��N���FEB�;֬^
��O�L=�*Q��s�-y�7��,�,j�aD��߾���6P4.�V�%�2��.�C��7aE�.����I��B�V'c$�r��$2���B�9\�"T1�\1P�QM��X|�d�pK�>R�|/�,��P�79)�\U!���G������,aE
����O�t�Z��~z�+儐s�|��X>�T��a�&\����*c?��+E����5s:�
A:h�Z����(<(��燽��U����(��������|1v�`�V���۷��?G~�u�ҥ��n���|���Ç..�}{��
�	
���%�5|�����K�Зࣙ~����`��X�l��kiW/&+p�֤'nT�m�A� ���Η `Bi/;����p�G��&��pg`�[�Dw�}��`�I�4&�<O-��ܧ��r�u�K��E�y�>w#�|:{������ n�d�>��]p��q��4�i����<���7�xdQ"���e�(Qp���W�C��a�2Z�_�n�g
���21y�w��S�4�Ng�L�+k�WU� �^Tj�YH�/TU�P��8������!%�J F��5�"�6	:EQ��r����E��\Y���n��9w+
(�<�ʼmUyW�^ߴ��1$����N[2z��{���*~���v��.��L$�bYv.EQNˉD�u,�z�բ�@�=�g�me� �j�>��+(�l(�� ���]ѪB����|�F��H$������sL�\D(��N.W��hT/���e��n�Y�	�%9��*������~D�qR"4���X�{���3�LL�/]��NiY).]��N��_c�az��������=�<9q�y��:���۰qrss���
3�cժ��a�&̞3[x�b�9��g�s�
l�>=l�8ue���O???Gb�W�o�F��8�˯+�}�%�D"aL�Ý2�މ[?�1��9��2z?�}¸�=Vƪ���`�1}�חX��1T4�kS�k�Ɵ�~P냱�\%�Э�Ԍ����^'��jI��"�6�q�Η b[X�I��g��"$�${�9�=�uE�`�*�
/2��j�=6��p$��3���I]������=5~@�**��u����O��̙a�����O�y�X�=h�O�����
��vv+�c�S�t�lݫǒe�6P��H���w���Dc�:2)�^b1�������ѣ�Y?s�^|���jӌ���h��ޝ�5H�L$�
hG�d"�0N�����;�s�<J͒�{��Ǡ���pǯ���=u}_����߿��r��oC+�$!��C��zh���
q�(m	l0��J(�*E�t��ʰ�S!�[�x��q-:�8�u��c�o v�*'��:�w䳣��{o�<nւ�X,�*��n�.���� �@��Lι�W�{cM�o�����_���zz��EsΧ��@��"���x��O�rE;��u��^LWSu�:�JH������6>lO�+�eӋ��m矘�!��3$!�- �yV�u~@�Bu����b;�_y���űۯ��	)WXX(�`|�ͷ��ÿ���`�s/��2_����%�KFB�����вe$��%���ɳ�� ��d�����K
Dqi9�?��BCdy�h��%��Zng�[7a���7p`�7mZ�{�{J��N���1W~S!8(��nS��b�%��R	ۜ(���f?�*

��T&zl|��ݻ]_WU_4��b;t�{�D���KPx�B!e���$���uP�)K�35���w��u������n���=�Vp)ě�S�tQ�u>c�I��1�Z�[Y��Ϟ��X��ͩ��~�������_�=��5��^̠i��L$L���/�[>�`�!k��s�1��L$�'�-�c���׋
�.g:5q�%SB��Zu<�Q��h����Q�^��A���7�xd	�az1�J�Xܞ��^��w#�<�1��^"侾xq�
yw�@�_�5Q���R�(j=�=�$y��&��T	Ini�&q/=W6�K����a�<�S�4��}_�څ��z����HI߷\� �a��]1�M�."��/w�
����6ɏ�(Pk�)9�5/��}����brin~�+�b��
.�_.���r�gY�]�H4Ǥ��
4�}=^C�@�?#U2�+�b�|�=m矘|cM�on��M�'��C�7>R�>ڏ�خ�3��X������k֮�^ɧ�;�X�B�7��P�|�d>tON�`��7���W
���D�Z������>,
���\�ܵ�M�`�/1d�x4����0�E,�m�h@�"�N����fXh��
t"����{�@$�9���<���s_{�~�s���h�UH�Ң}GcZa�^R�-B�n!�πjѕ�"�1�YZ��޸���i��o�[E��Sz��{2?� ���QY�
?�jȼĠi'Kr�<�)*?r��Cwr�O�[q����ZzZ����۬���
v�O�WEt�1n���;����U;i��Y�r՜������:H����g�b���E"��.��0n����o�i�[��;"�B��!Þ��{�`��������jT�+P�σX,�٫W!�JѡeK����|��EtM�g��(��蛳$�B֟7q�%��x�e��&�Hf���>O�ʹWڋ�=�<���7�xdB���p\�^-�}K���q-�M��i�g6�����kr�qG�g3���B!;�&͖\/��ťX�<	���2p�&���j�78�S�$��)$I2�a�S�L	�$g��)��:s�%n��P�Io��dt��О�j���a�M~	2Ӳ�0�U\W�r�%�$>��$%��~8�"���&g�q�$f\�gYv��p�z�B}}��>�T?��Y&r��נPlO�աW�.
P�<aa���f#��[�O0,��]�`{j��|�k�o�ƚ~�D����(��?���>q�uJ4B���Ç���|������C�ef�*���Je�w����݂�:u��MHX��Y�IC`���󦍟�ⅿ�ꭕu��e�g)o�����q��C8�t�	$�;�^|ќOXlP�R�˯���Q��Mc���رe�{��y	�o�Ff��ca�n]:‚�����V	�t�4{l=$$q�nnԧ�".�p����-�S���Aat�H��pn�^��^oRZV��2��?]�q���3�5����T~���bq�&���ڞ)My�D�qH�2ڊ_�P�C
ExG�7񇟏)��D��^^��WQ�6�X<� �����g߆�lB�<�ty������1�ھ���D"Ѻ�=Ьis�@*����e��k߷��}ѿ'<1477[��=�.���䊴9��/)A���fS8¸ܰix�9�3�?���*p2_�k�-�9�_Z"''��θD�ᄸ�s�ߦL��"��,Z��ֻ-ןS,g�E�OS(��:�x�����^�#zc����,�-����v>��HS��(P�L;j��ǽ2)�����Կ���.)aQ�����$v��]�;��Uo���jx`�u:�4��em:�xbO���j���Gr���E%EE���(��H1u2���nHF��7|�$�� ��2@֟���+�˷6ҫy���Ѫ]�w��l�vѢ��\��N����}����ջf��<s �a!d��$�i4�^�NVo���RSYV��	ƻ�RS��V��5�O�=cm���ژtr$��'��q.ښxG�D�9,�B����'t,'v��9C'�ɷ�Ę6�>�ʗ�][^R�������˪����DqN�t߾��z���y��W~�(,=4ǩ,���g^|��>~�'��;x�8'G�$ş��O��^�4~}�b�3W�W�E�uj��x�az�b;�t\=�†u*�'v�k�ʋ�F?p��v�"%�҃��ž;
k�/��8�	1@R�5k�c��0��@q�N�����!Z���&��Ri�����]S����	����m�e4沖b�5�Y�P��?@����)�n���֎W�bD���4�����R���L>*��N׃�Y�(�{g�iB&LA�8��k�<�z�_o��KMM�5i��>�[5�t��O,��h����	Z�@4M�$�B��xm�������y������^�����N6=5~@�_t���}\UUU�yvf|�R�d�x��޹/�sBwnwF�X��K��0�ao�2�ê�̞;w1�Y����p�~ݺ�Pᬽ������s�:�g�xU(���7F_�����4=�dXL��Ҝ�&7��F2���%��9Sgt}t��N��z���K���V���h�_�����^U~�������!���m�$�0�?�&Oi//�g�ܟ�~mAx<4��8 �$I��,+��l��9nZW��/�#�$]���i�̴,Oԡ�/!�MC���j���&���?�:V�W=o2~\*�q\;���2�L`8�'"3n�6x!~r�S��e��3ֶ���3�$�i��?�0�fڷX���*[�GB��P��;F��i[���kͪ����{���Iz�'&�r?�yޜ�̨���Bh˖���vQ�����;�;o�B>�ZL
���{��5s��UO�B[���eeՒUZZZ�TWCOӨ,�@��صs'ƌ����Z��ť�4N"JMe�u��_m�={&�9
�a�&s��=y����%>��X�Ј��է�����8v�,.|R��w�����wji0Bj�K���챾;
k:vbܮ�o�T��ҥ��!%�b.�Z�Fܘ����|yJ���,}3>����ן�c�`���A����v�c��Ȕkz�L�jKq����ϔ[�L��N���-��D9����F��Q�f�1?(T�6
��G��B�׬	��58�oF�����r}�:yf-�^�����x�0��ۃn
���9�/==�¢����ѻ���*:��Trywnf/Z�h���ѡM���ܔŖ�*��.8R���G�$]h`�q7���T���m�K$2�0k��A���wޱK���=������9���U;#n$INc���%��>OL�η\i/Z�xPw�xWӁ����5�PB)�F�v�0~�/��O�5k;E��{1����>\zG�T���м,��z����Gpz��/��$�O�i�@6��+�Ò�[n��ΏM�_���R�4
�E(���A�c���,5��y%al/��
?�CЕPJK�^�j�E�n�D,�JѴ^���^��ғ>k��n�!�.o�i�K���98���3Wɹ)<}+`6~v�$9�a��J(˝u��>��[U�Gv�O�2"2V����2m��d��@2�����^�m� Ů�gY�-P��W��K�c�"I�K�a^��aA��ø�C��K����%#?>���L�;#�V����:�@vAN�����{�B���s�gB��ǝ��]s����p��t�
�8  i����\��I�|���ڲ��v���$����{Ge��*�+�k�O���-�{P�՘5s&���1v�3�wB�{BCB0s��[��u���[6o�ܹ�! (�V^G���ᦼ�M�C-�]�};��#�3`i�����Z�v��1�k��m�aҮ5oϞ��v���v-#e��7�_�<h\�~��+
�ח�[���j- ��	9�Z��_��c�D�W�2������/���#?��L��}��
�`/���>�x�����B֞����"�9���#�U�s*�gL{ZC��Y�X$ҁ���g2?��cֿ�#O�+�F�m��&x���*�th�Ց�����3�J}l&�B�<!n^d�qS��r��Y�ƾ�.2谽�0c���]i/29�.e�:t5h��ޝ�%
LU�j�M��B�Z�(W���/�K�����_W/��E�A���\�1�]oz�*�
W�Ú�{֠?����6jY�����MW��ɯ��6=��*
:J�b�$��,��H$�ĝ�K�$��g^��>lR�.��L�bw�x�bX��W�V����Z�v��5$����xDs�*h IDAT�v��u��~�D���e�_���g��ys���#f�_�gɦ�>u�E7
�L^�s@D�H$��ϏQ(TJ��41a�&�����eJF~ܱ]B;��C�&Rܜ�L�~	�7kI�v���l�#���iLE�A[Ļ�l�k�#W��{$�_<�A&��~C�Y�rՓ=���H�G5�1GG��itu5|dR�;�ڃ�Pt�i/6m���3��?�XG���K$B�α�j�q������/��i��w�+(�����@dp�9�p�k���x
f�\]�ɳ��N��+N�v
�����O.h�z�c�۷I
��'f�M�v
e�8���^=Pp�S��v�~���ϼ���"��`�L�%�$Æ����ݿ8p�F����ju��K�]k'�zl1���l�ȼ�HW��'s�t��sW���)�*�^����[�S�=�6�55�u(ߖ@�p`W�R9��p��}{���o���x}%N�2e�_|�Ic�gd�Z�:�L'I򜫛O
$n�y��R����<�2
��&N�KP4���gvۋ��f]M��w�x�#�z����B��&���%��^��P@��W�.S��z�M:1l�sO��?Luu�IT`�b��z@$Gf9Y
6�;�$���1TT�_lC��:#��S�dgC�0K������o۸�f����
o�T(0Ιg~�)��\�1ewӂfM�-�����;��)�in�+��a��}
�M��9�
���������%�	c:#�i߱k�vb,�f��d�&R��Eh��޹���0�8��		XԳ��n���
�����r �HXTӞ@5�3�}`��n��V.���`�?�D�JV����Ѩ���
�L�c��/�7�~�dτ39o��:�)�!����ki�[{ά�: ��Z�����M�������i����6\H�H���[��?Y�0%@���ጼ��g��֪���{�<o�ԍ\u;B4�����6����Cw�Ӳ������ fLn�>�C&��o~}����5eZ���UE%yM�v]]��\���$�a����?@�G�Է���������F�s/ǖ^�2�TB9ž<�n�ړ�q\,ȓB���O���XIDW{��;\�m��������[4�t��#������u�^-��U�n5Wm�9���O��H$Lӄ��n;������5�ݻw�9B�x��p�;�T���{r6|��9�q���3f͘Il�|#g�Q�EY�2��ٕ���j:и}�;�#nܚ�ܷ���m��H'v��Xˆ�ڞ��m�I�u��0=ݯU��!��Ԛz���R%��Ηv��
���^��T�l�
��e$��v��&q
��X���6��-X]�%��?��]��DBQ�D�Q�� 7b���� ߣU����`��$�S�
5��z��}/��w-aZ*��zvm�V.� �z���J�Zy�\F�f�g��pנn�·�����2{�X�3��B�bz ��'�X���x*��p���.#u%+ܴa���ۡF�J��d���۾{�̍9��n��� ��"P"L�M��NF�T*�`�Ÿ��Q��r�<S�E`iU��e��i	��a���H�B�ex��K�����ߛ=�m!��n��s��칮-�=UD���1�~�TV��-�ɢ�`�qa!��΍�	���%�S'n>=m樭�DY>?w�x��6�=y��9�a��'J��4l�F���<	��z���ƛ
��P`�v�^�g�dZ그�����,����V~u����w./>���B�C{m���S2;�vtT�t�g>>~��JS<<a�B���faaĆ�7r0r��`���@�V#�П�8�����T��Z-�����w��}���#���	8J_�BS��!e�
G�ܳ���������>+����
m�Ϙ����%/�Z�G�{���A+����R�6���kh�{>`���4!��]�y�C"��H$�M�e����mJb:@p���Q����D"�(�*�V�A�e})��x�j�-��S=-�[$L����,EiK��…�\׮qnk��:��$�9.^L)�ܴȞoO?	IN$�Y}t�8.�\uw�S(��j%-B[�U��-�W���՚�۷��d�mQ�Z�zʙ���jM^f�pV,L��Vz�9��V_�zz���T*���:]e+� "-�1�c2�������=��Q��N��Q��@#�nk/�n-ijA1�
�-�ƍ\�d�=�,�k���}�5
�䜿�Iy^a!�{�ɰ	"&���׻u<z8<�#���9��Ap���,kӆ�o�0q$Oc~��J#t�}X���������W���!�lxڋx B����x��x�.\�x��C=�<�<po�Zͽ�j5ɺ�{<�<�<�<�<p<� x�x�<�Pn$8��aa�M�gڵ�>e<������%��/�g'���1��t&�%�m�l�Gk�z�X�*����8��1�;�?��'I2�t�j���B��"����Nj��A��gv�w����U3E�7��z��F!�O<�PB)}dXܣ��7\<�w[�;iٲ�4u�'��O�	�d�*��X������E�K�>$�$'ZoX�B��ȾM�3�����m�2x�O���I�g��88hv�����#�~wȼ���h�l3��L^sn��ͥd���vdO�sp�<{�[h�遳g��jxxD����x�No�fO�0��_�Ԓ�܊����jI���wB7eX)���zD%]���#)�Kk�vj�L���#ںG��G��f	ƍ��&������Ÿ|��w4۞���숐�@o�4�:c�>lxnE�a5���`��'�HK(?�9q�3ib��J�_I^��Q��3ֶ�[$�Th��d�}U��G�[�CWd8��P�I;G�u�s��@II�(���G:N��W������{3$,��q��2�hh\��K�Q�,�
��3G����lO&�0M�.^�Qo:rKk�}��]�����{�Zm��4ݸh�Fw��M�I2�k��gZ�P��f[���%K~�ΟV�x��D�!�h���ƬY�ڥg�d3�8
�>��p1���k��?��>2&,]:����.���|�>�4!M� !��˖�C�-�!2ݩ_�u+P��1@,AA��(Ө:
��Ny�n�!��C��!Cf�riQ
s���zPZd<$!����<��y]��I��Ə<A�=cm�M�mW���E��}���>�ڬ���M��I��7�eb���@��9{U��9	��WZ�N��J1����[neݦ��AR�:
�r��p�!�p�m6o�Ȟ�~c�\����zti6��x�<���ޮm�X�'磆
���1c�򑝙��J�>��?o��}{ٹ�&I�XteI����h��z�_R�����V�u.�n��%��h֫s�!g��^���ɀ��n����Z�˃��̸�)}���С[$Ƽ?��e�<̙�.�����ϭ�x�>�vQ�Q1�s��nٜ��tB�3��y����>�H4�����8�7b�q�[G�U���o~w[U�'瀑���>�$���3E� �ih8��VAͰ��j�?._����=c�A!Ě��Y@
9�/t��|�g���&5�I�h��[�V�Y���1B޻���.���[,�[Mӽ`<z1�p��D,^!W(��ϝGPHH���l˲s@$�S��iT��&$$9�w�4a�
`��$�S�i"y�L?�
������c�-jt�iN�LX�m�ӛo
�ح��K�̲N���˗�+*k�ҥ3[^Cd�S���6��pm.~�u���E�-"!��*Ә:
��Ny�n�!���X�x�?��IϾԾS"��_���p@aa.Ӓ�IK^Nپ�?���k��=B"?O�t{���!`nhy3�PJ�2om�WB7��6N�	��豴,z�X�u�>�g��N ½��;d�ډ�+'��
�W�;~�����S+M�-�@���=����V�%����0��sE"8�}sYK��-�K����
Y>{&��@�V�ky���i_{�xr>r��iW����]�u���
���A��II�c`/���u���l9;sER��KU:�BH}�z�_��`A¥����~�{�KUѤL|��w��j�T~�W��?,�����������7���{5�Mly�+4U
e�<Lh]�a�0��v��������h�K�*���}�����*��V����PX���(#'����ZU^���oǠN�>�諯xK�,)A@�Y��\[j�{�/tJ��j,��!��^���PM��씐�a�aL����9���V��У{�M�7�E�9�쑶�tٸ�<��,��L��f�D"�BQ�$ӽ ��|�"��%pC�M%��,��W�9�|o�g$��8�0$�8�Dz,X�Dz`-�Mϓ`8�N;�'����>Me����A�沍)ϑ��Z���2w\�7��z��Nݬe�U�}T�^9J$���-�2����Q�Lw�{�uky�n�!*V����j.�_ߧm�ۣC:�O�-H:QX�˅��$
s�l"��[Lש�K��Ə{NЭ�D"YFQ�2�\�F�:���-���D�`4�*cI}v*�}pz�m�K�ko|H����!���m�oX�M��+”��[�]�y��
�����a��D4M&#
�ښZ��k���5����
!Kt�	Ǎ6�!�	a���G㻣��AA���
���%�5|�+נP@�M���w�$�t�ih0�����̬,$%%���v�b�6פ�U:��B��^nǢu�_�{2�4����D�h�{�#"�͚H�N\�廏D��KU�nJ���x�@ ��U�'$@���X/��I�1�`@Jr2Ž�������M��1Ѣhj��*m�m�ڐ]��~O�S�ɺ�adt�ˮ����$��jI8~�����*�?�j���A��t??�=w�"��a���eZ~Wem�bR��~�w�oʟ ��a��҈�	O�o���mR8"���m�2����tu�/�Ze@��P�U�������4�8y��!��*�T�[P(H�H$Z��
�����]�qOq�
�%����j�s_�yy%`48�U�>�i>�ͣ>w$�6D,gt

nE�`��h����$F,��P&�d�|8`9��`�k�EH��p���(�\��[�5��J�o3�~*Odw<oyve���
ۧ�Ƥ-{�	�o3���Zz5H7��nʰUƱ<K������$ᐒ�N��(�SNMe��GmN�Y'v��P�������hύw�\�c�ý��&��H�]Z�F�c���o0kR"���ӻ�2��_�*�<v��̝'�
9����Q"���e�(Q@�%��J���3AO�VIѬ>5��#/v2f�Fm6(������%���%BB�X�WB7q�>N.����'����N����@�>�<���R�r���½�1�ɏ�F�M�4�|i�?E7p�Ǜg�3(i��6I���2-h�F�h6-�YϿ��iYgL_v	4M��L[G��
!�y�.-!ؗf�ʔV�!�����y�:�z?�}¸�22�#�$�	�2H�5sH��7���J������;H��gjFV^���xэ��`
L�ڂi3�0z�[�˃���#�$ܞ_9)-���l��Tݫs�C��e�͚H}���-���$p<��J]=h\�����//P�O�%16	��Y��Ze�'�<f��4MC�q���e�>>�{lqzf�{*�ƶU�2�!�ѶU�-8+���`/6r�'�(��u8���|�=z�4�A�c�o�
�g���]/�;�Ɵ����<�_O�Ӟ~zr��m��{�-�e�u�VW'x�)�0I0�KHr���;7n�`$�<�ϝGD��U6�e�0�f�|�$��)��L���6]7;��5Z���Ж�7��yo���79����V��B�E�t��	�d`��-�Zp,�$\���Â5�p�`h���'�#�����}�7P�n\�5�@j>#�V�ƒ�P��W�uĤ�۸RDAS��O���uљ�j�nV���`�RA��B���\�M
s��D��������I6U��_�W���Ao��"S��"���->c���߲�N���9��^�=�O�I���1ywƆ�G0kR"y��L��3�gR�0d:�I��'G�
˩��$I �ڑ$��l�h,y�?��J�f=�>���~i���%���Ht�e�v�y�����EQo�(_Z�7S\u!g${���rSH���|�B�G��X">�H����,K���F��+[۷Ai�vh����ٰw�OՉ�1Ý������_l�����̶￷����F��G�\�z�Q��M��*-N��kR
eK\����vQ�w�6�i�˴��]���
-S���X���>M�˴	u%��_GD��y��blM��P�t�+2�*U���8�ZWG��}�J}@x{�J<9�It�H�z
?���x�MH�>��O�4d6��ն��:vw9Ľ]�p��FfB�Q\Z^+���w���NI#
(r���?�hy���ﯰ"���3�,\�:^�;w��N��I�A�/��a��4�(
;��tu5n�0��'���n��tXL��*G����tb���J��4�a���{��֘7K>w��5o�p!�[P�;wr��A!!�,ר�Ac���ǜ$0��4mn���f#ۡ~�ȹ'.^�|u.Kp7D�>5~@��a�gq�Ȅ)#m�IӴ�nE������0��7o��#��\��������t	,�4M;\ǜ��z�����q�{���t	�v�l��;�scȫ+���n8jz���kꭟQǻ�޶�����ծ﷗k�%J���ZǀF��\�M�*���}Á���=��W��w�o>T�(-�9ӑ�mv;�Iʺ�g�^���#y�l��nS�nh#�����~b�OSC�P��a
�6g����k�B�(�LًC�����C���8ô�N>�D'���l�h��G�f�/j�+P�T�k)�9;�	���+%bq{ʸ�J�z}�k�����O�������0
�,˾+�����[!�M��"O.�q&;�=C��Ƙ'���ӽ��=S;�=Y�����zd�/�FG��l1�n3��!4̈��z}�V[���"D�ƚӣ����#:��r�j
�K����hIj��j�k����u+�KX�*��.QVȼ�JM�7�V��{��|�L�1�����|�+u�%ǃ�C��5j��^��#��y�p%%���*�(���$�4(�rP	it*DJ�:��9p������%�~���vOL�Đ�n}4�)j�@]	M��U:\:y
��������f��x����v�,�@����]��@U�j���D�V�y�H��J������cb�H�h7�*6G�!�g��2���M{4���u)\��Bd��N��A��f#�4���|�d�$˲]�O�օa�s'{���L�8�����;��=���
��-p�8;]���@�&��H�y�^�6����WS�A��1#���ݹ�y㒄|0y�l��0�����
\��˲�Jq.-
�A��S�/�3�e8��U��nc��7p)+���v6��+'Q\�E`H�y�U۰'O����?�H;�gK�7dZz�ؐ��o%2���@�~�+��]���G��še��`d�G��i4�{�TC�k��cy�8�[����&�39����#i�l�%��I��"+7ˣF�P��
ue��h��8��"�#@iY9��)��Dbt��$� IDATJd�eM\�L�w$n֞��[H�_k��}v�{4�cx�iӆKOO7n��@JJ���98v���Rk�80����=��Z��m7Q�0�Eō^}���W�-��8���X<���sx�=`^6�D,�J���������b8�,�WѰ0�z�s�Q���J���0��4�`
�HQ�Й0!��[>��l�^���9{Lu5~ڹ�:Ƣ��.����7t

5�'�u��z
��� ��]����C��:��������Əs�3�>g�,vm˃� �����1n�DD��7�x�����Z�J��K����$�'������Bg�� whq��%����pG]=px�VQV���0��ҋ���m�ee�J�yA_R�
uEͦpD���|�N���B��My�r�E�ß(���̂Z����cF?�UQ�t�÷O�T���z�Ȓ����`EXiY)


����7n�y�ѳ^��z=�����sU���f���1H� �L�ߑ�a�G��w��W����~�$�pa��c�A2��N�i3�&�d�J�Ӽy$.\��㦙޵�E˖P�*p��M��;]�}\�VQ���>�t�6��c�1U�>P�9���5��)\���J�c
8D�	q��3ֶ�{"�� bLƩ�t�4j�����m��4�ho�\;{�
�cc
���\�?=�@����k���^}��L��W�B�q���.ff"�U+�!�����X~I��A��_�q1��kQ6��`�fd����gP�#"��'k��Y"�U+�~
�M�)ϖ,!�[����HI�(\�*G�h㤎������*ԃ��ZK�����3��$�)))D||<�ꔔb�D�'�ǎ!F��Y�j[�xX����ѷM�H8,Er�gO�F�"�<����/��h�}�a��]M�2y�mޫTP3� �RÌ���ܫT�s�N_�?�[E�:5�.Ȁ8��� 	Y��5zdf���2tsVo��N�M����4����:~�����ӧ*��?̌�v.���v]�΅�pYGh|����^�'�H/#�Vhy���J���(7%U*�[7ʫ���\�i����d<ؼ��XM=M��3���PU�0e�4�y/��H��Ѧ+�-��L��-��5�����|��fb0h��Z�R���Ri�71���ݻ1�'�k��Z�uZ��;��=�0T�+�{kXz�UZc�@�ŕTi���;d:���S���Z�!p�0�o��Ƀ
�O�1w�k��|��M��Ck�l]�,wl����o}}}�����z�2��X�����ɉj�}v*Ú֥:z�z�B��Czi��mR/N�n]�Nj���h���V�P���e���Ν��%z=����Fch�۟�ȹ��ݯ��|G��I|����~2��lv�N�H��e�`�a�XjJ��E�h$I�Y��7���.��ao������P��h�OE0���2��v躯Dl��qO�^�{�vm'X��E�G�Hv%Q�.	h�\�t�)��GӴ��r%',������qdR)�]�V��,ĝ�`^ͽc�6ü���L��Z���3����_���,e^��4{�y\ͽ�{l!}�<t9��"7�u����۶}#H7[�m(.ff���s�o�Ny�xЅ��q-QZV��*������Ƀ.l1��[r��J:����~Z[��7�iӦM�Y"k"_�H�"疲���~��2]ũ����'�v&ZG�Y�c>�@/�C���q��
X�[B��b���
��"gvGq���(�1ֺ��p���qM� �FeN��0w��Gfj*2RS����+ӧc���>���G���۳�]zɿ�3\�a} ���b*A�D�I���@���Ŝ��ſP�'Lt?���+$m���42�� �J ������P�*бc{�J��p�q�<
���Wf�0t�g�����!Kp@�qC*Wss���ѯ�s*`��b18��[Eg夦��j�2,J���hӚR��/v��
�ŦN��722��۹��t����j��'����1:�*���K�O�Vh�*��>Th�a���
W��|lĄ���X�̧<�d2_�}}!���T,���x4�N����T,�N��hfưvkx�D5�;Ɲ�i�a�h�w/����(>��qȁ�	���Be�P]�N@�&0�4��m-y������b*ˋ�V����W�V�돃 �F��f;u[��g�㣨�����lv7}C����4����4�^ł�E�zE�7@l��bC�\)*�*���z%Ԑ�6[f�����&�?��o_�G�9s�g�9;s^���=)���q��@�=���X��[3�Z����С{�<<I�Zx
�o���ґ���*�("
��2#�),,‹q�ĩ���c����$�%�~�Q�y�p���w݃���ïO�9�
'[�E����gE1���҅�-�Xs��~E��c˖�8t�n^���}��v�!�صU�q��ax>f�����w;H��<֑ͻv��k�߼kWT}V[�����Tqق�$�����.-Q�ȥ�=z�n�HHwr�L��x����{�Gվ��2.��CN��䗗1EХ���9Z
����~k[��N�[א�x�����G���u}��/:��#w��s}�L},�p��g�;��͍�6B�B�I
l�, 绁X�Z��:|Vo�q$��E����Jf} ��,�ꋟ���e���r�Nfs���n]C�	����u���K��Ѫ�q�G�g���ghD���UU}�Zn�ѐ���h�;�����y
��l%??���d������N��?�I�y�E����*�����3h��҃�����|(k������kltfwH3�7��V�����E�\ٳ���
�'�����Nn��"kE�-�����Z{�˲jE޳s'��V���.�;�;iެ�-���}ub���	���\<0�S�E�R���y��6Q�=݅P0�th�2��όg�c�ѽ?����
lޡ	��yْ�;,Iq�<��S��,�q�$����Lm���B��:y�N�LF�tf���'~[T��#Ǣ �l��}�S��p��G��c�NHu�®V�Tɉg�"�^}�s�2�g��8����]Tv�{ę��B�����-���2�'%!�ݜ<vfVK�@q
�fJ�¯�e,�t�Q���?0�OѡMk�>D��t��$ߦ:�{g�ε�7�e�xx��A����Lm��N��=þTR
��
h,Z�_ғ�kv��'�<��ѥ����5�.�rR
�A�m�))�N��s����FRR,�:Ѣ��AØ������C����>�}ϼm2ֹe� ��X3B"�]>%%����|>9@�Q�w��;Ze��ܪK;aɼ�:�?�V�ٹ[�?���wn�ۤ��k�E#�6���J��]� ES�VzƵ�u��3.�R�:5 ȏ����Q4M�d4��t]�l2���O�49j��G������f�9jb���W^������d`��W&>���.~��T���'s���~o6v<���BѾ�$�kN�:��S�!m�u�k�iٜ���T��	���~�3����?�u}d�+rf�̙������֨�Gy����w���!��dA��=PN�ϫV���#�%���j��ONI8�{�xc��EIA~����M�>`yF�t�8!I�[�UU��d0,uy��CA��AAXX���r�a���(�;�����#o�~*���i�
�w���E�f,�駒�+W�9���	��-�B��'��/Z�$I骪62t]o(IRzr�� �,syi�{}�v;WL�����٭�Zv��вs�%��i?ʡ�e�e?�?������:o��yy��u^�hҾ��������:vl�۞=��v�ҍ�>�t�]w��(��Z���y|�a^�W��O�w��]�uA4�3��E>Qi��Z�{��ȣu�G�{�צ=/D��%K���պ��c�eG�U��T��N!�dB2����&�P%v[���4]�b��.Y��W�-�1?(�������#�۲���d�!�~�SB����/,�;�[ըb:�Ay���_�:��2��Ea���`f���@�Ed�.�PXi�W���Ew�8QD�:KO�U<��ճS�]2z��t�pf&/�l�JJr*�U�$�r��I�>D��D��c={���9��߻wEK��ڏ��J��n7�Fcc�*+��;�E��Pcr����Ͱ�H{h@c�H���:�<L���i�£�t�����,
s>��Qr���,�@W8\��e�P������¬|��CE��t>t������6���-�;���Q����ڣ�ԇ��)
FV������c���-��}[MҝxӰ­�bmH��^����t�X���Ϲވ�����X�U�A׋��[L~f;o�G��9�3�9��a���ٷ�[	�d�V��'���W^�[�c͏+�[��w�:���b�(�'gK�'{B~y���}ߖ��m�N2R���w���e���N�j�w
t:�[��_ :gf�{<|Q�����7�:��g�8�6�
����7�xwTt���_����L��^���kZ�C�
��G�H���{��8�����;)+� -����}6���jӺFJ�ڐ�]�]�Kx�}?��<ե(s��BR��b��|��f������{����N4��L'�Lʋ�m�Z�����D��yf�L~�9:�m����~mԨQO�/j���<�YN^���{{�{�r��rK��r8��kc�W��̃��B~�i�
��o9�q��~3Wѡ-�mE�(x���A]Z�-�D�@�߻w�U�����iاavIIIߢ�r��zf����%$4ĩ($$4dw����"�O�w��y�IH�M$�����i�v�B~��Y�M�bI����	���Ͼ2���T5t��w�cP4�Y�M���w�1�r�������"�l�,|��N���͂,���];^*n��_K��>bw���R焄�t�v�� VK��z��zB���<�U��ʴ���jy]��C���?��m�+��=(�kߐ����{o�O�$|�a^�:�W$�j\	�9��k�[Шbz��j���"c˸��A���pf�j��C-3ӳ���q��f#�V�
�6uH��s����_UW��3?���˺���e=x��~�6�z���a]�}
��=<�InM�����۶am݆�;������t��U�]K�)�O��\qi����:���ȭ��uͪ�i'�[�����dge�����U����V's����zR졦z����t�8��٢���\�gf����ڵk��+��o �~Yd��!�:��o{�ł�a����vI��WU����]����7lߡ=U�~ANNN�:A�G~�p����(��$��쎂5��`N��7�x�K��D�����<��NJ�Ӫ���c�g]]#/���j[@r�G�*�v:䷚oٷ����pԱ"*�|��$�GN��}�B^[_y�;u�쒁��\�8���59P�+u���뺷���ȑ:���{Уm_�=��X�J����2��M�M8/e�'	q��f�#B�<�<��멃�.\�p�n�V�����g?��3cM��DZpm)�L�-���X�J%�g���]�T���mۆ�ﯸ\���KB*,ʽg|��|嵏C�`(��A������')W�:�3!/���9-��.�}V6}S���K�PZZ���9e�=�uA~��	z8K}yn���>2�Fc�_ȓ{��>`T���5�R�'��'{��ټy�j` UU�;u�p[�>����9ԭ[��m���ǚݩC���x!���`��gxh��@�pZ�@���PFk���8Mә���3!�@k������A�JV���_}��_�w��{��=t@v��D��Շ&Κ�xͺ5�eU�=�w%Wu�������֡���+O$�nz�����=akڷC��t`~�j{O8�I�y񬫿�"�,/T����7��5}~�
CT���7�j$��X�8��-w\��0��C��X�=2�Q(����7yF1�aX,XN��m�g��PT(����3Ƨ�/;T7)�U-���e�rrd�
7��0���r�<���m�z�7�>WW�%Ȟ.�=�TW�`q��OK�\k|�
�~�~�=:?o��=�L����~�˳���լIV܃�9�^>8�V�һ��tݺ�����|mD�v��y��nr�$�Cw��A���?I������n�a�|߉�>�QӴ�
�m��/��oIK��3�')�\���w!�C�K3�m3��v�><���9��0�@d�e(����1���?��$랯m9J>���bM���<�	�wnPt�v�7���F��I���g����e�^��›2���&�5��@�^Z\l��������&�m�G\\���u��C�H�30���a�#�K�3`?Twh���uͯ�\�أU����A�i�Em�!��C���UYY�ׂ��z2�e4M'�i�i�/|�P��s����[0�Q��S�k�v��y&��T�!gD%�l�,���lUf�!$�
��@q��
Ȉ6o��@$��NDt�f����ڸ��1��HN��6hħR�ˢy�jՊ�#��ճ�����;�y�&�4m��u���|�_��w��,��,g��A$���/~Y�S��#G�w�l9�¡C�,_�_0�^7�֍�.����Ά/�[�BȒgv���!�:!�x;@ȅ��h0�3SS�&�GD�AYQ���7�M�<sy9i@��$K��Q�F��	U���'���+�F��� 
� �>v�䪎����L�:わ�i[��k�
��O�-,�b�a�hR�=��H�y�:��|s���ł�p��;��g�zF��s��/��U��z~m����i��M�����e��
Cb��Ϙ��ƘX,X�vc�LE~�����$�*�=b0��q��ۺt���y���q˖W��L~���N�Y0����oE�,#+�c����,�X8�Mm��#��µIw��\r#�g��}�[���;ӰX�Է��u��1
L��̐��J>��o�dY��3����]��4�^�6DQ<X�}���e�̹P6����=�_o!��r�縴U#M���[�X]��ܯ�܃J�YV^�l�KW\q������x�O���w�h_m���_��+m�;��lȋ�ϣ�%�~R�ک^$�a����^z]��bNs�����qNZ�������-9e�����.걮�?z�sϪU�G�������.@2�FIj� ����Uu_8�y���X�/�t�V8�{6d�C1��ÙT��C^3��p�HU��SQxWU�͒$��C���� ��"�L���"S���=��i'j<�����^���3ݾ��6���v6����h�6H����~O�A���R{��C1�C�k
�'��+�Pc�!�b�!�b�!�b��o���$��Ճ�C��(���9_`�?�2w�C1�𿋘=�b�!�b��,����#��fLL8R���&�>�Ypn:
�/�F���W�7�b�!��{�!�/��ߗ.��OW	H���uDE���W_��|�i��krΕ�\6�T��Go���gZވI���U�Y�:��W��c��`�ĉW��92�iZ���?2�������k&N����S�۽�_��Z*.��`� �pu���{�ί��J^1�PO�rI�r9@G�� |-�U���vO<y}�5NII=O�P�[t�D����\�}EI���i�+�h��i7|�!�!���#�Ɠ��B@?,S��_��ێC1�p�2'W�(�S����E�,8�L����UA IDAT����j��^UU�p��%���Uޞ�����O����Q�{NV�·��Q�3-�L˓U��Ə��������7n���eK��;f*�䍘4��L��y���#&��&}U�Mf��%9B7�s:�y�0�ゑ�8`��;��Yy}\0S8�V	r~�3=�{�4��s�=�~4u'L�6�����Ž@k�_48��
����H��:�>��/Z�zMk�٤I�˪����5
U�O�c޲�O�-�w��‚)Sr��g���bu�5�k��c*zYJJJ8����\}5/K��,��+VӴ�^x�Zyrp?0(�¦]�'N�
pj�vPU�J��mOJJrM�4I�4i�d��Lqqq	�$����0Sd=��sW��C� B���>{V�7\���Ɔ���ϳ�n4�l��9S��&}�>�5���>{T˒�u4=T��,��%��?q�ۭL�~��͖���vgI�SV����h�*$'4��vT>R_�hKҐuy�u��)/���/��p_��5#�{㯘/1�Cw�aڥ�j�}$�0B���`z���_����y��D�'��+SQ\.v'�7�jN��g���Z�%����U��I�cI�ZV�ϣm�"�N�" R�:ӥ���Z���Z?�~6d�)ynY�DE���`��R=5++m�����>��}}�L]J^����_|߭iĉ"������	:�'�<���ѐ94�:��۬������Q_��p)����o��ў�����*ʸ�W4���ĸ��`���I��z��fV�[�`��Ӊz]�v��u�OnIH��$�q:5���n���h���L������]w�:���ש�x�����蚎 �##{~���k��:wj��,ݟ6�ȉۆ�"t]QM�P�n4UEv��E��u��Ʒ�'��SO�����W_
K�U]G�52T�$z�kh:���6v/X�~��W�+�~�}Hy�Q��_��޽{��}��:�k&N�J���4!�N,��[b��#u�_S��*���C)�60��3D�3.>���;v��\TTt��������6a��h4۵k����ְq��ͻt����7�|=����l���5��瞻��g���,J�Xh,�h��,�scQ�g`���p�s'�ϳ����ϝ�C$ϔ�������/��4]���{T�v����i�]᪜��K�5e�%������OG����~�=�6��Ɠ벒�M�9�W׬Œ�&'q�C�-��D��4��t�%�F}�6Jo�1���u�x����bd�uQ�>��<��Oϗb�!��P���TW���D���-�ꆂ�����KJK8~�fs<:t�ף���[o�5�� ,I״��.YQ&
�ɲ�\�	��˕}��uƑ��a�I1Y��xae��o*��M��]E����2ϴ�$l	�����"f̝��]ߝ����][PP`���杷���܏�頢�:��-((��ED���\_̃K5�r�OX�|�)�[�D�w���Y��>�ƹH��ᑪ�=�֫2�G�����f�9����v_��&骢P]�RY���l@U��@QA�uD!=�
�"��r���(�6Fƙ��x�u��� �8d7���ª������b�7M��C����HIII�%gEs�����@�$�:�%饥�̘;��]���Ɯ9�(vBBW]'�L�Q�ĺ.�of�c.4
JKK���u����{�G+s��d��%�l !�DRR<��F@�锩�vb�;5���0f�l6[ݶ�j�S��M���5��+R����(ʸӑ
TE��z*���|�n���
�����G�+BHE�����רMYm��z����K�~��)�k��%��xOv{u�s��Ϛ<ݴ1��\]�!�x����0tT�^�)󈷶�78�kL@�Ncb���w`U�n�6u�Y�2��v���8��nj]��ДnSw���Α�͏��&��;!���#��d@Dž1�
M�q�5�B	�Z��?���o����7nt����B��iϗ8&���Q�Q��j5����ݟ��1�Cgu�Hua��Ν_��b��>E�C϶��NH��Rs:B�f-8~��v������p:}�]S�~{Fy���eE� I�劦�Q)	" [�2MӲ�lr��	�!�&��Q�������M�;wi,4m�·�6�G֝�R��[%G�
b;Wf�tӟ�y&�h�ۥ���$}�A$''�x�����˃�)))q�.��s7�˅�)��\Q�CIIIt4���Yhhu#��”�?nݹs'�=�����_�2;���;��߿�~#GZW͙3�(�y�sG�ey�׶���U@e��M���������Ǹv�E�ݲ�өPY)c0�e�^�k���b��<����Ď���A���,X�fذa��i����j�**.������*���6lX�\.]Q�PEQ��j�(n�(
k6mB�u,v���mۂ�0p�@t]'99�6m*;�4�TQ5
A�C�4����,���r�N�:�/���B9� ��J�Z�EQ`�?Ryx�g,��S��A

�q�d4MC�et]g����NUUUݶ)���:}^��� ����Cj<��C�mA�f��`�UG����=��H�,���V�O�=���O���״�~����3�~l�h~oq��o��N�-�Y���a	�  �rо�-�Gƣ)%3"�c�%�ޣU��l6�_<�����OA��l����)oR����2p��s�*�����Vy��ɺ�o{�[���ao�	��~w�/ L�E���j�$�4X7u���R�n�r��nVYV���s�dv�����u�K�t�����z� �/l�\�-W7k�/�ap�(���@J�~�L����Զ9����ʦ���_��1PT4}��ϗ,���A(�!�MT����f�����A�A���߀ ޅ���m�C�!��a�W����Ը��zxG�>��v1�w+7����U�۽;I��t�ܙ-9�q�2d���e���Bd𶪪�(�Q�ه�$I�$ȑ��$I�TU��'E%�.E�,0J�rYU#�sgyR��+z�4բ$��VJ⨁�2�w�-��~�����{+=׬j���[%��0�+�a��M̒�;�̈
���Wi�3�`�ܒ
�hԕ���}e�����,4�'�
��l��)��s���_e�m�Y�}�����\cݱc���,�3'G�(u¢���G�eyܝ�w�n�Zs��sg7me��}��/og�]�M�ݲ�,��\
n�To��[���zM��X,�����vj*y�\؅����8lذC@[G���j��"���"Ń[S|���aÆ�ς�phnY�t�-��pD5�UUA�m۶��mZZ�qq�
^K��n$y�����I_�ӵ���2^�)Q-�������X��%4i��ŒHY���4�G?��a����S!�9RG��v���ӣ����!䍓 �� 5���P^
]�C�`wy��;��=#Ew�
�j��o�p�2*#�ȴ~�p�����M�t��{32p	pp'���;��*�V�\	���k|EY���cǚf̘QCI�_�Qq:�DS�\��O>���5�U��fU��e��U��>DQ�A�ID��z��j#�<]��gI�:��.��69�T>�#<h�5Q��u�I�m��S�G�lw\���s����V��=�|���]���v�f�d�/i�mc�&�17��le
�:��X��:ut7;���
-A��7�|�����#V�����PCB
 �wq
"���Zo F�c�!���~����_8VY��n��v���Ź��?/��="\٥�g�H���B�9�,-g�-X/쯗�4�}���$�E��8�U�o��u.E�&�h�Z�����*L1����"��-�M~؈�|�ۄ
�JW9M��p��m�θ`
@(r�#o=^�����y����yT�2����M��gB0��ە�+��j�
"xF���.I_�h�i����[����6��Q��e�e�����u=�{�B�qKg_Ϝ9e��a֭[�о��f��~#>>�6�0~t��9��Tdy�蛻[O�tҰ���J'�ŕ:f��Νe\r~���;�vM�֋���NdY���A���_\Ga�ჺ�X�����3!�񫯾ju�
7H�.g�#�b&��$'rb<�N�I'���W_e�p�
����ө�nw
7b���3*���� ��b�PRR�������p8�ڵ+Z�HU��D�J��&~;��sA<U7|���*��?�w����i�S����ʂ�MTu��ɿ�>#�	�:tL��d8Y	�4�3�iWuUQ��./l���{n�bݷ���3���mc�����l�ܐ�ݮ/l�)�b�(�n��S��@��[[��ͮq]^�Žg�
�{3;��%ﱿ�P��~|F.���K/����(~"TYY�ƍ=z4����ϊ� �"�
�t��M�����@���Ĭ��3��.=�|��vo�T˰��m�l�6�}���7��4h��`���^�?'I�������sq�V^0��`����$��^�A��ģ�u���+�G�8M��{�f�!֚F��ǭA�
�CS/��ь�~X[��Ί83N�͕�����&4GU{���Ī�M���S��0�d��3C��뿓#6#��G��œ�8Qs쭳}"�>Շa��U�Z�n$���0C���.�L���!�	�"�e��0�[�|�IB�{�
*��s�G��!�b8

6iͯ� 4o��ҪK��.�ˇo)��=�ݸ����Av��q�q��qN�e��}f'TUVк���
,lظ���xN:����S��:��!�m5��sU��@��x��rs�@�Ͳ�ƫ@0J�G��.�C�Ve2���,������	��iɬ*���z�
�]�}.J|�����m��*	�ܪ��FxH����ra�ٞ��
)���`y����,�Y���֫.���p8���t]�w|a���rQY�5r��Ѱ�}`��SZ�kg��(FI��ȑ���k��r�x��
~���H������aa�Ɠ����x�h���墸����2�F�(�
��L}��GX�VN��x'���s�w�a�����ԩSD�ۙ��x�
7�%���]�
�M�1�IH#�m�
i�]����g��m��0�5+VGgA����i��o=�Y�}��!	BX+�����Y��7���Dž�G�E��9���)h�ƬY��ŨQ�X�~=iii�s���G�g�(��h?n��_�	\��:.>g	�hm��� ��8^O�9_�hJ��a†���=��aݾ�]׸�6V]?_�Sqq~���muCw�ͦ��^ס�L��T��uså�sm�a��N��7g�"�75��7{�g�̩��L����gp �Y�b���$&&�x�b�gUUQU�>}�^�h�O�"�>e�o�<���DSR9�N�Kq3��a�z|��)���]���Ү4���2�������dE��JG�\�U�QP9A�� 8NA�`0�9p8�*����x�O�<x�����t���fc���|��:|W=8ۀΣ@����.��t�}��=t���Y�7K8���E{�禝i'�]`p��=�NM@D4����%��r�vS���.���4��i�� R���߈�T��1;�DcZ�T��`!&4��p�pEHY��O��0�CP����N��r_�Ut��x7���!�b80դ�I�@��=�vly�ܸ>����_2x��IV���&R���1)�$:��C�p�w��h&9%������J$FI��R���%I�WU�t<p������`�R���[����l�iF��H��J��$I-��]�rg�;���I��1����_|�%t`������F���g?��v��ς�C�&)�+D���Q�����,�?��
������z���)N�t���Oi�䅔g++3�.ۭ7)�<��rF��S�j��ߏ��w���y�W�,��%�DqWt�P]�WTV`��p+nt�C΍F#(ѭ�\x܉���$�
UO���5�}�Y�ѡ	Ȇ8���N�60�ւ`�|hy
+��餶�V���[ uM�9���VG�ۍ��\~�����УGE!++��h���)Y^H_|�E��ÇK����ɓjnnn0-���_d><d�t����Ν/�p�	�l�+�I��iv�rΗ��PU��
UQD����s�%�b���:v�����!�ȁ���W�~����j@A��n�!d	��BU�c�?�.���:���A��yU�PQu���3i֠%MRo4����A�FS/�.W�{w��qcG����Q�/+�pr$߁����%I�h�0	��]$;TV�)*:5=dE��^W�#���.[�o��b����g�ec�ʆ�٫^�9YN�3%!!��o����X�f
O<�EEE�ρc������t�ԹWY|$<D��rMYH¥�SF^{[�'N��/���/͛›)��x[���jCiyI^eU�bJ+^
w�����=�/��_�ᲅ�Y�Od��ܮ�<B�ص�ŝmڿ��9>�6��{��m�g���?&��8�}���@��kɝ�/%ѥp��e��t\L(,4j��c��M/w7(T�97�LF4M<��zy{\�sp*6��|�>�^�UaI�:����������N9Od�g��Q���uLh�f�[��H��H�T}��~-:��&���R��D7Dsu�r$Rp�z1�pvaȻG�W?B��3���w<
{��=��$�E�w�ݸ�9�f�B���Z�Y��_�awRUVHYYM��Pr�?�~φ	�L�/�Ν���KQ#�hQ�y˦�N�p��[%^�=��Gj��J��od�q���>�*�3��~
	�����޷��]�ԐWUE�t�ae��v�������|��3�y�9Úd��0��s�\'�Pr_6|L�m���]����]�r����Nq��VVM�8q�h]��Z����p�S:��Y�E�ڧ�Yw��Myx��i�d��J�D�Q�,���i�p��k받�Z�����j7U�DTY�}��V]Kbk��)XN���z��1�f3���8���PU�cǎ�c68�Ik�-��Ӭ��⟖�{�Ӥ�k,�G�I��M����z�tu����O��N'U��V��zz��*3����Bn�L.r7(zu>C�3��;`|p�5;;�`���N�/�m˪1i�ۻ�gA�4���2��沣���D�N�X<>���A�SRR�/^�8h.<����V�>�޹��E2K+'�ögæ��v�#���l�I��.A�eYT5
��%%6�R3_�� �|�ĄD��HJJ"9)��R�kc3'���۹=�e��sRv:��6cŸ��\lݱ��<��&�$&����4�tMY��A7E,#nM���T�P�2+�*6��Y�6=��l�A���0��-�K/�7��� ��y?���n�1mD'���Ab.��V^^^�����~�s��$''��?�EUUU��媳g�7������#�����K����?S���ڮr7\xq��+V��$;����4�
+�W�T��V1�I�]�j��Q�uO�m�^N\\/_̞%W����^�y��r]PyW��k2����;L��t=
]\��σ��Jg�?�_0�Ĥ5ϼ߶l߽@�(
ou�(T?��m��-4�}�4C\�3�ao�%!U�3`����~TIDt�E^�
��bd����C\����y��
9_T�G�1&�iHtF�"�{懎�/W�@tBzc"	�1�Ÿ���ǡQ���� ģ�
T�kv�;&燈�1 W�~�!�b8
�!"#&M�RVհ�g�$��&?�k�Ѧ]��3_�~�q���:�(xIDATHmЀo.$)1��Qp���+�3Z�{���r_g'����1Sw������,���}8tْ�?qz���n�4`XR��b���F�G\�w���!�@�w�+�~��6�>��g?�؊tJJ���Lf�f���&0�����gIoڤ�%":�oˬ׾Œ֘��r�������^/9o��g��W�D#+NkX��v�M��
p�:�v{�h6�$�Kk$�����D��(�W�]OMި��{<U�����%��S������k��r|e��Ҭk�ʦ�<U��v:)1�So@�3�{�8@�ۗ�i2z!_|�r��[?l$�7{B
;�]##���az�kú���:u�sN�4�4i�}�4�_���tem|q2�\�OϚ��b����Gj���7�E��Ν�dĈ�9ބS�0����Wi�ܹMG�2g��N'r���
M������S���TK���?h]��=襥���b��A��.d�_�`�\�]���'_�k��nS�L�8E�j��/Q�u8���u�]�mnb��m\9�'�-\�L�>e�υ�������\�#Z�Et�:��h4b2�HHH 99���d�Z�'.΀!΀� ҩ�P6n_Ρ�W�ȅ?ߕ~.�ۯ
��:��=�xc��q�y�u�7-�E,�)�-�r��r�A�X��r�k�]�m�Ȇ?����g^~K�Cs�Mˋ~�r�m.Y��%�x�׷��6/�hj3zȨ泖|R�����?����koQE����HQ?�`0��q���(�7��^���C�9�����ʥ��¢o��b��=U{�;^��Zf/�y����x����L"⃫v�|�$	Q4�r��e���DDш,�TWWc4źJ�h��F(y�)~�MA�оq�;��x5��/�MG�~O"�&���|�w76�a�U^��!eա���ꫯN6�LW麞�)�>��k3���w���r}�x��)��7�Pp�thVF�TD�A�l��<�mM��e��*[!'}L��H�6�Mu����y��
9_<�EcPH����U��o�q�m@��NG$�Y� ��l��E�'�'њ���3�������g�g�����z��!�b8-�!貪6���3�^�hw�\\nܲ��˖��w�T�!��%�_=pc�6�z>�is�tm!�6�DY���f�c���M�_~Y�u�o�%/���{%�'{Ȓt��ō^_�(,�0���+7L�b�������Y�D1>�,sys9E��$����7z�,E�i
UU�LE��P�U��6��ډ�ג�]!�{5�Q7|��xt2:��ʬkI�F��NRZ&����ޡ���WZ̳�=�C�c�mch�k��"�Ӌ�B��EE�`N�h�Z�_؏|��\<�=;׮�T����t��o۶#��1(ܠ$(���u�˧\@�����h�+���.KK�..+�*͚��E�!�r�	� ���pֵsRn����0�ܻ��n):�Lh�*���os�镟�q?�oo�y�n�2��ON秢�(�F�Z��1+�]�Q������b�$n�ן�_�m#�h��7r�ԕiĈ%@#t	١"�"��1���ۍ"�놴�;�Ӊ3Hz]�FEA�(
r�ar+�(�[� --��V��uv[�y�}F�~7͛gr��Qz^x���V��(???1T�U��<�O��u'\l�?�ܜ�$�	T��
�lD�s��n�C��d�ܹuƢaÆ����p8���"�̫�,����g��p�l4<�5q=��B��d4w>�uꆭ���~6�L�-�p�5s�F}Ͳw��q�
�#vϖ���X/��3�9�,���Xb0cI�����Dqz�'�G�}���'�x˼�C�wWe�w�*<�,`'�ͤD�Y*�
pj!���tn�={�b��.\~�����5At(��f3��keee'�,Y�j���
C�t��-ʚ��	��,4�z�r)��Y������X$%�m��e[Ա<T�8��[�4���mr:�l�zN�UU��OW^m�����㵬k��_�r�Sk9���^]��K�����>x�g7@��O$I��u��<���vN��Î��DQT<�Ƴ��ڞ;w��$��K�����5k��(�$�h0$��vƫ��{"������@�}umQ��y��
;_t��\���Й���G0r��Hd�/���OQAj���Fe(�`�*��t}�R[Ռ���Cgu�[�%�!�B��ٕ�6�?���k�|�c�.�D���)���o�-9Q��/=�؈]ۏ�xj&$�h�L|��7�l��[Y&�K�}���,�U<<"[��!�U>R��X�����˺�����@Ӵ|�i�dIx�={�=��4����}}<��kO�z�C�N���V/v��@u�s�	o�vL�l�Ƞn�ೢO�1����+[�la˖-�7糃�{��h��\g�5en����>�h���A�뮻�㏣k�SEK��suF�ڨ�񟕕M��f���,G��zI�c@�s�����TH&lF0<ǧ���n��x�6�?\�=#��*!+�Κ�#����GFlη�8p���s�Ψ�ʺ��4�q�9��q��@�=�[oY
.���嫥K�*�%3�|z�sG���J�g�np뭷\U�C��VP�� J:��Ɠ�l0̞=���471x�
�GP�K��5�n�M�0nM�Gq��+++��n��V�Y����,���%��8�(JH��(%���%zgx��k��•[9g���X)��?['@k�oV��t:UU�����x\�O=�.����`(+-5Jqq,z��,�c��خ5��ch�@I��_;�X���-A�~r��ě�sƜqMnj�V���*�.��̚�C=~_Mh����KV�ۖ^{%�
,�搻��c���3._1�
l\V�^�����7�81}��U��n�jEE���t��1��t]�#�bN^^^��o|c��o�,�E&T/�1����3��cK�~���!�;Dj���b4&���p8pl]�?]y�L��W�&�|VWAן��͜����<^rn����C^1i�[��u�~��.ެ_�l���	{����i�{�n�iN��Ӊ��
 ��ʪINNk��:��jે�2w��M{��n�(�챢��àBb��,.��g3�Ɖ̻��+�>տ�˟E��N��
"��w�)S��~?�k�܃���8�9ww��d���#B T#ȣFEQ����ZGiHG+VĪ-����Ց
�T'b,X�:+D^	V(��C^�I6��ݽ��ݬ�dw�	�U{?3�ܹ���=��ܛ�=��!D#��ۨ	�"�l$n������y(�T�\̜���N7H�W���\�ּ�&SG�zyMA����N�?�ɞu<��[v瀉��c
{R�UU|��
���ݟ�Y|�l�����4��S�;x���9����$c|J)������]~����q���t����D�5��>�U�O�F�������ɓB�M5���,��L��'�W��hC�Hor�(��1YY�(�(c�C�b2Q��B�ĉ�K�$��nz�p��2��U��{�g�Χ,)��'*K�@K(�	�������=�S�����{`~n�K���ü�3�;�N�5V�j�b�X�|dddp�u$�m
=�ggh���
,�yDlQ���ׅrv���2†�
����ȉ�W�	b��s��mH�(��`X�,�9��NS���pݸ�P/�)
�LGDz@M�[h�.�?����3<����0=7)%U��3s�v|���j�qͤI9��[��뭭���f��<��tC�����H&s���M�c3
R��k}�'�R��Ω�v���2潈������A.\ȪU�bfد)+�Ι0!ab�w�of��}�>͍���}���bW��/��]3B��2g-�/��p�zB ����)��G4�wL���a^����s��w�}��b�x�%,���!--mDVV����򙬬����}�۝8]=��xD뽃�}�|$����t.���l�^#�uO!�G)t�+ҕ��"��lN#VYtyO�[�L*�)��#�<��E0'�K���*zvс� �U��X��<S��nn���69�N��������[��~B�����2�-��vw���g��6����OV;&�ܷ�E��T���m	�չ=�,;����KycΙXf��F�o��0��@AC��6�}�8�@��EVؘ��7���P�0� KPX��&�؄�r<��I�X��f��\MPlEț0��/�n,w�����m>.n���K��H�>uv��-EE
�v�)X��u��/*.޼w��~B��2�@@���\��^������Db��r,Q�w���k{�ug�z�sȱ��/{K�r�Á��n�1�IUU/v&�/����P�{���BSK��w����\���@V9�X��6�斄6��3ٳY�@5�x䟬��!�jA���K)�Hd����M�L����[�{%6nd�Cb���uc��Gb�cѨr>N��$�Y�GAH0����:CS�Cu/�
��"���&�ü�����5�>�����V�^SSc0�7�C��Bz��-�@�����}�d����;��\�x7c}o��˖V,����Ŀ��������<�Ā5̀5=�!ܕ��QL�������ˋ;-a?�T�-�Y��CoMC��M�B��%j�
����zv���c�0z���_���Ϛ����n�\���F��Hu�V# �n�����ԫN4o�h�u/���2*�Bnn�@E��(
+W�DQ\.W�A��3g���wW��m{�L�����^��Q&
>�ؾ���� &%��=�@�Ƚ�-I?�H@
�t�[K�~�����z�*K�����*�333�4m��Ψ��4FV� �̋d�UVV&tD(��u]��Ծ}�(��ٜF����W����F���&ů-� @�����?ɹ�]���w655�8P:r�Ȝ�Ç��yii��{w���piSSS�9tX;���e��=�������Ep
Mn%�e+E1�k���/��!��*��v�{�۰,��\�ND���p�����P����He�Hꊁx���]���=�;^�+�י��"Z�G����=)�OJ�c��G�
˾4�cN�,?�*|f���/�ն��͞��;;�溨/�L��",�Q������Ê�8�rrB�HBԞ;}z���fϞ�w�li��	80�a��͝���%..��l�	�1͓=�q��O5��ƣ����S��RUՑ�F
^��h��5*�j�k��«�`��G�Fc���J��2p�����nO�����u�VKIS!�v]\b4h�HM�L�dssMKY�t�v{�k{����lC+��u���+�[��R}_{X,�{L&S�d���J��v2�Fa��u,�6�����W��9z�X.�m&v��m�����
+0�[L��b_s�M�?e�f������Rv=) �8������D�������&<Xȏ
�M�	{��.��`)��)�B�X�x4���?��h�qiEUoE()�/���B	L�Y�f&Lff�TMӦ%lOEQv���}�L�eJ^���.Q����]���F�����ӳ�>::::�>�%tT�9�ms��p�8����$�Fȣܝ؉x+e�a�q&�gI��w��<s]�G��3��~B"�L������&B,у>h��g�/�e��A,$tώ�yE�(����7�Y��I�Y����ǿ�����������������N1kEq���i�qѲe"�	��w��	Ҥ���(KF��������?jk��'M�.IEND�B`�tinymce/themes/advanced/img/spacer.gif000060400000000117152456167170013777 0ustar00GIF89a����������_o����!�,H�+�>�2�Y���M��$;tinymce/themes/advanced/img/progress.gif000060400000003371152456167170014373 0ustar00GIF89a  �"""�����Ļ�����������UUU333������!�NETSCAPE2.0!�
,  @�p�IiQ��J����S2l po���ĐH'�N���%��j�%Q8'+rR�0��6 �Fs�Z4|��SB��T���	b�nYa��9h�8:q�C�y�g,S\)_�Q?e��	�+��S
��5	#lO<��#vY��J;v\�aU}L 5��{|q��&k�23�87���ӏ�Ϧ_�XȽ�`���+�=L���ε�)�qX��竞&Aq"!�
,rp�I+ 5��F��`R��h�W�R�l;L&-���f�m�)���M��<�\M���Rd��@�
H̑B ��M��oƆ�����	��������������Gz{!�
,rp�I'A5�:�M�P!(u�(�8��D����J�K2�r���3-h� �$6�3e`�&��� zfL�Z�
a>�F
��W�ssyJ}T	�N.aqXshC�XJ!�
,ipɹ�4�]L�߶$Af����M�A���	�J�j��@'[T��b�*-b�J��I�Z PM
�sbg�p$������v�!��5
��?}��
�
�!�
,e0�������K!^�a��X�	�[�(\
-���S�R@ PC�r0"� ��L�����z��xLՍπ*� ��_נP���:�D�eUywZt
n!�
,�0����x���D�W��E�&j�׊�@���.w~���20��0`4r|�BӀ�M�>������,bL>|?�4B�>��ʻ��u�9y��&
2x&

k�&	�
U]�
vo�o�p�raT&!�
,{pɹB�B�O��e�T�G\l�	)S���&��4��0�yT�SL�\:=����J��k���:	D��eĨ��c�8O��b/�:{
ty�t#����|��-
mN
qK!�
,lp�I�"8�d����y ��h�**��Zp�TR�F1��"��-
C��`�B�8,X	�9*P,@R`Z=���>u,S���"ΦO�T\um|;�8~*!�
,xp�I�]��p�
�]��5�ĐP`�)%�� !�����H�B��	P����МV��	59(�X25�,�I�/���n#&��@����Vq5tsny\)_�g��|r�5!�
,g�E�8�[��`&y_h��)
E"�+gG
h@l5��"����A .��@M���E��8NgL+���P�Ƀ�	�p�us/jȩ�jVjc7I!�
,\�(e�����@��p
"�X�h�QmTqm�x��h� �������w�$'��s)�a��]-�l�j����_�g��i�rˀ`�%	!�
,rpɹ��x*�2�
�M���]hiG!ۑ".��J���j�+,��p@X���VF�n���50��y�QL�\@K��0�E	�c���}d�yFv(	�;tinymce/themes/advanced/skins/default/img/code/php.svg000060400000000723152456167170017033 0ustar00<?xml version="1.0" encoding="UTF-8" standalone="no"?>
<svg xmlns="http://www.w3.org/2000/svg"
    xmlns:xlink="http://www.w3.org/1999/xlink" viewBox="0 0 128 32" width="128" height="32">
    <title>PHP</title>
    <g>
        <text x="55" y="20" style='font-family:-apple-systrem,BlinkMacSystremFont,"Segoe UI",Roboto,Oxygen-Sans,Ubuntu,Cantarell,"Helvetica Neue",Arial,sans-serif;font-weight:bold;font-size:10px;fill:#4F5B93;stroke:none;'>php</text>
    </g>
</svg>tinymce/themes/advanced/skins/default/img/code/script.svg000060400000000731152456167170017547 0ustar00<?xml version="1.0" encoding="UTF-8" standalone="no"?>
<svg xmlns="http://www.w3.org/2000/svg"
    xmlns:xlink="http://www.w3.org/1999/xlink" viewBox="0 0 128 32" width="128" height="32">
    <title>Script</title>
    <g>
        <text x="50" y="20" style='font-family:-apple-systrem,BlinkMacSystremFont,"Segoe UI",Roboto,Oxygen-Sans,Ubuntu,Cantarell,"Helvetica Neue",Arial,sans-serif;font-weight:bold;font-size:10px;fill:#787679;stroke:none;'>script</text>
    </g>
</svg>tinymce/themes/advanced/skins/default/img/code/style.svg000060400000000727152456167170017410 0ustar00<?xml version="1.0" encoding="UTF-8" standalone="no"?>
<svg xmlns="http://www.w3.org/2000/svg"
    xmlns:xlink="http://www.w3.org/1999/xlink" viewBox="0 0 128 32" width="128" height="32">
    <title>Style</title>
    <g>
        <text x="53" y="20" style='font-family:-apple-systrem,BlinkMacSystremFont,"Segoe UI",Roboto,Oxygen-Sans,Ubuntu,Cantarell,"Helvetica Neue",Arial,sans-serif;font-weight:bold;font-size:10px;fill:#787679;stroke:none;'>style</text>
    </g>
</svg>tinymce/themes/advanced/skins/default/img/code/xml.svg000060400000000723152456167170017044 0ustar00<?xml version="1.0" encoding="UTF-8" standalone="no"?>
<svg xmlns="http://www.w3.org/2000/svg"
    xmlns:xlink="http://www.w3.org/1999/xlink" viewBox="0 0 128 32" width="128" height="32">
    <title>XML</title>
    <g>
        <text x="55" y="20" style='font-family:-apple-systrem,BlinkMacSystremFont,"Segoe UI",Roboto,Oxygen-Sans,Ubuntu,Cantarell,"Helvetica Neue",Arial,sans-serif;font-weight:bold;font-size:10px;fill:#787679;stroke:none;'>xml</text>
    </g>
</svg>tinymce/themes/advanced/skins/default/img/anchor.svg000060400000015125152456167170016606 0ustar00<!-- Generated by IcoMoon.io -->
<svg version="1.1" xmlns="http://www.w3.org/2000/svg" width="512" height="512" viewBox="0 0 512 512">
<title></title>
<g id="icomoon-ignore">
    <line stroke-width="1" x1="16" y1="0" x2="16" y2="512" stroke="#449FDB" opacity="0.3"></line>
    <line stroke-width="1" x1="32" y1="0" x2="32" y2="512" stroke="#449FDB" opacity="1"></line>
    <line stroke-width="1" x1="48" y1="0" x2="48" y2="512" stroke="#449FDB" opacity="0.3"></line>
    <line stroke-width="1" x1="64" y1="0" x2="64" y2="512" stroke="#449FDB" opacity="1"></line>
    <line stroke-width="1" x1="80" y1="0" x2="80" y2="512" stroke="#449FDB" opacity="0.3"></line>
    <line stroke-width="1" x1="96" y1="0" x2="96" y2="512" stroke="#449FDB" opacity="1"></line>
    <line stroke-width="1" x1="112" y1="0" x2="112" y2="512" stroke="#449FDB" opacity="0.3"></line>
    <line stroke-width="1" x1="128" y1="0" x2="128" y2="512" stroke="#449FDB" opacity="1"></line>
    <line stroke-width="1" x1="144" y1="0" x2="144" y2="512" stroke="#449FDB" opacity="0.3"></line>
    <line stroke-width="1" x1="160" y1="0" x2="160" y2="512" stroke="#449FDB" opacity="1"></line>
    <line stroke-width="1" x1="176" y1="0" x2="176" y2="512" stroke="#449FDB" opacity="0.3"></line>
    <line stroke-width="1" x1="192" y1="0" x2="192" y2="512" stroke="#449FDB" opacity="1"></line>
    <line stroke-width="1" x1="208" y1="0" x2="208" y2="512" stroke="#449FDB" opacity="0.3"></line>
    <line stroke-width="1" x1="224" y1="0" x2="224" y2="512" stroke="#449FDB" opacity="1"></line>
    <line stroke-width="1" x1="240" y1="0" x2="240" y2="512" stroke="#449FDB" opacity="0.3"></line>
    <line stroke-width="1" x1="256" y1="0" x2="256" y2="512" stroke="#449FDB" opacity="1"></line>
    <line stroke-width="1" x1="272" y1="0" x2="272" y2="512" stroke="#449FDB" opacity="0.3"></line>
    <line stroke-width="1" x1="288" y1="0" x2="288" y2="512" stroke="#449FDB" opacity="1"></line>
    <line stroke-width="1" x1="304" y1="0" x2="304" y2="512" stroke="#449FDB" opacity="0.3"></line>
    <line stroke-width="1" x1="320" y1="0" x2="320" y2="512" stroke="#449FDB" opacity="1"></line>
    <line stroke-width="1" x1="336" y1="0" x2="336" y2="512" stroke="#449FDB" opacity="0.3"></line>
    <line stroke-width="1" x1="352" y1="0" x2="352" y2="512" stroke="#449FDB" opacity="1"></line>
    <line stroke-width="1" x1="368" y1="0" x2="368" y2="512" stroke="#449FDB" opacity="0.3"></line>
    <line stroke-width="1" x1="384" y1="0" x2="384" y2="512" stroke="#449FDB" opacity="1"></line>
    <line stroke-width="1" x1="400" y1="0" x2="400" y2="512" stroke="#449FDB" opacity="0.3"></line>
    <line stroke-width="1" x1="416" y1="0" x2="416" y2="512" stroke="#449FDB" opacity="1"></line>
    <line stroke-width="1" x1="432" y1="0" x2="432" y2="512" stroke="#449FDB" opacity="0.3"></line>
    <line stroke-width="1" x1="448" y1="0" x2="448" y2="512" stroke="#449FDB" opacity="1"></line>
    <line stroke-width="1" x1="464" y1="0" x2="464" y2="512" stroke="#449FDB" opacity="0.3"></line>
    <line stroke-width="1" x1="480" y1="0" x2="480" y2="512" stroke="#449FDB" opacity="1"></line>
    <line stroke-width="1" x1="496" y1="0" x2="496" y2="512" stroke="#449FDB" opacity="0.3"></line>
    <line stroke-width="1" x1="0" y1="16" x2="512" y2="16" stroke="#449FDB" opacity="0.3"></line>
    <line stroke-width="1" x1="0" y1="32" x2="512" y2="32" stroke="#449FDB" opacity="1"></line>
    <line stroke-width="1" x1="0" y1="48" x2="512" y2="48" stroke="#449FDB" opacity="0.3"></line>
    <line stroke-width="1" x1="0" y1="64" x2="512" y2="64" stroke="#449FDB" opacity="1"></line>
    <line stroke-width="1" x1="0" y1="80" x2="512" y2="80" stroke="#449FDB" opacity="0.3"></line>
    <line stroke-width="1" x1="0" y1="96" x2="512" y2="96" stroke="#449FDB" opacity="1"></line>
    <line stroke-width="1" x1="0" y1="112" x2="512" y2="112" stroke="#449FDB" opacity="0.3"></line>
    <line stroke-width="1" x1="0" y1="128" x2="512" y2="128" stroke="#449FDB" opacity="1"></line>
    <line stroke-width="1" x1="0" y1="144" x2="512" y2="144" stroke="#449FDB" opacity="0.3"></line>
    <line stroke-width="1" x1="0" y1="160" x2="512" y2="160" stroke="#449FDB" opacity="1"></line>
    <line stroke-width="1" x1="0" y1="176" x2="512" y2="176" stroke="#449FDB" opacity="0.3"></line>
    <line stroke-width="1" x1="0" y1="192" x2="512" y2="192" stroke="#449FDB" opacity="1"></line>
    <line stroke-width="1" x1="0" y1="208" x2="512" y2="208" stroke="#449FDB" opacity="0.3"></line>
    <line stroke-width="1" x1="0" y1="224" x2="512" y2="224" stroke="#449FDB" opacity="1"></line>
    <line stroke-width="1" x1="0" y1="240" x2="512" y2="240" stroke="#449FDB" opacity="0.3"></line>
    <line stroke-width="1" x1="0" y1="256" x2="512" y2="256" stroke="#449FDB" opacity="1"></line>
    <line stroke-width="1" x1="0" y1="272" x2="512" y2="272" stroke="#449FDB" opacity="0.3"></line>
    <line stroke-width="1" x1="0" y1="288" x2="512" y2="288" stroke="#449FDB" opacity="1"></line>
    <line stroke-width="1" x1="0" y1="304" x2="512" y2="304" stroke="#449FDB" opacity="0.3"></line>
    <line stroke-width="1" x1="0" y1="320" x2="512" y2="320" stroke="#449FDB" opacity="1"></line>
    <line stroke-width="1" x1="0" y1="336" x2="512" y2="336" stroke="#449FDB" opacity="0.3"></line>
    <line stroke-width="1" x1="0" y1="352" x2="512" y2="352" stroke="#449FDB" opacity="1"></line>
    <line stroke-width="1" x1="0" y1="368" x2="512" y2="368" stroke="#449FDB" opacity="0.3"></line>
    <line stroke-width="1" x1="0" y1="384" x2="512" y2="384" stroke="#449FDB" opacity="1"></line>
    <line stroke-width="1" x1="0" y1="400" x2="512" y2="400" stroke="#449FDB" opacity="0.3"></line>
    <line stroke-width="1" x1="0" y1="416" x2="512" y2="416" stroke="#449FDB" opacity="1"></line>
    <line stroke-width="1" x1="0" y1="432" x2="512" y2="432" stroke="#449FDB" opacity="0.3"></line>
    <line stroke-width="1" x1="0" y1="448" x2="512" y2="448" stroke="#449FDB" opacity="1"></line>
    <line stroke-width="1" x1="0" y1="464" x2="512" y2="464" stroke="#449FDB" opacity="0.3"></line>
    <line stroke-width="1" x1="0" y1="480" x2="512" y2="480" stroke="#449FDB" opacity="1"></line>
    <line stroke-width="1" x1="0" y1="496" x2="512" y2="496" stroke="#449FDB" opacity="0.3"></line>
</g>
<path d="M448 288v66.098c-40.261 41.123-96.519 80.825-160 91.254v-189.352h96v-32l-96-37.471c37.282-13.18 64-48.731 64-90.529 0-53.020-42.98-96-96-96-53.021 0-96 42.98-96 96 0 41.798 26.715 77.35 64 90.529v0.006l-96 37.465v32h96v189.352c-63.484-10.429-119.742-50.131-160-91.254v-66.098h-64v32c0 64 128 192 256 192s256-128 256-192v-32h-64zM288 96c0 17.673-14.327 32-32 32s-32-14.327-32-32 14.327-32 32-32c17.673 0 32 14.327 32 32z"></path>
</svg>
tinymce/themes/advanced/skins/default/img/search.png000060400000001726152456167170016570 0ustar00�PNG


IHDRVu\�gAMA���a cHRMz&�����u0�`:�p��Q<	pHYs��0iTXtXML:com.adobe.xmp<x:xmpmeta xmlns:x="adobe:ns:meta/" x:xmptk="XMP Core 5.4.0">
   <rdf:RDF xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#">
      <rdf:Description rdf:about=""
            xmlns:xmp="http://ns.adobe.com/xap/1.0/"
            xmlns:tiff="http://ns.adobe.com/tiff/1.0/">
         <xmp:CreatorTool>Acorn version 4.5.5</xmp:CreatorTool>
         <tiff:Compression>5</tiff:Compression>
         <tiff:YResolution>72</tiff:YResolution>
         <tiff:XResolution>72</tiff:XResolution>
      </rdf:Description>
   </rdf:RDF>
</x:xmpmeta>
�ׯ�IDAT(E�MKQ��p��2�>6%�r'����?沝��B�� }PX-�$�z��x��ܹ�̹g�hUnϰ�#t���-S.F��#��D
�@���6n`�'�q�O< q��|
�`�7��k��̺���0L�a�*XGx�Ke���Ō���I�؍-��p���
+�<�ϛ�n�`���α��H��~��0���	c
[;s������
K��0���(b�f�C�����>�g�`'Ǽ+a"���3���P��@F*{G%IEND�B`�tinymce/themes/advanced/skins/default/img/middot.gif000060400000000206152456167170016554 0ustar00GIF89a�!�ICCRGBG1012HHLinomntrRGB XYZ �	1acspMSFTIEC sRGB��!�
,L`h\;tinymce/themes/advanced/skins/default/img/menu_arrow.gif000060400000000104152456167170017447 0ustar00GIF89a����!�,����������z�q(�׉���*;tinymce/themes/advanced/skins/default/img/button_bg.png000060400000000234152456167170017277 0ustar00�PNG


IHDR	л�cIDATxcx����=/ע �Tn��g�so�x���)O��@����v�8w�?��Q�x�b�M���c�^�|��{��u�u�֛7o�P��0���IEND�B`�tinymce/themes/advanced/skins/default/img/media/pdf.svg000060400000004522152456167170017163 0ustar00<!-- Generated by IcoMoon.io -->
<svg version="1.1" xmlns="http://www.w3.org/2000/svg" width="512" height="512" viewBox="0 0 512 512">
<title></title>
<path d="M421.006 294.74c-6.824-6.723-21.957-10.283-44.986-10.586-15.589-0.172-34.351 1.201-54.085 3.964-8.837-5.099-17.946-10.647-25.094-17.329-19.231-17.958-35.284-42.886-45.288-70.297 0.652-2.56 1.207-4.81 1.724-7.106 0 0 10.833-61.53 7.966-82.333-0.396-2.853-0.638-3.681-1.404-5.898l-0.941-2.417c-2.947-6.796-8.724-13.997-17.782-13.604l-5.458-0.172c-10.101 0-18.332 5.166-20.493 12.887-6.569 24.217 0.209 60.446 12.49 107.369l-3.144 7.643c-8.794 21.438-19.815 43.030-29.539 62.079l-1.264 2.477c-10.23 20.020-19.513 37.014-27.928 51.411l-8.688 4.594c-0.632 0.334-15.522 8.209-19.014 10.322-29.628 17.69-49.262 37.771-52.519 53.708-1.036 5.085-0.265 11.593 5.007 14.606l8.403 4.229c3.646 1.826 7.489 2.751 11.427 2.751 21.103 0 45.601-26.286 79.349-85.183 38.965-12.685 83.326-23.229 122.206-29.045 29.629 16.684 66.071 28.272 89.071 28.272 4.084 0 7.606-0.39 10.466-1.147 4.411-1.168 8.129-3.684 10.396-7.097 4.463-6.716 5.367-15.966 4.156-25.438-0.36-2.811-2.605-6.287-5.034-8.66zM105.823 407.024c3.849-10.521 19.080-31.322 41.603-49.778 1.416-1.148 4.904-4.416 8.097-7.451-23.552 37.562-39.324 52.533-49.7 57.229zM239.217 99.843c6.783 0 10.642 17.097 10.962 33.127s-3.429 27.28-8.079 35.604c-3.851-12.324-5.713-31.75-5.713-44.452 0 0-0.283-24.279 2.83-24.279v0zM199.426 318.747c4.725-8.458 9.641-17.378 14.665-26.839 12.246-23.158 19.979-41.278 25.739-56.173 11.455 20.842 25.722 38.56 42.492 52.756 2.093 1.771 4.31 3.551 6.638 5.325-34.105 6.748-63.582 14.955-89.534 24.931v0zM414.451 316.826c-2.076 1.299-8.026 2.050-11.854 2.050-12.354 0-27.636-5.647-49.063-14.833 8.234-0.609 15.781-0.919 22.551-0.919 12.391 0 16.060-0.054 28.175 3.036 12.114 3.090 12.269 9.367 10.191 10.666v0z"></path>
<path d="M458.903 114.538c-11.105-15.146-26.587-32.85-43.589-49.852s-34.706-32.482-49.852-43.589c-25.787-18.91-38.296-21.097-45.462-21.097h-248c-22.056 0-40 17.944-40 40v432c0 22.056 17.943 40 40 40h368c22.056 0 40-17.944 40-40v-312c0-7.166-2.186-19.675-21.097-45.462v0zM392.687 87.313c15.35 15.35 27.4 29.199 36.29 40.687h-76.977v-76.973c11.491 8.89 25.339 20.939 40.687 36.286v0zM448 472c0 4.336-3.664 8-8 8h-368c-4.336 0-8-3.664-8-8v-432c0-4.336 3.664-8 8-8 0 0 247.978-0.001 248 0v112c0 8.836 7.162 16 16 16h112v312z"></path>
</svg>tinymce/themes/advanced/skins/default/img/media/quicktime.svg000060400000002127152456167170020404 0ustar00<?xml version="1.0" encoding="UTF-8" standalone="no"?>
<svg xmlns="http://www.w3.org/2000/svg"
    xmlns:xlink="http://www.w3.org/1999/xlink" viewBox="0 0 2048 256" width="2048" height="256">
    <g>
        <text x="512" y="176" style='font-family:-apple-systrem,BlinkMacSystremFont,"Segoe UI",Roboto,Oxygen-Sans,Ubuntu,Cantarell,"Helvetica Neue",Arial,sans-serif;font-weight:bold;font-size:128px;fill:#444;stroke:none;'>Apple Quicktime®</text>
        <path d="M 260 64 L 260 192 L 430.667 192 L 430.667 64 L 260 64 Z  M 292 181.333 L 270.667 181.333 L 270.667 160 L 292 160 L 292 181.333 Z  M 292 138.667 L 270.667 138.667 L 270.667 117.333 L 292 117.333 L 292 138.667 Z  M 292 96 L 270.667 96 L 270.667 74.667 L 292 74.667 L 292 96 Z  M 388 181.333 L 302.667 181.333 L 302.667 74.667 L 388 74.667 L 388 181.333 Z  M 420 181.333 L 398.667 181.333 L 398.667 160 L 420 160 L 420 181.333 Z  M 420 138.667 L 398.667 138.667 L 398.667 117.333 L 420 117.333 L 420 138.667 Z  M 420 96 L 398.667 96 L 398.667 74.667 L 420 74.667 L 420 96 Z  M 324 96 L 324 160 L 366.667 128 L 324 96 Z" fill="#444"/>
    </g>
</svg>tinymce/themes/advanced/skins/default/img/media/video.svg000060400000002144152456167170017516 0ustar00<?xml version="1.0" encoding="UTF-8" standalone="no"?>
<svg xmlns="http://www.w3.org/2000/svg"
    xmlns:xlink="http://www.w3.org/1999/xlink" viewBox="0 0 1024 256" width="1024" height="256">
    <title>Video</title>
    <g>
        <text x="512" y="176" style='font-family:-apple-systrem,BlinkMacSystremFont,"Segoe UI",Roboto,Oxygen-Sans,Ubuntu,Cantarell,"Helvetica Neue",Arial,sans-serif;font-weight:bold;font-size:128px;fill:#444;stroke:none;'>Video</text>
        <path d="M 260 64 L 260 192 L 430.667 192 L 430.667 64 L 260 64 Z  M 292 181.333 L 270.667 181.333 L 270.667 160 L 292 160 L 292 181.333 Z  M 292 138.667 L 270.667 138.667 L 270.667 117.333 L 292 117.333 L 292 138.667 Z  M 292 96 L 270.667 96 L 270.667 74.667 L 292 74.667 L 292 96 Z  M 388 181.333 L 302.667 181.333 L 302.667 74.667 L 388 74.667 L 388 181.333 Z  M 420 181.333 L 398.667 181.333 L 398.667 160 L 420 160 L 420 181.333 Z  M 420 138.667 L 398.667 138.667 L 398.667 117.333 L 420 117.333 L 420 138.667 Z  M 420 96 L 398.667 96 L 398.667 74.667 L 420 74.667 L 420 96 Z  M 324 96 L 324 160 L 366.667 128 L 324 96 Z" fill="#444"/>
    </g>
</svg>tinymce/themes/advanced/skins/default/img/media/windowsmedia.svg000060400000002170152456167170021101 0ustar00<?xml version="1.0" encoding="UTF-8" standalone="no"?>
<svg xmlns="http://www.w3.org/2000/svg"
    xmlns:xlink="http://www.w3.org/1999/xlink" viewBox="0 0 2048 256" width="2048" height="256">
    <title>Windows Media®</title>
    <g>
        <text x="512" y="176" style='font-family:-apple-systrem,BlinkMacSystremFont,"Segoe UI",Roboto,Oxygen-Sans,Ubuntu,Cantarell,"Helvetica Neue",Arial,sans-serif;font-weight:bold;font-size:128px;fill:#444;stroke:none;'>Windows Media®</text>
        <path d="M 260 64 L 260 192 L 430.667 192 L 430.667 64 L 260 64 Z  M 292 181.333 L 270.667 181.333 L 270.667 160 L 292 160 L 292 181.333 Z  M 292 138.667 L 270.667 138.667 L 270.667 117.333 L 292 117.333 L 292 138.667 Z  M 292 96 L 270.667 96 L 270.667 74.667 L 292 74.667 L 292 96 Z  M 388 181.333 L 302.667 181.333 L 302.667 74.667 L 388 74.667 L 388 181.333 Z  M 420 181.333 L 398.667 181.333 L 398.667 160 L 420 160 L 420 181.333 Z  M 420 138.667 L 398.667 138.667 L 398.667 117.333 L 420 117.333 L 420 138.667 Z  M 420 96 L 398.667 96 L 398.667 74.667 L 420 74.667 L 420 96 Z  M 324 96 L 324 160 L 366.667 128 L 324 96 Z" fill="#444"/>
    </g>
</svg>tinymce/themes/advanced/skins/default/img/media/word.svg000060400000001600152456167170017357 0ustar00<!-- Generated by IcoMoon.io -->
<svg version="1.1" xmlns="http://www.w3.org/2000/svg" width="512" height="512" viewBox="0 0 512 512">
<title></title>
<path d="M319.889 237.946h22.105l-25.506 113.089-33.162-159.005h-53.275l-38.557 159.005-28.908-159.005h-55.697l56.546 255.94h54.419l38.147-151.354 34.128 151.354h50.168l64.814-255.94h-85.223v45.916z"></path>
<path d="M458.903 114.538c-11.105-15.146-26.587-32.85-43.589-49.852s-34.706-32.482-49.852-43.589c-25.787-18.91-38.296-21.097-45.462-21.097h-248c-22.056 0-40 17.944-40 40v432c0 22.056 17.943 40 40 40h368c22.056 0 40-17.944 40-40v-312c0-7.166-2.186-19.675-21.097-45.462v0zM392.687 87.313c15.35 15.35 27.4 29.199 36.29 40.687h-76.977v-76.973c11.491 8.89 25.339 20.939 40.687 36.286v0zM448 472c0 4.336-3.664 8-8 8h-368c-4.336 0-8-3.664-8-8v-432c0-4.336 3.664-8 8-8 0 0 247.978-0.001 248 0v112c0 8.836 7.162 16 16 16h112v312z"></path>
</svg>
tinymce/themes/advanced/skins/default/img/media/real.svg000060400000002224152456167170017332 0ustar00<?xml version="1.0" encoding="UTF-8" standalone="no"?>
<svg xmlns="http://www.w3.org/2000/svg"
    xmlns:xlink="http://www.w3.org/1999/xlink" viewBox="0 0 2048 256" width="2048pt" height="256pt">
    <title>Real Player®</title>
    <g>
        <text transform="matrix(1,0,0,1,490.781,177.656)" style='font-family:-apple-systrem,BlinkMacSystremFont,"Segoe UI",Roboto,Oxygen-Sans,Ubuntu,Cantarell,"Helvetica Neue",Arial,sans-serif;font-weight:bold;font-size:128px;fill:#444;stroke:none;'>Real Player®</text>
        <path d="M 260 64 L 260 192 L 430.667 192 L 430.667 64 L 260 64 Z  M 292 181.333 L 270.667 181.333 L 270.667 160 L 292 160 L 292 181.333 Z  M 292 138.667 L 270.667 138.667 L 270.667 117.333 L 292 117.333 L 292 138.667 Z  M 292 96 L 270.667 96 L 270.667 74.667 L 292 74.667 L 292 96 Z  M 388 181.333 L 302.667 181.333 L 302.667 74.667 L 388 74.667 L 388 181.333 Z  M 420 181.333 L 398.667 181.333 L 398.667 160 L 420 160 L 420 181.333 Z  M 420 138.667 L 398.667 138.667 L 398.667 117.333 L 420 117.333 L 420 138.667 Z  M 420 96 L 398.667 96 L 398.667 74.667 L 420 74.667 L 420 96 Z  M 324 96 L 324 160 L 366.667 128 L 324 96 Z" fill="#444"/>
    </g>
</svg>tinymce/themes/advanced/skins/default/img/media/swf.svg000060400000001035152456167170017205 0ustar00<?xml version="1.0" encoding="UTF-8" standalone="no"?>
<svg xmlns="http://www.w3.org/2000/svg"
    xmlns:xlink="http://www.w3.org/1999/xlink" viewBox="0 0 2048 256" width="2048pt" height="256pt">
    <title>Adobe® Flash Player®</title>
    <g>
        <text transform="matrix(1,0,0,1,490.781,177.656)" style='font-family:-apple-systrem,BlinkMacSystremFont,"Segoe UI",Roboto,Oxygen-Sans,Ubuntu,Cantarell,"Helvetica Neue",Arial,sans-serif;font-weight:bold;font-size:128px;fill:#444;stroke:none;'>Adobe® Flash Player®</text>
    </g>
</svg>tinymce/themes/advanced/skins/default/img/media/shockwave.svg000060400000001027152456167170020401 0ustar00<?xml version="1.0" encoding="UTF-8" standalone="no"?>
<svg xmlns="http://www.w3.org/2000/svg"
    xmlns:xlink="http://www.w3.org/1999/xlink" viewBox="0 0 2048 256" width="2048pt" height="256pt">
    <title>Adobe® Shockwave®</title>
    <g>
        <text transform="matrix(1,0,0,1,490.781,177.656)" style='font-family:-apple-systrem,BlinkMacSystremFont,"Segoe UI",Roboto,Oxygen-Sans,Ubuntu,Cantarell,"Helvetica Neue",Arial,sans-serif;font-weight:bold;font-size:128px;fill:#444;stroke:none;'>Adobe® Shockwave®</text>
    </g>
</svg>tinymce/themes/advanced/skins/default/img/media/generic.svg000060400000001642152456167170020026 0ustar00<!-- Generated by IcoMoon.io -->
<svg version="1.1" xmlns="http://www.w3.org/2000/svg" width="512" height="512" viewBox="0 0 512 512">
<title></title>
<path d="M466.895 305.125c-26.863-46.527-10.708-106.152 36.076-133.244l-50.313-87.146c-14.375 8.427-31.088 13.259-48.923 13.259-53.768 0-97.354-43.873-97.354-97.995h-100.629c0.133 16.705-4.037 33.641-12.979 49.126-26.862 46.528-86.578 62.351-133.431 35.379l-50.312 87.146c14.485 8.236 27.025 20.294 35.943 35.739 26.819 46.454 10.756 105.96-35.854 133.112l50.313 87.146c14.325-8.348 30.958-13.127 48.7-13.127 53.598 0 97.072 43.596 97.35 97.479h100.627c-0.043-16.537 4.136-33.285 12.983-48.609 26.818-46.453 86.388-62.297 133.207-35.506l50.313-87.145c-14.39-8.233-26.846-20.249-35.717-35.614zM256 359.666c-57.254 0-103.668-46.412-103.668-103.667 0-57.254 46.413-103.667 103.668-103.667s103.666 46.413 103.666 103.667c-0.001 57.255-46.412 103.667-103.666 103.667z"></path>
</svg>
tinymce/themes/advanced/skins/default/img/media/excel.svg000060400000001565152456167170017516 0ustar00<!-- Generated by IcoMoon.io -->
<svg version="1.1" xmlns="http://www.w3.org/2000/svg" width="512" height="512" viewBox="0 0 512 512">
<title></title>
<path d="M371.514 192h-67.646l-47.866 70.516-47.871-70.516h-67.645l81.081 121.232-91.486 134.768h125.919v-45.788h-25.078l25.078-37.497 55.698 83.285h70.222l-91.488-134.768 81.082-121.232z"></path>
<path d="M458.903 114.538c-11.105-15.146-26.587-32.85-43.589-49.852s-34.706-32.482-49.852-43.589c-25.787-18.91-38.296-21.097-45.462-21.097h-248c-22.056 0-40 17.944-40 40v432c0 22.056 17.943 40 40 40h368c22.056 0 40-17.944 40-40v-312c0-7.166-2.186-19.675-21.097-45.462v0zM392.687 87.313c15.35 15.35 27.4 29.199 36.29 40.687h-76.977v-76.973c11.491 8.89 25.339 20.939 40.687 36.286v0zM448 472c0 4.336-3.664 8-8 8h-368c-4.336 0-8-3.664-8-8v-432c0-4.336 3.664-8 8-8 0 0 247.978-0.001 248 0v112c0 8.836 7.162 16 16 16h112v312z"></path>
</svg>
tinymce/themes/advanced/skins/default/img/media/iframe.svg000060400000005132152456167170017653 0ustar00<?xml version="1.0" encoding="UTF-8" standalone="no"?><!-- Generator: Gravit.io -->
<svg xmlns="http://www.w3.org/2000/svg"
    xmlns:xlink="http://www.w3.org/1999/xlink" viewBox="0 0 1024 256" width="1024" height="256">
    <g>
        <text x="464" y="152" style='font-family:-apple-systrem,BlinkMacSystremFont,"Segoe UI",Roboto,Oxygen-Sans,Ubuntu,Cantarell,"Helvetica Neue",Arial,sans-serif;font-weight:bold;font-size:64px;fill:#444;stroke:none;'>Iframe</text>
        <g>
            <path d=" M 400 124 L 408 124 C 409.105 124 410 123.105 410 122 C 410 120.896 409.105 120 408 120 L 400 120 C 398.895 120 398 120.896 398 122 C 398 123.105 398.895 124 400 124 Z " fill="rgb(68,68,68)"/>
            <path d=" M 400 116 L 408 116 C 409.105 116 410 115.105 410 114 C 410 112.896 409.105 112 408 112 L 400 112 C 398.895 112 398 112.896 398 114 C 398 115.105 398.895 116 400 116 Z " fill="rgb(68,68,68)"/>
            <path d=" M 400 132 L 408 132 C 409.105 132 410 131.105 410 130 C 410 128.896 409.105 128 408 128 L 400 128 C 398.895 128 398 128.896 398 130 C 398 131.105 398.895 132 400 132 Z " fill="rgb(68,68,68)"/>
            <path d=" M 372 148 L 408 148 C 409.105 148 410 147.105 410 146 C 410 144.895 409.105 144 408 144 L 372 144 C 370.896 144 370 144.895 370 146 C 370 147.105 370.896 148 372 148 Z " fill="rgb(68,68,68)"/>
            <path d=" M 372 140 L 408 140 C 409.105 140 410 139.105 410 138 C 410 136.895 409.105 136 408 136 L 372 136 C 370.896 136 370 136.895 370 138 C 370 139.105 370.896 140 372 140 Z " fill="rgb(68,68,68)"/>
            <path d=" M 392 108 L 372 108 C 370.9 108 370 108.9 370 110 L 370 130 C 370 131.1 370.9 132 372 132 L 392 132 C 393.1 132 394 131.1 394 130 L 394 110 C 394 108.9 393.1 108 392 108 Z  M 390 128 L 374 128 L 374 124 C 374 121.791 375.791 120 378 120 L 382 120 C 379.791 120 378 118.209 378 116 C 378 113.791 379.791 112 382 112 C 384.209 112 386 113.791 386 116 C 386 118.209 384.209 120 382 120 L 386 120 C 388.209 120 390 121.791 390 124 L 390 128 Z " fill="rgb(68,68,68)"/>
            <path d=" M 362 96 L 366 96 L 366 160 L 362 160 L 362 96 Z " fill="rgb(68,68,68)"/>
            <path d=" M 366 156 L 422 156 L 422 160 L 366 160 L 366 156 Z " fill="rgb(68,68,68)"/>
            <path d=" M 366 96 L 422 96 L 422 100 L 366 100 L 366 96 Z " fill="rgb(68,68,68)"/>
            <path d=" M 414 96 L 426 96 L 426 108 L 414 108 L 414 96 Z " fill="rgb(68,68,68)"/>
            <path d=" M 414 112 L 426 112 L 426 124 L 414 124 L 414 112 Z " fill="rgb(68,68,68)"/>
            <path d=" M 414 128 L 426 128 L 426 160 L 414 160 L 414 128 Z " fill="rgb(68,68,68)"/>
        </g>
    </g>
</svg>tinymce/themes/advanced/skins/default/img/media/audio.svg000060400000001407152456167170017512 0ustar00<?xml version="1.0" encoding="UTF-8" standalone="no"?>
<svg xmlns="http://www.w3.org/2000/svg"
    xmlns:xlink="http://www.w3.org/1999/xlink" viewBox="0 0 1024 512" width="1024" height="192">
    <title>Audio</title>
    <g>
        <text x="640" y="320" style='font-family:-apple-systrem,BlinkMacSystremFont,"Segoe UI",Roboto,Oxygen-Sans,Ubuntu,Cantarell,"Helvetica Neue",Arial,sans-serif;font-weight:bold;font-size:320px;fill:#444;stroke:none;'>Audio</text>
        <path d="M480 0h32v368c0 44.183-50.145 80-112 80s-112-35.817-112-80c0-44.184 50.145-80 112-80 31.342 0 59.671 9.2 80 24.021v-184.021l-256 56.889v247.111c0 44.183-50.144 80-112 80s-112-35.817-112-80c0-44.184 50.144-80 112-80 31.342 0 59.671 9.2 80 24.021v-312.021l288-64z" fill="#444"></path>
    </g>
</svg>tinymce/themes/advanced/skins/default/img/anchor.gif000060400000000106152456167170016545 0ustar00GIF89a���������!�,@��w&��ڃq����|�a�4�b�;tinymce/themes/advanced/skins/default/img/pagebreak.png000060400000001314152456167170017235 0ustar00�PNG


IHDR��
sBIT|d�	pHYs
�
�B�4�tEXtCreation Time11/12/10�r<0tEXtSoftwareAdobe FireworksO�N(IDAT8�Ք;o�1�ߒ�	�DE�(�J0�D�
	�3K��K�P�;3�ɂ����K��4i���6C�UM�p��.>���~ϱ�RJ�Rz���h���lN7�K��%�
�o�wkkkIEQJ-���x��t��5N$�)��$�VXkq�b��Z�s�n�?���>^__�j��=����x{yr��Dc�6Ơ�����[kb�
�e@-//��������^�����2Rq�Z�e��% !�����14&�n��?���ff�09=��^RW�P���n��<��5)ERڥV�����-]�,"*�8h�%�@���cgCN��w�U�At����k�Hp���B��je��q��9�3�,�Z��
X�ޫ����^0���7$��?���U�����*k�0G$p~�)E.��
�~?��k���:�����8��~'d���6�u�J�{S��$Ј�q��+�1dYF<����:�$,�n�IB?�z��䜻��v������JD���u:��h��1�)`|ت?H�R�co����_�6/C߷�IEND�B`�tinymce/themes/advanced/skins/default/img/readmore.svg000060400000014552152456167170017135 0ustar00<!-- Generated by IcoMoon.io -->
<svg version="1.1" xmlns="http://www.w3.org/2000/svg" width="512" height="512" viewBox="0 0 512 512">
<title></title>
<g id="icomoon-ignore">
    <line stroke-width="1" x1="16" y1="0" x2="16" y2="512" stroke="#449FDB" opacity="0.3"></line>
    <line stroke-width="1" x1="32" y1="0" x2="32" y2="512" stroke="#449FDB" opacity="1"></line>
    <line stroke-width="1" x1="48" y1="0" x2="48" y2="512" stroke="#449FDB" opacity="0.3"></line>
    <line stroke-width="1" x1="64" y1="0" x2="64" y2="512" stroke="#449FDB" opacity="1"></line>
    <line stroke-width="1" x1="80" y1="0" x2="80" y2="512" stroke="#449FDB" opacity="0.3"></line>
    <line stroke-width="1" x1="96" y1="0" x2="96" y2="512" stroke="#449FDB" opacity="1"></line>
    <line stroke-width="1" x1="112" y1="0" x2="112" y2="512" stroke="#449FDB" opacity="0.3"></line>
    <line stroke-width="1" x1="128" y1="0" x2="128" y2="512" stroke="#449FDB" opacity="1"></line>
    <line stroke-width="1" x1="144" y1="0" x2="144" y2="512" stroke="#449FDB" opacity="0.3"></line>
    <line stroke-width="1" x1="160" y1="0" x2="160" y2="512" stroke="#449FDB" opacity="1"></line>
    <line stroke-width="1" x1="176" y1="0" x2="176" y2="512" stroke="#449FDB" opacity="0.3"></line>
    <line stroke-width="1" x1="192" y1="0" x2="192" y2="512" stroke="#449FDB" opacity="1"></line>
    <line stroke-width="1" x1="208" y1="0" x2="208" y2="512" stroke="#449FDB" opacity="0.3"></line>
    <line stroke-width="1" x1="224" y1="0" x2="224" y2="512" stroke="#449FDB" opacity="1"></line>
    <line stroke-width="1" x1="240" y1="0" x2="240" y2="512" stroke="#449FDB" opacity="0.3"></line>
    <line stroke-width="1" x1="256" y1="0" x2="256" y2="512" stroke="#449FDB" opacity="1"></line>
    <line stroke-width="1" x1="272" y1="0" x2="272" y2="512" stroke="#449FDB" opacity="0.3"></line>
    <line stroke-width="1" x1="288" y1="0" x2="288" y2="512" stroke="#449FDB" opacity="1"></line>
    <line stroke-width="1" x1="304" y1="0" x2="304" y2="512" stroke="#449FDB" opacity="0.3"></line>
    <line stroke-width="1" x1="320" y1="0" x2="320" y2="512" stroke="#449FDB" opacity="1"></line>
    <line stroke-width="1" x1="336" y1="0" x2="336" y2="512" stroke="#449FDB" opacity="0.3"></line>
    <line stroke-width="1" x1="352" y1="0" x2="352" y2="512" stroke="#449FDB" opacity="1"></line>
    <line stroke-width="1" x1="368" y1="0" x2="368" y2="512" stroke="#449FDB" opacity="0.3"></line>
    <line stroke-width="1" x1="384" y1="0" x2="384" y2="512" stroke="#449FDB" opacity="1"></line>
    <line stroke-width="1" x1="400" y1="0" x2="400" y2="512" stroke="#449FDB" opacity="0.3"></line>
    <line stroke-width="1" x1="416" y1="0" x2="416" y2="512" stroke="#449FDB" opacity="1"></line>
    <line stroke-width="1" x1="432" y1="0" x2="432" y2="512" stroke="#449FDB" opacity="0.3"></line>
    <line stroke-width="1" x1="448" y1="0" x2="448" y2="512" stroke="#449FDB" opacity="1"></line>
    <line stroke-width="1" x1="464" y1="0" x2="464" y2="512" stroke="#449FDB" opacity="0.3"></line>
    <line stroke-width="1" x1="480" y1="0" x2="480" y2="512" stroke="#449FDB" opacity="1"></line>
    <line stroke-width="1" x1="496" y1="0" x2="496" y2="512" stroke="#449FDB" opacity="0.3"></line>
    <line stroke-width="1" x1="0" y1="16" x2="512" y2="16" stroke="#449FDB" opacity="0.3"></line>
    <line stroke-width="1" x1="0" y1="32" x2="512" y2="32" stroke="#449FDB" opacity="1"></line>
    <line stroke-width="1" x1="0" y1="48" x2="512" y2="48" stroke="#449FDB" opacity="0.3"></line>
    <line stroke-width="1" x1="0" y1="64" x2="512" y2="64" stroke="#449FDB" opacity="1"></line>
    <line stroke-width="1" x1="0" y1="80" x2="512" y2="80" stroke="#449FDB" opacity="0.3"></line>
    <line stroke-width="1" x1="0" y1="96" x2="512" y2="96" stroke="#449FDB" opacity="1"></line>
    <line stroke-width="1" x1="0" y1="112" x2="512" y2="112" stroke="#449FDB" opacity="0.3"></line>
    <line stroke-width="1" x1="0" y1="128" x2="512" y2="128" stroke="#449FDB" opacity="1"></line>
    <line stroke-width="1" x1="0" y1="144" x2="512" y2="144" stroke="#449FDB" opacity="0.3"></line>
    <line stroke-width="1" x1="0" y1="160" x2="512" y2="160" stroke="#449FDB" opacity="1"></line>
    <line stroke-width="1" x1="0" y1="176" x2="512" y2="176" stroke="#449FDB" opacity="0.3"></line>
    <line stroke-width="1" x1="0" y1="192" x2="512" y2="192" stroke="#449FDB" opacity="1"></line>
    <line stroke-width="1" x1="0" y1="208" x2="512" y2="208" stroke="#449FDB" opacity="0.3"></line>
    <line stroke-width="1" x1="0" y1="224" x2="512" y2="224" stroke="#449FDB" opacity="1"></line>
    <line stroke-width="1" x1="0" y1="240" x2="512" y2="240" stroke="#449FDB" opacity="0.3"></line>
    <line stroke-width="1" x1="0" y1="256" x2="512" y2="256" stroke="#449FDB" opacity="1"></line>
    <line stroke-width="1" x1="0" y1="272" x2="512" y2="272" stroke="#449FDB" opacity="0.3"></line>
    <line stroke-width="1" x1="0" y1="288" x2="512" y2="288" stroke="#449FDB" opacity="1"></line>
    <line stroke-width="1" x1="0" y1="304" x2="512" y2="304" stroke="#449FDB" opacity="0.3"></line>
    <line stroke-width="1" x1="0" y1="320" x2="512" y2="320" stroke="#449FDB" opacity="1"></line>
    <line stroke-width="1" x1="0" y1="336" x2="512" y2="336" stroke="#449FDB" opacity="0.3"></line>
    <line stroke-width="1" x1="0" y1="352" x2="512" y2="352" stroke="#449FDB" opacity="1"></line>
    <line stroke-width="1" x1="0" y1="368" x2="512" y2="368" stroke="#449FDB" opacity="0.3"></line>
    <line stroke-width="1" x1="0" y1="384" x2="512" y2="384" stroke="#449FDB" opacity="1"></line>
    <line stroke-width="1" x1="0" y1="400" x2="512" y2="400" stroke="#449FDB" opacity="0.3"></line>
    <line stroke-width="1" x1="0" y1="416" x2="512" y2="416" stroke="#449FDB" opacity="1"></line>
    <line stroke-width="1" x1="0" y1="432" x2="512" y2="432" stroke="#449FDB" opacity="0.3"></line>
    <line stroke-width="1" x1="0" y1="448" x2="512" y2="448" stroke="#449FDB" opacity="1"></line>
    <line stroke-width="1" x1="0" y1="464" x2="512" y2="464" stroke="#449FDB" opacity="0.3"></line>
    <line stroke-width="1" x1="0" y1="480" x2="512" y2="480" stroke="#449FDB" opacity="1"></line>
    <line stroke-width="1" x1="0" y1="496" x2="512" y2="496" stroke="#449FDB" opacity="0.3"></line>
</g>
<path d="M0 256h64v32h-64zM96 256h96v32h-96zM224 256h64v32h-64zM320 256h96v32h-96zM448 256h64v32h-64zM440 0l8 224h-384l8-224h16l8 192h320l8-192zM72 512l-8-192h384l-8 192h-16l-8-160h-320l-8 160z"></path>
</svg>
tinymce/themes/advanced/skins/default/img/load.gif000060400000003407152456167170016221 0ustar00GIF89a���y��������������������������wul���!�NETSCAPE2.0!�XMP DataXMP�?xpacke                                                                            
                            
?xpacket end="w"?>!�XMP DataXMP�?xpacke                                                                            
                            
?xpacket end="w"?>!�XMP DataXMP�?xpacke                                                                            
                            
?xpacket end="w"?>!�XMP DataXMP�?xpacke                                                                            
                            
?xpacket end="w"?>!�XMP DataXMP�?xpacke                                                                            
                            
?xpacket end="w"?>!�XMP DataXMP�?xpacke                                                                            
                            
?xpacket end="w"?>!�XMP DataXMP�?xpacke                                                                            
                            
?xpacket end="w"?>!�,@N�����肧��t�A(@	�00A�,�Lb](E�g��Ђ�XI�Y��R����0=Ɇ�4L�P�rQj6"L9K#��!�,N��Ɏ��{�$D�1�hQ]IiN�:��)S�$�����b��$?J �Q(0�)�j�f��{����n-~Nž!�,M���J���B�Beuǁ��Ȕ%5�e��f3ޔ$�ݮ�("�<�L���"`�RJ�J�N
�������9ܣ�=!�,N��Ʉ��Z�g� LQ`��fAP)8�/,S&�,�t�ݮ��	y��D���"�H`�R
b��b�����m�^Sڙ!�,M���B��Z��Z���}�H��I
�	b$�(�T�}绝�	�~9�@2�����	��@0�����M|ř.œ�t;!�,M���֢�Z��R���}�H��I�l��t� 0��:A��
v>CGA 2�ƉHP�Ѧ�j80�R-��J�t;!�,M��ɔ��Z�'��,�}�H��I�l���tS0���ޭ�%8��b0dL�I�B)��Q(0`&� t�ह���3;tinymce/themes/advanced/skins/default/img/menu_check.gif000060400000000106152456167170017374 0ustar00GIF89a����!�,�����������;�i�#~����ʶ�{;tinymce/themes/advanced/skins/default/img/readmore.png000060400000000565152456167170017121 0ustar00�PNG


IHDR��
<IDAT8��=N�@�߮��1
Uj
*�s.�&='�H	)|����R���do��34��V�(6R*^���}��]�_�
f>��Yk�4�Xkwi�~,��/���~��X,^&���{���	DDf>�L�@�F�AY��E�
��k�t��BD���ރ�Ozf�Eq8h��<��0���z��ED���O"�"�s:��GZk8�t\�4��!աi�ȉ�u�7�Mo`��(�ϟΧ(��h�J�v$[k�Q�Z�ig�!���F`Y�f(����'˲gc���s����1Zu��@=�����*�O-1��IEND�B`�tinymce/themes/advanced/skins/default/img/picture.svg000060400000001010152456167170016773 0ustar00<!-- Generated by IcoMoon.io -->
<svg version="1.1" 
    xmlns="http://www.w3.org/2000/svg" width="512" height="512" viewBox="0 0 512 512" fill="#000" fill-opacity="0.6">
    <title></title>
    <path d="M432 192l-112 112-96-96-160 160v48h384v-224z"></path>
    <path d="M464 64c8.673 0 16 7.327 16 16v352c0 8.673-7.327 16-16 16h-416c-8.673 0-16-7.327-16-16v-352c0-8.673 7.327-16 16-16h416zM464 32h-416c-26.4 0-48 21.6-48 48v352c0 26.4 21.6 48 48 48h416c26.4 0 48-21.6 48-48v-352c0-26.4-21.6-48-48-48v0z"></path>
</svg>
tinymce/themes/advanced/skins/default/img/progress.gif000060400000003371152456167170017146 0ustar00GIF89a  �"""����������������UUU333������!�NETSCAPE2.0!�
,  @�p�IiQ��J����S2l po���ĐH'�N���%��j�%Q8'+rR�0��6 �Fs�Z4|��SB��T���	b�nYa��9h�8:q�C�y�g,S\)_�Q?e��	�+��S
��5	#lO<��#vY��J;v\�aU}L 5��{|q��&k�23�87���ӏ�Ϧ_�XȽ�`���+�=L���ε�)�qX��竞&Aq"!�
,rp�I+ 5��F��`R��h�W�R�l;L&-���f�m�)���M��<�\M���Rd��@�
H̑B ��M��oƆ�����	��������������Gz{!�
,rp�I'A5�:�M�P!(u�(�8��D����J�K2�r���3-h� �$6�3e`�&��� zfL�Z�
a>�F
��W�ssyJ}T	�N.aqXshC�XJ!�
,ipɹ�4�]L�߶$Af����M�A���	�J�j��@'[T��b�*-b�J��I�Z PM
�sbg�p$������v�!��5
��?}��
�
�!�
,e0�������K!^�a��X�	�[�(\
-���S�R@ PC�r0"� ��L�����z��xLՍπ*� ��_נP���:�D�eUywZt
n!�
,�0����x���D�W��E�&j�׊�@���.w~���20��0`4r|�BӀ�M�>������,bL>|?�4B�>��ʻ��u�9y��&
2x&

k�&	�
U]�
vo�o�p�raT&!�
,{pɹB�B�O��e�T�G\l�	)S���&��4��0�yT�SL�\:=����J��k���:	D��eĨ��c�8O��b/�:{
ty�t#����|��-
mN
qK!�
,lp�I�"8�d����y ��h�**��Zp�TR�F1��"��-
C��`�B�8,X	�9*P,@R`Z=���>u,S���"ΦO�T\um|;�8~*!�
,xp�I�]��p�
�]��5�ĐP`�)%�� !�����H�B��	P����МV��	59(�X25�,�I�/���n#&��@����Vq5tsny\)_�g��|r�5!�
,g�E�8�[��`&y_h��)
E"�+gG
h@l5��"����A .��@M���E��8NgL+���P�Ƀ�	�p�us/jȩ�jVjc7I!�
,\�(e�����@��p
"�X�h�QmTqm�x��h� �������w�$'��s)�a��]-�l�j����_�g��i�rˀ`�%	!�
,rpɹ��x*�2�
�M���]hiG!ۑ".��J���j�+,��p@X���VF�n���50��y�QL�\@K��0�E	�c���}d�yFv(	�;tinymce/themes/advanced/skins/default/img/pagebreak.svg000060400000014540152456167170017255 0ustar00<!-- Generated by IcoMoon.io -->
<svg version="1.1" xmlns="http://www.w3.org/2000/svg" width="512" height="512" viewBox="0 0 512 512">
<title></title>
<g id="icomoon-ignore">
    <line stroke-width="1" x1="16" y1="0" x2="16" y2="512" stroke="#449FDB" opacity="0.3"></line>
    <line stroke-width="1" x1="32" y1="0" x2="32" y2="512" stroke="#449FDB" opacity="1"></line>
    <line stroke-width="1" x1="48" y1="0" x2="48" y2="512" stroke="#449FDB" opacity="0.3"></line>
    <line stroke-width="1" x1="64" y1="0" x2="64" y2="512" stroke="#449FDB" opacity="1"></line>
    <line stroke-width="1" x1="80" y1="0" x2="80" y2="512" stroke="#449FDB" opacity="0.3"></line>
    <line stroke-width="1" x1="96" y1="0" x2="96" y2="512" stroke="#449FDB" opacity="1"></line>
    <line stroke-width="1" x1="112" y1="0" x2="112" y2="512" stroke="#449FDB" opacity="0.3"></line>
    <line stroke-width="1" x1="128" y1="0" x2="128" y2="512" stroke="#449FDB" opacity="1"></line>
    <line stroke-width="1" x1="144" y1="0" x2="144" y2="512" stroke="#449FDB" opacity="0.3"></line>
    <line stroke-width="1" x1="160" y1="0" x2="160" y2="512" stroke="#449FDB" opacity="1"></line>
    <line stroke-width="1" x1="176" y1="0" x2="176" y2="512" stroke="#449FDB" opacity="0.3"></line>
    <line stroke-width="1" x1="192" y1="0" x2="192" y2="512" stroke="#449FDB" opacity="1"></line>
    <line stroke-width="1" x1="208" y1="0" x2="208" y2="512" stroke="#449FDB" opacity="0.3"></line>
    <line stroke-width="1" x1="224" y1="0" x2="224" y2="512" stroke="#449FDB" opacity="1"></line>
    <line stroke-width="1" x1="240" y1="0" x2="240" y2="512" stroke="#449FDB" opacity="0.3"></line>
    <line stroke-width="1" x1="256" y1="0" x2="256" y2="512" stroke="#449FDB" opacity="1"></line>
    <line stroke-width="1" x1="272" y1="0" x2="272" y2="512" stroke="#449FDB" opacity="0.3"></line>
    <line stroke-width="1" x1="288" y1="0" x2="288" y2="512" stroke="#449FDB" opacity="1"></line>
    <line stroke-width="1" x1="304" y1="0" x2="304" y2="512" stroke="#449FDB" opacity="0.3"></line>
    <line stroke-width="1" x1="320" y1="0" x2="320" y2="512" stroke="#449FDB" opacity="1"></line>
    <line stroke-width="1" x1="336" y1="0" x2="336" y2="512" stroke="#449FDB" opacity="0.3"></line>
    <line stroke-width="1" x1="352" y1="0" x2="352" y2="512" stroke="#449FDB" opacity="1"></line>
    <line stroke-width="1" x1="368" y1="0" x2="368" y2="512" stroke="#449FDB" opacity="0.3"></line>
    <line stroke-width="1" x1="384" y1="0" x2="384" y2="512" stroke="#449FDB" opacity="1"></line>
    <line stroke-width="1" x1="400" y1="0" x2="400" y2="512" stroke="#449FDB" opacity="0.3"></line>
    <line stroke-width="1" x1="416" y1="0" x2="416" y2="512" stroke="#449FDB" opacity="1"></line>
    <line stroke-width="1" x1="432" y1="0" x2="432" y2="512" stroke="#449FDB" opacity="0.3"></line>
    <line stroke-width="1" x1="448" y1="0" x2="448" y2="512" stroke="#449FDB" opacity="1"></line>
    <line stroke-width="1" x1="464" y1="0" x2="464" y2="512" stroke="#449FDB" opacity="0.3"></line>
    <line stroke-width="1" x1="480" y1="0" x2="480" y2="512" stroke="#449FDB" opacity="1"></line>
    <line stroke-width="1" x1="496" y1="0" x2="496" y2="512" stroke="#449FDB" opacity="0.3"></line>
    <line stroke-width="1" x1="0" y1="16" x2="512" y2="16" stroke="#449FDB" opacity="0.3"></line>
    <line stroke-width="1" x1="0" y1="32" x2="512" y2="32" stroke="#449FDB" opacity="1"></line>
    <line stroke-width="1" x1="0" y1="48" x2="512" y2="48" stroke="#449FDB" opacity="0.3"></line>
    <line stroke-width="1" x1="0" y1="64" x2="512" y2="64" stroke="#449FDB" opacity="1"></line>
    <line stroke-width="1" x1="0" y1="80" x2="512" y2="80" stroke="#449FDB" opacity="0.3"></line>
    <line stroke-width="1" x1="0" y1="96" x2="512" y2="96" stroke="#449FDB" opacity="1"></line>
    <line stroke-width="1" x1="0" y1="112" x2="512" y2="112" stroke="#449FDB" opacity="0.3"></line>
    <line stroke-width="1" x1="0" y1="128" x2="512" y2="128" stroke="#449FDB" opacity="1"></line>
    <line stroke-width="1" x1="0" y1="144" x2="512" y2="144" stroke="#449FDB" opacity="0.3"></line>
    <line stroke-width="1" x1="0" y1="160" x2="512" y2="160" stroke="#449FDB" opacity="1"></line>
    <line stroke-width="1" x1="0" y1="176" x2="512" y2="176" stroke="#449FDB" opacity="0.3"></line>
    <line stroke-width="1" x1="0" y1="192" x2="512" y2="192" stroke="#449FDB" opacity="1"></line>
    <line stroke-width="1" x1="0" y1="208" x2="512" y2="208" stroke="#449FDB" opacity="0.3"></line>
    <line stroke-width="1" x1="0" y1="224" x2="512" y2="224" stroke="#449FDB" opacity="1"></line>
    <line stroke-width="1" x1="0" y1="240" x2="512" y2="240" stroke="#449FDB" opacity="0.3"></line>
    <line stroke-width="1" x1="0" y1="256" x2="512" y2="256" stroke="#449FDB" opacity="1"></line>
    <line stroke-width="1" x1="0" y1="272" x2="512" y2="272" stroke="#449FDB" opacity="0.3"></line>
    <line stroke-width="1" x1="0" y1="288" x2="512" y2="288" stroke="#449FDB" opacity="1"></line>
    <line stroke-width="1" x1="0" y1="304" x2="512" y2="304" stroke="#449FDB" opacity="0.3"></line>
    <line stroke-width="1" x1="0" y1="320" x2="512" y2="320" stroke="#449FDB" opacity="1"></line>
    <line stroke-width="1" x1="0" y1="336" x2="512" y2="336" stroke="#449FDB" opacity="0.3"></line>
    <line stroke-width="1" x1="0" y1="352" x2="512" y2="352" stroke="#449FDB" opacity="1"></line>
    <line stroke-width="1" x1="0" y1="368" x2="512" y2="368" stroke="#449FDB" opacity="0.3"></line>
    <line stroke-width="1" x1="0" y1="384" x2="512" y2="384" stroke="#449FDB" opacity="1"></line>
    <line stroke-width="1" x1="0" y1="400" x2="512" y2="400" stroke="#449FDB" opacity="0.3"></line>
    <line stroke-width="1" x1="0" y1="416" x2="512" y2="416" stroke="#449FDB" opacity="1"></line>
    <line stroke-width="1" x1="0" y1="432" x2="512" y2="432" stroke="#449FDB" opacity="0.3"></line>
    <line stroke-width="1" x1="0" y1="448" x2="512" y2="448" stroke="#449FDB" opacity="1"></line>
    <line stroke-width="1" x1="0" y1="464" x2="512" y2="464" stroke="#449FDB" opacity="0.3"></line>
    <line stroke-width="1" x1="0" y1="480" x2="512" y2="480" stroke="#449FDB" opacity="1"></line>
    <line stroke-width="1" x1="0" y1="496" x2="512" y2="496" stroke="#449FDB" opacity="0.3"></line>
</g>
<path d="M128 192v-192h384v192h-32v-160h-320v160zM512 288v224h-384v-224h32v192h320v-192zM256 224h64v32h-64zM160 224h64v32h-64zM352 224h64v32h-64zM448 224h64v32h-64zM0 144l96 96-96 96z"></path>
</svg>
tinymce/themes/advanced/skins/default/ui.admin.css000060400000011064152456167170016253 0ustar00.mceDefaultSkin .mceToolbar{border:0;padding:0}.mceDefaultSkin .mceLayout,.mceDefaultSkin .mceLayout .mceToolbar{border:0!important;background:#fff}.mceDefaultSkin .mceToolbarItem div{display:inline-block}.mceDefaultSkin .mceLayout .mceStatusbar{border:1px solid #ddd;border-top-width:0}.mceDefaultSkin .mceLayout .mceIframeContainer{background:#fff;width:100%;position:relative;padding:5px;box-sizing:border-box;white-space:pre-line;border:1px solid #ddd;margin:0}.mceToolbarRow .mceToolbarItem{font-size:0;vertical-align:top;line-height:1}.mceToolbarRow .mceToolbarItem .mceButton{display:inline-flex;align-items:center;justify-content:center;vertical-align:middle}.mceToolbarRow .mceToolbarItem .mceButton,.mceToolbarRow .mceToolbarItem .mceButton .mceIcon{cursor:move}.mceToolbarRow .mceToolbarItem .mceButton+.mceButton{margin-left:1px}.mceEditor .mceToolbarItem .mceSplitButton .mceButton+.mceButton{margin-left:inherit}.mceDefaultSkin .mceToolbar .mceToolbarRow{font-size:0;line-height:1;height:auto;min-height:38px;position:relative;background-color:#f5f5f5;border:1px solid #ddd;padding:1px;margin-bottom:2px;cursor:move;display:block}.mceEditor .mceToolbarItem .mceListBox,.mceEditor .mceToolbarItem .mceSplitButton{width:100%;padding:0;position:relative;display:inline-block}.mceEditor .mceToolbarItem .mceListBox .mceIcon{display:none}.mceEditor .mceToolbarItem .mceSplitButton .mceIcon{display:inline-block;margin:4px 5px}.mceEditor .mceToolbarItem .mceSplitButton{width:48px;height:32px;text-align:left;font-size:0}.mceEditor .mceToolbarItem .mceListBox{font-size:0;max-width:114px;margin:0;border:1px solid #ccc}.mceEditor .mceToolbarItem .mceListBox:before{content:attr(title);display:inline-block;width:96px;background:#fff;font-size:14px;line-height:30px;padding:0 2px;box-sizing:border-box;overflow:hidden;text-overflow:ellipsis;text-align:left}.mceEditor .mceToolbarItem .mceListBox:after,.mceEditor .mceToolbarItem .mceSplitButton:after{content:"\25bc";display:inline-block;font-size:9px;line-height:30px;color:#444;width:16px;text-align:center;border-left:1px solid #ddd;box-sizing:border-box;background:#f5f5f5;vertical-align:top}.mceDefaultSkin .mceStatusbar{line-height:1}.mceDefaultSkin .mceToolbarItem .mceIcon img{width:16px}.mceDefaultSkinTouch .mceToolBarItem .mceListBox,.mceDefaultSkinTouch .mceToolBarItem .mceSplitButton{border-color:#dcdcdc;height:36px}.mceDefaultSkinTouch .mceLayout .mceToolbar .mceToolbarRow{min-height:38px}.mceDefaultSkinTouch .mceToolBarItem .mceButton{padding:7px;border-color:#dcdcdc;background-color:#fafafa}.mceDefaultSkinTouch .mceToolBarItem .mceListBox{width:112px;padding:0}.mceDefaultSkinTouch .mceToolBarItem .mceSplitButton{width:55px;padding:0;height:36px}.mceDefaultSkinTouch .mceToolBarItem .mceListBox .mceIcon{width:92px}.mceDefaultSkinTouch .mceToolBarItem .mceListBox .mceIcon:before{width:92px;line-height:34px}.mceDefaultSkinTouch .mceToolBarItem .mceListBox:after,.mceDefaultSkinTouch .mceToolBarItem .mceSplitButton:after{line-height:34px;width:20px;border-color:#dcdcdc}.mceDefaultSkinTouch .mceLayout .mceIframeContainer,.mceDefaultSkinTouch .mceLayout .mceStatusbar{border-color:#dcdcdc}.mceDefaultSkinTouch .mceLayout .mceToolbarRow{background-color:#fafafa;border-color:#dcdcdc}.mceDefaultSkinTouch .mceToolbar .sortableRowHandle{height:42px}.mceDefaultSkinTouch .mceToolbar .sortableRowHandle .uk-icon{margin:12px 0 0}.mceDefaultSkinTouch .mceToolBarItem .mceSeparator{height:34px;background:#dcdcdc}.mceDefaultSkinTouch .sortableList .mceToolbarRow.sortableListItem.ui-sortable-highlight{height:38px}.mceDefaultSkinTouch .sortableList .mceToolBarItem.sortableRowItem.ui-sortable-highlight{height:36px}.mceDefaultSkinTouch .mceLayout,.mceDefaultSkinTouch .mceLayout .mceToolbar{border:0!important;background:#fff}.mceDefaultSkinTouch .mceLayout .mceFirst,.mceDefaultSkinTouch .mceLayout .mceLast{background-color:#fff!important}.mceDefaultSkinTouch .mceLayout .mceStatusbar{background-color:#fafafa!important}.mceDefaultSkinTouch .mceToolBarItem .mceListBox::before{line-height:32px;width:90px}.mceDefaultSkinTouch .mceToolbarItem .mceSplitButton .mceIcon{margin:9px}.mceDefaultSkinTouch .mceToolbarItem .mceSplitButton{width:58px;height:40px}.mceDefaultSkinTouch .mceToolbarItem .mceListBox::before{line-height:38px}.mceDefaultSkinTouch .mceToolbarItem .mceListBox::after,.mceDefaultSkinTouch .mceToolbarItem .mceSplitButton::after{width:16px;line-height:38px}.checkboxes .mceButton .mceIcon{display:inline-block}.com_jce .nav-link .mce-toolbar .mce-btn,.com_jce .nav-link .mce-toolbar .mce-btn button{cursor:pointer}.mceLayout .mceStatusbar .mcePathRow{background:inherit}tinymce/themes/advanced/skins/default/src/wordcount.css000060400000000440152456167170017356 0ustar00.mceDefaultSkin .mceStatusbar .mceWordCount,.mceDefaultSkin .mceStatusbar .mceWordCount .mceText{font-size:14px}.mceDefaultSkin .mceStatusbar .mceWordCount .mceText:before{content:attr(title);display:inline-block;margin:0 5px}.mceDefaultSkin .mceWordCountLimit{font-weight:700;color:#c00}tinymce/themes/advanced/skins/default/src/listbox.css000060400000010404152456167170017017 0ustar00.mceDefaultSkin .mceListBox{display:flex;flex-direction:row}.mceDefaultSkin .mceListBox .mceText{padding:0 4px;min-width:96px;height:32px;text-align:left;border:1px solid #ddd;border-right:0;background:#fff;line-height:2;overflow:hidden;border-radius:2px 0 0 2px;cursor:pointer}.mceDefaultSkin .mceListBox .mceOpen{width:16px;height:32px;border:1px solid #ddd;text-align:center;border-radius:0 2px 2px 0;cursor:pointer}.mceDefaultSkin .mceListBox .mceOpen,.mceDefaultSkin .mceListBox .mceText{float:left}.mceDefaultSkin .mceListBox:focus .mceOpen,.mceDefaultSkin .mceListBox:hover .mceOpen{border-color:#ccc;background-color:#fafafa}.mceDefaultSkin .mceListBox:focus .mceText,.mceDefaultSkin .mceListBox:hover .mceText{border-color:#ccc}.mceDefaultSkin .mceListBox .mceOpen:after{content:"\25BC";display:block;font-size:9px;line-height:32px;color:#444;text-align:center}.mceDefaultSkin .mceListBox .mceComboBox{position:relative;display:flex;flex-direction:row;width:100%;min-width:50%;flex:1;flex-wrap:wrap;align-items:center;border:1px solid #ddd;border-radius:2px}.mceDefaultSkin .mceListBox .mceComboBox .mceText{height:30px;line-height:32px;background:#fff;cursor:text;padding:4px;box-sizing:border-box;border:0;outline:0;width:100%;min-width:25%;flex:1}.mceDefaultSkin .mceListBox .mceComboBox .mceOpen{border:0}.mceDefaultSkin .mceListBoxSelected .mceText{border:1px solid #ccc;border-right:0;background:#fff;border-radius:2px 0 0}.mceDefaultSkin .mceListBoxSelected .mceOpen{background-color:#fff;border:1px solid #ccc;border-left:0;padding-left:1px;border-radius:0 2px 0 0}.mceDefaultSkin .mceListBoxSelected:focus .mceOpen,.mceDefaultSkin .mceListBoxSelected:hover .mceOpen{background-color:#fff}.mceDefaultSkin .mceListBoxSelected::after{content:"";padding:2px 0;width:100%;position:absolute;left:0;bottom:-3px;background:#fff;box-sizing:border-box;z-index:700011;border:1px solid #ccc;border-top:0 none;border-bottom:0 none}.mceDefaultSkin .mceListBoxDisabled .mceOpen:after{color:gray}.mceDefaultSkin .mceListBoxDisabled .mceText{color:gray;background-color:transparent}.mceListBoxMenu{min-width:calc(113px * 2);min-height:68px;height:auto;max-height:386px;margin-top:3px;overflow:hidden}.mceListBoxMenu .mceMenuItems .mceText{padding:0 8px 0 24px}.mceListBoxMenu .mceMenuItems .mceSelected{outline:#ddd dashed 1px;background-color:#eee}.mceListBoxMenu .mceMenuItems .mceHasIcon.mceSelected:before{left:inherit;right:.5em}.mceListBoxMenu .mceMenuItems{overflow:hidden;overflow-y:auto;max-height:386px}select.mceNativeListBox{font-size:7pt;background:#fafafa;border:1px solid gray;margin-right:2px}.mceListBoxMenu .mceMenuFilter{border:1px solid #ddd;width:auto;margin:.125em;position:relative;display:flex;flex-direction:row;flex-wrap:wrap;border-radius:2px;align-items:center;padding:0;box-sizing:border-box;transition:all .2s linear;transition-property:all;transition-property:border,background;cursor:text}.mceListBoxMenu .mceMenuFilter .mceMenuFilterInput{position:relative;display:flex;flex-direction:row;width:100%;min-width:50%;flex:1}.mceListBoxMenu .mceMenuFilter input{height:32px;line-height:32px;width:100%;background:#fff;cursor:text;padding:4px;box-sizing:border-box;border:0;outline:0}.mceListBox .mceComboBox .mceButton,.mceListBoxMenu .mceMenuFilter .mceButton{margin:.125em;position:relative;display:flex;justify-content:space-around;align-items:center;height:2em;min-width:5em;min-height:inherit;padding:0;box-sizing:border-box;background:#eee}.mceListBox .mceComboBox .mceButton{margin:1px;min-width:3em;padding:0 1px 0 0}.mceListBox .mceComboBox .mceButton label,.mceListBoxMenu .mceMenuFilter .mceButton label{padding:.25em;cursor:default}.mceListBox .mceComboBox .mceButton label{min-width:3em;width:auto;font-size:12px;line-height:1.75em}.mceListBox .mceComboBox .mceButton::after,.mceListBoxMenu .mceMenuFilter .mceButton::after{position:relative;top:0;right:0;display:block;text-align:center;text-indent:0;content:"\00d7";color:#444;line-height:1.4;font-size:1.25em;font-weight:700;height:100%;width:1em}.mceListBox[role=combobox]>button.mceOpen{position:absolute;right:0;height:30px;border-width:1px 1px 0 0}.mceListBoxMenu .mceMenuFilter svg{position:absolute;right:14px;top:14px;fill:#888;width:14px;height:14px;vertical-align:middle}.mceRtl .mceDefaultSkin .mceListBox .mceText{text-align:right;padding:0 4px 0 0}tinymce/themes/advanced/skins/default/src/modal.css000060400000031210152456167170016425 0ustar00.mceModal .mceIcon{vertical-align:baseline;line-height:1}.mceModal .mce_arrow-up:before{content:"\edcc"}.mceModal .mce_arrow-down:before{content:"\edd0"}.mceModal button:disabled .mceIcon{color:#888}.mceModal{position:absolute;z-index:700000;width:100%;height:100%;top:0;left:0}.mceModal *{box-sizing:border-box;white-space:normal}.mceModal .mceModalOverlay{position:fixed;cursor:pointer;background-color:#000;width:100%;height:100%;opacity:.6;z-index:700001}.mceModal .mceLoading .mceModalContent:after,.mceModal .mceLoading .mceModalContent:before{content:"";z-index:700003;position:absolute;box-sizing:border-box}.mceModal .mceModalFrame{box-sizing:border-box;height:100%;left:0;position:absolute;text-align:center;top:0;width:100%;padding:8px}.mceModal .mceModalFrame:after{content:"";display:inline-block;height:100%;vertical-align:middle}.mceModal .mceLoading .mceModalContent:before{width:100%;height:100%;left:0;top:0;background:#fff;opacity:.8}@keyframes donut-spin{0%{transform:rotate(0)}100%{transform:rotate(360deg)}}.mceModal .mceLoading .mceModalContent:after{display:block;border:.25rem solid rgba(0,0,0,.3);border-left-color:#444;border-radius:50%;width:2.5rem;height:2.5rem;animation:donut-spin 1.2s linear infinite;top:50%;left:50%;margin:-3rem 0 0 -1rem}.mceModal .mceModalHeader{padding:8px;background-color:#fff;display:flex;align-items:center}.mceModal .mceModalHeader .mceModalLogo{width:1.25em;height:1.25em;margin:0 .5em 0 0}.mceModal .mceModalHeader .mceModalLogo:empty{display:none}.mceModal .mceModalHeader .mceModalLogo svg{width:100%;height:100%;fill:#fff;border-radius:2px;padding:.125em;text-align:center;display:inline-block;background-color:#444}.mceModal .mceModalHeader .mceModalLogo svg g{fill:#fff}.mceModal .mceModalHeader h5{font-size:18px;line-height:1;font-weight:700;pointer-events:none;width:100%;flex:1}.mceModal .mceModalBody[dir=rtl] .mceModalHeader h5{text-align:right}.mceModal .mceModalMove{cursor:move}.mceModalBody .mceModalContent{background:#fff;position:relative;height:auto}.mceModalBody .mceModalContentIframe{height:calc(100% - 48px)}.mceModalBody .mceModalAlert .mceModalContent,.mceModalBody .mceModalConfirm .mceModalContent,.mceModalBody .mceModalPrompt .mceModalContent{min-height:5em;display:flex;flex-direction:column;justify-content:center}.mceModalBody .mceModalFooter{margin:0;padding:8px;border-radius:0 0 2px;text-align:right;background-color:#fff}.mceModalBody .mceModalBody{cursor:default;display:block;margin:0 auto;position:absolute;text-align:left;width:100%;min-width:160px}.mceModalBody .mceModalContainer{overflow:hidden;max-width:100%;height:auto;line-height:0;border-radius:4px;border:1px solid rgba(0,0,0,.3);box-shadow:0 2px 4px rgba(0,0,0,.4);display:flex;flex-direction:column}.mceModalBody .mceModalClose{width:32px;height:32px;border-radius:2px;cursor:pointer;background:#fff}.mceModalBody .mceModalClose:focus,.mceModalBody .mceModalClose:hover{background:#e5e5e5;border:0}.mceModalBody .mceModalClose:after{color:#444;display:block;font-family:Arial,sans-serif;font-size:1.5em;font-weight:700;line-height:1;margin:0 0 0 1px;text-align:center;text-decoration:none;content:"\00d7"}.mceModalBody .mceModalContent>div,.mceModalBody .mceModalContent>form{height:auto;padding:8px;text-align:center;line-height:1}.mceModalBody .mceModalContent iframe{min-height:inherit;border:0;top:0;left:0;width:100%;height:100%;position:absolute}.mceModalBody .mceModalPlaceHolder{border:1px solid #000;background:#888;top:0;left:0;opacity:.5}.mceModalBody .mceButton{min-width:5em;height:32px;line-height:1;background:#fff;border-radius:2px;color:#444;border:1px solid #ddd;margin:0 0 0 4px;padding:0 8px}.mceModalBody .mceButton:focus,.mceModalBody .mceButton:hover{color:#444;outline:0;text-decoration:none;border-color:#888;background:#fff}.mceModalBody .mceButton:disabled,.mceModalBody .mceButton:focus:disabled,.mceModalBody .mceButton:hover:disabled{color:#888;background:#f5f5f5;border-color:#eee;cursor:not-allowed}.mceModalBody .mceModalFooter .mceButton{border-color:#ddd}.mceModalBody .mceModalFooter .mceButton:focus,.mceModalBody .mceModalFooter .mceButton:hover{border-color:#888;background:#fff}.mceModalBody .mceButtonDefault{border-color:#ddd}.mceModalBody .mceButtonDefault:focus,.mceModalBody .mceButtonDefault:hover{border-color:#888}.mceModalBody .mceModalFooter .mceButtonPrimary{background-color:#337ab7;border:1px solid rgba(0,0,0,.06);color:#fff}.mceModalBody .mceModalFooter .mceButtonPrimary:focus,.mceModalBody .mceModalFooter .mceButtonPrimary:hover{background-color:#286090;color:#fff;border-color:rgba(0,0,0,.21)}.mceModalAlert,.mceModalConfirm,.mceModalPrompt{min-height:160px}[class*=mce-modal-landscape-] .mceModalContentIframe{padding-bottom:calc(56.25% - 61px);height:0}[class*=mce-modal-portrait-] .mceModalContentIframe{padding-bottom:calc(133.33% - 61px)}.mceModal .mce-modal-landscape-128,.mceModal .mce-modal-landscape-xxsmall{max-width:128px}.mceModal .mce-modal-landscape-256,.mceModal .mce-modal-landscape-xsmall{max-width:256px}.mceModal .mce-modal-landscape-384,.mceModal .mce-modal-landscape-small,.mceModalAlert,.mceModalConfirm,.mceModalPrompt{max-width:384px}.mceModal .mce-modal-landscape-512,.mceModal .mce-modal-landscape-medium{max-width:512px}.mceModal .mce-modal-landscape-640,.mceModal .mce-modal-landscape-large{max-width:640px}.mceModal .mce-modal-landscape-768,.mceModal .mce-modal-landscape-xlarge{max-width:768px}.mceModal .mce-modal-landscape-896,.mceModal .mce-modal-landscape-xxlarge{max-width:896px}.mceModal .mce-modal-landscape-1024{max-width:1024px}.mceModal .mce-modal-landscape-full{width:calc(100% - 40px);height:calc(100vh - 20px);padding:0}.mceModal .mce-modal-portrait-128,.mceModal .mce-modal-portrait-xsmall{max-width:128px}.mceModal .mce-modal-portrait-256,.mceModal .mce-modal-portrait-small{max-width:256px}.mceModal .mce-modal-portrait-320{max-width:320px}.mceModal .mce-modal-portrait-384,.mceModal .mce-modal-portrait-medium{max-width:384px}.mceModal .mce-modal-portrait-512,.mceModal .mce-modal-portrait-large{max-width:512px}.mceModal .mce-modal-portrait-640,.mceModal .mce-modal-portrait-xlarge{max-width:640px}.mceModal .mce-modal-portrait-768,.mceModal .mce-modal-portrait-full{width:calc(100% - 40px);height:calc(100vh - 20px);max-height:768px;padding:0}.mceModal .mce-modal-portrait-full{max-width:1440px;max-height:810px}.mceModal .mce-modal-portrait-768{max-width:768px}.mceModal .mce-modal-landscape-full .mceModalContainer,.mceModal .mce-modal-portrait-768 .mceModalContainer,.mceModal .mce-modal-portrait-full .mceModalContainer{height:100%}.mceModal .mce-modal-landscape-full .mceModalContentIframe,.mceModal .mce-modal-portrait-full .mceModalContentIframe{padding:0;height:calc(100% - -48px)}.mceModal .mce-modal-portrait-full .mceModalContentIframe{height:100%}.mceModal .mce-modal-square-small{max-width:384px}.mceModal .mce-modal-square-medium{max-width:512px}.mceModal .mce-modal-square-large{max-width:640px}.mceModal .mce-modal-square-xlarge{max-width:896px}.mceModal .mce-modal-square-large .mceModalContentIframe,.mceModal .mce-modal-square-medium .mceModalContentIframe,.mceModal .mce-modal-square-small .mceModalContentIframe,.mceModal .mce-modal-square-xlarge .mceModalContentIframe{padding-bottom:calc(83.46% - 48px)}.mceModalBody .mceModalContent input[type=text],.mceModalBody .mceModalContent input[type=number],.mceModalBody .mceModalContent select,.mceModalBody .mceModalContent textarea{height:32px;width:100%;padding:4px;border:1px solid #ddd;background:#fff;color:#444;border-radius:2px;box-shadow:inherit;margin:inherit;line-height:1;font-size:inherit;font-size:14px}.mceModalBody .mceModalContent select{line-height:1.5}.mceModalBody .mceModalContent input[type]:disabled,.mceModalBody .mceModalContent select option:disabled,.mceModalBody .mceModalContent select:disabled,.mceModalBody .mceModalContent textarea:disabled{color:#888;background-color:#eee;cursor:not-allowed}.mceModalBody .mceModalContent button{min-width:32px;margin:0}.mceModalBody .mceModalContent textarea{height:auto;line-height:1.5;resize:vertical;white-space:pre-wrap}.mceModalBody .mceModalContent input[type]:focus,.mceModalBody .mceModalContent textarea:focus{border-color:#66afe9;outline:0;background-color:#f5fbfe;color:#444}.mceModalBody .mceModalContent input[type=radio]:focus{border-radius:100%}.mceModalBody .mceModalContent label{line-height:1.25;width:96px}.mceModalBody .mceModalContent .mceModalStack label{width:100%}.mceModalBody .mceModalContent input+label{display:inline-block}.mceModalBody .mceModalContent input[type=checkbox]+label{width:auto}.mceModalBody .mceModalContent input[disabled]+label{color:#888}.mceModalBody .mceModalContent .mceModalRow{display:flex;flex-wrap:wrap;align-items:center;gap:4px;min-height:32px}.mceModalBody .mceModalContent .mceModalControl{flex:1;margin:0;display:flex;align-items:center;gap:4px}.mceModalBody .mceModalContent .mceModalFlexNone{flex:inherit;display:flex}.mceModalBody .mceModalContent .mceModalControl button{margin-left:2px}.mceModalBody .mceListBox .mceOpen{min-width:24px}.mceModalBody .mceModalContent .mceModalControl iframe{position:relative;border:1px solid #ddd}.mceModalBody .mceModalContent .mceModalControlAppend input{padding-right:42px}.mceModalBody .mceModalContent .mceModalControlAppend input+span{position:absolute;right:4px;display:block;color:#888;font-size:14px;line-height:2rem}.mceModalBody .mceModalContent .mceModalControlAppend input+select{max-width:5em}.mceModalBody .mceModalContent p{margin:.5rem 0;font-size:14px;line-height:2rem}.mceModalBody .mceModalAlert .mceModalContent p,.mceModalBody .mceModalConfirm .mceModalContent p{margin:0;text-align:center}.mceModalBody .mceModalContent select:not([multiple]):not([size]){appearance:none;padding-right:20px;background-image:url("data:image/svg+xml;charset=UTF-8,%3Csvg%20width%3D%2224%22%20height%3D%2216%22%20viewBox%3D%220%200%2024%2016%22%20xmlns%3D%22http%3A%2F%2Fwww.w3.org%2F2000%2Fsvg%22%3E%0A%20%20%20%20%3Cpolygon%20fill%3D%22%23666%22%20points%3D%2212%201%209%206%2015%206%22%20%2F%3E%0A%20%20%20%20%3Cpolygon%20fill%3D%22%23666%22%20points%3D%2212%2013%209%208%2015%208%22%20%2F%3E%0A%3C%2Fsvg%3E%0A");background-repeat:no-repeat;background-position:100% 50%}.mceFlexLayout{display:flex;flex-wrap:wrap}.mceGridLayout{display:flex;flex-wrap:nowrap;gap:5px}.mceSizes{gap:20px}.mceSizes input{text-align:center}.mceSizes .mceSeparator{margin:0;width:64px;height:32px;background:0 0}.mceSizes .mceSeparator::after{content:"x";display:block;text-align:center;line-height:32px;font-size:1em}@media (max-height:640px){.mceModalBody .mceModalHeader{padding:4px 8px}.mceModalBody .mceModalContentIframe{height:calc(100% - 40px)}.mceModal .mce-modal-portrait-full{height:768px;min-height:calc(100vh - 20px)}}.mceModalContent .mceButton.mceButtonPicker,.mceModalContent .mceButton.mceButtonUpload,.mceModalContent .mceButton.mceClear{position:absolute;right:0;top:0;z-index:1;background:0 0;border-color:transparent;min-width:inherit;display:flex;align-items:center;justify-content:center}.mceModalContent .mceButton.mceClear:after{display:block;font-family:Arial,sans-serif;font-size:1.25em;font-weight:700;line-height:1;margin:0 2px 0 0;text-align:center;text-decoration:none;content:"\00d7";color:#666}.mceModalContent .mceButton.mceButtonPicker .mceIcon,.mceModalContent .mceButton.mceButtonUpload .mceIcon{color:#666}.mceModalContent .mceButton.mceButtonUpload .mceIcon{margin:25% auto}.mceModalBody .mceModalContent .mceFormControl .mceUrlBoxUpload[aria-busy=true]~.mceButtonUpload .mce_upload,.mceModalContent .mceButton.mceButtonUpload .mce_spinner{display:none}.mceModalBody .mceModalContent .mceFormControl .mceUrlBoxUpload[aria-busy=true]~.mceButtonUpload .mce_spinner{display:flex}.mceModalContent .mceButton.mceButtonPicker:hover,.mceModalContent .mceButton.mceButtonUpload:hover,.mceModalContent .mceButton.mceClear:hover{background-color:transparent;border-color:transparent;color:#444}.mceModalContent .mceButton.mceButtonPicker:hover .mceIcon,.mceModalContent .mceButton.mceButtonUpload:hover .mceIcon{color:#444}.mceModalContent .mceButton.mceButtonPicker+.mceButton.mceButtonUpload{right:32px}.mceModalBody .mceModalContent .mceFormControl .mceUrlBoxPicker,.mceModalBody .mceModalContent .mceFormControl .mceUrlBoxUpload{padding-right:32px}.mceModalBody .mceModalContent .mceFormControl .mceUrlBoxPicker.mceUrlBoxUpload{padding-right:64px}.mceModalBody .mceModalContent .mceFormControl .mceUrlBoxUploadHover{background-color:#eee}.mceModalContent .mceButton.mceButtonUpload{overflow:hidden}.mceModalContent .mceButton.mceButtonUpload input[type=file]{position:absolute;top:0;z-index:1;width:100%;height:100%;left:0;appearance:none;opacity:0;cursor:pointer;font-size:500px}.mceModalContent .mce-flex-25{flex-basis:25%}.mceModalContent .mce-flex-50{flex-basis:50%}.mceModalContent .mce-flex-75{flex-basis:75%}tinymce/themes/advanced/skins/default/src/emoticons.css000060400000000755152456167170017343 0ustar00.mceDefaultSkin .mce_emotions_icon{display:inline-block;font-size:16px;line-height:2em;width:auto;height:auto;min-width:2em;min-height:2em;text-align:center;cursor:pointer;user-select:none;appearance:none;background:#fff}.mceDefaultSkin .mceEmoticonsMenu{max-width:16.75em;white-space:normal;display:flex;flex-wrap:wrap;justify-content:center}.mceDefaultSkin .mce_emotions_icon img{padding:5px;cursor:pointer}.mce_emotions_icon:focus,.mce_emotions_icon:hover{background:#eee;border-radius:3px}tinymce/themes/advanced/skins/default/src/tooltip.css000060400000002231152456167170017024 0ustar00.mceTooltip::before,.mceTooltip[data-title]::after{bottom:100%;opacity:0;visibility:hidden;position:absolute}.mceTooltip{position:relative;cursor:help;outline:0}.mceTooltip[data-title]::after{left:50%;transform:translateX(-50%) translateY(-6px);padding:4px;border-radius:4px;background:#000;color:#fff;content:attr(data-title);white-space:normal;pointer-events:none;transition:opacity .15s ease,transform .15s ease;font-size:12px;text-align:center;width:200px}.mceTooltip:not([data-title])[title]::after{content:attr(title)}.mceTooltip::before{content:'';left:50%;transform:translateX(-50%) translateY(0);border-left:6px solid transparent;border-right:6px solid transparent;border-top:6px solid #000;transition:opacity .15s ease}.mceTooltip:focus-visible::after,.mceTooltip:focus-visible::before,.mceTooltip:hover::after,.mceTooltip:hover::before{opacity:1;visibility:visible;z-index:100000}.mceTooltip.wrap::after{white-space:normal;max-width:260px;text-align:center}@media (prefers-reduced-motion:reduce){.mceTooltip::after,.mceTooltip::before{transition:none}}.sr-only{position:absolute;width:1px;height:1px;padding:0;margin:-1px;overflow:hidden;clip:rect(0,0,0,0);border:0}tinymce/themes/advanced/skins/default/src/form.css000060400000002102152456167170016272 0ustar00.mceForm{width:100%;height:100%;display:flex;flex-direction:column;gap:4px}.mceFormRow{display:flex;flex-direction:row;justify-content:start;align-items:flex-start;min-height:32px;width:100%}.mceRepeatable .mceRepeatableItem{flex-direction:row}.mceRepeatable .mceRepeatableItem .mceFormRow{gap:5px}.mceRepeatable .mceRepeatableItem .mceFormRow label{min-width:inherit}.mceRepeatableItem .mce_plus{display:none!important}.mceRepeatableItem .mce_trash,.mceRepeatableItem:first-child .mce_plus{display:inherit!important}.mceRepeatableItem:first-child .mce_trash{display:none!important}.mceFormControl{width:100%;position:relative;display:flex;align-items:center;gap:4px}.mceFormControl .mceListBox{width:100%}.mceFormControl .mceListBox .mceText{width:100%;align-self:flex-start}.mceForm .mceFormRow label{min-width:96px;padding:.5em 0}.mceFormControl .mceTextBox+.mceButton{position:absolute;right:0}.mceFormControl .mceListBox:focus .mceOpen,.mceFormControl .mceListBox:focus .mceText{border-color:#66afe9;background:#f5fbfe}.mceFormControl:has(.mceTextBoxDescription){flex-direction:column}tinymce/themes/advanced/skins/default/src/menu.css000060400000013126152456167170016303 0ustar00.mceMenu{position:absolute;left:0;top:0;z-index:700010!important;border:1px solid #ccc;direction:ltr;background-color:#fff;border-radius:2px;overflow:visible;overflow-y:auto;margin-top:3px;margin-left:1px;min-width:10em}.mceListBoxMenu,.mceSplitButtonMenu{border-radius:0 2px 2px}.mceMenu .mceMenuItems,.mceMenu .mceMenuItems span{display:block}.mceMenu .mceMenuItems .mceMenuItem{position:relative;padding:0;cursor:pointer;margin:1px 0;min-height:inherit;float:inherit;display:flex;align-items:center;justify-content:space-between}.mceMenu .mceMenuItems .mceMenuItem:has(.mceDescription){flex-direction:column}.mceMenu .mceMenuItems .mceMenuItem>div{width:100%}.mceMenu .mceMenuItems .mceText{position:relative;display:block;cursor:pointer;margin:0;padding:0 8px;overflow:hidden;width:100%;flex:1 0 100%;text-overflow:ellipsis}.mceMenu .mceMenuItems .mceIcon+.mceText{padding:0 32px 0 40px}.mceMenu .mceMenuItems .mcePreview,.mceMenu .mceMenuItems .mceText{font-size:14px;line-height:32px}.mceMenu .mceMenuItems .mceDescription,.mceMenu .mceMenuItems .mceMeta{font-size:12px;line-height:1.5;color:#666;max-width:20em;white-space:normal;overflow:hidden;padding:0 8px;width:100%;flex:1 0 100%}.mceMenu .mceMenuItems pre.mceText{font-family:Monospace}.mceMenu .mceMenuItems .mceIcon{position:absolute;top:6px;left:4px;width:20px}.mceMenu .mceMenuItems .mceImage{height:4rem;background-repeat:no-repeat;background-position:center;background-size:contain;margin-top:.5rem}.mceMenu .mceMenuItems .mceImage+.mceText{text-align:center}.mceMenu .mceToolbarFooter .mceToolbarItem,.mceRtl .mceMenuItem .mceText{text-align:right}.mceMenu .mceMenuItems{height:100%;overflow:visible;display:flex;flex-direction:column;margin:2px}.mceMenu .mceMenuFilter+.mceMenuItems{height:calc(100% - 40px);max-height:346px}.mceMenu .mceMenuItems .mceMenuItemHidden{display:none}.mceMenu .mceMenuItems .mceMenuItemActive,.mceMenu .mceMenuItems .mceMenuItemEnabled:focus,.mceMenu .mceMenuItems .mceMenuItemEnabled:hover{background-color:#eee}.mceMenu .mceMenuItems .mceMenuHtml:hover{background-color:#fff}.mceMenu .mceMenuItems .mceMenuItemEnabled:focus{outline:#ddd dashed 1px}.mceMenu .mceMenuItems .mceMenuItemEnabled .mceTableSplitMenu a:hover{background-color:transparent}.mceMenu .mceMenuItems .mceMenuItemTitle{border-bottom:1px solid #ddd;background-color:#f5f5f5}.mceMenu .mceMenuItems .mceMenuItemTitle:hover{background-color:#f5f5f5}.mceMenu .mceMenuItems .mceMenuItemFooter{border-top:1px solid #ddd}.mceMenu .mceMenuItems .mceMenuItemTitle .mceText{font-weight:700;cursor:default}.mceMenu .mceMenuItems .mceMenuItemSeparator{background:#ddd;height:1px;cursor:default}.mceMenu .mceMenuItems .mceMenuItem.mceDisabled{opacity:.5}.mceMenu .mceMenuItemsItemDisabled .mceText{color:#888}.mceMenu .mceNoIcons .mceMenuItemSelected .mceMenuItem{background:url(img/menu_arrow.gif) left center no-repeat}.mceMenu .mceMenuItemsItemSub .mceMenuItem{background:url(img/menu_arrow.gif) center right no-repeat}.mceMenu .mceMenuItems .mceMenuItemSub .mceText{margin-left:1em}.mceMenu .mceMenuItems .mceMenuHtml{position:relative;flex-direction:column}.mceMenu .mceMenuItems .mceMenuHtml .mceToolbarRow{position:relative;display:flex;flex-wrap:nowrap}.mceMenu .mceMenuItems .mceMenuHtml .mceToolbarColumn{position:relative;display:flex;flex-direction:column}.mceMenu .mceMenuItems .mceMenuHtml label{display:block;line-height:2;vertical-align:middle;width:96px}.mceMenu .mceMenuItems .mceMenuHtml input[type=text],.mceMenu .mceMenuItems .mceMenuHtml select,.mceMenu .mceMenuItems .mceMenuHtml textarea{height:32px;width:100%;padding:2px;border:1px solid #ddd;background:#fff;color:#444;border-radius:2px;box-shadow:inherit;box-sizing:border-box;cursor:initial}.mceMenu .mceMenuItems .mceMenuHtml textarea{height:auto}.mceMenu .mceMenuItems .mceMenuHtml select:not([multiple]):not([size]){appearance:none;padding-right:20px;background-image:url("data:image/svg+xml;charset=UTF-8,%3Csvg%20width%3D%2224%22%20height%3D%2216%22%20viewBox%3D%220%200%2024%2016%22%20xmlns%3D%22http%3A%2F%2Fwww.w3.org%2F2000%2Fsvg%22%3E%0A%20%20%20%20%3Cpolygon%20fill%3D%22%23666%22%20points%3D%2212%201%209%206%2015%206%22%20%2F%3E%0A%20%20%20%20%3Cpolygon%20fill%3D%22%23666%22%20points%3D%2212%2013%209%208%2015%208%22%20%2F%3E%0A%3C%2Fsvg%3E%0A");background-repeat:no-repeat;background-position:100% 50%}.mceMenu .mceMenuItems .mceMenuHtml input[type=text]:focus{border-color:#66afe9;outline:0;background:#f5fbfe;color:#444;box-shadow:inherit}.mceMenu .mceLinkMenu{min-width:220px}.mceMenu .mceLinkMenu .mceMenuHtml input{margin-right:5px}.mceMenu .mceMenuItems .mceMenuHtml .mceButton{position:relative}.mceMenu .mceMenuItems .mceMenuHtml .mceButton .mceIcon{position:static}.mceMenu .mceButtonMenu{margin:2px 0 0 1px;border:1px solid #ddd;box-shadow:0 2px 5px rgba(0,0,0,.1)}.mceMenu .mceButtonMenu .mceMenuItem{margin:3px}.mceMenu .mceButtonMenu::before{content:"";display:block;padding:3px;position:absolute;width:40px;top:-6px;background:#fff;left:-1px;border-left:1px solid #ddd;border-right:1px solid #ddd}.mceMenu .mceModalContent .mceListBox .mceText{width:calc(100% - 32px)}.mceMenu .mceToolbarRow .mceToolbarItem{width:100%;display:flex;gap:4px}.mceMenu .mceToolbarRow .mceToolbarItem .mceTextBox{max-width:inherit}.mceMenu .mceToolbarRow .mceToolbarItem textarea{height:auto;white-space:pre-wrap;font-size:13px;line-height:2}.mceMenu .mceToolbarFooter .mceToolbarItem .mceButton{min-width:5em;height:32px;line-height:1;background:#fff;border-radius:2px;color:#444;border:1px solid #ddd;margin:0 0 0 4px;padding:0 8px}.mceMenu .mceToolbarFooter .mceToolbarItem .mceButton.mceButtonPrimary{background-color:#337ab7;border:1px solid rgba(0,0,0,.06);color:#fff}tinymce/themes/advanced/skins/default/src/icons.css000060400000023727152456167170016462 0ustar00.mceDefaultSkin .mceAction,.mceDefaultSkin .mceIcon{display:inline-block;min-width:20px;height:20px;line-height:20px}.mceDefaultSkin .mceIcon{background:url(../../img/icons.png?v=7c1b5ae6239f4f3b8116c6316bce0db9) 20px 20px no-repeat}.mceDefaultSkin .mceIcon img{vertical-align:middle;min-width:16px;height:auto;cursor:inherit;margin:auto}.mceDefaultSkin .mceIcon svg{width:1em;height:1em;fill:#444}.mceDefaultSkin img[src$=".svg"].mceAction,.mceDefaultSkin img[src$=".svg"].mceIcon{width:18px;height:16px}.mceDefaultSkin .mceIconImage{display:flex;background:0 0}.mceDefaultSkin span.mce_bold{background-position:0 0}.mceDefaultSkin span.mce_italic{background-position:-60px 0}.mceDefaultSkin span.mce_underline{background-position:-140px 0}.mceDefaultSkin span.mce_strikethrough{background-position:-120px 0}.mceDefaultSkin span.mce_source_undo,.mceDefaultSkin span.mce_undo{background-position:-160px 0}.mceDefaultSkin span.mce_redo,.mceDefaultSkin span.mce_source_redo{background-position:-100px 0}.mceDefaultSkin span.mce_cleanup{background-position:-40px 0}.mceDefaultSkin span.mce_bullist{background-position:-20px 0}.mceDefaultSkin span.mce_numlist,.mceDefaultSkin span.mce_source_linenumbers{background-position:-80px 0}.mceDefaultSkin span.mce_justifyleft{background-position:-460px 0}.mceDefaultSkin span.mce_justifyright{background-position:-480px 0}.mceDefaultSkin span.mce_justifycenter{background-position:-420px 0}.mceDefaultSkin span.mce_justifyfull{background-position:-440px 0}.mceDefaultSkin span.mce_anchor{background-position:-200px 0}.mceDefaultSkin span.mce_indent,.mceDefaultSkin span.mce_source_format{background-position:-400px 0}.mceDefaultSkin span.mce_outdent{background-position:-540px 0}.mceDefaultSkin span.mce_link,.mceDefaultSkin span.mce_lnk{background-position:-500px 0}.mceDefaultSkin span.mce_unlink{background-position:-640px 0}.mceDefaultSkin span.mce_sub{background-position:-600px 0}.mceDefaultSkin span.mce_sup{background-position:-620px 0}.mceDefaultSkin span.mce_removeformat{background-position:-580px 0}.mceDefaultSkin span.mce_newdocument{background-position:-520px 0}.mceDefaultSkin span.mce_image{background-position:-380px 0}.mceDefaultSkin span.mce_help{background-position:-340px 0}.mceDefaultSkin span.mce_code,.mceDefaultSkin span.mce_source{background-position:-260px 0}.mceDefaultSkin span.mce_hr{background-position:-360px 0}.mceDefaultSkin span.mce_visualaid{background-position:-660px 0}.mceDefaultSkin span.mce_charmap{background-position:-240px 0}.mceDefaultSkin span.mce_paste{background-position:-560px 0}.mceDefaultSkin span.mce_copy{background-position:-700px 0}.mceDefaultSkin span.mce_cut{background-position:-680px 0}.mceDefaultSkin span.mce_blockquote{background-position:-220px 0}.mceDefaultSkin .mce_forecolor span.mceAction{background-position:-720px 0}.mceDefaultSkin .mce_backcolor span.mceAction{background-position:-760px 0}.mceDefaultSkin span.mce_forecolor{background-position:-720px 0}.mceDefaultSkin span.mce_backcolor{background-position:-760px 0}.mceDefaultSkin span.mce_forecolorpicker{background-position:-720px 0}.mceDefaultSkin span.mce_backcolorpicker{background-position:-760px 0}.mceDefaultSkin span.mce_readmore{background-position:-920px 0}.mceDefaultSkin span.mce_pagebreak{background-position:-940px 0}.mceDefaultSkin span.mce_advhr{background-position:0 -20px}.mceDefaultSkin span.mce_ltr{background-position:-20px -20px}.mceDefaultSkin span.mce_rtl{background-position:-40px -20px}.mceDefaultSkin span.mce_emotions{background-position:-60px -20px}.mceDefaultSkin span.mce_fullpage{background-position:-80px -20px}.mceDefaultSkin span.mce_fullscreen,.mceDefaultSkin span.mce_source_fullscreen{background-position:-100px -20px}.mceDefaultSkin span.mce_iespell{background-position:-120px -20px}.mceDefaultSkin span.mce_insertdate{background-position:-140px -20px}.mceDefaultSkin span.mce_inserttime{background-position:-160px -20px}.mceDefaultSkin span.mce_layerabsolute{background-position:-180px -20px}.mceDefaultSkin span.mce_insertlayer{background-position:-240px -20px}.mceDefaultSkin span.mce_layerbackward{background-position:-200px -20px}.mceDefaultSkin span.mce_layerforward{background-position:-220px -20px}.mceDefaultSkin span.mce_media,.mceDefaultSkin span.mce_video{background-position:-320px -20px}.mceDefaultSkin span.mce_nonbreaking{background-position:-340px -20px}.mceDefaultSkin span.mce_pastetext{background-position:-360px -20px}.mceDefaultSkin span.mce_pasteword{background-position:-380px -20px}.mceDefaultSkin span.mce_selectall{background-position:-400px -20px}.mceDefaultSkin span.mce_preview{background-position:-420px -20px}.mceDefaultSkin span.mce_print{background-position:-440px -20px}.mceDefaultSkin span.mce_cancel{background-position:-460px -20px}.mceDefaultSkin span.mce_save{background-position:-480px -20px}.mceDefaultSkin span.mce_replace,.mceDefaultSkin span.mce_source_replace{background-position:-500px -20px}.mceDefaultSkin span.mce_search{background-position:-520px -20px}.mceDefaultSkin span.mce_style,.mceDefaultSkin span.mce_styleprops{background-position:-560px -20px}.mceDefaultSkin span.mce_table,.mceDefaultSkin span.mce_table_insert{background-position:-580px -20px}.mceDefaultSkin span.mce_cell_props{background-position:-600px -20px}.mceDefaultSkin span.mce_delete_table{background-position:-620px -20px}.mceDefaultSkin span.mce_delete_col{background-position:-640px -20px}.mceDefaultSkin span.mce_delete_row{background-position:-660px -20px}.mceDefaultSkin span.mce_col_after{background-position:-680px -20px}.mceDefaultSkin span.mce_col_before{background-position:-700px -20px}.mceDefaultSkin span.mce_row_after{background-position:-720px -20px}.mceDefaultSkin span.mce_row_before{background-position:-740px -20px}.mceDefaultSkin span.mce_merge_cells{background-position:-760px -20px}.mceDefaultSkin span.mce_table_props{background-position:-980px -20px}.mceDefaultSkin span.mce_row_props{background-position:-780px -20px}.mceDefaultSkin span.mce_split_cells{background-position:-800px -20px}.mceDefaultSkin span.mce_template{background-position:-820px -20px}.mceDefaultSkin span.mce_visualchars{background-position:-840px -20px}.mceDefaultSkin span.mce_abbr{background-position:-860px -20px}.mceDefaultSkin span.mce_acronym{background-position:-880px -20px}.mceDefaultSkin span.mce_attribs{background-position:-900px -20px}.mceDefaultSkin span.mce_cite{background-position:-920px -20px}.mceDefaultSkin span.mce_del{background-position:-940px -20px}.mceDefaultSkin span.mce_ins{background-position:-960px -20px}.mceDefaultSkin span.mce_source_highlight{background-position:-140px -40px}.mceDefaultSkin span.mce_source_wrap{background-position:-100px -40px}.mceDefaultSkin span.mce_source_search_previous{background-position:-440px -40px}.mceDefaultSkin span.mce_source_search_next{background-position:-460px -40px}.mceDefaultSkin span.mce_source_replace_all{background-position:-480px -40px}.mceDefaultSkin span.mce_source_search_regex{background-position:-500px -40px}.mceDefaultSkin span.mce_columns{background-position:-520px -40px}.mceDefaultSkin span.mce_columns_add{background-position:-560px -40px}.mceDefaultSkin span.mce_columns_add_before{background-position:-660px -40px}.mceDefaultSkin span.mce_columns_delete{background-position:-580px -40px}.mceDefaultSkin span.mce_source_search_wholeword{background-position:-680px -40px}.mceDefaultSkin span.mce_source_search_matchcase{background-position:-700px -40px}.mceDefaultSkin span.mce_joomla{background-position:-600px -40px}.mceDefaultSkin span.mce_upload{background-position:-620px -40px}.mceDefaultSkin span.mce_langcode{background-position:-640px -40px}.mceDefaultSkin span.mce_restoredraft{background-position:-20px -40px}.mceDefaultSkin span.mce_spellchecker{background-position:-540px -20px}.mceDefaultSkin span.mce_autosave{background-position:-20px -40px}.mceDefaultSkin span.mce_imgmanager{background-position:-380px 0}.mceDefaultSkin span.mce_article{background-position:-920px 0;width:40px}.mceDefaultSkin span.mce_textcase{background-position:-40px -40px}.mceDefaultSkin span.mce_visualblocks{background-position:-160px -40px}.mceDefaultSkin span.mce_kitchensink{background-position:-180px -40px}.mceDefaultSkin span.mce_mediamanager,.mceDefaultSkin span.mce_video{background-position:-320px -40px}.mceDefaultSkin span.mce_imgmanager_ext{background-position:-420px -40px}.mceDefaultSkin span.mce_templatemanager{background-position:-380px -40px}.mceDefaultSkin span.mce_iframe{background-position:-400px -40px}.mceDefaultSkin span.mce_filemanager{background-position:-360px -40px}.mceDefaultSkin span.mce_caption_add{background-position:-280px -40px}.mceDefaultSkin span.mce_caption_delete{background-position:-300px -40px}.mceDefaultSkin span.mce_microdata{background-position:-340px -40px}.mceDefaultSkin span.mce_plus{background-position:-200px -40px}.mceDefaultSkin span.mce_cross,.mceDefaultSkin span.mce_delete,.mceDefaultSkin span.mce_trash{background-position:-220px -40px}.mceDefaultSkin span.mce_check{background-position:-540px -40px}.mceDefaultSkin .mce_list_default:before,.mceDefaultSkin .mce_list_disc:before{content:"●";line-height:1;display:inline-block}.mceDefaultSkin .mce_list_circle:before{content:"○";line-height:1;display:inline-block}.mceDefaultSkin .mce_list_square:before{content:"□";line-height:1;display:inline-block}.mceDefaultSkin .mce_list_lower_alpha::before,.mceDefaultSkin .mce_list_lower_greek::before,.mceDefaultSkin .mce_list_lower_roman::before,.mceDefaultSkin .mce_list_upper_alpha::before,.mceDefaultSkin .mce_list_upper_roman::before{font-size:1em;font-family:"times new roman,times";line-height:1.25}.mceDefaultSkin .mce_list_lower_alpha::before{content:"a."}.mceDefaultSkin .mce_list_lower_greek::before{content:"\03b1."}.mceDefaultSkin .mce_list_lower_roman::before{content:"iv."}.mceDefaultSkin .mce_list_upper_alpha::before{content:"A."}.mceDefaultSkin .mce_list_upper_roman::before{content:"IV."}.mceDefaultSkin .mce_spinner{background:url(img/load.gif?v=7c1b5ae6239f4f3b8116c6316bce0db9) no-repeat}.mceDefaultSkin .mce_none[class*=icon-]:before{font-family:"Font Awesome 6 Free","Font Awesome 5 Free",IcoMoon;font-weight:900}tinymce/themes/advanced/skins/default/src/panel.css000060400000010204152456167170016430 0ustar00.mceDefaultSkin .mcePanel{position:relative;left:0;top:0;z-index:1000;border:1px solid #ddd;direction:ltr;background:#fafafa;padding:0;font-family:-apple-systrem,BlinkMacSystremFont,"Segoe UI",Roboto,Oxygen-Sans,Ubuntu,Cantarell,"Helvetica Neue",Arial,sans-serif;font-size:16px;box-shadow:0 2px 4px rgba(0,0,0,.3);box-sizing:border-box}.mceDefaultSkin .mcePanelButtonActive{background-color:#eee;border-color:#ddd}.mceDefaultSkin .mcePanelButtonSelected,.mceDefaultSkin .mcePanelButtonSelected:hover{background-color:#fff;border-color:#ddd}.mceDefaultSkin .mcePanelButtonSelected .mceOpen,.mceDefaultSkin .mcePanelButtonSelected:hover .mceOpen{border-left-color:transparent}.mceDefaultSkin .mcePanel h4{font-size:14px;color:#444;font-weight:700;margin:0 0 8px}.mceDefaultSkin .mcePanel .mcePanelContent{background-color:#fff;font-size:14px;padding:4px;white-space:normal}.mceDefaultSkin .mcePanel .mcePanelContent .mceToolbarRow{display:flex}.mceDefaultSkin .mcePanel .mcePanelContent label{display:block;line-height:2;vertical-align:middle}.mceDefaultSkin .mcePanel input[type=text],.mceDefaultSkin .mcePanel select,.mceDefaultSkin .mcePanel textarea{height:32px;width:100%;padding:2px;border:1px solid #ddd;background:#fff;color:#444;border-radius:2px;box-shadow:inherit;box-sizing:border-box}.mceDefaultSkin .mcePanel input[type=text],.mceDefaultSkin .mcePanel textarea{min-width:12em;cursor:text}.mceDefaultSkin .mcePanel textarea{height:auto}.mceDefaultSkin .mcePanel select:not([multiple]):not([size]){appearance:none;padding-right:20px;background-image:url("data:image/svg+xml;charset=UTF-8,%3Csvg%20width%3D%2224%22%20height%3D%2216%22%20viewBox%3D%220%200%2024%2016%22%20xmlns%3D%22http%3A%2F%2Fwww.w3.org%2F2000%2Fsvg%22%3E%0A%20%20%20%20%3Cpolygon%20fill%3D%22%23666%22%20points%3D%2212%201%209%206%2015%206%22%20%2F%3E%0A%20%20%20%20%3Cpolygon%20fill%3D%22%23666%22%20points%3D%2212%2013%209%208%2015%208%22%20%2F%3E%0A%3C%2Fsvg%3E%0A");background-repeat:no-repeat;background-position:100% 50%}.mceDefaultSkin .mcePanel input[type=text]:focus{border-color:#66afe9;outline:0;background:#f5fbfe;color:#444;box-shadow:inherit}.mceDefaultSkin .mcePanel .mcePanelFooter .mceButton{appearance:none;margin:0 0 0 5px;border:none;overflow:visible;color:#444;text-transform:none;display:inline-block;box-sizing:border-box;padding:0 12px;background:#fff;vertical-align:middle;line-height:26px;min-height:32px;text-decoration:none;text-align:center;border:1px solid rgba(0,0,0,.12);border-radius:2px;cursor:pointer}.mceDefaultSkin .mcePanel .mcePanelFooter .mceButtonPrimary{background-color:#337ab7;color:#fff;box-shadow:inset 0 0 5px rgba(0,0,0,.05);text-shadow:0 -1px 0 rgba(0,0,0,.1)}.mceDefaultSkin .mcePanel .mcePanelFooter .mceButton:focus,.mceDefaultSkin .mcePanel .mcePanelFooter .mceButton:hover{background-color:#fafafa;color:#444;outline:0;text-decoration:none;border-color:rgba(0,0,0,.16)}.mceDefaultSkin .mcePanel .mcePanelFooter .mceButtonDisabled,.mceDefaultSkin .mcePanel .mcePanelFooter .mceButtonDisabled:focus,.mceDefaultSkin .mcePanel .mcePanelFooter .mceButtonDisabled:hover{background:#eee;color:#888}.mceDefaultSkin .mcePanel .mcePanelFooter .mceButtonPrimary:hover{background-color:#35b3ee;color:#fff;border-color:rgba(0,0,0,.21)}.mceDefaultSkin .mcePanel .mcePanelFooter{text-align:right;background-color:#f5f5f5;padding:10px;border-top:1px solid #ddd}.mceDefaultSkin .mcePanel:before{content:"";display:block;position:absolute;width:30px;background-color:#fff;height:6px;left:-1px;top:-6px;border-left:1px solid #ddd;border-right:1px solid #ddd;box-sizing:content-box}.mceDefaultSkin.mcePanelSplitButton .mcePanel::before{width:46px;height:8px;top:-8px}.mceDefaultSkin.mce_search .mcePanel .mcePanelFooter .mceButton,.mceDefaultSkin.mce_search .mcePanel label{min-width:70px}.mceDefaultSkin.mce_search .mcePanel input.search_error{border-color:red}.mceDefaultSkin .mcePanelButtonSelected .mceSplitButton .mceText button{border-right-color:transparent}.mceDefaultSkin .mcePanelButtonSelected .mceSplitButton .mceOpen button{border-left-color:transparent}.mceDefaultSkin .mcePanelButtonActive .mceOpen button,.mceDefaultSkin .mcePanelButtonActive .mceText button{border-color:#ccc;background-color:#ddd}tinymce/themes/advanced/skins/default/src/statusbar.css000060400000001461152456167170017346 0ustar00.mceDefaultSkin .mceStatusbar{font-size:9pt;line-height:32px;overflow:visible;color:#000;height:32px;padding:5px;background:#f5f5f5;box-sizing:border-box;display:flex;flex-direction:row;align-items:center;border:0 solid #ddd;justify-content:end}.mceDefaultSkin .mceStatusbar:first-child{border-bottom-width:1px}.mceDefaultSkin .mceStatusbar:last-child{border-top-width:1px}.defaultSkin .mceStatusbar:empty{line-height:inherit;height:inherit;padding:0;border:0}.defaultSkin .mceStatusbar div{margin:2px}.mceDefaultSkin .mceStatusbar .mceResize{cursor:se-resize;margin:0;order:3;display:flex}.mceDefaultSkin .mceStatusbar .mceResize span{background:url(../../img/icons.png?v=7c1b5ae6239f4f3b8116c6316bce0db9) -800px 0;display:block;width:20px;height:20px}.mceDefaultSkin .mceStatusbar a:hover{text-decoration:underline}tinymce/themes/advanced/skins/default/src/fonts.css000060400000000736152456167170016473 0ustar00@font-face{font-family:wfeditor;src:url(../../../../../fonts/wfeditor.woff) format('woff');font-weight:400;font-style:normal}.mceDefaultSkin .mceAction,.mceDefaultSkin .mceIcon,.mceModal .mceIcon{font-family:wfeditor;font-style:normal;font-weight:400;font-variant:normal;text-transform:none;line-height:1.25em;-webkit-font-smoothing:antialiased;-moz-osx-font-smoothing:grayscale;font-size:16px;text-align:center;vertical-align:middle;background:0 0;position:relative;color:#444}tinymce/themes/advanced/skins/default/src/textbox.css000060400000001151152456167170017027 0ustar00.mceDefaultSkin .mceTextBox{height:32px;line-height:2;max-width:100%;padding:2px;border:1px solid #ddd;background:#fff;color:#444;border-radius:2px;box-shadow:inherit;box-sizing:border-box;cursor:text;width:auto}.mceDefaultSkin .mceTextBox:focus{box-shadow:inherit;border-color:#66afe9;outline:0;background:#f5fbfe;color:#444}.mceDefaultSkin .mceTextBoxDisabled{color:#888;background-color:#eee;cursor:not-allowed}.mceDefaultSkin .mceTextBox+.mceTextBoxDescription{font-size:.75em;color:#666;line-height:2;display:inline-block;width:100%}.mceDefaultSkin .mceToolbarRow .mceTextBox{margin:1px 0 1px 2px;max-width:10em}tinymce/themes/advanced/skins/default/src/misc.css000060400000006256152456167170016300 0ustar00.mceDefaultSkin .mceBlocker{position:absolute;left:0;top:0;z-index:1000;background:#fff;opacity:.8}@keyframes donut-spin{0%{transform:rotate(0)}100%{transform:rotate(360deg)}}.mceDefaultSkin .mceProgress{position:absolute;left:0;top:0;z-index:1001}.mceDefaultSkin .mceProgress:after{content:"";display:block;border:.25rem solid rgba(0,0,0,.3);border-left-color:#444;border-radius:50%;width:2rem;height:2rem;animation:donut-spin 1.2s linear infinite;z-index:10001;position:absolute;top:50%;left:50%;margin:-1rem 0 0 -1rem;box-sizing:border-box}.mceDefaultSkin .mcePlaceHolder{border:1px dotted gray}.mceDefaultSkin .mcePanel.mceContextPanel::after,.mceDefaultSkin .mcePanel.mceContextPanel::before{position:absolute;left:50%;display:block;width:0;height:0;border-style:solid;border-color:transparent;content:""}.mceDefaultSkin .mcePanel.mceContextPanel::before{top:-9px;border-bottom-color:rgba(0,0,0,.2);border-width:0 9px 9px;margin-left:-9px}.mceDefaultSkin .mcePanel.mceContextPanel::after{top:-8px;border-bottom-color:#fff;border-width:0 8px 8px;margin-left:-8px}.mceDefaultSkin.mceArrowDown .mcePanel.mceContextPanel::before{bottom:-9px;border-top-color:rgba(0,0,0,.2);border-width:9px 9px 0;margin-left:-9px;top:initial}.mceDefaultSkin.mceArrowDown .mcePanel.mceContextPanel::after{bottom:-8px;border-top-color:#fff;border-width:8px 8px 0;margin-left:-8px;top:initial}.mceDefaultSkin .mceMenu div[class*=mceFontSize]{margin:.125em}.mceCharacterMap{padding:0}.mceCharacterMap>div{flex:1}.mceModal .mceModalBody[dir=rtl] .mceCharacterMap>div{text-align:right}.mceCharacterMap>div+div{max-width:11em;border:1px solid #ddd;display:flex;flex-direction:column}.mceModal .mceModalContent .mceCharacterMap button{background:#fff;width:1.5em;min-width:inherit;height:1.5em;padding:0;line-height:1rem;vertical-align:middle;appearance:none;cursor:pointer;font-size:16px;text-align:center;border:1px solid #ddd;display:inline-block;margin:0 1px 1px 0}.mceModal .mceModalContent .mceModalRow.mceCharacterMap{align-items:inherit}.mceModal .mceModalContent .mceCharacterMap button:focus,.mceModal .mceModalContent .mceCharacterMap button:hover{border:1px solid #ccc;background-color:#e6e6e6}.mceCharacterMapDescription h1{line-height:2;font-size:5em;height:2em;text-align:center;vertical-align:middle;flex:1}.mceCharacterMapDescription h3{line-height:2em;font-size:1.25em;height:2em;text-align:center}.mceCharacterMapDescription h4{line-height:1.5em;font-size:1em;text-align:center;color:#888}.mceCharacterMapDescription{font-size:1em}.mceCharacterMap ul li:hover,.mceCharacterMap ul li:hover button{background:#f5f5f5;color:#444;text-decoration:none}input::placeholder,textarea::placeholder{margin:0 .5em}.mceDefaultSkin .mceNotationMenu{white-space:normal;display:flex;flex-wrap:wrap;align-items:center;max-width:14em;justify-content:space-between;gap:.25em}.mceDefaultSkin .mceNotationMenu button:focus,.mceDefaultSkin .mceNotationMenu button:hover{background:#eee;border-radius:3px}.mceDefaultSkin .mceNotationMenu .mce_notation_icon{display:inline-block;font-family:"Apple Symbols","Segoe UI Symbol",FreeSerif,serif;font-size:32px;line-height:1em;width:1em;height:1em;text-align:center;cursor:pointer;user-select:none;appearance:none;background:#fff}tinymce/themes/advanced/skins/default/src/toolbar.css000060400000002761152456167170017004 0ustar00.mceToolbarFixed .mceToolbar{position:fixed;left:0;top:0;right:0;border:1px solid #ddd;border-right:0;border-left:0;z-index:9999}.mceDefaultSkin .mceLayout{border:1px solid #ddd}.mceDefaultSkin .mceToolbar{background:#f5f5f5;padding:2px;width:auto!important;border-bottom:1px solid #ddd}.mceDefaultSkin .mceToolbarRow{white-space:normal;display:flex;flex-wrap:wrap;align-items:center}.mceDefaultSkin.mceRtl .mceToolbarRow{justify-content:right;flex-direction:row-reverse}.mceDefaultSkin .mceLeft .mceToolbarRow{justify-content:flex-start}.mceDefaultSkin .mceRight .mceToolbarRow{justify-content:flex-end}.mceDefaultSkin .mceCenter .mceToolbarRow{justify-content:center}.mceDefaultSkin .mceToolbarRow>button,.mceDefaultSkin .mceToolbarRow>div{margin:1px 0 1px 2px}.mceDefaultSkin .mceIframeContainer{position:relative}.mceDefaultSkin .mceToolbar:last-child{border-bottom:0 none;border-top:1px solid #ddd}.mceDefaultSkin .mceToolbar:nth-child(2):not(:last-child){border-bottom:0}.mceDefaultSkin .mceIframeContainer:first-child{border-bottom:1px solid #ddd}.mceDefaultSkin .mceIframeContainer:last-child{border-top:1px solid #ddd}.mceDefaultSkin .mceIframeContainer:nth-child(2){border-top-width:0}.mceDefaultSkin .mceSeparator{width:1px;height:26px;margin:0 3px 0 2px;background:#ddd;display:block}.mceDefaultSkin .mceFlex{display:flex}.mceDefaultSkin .mceFlexAuto{flex:auto}.mceDefaultSkin .mceToolbar.mceDisabled::after{content:"";position:absolute;top:0;left:0;right:0;bottom:0;background:rgba(255,255,255,.5);z-index:1}tinymce/themes/advanced/skins/default/src/button.css000060400000002141152456167170016645 0ustar00.mceDefaultSkin .mceButton{border:1px solid #ddd;padding:4px;min-width:32px;min-height:32px;appearance:none;cursor:pointer;outline:0;overflow:visible;text-transform:none;box-sizing:border-box;text-decoration:none;text-align:center;border-radius:2px;line-height:1}.mceDefaultSkin .mceButton .mceIcon{display:flex;align-items:center;justify-content:center;margin:auto;max-width:20px}.mceDefaultSkin .mceButton:hover{border:1px solid #ccc;background-color:#fafafa}.mceDefaultSkin .mceButton:focus{border:1px solid #ccc;background-color:#fff;outline:0}.mceDefaultSkin .mceButtonActive,.mceDefaultSkin .mceButtonSelected{border:1px solid #ccc;background-color:#ddd}.mceDefaultSkin .mceButtonDisabled .mceIcon{opacity:.38}.mceDefaultSkin .mceButtonLabeled{width:auto}.mceDefaultSkin .mceButtonLabeled .mceIcon{float:left}.mceDefaultSkin .mceButtonLabel{display:block;font-size:14px;padding:4px 8px 0 24px;font-family:"Helvetica Neue",Helvetica,Arial,sans-serif}.mceDefaultSkin .mceButtonDisabled .mceButtonLabel{color:#888}.mceDefaultSkin button:disabled{cursor:not-allowed}.mceDefaultSkin button:disabled .mceIcon{opacity:.38}tinymce/themes/advanced/skins/default/src/classbar.css000060400000002321152456167170017124 0ustar00.mceDefaultSkin .mceClassBar{display:flex;flex-direction:row;min-height:32px;align-items:center;padding:0 .25em}.mceDefaultSkin .mceToolbar+.mceClassBar{border-top:1px solid #ddd}.mceDefaultSkin .mceIframeContainer+.mceClassBar{border-bottom:1px solid #ddd}.mceDefaultSkin .mceClassBar .mceClassBarTags{display:flex;flex-direction:row;flex-wrap:wrap}.mceDefaultSkin .mceClassBar .mceButton{margin:.125em;position:relative;height:2em;min-width:5em;min-height:inherit;padding:0 1.25em 0 0;box-sizing:border-box;background:#eee;font-size:12px}.mceDefaultSkin .mceClassBar .mceButton label{padding:.25em;cursor:default;font-size:1em}.mceDefaultSkin .mceClassBar .mceButton::after{position:absolute;top:0;right:0;display:block;text-align:center;text-indent:0;content:"\00d7";color:#444;line-height:1.3;font-size:1.25em;font-weight:700;height:100%;width:1em}.mceDefaultSkin .mceClassBar .mceListBox{height:28px;display:flex;flex-direction:row;align-items:center;margin:0 2px}.mceDefaultSkin .mceClassBar .mceListBox input{width:100%;height:28px;padding:2px;border-radius:0;box-sizing:border-box;border:0}.mceDefaultSkin .mceClassBar .mceListBox .mceOpen{height:30px}.mceDefaultSkin .mceClassBar .mceListBox .mceOpen:after{line-height:30px}tinymce/themes/advanced/skins/default/src/reset.css000060400000002504152456167170016457 0ustar00.mceDefaultSkin *,.mceMenu{color:#444;font-family:system-ui,-apple-system,"Segoe UI",Roboto,"Helvetica Neue",Arial,"Noto Sans",sans-serif,"Apple Color Emoji","Segoe UI Emoji","Segoe UI Symbol","Noto Color Emoji";font-size:16px;-webkit-font-smoothing:antialiased;-moz-osx-font-smoothing:grayscale;border:0;margin:0;padding:0;white-space:nowrap;text-decoration:none;font-weight:400;cursor:inherit;vertical-align:baseline;width:auto;border-collapse:separate;text-align:left;box-sizing:border-box;float:none;outline:0;position:relative;border-radius:0;-webkit-border-radius:0;-moz-border-radius:0;text-transform:none;min-height:auto}.mceDefaultSkin input[type],.mceDefaultSkin select,.mceDefaultSkin textarea{margin:0;line-height:1}.mceDefaultSkin input{cursor:text}.mceDefaultSkin button,.mceDefaultSkin input,.mceDefaultSkin label,.mceDefaultSkin select{font-size:14px}.mceDefaultSkin button{appearance:none}.mceDefaultSkin input[type=radio],.mceDefaultSkin input[type=checkbox]{cursor:inherit}.mceDefaultSkin>div{width:auto;font-size:100%;-webkit-text-size-adjust:100%;-ms-text-size-adjust:100%;direction:ltr;position:relative;top:0;left:0}.mceDefaultSkin a:active,.mceDefaultSkin a:hover,.mceDefaultSkin a:link,.mceDefaultSkin a:visited{text-decoration:none;font-weight:400;cursor:default;color:#000}.mceDefaultSkin iframe{display:block;width:100%}tinymce/themes/advanced/skins/default/src/branding.css000060400000000702152456167170017117 0ustar00.mceDefaultSkin .mceLayout .mceBranding{width:100%;text-align:center;line-height:20px;background:#eee;padding:5px 0;display:block;box-sizing:border-box;border-bottom:1px solid #ddd;white-space:normal}.mceDefaultSkin .mceLayout .mceBranding a{font-weight:700;cursor:pointer}.mceDefaultSkin .mceLayout .mceBranding a:hover{text-decoration:underline}.mceDefaultSkin .mceLayout .mceBranding span{font-size:inherit;line-height:inherit;font-family:inherit}tinymce/themes/advanced/skins/default/src/path.css000060400000001101152456167170016261 0ustar00.mcePathRow{overflow:hidden;width:100%}.mcePathHidden .mceText{display:none}.mcePathPath .mceText{font-size:12px;line-height:14px;max-width:3em;text-overflow:ellipsis;overflow:hidden;opacity:.75;cursor:default}.mcePathPath a .mceText{opacity:1;cursor:pointer}.mcePathPath a:not(:last-child):after{content:"\00bb";display:inline-block;text-decoration:none;margin:0 .25em}.mcePathHidden:after{content:"...";display:inline-block}.mcePathLabel{position:relative;display:inline-block;min-width:32px;margin:0 5px 0 0;font-size:14px;user-select:none}.mcePathPath{display:inline-block}tinymce/themes/advanced/skins/default/src/formats.css000060400000001131152456167170017003 0ustar00.mceDefaultSkin .mce_formatPreview a{font-size:14px}.mceDefaultSkin .mce_address span.mceText{font-style:italic}.mceDefaultSkin .mce_pre span.mceText{font-family:monospace}.mceDefaultSkin .mce_h1 span.mceText{font-weight:bolder;font-size:2em}.mceDefaultSkin .mce_h2 span.mceText{font-weight:bolder;font-size:1.5em}.mceDefaultSkin .mce_h3 span.mceText{font-weight:bolder;font-size:1.17em}.mceDefaultSkin .mce_h4 span.mceText{font-weight:bolder;font-size:1em}.mceDefaultSkin .mce_h5 span.mceText{font-weight:bolder;font-size:.83em}.mceDefaultSkin .mce_h6 span.mceText{font-weight:bolder;font-size:.75em}tinymce/themes/advanced/skins/default/src/splitbutton.css000060400000010000152456167170017712 0ustar00.mceDefaultSkin .mceSplitButton{position:relative}.mceDefaultSkin .mceSplitButton button{height:32px;display:inline-block;text-align:center;line-height:1;width:32px}.mceDefaultSkin .mceSplitButton .mceOpen,.mceDefaultSkin .mceSplitButton .mceText{display:inline-block;border:1px solid #ddd}.mceDefaultSkin .mceSplitButton .mceText{float:left;border-right:0;border-radius:2px 0 0 2px;cursor:pointer;display:flex;flex-direction:column;align-items:center;justify-content:center;text-overflow:ellipsis}.mceDefaultSkin .mceSplitButton .mceAction{width:20px;background-image:url(../../img/icons.png?v=7c1b5ae6239f4f3b8116c6316bce0db9)}.mceDefaultSkin .mceSplitButton img.mceAction{background:0 0}.mceDefaultSkin .mceSplitButton .mceOpen{width:16px;text-align:center;height:32px;border-radius:0 2px 2px 0;cursor:pointer}.mceDefaultSkin .mceSplitButton .mceOpen:after{content:"\25BC";display:block;font-size:9px;line-height:32px;color:#444;text-align:center}.mceDefaultSkin .mceSplitButtonDisabled .mceOpen:after{color:#888}.mceDefaultSkin .mceSplitButton:focus .mceOpen,.mceDefaultSkin .mceSplitButton:focus .mceText,.mceDefaultSkin .mceSplitButton:hover .mceOpen,.mceDefaultSkin .mceSplitButton:hover .mceText{border-color:#ccc;background-color:#fafafa}.mceDefaultSkin .mceSplitButtonDisabled .mceAction{opacity:.3}.mceDefaultSkin .mceSplitButtonActive .mceText{border-color:#ccc;background-color:#ddd}.mceDefaultSkin .mceSplitButtonActive .mceOpen{border-left:0;border-color:#ccc;background-color:#ddd}.mceDefaultSkin .mceSplitButtonSelected::after{content:"";padding:2px 0;width:100%;position:absolute;left:0;bottom:-3px;background:#fff;box-sizing:border-box;z-index:700011;border:1px solid #ccc;border-top:0 none;border-bottom:0 none}.mceSplitButtonMenu{min-width:calc(48px * 3);margin:5px 0 0 1.5px;max-height:336px;overflow:visible;overflow-y:auto;max-width:20em}.mceDefaultSkin .mceMenuItemSub{box-shadow:inherit;border:0;margin:0}.mceDefaultSkin .mceSplitButtonMenu .mceMenuItem{margin:2px}.mceSplitButtonMenu .mceMenuItems .mceSelected{background-color:#ddd}.mceDefaultSkin .mceColorSplitMenu{display:flex;flex-wrap:wrap;max-width:203px;gap:1px}.mceDefaultSkin .mceColorSplitMenu button{display:block;width:24px;height:24px;overflow:hidden;border:1px solid #ddd;text-align:center;cursor:pointer;outline:0}.mceDefaultSkin .mceColorSplitMenu button:focus,.mceDefaultSkin .mceColorSplitMenu button:hover{border-color:#444;outline:0}.mceDefaultSkin .mceColorSplitMenu .mceRemoveColor{color:#444;font-weight:700}.mceDefaultSkin .mceColorSplitMenu .mceMoreColors{width:100%;height:auto;text-align:center;line-height:32px;background:#fff;cursor:pointer}.mceDefaultSkin .mceColorSplitMenu .mceMoreColors:hover{border:1px solid #ccc;background-color:#fafafa}.mceDefaultSkin .mceColorPreview{width:20px;height:4px;overflow:hidden;background:#fafafa}.mceDefaultSkin .mce_backcolor .mceAction,.mceDefaultSkin .mce_forecolor .mceAction{overflow:hidden;height:15px}.mceTableSplitMenu{background:#fff;border:0;padding:0;margin:0;border-collapse:separate;box-sizing:border-box;border-spacing:inherit}.mceDefaultSkin .mceTableSplitMenu table{padding:2px}.mceDefaultSkin .mceTableSplitMenu td{background-color:#fff;text-align:center}.mceDefaultSkin .mceTableSplitMenu td a{width:24px;height:24px;display:block;border:1px solid #ddd;padding:0;margin:1px}.mceDefaultSkin .mceTableSplitMenu .selected a{background-color:#337ab7;border-color:#2e6da4}.mceDefaultSkin .mceTableSplitMenu .mceTableGridCount{background-color:#fff;text-align:center;line-height:32px}.mceDefaultSkin .mceSplitButtonSelected .mceText,.mceDefaultSkin .mceSplitButtonSelected:hover .mceText{background:#fff;border-color:#ccc;border-radius:2px 0 0}.mceDefaultSkin .mceSplitButtonSelected .mceOpen,.mceDefaultSkin .mceSplitButtonSelected:hover .mceOpen{background:#fff;border-color:#ccc;border-left:0 none;padding-left:1px;border-radius:0 2px 0 0}.mceDefaultSkin .mceColorSplitMenu{padding:2px;background:#fff}.mceDefaultSkin .mceColumns .mceTableSplitMenu{width:120px}.mceDefaultSkin .mceColumns .mceTableSplitMenu td a{width:24px;height:32px}tinymce/themes/advanced/skins/default/src/source.css000060400000000164152456167170016635 0ustar00.mceDefaultSkin .mceToolbarSource{margin:0}.mceDefaultSkin .mceToolbarSource .mceFlex{justify-content:space-between}tinymce/themes/advanced/skins/default/ui.css000060400000166073152456167170015177 0ustar00.mceDefaultSkin *,.mceDefaultSkin .mceAction,.mceDefaultSkin .mceIcon,.mceMenu,.mceModal .mceIcon{font-weight:400;-webkit-font-smoothing:antialiased;-moz-osx-font-smoothing:grayscale;text-transform:none}.mceDefaultSkin *,.mceMenu,.mceTableSplitMenu{border-collapse:separate;box-sizing:border-box}.mceDefaultSkin *,.mceMenu{color:#444;font-family:system-ui,-apple-system,"Segoe UI",Roboto,"Helvetica Neue",Arial,"Noto Sans",sans-serif,"Apple Color Emoji","Segoe UI Emoji","Segoe UI Symbol","Noto Color Emoji";font-size:16px;border:0;margin:0;padding:0;white-space:nowrap;text-decoration:none;cursor:inherit;vertical-align:baseline;width:auto;text-align:left;float:none;outline:0;position:relative;border-radius:0;-webkit-border-radius:0;-moz-border-radius:0;min-height:auto}.mceDefaultSkin input[type],.mceDefaultSkin select,.mceDefaultSkin textarea{margin:0;line-height:1}.mceDefaultSkin input{cursor:text}.mceDefaultSkin button,.mceDefaultSkin input,.mceDefaultSkin label,.mceDefaultSkin select{font-size:14px}.mceDefaultSkin button{appearance:none}.mceDefaultSkin input[type=radio],.mceDefaultSkin input[type=checkbox]{cursor:inherit}.mceDefaultSkin>div{width:auto;font-size:100%;-webkit-text-size-adjust:100%;-ms-text-size-adjust:100%;direction:ltr;position:relative;top:0;left:0}.mceDefaultSkin a:active,.mceDefaultSkin a:hover,.mceDefaultSkin a:link,.mceDefaultSkin a:visited{text-decoration:none;font-weight:400;cursor:default;color:#000}.mceDefaultSkin iframe{display:block;width:100%}.mceToolbarFixed .mceToolbar{position:fixed;left:0;top:0;right:0;border:1px solid #ddd;border-right:0;border-left:0;z-index:9999}.mceDefaultSkin .mceLayout{border:1px solid #ddd}.mceDefaultSkin .mceToolbar{background:#f5f5f5;padding:2px;width:auto!important;border-bottom:1px solid #ddd}.mceDefaultSkin .mceToolbarRow{white-space:normal;display:flex;flex-wrap:wrap;align-items:center}.mceDefaultSkin.mceRtl .mceToolbarRow{justify-content:right;flex-direction:row-reverse}.mceDefaultSkin .mceLeft .mceToolbarRow{justify-content:flex-start}.mceDefaultSkin .mceRight .mceToolbarRow{justify-content:flex-end}.mceDefaultSkin .mceCenter .mceToolbarRow{justify-content:center}.mceDefaultSkin .mceToolbarRow>button,.mceDefaultSkin .mceToolbarRow>div{margin:1px 0 1px 2px}.mceDefaultSkin .mceIframeContainer{position:relative}.mceDefaultSkin .mceToolbar:last-child{border-bottom:0 none;border-top:1px solid #ddd}.mceDefaultSkin .mceToolbar:nth-child(2):not(:last-child){border-bottom:0}.mceDefaultSkin .mceIframeContainer:first-child{border-bottom:1px solid #ddd}.mceDefaultSkin .mceIframeContainer:last-child{border-top:1px solid #ddd}.mceDefaultSkin .mceIframeContainer:nth-child(2){border-top-width:0}.mceDefaultSkin .mceSeparator{width:1px;height:26px;margin:0 3px 0 2px;background:#ddd;display:block}.mceDefaultSkin .mceFlex{display:flex}.mceDefaultSkin .mceFlexAuto{flex:auto}.mceDefaultSkin .mceToolbar.mceDisabled::after{content:"";position:absolute;top:0;left:0;right:0;bottom:0;background:rgba(255,255,255,.5);z-index:1}.mceDefaultSkin .mceStatusbar{font-size:9pt;line-height:32px;overflow:visible;color:#000;height:32px;padding:5px;background:#f5f5f5;box-sizing:border-box;display:flex;flex-direction:row;align-items:center;border:0 solid #ddd;justify-content:end}.mceDefaultSkin .mceStatusbar:first-child{border-bottom-width:1px}.mceDefaultSkin .mceStatusbar:last-child{border-top-width:1px}.defaultSkin .mceStatusbar:empty{line-height:inherit;height:inherit;padding:0;border:0}.defaultSkin .mceStatusbar div{margin:2px}.mceDefaultSkin .mceStatusbar .mceResize{cursor:se-resize;margin:0;order:3;display:flex}.mceDefaultSkin .mceStatusbar .mceResize span{background:url(../../img/icons.png?v=7c1b5ae6239f4f3b8116c6316bce0db9) -800px 0;display:block;width:20px;height:20px}.mceDefaultSkin .mceStatusbar a:hover{text-decoration:underline}.mceDefaultSkin .mceBlocker{position:absolute;left:0;top:0;z-index:1000;background:#fff;opacity:.8}@keyframes donut-spin{0%{transform:rotate(0)}100%{transform:rotate(360deg)}}.mceDefaultSkin .mceProgress{position:absolute;left:0;top:0;z-index:1001}.mceDefaultSkin .mceProgress:after{content:"";display:block;border:.25rem solid rgba(0,0,0,.3);border-left-color:#444;border-radius:50%;width:2rem;height:2rem;animation:donut-spin 1.2s linear infinite;z-index:10001;position:absolute;top:50%;left:50%;margin:-1rem 0 0 -1rem;box-sizing:border-box}.mceDefaultSkin .mcePlaceHolder{border:1px dotted gray}.mceDefaultSkin .mcePanel.mceContextPanel::after,.mceDefaultSkin .mcePanel.mceContextPanel::before{position:absolute;left:50%;display:block;width:0;height:0;border-style:solid;border-color:transparent;content:""}.mceDefaultSkin .mcePanel.mceContextPanel::before{top:-9px;border-bottom-color:rgba(0,0,0,.2);border-width:0 9px 9px;margin-left:-9px}.mceDefaultSkin .mcePanel.mceContextPanel::after{top:-8px;border-bottom-color:#fff;border-width:0 8px 8px;margin-left:-8px}.mceDefaultSkin.mceArrowDown .mcePanel.mceContextPanel::before{bottom:-9px;border-top-color:rgba(0,0,0,.2);border-width:9px 9px 0;margin-left:-9px;top:initial}.mceDefaultSkin.mceArrowDown .mcePanel.mceContextPanel::after{bottom:-8px;border-top-color:#fff;border-width:8px 8px 0;margin-left:-8px;top:initial}.mceDefaultSkin .mceMenu div[class*=mceFontSize]{margin:.125em}.mceCharacterMap{padding:0}.mceCharacterMap>div{flex:1}.mceModal .mceModalBody[dir=rtl] .mceCharacterMap>div{text-align:right}.mceCharacterMap>div+div{max-width:11em;border:1px solid #ddd;display:flex;flex-direction:column}.mceModal .mceModalContent .mceCharacterMap button{background:#fff;width:1.5em;min-width:inherit;height:1.5em;padding:0;line-height:1rem;vertical-align:middle;appearance:none;cursor:pointer;font-size:16px;text-align:center;border:1px solid #ddd;display:inline-block;margin:0 1px 1px 0}.mceModal .mceModalContent .mceModalRow.mceCharacterMap{align-items:inherit}.mceModal .mceModalContent .mceCharacterMap button:focus,.mceModal .mceModalContent .mceCharacterMap button:hover{border:1px solid #ccc;background-color:#e6e6e6}.mceCharacterMapDescription h1{line-height:2;font-size:5em;height:2em;text-align:center;vertical-align:middle;flex:1}.mceCharacterMapDescription h3{line-height:2em;font-size:1.25em;height:2em;text-align:center}.mceCharacterMapDescription h4{line-height:1.5em;font-size:1em;text-align:center;color:#888}.mceCharacterMapDescription{font-size:1em}.mceCharacterMap ul li:hover,.mceCharacterMap ul li:hover button{background:#f5f5f5;color:#444;text-decoration:none}input::placeholder,textarea::placeholder{margin:0 .5em}.mceDefaultSkin .mceNotationMenu{white-space:normal;display:flex;flex-wrap:wrap;align-items:center;max-width:14em;justify-content:space-between;gap:.25em}.mceDefaultSkin .mceNotationMenu button:focus,.mceDefaultSkin .mceNotationMenu button:hover{background:#eee;border-radius:3px}.mceDefaultSkin .mceNotationMenu .mce_notation_icon{display:inline-block;font-family:"Apple Symbols","Segoe UI Symbol",FreeSerif,serif;font-size:32px;line-height:1em;width:1em;height:1em;text-align:center;cursor:pointer;user-select:none;appearance:none;background:#fff}.mceMenu{position:absolute;left:0;top:0;z-index:700010!important;border:1px solid #ccc;direction:ltr;background-color:#fff;border-radius:2px;overflow:visible;overflow-y:auto;margin-top:3px;margin-left:1px;min-width:10em}.mceListBoxMenu,.mceSplitButtonMenu{border-radius:0 2px 2px}.mceMenu .mceMenuItems,.mceMenu .mceMenuItems span{display:block}.mceMenu .mceMenuItems .mceMenuItem{position:relative;padding:0;cursor:pointer;margin:1px 0;min-height:inherit;float:inherit;display:flex;align-items:center;justify-content:space-between}.mceMenu .mceMenuItems .mceMenuItem:has(.mceDescription){flex-direction:column}.mceMenu .mceMenuItems .mceMenuItem>div{width:100%}.mceMenu .mceMenuItems .mceText{position:relative;display:block;cursor:pointer;margin:0;padding:0 8px;overflow:hidden;width:100%;flex:1 0 100%;text-overflow:ellipsis}.mceMenu .mceMenuItems .mceIcon+.mceText{padding:0 32px 0 40px}.mceMenu .mceMenuItems .mcePreview,.mceMenu .mceMenuItems .mceText{font-size:14px;line-height:32px}.mceMenu .mceMenuItems .mceDescription,.mceMenu .mceMenuItems .mceMeta{font-size:12px;line-height:1.5;color:#666;max-width:20em;white-space:normal;overflow:hidden;padding:0 8px;width:100%;flex:1 0 100%}.mceMenu .mceMenuItems pre.mceText{font-family:Monospace}.mceMenu .mceMenuItems .mceIcon{position:absolute;top:6px;left:4px;width:20px}.mceMenu .mceMenuItems .mceImage{height:4rem;background-repeat:no-repeat;background-position:center;background-size:contain;margin-top:.5rem}.mceMenu .mceMenuItems .mceImage+.mceText{text-align:center}.mceMenu .mceToolbarFooter .mceToolbarItem,.mceRtl .mceMenuItem .mceText{text-align:right}.mceMenu .mceMenuItems{height:100%;overflow:visible;display:flex;flex-direction:column;margin:2px}.mceMenu .mceMenuFilter+.mceMenuItems{height:calc(100% - 40px);max-height:346px}.mceMenu .mceMenuItems .mceMenuItemHidden{display:none}.mceMenu .mceMenuItems .mceMenuItemActive,.mceMenu .mceMenuItems .mceMenuItemEnabled:focus,.mceMenu .mceMenuItems .mceMenuItemEnabled:hover{background-color:#eee}.mceMenu .mceMenuItems .mceMenuHtml:hover{background-color:#fff}.mceMenu .mceMenuItems .mceMenuItemEnabled:focus{outline:#ddd dashed 1px}.mceMenu .mceMenuItems .mceMenuItemEnabled .mceTableSplitMenu a:hover{background-color:transparent}.mceMenu .mceMenuItems .mceMenuItemTitle{border-bottom:1px solid #ddd;background-color:#f5f5f5}.mceMenu .mceMenuItems .mceMenuItemTitle:hover{background-color:#f5f5f5}.mceMenu .mceMenuItems .mceMenuItemFooter{border-top:1px solid #ddd}.mceMenu .mceMenuItems .mceMenuItemTitle .mceText{font-weight:700;cursor:default}.mceMenu .mceMenuItems .mceMenuItemSeparator{background:#ddd;height:1px;cursor:default}.mceMenu .mceMenuItems .mceMenuItem.mceDisabled{opacity:.5}.mceMenu .mceMenuItemsItemDisabled .mceText{color:#888}.mceMenu .mceNoIcons .mceMenuItemSelected .mceMenuItem{background:url(img/menu_arrow.gif) left center no-repeat}.mceMenu .mceMenuItemsItemSub .mceMenuItem{background:url(img/menu_arrow.gif) center right no-repeat}.mceMenu .mceMenuItems .mceMenuItemSub .mceText{margin-left:1em}.mceMenu .mceMenuItems .mceMenuHtml{position:relative;flex-direction:column}.mceMenu .mceMenuItems .mceMenuHtml .mceToolbarRow{position:relative;display:flex;flex-wrap:nowrap}.mceMenu .mceMenuItems .mceMenuHtml .mceToolbarColumn{position:relative;display:flex;flex-direction:column}.mceMenu .mceMenuItems .mceMenuHtml label{display:block;line-height:2;vertical-align:middle;width:96px}.mceMenu .mceMenuItems .mceMenuHtml input[type=text],.mceMenu .mceMenuItems .mceMenuHtml select,.mceMenu .mceMenuItems .mceMenuHtml textarea{height:32px;width:100%;padding:2px;border:1px solid #ddd;background:#fff;color:#444;border-radius:2px;box-shadow:inherit;box-sizing:border-box;cursor:initial}.mceMenu .mceMenuItems .mceMenuHtml textarea{height:auto}.mceMenu .mceMenuItems .mceMenuHtml select:not([multiple]):not([size]){appearance:none;padding-right:20px;background-image:url("data:image/svg+xml;charset=UTF-8,%3Csvg%20width%3D%2224%22%20height%3D%2216%22%20viewBox%3D%220%200%2024%2016%22%20xmlns%3D%22http%3A%2F%2Fwww.w3.org%2F2000%2Fsvg%22%3E%0A%20%20%20%20%3Cpolygon%20fill%3D%22%23666%22%20points%3D%2212%201%209%206%2015%206%22%20%2F%3E%0A%20%20%20%20%3Cpolygon%20fill%3D%22%23666%22%20points%3D%2212%2013%209%208%2015%208%22%20%2F%3E%0A%3C%2Fsvg%3E%0A");background-repeat:no-repeat;background-position:100% 50%}.mceMenu .mceMenuItems .mceMenuHtml input[type=text]:focus{border-color:#66afe9;outline:0;background:#f5fbfe;color:#444;box-shadow:inherit}.mceMenu .mceLinkMenu{min-width:220px}.mceMenu .mceLinkMenu .mceMenuHtml input{margin-right:5px}.mceMenu .mceMenuItems .mceMenuHtml .mceButton{position:relative}.mceMenu .mceMenuItems .mceMenuHtml .mceButton .mceIcon{position:static}.mceMenu .mceButtonMenu{margin:2px 0 0 1px;border:1px solid #ddd;box-shadow:0 2px 5px rgba(0,0,0,.1)}.mceMenu .mceButtonMenu .mceMenuItem{margin:3px}.mceMenu .mceButtonMenu::before{content:"";display:block;padding:3px;position:absolute;width:40px;top:-6px;background:#fff;left:-1px;border-left:1px solid #ddd;border-right:1px solid #ddd}.mceMenu .mceModalContent .mceListBox .mceText{width:calc(100% - 32px)}.mceMenu .mceToolbarRow .mceToolbarItem{width:100%;display:flex;gap:4px}.mceMenu .mceToolbarRow .mceToolbarItem .mceTextBox{max-width:inherit}.mceMenu .mceToolbarRow .mceToolbarItem textarea{height:auto;white-space:pre-wrap;font-size:13px;line-height:2}.mceMenu .mceToolbarFooter .mceToolbarItem .mceButton{min-width:5em;height:32px;line-height:1;background:#fff;border-radius:2px;color:#444;border:1px solid #ddd;margin:0 0 0 4px;padding:0 8px}.mceMenu .mceToolbarFooter .mceToolbarItem .mceButton.mceButtonPrimary{background-color:#337ab7;border:1px solid rgba(0,0,0,.06);color:#fff}.mceDefaultSkin .mceButton{border:1px solid #ddd;padding:4px;min-width:32px;min-height:32px;appearance:none;cursor:pointer;outline:0;overflow:visible;text-transform:none;box-sizing:border-box;text-decoration:none;text-align:center;border-radius:2px;line-height:1}.mceDefaultSkin .mceButton .mceIcon{display:flex;align-items:center;justify-content:center;margin:auto;max-width:20px}.mceDefaultSkin .mceButton:hover{border:1px solid #ccc;background-color:#fafafa}.mceDefaultSkin .mceButton:focus{border:1px solid #ccc;background-color:#fff;outline:0}.mceDefaultSkin .mceButtonActive,.mceDefaultSkin .mceButtonSelected{border:1px solid #ccc;background-color:#ddd}.mceDefaultSkin .mceButtonDisabled .mceIcon{opacity:.38}.mceDefaultSkin .mceButtonLabeled{width:auto}.mceDefaultSkin .mceButtonLabeled .mceIcon{float:left}.mceDefaultSkin .mceButtonLabel{display:block;font-size:14px;padding:4px 8px 0 24px;font-family:"Helvetica Neue",Helvetica,Arial,sans-serif}.mceDefaultSkin .mceButtonDisabled .mceButtonLabel{color:#888}.mceDefaultSkin button:disabled{cursor:not-allowed}.mceDefaultSkin button:disabled .mceIcon{opacity:.38}.mceDefaultSkin .mceListBox{display:flex;flex-direction:row}.mceDefaultSkin .mceListBox .mceText{padding:0 4px;min-width:96px;height:32px;text-align:left;border:1px solid #ddd;border-right:0;background:#fff;line-height:2;overflow:hidden;border-radius:2px 0 0 2px;cursor:pointer}.mceDefaultSkin .mceListBox .mceOpen{width:16px;height:32px;border:1px solid #ddd;text-align:center;border-radius:0 2px 2px 0;cursor:pointer}.mceDefaultSkin .mceListBox .mceOpen,.mceDefaultSkin .mceListBox .mceText{float:left}.mceDefaultSkin .mceListBox:focus .mceOpen,.mceDefaultSkin .mceListBox:hover .mceOpen{border-color:#ccc;background-color:#fafafa}.mceDefaultSkin .mceListBox:focus .mceText,.mceDefaultSkin .mceListBox:hover .mceText{border-color:#ccc}.mceDefaultSkin .mceListBox .mceOpen:after{content:"\25BC";display:block;font-size:9px;line-height:32px;color:#444;text-align:center}.mceDefaultSkin .mceListBox .mceComboBox{position:relative;display:flex;flex-direction:row;width:100%;min-width:50%;flex:1;flex-wrap:wrap;align-items:center;border:1px solid #ddd;border-radius:2px}.mceDefaultSkin .mceListBox .mceComboBox .mceText{height:30px;line-height:32px;background:#fff;cursor:text;padding:4px;box-sizing:border-box;border:0;outline:0;width:100%;min-width:25%;flex:1}.mceDefaultSkin .mceListBox .mceComboBox .mceOpen{border:0}.mceDefaultSkin .mceListBoxSelected .mceText{border:1px solid #ccc;border-right:0;background:#fff;border-radius:2px 0 0}.mceDefaultSkin .mceListBoxSelected .mceOpen{background-color:#fff;border:1px solid #ccc;border-left:0;padding-left:1px;border-radius:0 2px 0 0}.mceDefaultSkin .mceListBoxSelected:focus .mceOpen,.mceDefaultSkin .mceListBoxSelected:hover .mceOpen{background-color:#fff}.mceDefaultSkin .mceListBoxSelected::after{content:"";padding:2px 0;width:100%;position:absolute;left:0;bottom:-3px;background:#fff;box-sizing:border-box;z-index:700011;border:1px solid #ccc;border-top:0 none;border-bottom:0 none}.mceDefaultSkin .mceListBoxDisabled .mceOpen:after{color:gray}.mceDefaultSkin .mceListBoxDisabled .mceText{color:gray;background-color:transparent}.mceListBoxMenu{min-width:calc(113px * 2);min-height:68px;height:auto;max-height:386px;margin-top:3px;overflow:hidden}.mceListBoxMenu .mceMenuItems .mceText{padding:0 8px 0 24px}.mceListBoxMenu .mceMenuItems .mceSelected{outline:#ddd dashed 1px;background-color:#eee}.mceListBoxMenu .mceMenuItems .mceHasIcon.mceSelected:before{left:inherit;right:.5em}.mceListBoxMenu .mceMenuItems{overflow:hidden;overflow-y:auto;max-height:386px}select.mceNativeListBox{font-size:7pt;background:#fafafa;border:1px solid gray;margin-right:2px}.mceListBoxMenu .mceMenuFilter{border:1px solid #ddd;width:auto;margin:.125em;position:relative;display:flex;flex-direction:row;flex-wrap:wrap;border-radius:2px;align-items:center;padding:0;box-sizing:border-box;transition:all .2s linear;transition-property:all;transition-property:border,background;cursor:text}.mceListBoxMenu .mceMenuFilter .mceMenuFilterInput{position:relative;display:flex;flex-direction:row;width:100%;min-width:50%;flex:1}.mceListBoxMenu .mceMenuFilter input{height:32px;line-height:32px;width:100%;background:#fff;cursor:text;padding:4px;box-sizing:border-box;border:0;outline:0}.mceListBox .mceComboBox .mceButton,.mceListBoxMenu .mceMenuFilter .mceButton{margin:.125em;position:relative;display:flex;justify-content:space-around;align-items:center;height:2em;min-width:5em;min-height:inherit;padding:0;box-sizing:border-box;background:#eee}.mceListBox .mceComboBox .mceButton{margin:1px;min-width:3em;padding:0 1px 0 0}.mceListBox .mceComboBox .mceButton label,.mceListBoxMenu .mceMenuFilter .mceButton label{padding:.25em;cursor:default}.mceListBox .mceComboBox .mceButton label{min-width:3em;width:auto;font-size:12px;line-height:1.75em}.mceListBox .mceComboBox .mceButton::after,.mceListBoxMenu .mceMenuFilter .mceButton::after{position:relative;top:0;right:0;display:block;text-align:center;text-indent:0;content:"\00d7";color:#444;line-height:1.4;font-size:1.25em;font-weight:700;height:100%;width:1em}.mceListBox[role=combobox]>button.mceOpen{position:absolute;right:0;height:30px;border-width:1px 1px 0 0}.mceListBoxMenu .mceMenuFilter svg{position:absolute;right:14px;top:14px;fill:#888;width:14px;height:14px;vertical-align:middle}.mceRtl .mceDefaultSkin .mceListBox .mceText{text-align:right;padding:0 4px 0 0}.mceDefaultSkin .mceTextBox{height:32px;line-height:2;max-width:100%;padding:2px;border:1px solid #ddd;background:#fff;color:#444;border-radius:2px;box-shadow:inherit;box-sizing:border-box;cursor:text;width:auto}.mceDefaultSkin .mceTextBox:focus{box-shadow:inherit;border-color:#66afe9;outline:0;background:#f5fbfe;color:#444}.mceDefaultSkin .mceTextBoxDisabled{color:#888;background-color:#eee;cursor:not-allowed}.mceDefaultSkin .mceTextBox+.mceTextBoxDescription{font-size:.75em;color:#666;line-height:2;display:inline-block;width:100%}.mceDefaultSkin .mceToolbarRow .mceTextBox{margin:1px 0 1px 2px;max-width:10em}.mceDefaultSkin .mceSplitButton{position:relative}.mceDefaultSkin .mceSplitButton button{height:32px;display:inline-block;text-align:center;line-height:1;width:32px}.mceDefaultSkin .mceSplitButton .mceOpen,.mceDefaultSkin .mceSplitButton .mceText{display:inline-block;border:1px solid #ddd}.mceDefaultSkin .mceSplitButton .mceText{float:left;border-right:0;border-radius:2px 0 0 2px;cursor:pointer;display:flex;flex-direction:column;align-items:center;justify-content:center;text-overflow:ellipsis}.mceDefaultSkin .mceSplitButton .mceAction{width:20px;background-image:url(../../img/icons.png?v=7c1b5ae6239f4f3b8116c6316bce0db9)}.mceDefaultSkin .mceSplitButton img.mceAction{background:0 0}.mceDefaultSkin .mceSplitButton .mceOpen{width:16px;text-align:center;height:32px;border-radius:0 2px 2px 0;cursor:pointer}.mceDefaultSkin .mceSplitButton .mceOpen:after{content:"\25BC";display:block;font-size:9px;line-height:32px;color:#444;text-align:center}.mceDefaultSkin .mceSplitButtonDisabled .mceOpen:after{color:#888}.mceDefaultSkin .mceSplitButton:focus .mceOpen,.mceDefaultSkin .mceSplitButton:focus .mceText,.mceDefaultSkin .mceSplitButton:hover .mceOpen,.mceDefaultSkin .mceSplitButton:hover .mceText{border-color:#ccc;background-color:#fafafa}.mceDefaultSkin .mceSplitButtonDisabled .mceAction{opacity:.3}.mceDefaultSkin .mceSplitButtonActive .mceText{border-color:#ccc;background-color:#ddd}.mceDefaultSkin .mceSplitButtonActive .mceOpen{border-left:0;border-color:#ccc;background-color:#ddd}.mceDefaultSkin .mceSplitButtonSelected::after{content:"";padding:2px 0;width:100%;position:absolute;left:0;bottom:-3px;background:#fff;box-sizing:border-box;z-index:700011;border:1px solid #ccc;border-top:0 none;border-bottom:0 none}.mceSplitButtonMenu{min-width:calc(48px * 3);margin:5px 0 0 1.5px;max-height:336px;overflow:visible;overflow-y:auto;max-width:20em}.mceDefaultSkin .mceMenuItemSub{box-shadow:inherit;border:0;margin:0}.mceDefaultSkin .mceSplitButtonMenu .mceMenuItem{margin:2px}.mceSplitButtonMenu .mceMenuItems .mceSelected{background-color:#ddd}.mceDefaultSkin .mceColorSplitMenu{display:flex;flex-wrap:wrap;max-width:203px;gap:1px}.mceDefaultSkin .mceColorSplitMenu button{display:block;width:24px;height:24px;overflow:hidden;border:1px solid #ddd;text-align:center;cursor:pointer;outline:0}.mceDefaultSkin .mceColorSplitMenu button:focus,.mceDefaultSkin .mceColorSplitMenu button:hover{border-color:#444;outline:0}.mceDefaultSkin .mceColorSplitMenu .mceRemoveColor{color:#444;font-weight:700}.mceDefaultSkin .mceColorSplitMenu .mceMoreColors{width:100%;height:auto;text-align:center;line-height:32px;background:#fff;cursor:pointer}.mceDefaultSkin .mceColorSplitMenu .mceMoreColors:hover{border:1px solid #ccc;background-color:#fafafa}.mceDefaultSkin .mceColorPreview{width:20px;height:4px;overflow:hidden;background:#fafafa}.mceDefaultSkin .mce_backcolor .mceAction,.mceDefaultSkin .mce_forecolor .mceAction{overflow:hidden;height:15px}.mceTableSplitMenu{background:#fff;border:0;padding:0;margin:0;border-spacing:inherit}.mceDefaultSkin .mceTableSplitMenu table{padding:2px}.mceDefaultSkin .mceTableSplitMenu td{background-color:#fff;text-align:center}.mceDefaultSkin .mceTableSplitMenu td a{width:24px;height:24px;display:block;border:1px solid #ddd;padding:0;margin:1px}.mceDefaultSkin .mceTableSplitMenu .selected a{background-color:#337ab7;border-color:#2e6da4}.mceDefaultSkin .mceTableSplitMenu .mceTableGridCount{background-color:#fff;text-align:center;line-height:32px}.mceDefaultSkin .mceSplitButtonSelected .mceText,.mceDefaultSkin .mceSplitButtonSelected:hover .mceText{background:#fff;border-color:#ccc;border-radius:2px 0 0}.mceDefaultSkin .mceSplitButtonSelected .mceOpen,.mceDefaultSkin .mceSplitButtonSelected:hover .mceOpen{background:#fff;border-color:#ccc;border-left:0 none;padding-left:1px;border-radius:0 2px 0 0}.mceDefaultSkin .mceColorSplitMenu{padding:2px;background:#fff}.mceDefaultSkin .mceColumns .mceTableSplitMenu{width:120px}.mceDefaultSkin .mceColumns .mceTableSplitMenu td a{width:24px;height:32px}@font-face{font-family:wfeditor;src:url(../../../../../fonts/wfeditor.woff) format('woff');font-weight:400;font-style:normal}.mceDefaultSkin .mceAction,.mceDefaultSkin .mceIcon,.mceModal .mceIcon{font-family:wfeditor;font-style:normal;font-variant:normal;line-height:1.25em;font-size:16px;text-align:center;vertical-align:middle;background:0 0;position:relative;color:#444}.mceDefaultSkin .mceAction,.mceDefaultSkin .mceIcon{display:inline-block;min-width:20px;height:20px;line-height:20px}.mceDefaultSkin .mceIcon{background:url(../../img/icons.png?v=7c1b5ae6239f4f3b8116c6316bce0db9) 20px 20px no-repeat}.mceDefaultSkin .mceIcon img{vertical-align:middle;min-width:16px;height:auto;cursor:inherit;margin:auto}.mceDefaultSkin .mceIcon svg{width:1em;height:1em;fill:#444}.mceDefaultSkin img[src$=".svg"].mceAction,.mceDefaultSkin img[src$=".svg"].mceIcon{width:18px;height:16px}.mceDefaultSkin .mceIconImage{display:flex;background:0 0}.mceDefaultSkin span.mce_bold{background-position:0 0}.mceDefaultSkin span.mce_italic{background-position:-60px 0}.mceDefaultSkin span.mce_underline{background-position:-140px 0}.mceDefaultSkin span.mce_strikethrough{background-position:-120px 0}.mceDefaultSkin span.mce_source_undo,.mceDefaultSkin span.mce_undo{background-position:-160px 0}.mceDefaultSkin span.mce_redo,.mceDefaultSkin span.mce_source_redo{background-position:-100px 0}.mceDefaultSkin span.mce_cleanup{background-position:-40px 0}.mceDefaultSkin span.mce_bullist{background-position:-20px 0}.mceDefaultSkin span.mce_numlist,.mceDefaultSkin span.mce_source_linenumbers{background-position:-80px 0}.mceDefaultSkin span.mce_justifyleft{background-position:-460px 0}.mceDefaultSkin span.mce_justifyright{background-position:-480px 0}.mceDefaultSkin span.mce_justifycenter{background-position:-420px 0}.mceDefaultSkin span.mce_justifyfull{background-position:-440px 0}.mceDefaultSkin span.mce_anchor{background-position:-200px 0}.mceDefaultSkin span.mce_indent,.mceDefaultSkin span.mce_source_format{background-position:-400px 0}.mceDefaultSkin span.mce_outdent{background-position:-540px 0}.mceDefaultSkin span.mce_link,.mceDefaultSkin span.mce_lnk{background-position:-500px 0}.mceDefaultSkin span.mce_unlink{background-position:-640px 0}.mceDefaultSkin span.mce_sub{background-position:-600px 0}.mceDefaultSkin span.mce_sup{background-position:-620px 0}.mceDefaultSkin span.mce_removeformat{background-position:-580px 0}.mceDefaultSkin span.mce_newdocument{background-position:-520px 0}.mceDefaultSkin span.mce_image{background-position:-380px 0}.mceDefaultSkin span.mce_help{background-position:-340px 0}.mceDefaultSkin span.mce_code,.mceDefaultSkin span.mce_source{background-position:-260px 0}.mceDefaultSkin span.mce_hr{background-position:-360px 0}.mceDefaultSkin span.mce_visualaid{background-position:-660px 0}.mceDefaultSkin span.mce_charmap{background-position:-240px 0}.mceDefaultSkin span.mce_paste{background-position:-560px 0}.mceDefaultSkin span.mce_copy{background-position:-700px 0}.mceDefaultSkin span.mce_cut{background-position:-680px 0}.mceDefaultSkin span.mce_blockquote{background-position:-220px 0}.mceDefaultSkin .mce_forecolor span.mceAction{background-position:-720px 0}.mceDefaultSkin .mce_backcolor span.mceAction{background-position:-760px 0}.mceDefaultSkin span.mce_forecolor{background-position:-720px 0}.mceDefaultSkin span.mce_backcolor{background-position:-760px 0}.mceDefaultSkin span.mce_forecolorpicker{background-position:-720px 0}.mceDefaultSkin span.mce_backcolorpicker{background-position:-760px 0}.mceDefaultSkin span.mce_readmore{background-position:-920px 0}.mceDefaultSkin span.mce_pagebreak{background-position:-940px 0}.mceDefaultSkin span.mce_advhr{background-position:0 -20px}.mceDefaultSkin span.mce_ltr{background-position:-20px -20px}.mceDefaultSkin span.mce_rtl{background-position:-40px -20px}.mceDefaultSkin span.mce_emotions{background-position:-60px -20px}.mceDefaultSkin span.mce_fullpage{background-position:-80px -20px}.mceDefaultSkin span.mce_fullscreen,.mceDefaultSkin span.mce_source_fullscreen{background-position:-100px -20px}.mceDefaultSkin span.mce_iespell{background-position:-120px -20px}.mceDefaultSkin span.mce_insertdate{background-position:-140px -20px}.mceDefaultSkin span.mce_inserttime{background-position:-160px -20px}.mceDefaultSkin span.mce_layerabsolute{background-position:-180px -20px}.mceDefaultSkin span.mce_insertlayer{background-position:-240px -20px}.mceDefaultSkin span.mce_layerbackward{background-position:-200px -20px}.mceDefaultSkin span.mce_layerforward{background-position:-220px -20px}.mceDefaultSkin span.mce_media,.mceDefaultSkin span.mce_video{background-position:-320px -20px}.mceDefaultSkin span.mce_nonbreaking{background-position:-340px -20px}.mceDefaultSkin span.mce_pastetext{background-position:-360px -20px}.mceDefaultSkin span.mce_pasteword{background-position:-380px -20px}.mceDefaultSkin span.mce_selectall{background-position:-400px -20px}.mceDefaultSkin span.mce_preview{background-position:-420px -20px}.mceDefaultSkin span.mce_print{background-position:-440px -20px}.mceDefaultSkin span.mce_cancel{background-position:-460px -20px}.mceDefaultSkin span.mce_save{background-position:-480px -20px}.mceDefaultSkin span.mce_replace,.mceDefaultSkin span.mce_source_replace{background-position:-500px -20px}.mceDefaultSkin span.mce_search{background-position:-520px -20px}.mceDefaultSkin span.mce_style,.mceDefaultSkin span.mce_styleprops{background-position:-560px -20px}.mceDefaultSkin span.mce_table,.mceDefaultSkin span.mce_table_insert{background-position:-580px -20px}.mceDefaultSkin span.mce_cell_props{background-position:-600px -20px}.mceDefaultSkin span.mce_delete_table{background-position:-620px -20px}.mceDefaultSkin span.mce_delete_col{background-position:-640px -20px}.mceDefaultSkin span.mce_delete_row{background-position:-660px -20px}.mceDefaultSkin span.mce_col_after{background-position:-680px -20px}.mceDefaultSkin span.mce_col_before{background-position:-700px -20px}.mceDefaultSkin span.mce_row_after{background-position:-720px -20px}.mceDefaultSkin span.mce_row_before{background-position:-740px -20px}.mceDefaultSkin span.mce_merge_cells{background-position:-760px -20px}.mceDefaultSkin span.mce_table_props{background-position:-980px -20px}.mceDefaultSkin span.mce_row_props{background-position:-780px -20px}.mceDefaultSkin span.mce_split_cells{background-position:-800px -20px}.mceDefaultSkin span.mce_template{background-position:-820px -20px}.mceDefaultSkin span.mce_visualchars{background-position:-840px -20px}.mceDefaultSkin span.mce_abbr{background-position:-860px -20px}.mceDefaultSkin span.mce_acronym{background-position:-880px -20px}.mceDefaultSkin span.mce_attribs{background-position:-900px -20px}.mceDefaultSkin span.mce_cite{background-position:-920px -20px}.mceDefaultSkin span.mce_del{background-position:-940px -20px}.mceDefaultSkin span.mce_ins{background-position:-960px -20px}.mceDefaultSkin span.mce_source_highlight{background-position:-140px -40px}.mceDefaultSkin span.mce_source_wrap{background-position:-100px -40px}.mceDefaultSkin span.mce_source_search_previous{background-position:-440px -40px}.mceDefaultSkin span.mce_source_search_next{background-position:-460px -40px}.mceDefaultSkin span.mce_source_replace_all{background-position:-480px -40px}.mceDefaultSkin span.mce_source_search_regex{background-position:-500px -40px}.mceDefaultSkin span.mce_columns{background-position:-520px -40px}.mceDefaultSkin span.mce_columns_add{background-position:-560px -40px}.mceDefaultSkin span.mce_columns_add_before{background-position:-660px -40px}.mceDefaultSkin span.mce_columns_delete{background-position:-580px -40px}.mceDefaultSkin span.mce_source_search_wholeword{background-position:-680px -40px}.mceDefaultSkin span.mce_source_search_matchcase{background-position:-700px -40px}.mceDefaultSkin span.mce_joomla{background-position:-600px -40px}.mceDefaultSkin span.mce_upload{background-position:-620px -40px}.mceDefaultSkin span.mce_langcode{background-position:-640px -40px}.mceDefaultSkin span.mce_restoredraft{background-position:-20px -40px}.mceDefaultSkin span.mce_spellchecker{background-position:-540px -20px}.mceDefaultSkin span.mce_autosave{background-position:-20px -40px}.mceDefaultSkin span.mce_imgmanager{background-position:-380px 0}.mceDefaultSkin span.mce_article{background-position:-920px 0;width:40px}.mceDefaultSkin span.mce_textcase{background-position:-40px -40px}.mceDefaultSkin span.mce_visualblocks{background-position:-160px -40px}.mceDefaultSkin span.mce_kitchensink{background-position:-180px -40px}.mceDefaultSkin span.mce_mediamanager,.mceDefaultSkin span.mce_video{background-position:-320px -40px}.mceDefaultSkin span.mce_imgmanager_ext{background-position:-420px -40px}.mceDefaultSkin span.mce_templatemanager{background-position:-380px -40px}.mceDefaultSkin span.mce_iframe{background-position:-400px -40px}.mceDefaultSkin span.mce_filemanager{background-position:-360px -40px}.mceDefaultSkin span.mce_caption_add{background-position:-280px -40px}.mceDefaultSkin span.mce_caption_delete{background-position:-300px -40px}.mceDefaultSkin span.mce_microdata{background-position:-340px -40px}.mceDefaultSkin span.mce_plus{background-position:-200px -40px}.mceDefaultSkin span.mce_cross,.mceDefaultSkin span.mce_delete,.mceDefaultSkin span.mce_trash{background-position:-220px -40px}.mceDefaultSkin span.mce_check{background-position:-540px -40px}.mceDefaultSkin .mce_list_default:before,.mceDefaultSkin .mce_list_disc:before{content:"●";line-height:1;display:inline-block}.mceDefaultSkin .mce_list_circle:before{content:"○";line-height:1;display:inline-block}.mceDefaultSkin .mce_list_square:before{content:"□";line-height:1;display:inline-block}.mceDefaultSkin .mce_list_lower_alpha::before,.mceDefaultSkin .mce_list_lower_greek::before,.mceDefaultSkin .mce_list_lower_roman::before,.mceDefaultSkin .mce_list_upper_alpha::before,.mceDefaultSkin .mce_list_upper_roman::before{font-size:1em;font-family:"times new roman,times";line-height:1.25}.mceDefaultSkin .mce_list_lower_alpha::before{content:"a."}.mceDefaultSkin .mce_list_lower_greek::before{content:"\03b1."}.mceDefaultSkin .mce_list_lower_roman::before{content:"iv."}.mceDefaultSkin .mce_list_upper_alpha::before{content:"A."}.mceDefaultSkin .mce_list_upper_roman::before{content:"IV."}.mceDefaultSkin .mce_spinner{background:url(img/load.gif?v=7c1b5ae6239f4f3b8116c6316bce0db9) no-repeat}.mceDefaultSkin .mce_none[class*=icon-]:before{font-family:"Font Awesome 6 Free","Font Awesome 5 Free",IcoMoon;font-weight:900}.mceDefaultSkin .mcePanel{position:relative;left:0;top:0;z-index:1000;border:1px solid #ddd;direction:ltr;background:#fafafa;padding:0;font-family:-apple-systrem,BlinkMacSystremFont,"Segoe UI",Roboto,Oxygen-Sans,Ubuntu,Cantarell,"Helvetica Neue",Arial,sans-serif;font-size:16px;box-shadow:0 2px 4px rgba(0,0,0,.3);box-sizing:border-box}.mceDefaultSkin .mcePanelButtonActive{background-color:#eee;border-color:#ddd}.mceDefaultSkin .mcePanelButtonSelected,.mceDefaultSkin .mcePanelButtonSelected:hover{background-color:#fff;border-color:#ddd}.mceDefaultSkin .mcePanelButtonSelected .mceOpen,.mceDefaultSkin .mcePanelButtonSelected:hover .mceOpen{border-left-color:transparent}.mceDefaultSkin .mcePanel h4{font-size:14px;color:#444;font-weight:700;margin:0 0 8px}.mceDefaultSkin .mcePanel .mcePanelContent{background-color:#fff;font-size:14px;padding:4px;white-space:normal}.mceDefaultSkin .mcePanel .mcePanelContent .mceToolbarRow{display:flex}.mceDefaultSkin .mcePanel .mcePanelContent label{display:block;line-height:2;vertical-align:middle}.mceDefaultSkin .mcePanel input[type=text],.mceDefaultSkin .mcePanel select,.mceDefaultSkin .mcePanel textarea{height:32px;width:100%;padding:2px;border:1px solid #ddd;background:#fff;color:#444;border-radius:2px;box-shadow:inherit;box-sizing:border-box}.mceDefaultSkin .mcePanel input[type=text],.mceDefaultSkin .mcePanel textarea{min-width:12em;cursor:text}.mceDefaultSkin .mcePanel textarea{height:auto}.mceDefaultSkin .mcePanel select:not([multiple]):not([size]){appearance:none;padding-right:20px;background-image:url("data:image/svg+xml;charset=UTF-8,%3Csvg%20width%3D%2224%22%20height%3D%2216%22%20viewBox%3D%220%200%2024%2016%22%20xmlns%3D%22http%3A%2F%2Fwww.w3.org%2F2000%2Fsvg%22%3E%0A%20%20%20%20%3Cpolygon%20fill%3D%22%23666%22%20points%3D%2212%201%209%206%2015%206%22%20%2F%3E%0A%20%20%20%20%3Cpolygon%20fill%3D%22%23666%22%20points%3D%2212%2013%209%208%2015%208%22%20%2F%3E%0A%3C%2Fsvg%3E%0A");background-repeat:no-repeat;background-position:100% 50%}.mceDefaultSkin .mcePanel input[type=text]:focus{border-color:#66afe9;outline:0;background:#f5fbfe;color:#444;box-shadow:inherit}.mceDefaultSkin .mcePanel .mcePanelFooter .mceButton{appearance:none;margin:0 0 0 5px;border:none;overflow:visible;color:#444;text-transform:none;display:inline-block;box-sizing:border-box;padding:0 12px;background:#fff;vertical-align:middle;line-height:26px;min-height:32px;text-decoration:none;text-align:center;border:1px solid rgba(0,0,0,.12);border-radius:2px;cursor:pointer}.mceDefaultSkin .mcePanel .mcePanelFooter .mceButtonPrimary{background-color:#337ab7;color:#fff;box-shadow:inset 0 0 5px rgba(0,0,0,.05);text-shadow:0 -1px 0 rgba(0,0,0,.1)}.mceDefaultSkin .mcePanel .mcePanelFooter .mceButton:focus,.mceDefaultSkin .mcePanel .mcePanelFooter .mceButton:hover{background-color:#fafafa;color:#444;outline:0;text-decoration:none;border-color:rgba(0,0,0,.16)}.mceDefaultSkin .mcePanel .mcePanelFooter .mceButtonDisabled,.mceDefaultSkin .mcePanel .mcePanelFooter .mceButtonDisabled:focus,.mceDefaultSkin .mcePanel .mcePanelFooter .mceButtonDisabled:hover{background:#eee;color:#888}.mceDefaultSkin .mcePanel .mcePanelFooter .mceButtonPrimary:hover{background-color:#35b3ee;color:#fff;border-color:rgba(0,0,0,.21)}.mceDefaultSkin .mcePanel .mcePanelFooter{text-align:right;background-color:#f5f5f5;padding:10px;border-top:1px solid #ddd}.mceDefaultSkin .mcePanel:before{content:"";display:block;position:absolute;width:30px;background-color:#fff;height:6px;left:-1px;top:-6px;border-left:1px solid #ddd;border-right:1px solid #ddd;box-sizing:content-box}.mceDefaultSkin.mcePanelSplitButton .mcePanel::before{width:46px;height:8px;top:-8px}.mceDefaultSkin.mce_search .mcePanel .mcePanelFooter .mceButton,.mceDefaultSkin.mce_search .mcePanel label{min-width:70px}.mceDefaultSkin.mce_search .mcePanel input.search_error{border-color:red}.mceDefaultSkin .mcePanelButtonSelected .mceSplitButton .mceText button{border-right-color:transparent}.mceDefaultSkin .mcePanelButtonSelected .mceSplitButton .mceOpen button{border-left-color:transparent}.mceDefaultSkin .mcePanelButtonActive .mceOpen button,.mceDefaultSkin .mcePanelButtonActive .mceText button{border-color:#ccc;background-color:#ddd}.mceDefaultSkin .mceLayout .mceBranding{width:100%;text-align:center;line-height:20px;background:#eee;padding:5px 0;display:block;box-sizing:border-box;border-bottom:1px solid #ddd;white-space:normal}.mceDefaultSkin .mceLayout .mceBranding a{font-weight:700;cursor:pointer}.mceDefaultSkin .mceLayout .mceBranding a:hover{text-decoration:underline}.mceDefaultSkin .mceLayout .mceBranding span{font-size:inherit;line-height:inherit;font-family:inherit}.mceDefaultSkin .mce_emotions_icon{display:inline-block;font-size:16px;line-height:2em;width:auto;height:auto;min-width:2em;min-height:2em;text-align:center;cursor:pointer;user-select:none;appearance:none;background:#fff}.mceDefaultSkin .mceEmoticonsMenu{max-width:16.75em;white-space:normal;display:flex;flex-wrap:wrap;justify-content:center}.mceDefaultSkin .mce_emotions_icon img{padding:5px;cursor:pointer}.mce_emotions_icon:focus,.mce_emotions_icon:hover{background:#eee;border-radius:3px}.mcePathRow{overflow:hidden;width:100%}.mcePathHidden .mceText{display:none}.mcePathPath .mceText{font-size:12px;line-height:14px;max-width:3em;text-overflow:ellipsis;overflow:hidden;opacity:.75;cursor:default}.mcePathPath a .mceText{opacity:1;cursor:pointer}.mcePathPath a:not(:last-child):after{content:"\00bb";display:inline-block;text-decoration:none;margin:0 .25em}.mcePathHidden:after{content:"...";display:inline-block}.mcePathLabel{position:relative;display:inline-block;min-width:32px;margin:0 5px 0 0;font-size:14px;user-select:none}.mcePathPath{display:inline-block}.mceDefaultSkin .mceClassBar{display:flex;flex-direction:row;min-height:32px;align-items:center;padding:0 .25em}.mceDefaultSkin .mceToolbar+.mceClassBar{border-top:1px solid #ddd}.mceDefaultSkin .mceIframeContainer+.mceClassBar{border-bottom:1px solid #ddd}.mceDefaultSkin .mceClassBar .mceClassBarTags{display:flex;flex-direction:row;flex-wrap:wrap}.mceDefaultSkin .mceClassBar .mceButton{margin:.125em;position:relative;height:2em;min-width:5em;min-height:inherit;padding:0 1.25em 0 0;box-sizing:border-box;background:#eee;font-size:12px}.mceDefaultSkin .mceClassBar .mceButton label{padding:.25em;cursor:default;font-size:1em}.mceDefaultSkin .mceClassBar .mceButton::after{position:absolute;top:0;right:0;display:block;text-align:center;text-indent:0;content:"\00d7";color:#444;line-height:1.3;font-size:1.25em;font-weight:700;height:100%;width:1em}.mceDefaultSkin .mceStatusbar .mceWordCount,.mceDefaultSkin .mceStatusbar .mceWordCount .mceText,.mceDefaultSkin .mce_formatPreview a{font-size:14px}.mceDefaultSkin .mceClassBar .mceListBox{height:28px;display:flex;flex-direction:row;align-items:center;margin:0 2px}.mceDefaultSkin .mceClassBar .mceListBox input{width:100%;height:28px;padding:2px;border-radius:0;box-sizing:border-box;border:0}.mceDefaultSkin .mceClassBar .mceListBox .mceOpen{height:30px}.mceDefaultSkin .mceClassBar .mceListBox .mceOpen:after{line-height:30px}.mceDefaultSkin .mceStatusbar .mceWordCount .mceText:before{content:attr(title);display:inline-block;margin:0 5px}.mceDefaultSkin .mceWordCountLimit{font-weight:700;color:#c00}.mceDefaultSkin .mce_address span.mceText{font-style:italic}.mceDefaultSkin .mce_pre span.mceText{font-family:monospace}.mceDefaultSkin .mce_h1 span.mceText{font-weight:bolder;font-size:2em}.mceDefaultSkin .mce_h2 span.mceText{font-weight:bolder;font-size:1.5em}.mceDefaultSkin .mce_h3 span.mceText{font-weight:bolder;font-size:1.17em}.mceDefaultSkin .mce_h4 span.mceText{font-weight:bolder;font-size:1em}.mceDefaultSkin .mce_h5 span.mceText{font-weight:bolder;font-size:.83em}.mceDefaultSkin .mce_h6 span.mceText{font-weight:bolder;font-size:.75em}.mceDefaultSkin .mceToolbarSource{margin:0}.mceDefaultSkin .mceToolbarSource .mceFlex{justify-content:space-between}.mceModal .mceIcon{vertical-align:baseline;line-height:1}.mceModal .mce_arrow-up:before{content:"\edcc"}.mceModal .mce_arrow-down:before{content:"\edd0"}.mceModal button:disabled .mceIcon{color:#888}.mceModal{position:absolute;z-index:700000;width:100%;height:100%;top:0;left:0}.mceModal *{box-sizing:border-box;white-space:normal}.mceModal .mceModalOverlay{position:fixed;cursor:pointer;background-color:#000;width:100%;height:100%;opacity:.6;z-index:700001}.mceModal .mceLoading .mceModalContent:after,.mceModal .mceLoading .mceModalContent:before{content:"";z-index:700003;position:absolute;box-sizing:border-box}.mceModal .mceModalFrame{box-sizing:border-box;height:100%;left:0;position:absolute;text-align:center;top:0;width:100%;padding:8px}.mceModal .mceModalFrame:after{content:"";display:inline-block;height:100%;vertical-align:middle}.mceModal .mceLoading .mceModalContent:before{width:100%;height:100%;left:0;top:0;background:#fff;opacity:.8}@keyframes donut-spin{0%{transform:rotate(0)}100%{transform:rotate(360deg)}}.mceModal .mceLoading .mceModalContent:after{display:block;border:.25rem solid rgba(0,0,0,.3);border-left-color:#444;border-radius:50%;width:2.5rem;height:2.5rem;animation:donut-spin 1.2s linear infinite;top:50%;left:50%;margin:-3rem 0 0 -1rem}.mceModal .mceModalHeader{padding:8px;background-color:#fff;display:flex;align-items:center}.mceModal .mceModalHeader .mceModalLogo{width:1.25em;height:1.25em;margin:0 .5em 0 0}.mceModal .mceModalHeader .mceModalLogo:empty{display:none}.mceModal .mceModalHeader .mceModalLogo svg{width:100%;height:100%;fill:#fff;border-radius:2px;padding:.125em;text-align:center;display:inline-block;background-color:#444}.mceModal .mceModalHeader .mceModalLogo svg g{fill:#fff}.mceModal .mceModalHeader h5{font-size:18px;line-height:1;font-weight:700;pointer-events:none;width:100%;flex:1}.mceModal .mceModalBody[dir=rtl] .mceModalHeader h5{text-align:right}.mceModal .mceModalMove{cursor:move}.mceModalBody .mceModalContent{background:#fff;position:relative;height:auto}.mceModalBody .mceModalContentIframe{height:calc(100% - 48px)}.mceModalBody .mceModalAlert .mceModalContent,.mceModalBody .mceModalConfirm .mceModalContent,.mceModalBody .mceModalPrompt .mceModalContent{min-height:5em;display:flex;flex-direction:column;justify-content:center}.mceModalBody .mceModalFooter{margin:0;padding:8px;border-radius:0 0 2px;text-align:right;background-color:#fff}.mceModalBody .mceModalBody{cursor:default;display:block;margin:0 auto;position:absolute;text-align:left;width:100%;min-width:160px}.mceModalBody .mceModalContainer{overflow:hidden;max-width:100%;height:auto;line-height:0;border-radius:4px;border:1px solid rgba(0,0,0,.3);box-shadow:0 2px 4px rgba(0,0,0,.4);display:flex;flex-direction:column}.mceModalBody .mceModalClose{width:32px;height:32px;border-radius:2px;cursor:pointer;background:#fff}.mceModalBody .mceModalClose:focus,.mceModalBody .mceModalClose:hover{background:#e5e5e5;border:0}.mceModalBody .mceModalClose:after{color:#444;display:block;font-family:Arial,sans-serif;font-size:1.5em;font-weight:700;line-height:1;margin:0 0 0 1px;text-align:center;text-decoration:none;content:"\00d7"}.mceModalBody .mceModalContent>div,.mceModalBody .mceModalContent>form{height:auto;padding:8px;text-align:center;line-height:1}.mceModalBody .mceModalContent iframe{min-height:inherit;border:0;top:0;left:0;width:100%;height:100%;position:absolute}.mceModalBody .mceModalPlaceHolder{border:1px solid #000;background:#888;top:0;left:0;opacity:.5}.mceModalBody .mceButton{min-width:5em;height:32px;line-height:1;background:#fff;border-radius:2px;color:#444;border:1px solid #ddd;margin:0 0 0 4px;padding:0 8px}.mceModalBody .mceButton:focus,.mceModalBody .mceButton:hover{color:#444;outline:0;text-decoration:none;border-color:#888;background:#fff}.mceModalBody .mceButton:disabled,.mceModalBody .mceButton:focus:disabled,.mceModalBody .mceButton:hover:disabled{color:#888;background:#f5f5f5;border-color:#eee;cursor:not-allowed}.mceModalBody .mceModalFooter .mceButton{border-color:#ddd}.mceModalBody .mceModalFooter .mceButton:focus,.mceModalBody .mceModalFooter .mceButton:hover{border-color:#888;background:#fff}.mceModalBody .mceButtonDefault{border-color:#ddd}.mceModalBody .mceButtonDefault:focus,.mceModalBody .mceButtonDefault:hover{border-color:#888}.mceModalBody .mceModalFooter .mceButtonPrimary{background-color:#337ab7;border:1px solid rgba(0,0,0,.06);color:#fff}.mceModalBody .mceModalFooter .mceButtonPrimary:focus,.mceModalBody .mceModalFooter .mceButtonPrimary:hover{background-color:#286090;color:#fff;border-color:rgba(0,0,0,.21)}.mceModalAlert,.mceModalConfirm,.mceModalPrompt{min-height:160px}[class*=mce-modal-landscape-] .mceModalContentIframe{padding-bottom:calc(56.25% - 61px);height:0}[class*=mce-modal-portrait-] .mceModalContentIframe{padding-bottom:calc(133.33% - 61px)}.mceModal .mce-modal-landscape-128,.mceModal .mce-modal-landscape-xxsmall{max-width:128px}.mceModal .mce-modal-landscape-256,.mceModal .mce-modal-landscape-xsmall{max-width:256px}.mceModal .mce-modal-landscape-384,.mceModal .mce-modal-landscape-small,.mceModalAlert,.mceModalConfirm,.mceModalPrompt{max-width:384px}.mceModal .mce-modal-landscape-512,.mceModal .mce-modal-landscape-medium{max-width:512px}.mceModal .mce-modal-landscape-640,.mceModal .mce-modal-landscape-large{max-width:640px}.mceModal .mce-modal-landscape-768,.mceModal .mce-modal-landscape-xlarge{max-width:768px}.mceModal .mce-modal-landscape-896,.mceModal .mce-modal-landscape-xxlarge{max-width:896px}.mceModal .mce-modal-landscape-1024{max-width:1024px}.mceModal .mce-modal-landscape-full{width:calc(100% - 40px);height:calc(100vh - 20px);padding:0}.mceModal .mce-modal-portrait-128,.mceModal .mce-modal-portrait-xsmall{max-width:128px}.mceModal .mce-modal-portrait-256,.mceModal .mce-modal-portrait-small{max-width:256px}.mceModal .mce-modal-portrait-320{max-width:320px}.mceModal .mce-modal-portrait-384,.mceModal .mce-modal-portrait-medium{max-width:384px}.mceModal .mce-modal-portrait-512,.mceModal .mce-modal-portrait-large{max-width:512px}.mceModal .mce-modal-portrait-640,.mceModal .mce-modal-portrait-xlarge{max-width:640px}.mceModal .mce-modal-portrait-768,.mceModal .mce-modal-portrait-full{width:calc(100% - 40px);height:calc(100vh - 20px);max-height:768px;padding:0}.mceModal .mce-modal-portrait-full{max-width:1440px;max-height:810px}.mceModal .mce-modal-portrait-768{max-width:768px}.mceModal .mce-modal-landscape-full .mceModalContainer,.mceModal .mce-modal-portrait-768 .mceModalContainer,.mceModal .mce-modal-portrait-full .mceModalContainer{height:100%}.mceModal .mce-modal-landscape-full .mceModalContentIframe,.mceModal .mce-modal-portrait-full .mceModalContentIframe{padding:0;height:calc(100% - -48px)}.mceModal .mce-modal-portrait-full .mceModalContentIframe{height:100%}.mceModal .mce-modal-square-small{max-width:384px}.mceModal .mce-modal-square-medium{max-width:512px}.mceModal .mce-modal-square-large{max-width:640px}.mceModal .mce-modal-square-xlarge{max-width:896px}.mceModal .mce-modal-square-large .mceModalContentIframe,.mceModal .mce-modal-square-medium .mceModalContentIframe,.mceModal .mce-modal-square-small .mceModalContentIframe,.mceModal .mce-modal-square-xlarge .mceModalContentIframe{padding-bottom:calc(83.46% - 48px)}.mceModalBody .mceModalContent input[type=text],.mceModalBody .mceModalContent input[type=number],.mceModalBody .mceModalContent select,.mceModalBody .mceModalContent textarea{height:32px;width:100%;padding:4px;border:1px solid #ddd;background:#fff;color:#444;border-radius:2px;box-shadow:inherit;margin:inherit;line-height:1;font-size:inherit;font-size:14px}.mceModalBody .mceModalContent select{line-height:1.5}.mceModalBody .mceModalContent input[type]:disabled,.mceModalBody .mceModalContent select option:disabled,.mceModalBody .mceModalContent select:disabled,.mceModalBody .mceModalContent textarea:disabled{color:#888;background-color:#eee;cursor:not-allowed}.mceModalBody .mceModalContent button{min-width:32px;margin:0}.mceModalBody .mceModalContent textarea{height:auto;line-height:1.5;resize:vertical;white-space:pre-wrap}.mceModalBody .mceModalContent input[type]:focus,.mceModalBody .mceModalContent textarea:focus{border-color:#66afe9;outline:0;background-color:#f5fbfe;color:#444}.mceModalBody .mceModalContent input[type=radio]:focus{border-radius:100%}.mceModalBody .mceModalContent label{line-height:1.25;width:96px}.mceModalBody .mceModalContent .mceModalStack label{width:100%}.mceModalBody .mceModalContent input+label{display:inline-block}.mceModalBody .mceModalContent input[type=checkbox]+label{width:auto}.mceModalBody .mceModalContent input[disabled]+label{color:#888}.mceModalBody .mceModalContent .mceModalRow{display:flex;flex-wrap:wrap;align-items:center;gap:4px;min-height:32px}.mceModalBody .mceModalContent .mceModalControl{flex:1;margin:0;display:flex;align-items:center;gap:4px}.mceModalBody .mceModalContent .mceModalFlexNone{flex:inherit;display:flex}.mceModalBody .mceModalContent .mceModalControl button{margin-left:2px}.mceModalBody .mceListBox .mceOpen{min-width:24px}.mceModalBody .mceModalContent .mceModalControl iframe{position:relative;border:1px solid #ddd}.mceModalBody .mceModalContent .mceModalControlAppend input{padding-right:42px}.mceModalBody .mceModalContent .mceModalControlAppend input+span{position:absolute;right:4px;display:block;color:#888;font-size:14px;line-height:2rem}.mceModalBody .mceModalContent .mceModalControlAppend input+select{max-width:5em}.mceModalBody .mceModalContent p{margin:.5rem 0;font-size:14px;line-height:2rem}.mceModalBody .mceModalAlert .mceModalContent p,.mceModalBody .mceModalConfirm .mceModalContent p{margin:0;text-align:center}.mceModalBody .mceModalContent select:not([multiple]):not([size]){appearance:none;padding-right:20px;background-image:url("data:image/svg+xml;charset=UTF-8,%3Csvg%20width%3D%2224%22%20height%3D%2216%22%20viewBox%3D%220%200%2024%2016%22%20xmlns%3D%22http%3A%2F%2Fwww.w3.org%2F2000%2Fsvg%22%3E%0A%20%20%20%20%3Cpolygon%20fill%3D%22%23666%22%20points%3D%2212%201%209%206%2015%206%22%20%2F%3E%0A%20%20%20%20%3Cpolygon%20fill%3D%22%23666%22%20points%3D%2212%2013%209%208%2015%208%22%20%2F%3E%0A%3C%2Fsvg%3E%0A");background-repeat:no-repeat;background-position:100% 50%}.mceFlexLayout{display:flex;flex-wrap:wrap}.mceGridLayout{display:flex;flex-wrap:nowrap;gap:5px}.mceSizes{gap:20px}.mceSizes input{text-align:center}.mceSizes .mceSeparator{margin:0;width:64px;height:32px;background:0 0}.mceSizes .mceSeparator::after{content:"x";display:block;text-align:center;line-height:32px;font-size:1em}@media (max-height:640px){.mceModalBody .mceModalHeader{padding:4px 8px}.mceModalBody .mceModalContentIframe{height:calc(100% - 40px)}.mceModal .mce-modal-portrait-full{height:768px;min-height:calc(100vh - 20px)}}.mceModalContent .mceButton.mceButtonPicker,.mceModalContent .mceButton.mceButtonUpload,.mceModalContent .mceButton.mceClear{position:absolute;right:0;top:0;z-index:1;background:0 0;border-color:transparent;min-width:inherit;display:flex;align-items:center;justify-content:center}.mceModalContent .mceButton.mceClear:after{display:block;font-family:Arial,sans-serif;font-size:1.25em;font-weight:700;line-height:1;margin:0 2px 0 0;text-align:center;text-decoration:none;content:"\00d7";color:#666}.mceModalContent .mceButton.mceButtonPicker .mceIcon,.mceModalContent .mceButton.mceButtonUpload .mceIcon{color:#666}.mceModalContent .mceButton.mceButtonUpload .mceIcon{margin:25% auto}.mceModalBody .mceModalContent .mceFormControl .mceUrlBoxUpload[aria-busy=true]~.mceButtonUpload .mce_upload,.mceModalContent .mceButton.mceButtonUpload .mce_spinner{display:none}.mceForm,.mceFormRow,.mceModalBody .mceModalContent .mceFormControl .mceUrlBoxUpload[aria-busy=true]~.mceButtonUpload .mce_spinner{display:flex}.mceModalContent .mceButton.mceButtonPicker:hover,.mceModalContent .mceButton.mceButtonUpload:hover,.mceModalContent .mceButton.mceClear:hover{background-color:transparent;border-color:transparent;color:#444}.mceModalContent .mceButton.mceButtonPicker:hover .mceIcon,.mceModalContent .mceButton.mceButtonUpload:hover .mceIcon{color:#444}.mceModalContent .mceButton.mceButtonPicker+.mceButton.mceButtonUpload{right:32px}.mceModalBody .mceModalContent .mceFormControl .mceUrlBoxPicker,.mceModalBody .mceModalContent .mceFormControl .mceUrlBoxUpload{padding-right:32px}.mceModalBody .mceModalContent .mceFormControl .mceUrlBoxPicker.mceUrlBoxUpload{padding-right:64px}.mceModalBody .mceModalContent .mceFormControl .mceUrlBoxUploadHover{background-color:#eee}.mceModalContent .mceButton.mceButtonUpload{overflow:hidden}.mceModalContent .mceButton.mceButtonUpload input[type=file]{position:absolute;top:0;z-index:1;width:100%;height:100%;left:0;appearance:none;opacity:0;cursor:pointer;font-size:500px}.mceModalContent .mce-flex-25{flex-basis:25%}.mceModalContent .mce-flex-50{flex-basis:50%}.mceModalContent .mce-flex-75{flex-basis:75%}.mceForm{width:100%;height:100%;flex-direction:column;gap:4px}.mceFormRow{flex-direction:row;justify-content:start;align-items:flex-start;min-height:32px;width:100%}.mceRepeatable .mceRepeatableItem{flex-direction:row}.mceRepeatable .mceRepeatableItem .mceFormRow{gap:5px}.mceRepeatable .mceRepeatableItem .mceFormRow label{min-width:inherit}.mceRepeatableItem .mce_plus{display:none!important}.mceRepeatableItem .mce_trash,.mceRepeatableItem:first-child .mce_plus{display:inherit!important}.mceRepeatableItem:first-child .mce_trash{display:none!important}.mceFormControl{width:100%;position:relative;display:flex;align-items:center;gap:4px}.mceFormControl .mceListBox{width:100%}.mceFormControl .mceListBox .mceText{width:100%;align-self:flex-start}.mceForm .mceFormRow label{min-width:96px;padding:.5em 0}.mceFormControl .mceTextBox+.mceButton{position:absolute;right:0}.mceFormControl .mceListBox:focus .mceOpen,.mceFormControl .mceListBox:focus .mceText{border-color:#66afe9;background:#f5fbfe}.mceFormControl:has(.mceTextBoxDescription){flex-direction:column}.mceTooltip{position:relative;cursor:help;outline:0}.mceTooltip[data-title]::after{position:absolute;left:50%;bottom:100%;transform:translateX(-50%) translateY(-6px);padding:4px;border-radius:4px;background:#000;color:#fff;content:attr(data-title);white-space:normal;opacity:0;visibility:hidden;pointer-events:none;transition:opacity .15s ease,transform .15s ease;font-size:12px;text-align:center;width:200px}.mceTooltip:not([data-title])[title]::after{content:attr(title)}.mceTooltip::before{content:'';position:absolute;left:50%;bottom:100%;transform:translateX(-50%) translateY(0);border-left:6px solid transparent;border-right:6px solid transparent;border-top:6px solid #000;opacity:0;visibility:hidden;transition:opacity .15s ease}.mceTooltip:focus-visible::after,.mceTooltip:focus-visible::before,.mceTooltip:hover::after,.mceTooltip:hover::before{opacity:1;visibility:visible;z-index:100000}.mceTooltip.wrap::after{white-space:normal;max-width:260px;text-align:center}@media (prefers-reduced-motion:reduce){.mceTooltip::after,.mceTooltip::before{transition:none}}.sr-only{position:absolute;width:1px;height:1px;padding:0;margin:-1px;overflow:hidden;clip:rect(0,0,0,0);border:0}.mceModalBody input[type],.mceModalBody select,.mceModalBody textarea{box-sizing:border-box;margin:0;border-radius:0;font:inherit}.mceModalBody input[type=radio]:checked{background-image:url("data:image/svg+xml;charset=UTF-8,%3Csvg%20width%3D%2216%22%20height%3D%2216%22%20viewBox%3D%220%200%2016%2016%22%20xmlns%3D%22http%3A%2F%2Fwww.w3.org%2F2000%2Fsvg%22%3E%0A%20%20%20%20%3Ccircle%20fill%3D%22%23fff%22%20cx%3D%228%22%20cy%3D%228%22%20r%3D%222%22%20%2F%3E%0A%3C%2Fsvg%3E")}.mceModalBody input[type=checkbox]:checked{background-image:url("data:image/svg+xml;charset=UTF-8,%3Csvg%20width%3D%2214%22%20height%3D%2211%22%20viewBox%3D%220%200%2014%2011%22%20xmlns%3D%22http%3A%2F%2Fwww.w3.org%2F2000%2Fsvg%22%3E%0A%20%20%20%20%3Cpolygon%20fill%3D%22%23fff%22%20points%3D%2212%201%205%207.5%202%205%201%205.5%205%2010%2013%201.5%22%20%2F%3E%0A%3C%2Fsvg%3E%0A")}.mceModalBody input[type=checkbox]:indeterminate{background-image:url("data:image/svg+xml;charset=UTF-8,%3Csvg%20width%3D%2216%22%20height%3D%2216%22%20viewBox%3D%220%200%2016%2016%22%20xmlns%3D%22http%3A%2F%2Fwww.w3.org%2F2000%2Fsvg%22%3E%0A%20%20%20%20%3Crect%20fill%3D%22%23fff%22%20x%3D%223%22%20y%3D%228%22%20width%3D%2210%22%20height%3D%221%22%20%2F%3E%0A%3C%2Fsvg%3E")}.mceModalBody input[type=radio]:disabled:checked{background-image:url("data:image/svg+xml;charset=UTF-8,%3Csvg%20width%3D%2216%22%20height%3D%2216%22%20viewBox%3D%220%200%2016%2016%22%20xmlns%3D%22http%3A%2F%2Fwww.w3.org%2F2000%2Fsvg%22%3E%0A%20%20%20%20%3Ccircle%20fill%3D%22%23999%22%20cx%3D%228%22%20cy%3D%228%22%20r%3D%222%22%20%2F%3E%0A%3C%2Fsvg%3E")}.mceModalBody input[type=checkbox]:disabled:checked{background-image:url("data:image/svg+xml;charset=UTF-8,%3Csvg%20width%3D%2214%22%20height%3D%2211%22%20viewBox%3D%220%200%2014%2011%22%20xmlns%3D%22http%3A%2F%2Fwww.w3.org%2F2000%2Fsvg%22%3E%0A%20%20%20%20%3Cpolygon%20fill%3D%22%23999%22%20points%3D%2212%201%205%207.5%202%205%201%205.5%205%2010%2013%201.5%22%20%2F%3E%0A%3C%2Fsvg%3E%0A")}.mceModalBody input[type=checkbox]:disabled:indeterminate{background-image:url("data:image/svg+xml;charset=UTF-8,%3Csvg%20width%3D%2216%22%20height%3D%2216%22%20viewBox%3D%220%200%2016%2016%22%20xmlns%3D%22http%3A%2F%2Fwww.w3.org%2F2000%2Fsvg%22%3E%0A%20%20%20%20%3Crect%20fill%3D%22%23999%22%20x%3D%223%22%20y%3D%228%22%20width%3D%2210%22%20height%3D%221%22%20%2F%3E%0A%3C%2Fsvg%3E")}.mceModalBody input[type=radio]:checked,.mceModalBody input[type=checkbox]:checked,.mceModalBody input[type=checkbox]:indeterminate{background-color:#337ab7;border-color:transparent}.mceModalBody input[type=radio]:focus,.mceModalBody input[type=checkbox]:focus{border-color:#66afe9;outline:0}.mceModalBody input[type=radio]:checked:focus,.mceModalBody input[type=checkbox]:checked:focus,.mceModalBody input[type=checkbox]:indeterminate:focus{background-color:#0e6dcd}.mceModalBody input[type=radio]:checked:disabled,.mceModalBody input[type=checkbox]:checked:disabled,.mceModalBody input[type=checkbox]:indeterminate:disabled{background-color:#eee;border-color:#ddd}.mceModalBody input[type=radio]:not(:disabled),.mceModalBody input[type=checkbox]:not(:disabled){cursor:pointer}.mceModalBody input[type=radio],.mceModalBody input[type=checkbox]{display:inline-block;height:1em;width:1em;overflow:hidden;vertical-align:middle;appearance:none;background-color:#fff;background-repeat:no-repeat;background-position:50% 50%;border:1px solid #ccc;transition:.2s ease-in-out;transition-property:background-color,border;margin-right:8px}.mceModalBody input[type=checkbox]:checked::before,.mceModalBody input[type=checkbox]:indeterminate::before{content:""}.mceModalBody input[type=radio]:checked::before{content:"";display:none}.mceModalBody input[type=radio]{border-radius:50%}.mceModalBody input[type=checkbox]{border-radius:2px}tinymce/themes/advanced/skins/default/content.css000060400000046560152456167170016232 0ustar00body,html{margin:inherit;overflow:initial!important}html[dir]{height:inherit}html{color:#444;font-family:"Helvetica Neue",Helvetica,Arial,sans-serif;font-size:13px;background:#fff;caret-color:auto}body{font-family:inherit;font-size:1rem;background:inherit;color:inherit}.mceContentBody{height:inherit;min-height:calc(100vh - 10px);min-width:90%;padding:.5rem;display:block}.mceContentBody img{display:inline}.mceContentBody img[data-mce-selected]:not([data-mce-type]),.mceContentBody table[data-mce-selected]{outline:#1e88e5 solid 3px;outline:var(--mce-control-selection) solid 3px}.mceContentBody .mce-item-selected,.mceContentBody .mceSelected,.mceContentBody td[data-mce-selected],.mceContentBody tr[data-mce-selected]{background-color:#b4d7ff;background-color:var(--mce-control-selection-bg)}.mceContentBody .mce-resizehandle{position:absolute;box-sizing:border-box;background-color:#1e88e5;background-color:var(--mce-control-selection);width:10px;height:10px;z-index:10000;padding:0;margin:-1px}.mceContentBody .mce-resizehandle-ne{cursor:ne-resize;margin:-1px 1px}.mceContentBody .mce-resizehandle-se{cursor:se-resize;margin:1px}.mceContentBody .mce-resizehandle-nw{cursor:nw-resize}.mceContentBody .mce-resizehandle-sw{cursor:sw-resize;margin:1px -1px}.mceContentBody .mce-clonedresizable{position:absolute;outline:#000 dashed 1px;opacity:.5;z-index:10000}.mceContentBody .mce-resize-helper{background-color:#555;background-color:rgba(0,0,0,.75);border-radius:3px;border:1px;color:#fff;display:none;font-family:sans-serif;font-size:12px;white-space:nowrap;line-height:14px;margin:5px 10px;padding:5px;position:absolute;z-index:10001}.mceContentBody img::selection{background-color:#b4d4ff}.mceContentBody .mce-visual-caret{position:absolute;background-color:currentcolor}.mceContentBody .mce-visual-caret-hidden{display:none}.mceContentBody [data-mce-caret]{position:absolute;left:-1000px;right:auto;top:0;margin:0;padding:0}.mceContentBody .mce-offscreen-selection{position:absolute;left:-9999999999px;max-width:1000000px}.mceContentBody [contentEditable=false]:not([data-mce-object]){cursor:default;max-width:99.8%}.mceContentBody [contentEditable=true]{cursor:text}.mceContentBody [contentEditable=false][data-mce-selected]{outline:#2d8ac7 solid 2px;outline:var(--mce-control-selection) solid 2px}body.mceContentReset{background:#fff!important;color:#000!important}body.mceContentReset ::selection{background:#ccc;color:#000}body.mceContentReset a,body.mceContentReset a:link{color:#00E}body.mceContentReset a:visited{color:#551A8B}body.mceContentReset a:active{color:#E00}body.mceContentReset h1,body.mceContentReset h2,body.mceContentReset h3,body.mceContentReset h4,body.mceContentReset h5,body.mceContentReset h6,body.mceContentReset p,body.mceContentReset td,body.mceContentReset th{color:#000}body.mceContentReset[dir=ltr]{text-align:left!important}[data-mce-root]{display:block}h1{font-size:2em}h2{font-size:1.5em}h3{font-size:1.17em}h4{font-size:1em}h5{font-size:.83em}h6{font-size:.75em}.mce-item-table caption,.mce-item-table td,.mce-item-table tr,.mce-item-table:not([border]),.mce-item-visualaid{border:1px dashed #757575;border-color:var(--mce-guidelines);border-collapse:separate;border-spacing:1px}span.mce-item-nbsp,span.mce-item-shy{background-color:linear-gradient(to bottom,var(--mce-visualchars),var(--mce-visualchars))}span.mce-item-shy:after{content:"▪︎";color:var(--mce-guidelines)}span.mce-item-shy img{border:0}.mce-item-anchor,hr,img,table{cursor:default}table{width:100%}table td,table th{cursor:text}ins{border-bottom:1px solid green;text-decoration:none;color:green}del{color:red;text-decoration:line-through}cite{border-bottom:1px dashed #00f}acronym{border-bottom:1px dotted #CCC;cursor:help}abbr{border-bottom:1px dashed #CCC;cursor:help}img:-moz-broken{-moz-force-broken-image-icon:1;width:24px;height:24px}font[face=mceinline]{font-family:inherit!important}[contentEditable]:focus{outline:0}span[data-mce-type=bookmark],span[data-mce-type=caret]{font-size:0;line-height:0}pre.mcePreformatted{margin:0;padding:0}[_moz_editor_bogus_node]{display:none}.mce-match-marker{background-color:#aaa;color:#fff}.mce-match-marker-selected{background-color:#1e88e5;background-color:var(--mce-control-selection);color:#fff}figure{display:table;margin-block-start:inherit;margin-block-end:inherit;margin-inline-start:inherit;margin-inline-end:inherit}figure figcaption{display:block;caption-side:bottom}figure figcaption:empty::after{content:"...";text-align:center;display:inline-block;width:100%;color:#757575;color:var(--mce-guidelines);pointer-events:none}figure figcaption:empty[data-mce-empty]::after{content:attr(data-mce-empty)}.mceNonEditable{cursor:not-allowed;position:relative;padding:.25rem}.mceEditable{cursor:initial}[data-mce-selected=inline-boundary]{background-color:#b4d7ff}.mce-item-hidden-spellword{text-decoration-line:underline;text-decoration-style:wavy;text-decoration-color:red}.mce-item-hidden-grammar{text-decoration-line:underline;text-decoration-style:wavy;text-decoration-color:#add8e6}.mce-item-hidden-ins{border-bottom:1px solid green;text-decoration:none;color:green}.mce-item-hidden-del{color:red;text-decoration:line-through}.mceContentBody img:not([data-mce-selected]){padding-right:1pt}a.mce-item-anchor{width:11px!important;height:11px!important;background-image:url(img/anchor.svg);background-repeat:no-repeat;background-position:left center;background-size:12px;padding-left:14px;border:1px dashed #B4D4FF;text-decoration:none;font-weight:400;color:inherit;vertical-align:middle;-ms-user-select:all;-ms-user-modify:read-only;user-select:all;user-modify:read-only;-webkit-user-select:all;-webkit-user-modify:read-only;-moz-user-select:all;-moz-user-modify:read-only}a.mce-item-anchor::selection{background-color:#b4d4ff}a.mce-item-anchor.mce-item-selected{background-color:#b4d4ff}hr[class].mce-item-pagebreak,hr[class].mce-item-readmore{display:inline-block;padding:0 2px;margin:0;border:1px dashed #ccc;background-color:#fafafa;background-repeat:no-repeat;background-size:16px;background-position:center;height:20px;width:99%;font-size:0;line-height:0;letter-spacing:normal;word-spacing:normal;cursor:pointer;opacity:inherit}hr[class].mce-item-pagebreak.mce-item-selected,hr[class].mce-item-readmore.mce-item-selected{background-color:#d9edf7;border-color:#31708f}hr[class].mce-item-readmore{background-image:url(img/readmore.svg);clear:both}hr[class].mce-item-pagebreak{background-image:url(img/pagebreak.svg);clear:both}hr[class].mce-item-pagebreak:after{content:attr(title);color:#444;font-size:12px;line-height:20px;padding:0 5px;display:block;float:left}img.mce-object{border:1.5px dashed #707070}img.mce-object.mce-object-img{background-image:url(img/picture.svg);background-size:16px}.mceContentBody span[data-mce-code=php]:not([data-mce-type=placeholder]),.mceContentBody span[data-mce-code=shortcode]:not([data-mce-type=placeholder]){font-family:SFMono-Regular,Consolas,Liberation Mono,Menlo,monospace;font-size:14px;color:#444;background-color:#fafafa;background-color:var(--mce-placeholder);margin:2px 0;padding:2px;border:1px dashed #787679;border-color:var(--mce-guidelines);line-height:1;vertical-align:middle;max-width:inherit}.mceContentBody span[data-mce-code=php]:not([data-mce-type=placeholder]){background-color:#E2E4EF;color:#4F5B93}.mceContentBody div[data-mce-code],.mceContentBody pre[data-mce-code]{-webkit-font-smoothing:antialiased;-moz-osx-font-smoothing:grayscale;text-decoration:none;cursor:inherit;vertical-align:baseline;border-collapse:separate;text-align:left;box-sizing:border-box;float:none;outline:0;position:relative;-webkit-border-radius:0;-moz-border-radius:0;text-transform:inherit;font-style:normal;letter-spacing:normal;box-shadow:inherit;transition:inherit;border:1px solid #787679;border-color:var(--mce-guidelines);width:100%;min-height:2rem;border-radius:0;background-color:#fff;overflow-y:auto;padding:8px;white-space:pre-wrap;word-wrap:normal;word-break:normal;font-family:SFMono-Regular,Consolas,Liberation Mono,Menlo,monospace;font-size:14px;color:#444}.mceContentBody div[data-mce-code] textarea,.mceContentBody pre[data-mce-code] textarea{resize:none;width:100%;height:100%;border:none;background:0 0;padding:.5rem;font-family:SFMono-Regular,Consolas,Liberation Mono,Menlo,monospace;font-size:14px;color:#444;line-height:1}.mceContentBody div[data-mce-code] textarea:focus,.mceContentBody pre[data-mce-code] textarea:focus{outline:0}.mceContentBody div[data-mce-code].mce-code-toggle,.mceContentBody pre[data-mce-code].mce-code-toggle{height:28px;overflow:hidden}.mceContentBody.mceVisualBlocks div[data-mce-code],.mceContentBody.mceVisualBlocks pre[data-mce-code]{border:1px solid #787679;border-color:var(--mce-guidelines);padding:8px}.mceContentBody div[data-mce-code]:before,.mceContentBody pre[data-mce-code]:before{display:block;position:inherit;content:attr(data-mce-code);background-color:#fafafa;background-color:var(--mce-placeholder);padding:4px;line-height:1;width:4rem;text-align:center;left:-8px;top:-8px;font-family:-apple-systrem,BlinkMacSystremFont,"Segoe UI",Roboto,Oxygen-Sans,Ubuntu,Cantarell,"Helvetica Neue",Arial,sans-serif;font-size:10px;font-weight:700;color:#787679;color:var(--mce-guidelines)}.mceContentBody img[data-mce-code],img.mce-object{background-position:center;background-repeat:no-repeat;background-color:#fafafa}.mceContentBody div[data-mce-code]:after,.mceContentBody pre[data-mce-code]:after{font-size:1.5em;color:#787679;color:var(--mce-guidelines);padding:0;margin:0;line-height:1.5em;width:32px;height:32px;cursor:pointer;position:absolute;display:flex;align-items:center;justify-content:center;right:0;top:0;content:"\25B4"}.mceContentBody pre[data-mce-code=php]:before,.mceContentBody.mceVisualBlocks pre[data-mce-code=php]:before{color:#4F5B93;background-color:#E2E4EF}.mceContentBody pre[data-mce-code].mce-code-toggle:after{content:"\25BE";height:26px}.mceContentBody img[data-mce-code]{display:block;position:inherit;background-color:var(--mce-placeholder);width:2.5rem;height:1.5rem;margin:1px 0;cursor:pointer;box-sizing:border-box}.mceContentBody img[data-mce-code][data-mce-selected]{border:1px solid #39f;border-color:var(--mce-control-selection)}.mceContentBody img[data-mce-code=php]{display:inline-block;background-image:url(img/code/php.svg);background-color:#E2E4EF}.mceContentBody img[data-mce-code=style]{background-image:url(img/code/style.svg)}.mceContentBody img[data-mce-code=script]{background-image:url(img/code/script.svg)}.mceContentBody img[data-mce-code=xml]{background-image:url(img/code/xml.svg)}.mceContentBody span[data-mce-code=php],.mceContentBody span[data-mce-code=shortcode]{display:inline-block}.mceContentBody span[data-mce-code=php]:not([data-mce-type=placeholder]):before,.mceContentBody span[data-mce-code=shortcode]:not([data-mce-type=placeholder]):before{content:"";display:none}.mceContentBody.mceVisualBlocks pre[data-mce-code]:before{content:attr(data-mce-code);width:6em;padding:8px;font-size:10px;line-height:1;text-align:center;margin:0}.mceContentBody.mceVisualBlocks pre[data-mce-label]:before{content:attr(data-mce-label)}img.mce-object{outline:#ccc dashed 1.5px;border-color:var(--mce-guidelines);background-size:16px;background-color:var(--mce-placeholder)}img.mce-object.mce-object-generic{min-width:50px;min-height:50px}img.mce-object.mce-object-embed,img.mce-object.mce-object-generic,img.mce-object.mce-object-object{background-image:url(img/media/generic.svg)}img.mce-object.mce-object-shockwave{background-image:url(img/media/shockwave.svg)}img.mce-object.mce-object-flash{background-image:url(img/media/swf.svg)}img.mce-object.mce-object-quicktime{background-image:url(img/media/quicktime.svg)}img.mce-object.mce-object-divx,img.mce-object.mce-object-silverlight{background-image:url(img/media/video.svg)}img.mce-object.mce-object-pdf,img.mce-object[data-mce-p-type="application/pdf"]{background-image:url(img/media/pdf.svg)}img.mce-object[data-mce-p-data$=".doc"],img.mce-object[data-mce-p-data$=".docx"]{background-image:url(img/media/word.svg)}img.mce-object[data-mce-p-data$=".xls"],img.mce-object[data-mce-p-data$=".xlsx"]{background-image:url(img/media/excel.svg)}img.mce-object.mce-object-iframe{background-image:url(img/media/iframe.svg);background-size:256px}img.mce-object.mce-object-audio{background-image:url(img/media/audio.svg);min-width:300px;height:54px}img.mce-object.mce-object-audio.mce-object-agent-gecko{min-width:270px;height:40px}img.mce-object.mce-object-audio.mce-object-agent-safari{min-width:250px;height:31px}img.mce-object.mce-object-video{background-image:url(img/media/video.svg);background-size:16px}.mce-object-preview{background-color:#fafafa;background-color:var(--mce-placeholder);box-sizing:content-box;display:inline-block;position:relative;max-width:100%;height:auto;line-height:0;cursor:not-allowed;outline:initial!important;margin:0 2px;border:1px solid #ccc;border-color:var(--mce-guidelines);font-family:system-ui,-apple-system,"Segoe UI",Roboto,"Helvetica Neue",Arial,"Noto Sans",sans-serif,"Apple Color Emoji","Segoe UI Emoji","Segoe UI Symbol","Noto Color Emoji";font-size:12px}.mce-object-preview.mce-object-preview-center{display:block;margin:0 auto}.mce-object-preview.mce-object-preview-left{float:left}.mce-object-preview.mce-object-preview-right{float:right}.mce-object-preview[data-mce-selected]{border:2px solid #39f;border-color:var(--mce-control-selection);background-color:#fafafa;background-color:var(--mce-placeholder);outline:0!important}.mce-object-preview[data-mce-selected]::after{display:none}.mce-object-preview audio,.mce-object-preview iframe,.mce-object-preview video{z-index:5;width:100%;height:100%;border:0}.mce-object-preview::after{content:attr(aria-details);left:1px;top:calc(50% - 2em);position:absolute;color:#fff;background:rgba(0,0,0,.3);height:4em;width:calc(100% - 2px);line-height:4;text-align:center;z-index:1;box-sizing:border-box;pointer-events:none;display:flex;justify-content:center;align-items:center}.mce-object-preview audio.mce-object-audio{min-width:300px;height:54px}.mce-object-preview audio.mce-object-agent-gecko{min-width:270px;height:40px}.mce-object-preview audio.mce-object-agent-safari{min-width:250px;height:31px}.mce-object-preview.mce-object-audio::after{font-size:.75em;line-height:1}.mce-object-shim{background:url(data:image/gif;base64,R0lGODlhAQABAIAAAAAAAP///yH5BAEAAAAALAAAAAABAAEAAAIBRAA7) rgba(0,0,0,.5);height:100%;left:0;position:absolute;top:0;width:100%;z-index:1;display:block}[data-mce-object]{display:inline-block}[data-mce-selected].mce-object-preview:not(.mce-resizing) .mce-object-shim{display:none}.mce-item-hiddenspellword{background:url(../img/wline.gif) bottom left repeat-x;cursor:default}.mce-item-upload{border:1.5px dashed #ccc;border-color:var(--mce-guidelines);background-color:#fafafa;background-color:var(--mce-placeholder);background-repeat:no-repeat;background-position:center;max-width:600px;max-height:600px;display:inline-block}.mce-item-upload:after{content:"";display:block;border:.25rem solid rgba(0,0,0,.1);border-left-color:#888;border-radius:50%;width:32px;height:32px;animation:donut-spin 1.2s linear infinite;z-index:10001;position:absolute;top:50%;left:50%;margin:-16px 0 0 -16px;box-sizing:border-box}.mce-item-upload.mce-item-upload-marker{background-image:url(../img/picture.svg);background-repeat:no-repeat;background-size:24px;background-color:#fafafa;background-color:var(--mce-placeholder);min-width:240px;min-height:240px;max-width:100%;max-height:100%}.mce-item-upload.mce-item-upload-marker[data-progress]{background-image:none}.mce-item-upload.mce-item-upload-marker[data-progress]:before{content:attr(data-progress);display:block;width:32px;height:32px;z-index:10001;position:absolute;top:calc(50% - 16px);left:calc(50% - 16px);font-size:12px;text-align:center;line-height:32px;color:var(--mce-guidelines);font-family:apple-system,BlinkMacSystemFont,"Segoe UI",Roboto,Oxygen-Sans,Ubuntu,Cantarell,"Helvetica Neue",Arial,sans-serif}@keyframes donut-spin{0%{transform:rotate(0)}100%{transform:rotate(360deg)}}.mceVisualBlocks address,.mceVisualBlocks article,.mceVisualBlocks aside,.mceVisualBlocks blockquote,.mceVisualBlocks dd,.mceVisualBlocks details,.mceVisualBlocks div:not([class*=mce-]):not([class*=wf-]):not([data-mce-type]),.mceVisualBlocks dl,.mceVisualBlocks dt,.mceVisualBlocks figure,.mceVisualBlocks footer,.mceVisualBlocks h1,.mceVisualBlocks h2,.mceVisualBlocks h3,.mceVisualBlocks h4,.mceVisualBlocks h5,.mceVisualBlocks h6,.mceVisualBlocks header,.mceVisualBlocks main,.mceVisualBlocks nav,.mceVisualBlocks ol,.mceVisualBlocks p,.mceVisualBlocks pre:not([class*=language-]),.mceVisualBlocks section,.mceVisualBlocks summary,.mceVisualBlocks ul{margin:2px 0;padding:2px;border:1px dashed #787679;border-color:var(--mce-guidelines);box-sizing:border-box}.mceVisualBlocks figcaption{border:1px dashed #787679;border-color:var(--mce-guidelines);padding:5px;margin:2px 0}.mceVisualBlocks dd,.mceVisualBlocks dt{margin-bottom:2px}.mceVisualBlocks ol,.mceVisualBlocks ul{padding:5px 40px}.mceVisualBlocks address:before,.mceVisualBlocks article:before,.mceVisualBlocks aside:before,.mceVisualBlocks blockquote:before,.mceVisualBlocks dd:before,.mceVisualBlocks details:before,.mceVisualBlocks div:not([class*=mce-]):not([class*=wf-]):not([data-mce-type]):before,.mceVisualBlocks dl:before,.mceVisualBlocks dt:before,.mceVisualBlocks figure:before,.mceVisualBlocks footer:before,.mceVisualBlocks h1:before,.mceVisualBlocks h2:before,.mceVisualBlocks h3:before,.mceVisualBlocks h4:before,.mceVisualBlocks h5:before,.mceVisualBlocks h6:before,.mceVisualBlocks header:before,.mceVisualBlocks main:before,.mceVisualBlocks nav:before,.mceVisualBlocks ol:before,.mceVisualBlocks p:before,.mceVisualBlocks pre:not([class*=language-]):before,.mceVisualBlocks section:before,.mceVisualBlocks summary:before,.mceVisualBlocks ul:before{-webkit-font-smoothing:antialiased;-moz-osx-font-smoothing:grayscale;border:0;white-space:nowrap;text-decoration:none;cursor:inherit;vertical-align:baseline;border-collapse:separate;text-align:left;box-sizing:border-box;float:none;outline:0;position:relative;border-radius:0;-webkit-border-radius:0;-moz-border-radius:0;text-transform:inherit;font-style:normal;letter-spacing:normal;display:block;font-weight:700;font-size:7pt;color:#787679;color:var(--mce-guidelines);padding:4px 0;margin:2px 0;line-height:0;font-family:-apple-systrem,BlinkMacSystremFont,"Segoe UI",Roboto,Oxygen-Sans,Ubuntu,Cantarell,"Helvetica Neue",Arial,sans-serif;width:100%}.mceVisualBlocks p:before{content:"P"}.mceVisualBlocks h1:before{content:"H1"}.mceVisualBlocks h2:before{content:"H2"}.mceVisualBlocks h3:before{content:"H3"}.mceVisualBlocks h4:before{content:"H4"}.mceVisualBlocks h5:before{content:"H5"}.mceVisualBlocks h6:before{content:"H6"}.mceVisualBlocks div:not([class*=mce-]):not([class*=wf-]):not([data-mce-type]):before{content:"DIV"}.mceVisualBlocks section:before{content:"SECTION"}.mceVisualBlocks article:before{content:"ARTICLE"}.mceVisualBlocks header:before{content:"HEADER"}.mceVisualBlocks footer:before{content:"FOOTER"}.mceVisualBlocks nav:before{content:"NAV"}.mceVisualBlocks main:before{content:"MAIN"}.mceVisualBlocks details:before{content:"DETAILS"}.mceVisualBlocks summary:before{content:"SUMMARY"}.mceVisualBlocks blockquote:before{content:"BLOCKQUOTE"}.mceVisualBlocks pre:not([class*=language-]):before{content:"PRE"}.mceVisualBlocks ul:before{content:"UL";left:-38px}.mceVisualBlocks ol:before{content:"OL";left:-38px}.mceVisualBlocks dl:before{content:"DL"}.mceVisualBlocks dt:before{content:"DT"}.mceVisualBlocks dd:before{content:"DD"}.mceVisualBlocks address:before{content:"ADDRESS"}.mceVisualBlocks aside:before{content:"ASIDE"}.mceVisualBlocks figure:before{content:"FIGURE"}tinymce/themes/advanced/skins/default/ui_touch.css000060400000003612152456167170016366 0ustar00.mceDefaultSkinTouch .mceToolbar{background-color:#f5f5f5}.mceDefaultSkinTouch .mceLayout div:first-child,.mceDefaultSkinTouch .mceLayout div:last-child{background-color:#f5f5f5;border-color:#dcdcdc}.mceDefaultSkinTouch .mceIframeContainer{border-color:#dcdcdc}.mceDefaultSkinTouch .mceToolbar .mceButton{padding:9px;border-color:#dcdcdc;background-color:#fafafa}.mceDefaultSkinTouch .mceToolbar .mceListBox .mceText{line-height:40px;height:40px;border-color:#dcdcdc}.mceDefaultSkinTouch .mceToolbar .mceListBox .mceOpen,.mceDefaultSkinTouch .mceToolbar .mceSplitButton .mceOpen{height:40px;border-color:#dcdcdc;width:18px;background-color:#fafafa}.mceDefaultSkinTouch .mceToolbar .mceSplitButton .mceText{border-color:#dcdcdc;width:40px;height:40px;background-color:#fafafa}.mceDefaultSkinTouch .mceToolbar .mceListBox .mceOpen::after,.mceDefaultSkinTouch .mceToolbar .mceSplitButton .mceOpen::after{line-height:40px}.mceDefaultSkinTouch .mceToolbar .mceButtonActive,.mceDefaultSkinTouch .mceToolbar .mceButtonEnabled:hover,.mceDefaultSkinTouch .mceToolbar .mceButtonSelected{background-color:#E1F5FE;border-color:#81D4FA}.mceDefaultSkinTouch .mceToolbar .mceColorSplitMenu .mceMoreColors:hover{border-color:#81D4FA;background-color:#E1F5FE}.mceDefaultSkinTouch .mceToolbar .mceMenu .mceMenuItemActive,.mceDefaultSkinTouch .mceToolbar .mceMenu .mceMenuItemEnabled button:hover{background-color:#E1F5FE}.mceDefaultSkinTouch .mceToolbar .mceTableSplitMenu{width:135px}.mceDefaultSkinTouch .mceToolbar .mceTableSplitMenu table{padding:2px}.mceDefaultSkinTouch .mceToolbar .mceTableSplitMenu td{border-color:#dcdcdc}.mceDefaultSkinTouch .mceToolbar .mceTableSplitMenu .selected{background-color:#E1F5FE;border-color:#81D4FA}.mceDefaultSkinTouch .mceToolbar .mceSeparator{height:40px;background:#dcdcdc}.mceDefaultSkinTouch .mceSplitButtonDisabled .mceOpen:after{color:#dcdcdc}.mceDefaultSkinTouch .mceToolbar .mceTextBox{height:40px}tinymce/themes/advanced/skins/o2k7/content.css000060400000000107152456167170015353 0ustar00@import url(../default/content.css?v=7c1b5ae6239f4f3b8116c6316bce0db9);tinymce/themes/advanced/skins/o2k7/ui_silver.css000060400000005406152456167170015711 0ustar00.mceO2k7SkinSilver .mceLayout{border-left:1px solid #bbb;border-right:1px solid #bbb}.mceO2k7SkinSilver .mceIframeContainer{border-top:1px solid #bbb;border-bottom:1px solid #bbb}.mceO2k7SkinSilver .mceStatusbar,.mceO2k7SkinSilver .mceToolbar{background:#eee}.mceO2k7Skin .mceListBox,.mceO2k7SkinSilver .mceToolbarRow .mceButton,.mceO2k7SkinSilver .mceToolbarRow .mceButton.mceButtonDisabled:hover,.mceO2k7SkinSilver .mceToolbarRow .mceSplitButton{background:linear-gradient(to bottom,rgba(255,255,255,1) 0,rgba(221,221,221,1) 51%,rgba(255,255,255,1) 100%)}.mceO2k7SkinSilver.mceListBoxMenu .mceMenu{border-color:#bbb}.mceO2k7SkinSilver .mceToolbarRow .mceButton{border-color:#bbb #eee #bbb #bbb}.mceO2k7SkinSilver .mceToolbarRow .mceButton:active,.mceO2k7SkinSilver .mceToolbarRow .mceButton:hover,.mceO2k7SkinSilver .mceToolbarRow .mceButtonActive,.mceO2k7SkinSilver .mceToolbarRow .mceButtonSelected{border-color:#FFD24E}.mceO2k7SkinSilver .mceToolbarRow .mceButtonDisabled:hover{border-color:#bbb #eee #bbb #bbb}.mceO2k7Skin .mceLinkMenu .mceMenuHtml input,.mceO2k7SkinSilver .mcePanel,.mceO2k7SkinSilver .mcePanel::before,.mceO2k7SkinSilver .mceSeparator,.mceO2k7SkinSilver .mceToolbarEnd,.mceO2k7SkinSilver .mceToolbarRow .mceListBox .mceOpen,.mceO2k7SkinSilver .mceToolbarRow .mceListBox .mceText,.mceO2k7SkinSilver .mceToolbarRow .mceListBoxDisabled .mceListBox:hover .mceOpen,.mceO2k7SkinSilver .mceToolbarRow .mceListBoxDisabled .mceListBox:hover .mceText,.mceO2k7SkinSilver .mceToolbarRow .mceSplitButton .mceOpen,.mceO2k7SkinSilver .mceToolbarRow .mceSplitButton .mceText,.mceO2k7SkinSilver .mceToolbarRow .mceSplitButtonDisabled .mceSplitButton:hover .mceOpen,.mceO2k7SkinSilver .mceToolbarRow .mceSplitButtonDisabled .mceSplitButton:hover .mceText,.mceO2k7SkinSilver .mceToolbarRow .mceSplitButtonMenu,.mceO2k7SkinSilver .mceToolbarStart{border-color:#bbb}.mceO2k7SkinSilver .mceToolbarRow .mceToolbarItem:last-child .mceButton,.mceO2k7SkinSilver .mceToolbarRow .mceToolbarItem:last-child .mceButton:hover{border-right-width:1px;border-radius:0 2px 2px 0;border-right-color:#bbb}.mceO2k7SkinSilver .mceToolbarRow .mceToolbarItemEnd .mceButton,.mceO2k7SkinSilver .mceToolbarRow .mceToolbarItemEnd .mceSplitButton .mceOpen{border-right-color:#bbb}.mceO2k7SkinSilver .mceToolbarRow .mceToolbarItemStart .mceButton,.mceO2k7SkinSilver .mceToolbarRow .mceToolbarItemStart .mceSplitButton .mceText{border-left-color:#bbb}.mceO2k7SkinSilver .mceToolbarRow .mceToolbarItem:last-child .mceButton,.mceO2k7SkinSilver .mceToolbarRow .mceToolbarItem:last-child .mceButton:hover,.mceO2k7SkinSilver .mceToolbarRow>button:last-child,.mceO2k7SkinSilver .mceToolbarRow>button:last-child:hover{border-right-color:#bbb}.mceO2k7SkinSilver .mcePanel{background-color:#eee}.mceO2k7SkinSilver .mcePanel::before{background-color:#fff}tinymce/themes/advanced/skins/o2k7/ui.css000060400000014124152456167170014322 0ustar00.mceO2k7Skin .mceStatusbar,.mceO2k7Skin .mceToolbar{background:#E5EFFD}.mceO2k7Skin .mceLayout{border-left:1px solid #ABC6DD;border-right:1px solid #ABC6DD}.mceO2k7Skin .mceIframeContainer{border-top:1px solid #ABC6DD;border-bottom:1px solid #ABC6DD}.mceO2k7Skin .mceToolbarRow .mceToolbarItem{margin:1px 0;border:0;height:auto}.mceO2k7Skin .mceToolbarRow .mceListBox .mceOpen,.mceO2k7Skin .mceToolbarRow .mceListBox .mceText,.mceO2k7Skin .mceToolbarRow .mceSplitButton .mceOpen,.mceO2k7Skin .mceToolbarRow .mceSplitButton .mceText{border-radius:0;border-color:#9FBBE2}.mceO2k7Skin .mceToolbarRow .mceToolbarItem:last-child .mceButton:last-child,.mceO2k7Skin .mceToolbarRow .mceToolbarItem:last-child .mceButton:last-child:hover,.mceO2k7Skin .mceToolbarRow>button:last-child,.mceO2k7Skin .mceToolbarRow>div:last-child{border-right-width:1px;border-right-color:#9FBBE2;border-radius:0 2px 2px 0}.mceO2k7Skin .mceToolbarRow .mceToolbarItemListBox{margin:1px}.mceO2k7Skin.mceListBoxMenu .mceMenu{border-color:#ABC6DD}.mceO2k7Skin .mceToolbarItem{margin:1px -1px}.mceO2k7Skin .mceToolbarRow .mceButton{margin:0;border-left-width:0;border-color:#9FBBE2 #E0E9F6 #9FBBE2 #9FBBE2;border-radius:0;-moz-border-radius:0;-webkit-border-radius:0}.mceO2k7Skin .mceToolbarRow>button,.mceO2k7Skin .mceToolbarRow>div{margin:1px 0}.mceO2k7Skin .mceToolbarRow .mceButton,.mceO2k7Skin .mceToolbarRow .mceListBox,.mceO2k7Skin .mceToolbarRow .mceSplitButton{background:linear-gradient(to bottom,rgba(229,239,253,1) 0,rgba(193,212,238,1) 50%,rgba(229,239,253,1) 100%)}.mceO2k7Skin .mceToolbarRow .mceButton:active,.mceO2k7Skin .mceToolbarRow .mceButton:hover,.mceO2k7Skin .mceToolbarRow .mceButtonActive,.mceO2k7Skin .mceToolbarRow .mceButtonSelected{border-color:#FFD24E;background-color:#FFD24E;border-left-width:0}.mceO2k7Skin .mceToolbarRow .mceButton.mceButtonActive,.mceO2k7Skin .mceToolbarRow .mceButton.mceButtonSelected,.mceO2k7Skin .mceToolbarRow .mceButton:active,.mceO2k7Skin .mceToolbarRow .mceButton:hover,.mceO2k7Skin .mceToolbarRow .mceButtonEnabled:hover,.mceO2k7Skin .mceToolbarRow .mceSplitButton:active,.mceO2k7Skin .mceToolbarRow .mceSplitButtonSelected .mceSplitButton{background:linear-gradient(to bottom,rgba(254,246,202,1) 0,rgba(255,211,78,1) 50%,rgba(255,251,233,1) 100%)}.mceO2k7Skin .mceToolbarRow .mceButton.mceButtonDisabled:hover{background:linear-gradient(to bottom,rgba(229,239,253,1) 0,rgba(193,212,238,1) 50%,rgba(229,239,253,1) 100%)}.mceO2k7Skin .mceToolbarRow .mceSplitButton:hover .mceOpen,.mceO2k7Skin .mceToolbarRow .mceSplitButton:hover .mceText,.mceO2k7Skin .mceToolbarRow .mceSplitButtonSelected .mceSplitButton .mceOpen,.mceO2k7Skin .mceToolbarRow .mceSplitButtonSelected .mceSplitButton .mceText{background:linear-gradient(to bottom,rgba(254,246,202,1) 0,rgba(255,211,78,1) 50%,rgba(255,251,233,1) 100%);border-color:#FFD24E}.mceO2k7Skin .mceToolbarRow .mceListBox.mceListBoxSelected .mceOpen,.mceO2k7Skin .mceToolbarRow .mceListBox.mceListBoxSelected .mceText,.mceO2k7Skin .mceToolbarRow .mceListBox:hover .mceOpen,.mceO2k7Skin .mceToolbarRow .mceListBox:hover .mceText{border-color:#FFD24E}.mceO2k7Skin .mceToolbarRow .mceListBox.mceListBoxSelected .mceOpen,.mceO2k7Skin .mceToolbarRow .mceListBox:hover .mceOpen{background:linear-gradient(to bottom,rgba(254,246,202,1) 0,rgba(255,211,78,1) 50%,rgba(255,251,233,1) 100%)}.mceO2k7Skin .mceToolbarRow .mceSplitButtonDisabled .mceSplitButton:hover .mceOpen,.mceO2k7Skin .mceToolbarRow .mceSplitButtonDisabled .mceSplitButton:hover .mceText{background:inherit;border-color:#9FBBE2}.mceO2k7Skin .mceToolbarRow .mceListBoxDisabled .mceListBox:hover .mceOpen,.mceO2k7Skin .mceToolbarRow .mceListBoxDisabled .mceListBox:hover .mceText{border-color:#9FBBE2}.mceO2k7Skin .mceToolbarRow .mceListBoxDisabled .mceListBox:hover .mceOpen{background:inherit}.mceO2k7Skin .mceToolbarRow .mceToolbarItem:first-child{margin-left:2px;border-radius:2px 0 0 2px}.mceO2k7Skin .mceToolbarRow .mceToolbarItem:first-child .mceButton:first-child,.mceO2k7Skin .mceToolbarStart .mceToolbarItem:first-child .mceButton:first-child:hover{border-left-width:1px;border-radius:2px 0 0 2px}.mceO2k7Skin .mceToolbarRow>button:first-child,.mceO2k7Skin .mceToolbarRow>div:first-child{border-left-width:1px;margin-left:2px;border-radius:2px 0 0 2px}.mceO2k7Skin .mceToolbarRow .mceToolbarItemListBox+.mceToolbarItemListBox,.mceO2k7Skin .mceToolbarRow .mceToolbarItemStart{margin-left:1px}.mceO2k7Skin .mceToolbarRow .mceToolbarItem:last-child{border-radius:0 2px 2px 0}.mceO2k7Skin .mceToolbarRow .mceToolbarItemEnd{margin-right:1px}.mceO2k7Skin .mceToolbarRow .mceToolbarItemEnd .mceButton,.mceO2k7Skin .mceToolbarRow .mceToolbarItemEnd .mceSplitButton .mceOpen{border-right-color:#ABC6DD}.mceO2k7Skin .mceToolbarRow .mceToolbarItemEnd .mceSplitButton .mceOpen{border-right-width:1px}.mceO2k7Skin .mceToolbarRow .mceToolbarItemStart .mceButton,.mceO2k7Skin .mceToolbarRow .mceToolbarItemStart .mceSplitButton .mceText{border-left-color:#ABC6DD;border-left-width:1px}.mceO2k7Skin .mceSeparator{width:2px}.mceO2k7Skin .mceSeparator,.mceO2k7Skin .mceToolbarEnd,.mceO2k7Skin .mceToolbarStart{border-width:0 1px;border-style:solid;border-color:#9FBBE2;margin:0 0 0 -2px;height:32px;background:0 0}.mceO2k7Skin .mceToolbarEnd{border-left-width:1px;width:2px;border-right-width:0;box-sizing:border-box}.mceO2k7Skin .mceToolbarStart{border-width:0 0 0 1px;box-sizing:border-box}.mceO2k7Skin .mceToolbarRow .mceSplitButton .mceText{border-left-width:0}.mceO2k7Skin .mceToolbarRow .mceSplitButton button.mceAction{border-width:1px 0}.mceO2k7Skin .mceToolbarRow .mceListBox .mceOpen:hover{border-color:#FFD24E}.mceO2k7Skin .mceToolbarRow .mceSplitButtonMenu{border-color:#9FBBE2}.mceO2k7Skin .mceToolbarRow .mceSplitButton{margin:0}.mceO2k7Skin .mceToolbarRow .mceSplitButtonDisabled .mceAction{opacity:.3}.mceO2k7Skin .mcePanel{background-color:#E5EFFD;border-color:#ABC6DD;left:0}.mceO2k7Skin .mcePanel::before{background-color:#E5EFFD;border-color:#ABC6DD;height:5px;left:-1px;top:-5px}.mceO2k7Skin .mceToolbarRow .mceColorSplitMenu .mceMoreColors button:hover{border-color:#E0E9F6;background-color:#FFD24E}.mceO2k7Skin .mceLinkMenu .mceMenuHtml input{border-color:#9FBBE2;border-radius:2px 0 0 2px}tinymce/themes/advanced/skins/o2k7/ui_black.css000060400000006647152456167170015471 0ustar00.mceO2k7SkinBlack .mceLayout{border-left:1px solid #535353;border-right:1px solid #535353}.mceO2k7SkinBlack .mceIframeContainer{border-top:1px solid #535353;border-bottom:1px solid #535353}.mceO2k7SkinBlack .mceStatusbar,.mceO2k7SkinBlack .mceToolbar{background:#535353}.mceO2k7SkinBlack .mceLayout .mceFirst{border-top-color:#535353}.mceO2k7SkinBlack .mceLayout .mceLast{border-bottom-color:#535353}.mceO2k7SkinBlack .mceStatusbar .mcePathRow button,.mceO2k7SkinBlack .mceStatusbar .mcePathRow span,.mceO2k7SkinBlack .mceStatusbar div,.mceO2k7SkinBlack .mceWordCount .mceText{color:#fff}.mceO2k7SkinBlack.mceListBoxMenu .mceMenu{border-color:#535353}.mceO2k7SkinBlack .mceToolbarRow .mceButton,.mceO2k7SkinBlack .mceToolbarRow .mceButtonDisabled:hover{border-bottom-color:#989FA9;background:#535353;border-right-color:transparent;border-top-color:#CBCFD4}.mceO2k7SkinBlack .mceToolbarRow .mceButton,.mceO2k7SkinBlack .mceToolbarRow .mceButton.mceButtonDisabled:hover,.mceO2k7SkinBlack .mceToolbarRow .mceListBox .mceOpen,.mceO2k7SkinBlack .mceToolbarRow .mceSplitButton{background:linear-gradient(to bottom,rgba(203,207,212,1) 0,rgba(152,159,169,1) 100%)}.mceO2k7SkinBlack .mceToolbarRow .mceToolbarItem:first-child .mceButton,.mceO2k7SkinBlack .mceToolbarRow .mceToolbarItem:first-child .mceButton:hover{border-left-width:1px;border-radius:2px 0 0 2px;border-left-color:#B0B6BE}.mceO2k7SkinBlack .mceToolbarRow .mceToolbarItem:last-child .mceButton,.mceO2k7SkinBlack .mceToolbarRow .mceToolbarItem:last-child .mceButton:hover,.mceO2k7SkinBlack .mceToolbarRow>button:last-child,.mceO2k7SkinBlack .mceToolbarRow>button:last-child:hover{border-right-width:1px;border-radius:0 2px 2px 0;border-right-color:#B0B6BE}.mceO2k7SkinBlack .mceToolbarRow .mceToolbarItemEnd .mceButton,.mceO2k7SkinBlack .mceToolbarRow .mceToolbarItemEnd .mceSplitButton .mceOpen{border-right-color:#B0B6BE}.mceO2k7SkinBlack .mceToolbarRow .mceToolbarItemStart .mceButton,.mceO2k7SkinBlack .mceToolbarRow .mceToolbarItemStart .mceSplitButton .mceText{border-left-color:#B0B6BE}.mceO2k7SkinBlack .mceToolbarRow .mceListBoxDisabled .mceListBox:hover .mceOpen,.mceO2k7SkinBlack .mceToolbarRow .mceListBoxDisabled .mceListBox:hover .mceText,.mceO2k7SkinBlack .mceToolbarRow .mceSplitButtonDisabled .mceSplitButton:hover .mceOpen,.mceO2k7SkinBlack .mceToolbarRow .mceSplitButtonDisabled .mceSplitButton:hover .mceText{border-color:#CBCFD4 transparent #989FA9 #B0B6BE}.mceO2k7SkinBlack .mceToolbarRow .mceToolbarItem:last-child .mceButton:last-child,.mceO2k7SkinBlack .mceToolbarRow .mceToolbarItem:last-child .mceButton:last-child:hover{border-right-color:transparent}.mceO2k7SkinBlack .mceSeparator,.mceO2k7SkinBlack .mceToolbarEnd,.mceO2k7SkinBlack .mceToolbarStart{border-color:#B0B6BE;background:#535353}.mceO2k7SkinBlack .mceToolbarRow .mceSplitButton .mceOpen,.mceO2k7SkinBlack .mceToolbarRow .mceSplitButton .mceText{border-color:#CBCFD4 transparent #989FA9}.mceO2k7SkinBlack .mceToolbarRow .mceSplitButton .mceOpen{border-left-color:#B0B6BE}.mceO2k7SkinBlack .mceToolbarRow .mceListBox .mceOpen,.mceO2k7SkinBlack .mceToolbarRow .mceListBox .mceText{border-color:#B0B6BE}.mceO2k7SkinBlack .mceToolbarRow .mceSplitButtonMenu{border-color:#535353}.mceO2k7SkinBlack .mcePanel{background-color:#535353;border-color:#535353}.mceO2k7SkinBlack .mcePanel::before{background-color:#B0B6BE;border-color:#535353}.mceO2k7Skin .mceSplitButtonMenu{border-color:#535353}.mceO2k7Skin .mceLinkMenu .mceMenuHtml input{border-color:#989FA9}tinymce/themes/advanced/skins/o2k7/ui.admin.css000060400000007165152456167170015420 0ustar00@import url(ui.css?v=7c1b5ae6239f4f3b8116c6316bce0db9);@import url(ui_silver.css?v=7c1b5ae6239f4f3b8116c6316bce0db9);@import url(ui_black.css?v=7c1b5ae6239f4f3b8116c6316bce0db9);.mceO2k7Skin .mceToolbar{border:0}.mceO2k7Skin .mceLayout,.mceO2k7Skin .mceLayout .mceToolbar{border:0!important;background:#fff}.mceO2k7Skin .mceToolbarItem div{display:inline-block}.mceO2k7Skin .mceToolbarItem .mceListBox,.mceO2k7Skin .mceToolbarItem .mceSplitButton{border:1px solid #ABC6DD;box-sizing:border-box;border-radius:0;position:relative;cursor:move}.mceO2k7Skin .mceToolbarItem .mceListBox{width:94px;border-radius:2px}.mceO2k7Skin .mceToolbarItem .mceSplitButton{width:42px;padding:5px 2px;border-left-width:0}.mceO2k7Skin .mceToolbarItem .mceSplitButton .mceIcon{margin:0}.mceO2k7Skin .mceToolbarItemStart .mceSplitButton{border-left-width:1px}.mceO2k7Skin .mceToolbarItemEnd .mceSplitButton{border-right-width:1px;border-right-color:#E5EFFD}.mceO2k7Skin .mceToolbarItem .mceSplitButton+.mceSplitButton{margin-left:0;border-left-width:0}.mceO2k7Skin .mceToolbarRow .mceToolbarItem .mceButton+.mceButton{border-left-width:0}.mceO2k7Skin .mceToolbarItem .mceListBox .mceIcon{width:76px;height:auto}.mceO2k7Skin .mceToolbarItem .mceListBox .mceIcon:before{display:inline-block;background:#fff;font-size:12px;width:76px;line-height:24px;padding:0 3px;box-sizing:border-box}.mceO2k7Skin .mceToolbarItem .mceListBox:after,.mceO2k7Skin .mceToolbarItem .mceSplitButton:after{display:block;position:absolute;right:0;top:0;border-left:1px solid #ABC6DD}.mceO2k7Skin .mceToolbarItem .mceSplitButton:after{line-height:30px}.mceO2k7Skin .mceLayout .mceStatusbar{border:1px solid #ABC6DD;border-top-width:0}.mceO2k7Skin .mceLayout .mceLast{border-color:#ABC6DD}.mceO2k7Skin .mceLayout .mceIframeContainer{background:#fff;width:100%;position:relative;padding:5px;box-sizing:border-box;white-space:pre-line;border:1px solid #ABC6DD;margin:0}.mceO2k7Skin .mceLayout .mceToolbarRow{background-color:#E5EFFD;border-color:#ABC6DD}.mceO2k7Skin .mceToolbarItem .mceListBox:after,.mceO2k7Skin .mceToolbarItem .mceSplitButton:after{background:linear-gradient(to bottom,rgba(229,239,253,1) 0,rgba(193,212,238,1) 50%,rgba(229,239,253,1) 100%)}.mceO2k7Skin.mceO2k7SkinSilver .mceToolbarItem .mceListBox,.mceO2k7Skin.mceO2k7SkinSilver .mceToolbarItem .mceSplitButton{border-color:#bbb}.mceO2k7Skin.mceO2k7SkinSilver .mceToolbarItem .mceListBox:after,.mceO2k7Skin.mceO2k7SkinSilver .mceToolbarItem .mceSplitButton:after{border-color:#bbb;background:linear-gradient(to bottom,rgba(255,255,255,1) 0,rgba(221,221,221,1) 51%,rgba(255,255,255,1) 100%)}.mceO2k7Skin.mceO2k7SkinSilver .mceLayout .mceIframeContainer,.mceO2k7Skin.mceO2k7SkinSilver .mceLayout .mceLast,.mceO2k7Skin.mceO2k7SkinSilver .mceLayout .mceStatusbar{border-color:#bbb}.mceO2k7SkinSilver .mceLayout .mceToolbarRow{background-color:#eee;border-color:#bbb}.mceO2k7Skin.mceO2k7SkinBlack .mceToolbarItem .mceListBox,.mceO2k7Skin.mceO2k7SkinBlack .mceToolbarItem .mceSplitButton{border-color:#B0B6BE}.mceO2k7Skin.mceO2k7SkinBlack .mceToolbarItem .mceListBox:after,.mceO2k7Skin.mceO2k7SkinBlack .mceToolbarItem .mceSplitButton:after{border-color:#535353;background:linear-gradient(to bottom,rgba(203,207,212,1) 0,rgba(152,159,169,1) 100%)}.mceO2k7Skin.mceO2k7SkinBlack .mceLayout .mceIframeContainer,.mceO2k7Skin.mceO2k7SkinBlack .mceLayout .mceLast,.mceO2k7Skin.mceO2k7SkinBlack .mceLayout .mceStatusbar{border-color:#535353}.mceO2k7SkinBlack .mceLayout .mceToolbarRow{background-color:#535353;border-color:#535353}.mceO2k7SkinBlack .mceToolbarItem.sortableRowItem.ui-sortable-highlight{border-color:#fff}.mceEditor .mceToolbar .mceToolbarItem .mceListBox:before{display:block}tinymce/themes/advanced/skins/o2k7/img/button_bg_black.png000060400000001134152456167170017571 0ustar00�PNG


IHDRXB���PLTESSSrv|�����������������������������������Ļ�ƻ�Ǽ�Ⱦ�ɿ�����������������������?��M��P��T��W��[��^��b��e��i��m��r��v��{�ǀ�Ʉ�ˉ�͎��u��z���߄����������������������8yO�tRNS@��fAIDATX�햱
�0���$�8HA_@|~�����M��&mMR����u�j������A�J�>!�\5ͦ�RH��"(vw���'�'�(i ��#odĦ+m"�[S��5��Ķ*��1�zp#�(��L�C7��c}7ycK��蓯�)������e&@�,���#+(B+�g�K��H3������'C��h]<��~��bE+Ŏv?f�d2�ʸ����hC|��⛥T~zPŖ��ΥD&�Ax�����P�Pg��9"q7�b7�n��ȷqoe*D�q�M��o���&7�jEĽ���IEND�B`�tinymce/themes/advanced/skins/o2k7/img/button_bg.png000060400000004530152456167170016440 0ustar00�PNG


IHDRXB���	IDATx�͛�o����~���<�E��$H�m�-P-P5uѴ�K�}0���@�
�vmʱ%��dQ�(R�-Q��H����2��pƳ���ȗ3s�p)|.w�$��gj4=+�x�*"r��:��ͪ����P>:�i���l]z������oܯP���_��uJ�j��j[D̫�g�G뇡�2�J0OEpq�Eq���9��]���u!$GƵyemn�A�Q���?����`�]qX�;�n�0�
�o4%�e�sΘG�W<�`�\y��<��-��j��,�v���}p1�-�`��qw�K�Y.��8��\0��|0VA^��K�<|�S�~�x�٦8���΂+�C�'�I��m�T����L�h�Ҥ�-��?�R|J1�9.7��k�9��Ȝ��#ȅ�P���w)�C���7p���+�R
�%s�W;x+��/w)ۇC߂���_~�8!�qn��5p!/r<����/!bqy�����^��T�Z���5}����G���;%\��gq�fv����S�x��:�;X�&�}�����5�l8.nwϡ���cc�|��Ȼ�s����0�̂S;�-P)1��
��৕v)���FC#�Q$���*_�`!�"N��!�^� W�%��#�E�a|�I�#���b����G�(5X�Wr���`|�qx^w>㹊� ��¢c��P��q~�)!z������W�]̂!�aI���ƈ�湚�;����4�_�#���G�-�rl�q�8��"𵑏B1O�iZ��P������`~\���r.��e�tw7W�" V��Þ� ����;���	.3uc��2��9'�<�����Þ'�.� ��\0�`�P �HwcI�Xp�C��k�C������j�ⰲs���h�\0��p����#��5`���P/�<c�~x����+�L�l���
ӳ��:�]�.�}�A1ɦ��e�EF�\v��{,�$UY�5������w��)�S
���w�x��1�]�<y����hܳ��U��.Kq�QoYF�[����˨#��<���_j@"��Ẑ!W�
X��#�rU�\�<<��&���Z�Ʃ�3�g��� 2x�$��\�y��	�C�VP�Lp)f��m�f��G9Ĥ���(��|+�K&��`|퇍;4ػM����@_��s��+���Ψ�.����8�ָ��2U���:V�	������A2��;q0�׹_�t���uS��
�U���L��=��`	��uc�e��"��t�_��+����莍��z�A�w,�(�*R���,Q�e�k�q������KPk\�bYi\�LJ�,_��]�;��|2��}��w>��3�5�"��]j��9���C��(0��'�~Q�,x��1�����K�9�>�
��3��間	.�$V�w��G���Qk�N��.�vW�Z�`\R��R~�(�r�QE="@Λ�֗D'vz�l�� (}��]���!<�D�x
y��&_�v�ʸ��@�Q�7q@�^0�o/0��lyo��Š���d�i��8��|'�*
@h��D=)x,�q�౬��c����Z�`�;3Ӧ�nݣ�\!���>Hp�h��$�5���3`��y��<�>+�]��Nn�(8�2����V���*o��a�c���	���l���7��$���ׁ?�s_ۮ�o.�nћ� 2��߮�����r6��[4X�M��1�1�
���_��7`��d#��N����P�s�p��ky<�Y���FF������v���y+ԫd#x��DOE��_cL5�5ς�cu��N)��G��8�{O�)5�A��]��`��,�b6��7�������c~m4��k�h����Qk1{��l�<n�+x纍�l>�F�机�u9�]��om�W��{���`�-�|�d�c%�������Y�d�7{���(��C���(���<v�߮��e�;��l�Ղ�!?z4�!�oW�p%
�N��ײl�5ǽ;��˱��v��o�3����ɾ���_�y{�*��m��'�F�,	c���*�޳��όso-�k�'�m/��v�7~a��YF7{���7B}5sD�$��1׌d
�^�5��k����`)H'��x�Hce
;�kW�:eu	f1�j�c^��g%x������sW��3���i�-"����"�췫�����V�_c�s�s�4G-翶]e��i�F���IEND�B`�tinymce/themes/advanced/skins/o2k7/img/button_bg_silver.png000060400000004016152456167170020023 0ustar00�PNG


IHDRXB����IDATx���sSE������;�R.�Q��A�QG�q��(~�t@��p�0v䣠��h�ib�&M��-is�z~Y��.�9{α݃ڎ�����yH�IVw�?^FFF�ٵ�`�۲����5��?�n���?�g��<??/[�/�Y��Yp��=
&��dG����8><l<!�I���<��v�S�sssbӱjD�"8þ�
v���\�ץVS����#T�s��~D�c��G���z�x�ÇY���k�(X_;�������e)��R咔��KQ�zr�c��ǢG��E0�_�YD�)qOYc]�k�[[{B_�`C�A��DP��)�z,�"��E p���"�����jM>w�`�	e	ʏPC��r��5�p΋`��'0�1�`^��b���
���� bz:�(��(���6�5��E���ܟ�g��$�u��T=�
�V�����+������f���ы`����]1���_V����1H���m�%��F�(X�[���!��gSg�uQ��i�<�hH�1#����P9hDcΡO�7@4V=���q>>*c?��5��8�Q��V�P�sz>B��~Tn���j���l!Z���4�U�5/���$�{�*�k4�<*�|��v�-&�\t�{���%��l��i�N�ѷ��1�AOg����}tt����e��:gͼ~�92*��h[=�斊�?c��z?\w)�� ^0&����۲������
�ݦ�{��9g�B�3�xB�����/f)YH��-����ґ��K��ʠ�h�>���/��A�%�WMC�`��bCJJ�-W�)�o���ϻ	�܍�Ҁ�x����屈+d�yxU����:r?�{K�����<��d�x��Fe}~1?��/�}�	��	�HC�`�گϞ����FD�s��s�yFր?�݆��Bv�x�Y�%
�M|o�i�M��s��q�n�;�/�MC�`�:wk�-��'����O�j�f�]�`���9�MDº�\�co�?
�s�{='ng����IPנ7^pX���bE�DZ9�(x�^5`L���c��
{m�5�M\�,�4�[�G���_�@�D��Kp�-2��pm5&�,Z0_����:�أ�R$p���򝜂`m�I��~�+��/�O��5D�
�?���\��f��O��[iH-d�:z�
^�7�f5�.�vw����qK�:IyQ�c��Թ�L�~D������ܿ�f�R�`|0��#�G��b�Q��>Ρ�/���4�߭�</|���Ƨ�0�ؠᨹ�^�;��n��|�iա4�7��\��1���_��V��.�t��"��Ӏ�d����u|
��*Ӌ��!$�m�o�Df�Ӏ��##~���/"k���;2��E�9���zKY(�г�S��=�N͕�����|Ɯ���T�?���e+�0�����*�O4�Q�൩Ӳv�̀.r���n�>ݣ�(�����$p�,��H��
d�[k�F5����x�s�N5
|�l1��T9�?�DV���}_��ʯ�1���<
^Lu�.O'�wy����f�/�α�W���$\�(N�= �1T�����FD��#���I'�{7
l	�9N�	��p��'8F`R�~�5��7�<�$�+�G���+��EG�FLf$��>_��h��>����J��k��	{�g��J�w�|s7�ɯY�'�w&�[w��e�`���{ תՎ'8�
X5��1��s
{;U����S(�n1gk�܍��}9�
�v���>73��	�Y��s��Tyꀛ�w
�ٚyֆ�u�
x�Y�;U����ٓ~�h}!�엂��j����s����=���M[���X��cq���'	�ǦT�sx�;U�9A_q�)��UM��9g�!xwI�?,@.O�ko��ޑ�_*]�1�h`�B��S��5ގ�v�W����@���%IEND�B`�tinymce/themes/advanced/skins/modern/ui_touch.css000060400000001475152456167170016233 0ustar00.mceModernSkinTouch .mceToolbar .mceListBox .mceText,.mceModernSkinTouch .mceToolbar .mceSourceSearch .mceTextBox{line-height:40px;height:40px}.mceModernSkinTouch .mceToolbar .mceButton{padding:9px 11px}.mceModernSkinTouch .mceToolbar .mceListBox .mceOpen,.mceModernSkinTouch .mceToolbar .mceSplitButton .mceOpen{height:40px;width:20px}.mceModernSkinTouch .mceToolbar .mceSplitButton .mceText{height:40px}.mceModernSkinTouch .mceToolbar .mceSplitButtonMenu::before{width:42px;top:-4px}.mceModernSkinTouch .mceToolbar .mcePanelSplitButton .mcePanel::before{width:50px;top:-7px}.mceModernSkinTouch .mceToolbar .mceTableSplitMenu{width:135px}.mceModernSkinTouch .mceToolbar .mceTableSplitMenu table{padding:2px}.mceModernSkinTouch .mceToolbar .mceSeparator{height:40px}.mceModernSkinTouch .mceButton span.mce_visualblocks{left:-1px}tinymce/themes/advanced/skins/modern/ui_dark.css000060400000021150152456167170016022 0ustar00@media (prefers-color-scheme:dark){body.admin .mceModernSkin{--wfe-bg:var(--template-bg-dark-90, #2B3035);--wfe-color:var(--body-color, #dee2e6);--wfe-modal-bg:var(--body-bg, #212529)}}.mceModernSkin{--wfe-bg:#2B3035;--wfe-bg-active:rgba(255, 255, 255, 0.2);--wfe-bg-hover:rgba(255, 255, 255, 0.1);--wfe-border-color:#444;--wfe-color:#dee2e6;--wfe-color-light:#fff;--wfe-modal-bg:#212529;--wfe-modal-border-color:rgba(255, 255, 255, 0.15);--wfe-modal-input-focus:#86b7fe}.mceModernSkin.mceModal .mceLoading .mceModalContent:before{background-color:var(--wfe-modal-bg)}.mceModernSkin .mce_spinner:before{border-color:var(--wfe-color)}.mceModernSkin .mceLayout,.mceModernSkin .mceStatusbar,.mceModernSkin .mceToolbar{border-color:var(--wfe-border-color)}.mceModernSkin .mceToolbar{background:var(--wfe-bg)}.mceModernSkin .mceToolbar.mceDisabled{background:rgba(0,0,0,.5)}.mceModernSkin .mceStatusbar{background:var(--wfe-bg);color:var(--wfe-color)}.mceModernSkin .mceButton .mceIcon,.mceModernSkin .mceStatusbar .mcePathLabel,.mceModernSkin .mceStatusbar .mcePathPath .mceText,.mceModernSkin .mceStatusbar .mcePathPath a:after,.mceModernSkin .mceStatusbar .mceResize span,.mceModernSkin .mceStatusbar .mceWordCount .mceText{color:var(--wfe-color)}.mceModernSkin .mceButton:focus,.mceModernSkin .mceButton:hover{border-color:transparent;background-color:var(--wfe-bg-hover);color:var(--wfe-color)}.mceModernSkin .mceButton span.mce_style:after{color:rgba(255,255,255,.3)}.mceModernSkin .mceButtonActive,.mceModernSkin .mceButtonSelected,.mceModernSkin .mcePanelButtonActive{border-color:var(--wfe-border-color);background-color:var(--wfe-bg-active)}.mceModernSkin .mceSplitButton .mceAction{color:var(--wfe-color)}.mceModernSkin .mceSplitButton .mceAction.mce_backcolor{color:var(--wfe-color-light);background-color:var(--wfe-bg-active)}.mceModernSkin .mceSplitButton .mceOpen{background-color:var(--wfe-bg);color:var(--wfe-color)}.mceModernSkin .mceSplitButton .mceOpen:after{color:var(--wfe-color)}.mceModernSkin .mceSplitButton:focus .mceOpen,.mceModernSkin .mceSplitButton:focus .mceText,.mceModernSkin .mceSplitButton:hover .mceOpen,.mceModernSkin .mceSplitButton:hover .mceText{border-color:var(--wfe-border-color);background-color:var(--wfe-bg-hover)}.mceModernSkin .mceListBox .mceComboBox .mceButton,.mceModernSkin.mceListBoxMenu .mceMenuFilter .mceButton{background-color:var(--wfe-bg-hover);color:var(--wfe-color)}.mceModernSkin .mceListBox .mceComboBox .mceButton label,.mceModernSkin .mceListBox .mceComboBox .mceButton:after,.mceModernSkin.mceListBoxMenu .mceMenuFilter .mceButton label,.mceModernSkin.mceListBoxMenu .mceMenuFilter .mceButton:after{color:var(--wfe-color)}.mceModernSkin .mceTextBox{border-color:var(--wfe-border-color);color:var(--wfe-color);background-color:var(--wfe-bg)}.mceModernSkin .mceTextBox:focus{background-color:var(--wfe-bg);color:var(--wfe-color);border-color:var(--wfe-modal-input-focus)}.mceModernSkin .mceListBox .mceButton,.mceModernSkin .mceListBox .mceOpen,.mceModernSkin .mceListBox .mceText{border-color:var(--wfe-border-color);background-color:var(--wfe-bg);color:var(--wfe-color)}.mceModernSkin .mceListBox .mceOpen:after{color:var(--wfe-color);background-image:none}.mceModernSkin .mceListBox:focus .mceOpen,.mceModernSkin .mceListBox:focus .mceText,.mceModernSkin .mceListBox:hover .mceOpen,.mceModernSkin .mceListBox:hover .mceText{border-color:transparent;background-color:var(--wfe-bg-hover)}.mceModernSkin.mceListBoxMenu{background-color:var(--wfe-bg);border-color:var(--wfe-border-color);color:var(--wfe-color)}.mceModernSkin.mceListBoxMenu .mceMenuItems .mceMenuItem .mceIcon,.mceModernSkin.mceListBoxMenu .mceMenuItems .mceMenuItem .mceText,.mceModernSkin.mceListBoxMenu .mceMenuItems .mceMenuItem:before{color:var(--wfe-color)}.mceModernSkin.mceListBoxMenu .mceMenuItems .mceMenuItem:hover{background-color:var(--wfe-bg-hover)}.mceModernSkin.mceListBoxMenu .mceMenuItems .mceMenuItem.mceMenuItemActive{background-color:var(--wfe-bg-active)}.mceModernSkin.mceListBoxMenu .mceMenuFilter{border-color:var(--wfe-border-color)}.mceModernSkin.mceListBoxMenu .mceMenuFilter input{background-color:var(--wfe-bg);color:var(--wfe-color)}.mceModernSkin.mceListBoxMenu.mceFormatListMenu .mceMenuItems,.mceModernSkin.mceListBoxMenu.mceStylesBoxMenu .mceMenuItems,.mceModernSkin.mceListBoxMenu.mceStylesListMenu .mceMenuItems{background-color:#fff}.mceModernSkin.mceListBoxMenu.mceFormatListMenu .mceMenuItems .mceMenuItem:hover,.mceModernSkin.mceListBoxMenu.mceStylesBoxMenu .mceMenuItems .mceMenuItem:hover,.mceModernSkin.mceListBoxMenu.mceStylesListMenu .mceMenuItems .mceMenuItem:hover{background-color:#eee}.mceModernSkin.mceSplitButtonMenu{background-color:var(--wfe-bg);border-color:var(--wfe-border-color);color:var(--wfe-color)}.mceModernSkin.mceSplitButtonMenu .mceMenuItems .mceSelected{background-color:var(--wfe-bg-active)}.mceModernSkin.mceMenu .mceMenuItems .mceMenuHtml input[type=text],.mceModernSkin.mceMenu .mceMenuItems .mceMenuHtml select,.mceModernSkin.mceMenu .mceMenuItems .mceMenuHtml textarea{border-color:var(--wfe-border-color);background-color:var(--wfe-bg);color:var(--wfe-color)}.mceModernSkin.mceMenu .mceMenuItems .mceMenuHtml:hover{background-color:transparent}.mceModernSkin.mceMenu .mceMenuItems .mceMenuItem .mceIcon,.mceModernSkin.mceMenu .mceMenuItems .mceMenuItem .mceText{color:var(--wfe-color)}.mceModernSkin.mceMenu .mceMenuItems .mceMenuItemEnabled:hover{background-color:var(--wfe-bg-hover)}.mceModernSkin .mceListBoxSelected::after,.mceModernSkin .mceSplitButtonSelected .mceOpen,.mceModernSkin .mceSplitButtonSelected .mceText,.mceModernSkin .mceSplitButtonSelected:after,.mceModernSkin .mceSplitButtonSelected:hover .mceText{background-color:var(--wfe-bg);border-color:var(--wfe-border-color)}.mceModernSkin span.mce_visualblocks:before{border-color:var(--wfe-border-color)}.mceModernSkin .mceTableSplitMenu{background-color:var(--wfe-bg);border-color:var(--wfe-border-color);color:var(--wfe-color)}.mceModernSkin .mceTableSplitMenu td{background-color:var(--wfe-bg)}.mceModernSkin .mceTableSplitMenu td a{border-color:var(--wfe-border-color)}.mceModernSkin .mceTableSplitMenu td.selected a{border-color:var(--wfe-border-color);background-color:var(--wfe-bg-active)}.mceModernSkin .mceTableSplitMenu .mceTableGridCount{background-color:var(--wfe-bg);color:var(--wfe-color)}.mceModernSkin.mceModal .mceModalBody .mceModalContent,.mceModernSkin.mceModal .mceModalBody .mceModalFooter,.mceModernSkin.mceModal .mceModalBody .mceModalHeader{background-color:var(--wfe-modal-bg);color:var(--wfe-color)}.mceModernSkin.mceModal .mceModalBody .mceModalContent *,.mceModernSkin.mceModal .mceModalBody .mceModalFooter *,.mceModernSkin.mceModal .mceModalBody .mceModalHeader *{color:var(--wfe-color)}.mceModernSkin.mceModal .mceModalBody .mceModalContent input[type],.mceModernSkin.mceModal .mceModalBody .mceModalContent select,.mceModernSkin.mceModal .mceModalBody .mceModalContent textarea{border-color:var(--wfe-border-color);background-color:var(--wfe-modal-bg);color:var(--wfe-color)}.mceModernSkin.mceModal .mceModalBody .mceModalClose{background-color:var(--wfe-modal-bg)}.mceModernSkin.mceModal .mceModalBody .mceModalClose:after{color:var(--wfe-color)}.mceModernSkin.mceModal .mceModalBody .mceButton:disabled,.mceModernSkin.mceModal .mceModalBody .mceButton:focus:disabled,.mceModernSkin.mceModal .mceModalBody .mceButton:hover:disabled,.mceModernSkin.mceModal .mceModalBody .mceModalFooter .mceButton:not(.mceButtonPrimary):focus,.mceModernSkin.mceModal .mceModalBody .mceModalFooter .mceButton:not(.mceButtonPrimary):hover{border-color:transparent;background-color:var(--wfe-bg-hover);color:var(--wfe-color)}.mceModernSkin.mceModal .mceModalContent .mceCharacterMap button{background-color:var(--wfe-bg);border-color:var(--wfe-border-color);color:var(--wfe-color)}.mceModernSkin.mceModal .mceListBox .mceOpen,.mceModernSkin.mceModal .mceListBox .mceText{border-color:var(--wfe-border-color);background-color:var(--wfe-modal-bg);color:var(--wfe-color)}.mceModernSkin.mceModal .mceListBox:focus .mceOpen,.mceModernSkin.mceModal .mceListBox:focus .mceText,.mceModernSkin.mceModal .mceListBox:hover .mceOpen,.mceModernSkin.mceModal .mceListBox:hover .mceText{border-color:var(--wfe-border-color);background-color:var(--wfe-bg-hover)}.mceModernSkin .mceColorSplitMenu,.mceModernSkin .mceColorSplitMenu button,.mceModernSkin .mceColorSplitMenu button.mceMoreColors{background-color:var(--wfe-bg)}.mceModernSkin.mceModal .mceListBox .mceComboBox{border-color:var(--wfe-border-color)}.mceModernSkin .mceColorSplitMenu button{border-color:var(--wfe-border-color);color:var(--wfe-color)}.mceModernSkin .mceColorSplitMenu button.mceMoreColors:hover{background-color:var(--wfe-bg-hover);border-color:var(--wfe-border-color)}tinymce/themes/advanced/skins/modern/content.css000060400000000107152456167170016055 0ustar00@import url(../default/content.css?v=7c1b5ae6239f4f3b8116c6316bce0db9);tinymce/themes/advanced/skins/modern/fonts.css000060400000040454152456167170015545 0ustar00.mceModernSkin .mceMenuItem .mceIcon{position:absolute}.mceModernSkin .mceButton .mceIconImage{line-height:1}.mceIcon-xsmall{font-size:.5rem;line-height:.5rem}.mceIcon-small{font-size:.75rem;line-height:.75rem}.mceIcon-medium{font-size:1.25rem;line-height:1.25rem}.mceIcon-large{font-size:1.5rem;line-height:1.5rem}.mceModernSkin span.mce_bold:before,.mceModernSkin span.mce_italic:before,.mceModernSkin span.mce_strikethrough:before,.mceModernSkin span.mce_underline:before{font-family:"times new roman,times";font-size:1.25rem;line-height:1.25rem}.mceModernSkin span.mce_strikethrough:before{content:"S";text-decoration:line-through}.mceModernSkin span.mce_underline:before{content:"U";text-decoration:underline}.mceModernSkin span.mce_bold:before{content:"B";font-weight:800}.mceModernSkin span.mce_italic:before{content:"I";font-style:italic}.mceModernSkin span.mce_arrow-right:before{content:"\edcb"}.mceModernSkin span.mce_arrow-left:before{content:"\edcf"}.mceModernSkin .mceSplitButton .mce_backcolor .mceAction,.mceModernSkin .mceSplitButton .mce_forecolor .mceAction{line-height:1em;height:1.125em;margin-bottom:2px}.mceModernSkin .mceSplitButton .mce_backcolor .mceAction{background:#bbb}.mceModernSkin span.mce_backcolor:before,.mceModernSkin span.mce_forecolor:before{content:"A";font-family:"Helvetica Neue",Helvetica,Arial,sans-serif;font-size:1rem;font-weight:700}.mceModernSkin span.mce_selectall::before{content:"";padding:.5rem;display:inline-block;background-color:#eee;border:1px dashed #aaa}.mceModernSkin .mceButton span.mce_style,.mceModernSkin .mceSplitButton span.mce_textcase{position:relative;width:1.25em;line-height:.75}.mceModernSkin span.mce_style:before{content:"A";font-family:"Helvetica Neue",Helvetica,Arial,sans-serif;font-size:.75em;position:absolute;font-weight:700;top:0;left:0}.mceModernSkin span.mce_style:after{content:"A";font-family:georgia,palatino,serif;font-weight:700;font-size:1.25em;color:rgba(0,0,0,.6);font-style:italic;position:absolute;right:0;bottom:0}.mceModernSkin span.mce_textcase:after,.mceModernSkin span.mce_textcase:before{font-family:'Times New Roman',Times,serif;position:absolute;font-weight:700}.mceModernSkin span.mce_textcase:before{content:"a";font-size:1em;bottom:.25em;left:0}.mceModernSkin span.mce_textcase:after{content:"A";font-size:1.25em;right:0;bottom:0}.mceModernSkin .mceButton span.mce_visualblocks{display:block;height:20px;left:1px}.mceModernSkin span.mce_visualblocks:before{content:"P";font-size:8px;position:absolute;top:0;left:0;border:1px dashed rgba(0,0,0,.4);width:10px;height:10px;text-align:left;padding:4px;font-weight:700;font-family:"Helvetica Neue",Arial,sans-serif;box-sizing:content-box}.mceModernSkin span.mce_source_search_regex:before{content:".*";font-family:Tahoma,Arial,sans-serif;font-size:14px;font-weight:700;line-height:1}.mceModernSkin span.mce_source_search_matchcase:before{content:"Aa";font-family:Tahoma,Arial,sans-serif;font-size:14px;line-height:1}.mceModernSkin span.mce_source_search_wholeword:before{content:"ab";font-family:Tahoma,Arial,sans-serif;font-size:14px;line-height:1;text-decoration:underline}.mceModernSkin span.mce_cite:before,.mceModernSkin span.mce_q:before{font-family:'Times New Roman',Times,serif;font-size:.75em;font-weight:600}.mceModernSkin span.mce_cite:before{content:"\201C...\201D"}.mceModernSkin span.mce_q:before{content:"\201C\201D"}.mceModernSkin span.mce_abbr:before,.mceModernSkin span.mce_acronym:before{font-family:Tahoma,Arial,sans-serif;font-size:.5em;line-height:1;vertical-align:middle}.mceModernSkin span.mce_abbr:before{content:"ABBR";font-weight:700}.mceModernSkin span.mce_acronym:before{content:"A.B.C";font-weight:700}.mceModernSkin span.mce_del:before,.mceModernSkin span.mce_ins:before{content:"A";font-family:'Times New Roman',Times,serif;font-size:1.25em;font-weight:700;text-decoration:line-through rgba(0,0,0,.8);line-height:inherit}.mceModernSkin span.mce_ins:before{text-decoration:underline rgba(0,0,0,.8)}.mceModernSkin span.mce_hashtag:before{content:"#";font-family:Tahoma,Arial,sans-serif;font-weight:700}.mceModernSkin span.mce_microdata:before{content:"\ec1b"}.mceModernSkin span.mce_arrow-up:before{content:"\edcc"}.mceModernSkin span.mce_arrow-down:before{content:"\edd0"}.mceModernSkin span.mce_checkbox:before{content:"\e033"}.mceModernSkin span.mce_file-text:before,.mceModernSkin span.mce_file:before,.mceModernSkin span.mce_filemanager:before,.mceModernSkin span.mce_files:before{content:"\e9ad"}.mceModernSkin span.mce_file-aiff:before,.mceModernSkin span.mce_file-audio:before,.mceModernSkin span.mce_file-mp3:before,.mceModernSkin span.mce_file-oga:before,.mceModernSkin span.mce_file-wav:before,.mceModernSkin span.mce_file-wma:before{content:"\e9b1"}.mceModernSkin span.mce_file-avi:before,.mceModernSkin span.mce_file-m4v:before,.mceModernSkin span.mce_file-mov:before,.mceModernSkin span.mce_file-mp4:before,.mceModernSkin span.mce_file-ogg:before,.mceModernSkin span.mce_file-ogv:before,.mceModernSkin span.mce_file-video:before,.mceModernSkin span.mce_file-webm:before,.mceModernSkin span.mce_video:before{content:"\e9b5"}.mceModernSkin span.mce_email:before{content:"\ea32"}.mceModernSkin span.mce_backward:before{content:"\ed88"}.mceModernSkin span.mce_forward:before{content:"\ed89"}.mceModernSkin span.mce_first:before{content:"\ed8a"}.mceModernSkin span.mce_last:before{content:"\ed8b"}.mceModernSkin span.mce_sort-alpha-asc:before{content:"\ee4c"}.mceModernSkin span.mce_sort-alpha-desc:before{content:"\ee4d"}.mceModernSkin span.mce_sort-numeric-asc:before{content:"\ee4e"}.mceModernSkin span.mce_sort-numeric-desc:before{content:"\ee4f"}.mceModernSkin span.mce_thumbnail:before,.mceModernSkin span.mce_thumbnail_create:before{content:"\e93e"}.mceModernSkin span.mce_thumbnail_delete:before{content:"\e93f"}.mceModernSkin span.mce_caption_add:before{content:"\e942"}.mceModernSkin span.mce_caption_delete:before{content:"\e940"}.mceModernSkin span.mce_upload:before{content:"\ec7f"}.mceModernSkin span.mce_cloud_upload:before{content:"\f0ee"}.mceModernSkin span.mce_star:before{content:"\ece2"}.mceModernSkin span.mce_remove:before{content:"\ed6d"}.mceModernSkin span.mce_remove-small:before{content:"\ed6e"}.mceModernSkin span.mce_folder-open:before{content:"\e930"}.mceModernSkin span.mce_home:before{content:"\e901"}.mceModernSkin span.mce_edit:before{content:"\e914"}.mceModernSkin span.mce_quill:before{content:"\e91b"}.mceModernSkin span.mce_image:before,.mceModernSkin span.mce_imgmanager:before{content:"\e941"}.mceModernSkin span.mce_insertlayer:before{content:"\e92e"}.mceModernSkin span.mce_layerbackward:before{content:"\ea46"}.mceModernSkin span.mce_layerforward:before{content:"\ea47"}.mceModernSkin span.mce_layerabsolute:before{content:"\e908"}.mceModernSkin span.mce_imgmanager_ext:before{content:"\e93c"}.mceModernSkin span.mce_film:before,.mceModernSkin span.mce_media:before,.mceModernSkin span.mce_mediamanager:before{content:"\e95e"}.mceModernSkin span.mce_file-empty:before,.mceModernSkin span.mce_newdocument:before{content:"\e99d"}.mceModernSkin span.mce_file-plus:before{content:"\e9a1"}.mceModernSkin span.mce_file-bmp:before,.mceModernSkin span.mce_file-gif:before,.mceModernSkin span.mce_file-image:before,.mceModernSkin span.mce_file-jpeg:before,.mceModernSkin span.mce_file-jpg:before,.mceModernSkin span.mce_file-picture:before,.mceModernSkin span.mce_file-png:before,.mceModernSkin span.mce_file-svg:before,.mceModernSkin span.mce_file-tiff:before,.mceModernSkin span.mce_img:before{content:"\e9af"}.mceModernSkin span.mce_file-gz:before,.mceModernSkin span.mce_file-rar:before,.mceModernSkin span.mce_file-tar:before,.mceModernSkin span.mce_file-zip:before{content:"\e9b9"}.mceModernSkin span.mce_file-xml:before{content:"\e9bb"}.mceModernSkin span.mce_file-ppt:before,.mceModernSkin span.mce_file-pptx:before,.mceModernSkin span.mce_file-presentation:before{content:"\e9bf"}.mceModernSkin span.mce_file-spreadsheet:before,.mceModernSkin span.mce_file-xls:before,.mceModernSkin span.mce_file-xlsx:before{content:"\e9c5"}.mceModernSkin span.mce_copy:before{content:"\e9c7"}.mceModernSkin span.mce_paste:before{content:"\e9ca"}.mceModernSkin span.mce_pastetext:before{content:"\e9cb"}.mceModernSkin span.mce_folder:before{content:"\e9db"}.mceModernSkin span.mce_folder-plus:before{content:"\e9df"}.mceModernSkin span.mce_print:before{content:"\ea66"}.mceModernSkin span.mce_source_undo:before,.mceModernSkin span.mce_undo:before{content:"\eabc"}.mceModernSkin span.mce_redo:before,.mceModernSkin span.mce_source_redo:before{content:"\eabd"}.mceModernSkin span.mce_blockquote:before{content:"\eb18"}.mceModernSkin span.mce_searchreplace:before{content:"\eb2b"}.mceModernSkin span.mce_search:before{content:"\eb33"}.mceModernSkin span.mce_fullscreen:before,.mceModernSkin span.mce_source_fullscreen:before{content:"\eb3b"}.mceModernSkin span.mce_attribs:before,.mceModernSkin span.mce_cog:before{content:"\eb63"}.mceModernSkin span.mce_cleanup:before{content:"\ebf8"}.mceModernSkin span.mce_trash:before{content:"\ebfa"}.mceModernSkin span.mce_numlist:before,.mceModernSkin span.mce_source_linenumbers:before{content:"\ec55"}.mceModernSkin span.mce_bullist:before{content:"\ec57"}.mceModernSkin span.mce_grid:before{content:"\ec5f"}.mceModernSkin span.mce_list:before{content:"\ec6a"}.mceModernSkin span.mce_link:before,.mceModernSkin span.mce_lnk:before{content:"\ec98"}.mceModernSkin span.mce_unlink:before{content:"\ec99"}.mceModernSkin span.mce_anchor:before{content:"\eca0"}.mceModernSkin span.mce_preview:before{content:"\ecb3"}.mceModernSkin span.mce_help:before{content:"\ed56"}.mceModernSkin span.mce_plus-circle:before{content:"\ed5c"}.mceModernSkin span.mce_minus-circle:before{content:"\ed5d"}.mceModernSkin span.mce_cross:before{content:"\ed69"}.mceModernSkin span.mce_check:before,.mceModernSkin span.mce_checkmark:before{content:"\ed6c"}.mceModernSkin span.mce_spellchecker:before{content:"\ed71"}.mceModernSkin span.mce_refresh:before{content:"\eda7"}.mceModernSkin span.mce_caret-up:before{content:"\edc4"}.mceModernSkin span.mce_caret-right:before{content:"\edc5"}.mceModernSkin span.mce_caret-down:before{content:"\edc6"}.mceModernSkin span.mce_caret-left:before{content:"\edc7"}.mceModernSkin span.mce_arrow_right:before,.mceModernSkin span.mce_source_search_next:before{content:"\edcb"}.mceModernSkin span.mce_arrow_left:before,.mceModernSkin span.mce_source_search_previous:before{content:"\edcf"}.mceModernSkin span.mce_cut:before{content:"\ee83"}.mceModernSkin span.mce_charmap:before{content:"\ee9e"}.mceModernSkin span.mce_nonbreaking:before{content:"\eea0"}.mceModernSkin span.mce_readmore:before{content:"\eea2"}.mceModernSkin span.mce_sup:before,.mceModernSkin span.mce_superscript:before{content:"\eea3"}.mceModernSkin span.mce_sub:before,.mceModernSkin span.mce_subscript:before{content:"\eea4"}.mceModernSkin span.mce_pagebreak:before{content:"\eea9"}.mceModernSkin span.mce_removeformat:before{content:"\eeaa"}.mceModernSkin span.mce_template:before,.mceModernSkin span.mce_templatemanager:before{content:"\eead"}.mceModernSkin span.mce_visualchars:before{content:"\eeae"}.mceModernSkin span.mce_ltr:before{content:"\eeaf"}.mceModernSkin span.mce_rtl:before{content:"\eeb0"}.mceModernSkin span.mce_alignleft:before,.mceModernSkin span.mce_justifyleft:before{content:"\eeb8"}.mceModernSkin span.mce_aligncenter:before,.mceModernSkin span.mce_justifycenter:before{content:"\eeb9"}.mceModernSkin span.mce_alignright:before,.mceModernSkin span.mce_justifyright:before{content:"\eeba"}.mceModernSkin span.mce_alignjustify:before,.mceModernSkin span.mce_justifyfull:before{content:"\eebb"}.mceModernSkin span.mce_indent:before,.mceModernSkin span.mce_source_format:before{content:"\eebc"}.mceModernSkin span.mce_outdent:before{content:"\eebd"}.mceModernSkin span.mce_code:before{content:"\eeca"}.mceModernSkin span.mce_file-pdf:before{content:"\ef36"}.mceModernSkin span.mce_file-openoffice:before{content:"\ef37"}.mceModernSkin span.mce_file-word:before{content:"\ef38"}.mceModernSkin span.mce_file-excel:before{content:"\ef39"}.mceModernSkin span.mce_hr:before{content:"\e01c"}.mceModernSkin span.mce_emotions:before{content:"\e021"}.mceModernSkin span.mce_autosave:before,.mceModernSkin span.mce_restoredraft:before{content:"\e028"}.mceModernSkin span.mce_resize:before{content:"\e032"}.mceModernSkin span.mce_table:before,.mceModernSkin span.mce_table_insert:before,.mceModernSkin span.mce_table_props:before{content:"\e01b"}.mceModernSkin span.mce_row_props:before{content:"\e604"}.mceModernSkin span.mce_cell_props:before{content:"\e605"}.mceModernSkin span.mce_merge_cells:before{content:"\e607"}.mceModernSkin span.mce_col_before:before{content:"\e608"}.mceModernSkin span.mce_col_after:before{content:"\e609"}.mceModernSkin span.mce_row_before:before{content:"\e60a"}.mceModernSkin span.mce_row_after:before{content:"\e60b"}.mceModernSkin span.mce_split_cells:before{content:"\e60d"}.mceModernSkin span.mce_delete_table:before{content:"\e60e"}.mceModernSkin span.mce_delete_row:before{content:"\e800"}.mceModernSkin span.mce_delete_col:before{content:"\e801"}.mceModernSkin span.mce_drag:before{content:"\e908"}.mceModernSkin span.mce_minus:before{content:"\e939"}.mceModernSkin span.mce_plus:before{content:"\e93a"}.mceModernSkin span.mce_rotateleft:before{content:"\eaa8"}.mceModernSkin span.mce_rotateright:before{content:"\eaa9"}.mceModernSkin span.mce_flipv:before{content:"\eaaa"}.mceModernSkin span.mce_fliph:before{content:"\eaac"}.mceModernSkin span.mce_crop:before{content:"\ee78"}.mceModernSkin span.mce_save:before{content:"\e000"}.mceModernSkin span.mce_tag:before{content:"\e013"}.mceModernSkin span.mce_cloud-upload:before{content:"\f0ee"}.mceModernSkin span.mce_lightbox:before{content:"\eecb"}.mceModernSkin span.mce_lightbulb:before{content:"\ebfb";border:1px solid #bbb;padding:1px;margin:-1px 0 0 -2px}.mceModernSkin span.mce_loop:before,.mceModernSkin span.mce_source_replace_all:before{content:"\eda8"}.mceModernSkin span.mce_exchange:before,.mceModernSkin span.mce_source_replace:before{content:"\ee46"}.mceModernSkin span.mce_source_wrap:before{content:"\e902"}.mceModernSkin span.mce_kitchensink:before{content:"\ec6e"}.mceModernSkin span.mce_iframe:before{content:"\e903"}.mceModernSkin span.mce_visualaid:before{content:"\e904"}.mceModernSkin span.mce_highlight:before,.mceModernSkin span.mce_source_highlight:before{content:"\e924"}.mceModernSkin span.mce_columns:before{content:"\e905"}.mceModernSkin span.mce_columns_stack:before{content:"\e909"}.mceModernSkin span.mce_columns_delete:before{content:"\e906"}.mceModernSkin span.mce_columns_add:before{content:"\e907"}.mceModernSkin span.mce_columns_add_before:before{content:"\e91c"}.mceModernSkin span.mce_columns_layout_1_2:before{content:"\e909"}.mceModernSkin span.mce_columns_layout_2_1:before{content:"\e90a"}.mceModernSkin span.mce_columns_layout_1_1_1_2:before{content:"\e90b"}.mceModernSkin span.mce_columns_layout_1_1_2:before{content:"\e90c"}.mceModernSkin span.mce_columns_layout_1_1_3:before{content:"\e90d"}.mceModernSkin span.mce_columns_layout_1_2_1:before{content:"\e90e"}.mceModernSkin span.mce_columns_layout_1_3_1:before{content:"\e90f"}.mceModernSkin span.mce_columns_layout_1_3:before{content:"\e911"}.mceModernSkin span.mce_columns_layout_1_4:before{content:"\e912"}.mceModernSkin span.mce_columns_layout_2_1_1_1:before{content:"\e913"}.mceModernSkin span.mce_columns_layout_2_1_1:before{content:"\e915"}.mceModernSkin span.mce_columns_layout_2_3:before{content:"\e916"}.mceModernSkin span.mce_columns_layout_3_1_1:before{content:"\e917"}.mceModernSkin span.mce_columns_layout_3_1:before{content:"\e918"}.mceModernSkin span.mce_columns_layout_3_2:before{content:"\e919"}.mceModernSkin span.mce_columns_layout_4_1:before{content:"\e91a"}.mceModernSkin span.mce_columns_layout_2_2_1:before{content:"\e91d"}.mceModernSkin span.mce_columns_layout_2_1_2:before{content:"\e91e"}.mceModernSkin span.mce_columns_layout_1_2_2:before{content:"\e91f"}.mceModernSkin span[class*=mce_columns_layout_]:before{padding:2px;line-height:1.25}.mceModernSkin span.mce_joomla:before{content:"\eab5"}.mceModernSkin span.mce_file_link:before,.mceModernSkin span.mce_lnk:before{content:"\e910"}.mceModernSkin span.mce_langcode:before{content:"\e9c9"}.mceModernSkin span.mce_date:before{content:"\e94e"}.mceModernSkin span.mce_spinner:before{content:"";border:.125rem solid #444;border-radius:.75em;width:1em;height:1em;opacity:0;display:inline-block;animation:pulsate 1s ease-out;animation-iteration-count:infinite;vertical-align:top}@keyframes pulsate{0%{transform:scale(.1);opacity:0}50%{opacity:.8}100%{transform:scale(1.2);opacity:0}}tinymce/themes/advanced/skins/modern/ui.css000060400000011755152456167170015033 0ustar00@import url(fonts.css?v=7c1b5ae6239f4f3b8116c6316bce0db9);.mceModernSkin .mceToolbar{background:#fafafa}.mceModernSkin .mceToolbar.mceDisabled{background:rgba(255,255,255,.5)}.mceModernSkin .mceToolbarRow .mceToolbarItem{background-color:transparent;margin:2px}.mceModernSkin .mceToolbarRow .mceToolbarItem .mceTextBox{max-width:inherit}.mceModernSkin .mceToolbarRow .mceToolbarItem textarea{height:auto;white-space:pre-wrap;font-size:13px;line-height:2}.mceModernSkin .mceMenu .mceToolbarRow .mceToolbarItem{width:100%}.mceModernSkin .mceToolbarFooter .mceToolbarItem{text-align:right}.mceModernSkin .mceToolbarFooter .mceToolbarItem .mceButton{min-width:5em;height:32px;line-height:1;background:#fff;border-radius:2px;color:#444;border:1px solid #ddd;margin:0 0 0 4px;padding:0 8px}.mceModernSkin .mceToolbarFooter .mceToolbarItem .mceButtonPrimary{background-color:#337ab7;border:1px solid rgba(0,0,0,.06);color:#fff}.mceModernSkin .mceButton,.mceModernSkin .mceListBox .mceOpen,.mceModernSkin .mceListBox .mceText,.mceModernSkin .mceSplitButton .mceOpen,.mceModernSkin .mceSplitButton .mceText{border-color:transparent;color:rgba(0,0,0,.87);background-color:transparent}.mceModernSkin .mceButton .mceIcon,.mceModernSkin .mceMenuItem .mceIcon,.mceModernSkin .mceSplitButton .mceAction{color:rgba(0,0,0,.87);height:1em;line-height:1;text-align:center;min-width:1em;max-width:inherit;background:0 0}.mceModernSkin .mceButtonPrimary{color:#fff}.mceModernSkin button:disabled{cursor:not-allowed}.mceModernSkin button:disabled .mceIcon{opacity:.38}.mceModernSkin .mceButton:focus,.mceModernSkin .mceButton:hover{border:1px solid #ddd;background-color:#e6e6e6}.mceModernSkin .mceButtonPrimary:focus,.mceModernSkin .mceButtonPrimary:hover{background-color:#286090;color:#fff;border-color:rgba(0,0,0,.21)}.mceModernSkin .mceSplitButton:focus .mceOpen,.mceModernSkin .mceSplitButton:focus .mceText,.mceModernSkin .mceSplitButton:hover .mceOpen,.mceModernSkin .mceSplitButton:hover .mceText,.mceModernSkin .mceSplitButtonActive .mceOpen,.mceModernSkin .mceSplitButtonActive .mceText{border-color:#ccc;background-color:#e6e6e6}.mceModernSkin .mceSplitButtonActive .mceOpen{border-left:1px solid #ccc}.mceModernSkin .mceListBox .mceText{border-top-color:#ddd;border-bottom-color:#ddd;border-left-color:#ddd}.mceModernSkin .mceListBox .mceText::placeholder{color:#ddd;font-size:inherit}.mceModernSkin .mceListBox .mceOpen{background-color:transparent;border-top-color:#ddd;border-bottom-color:#ddd;border-right-color:#ddd}.mceModernSkin .mceListBox .mceOpen:after{color:transparent;background-image:url("data:image/svg+xml;charset=UTF-8,%3Csvg%20width%3D%2224%22%20height%3D%2216%22%20viewBox%3D%220%200%2024%2016%22%20xmlns%3D%22http%3A%2F%2Fwww.w3.org%2F2000%2Fsvg%22%3E%0A%20%20%20%20%3Cpolygon%20fill%3D%22%23666%22%20points%3D%2212%201%209%206%2015%206%22%20%2F%3E%0A%20%20%20%20%3Cpolygon%20fill%3D%22%23666%22%20points%3D%2212%2013%209%208%2015%208%22%20%2F%3E%0A%3C%2Fsvg%3E%0A");background-repeat:no-repeat;background-position:center}.mceModernSkin .mceButtonActive,.mceModernSkin .mceButtonSelected,.mceModernSkin .mcePanelButtonActive{background-color:#e6e6e6;border-color:#ddd}.mceModernSkin .mceButtonDialog::before{top:-6px}.mceModernSkin .mceColorPreview{outline:#e6e6e6 solid 1px}.mceModernSkin .mceListBox .mceMenuItems .mceIcon{top:0;width:32px;left:0;height:32px;line-height:2}.mceModernSkin .mceSplitButtonMenu{position:relative}.mceModernSkin .mcePanelButtonSelected,.mceModernSkin .mcePanelButtonSelected:hover{border-color:#ddd;background:#fff}.mceModernSkin .mcePanelButtonSelected .mceText,.mceModernSkin .mcePanelButtonSelected:hover .mceText{background:#fff;border-color:#ddd transparent #ddd #ddd;border-radius:2px 0 0}.mceModernSkin .mcePanelButtonSelected .mceOpen,.mceModernSkin .mcePanelButtonSelected:hover .mceOpen{background:#fff;border-color:#ddd #ddd #ddd transparent;border-radius:0 2px 0 0}.mceModernSkin .mceSplitButtonSelected .mceText,.mceModernSkin .mceSplitButtonSelected:hover .mceText{background:#fff;border-color:#ccc;border-radius:2px 0 0}.mceModernSkin .mceSplitButtonSelected .mceOpen,.mceModernSkin .mceSplitButtonSelected:hover .mceOpen{background:#fff;border-color:#ccc #ccc #ccc transparent;border-radius:0 2px 0 0}.mceModernSkin .mceColorSplitMenu{padding:2px;background:#fff}.mceModernSkin .mcePanel::before{background-color:#fff}.mceModernSkin .mceListBoxMenu{overflow:hidden}.mceModernSkin .mceListBox:hover .mceText,.mceModernSkin .mceListBoxSelected .mceText,.mceModernSkin .mceListBoxSelected:hover .mceText{background:#fff;border-color:#ccc;border-radius:2px 0 0}.mceModernSkin .mceDefaultSkin .mceListBoxSelected:hover .mceOpen,.mceModernSkin .mceListBox:hover .mceOpen,.mceModernSkin .mceListBoxSelected .mceOpen{background:#fff;border-color:#ccc #ccc #ccc transparent;border-radius:0 2px 0 0}.mceModernSkin .mceStatusbar .mceResize span{color:rgba(0,0,0,.87);text-align:right;display:inline-block;background:0 0;width:1em;height:1em}.mceModernSkin .mceModalContent .mceButtonUpload .mceIcon{font-size:1em;line-height:2.25;height:100%;margin:auto}tinymce/themes/advanced/skins/modern/ui.admin.css000060400000007215152456167170016116 0ustar00@import url(ui.css?v=7c1b5ae6239f4f3b8116c6316bce0db9);@import url(ui_touch.css?v=7c1b5ae6239f4f3b8116c6316bce0db9);@import url(../default/ui.admin.css?v=7c1b5ae6239f4f3b8116c6316bce0db9);.mceModernSkin .mceToolbarItem .mceListBox::after,.mceModernSkin .mceToolbarItem .mceSplitButton::after{width:14px}.mceModernSkin .mceToolbarItem .mceSplitButton .mceIcon{width:30px;max-width:30px;line-height:2;vertical-align:middle;height:2em;margin:0}.nav-item .mceToolbarItem,.nav-item .mceToolbarItem .mceButton{display:flex;flex-wrap:wrap}.mceModernSkin .mceToolbarItem .mceButton:not(.mceListBox),.mceModernSkin .mceToolbarItem .mceSplitButton:after{border-color:transparent;background-color:transparent}.mceModernSkin .mceToolbarItem .mceButton:hover,.mceModernSkin .mceToolbarItem.ui-sortable-helper .mceButton,.nav-item .mceModernSkin .mceToolbarItem .mceButton{border-color:#ddd;background-color:#eee}.mceModernSkin .mceToolbarItem .mceSplitButton:hover:after,.mceModernSkin .mceToolbarItem.ui-sortable-helper .mceSplitButton:after{border-left-color:#ddd;background-color:#eee}.mceModernSkin .mceToolbarItem .mceSplitButton span.mce_backcolor,.mceModernSkin .mceToolbarItem .mceSplitButton span.mce_forecolor{line-height:1.5}.mceModernSkin .mceToolbarItem .mceSplitButton span.mce_backcolor:after,.mceModernSkin .mceToolbarItem .mceSplitButton span.mce_forecolor:after{content:"";width:16px;height:4px;outline:#eee solid 1px;display:block;margin:-3px auto}.mceModernSkin span.mce_forecolor:after{background-color:#000}.mceModernSkin span.mce_backcolor:after{background-color:#ff0}.mceModernSkin .mceToolbarItem .mceSplitButton span.mce_textcase{line-height:1.75}.mceModernSkin .mceToolbarItem .mceSplitButton span.mce_textcase:before{left:.25em}.mceModernSkin .mceToolbarItem .mceSplitButton span.mce_textcase:after{right:.25em}.mceModernSkinTouch .mceToolbarItem .mceListBox,.mceModernSkinTouch .mceToolbarItem .mceSplitButton{border-color:#dcdcdc;height:40px}.mceModernSkinTouch .mceLayout .mceToolbar .mceToolbarRow{min-height:40px}.mceModernSkinTouch .mceToolbarItem .mceButton{padding:11px;border-color:#dcdcdc;background-color:#fafafa}.mceModernSkinTouch .mceToolbarItem .mceListBox{width:112px;padding:0}.mceModernSkinTouch .mceToolbarItem .mceSplitButton{width:52px;padding:0;height:40px}.mceModernSkinTouch .mceToolbarItem .mceSplitButton .mceIcon{max-width:32px;height:36px;width:32px;line-height:2.25}.mceModernSkinTouch .mceToolbarItem .mceListBox .mceIcon{width:92px}.mceModernSkinTouch .mceToolbarItem .mceListBox .mceIcon:before{width:92px;line-height:34px}.mceModernSkinTouch .mceToolbarItem .mceListBox:after,.mceModernSkinTouch .mceToolbarItem .mceSplitButton:after{line-height:38px;width:18px}.mceModernSkinTouch .mceLayout .mceIframeContainer,.mceModernSkinTouch .mceLayout .mceStatusbar{border-color:#dcdcdc}.mceModernSkinTouch .mceLayout .mceToolbarRow{background-color:#fafafa;border-color:#dcdcdc}.mceModernSkinTouch .mceToolbar .sortableRowHandle{height:42px}.mceModernSkinTouch .mceToolbar .sortableRowHandle .uk-icon{margin:12px 0 0}.mceModernSkinTouch .mceToolbarItem .mceSeparator{height:34px;background:#dcdcdc}.mceModernSkinTouch .sortableList .mceToolbarRow.sortableListItem.ui-sortable-highlight{height:38px}.mceModernSkinTouch .sortableList .mceToolbarItem.sortableRowItem.ui-sortable-highlight{height:36px}.mceModernSkinTouch .mceLayout,.mceModernSkinTouch .mceLayout .mceToolbar{border:0!important;background:#fff}.mceModernSkinTouch .mceLayout .mceFirst,.mceModernSkinTouch .mceLayout .mceLast{background-color:#fff!important}.mceModernSkinTouch .mceLayout .mceStatusbar{background-color:#fafafa!important}.mceModernSkinTouch .mceToolbarItem .mceListBox::before{line-height:38px;width:90px}tinymce/themes/none/skins/default/content.css000060400000000071152456167170015407 0ustar00@import url(../../../advanced/skins/default/content.css);tinymce/themes/none/skins/default/ui.css000060400000000064152456167170014354 0ustar00@import url(../../../advanced/skins/default/ui.css);tinymce/themes/none/theme.js000060400000007141152456167170012115 0ustar00/* This file includes original and modified code from various versions of TinyMCE, relicensed under GPL v2+ per LGPL 2.1 §3 where applicable. Source: https://github.com/widgetfactory/tinymce-muon; Copyright (c) Tiny Technologies, Inc. All rights reserved.; Copyright (c) 1999–2015 Ephox Corp. All rights reserved.; Copyright (c) 2009       Moxiecode Systems AB. All rights reserved.; Copyright (c) 2009–2025  Ryan Demmer. All rights reserved.; For a detailed history of modifications, refer to the Git commit history.; Licensed under the GNU General Public License version 2 or later (GPL v2+): https://www.gnu.org/licenses/gpl-2.0.html */
!function() {
    var DOM = tinymce.DOM;
    tinymce.create("tinymce.themes.NoSkin", {
        init: function(ed, url) {
            var s = ed.settings;
            function grabContent() {
                var se = ed.selection, n = ed.dom.add(ed.getBody(), "div", {
                    id: "_mcePaste",
                    style: "position:absolute;left:-1000px;top:-1000px"
                }, '<br mce_bogus="1" />').firstChild, or = ed.selection.getRng(), r = ed.getDoc().createRange();
                r.setStart(n, 0), r.setEnd(n, 0), se.setRng(r), window.setTimeout(function() {
                    var h = (n = ed.dom.get("_mcePaste")).innerHTML, n = (ed.dom.remove(n), 
                    se.setRng(or), h = h.replace(/<\/?\w+[^>]*>/gi, ""), ed.dom.create("div", 0, h));
                    tinymce.each(ed.dom.select("span", n).reverse(), function(n) {
                        if (ed.dom.getAttribs(n).length <= 1 && "" === n.className) return ed.dom.remove(n, 1);
                    }), ed.execCommand("mceInsertContent", !1, ed.serializer.serialize(n, {
                        getInner: 1
                    }));
                }, 0);
            }
            (this.editor = ed).onInit.add(function() {
                ed.onBeforeExecCommand.add(function(ed, cmd, ui, val, o) {
                    return !(o.terminate = !0);
                }), ed.dom.loadCSS(url + "/skins/default/content.css");
            }), ed.onKeyDown.add(function(ed, e) {
                (e.ctrlKey && 86 == e.keyCode || e.shiftKey && 45 == e.keyCode) && grabContent();
            }), ed.onKeyDown.add(function(ed, e) {
                if (e.ctrlKey && 66 == e.keyCode || e.ctrlKey && 73 == e.keyCode || e.ctrlKey && 85 == e.keyCode) return tinymce.dom.Event.cancel(e);
            }), ed.settings.compress.css || DOM.loadCSS(s.editor_css ? ed.documentBaseURI.toAbsolute(s.editor_css) : url + "/skins/default/ui.css");
        },
        renderUI: function(o) {
            o.targetNode;
            var ic, sc, p, ed = this.editor, n = p = DOM.create("div", {
                role: "application",
                "aria-labelledby": ed.id + "_voice",
                id: ed.id + "_parent",
                class: "mceEditor mceDefaultSkin" + ("rtl" == ed.settings.directionality ? " mceRtl" : "")
            });
            return DOM.add(n, "span", {
                class: "mceVoiceLabel",
                style: "display:none;",
                id: ed.id + "_voice"
            }, ed.settings.aria_label), sc = DOM.add(n, "div", {
                role: "presentation",
                id: ed.id + "_tbl",
                class: "mceLayout"
            }), ic = DOM.add(sc, "div", {
                class: "mceIframeContainer"
            }), n = o.targetNode, DOM.insertAfter(p, n), {
                iframeContainer: ic,
                editorContainer: ed.id + "_parent",
                sizeContainer: sc,
                deltaHeight: -20
            };
        }
    }), tinymce.ThemeManager.add("none", tinymce.themes.NoSkin);
}();jce.php000060400000001565152456221600006024 0ustar00<?php
/**
 * @package     JCE
 * @subpackage  Editors.Jce
 *
 * @copyright   Copyright (C) 2005 - 2023 Open Source Matters, Inc. All rights reserved.
 * @copyright   Copyright (c) 2009-2024 Ryan Demmer. All rights reserved
 * @license     GNU General Public License version 2 or later; see LICENSE.txt
 */

defined('JPATH_BASE') or die;

extract($displayData);

$classes = version_compare(JVERSION, '4', 'lt') ? 'joomla3' : 'mb-2';

?>
<div class="editor wf-editor-container <?php echo $classes; ?>">
	<div class="wf-editor-header"></div>
	<textarea
		spellcheck="false"
		autocomplete="off"
		name="<?php echo $name; ?>"
		id="<?php echo $id; ?>"
		cols="<?php echo $cols; ?>"
		rows="<?php echo $rows; ?>"
		style="width: <?php echo $width; ?>; height: <?php echo $height; ?>;"
		class="<?php echo $class; ?>"
	><?php echo $content; ?></textarea>
</div>
<?php echo $buttons ?? ''; ?>