����JFIFXX�����    $.' ",#(7),01444'9=82<.342  2!!22222222222222222222222222222222222222222222222222����"��4�� ���,�PG"Z_�4�˷����kjز�Z�,F+��_z�,�© �����zh6�٨�ic�fu���#ډb���_�N�?��wQ���5-�~�I���8����TK<5o�Iv-�����k�_U_�����~b�M��d����Ӝ�U�Hh��?]��E�w��Q���k�{��_}qFW7HTՑ��Y��F�?_�'ϔ��_�Ջt��=||I ��6�έ"�����D���/[�k�9���Y�8ds|\���Ҿp6�Ҵ���]��.����6�z<�v��@]�i%��$j��~�g��J>��no����pM[me�i$[����s�o�ᘨ�˸ nɜG-�ĨU�ycP�3.DB�li�;��hj���x7Z^�N�h������N3u{�:j�x�힞��#M&��jL P@_���� P��&��o8������9�����@Sz6�t7#O�ߋ �s}Yf�T���lmr����Z)'N��k�۞p����w\�Tȯ?�8`�O��i{wﭹW�[�r�� ��Q4F�׊���3m&L�=��h3����z~��#�\�l :�F,j@�� ʱ�wQT����8�"kJO���6�֚l����}���R�>ډK���]��y����&����p�}b��;N�1�m�r$�|��7�>e�@B�TM*-iH��g�D�)� E�m�|�ؘbҗ�a��Ҿ����t4���o���G��*oCN�rP���Q��@z,|?W[0�����:�n,jWiE��W��$~/�hp\��?��{(�0���+�Y8rΟ�+����>S-S����VN;�}�s?.����� w�9��˟<���Mq4�Wv'��{)0�1mB��V����W[�����8�/<� �%���wT^�5���b��)iM� pg�N�&ݝ��VO~�q���u���9� ����!��J27����$O-���! �:�%H��� ـ����y�ΠM=t{!S�� oK8������t<����è:a������[�����ա�H���~��w��Qz`�po�^ ����Q��n� �,uu�C�$ ^���,������8�#��:�6��e�|~���!�3�3.�\0��q��o�4`.|� ����y�Q�`~;�d�ׯ,��O�Zw�������`73�v�܋�<���Ȏ�� ـ4k��5�K�a�u�=9Yd��$>x�A�&�� j0� ���vF��� Y�|�y��� ~�6�@c��1vOp�Ig����4��l�OD���L����� R���c���j�_�uX6��3?nk��Wy�f;^*B� ��@�~a�`��Eu������+���6�L��.ü>��}y���}_�O�6�͐�:�YrG�X��kG�����l^w���~㒶sy��Iu�!� W ��X��N�7BV��O��!X�2����wvG�R�f�T#�����t�/?���%8�^�W�aT��G�cL�M���I��(J����1~�8�?aT ���]����AS�E��(��*E}� 2��#I/�׍qz��^t�̔���b�Yz4x���t�){ OH��+(E��A&�N�������XT��o��"�XC��'���)}�J�z�p� ��~5�}�^����+�6����w��c��Q�|Lp�d�H��}�(�.|����k��c4^�"�����Z?ȕ ��a<�L�!039C� �Eu�C�F�Ew�ç ;�n?�*o���B�8�bʝ���'#Rqf���M}7����]����s2tcS{�\icTx;�\��7K���P���ʇ Z O-��~��c>"��?�������P��E��O�8��@�8��G��Q�g�a�Վ���󁶠�䧘��_%#r�>�1�z�a��eb��qcPѵ��n���#L��� =��׀t� L�7�`��V���A{�C:�g���e@�w1 Xp3�c3�ġ����p��M"'-�@n4���fG��B3�DJ�8[Jo�ߐ���gK)ƛ��$���� ���8�3�����+���� �����6�ʻ���� ���S�kI�*KZlT _`���?��K����QK�d����B`�s}�>���`��*�>��,*@J�d�oF*����弝��O}�k��s��]��y�ߘ��c1G�V���<=�7��7����6�q�PT��tXԀ�!9*4�4Tހ3XΛex�46���Y��D ����� �BdemDa����\�_l,��G�/���֌7���Y�](�xTt^%�GE�����4�}bT���ڹ�����;Y)���B�Q��u��>J/J �⮶.�XԄ��j�ݳ�+E��d ��r�5�_D�1 ��o�� �B�x�΢�#���<��W�����8���R6�@g�M�.��� dr�D��>(otU��@x=��~v���2� ӣ�d�oBd��3�eO�6�㣷�����ݜ6��6Y��Qz`��S��{���\P�~z m5{J/L��1������<�e�ͅPu�b�]�ϔ���'������f�b� Zpw��c`"��i���BD@:)ִ�:�]��hv�E�w���T�l��P���"Ju�}��وV J��G6��. J/�Qgl߭�e�����@�z�Zev2u�)]կ�����7x���s�M�-<ɯ�c��r�v�����@��$�ޮ}lk���a���'����>x��O\�ZFu>�����ck#��&:��`�$�ai�>2Δ����l���oF[h��lE�ܺ�Πk:)���`�� $[6�����9�����kOw�\|���8}������ބ:��񶐕��I�A1/�=�2[�,�!��.}gN#�u����b��� ~��݊��}34q����d�E��Lc��$��"�[q�U�硬g^��%B �z���r�pJ�ru%v\h1Y�ne`ǥ:g���pQM~�^�Xi� ��`S�:V29.�P���V�?B�k�� AEvw%�_�9C�Q����wKekPؠ�\�;Io d�{ ߞo�c1eP����\� `����E=���@K<�Y���eڼ�J���w����{av�F�'�M�@/J��+9p���|]�����Iw &`��8���&M�hg��[�{��Xj��%��Ӓ�$��(����ʹN���<>�I���RY���K2�NPlL�ɀ)��&e����B+ь����( � �JTx���_?EZ� }@ 6�U���뙢ط�z��dWI�n` D����噥�[��uV��"�G&Ú����2g�}&m��?ċ�"����Om#��������� ��{�ON��"S�X��Ne��ysQ���@Fn��Vg���dX�~nj�]J�<�K]:��FW��b�������62�=��5f����JKw��bf�X�55��~J �%^����:�-�QIE��P��v�nZum� z � ~ə ���� ���ة����;�f��\v���g�8�1��f24;�V���ǔ�)����9���1\��c��v�/'Ƞ�w�������$�4�R-��t���� e�6�/�ġ �̕Ecy�J���u�B���<�W�ַ~�w[B1L۲�-JS΂�{���΃������A��20�c#��@ 0!1@AP"#2Q`$3V�%45a6�FRUq��� ����^7ׅ,$n�������+��F�`��2X'��0vM��p�L=������5��8������u�p~���.�`r�����\���O��,ư�0oS ��_�M�����l���4�kv\JSd���x���SW�<��Ae�IX����������$I���w�:S���y���›R��9�Q[���,�5�;�@]�%���u�@ *ro�lbI �� ��+���%m:�͇ZV�����u�̉����θau<�fc�.����{�4Ա� �Q����*�Sm��8\ujqs]{kN���)qO�y�_*dJ�b�7���yQqI&9�ԌK!�M}�R�;������S�T���1���i[U�ɵz�]��U)V�S6���3$K{�ߊ<�(� E]Զ[ǼENg�����'�\?#)Dkf��J���o��v���'�%ƞ�&K�u�!��b�35LX�Ϸ��63$K�a�;�9>,R��W��3�3� d�JeTYE.Mϧ��-�o�j3+y��y^�c�������VO�9NV\nd�1 ��!͕_)a�v;����թ�M�lWR1��)El��P;��yوÏ�u 3�k�5Pr6<�⒲l�!˞*��u־�n�!�l:����UNW ��%��Chx8vL'��X�@��*��)���̮��ˍ��� ���D-M�+J�U�kvK����+�x8��cY������?�Ԡ��~3mo��|�u@[XeY�C�\Kp�x8�oC�C�&����N�~3-H���� ��MX�s�u<`���~"WL��$8ξ��3���a�)|:@�m�\���^�`�@ҷ)�5p+��6���p�%i)P M���ngc�����#0Aruz���RL+xSS?���ʮ}()#�t��mˇ!��0}}y����<�e� �-ή�Ԩ��X������ MF���ԙ~l L.3���}�V뽺�v�����멬��Nl�)�2����^�Iq��a��M��qG��T�����c3#������3U�Ǎ���}��לS�|qa��ڃ�+���-��2�f����/��bz��ڐ�� �ݼ[2�ç����k�X�2�* �Z�d���J�G����M*9W���s{��w���T��x��y,�in�O�v��]���n����P�$�JB@=4�OTI�n��e�22a\����q�d���%�$��(���:���: /*�K[PR�fr\nڙdN���F�n�$�4�[�� U�zƶ����� �mʋ���,�ao�u 3�z� �x��Kn����\[��VFmbE;�_U��&V�Gg�]L�۪&#n%�$ɯ�dG���D�TI=�%+AB�Ru#��b4�1�»x�cs�YzڙJG��f��Il��d�eF'T� iA��T���uC�$����Y��H?����[!G`}���ͪ� �纤Hv\������j�Ex�K���!���OiƸ�Yj�+u-<���'q����uN�*�r\��+�]���<�wOZ.fp�ێ��,-*)V?j-kÊ#�`�r��dV����(�ݽBk�����G�ƛk�QmUڗe��Z���f}|����8�8��a���i��3'J�����~G_�^���d�8w������ R�`(�~�.��u���l�s+g�bv���W���lGc}��u���afE~1�Ue������Z�0�8�=e�� f@/�jqEKQQ�J��oN��J���W5~M>$6�Lt�;$ʳ{���^��6�{����v6���ķܰg�V�cnn �~z�x�«�,2�u�?cE+Ș�H؎�%�Za�)���X>uW�Tz�Nyo����s���FQƤ��$��*�&�LLXL)�1�" L��eO��ɟ�9=���:t��Z���c��Ž���Y?�ӭV�wv�~,Y��r�ۗ�|�y��GaF�����C�����.�+� ���v1���fήJ�����]�S��T��B��n5sW}y�$��~z�'�c ��8 ��� ,! �p��VN�S��N�N�q��y8z˱�A��4��*��'������2n<�s���^ǧ˭P�Jޮɏ�U�G�L�J�*#��<�V��t7�8����TĜ>��i}K%,���)[��z�21z ?�N�i�n1?T�I�R#��m-�����������������1����lA�`��fT5+��ܐ�c�q՝��ʐ��,���3�f2U�եmab��#ŠdQ�y>\��)�SLY����w#��.���ʑ�f��� ,"+�w�~�N�'�c�O�3F�������N<���)j��&��,-� �љ���֊�_�zS���TǦ����w�>��?�������n��U仆�V���e�����0���$�C�d���rP �m�׈e�Xm�Vu� �L��.�bֹ��� �[Դaզ���*��\y�8�Է:�Ez\�0�Kq�C b��̘��cө���Q��=0Y��s�N��S.���3.���O�o:���#���v7�[#߫ ��5�܎�L���Er4���9n��COWlG�^��0k�%<���ZB���aB_���������'=��{i�v�l�$�uC���mƎҝ{�c㱼�y]���W�i ��ߧc��m�H� m�"�"�����;Y�ߝ�Z�Ǔ�����:S#��|}�y�,/k�Ld� TA�(�AI$+I3��;Y*���Z��}|��ӧO��d�v��..#:n��f>�>���ȶI�TX��� 8��y����"d�R�|�)0���=���n4��6ⲑ�+��r<�O�܂~zh�z����7ܓ�HH�Ga롏���nCo�>������a ���~]���R���̲c?�6(�q�;5%� |�uj�~z8R=X��I�V=�|{v�Gj\gc��q����z�؋%M�ߍ����1y��#��@f^���^�>N�����#x#۹��6�Y~�?�dfPO��{��P�4��V��u1E1J �*|���%���JN��`eWu�zk M6���q t[�� ��g�G���v��WIG��u_ft����5�j�"�Y�:T��ɐ���*�;� e5���4����q$C��2d�}���� _S�L#m�Yp��O�.�C�;��c����Hi#֩%+) �Ӎ��ƲV���SYź��g |���tj��3�8���r|���V��1#;.SQ�A[���S������#���`n�+���$��$I �P\[�@�s��(�ED�z���P��])8�G#��0B��[ى��X�II�q<��9�~[Z멜�Z�⊔IWU&A>�P~�#��dp<�?����7���c��'~���5 ��+$���lx@�M�dm��n<=e�dyX��?{�|Aef ,|n3�<~z�ƃ�uۧ�����P��Y,�ӥQ�*g�#먙R�\���;T��i,��[9Qi歉����c>]9�� ��"�c��P�� �Md?٥��If�ت�u��k��/����F��9�c*9��Ǎ:�ØF���z�n*�@|I�ށ9����N3{'��[�'ͬ�Ҳ4��#}��!�V� Fu��,�,mTIk���v C�7v���B�6k�T9��1�*l� '~��ƞF��lU��'�M ����][ΩũJ_�{�i�I�n��$���L�� j��O�dx�����kza۪��#�E��Cl����x˘�o�����V���ɞ�ljr��)�/,�߬h�L��#��^��L�ф�,íMƁe�̩�NB�L�����iL����q�}��(��q��6IçJ$�W�E$��:������=#����(�K�B����zђ <��K(�N�۫K�w��^O{!����)�H���>x�������lx�?>Պ�+�>�W���,Ly!_�D���Ō�l���Q�!�[ �S����J��1��Ɛ�Y}��b,+�Lo�x�ɓ)����=�y�oh�@�꥟/��I��ѭ=��P�y9��� �ۍYӘ�e+�p�Jnϱ?V\SO%�(�t� ���=?MR�[Ș�����d�/ ��n�l��B�7j� ��!�;ӥ�/�[-���A�>�dN�sLj ��,ɪv��=1c�.SQ�O3�U���ƀ�ܽ�E����������̻��9G�ϷD�7(�}��Ävӌ\�y�_0[w ���<΍>����a_��[0+�L��F.�޺��f�>oN�T����q;���y\��bՃ��y�jH�<|q-eɏ�_?_9+P���Hp$�����[ux�K w�Mw��N�ی'$Y2�=��q���KB��P��~������Yul:�[<����F1�2�O���5=d����]Y�sw:���Ϯ���E��j,_Q��X��z`H1,#II ��d�wr��P˂@�ZJV����y$�\y�{}��^~���[:N����ߌ�U�������O��d�����ؾe��${p>G��3c���Ė�lʌ�� ת��[��`ϱ�-W����dg�I��ig2��� ��}s ��ؤ(%#sS@���~���3�X�nRG�~\jc3�v��ӍL��M[JB�T��s3}��j�Nʖ��W����;7��ç?=X�F=-�=����q�ߚ���#���='�c��7���ڑW�I(O+=:uxq�������������e2�zi+�kuG�R��������0�&e�n���iT^J����~\jy���p'dtG��s����O��3����9* �b#Ɋ�� p������[Bws�T�>d4�ۧs���nv�n���U���_�~,�v����ƜJ1��s�� �QIz��)�(lv8M���U=�;����56��G���s#�K���MP�=��LvyGd��}�VwWBF�'�à �?MH�U�g2�� ����!�p�7Q��j��ڴ����=��j�u��� Jn�A s���uM������e��Ɔ�Ҕ�!)'��8Ϣ�ٔ��ޝ(��Vp���צ֖d=�IC�J�Ǡ{q������kԭ�߸���i��@K����u�|�p=..�*+����x�����z[Aqġ#s2a�Ɗ���RR�)*HRsi�~�a &f��M��P����-K�L@��Z��Xy�'x�{}��Zm+���:�)�) IJ�-i�u���� ���ܒH��'�L(7�y�GӜq���� j��� 6ߌg1�g�o���,kر���tY�?W,���p���e���f�OQS��!K�۟cҒA�|ս�j�>��=⬒��˧L[�� �߿2JaB~R��u�:��Q�] �0H~���]�7��Ƽ�I���(}��cq '�ήET���q�?f�ab���ӥvr� �)o��-Q��_'����ᴎo��K������;��V���o��%���~OK ����*��b�f:���-ťIR��`B�5!RB@���ï�� �u �̯e\�_U�_������� g�ES��3�������QT��a����x����U<~�c?�*�#]�MW,[8O�a�x��]�1bC|踤�P��lw5V%�)�{t�<��d��5���0i�XSU��m:��Z�┵�i�"��1�^B�-��P�hJ��&)O��*�D��c�W��vM��)����}���P��ܗ-q����\mmζZ-l@�}��a��E�6��F�@��&Sg@���ݚ�M����� ȹ 4����#p�\H����dYDo�H���"��\��..R�B�H�z_�/5˘����6��KhJR��P�mƶi�m���3�,#c�co��q�a)*Pt����R�m�k�7x�D�E�\Y�閣_X�<���~�)���c[[�BP����6�Yq���S��0����%_����;��Àv�~�| VS؇ ��'O0��F0��\���U�-�d@�����7�SJ*z��3n��y��P����O���������m�~�P�3|Y��ʉr#�C�<�G~�.,! ���bqx���h~0=��!ǫ�jy����l�O,�[B��~��|9��ٱ����Xly�#�i�B��g%�S��������tˋ���e���ې��\[d�t)��.+u�|1 ������#�~Oj����hS�%��i.�~X���I�H�m��0n���c�1uE�q��cF�RF�o���7� �O�ꮧ� ���ۛ{��ʛi5�rw?׌#Qn�TW��~?y$��m\�\o����%W� ?=>S�N@�� �Ʈ���R����N�)�r"C�:��:����� �����#��qb��Y�. �6[��2K����2u�Ǧ�HYR��Q�MV��� �G�$��Q+.>�����nNH��q�^��� ����q��mM��V��D�+�-�#*�U�̒ ���p욳��u:�������IB���m���PV@O���r[b= �� ��1U�E��_Nm�yKbN�O���U�}�the�`�|6֮P>�\2�P�V���I�D�i�P�O;�9�r�mAHG�W�S]��J*�_�G��+kP�2����Ka�Z���H�'K�x�W�MZ%�O�YD�Rc+o��?�q��Ghm��d�S�oh�\�D�|:W������UA�Qc yT�q������~^�H��/��#p�CZ���T�I�1�ӏT����4��"�ČZ�����}��`w�#�*,ʹ�� ��0�i��課�Om�*�da��^gJ݅{���l�e9uF#T�ֲ��̲�ٞC"�q���ߍ ոޑ�o#�XZTp����@ o�8��(jd��xw�]�,f���`~�|,s��^����f�1���t��|��m�򸄭/ctr��5s��7�9Q�4�H1꠲BB@l9@���C�����+�wp�xu�£Yc�9��?`@#�o�mH�s2��)�=��2�.�l����jg�9$�Y�S�%*L������R�Y������7Z���,*=�䷘$�������arm�o�ϰ���UW.|�r�uf����IGw�t����Zwo��~5 ��YյhO+=8fF�)�W�7�L9lM�̘·Y���֘YLf�큹�pRF���99.A �"wz��=E\Z���'a� 2��Ǚ�#;�'}�G���*��l��^"q��+2FQ� hj��kŦ��${���ޮ-�T�٭cf�|�3#~�RJ����t��$b�(R��(����r���dx� >U b�&9,>���%E\� Ά�e�$��'�q't��*�א���ެ�b��-|d���SB�O�O��$�R+�H�)�܎�K��1m`;�J�2�Y~9��O�g8=vqD`K[�F)k�[���1m޼c��n���]s�k�z$@��)!I �x՝"v��9=�ZA=`Ɠi �:�E��)`7��vI��}d�YI�_ �o�:ob���o ���3Q��&D&�2=�� �Ά��;>�h����y.*ⅥS������Ӭ�+q&����j|UƧ����}���J0��WW< ۋS�)jQR�j���Ư��rN)�Gű�4Ѷ(�S)Ǣ�8��i��W52���No˓� ۍ%�5brOn�L�;�n��\G����=�^U�dI���8$�&���h��'���+�(������cȁ߫k�l��S^���cƗjԌE�ꭔ��gF���Ȓ��@���}O���*;e�v�WV���YJ\�]X'5��ղ�k�F��b 6R�o՜m��i N�i����>J����?��lPm�U��}>_Z&�KK��q�r��I�D�Չ~�q�3fL�:S�e>���E���-G���{L�6p�e,8��������QI��h��a�Xa��U�A'���ʂ���s�+טIjP�-��y�8ۈZ?J$��W�P� ��R�s�]��|�l(�ԓ��sƊi��o(��S0��Y� 8�T97.�����WiL��c�~�dxc�E|�2!�X�K�Ƙਫ਼�$((�6�~|d9u+�qd�^3�89��Y�6L�.I�����?���iI�q���9�)O/뚅����O���X��X�V��ZF[�یgQ�L��K1���RҖr@v�#��X�l��F���Нy�S�8�7�kF!A��sM���^rkp�jP�DyS$N���q��nxҍ!U�f�!eh�i�2�m���`�Y�I�9r�6� �TF���C}/�y�^���Η���5d�'��9A-��J��>{�_l+�`��A���[�'��յ�ϛ#w:݅�%��X�}�&�PSt�Q�"�-��\縵�/����$Ɨh�Xb�*�y��BS����;W�ջ_mc�����vt?2}1�;qS�d�d~u:2k5�2�R�~�z+|HE!)�Ǟl��7`��0�<�,�2*���Hl-��x�^����'_TV�gZA�'j� ^�2Ϊ��N7t�����?w�� �x1��f��Iz�C-Ȗ��K�^q�;���-W�DvT�7��8�Z�������� hK�(P:��Q- �8�n�Z���܃e貾�<�1�YT<�,�����"�6{/ �?�͟��|1�:�#g��W�>$����d��J��d�B��=��jf[��%rE^��il:��B���x���Sּ�1հ��,�=��*�7 fcG��#q� �eh?��2�7�����,�!7x��6�n�LC�4x��},Geǝ�tC.��vS �F�43��zz\��;QYC,6����~;RYS/6���|2���5���v��T��i����������mlv��������&� �nRh^ejR�LG�f���? �ۉҬܦƩ��|��Ȱ����>3����!v��i�ʯ�>�v��オ�X3e���_1z�Kȗ\<������!�8���V��]��?b�k41�Re��T�q��mz��TiOʦ�Z��Xq���L������q"+���2ۨ��8}�&N7XU7Ap�d�X��~�׿��&4e�o�F��� �H����O���č�c�� 懴�6���͉��+)��v;j��ݷ�� �UV�� i��� j���Y9GdÒJ1��詞�����V?h��l����l�cGs�ځ�������y�Ac�����\V3�? �� ܙg�>qH�S,�E�W�[�㺨�uch�⍸�O�}���a��>�q�6�n6����N6�q������N ! 1AQaq�0@����"2BRb�#Pr���3C`��Scst���$4D���%Td�� ?���N����a��3��m���C���w��������xA�m�q�m���m������$����4n淿t'��C"w��zU=D�\R+w�p+Y�T�&�պ@��ƃ��3ޯ?�Aﶂ��aŘ���@-�����Q�=���9D��ռ�ѻ@��M�V��P��܅�G5�f�Y<�u=,EC)�<�Fy'�"�&�չ�X~f��l�KԆV��?�� �W�N����=(� �;���{�r����ٌ�Y���h{�١������jW����P���Tc�����X�K�r��}���w�R��%��?���E��m�� �Y�q|����\lEE4���r���}�lsI�Y������f�$�=�d�yO����p�����yBj8jU�o�/�S��?�U��*������ˍ�0������u�q�m [�?f����a�� )Q�>����6#������� ?����0UQ����,IX���(6ڵ[�DI�MNލ�c&���υ�j\��X�R|,4��� j������T�hA�e��^���d���b<����n�� �즇�=!���3�^�`j�h�ȓr��jẕ�c�,ٞX����-����a�ﶔ���#�$��]w�O��Ӫ�1y%��L�Y<�wg#�ǝ�̗`�x�xa�t�w��»1���o7o5��>�m뭛C���Uƃߜ}�C���y1Xνm�F8�jI���]����H���ۺиE@I�i;r�8ӭ����V�F�Շ| ��&?�3|x�B�MuS�Ge�=Ӕ�#BE5G�����Y!z��_e��q�р/W>|-�Ci߇�t�1ޯќd�R3�u��g�=0 5��[?�#͏��q�cf���H��{ ?u�=?�?ǯ���}Z��z���hmΔ�BFTW�����<�q�(v� ��!��z���iW]*�J�V�z��gX֧A�q�&��/w���u�gYӘa���; �i=����g:��?2�dž6�ى�k�4�>�Pxs����}������G�9��3 ���)gG�R<>r h�$��'nc�h�P��Bj��J�ҧH� -��N1���N��?��~��}-q!=��_2hc�M��l�vY%UE�@|�v����M2�.Y[|y�"Eï��K�ZF,�ɯ?,q�?v�M 80jx�"�;�9vk�����+ ֧�� �ȺU��?�%�vcV��mA�6��Qg^M����A}�3�nl� QRN�l8�kkn�'�����(��M�7m9و�q���%ޟ���*h$Zk"��$�9��: �?U8�Sl��,,|ɒ��xH(ѷ����Gn�/Q�4�P��G�%��Ա8�N��!� �&�7�;���eKM7�4��9R/%����l�c>�x;������>��C�:�����t��h?aKX�bhe�ᜋ^�$�Iհ �hr7%F$�E��Fd���t��5���+�(M6�t����Ü�UU|zW�=a�Ts�Tg������dqP�Q����b'�m���1{|Y����X�N��b �P~��F^F:����k6�"�j!�� �I�r�`��1&�-$�Bevk:y���#yw��I0��x��=D�4��tU���P�ZH��ڠ底taP��6����b>�xa����Q�#� WeF��ŮNj�p�J* mQ�N����*I�-*�ȩ�F�g�3 �5��V�ʊ�ɮ�a��5F���O@{���NX��?����H�]3��1�Ri_u��������ѕ�� ����0��� F��~��:60�p�͈�S��qX#a�5>���`�o&+�<2�D����: �������ڝ�$�nP���*)�N�|y�Ej�F�5ټ�e���ihy�Z �>���k�bH�a�v��h�-#���!�Po=@k̆IEN��@��}Ll?j�O������߭�ʞ���Q|A07x���wt!xf���I2?Z��<ץ�T���cU�j��]��陎Ltl �}5�ϓ��$�,��O�mˊ�;�@O��jE��j(�ا,��LX���LO���Ц�90�O �.����a��nA���7������j4 ��W��_ٓ���zW�jcB������y՗+EM�)d���N�g6�y1_x��p�$Lv:��9�"z��p���ʙ$��^��JԼ*�ϭ����o���=x�Lj�6�J��u82�A�H�3$�ٕ@�=Vv�]�'�qEz�;I˼��)��=��ɯ���x �/�W(V���p�����$ �m�������u�����񶤑Oqˎ�T����r��㠚x�sr�GC��byp�G��1ߠ�w e�8�$⿄����/�M{*}��W�]˷.�CK\�ުx���/$�WPw���r� |i���&�}�{�X� �>��$-��l���?-z���g����lΆ���(F���h�vS*���b���߲ڡn,|)mrH[���a�3�ר�[1��3o_�U�3�TC�$��(�=�)0�kgP���� ��u�^=��4 �WYCҸ:��vQ�ר�X�à��tk�m,�t*��^�,�}D*� �"(�I��9R����>`�`��[~Q]�#af��i6l��8���6�:,s�s�N6�j"�A4���IuQ��6E,�GnH��zS�HO�uk�5$�I�4��ؤ�Q9�@��C����wp�BGv[]�u�Ov���0I4���\��y�����Q�Ѹ��~>Z��8�T��a��q�ޣ;z��a���/��S��I:�ܫ_�|������>=Z����8:�S��U�I�J��"IY���8%b8���H��:�QO�6�;7�I�S��J��ҌAά3��>c���E+&jf$eC+�z�;��V����� �r���ʺ������my�e���aQ�f&��6�ND��.:��NT�vm�<- u���ǝ\MvZY�N�NT��-A�>jr!S��n�O 1�3�Ns�%�3D@���`������ܟ 1�^c<���� �a�ɽ�̲�Xë#�w�|y�cW�=�9I*H8�p�^(4���՗�k��arOcW�tO�\�ƍR��8����'�K���I�Q�����?5�>[�}��yU�ײ -h��=��% q�ThG�2�)���"ו3]�!kB��*p�FDl�A���,�eEi�H�f�Ps�����5�H:�Փ~�H�0Dت�D�I����h�F3�������c��2���E��9�H��5�zԑ�ʚ�i�X�=:m�xg�hd(�v����׊�9iS��O��d@0ڽ���:�p�5�h-��t�&���X�q�ӕ,��ie�|���7A�2���O%P��E��htj��Y1��w�Ѓ!����  ���� ࢽ��My�7�\�a�@�ţ�J �4�Ȼ�F�@o�̒?4�wx��)��]�P��~�����u�����5�����7X ��9��^ܩ�U;Iꭆ 5 �������eK2�7(�{|��Y׎ �V��\"���Z�1� Z�����}��(�Ǝ"�1S���_�vE30>���p;� ΝD��%x�W�?W?v����o�^V�i�d��r[��/&>�~`�9Wh��y�;���R��� ;;ɮT��?����r$�g1�K����A��C��c��K��l:�'��3 c�ﳯ*"t8�~l��)���m��+U,z��`(�>yJ�?����h>��]��v��ЍG*�{`��;y]��I�T� ;c��NU�fo¾h���/$���|NS���1�S�"�H��V���T���4��uhǜ�]�v;���5�͠x��'C\�SBpl���h}�N����� A�Bx���%��ޭ�l��/����T��w�ʽ]D�=����K���ž�r㻠l4�S�O?=�k �M:� ��c�C�a�#ha���)�ѐxc�s���gP�iG��{+���x���Q���I= �� z��ԫ+ �8"�k�ñ�j=|����c ��y��CF��/��*9ж�h{ �?4�o� ��k�m�Q�N�x��;�Y��4膚�a�w?�6�>e]�����Q�r�:����g�,i"�����ԩA�*M�<�G��b�if��l^M��5� �Ҩ�{����6J��ZJ�����P�*�����Y���ݛu�_4�9�I8�7���������,^ToR���m4�H��?�N�S�ѕw��/S��甍�@�9H�S�T��t�ƻ���ʒU��*{Xs�@����f�����֒Li�K{H�w^���������Ϥm�tq���s� ���ք��f:��o~s��g�r��ט� �S�ѱC�e]�x���a��) ���(b-$(�j>�7q�B?ӕ�F��hV25r[7 Y� }L�R��}����*sg+��x�r�2�U=�*'WS��ZDW]�WǞ�<��叓���{�$�9Ou4��y�90-�1�'*D`�c�^o?(�9��u���ݐ��'PI&� f�Jݮ�������:wS����jfP1F:X �H�9dԯ���˝[�_54 �}*;@�ܨ�� ð�yn�T���?�ןd�#���4rG�ͨ��H�1�|-#���Mr�S3��G�3�����)�.᧏3v�z֑��r����$G"�`j �1t��x0<Ɔ�Wh6�y�6��,œ�Ga��gA����y��b��)��h�D��ß�_�m��ü �gG;��e�v��ݝ�nQ� ��C����-�*��o���y�a��M��I�>�<���]obD��"�:���G�A��-\%LT�8���c�)��+y76���o�Q�#*{�(F�⽕�y����=���rW�\p���۩�c���A���^e6��K������ʐ�cVf5$�'->���ՉN"���F�"�UQ@�f��Gb~��#�&�M=��8�ט�JNu9��D��[̤�s�o�~������ G��9T�tW^g5y$b��Y'��س�Ǵ�=��U-2 #�MC�t(�i� �lj�@Q 5�̣i�*�O����s�x�K�f��}\��M{E�V�{�υ��Ƈ�����);�H����I��fe�Lȣr�2��>��W�I�Ȃ6������i��k�� �5�YOxȺ����>��Y�f5'��|��H+��98pj�n�.O�y�������jY��~��i�w'������l�;�s�2��Y��:'lg�ꥴ)o#'Sa�a�K��Z� �m��}�`169�n���"���x��I ��*+� }F<��cГ���F�P�������ֹ*�PqX�x۩��,� ��N�� �4<-����%����:��7����W���u�`����� $�?�I��&����o��o��`v�>��P��"��l���4��5'�Z�gE���8���?��[�X�7(��.Q�-��*���ތL@̲����v��.5���[��=�t\+�CNܛ��,g�SQnH����}*F�G16���&:�t��4ُ"A��̣��$�b �|����#rs��a�����T�� ]�<�j��BS�('$�ɻ� �wP;�/�n��?�ݜ��x�F��yUn�~mL*-�������Xf�wd^�a�}��f�,=t�׵i�.2/wpN�Ep8�OР���•��R�FJ� 55TZ��T �ɭ�<��]��/�0�r�@�f��V��V����Nz�G��^���7hZi����k��3�,kN�e|�vg�1{9]_i��X5y7� 8e]�U����'�-2,���e"����]ot�I��Y_��n�(JҼ��1�O ]bXc���Nu�No��pS���Q_���_�?i�~�x h5d'�(qw52] ��'ޤ�q��o1�R!���`ywy�A4u���h<קy���\[~�4�\ X�Wt/� 6�����n�F�a8��f���z �3$�t(���q��q�x��^�XWeN'p<-v�!�{�(>ӽDP7��ո0�y)�e$ٕv�Ih'Q�EA�m*�H��RI��=:��� ���4牢) �%_iN�ݧ�l]� �Nt���G��H�L��� ɱ�g<���1V�,�J~�ٹ�"K��Q�� 9�HS�9�?@��k����r�;we݁�]I�!{ �@�G�[�"��`���J:�n]�{�cA�E����V��ʆ���#��U9�6����j�#Y�m\��q�e4h�B�7��C�������d<�?J����1g:ٳ���=Y���D�p�ц� ׈ǔ��1�]26؜oS�'��9�V�FVu�P�h�9�xc�oq�X��p�o�5��Ա5$�9W�V(�[Ak�aY錎qf;�'�[�|���b�6�Ck��)��#a#a˙��8���=äh�4��2��C��4tm^ �n'c���]GQ$[Wҿ��i���vN�{Fu ��1�gx��1┷���N�m��{j-,��x�� Ūm�ЧS�[�s���Gna���䑴�� x�p 8<������97�Q���ϴ�v�aϚG��Rt�Һ׈�f^\r��WH�JU�7Z���y)�vg=����n��4�_)y��D'y�6�]�c�5̪�\� �PF�k����&�c;��cq�$~T�7j ���nç]�<�g ":�to�t}�159�<�/�8������m�b�K#g'I'.W�����6��I/��>v��\�MN��g���m�A�yQL�4u�Lj�j9��#44�t��l^�}L����n��R��!��t��±]��r��h6ٍ>�yҏ�N��fU�� ���� Fm@�8}�/u��jb9������he:A�y�ծw��GpΧh�5����l}�3p468��)U��d��c����;Us/�֔�YX�1�O2��uq�s��`hwg�r~�{ R��mhN��؎*q 42�*th��>�#���E����#��Hv�O����q�}�����6�e��\�,Wk�#���X��b>��p}�դ��3���T5��†��6��[��@�P�y*n��|'f�֧>�lư΂�̺����SU�'*�q�p�_S�����M�� '��c�6�����m�� ySʨ;M��r���Ƌ�m�Kxo,���Gm�P��A�G�:��i��w�9�}M(�^�V��$ǒ�ѽ�9���|���� �a����J�SQ�a���r�B;����}���ٻ֢�2�%U���c�#�g���N�a�ݕ�'�v�[�OY'��3L�3�;,p�]@�S��{ls��X�'���c�jw�k'a�.��}�}&�� �dP�*�bK=ɍ!����;3n�gΊU�ߴmt�'*{,=SzfD� A��ko~�G�aoq�_mi}#�m�������P�Xhύ����mxǍ�΂���巿zf��Q���c���|kc�����?���W��Y�$���_Lv����l߶��c���`?����l�j�ݲˏ!V��6����U�Ђ(A���4y)H���p�Z_�x��>���e��R��$�/�`^'3qˏ�-&Q�=?��CFVR �D�fV�9��{�8g�������n�h�(P"��6�[�D���< E�����~0<@�`�G�6����Hг�cc�� �c�K.5��D��d�B���`?�XQ��2��ٿyqo&+�1^� DW�0�ꊩ���G�#��Q�nL3��c���������/��x ��1�1[y�x�პCW��C�c�UĨ80�m�e�4.{�m��u���I=��f�����0QRls9���f���������9���~f�����Ǩ��a�"@�8���ȁ�Q����#c�ic������G��$���G���r/$W�(��W���V�"��m�7�[m�A�m����bo��D� j����۳� l���^�k�h׽����� ��#� iXn�v��eT�k�a�^Y�4�BN��ĕ��0 !01@Q"2AaPq3BR������?���@4�Q�����T3,���㺠�W�[=JK�Ϟ���2�r^7��vc�:�9 �E�ߴ�w�S#d���Ix��u��:��Hp��9E!�� V 2;73|F��9Y���*ʬ�F��D����u&���y؟��^EA��A��(ɩ���^��GV:ݜDy�`��Jr29ܾ�㝉��[���E;Fzx��YG��U�e�Y�C���� ����v-tx����I�sם�Ę�q��Eb�+P\ :>�i�C'�;�����k|z�رn�y]�#ǿb��Q��������w�����(�r|ӹs��[�D��2v-%��@;�8<a���[\o[ϧw��I!��*0�krs)�[�J9^��ʜ��p1)� "��/_>��o��<1����A�E�y^�C��`�x1'ܣn�p��s`l���fQ��):�l����b>�Me�jH^?�kl3(�z:���1ŠK&?Q�~�{�ٺ�h�y���/�[��V�|6��}�KbX����mn[-��7�5q�94�������dm���c^���h� X��5��<�eޘ>G���-�}�دB�ޟ� ��|�rt�M��V+�]�c?�-#ڛ��^ǂ}���Lkr���O��u�>�-D�ry� D?:ޞ�U��ǜ�7�V��?瓮�"�#���r��չģVR;�n���/_� ؉v�ݶe5d�b9��/O��009�G���5n�W����JpA�*�r9�>�1��.[t���s�F���nQ� V 77R�]�ɫ8����_0<՜�IF�u(v��4��F�k�3��E)��N:��yڮe��P�`�1}�$WS��J�SQ�N�j�ٺ��޵�#l���ј(�5=��5�lǏmoW�v-�1����v,W�mn��߀$x�<����v�j(����c]��@#��1������Ǔ���o'��u+����;G�#�޸��v-lη��/(`i⣍Pm^���ԯ̾9Z��F��������n��1��� ��]�[��)�'������:�֪�W��FC����� �B9،!?���]��V��A�Վ�M��b�w��G F>_DȬ0¤�#�QR�[V��kz���m�w�"��9ZG�7'[��=�Q����j8R?�zf�\a�=��O�U����*oB�A�|G���2�54 �p��.w7� �� ��&������ξxGHp� B%��$g�����t�Џ򤵍z���HN�u�Я�-�'4��0��;_��3 !01"@AQa2Pq#3BR������?��ʩca��en��^��8���<�u#��m*08r��y�N"�<�Ѳ0��@\�p��� �����Kv�D��J8�Fҽ� �f�Y��-m�ybX�NP����}�!*8t(�OqѢ��Q�wW�K��ZD��Δ^e��!� ��B�K��p~�����e*l}z#9ң�k���q#�Ft�o��S�R����-�w�!�S���Ӥß|M�l޶V��!eˈ�8Y���c�ЮM2��tk���� ������J�fS����Ö*i/2�����n]�k�\���|4yX�8��U�P.���Ы[���l��@"�t�<������5�lF���vU�����W��W��;�b�cД^6[#7@vU�xgZv��F�6��Q,K�v��� �+Ъ��n��Ǣ��Ft���8��0��c�@�!�Zq s�v�t�;#](B��-�nῃ~���3g������5�J�%���O������n�kB�ĺ�.r��+���#�N$?�q�/�s�6��p��a����a��J/��M�8��6�ܰ"�*������ɗud"\w���aT(����[��F��U՛����RT�b���n�*��6���O��SJ�.�ij<�v�MT��R\c��5l�sZB>F��<7�;EA��{��E���Ö��1U/�#��d1�a�n.1ě����0�ʾR�h��|�R��Ao�3�m3 ��%�� ���28Q� ��y��φ���H�To�7�lW>����#i`�q���c����a��� �m,B�-j����݋�'mR1Ήt�>��V��p���s�0IbI�C.���1R�ea�����]H�6����������4B>��o��](��$B���m�����a�!=��?�B� K�Ǿ+�Ծ"�n���K��*��+��[T#�{E�J�S����Q�����s�5�:�U�\wĐ�f�3����܆&�)����I���Ԇw��E T�lrTf6Q|R�h:��[K�� �z��c֧�G�C��%\��_�a�84��HcO�bi��ؖV��7H �)*ģK~Xhչ0��4?�0��� �E<���}3���#���u�?�� ��|g�S�6ꊤ�|�I#Hڛ� �ա��w�X��9��7���Ŀ%�SL��y6č��|�F�a 8���b��$�sק�h���b9RAu7�˨p�Č�_\*w��묦��F ����4D~�f����|(�"m���NK��i�S�>�$d7SlA��/�²����SL��|6N�}���S�˯���g��]6��; �#�.��<���q'Q�1|KQ$�����񛩶"�$r�b:���N8�w@��8$�� �AjfG|~�9F ���Y��ʺ��Bwؒ������M:I岎�G��`s�YV5����6��A �b:�W���G�q%l�����F��H���7�������Fsv7��k�� 403WebShell
403Webshell
Server IP : 64.57.112.4  /  Your IP : 216.73.216.57
Web Server : Microsoft-IIS/10.0
System : Windows NT WP 10.0 build 17763 (Windows Server 2016) AMD64
User : voguebusinesssuppliers ( 0)
PHP Version : 7.3.3
Disable Function : NONE
MySQL : OFF  |  cURL : ON  |  WGET : OFF  |  Perl : OFF  |  Python : OFF  |  Sudo : OFF  |  Pkexec : OFF
Directory :  /WEBS/sic/wp-content/plugins/bb-plugin/js/

Upload File :
current_dir [ Writeable ] document_root [ Writeable ]

 

Command :


[ Back ]     

Current File : /WEBS/sic/wp-content/plugins/bb-plugin/js/fl-builder-preview.js
(function($){

	/**
	 * Helper class for dealing with live previews.
	 *
	 * @class FLBuilderPreview
	 * @since 1.3.3
	 * @param {Object} config
	 */
	FLBuilderPreview = function( config )
	{
		// Set the preview ID.
		this.id = new Date().getTime();

		// Set the type.
		this.type = config.type;

		// Save the current state.
		this._saveState();

		// Initialize the preview.
		if ( config.layout ) {
			FLBuilder._renderLayout( config.layout, function() {
				this._init();
				if ( config.callback ) {
					config.callback();
				}
			}.bind( this ) );
		} else {
			this._init();
		}
	};

	/**
	 * Stores all the fonts and weights of all font fields.
	 * This is used to render the stylesheet with Google Fonts.
	 *
	 * @since 1.6.3
	 * @access private
	 * @property {Array} _fontsList
	 */
	FLBuilderPreview._fontsList = {};

	/**
	 * Returns a formatted selector string for a preview.
	 *
	 * @since 2.1
	 * @method getFormattedSelector
	 * @param {String} selector A CSS selector string.
	 * @return {String}
	 */
	FLBuilderPreview.getFormattedSelector = function( prefix, selector = '' )
	{
		var formatted = '',
			pattern   = /,(?![^()]*\))/,
			parts 	  = selector.split( pattern ),
			i 	  	  = 0;

		for ( ; i < parts.length; i++ ) {

			if ( parts[ i ].indexOf( '{node}' ) > -1 ) {
				formatted += parts[ i ].replace( '{node}', prefix );
			} else if ( parts[ i ].indexOf( '{node_id}' ) > -1 ) {
				formatted += parts[ i ].replace( /{node_id}/g, this.nodeId );
			} else {
				formatted += prefix + ' ' + parts[ i ];
			}

			if ( i != parts.length - 1 ) {
				formatted += ', ';
			}
		}

		return formatted;
	};

	/**
	 * Prototype for new instances.
	 *
	 * @since 1.3.3
	 * @property {Object} prototype
	 */
	FLBuilderPreview.prototype = {

		/**
		 * A unique ID for this preview.
		 *
		 * @since 1.3.3
		 * @property {String} id
		 */
		id                	: '',

		/**
		 * The type of node that we are previewing.
		 *
		 * @since 1.3.3
		 * @property {String} type
		 */
		type                : '',

		/**
		 * The ID of node that we are previewing.
		 *
		 * @since 1.3.3
		 * @property {String} nodeId
		 */
		nodeId              : null,

		/**
		 * An object with data for each CSS class
		 * in the preview.
		 *
		 * @since 1.3.3
		 * @property {Object} classes
		 */
		classes             : {},

		/**
		 * An object with references to each element
		 * in the preview.
		 *
		 * @since 1.3.3
		 * @property {Object} elements
		 */
		elements            : {},

		/**
		 * An object that contains data for the current
		 * state of a layout before changes are made.
		 *
		 * @since 1.3.3
		 * @property {Object} state
		 */
		state               : null,

		/**
		 * Node settings saved when the preview was initalized.
		 *
		 * @since 1.7
		 * @access private
		 * @property {Object} _savedSettings
		 */
		_savedSettings       : null,

		/**
		 * An instance of FLStyleSheet for the current preview.
		 *
		 * @since 1.3.3
		 * @access private
		 * @property {FLStyleSheet} _styleSheet
		 */
		_styleSheet         : null,

		/**
		 * An instance of FLStyleSheet for the large device preview.
		 *
		 * @since 2.6
		 * @access private
		 * @property {FLStyleSheet} _styleSheetLarge
		 */
		_styleSheetLarge   : null,

		/**
		 * An instance of FLStyleSheet for the medium device preview.
		 *
		 * @since 1.9
		 * @access private
		 * @property {FLStyleSheet} _styleSheetMedium
		 */
		_styleSheetMedium   : null,

		/**
		 * An instance of FLStyleSheet for the responsive device preview.
		 *
		 * @since 1.9
		 * @access private
		 * @property {FLStyleSheet} _styleSheet
		 */
		_styleSheetResponsive : null,

		/**
		 * A timeout object for delaying the current preview refresh.
		 *
		 * @since 1.3.3
		 * @access private
		 * @property {Object} _timeout
		 */
		_timeout            : null,

		/**
		 * A timeout object for delaying when we show the loading
		 * graphic for refresh previews.
		 *
		 * @since 1.10
		 * @access private
		 * @property {Object} _loaderTimeout
		 */
		_loaderTimeout       : null,

		/**
		 * Stores the last classname for a classname preview.
		 *
		 * @since 1.3.3
		 * @access private
		 * @property {String} _lastClassName
		 */
		_lastClassName      : null,

		/**
		 * A reference to the AJAX object for a preview refresh.
		 *
		 * @since 1.3.3
		 * @access private
		 * @property {Object} _xhr
		 */
		_xhr                : null,

		/**
		 * Initializes a builder preview.
		 *
		 * @since 1.3.3
		 * @access private
		 * @method _init
		 */
		_init: function()
		{
			// Node Id
			this.nodeId = $('.fl-builder-settings', window.parent.document).data('node');

			// Save settings
			this._saveSettings();

			// Elements and Class Names
			this._initElementsAndClasses();

			// Create the preview stylesheets
			this._createSheets();

			this._bindEvents()
		},


		_bindEvents() {
			// Responsive previews
			this._initResponsivePreviews();

			// Default field previews
			this._initDefaultFieldPreviews();

			// Init
			switch(this.type) {

				case 'row':
				this._initRow();
				break;

				case 'col':
				this._initColumn();
				break;

				case 'module':
				case 'form':
				this._initModule();
				break;
			}

			FLBuilder.triggerHook( 'preview-init', this );
		},

		/**
		 * Saves the current settings to be checked to see if
		 * anything has changed when a preview is canceled.
		 *
		 * @since 1.7
		 * @access private
		 * @method _saveSettings
		 */
		_saveSettings: function()
		{
			var form = $('.fl-builder-settings-lightbox .fl-builder-settings', window.parent.document);

			this._savedSettings = FLBuilder._getSettingsForChangedCheck( this.nodeId, form );
		},

		/**
		 * Checks to see if the settings have changed.
		 *
		 * @since 1.7
		 * @access private
		 * @method _settingsHaveChanged
		 * @return bool
		 */
		_settingsHaveChanged: function()
		{
			var form 	 = $('.fl-builder-settings-lightbox .fl-builder-settings', window.parent.document),
				settings = FLBuilder._getSettings( form );

			return JSON.stringify( this._savedSettings ) != JSON.stringify( settings );
		},

		/**
		 * Initializes the classname and element references
		 * for this preview.
		 *
		 * @since 1.3.3
		 * @access private
		 * @method _initElementsAndClasses
		 */
		_initElementsAndClasses: function()
		{
			var contentClass;

			// Content Class
			if(this.type == 'row') {
				contentClass = '.fl-row-content-wrap';
			}
			else {
				contentClass = '.fl-' + this.type + '-content';
			}

			let formSelector = '.fl-builder-settings-lightbox:visible form.fl-builder-settings'

			// Class Names
			$.extend(this.classes, {
				settings        : formSelector,
				settingsHeader  : formSelector + ' .fl-lightbox-header',
				node            : FLBuilder._contentClass + ' .fl-node-' + this.nodeId,
				content         : FLBuilder._contentClass + ' .fl-node-' + this.nodeId + ' > ' + contentClass
			});

			// Elements
			$.extend(this.elements, {
				settings        : $(this.classes.settings, window.parent.document),
				settingsHeader  : $(this.classes.settingsHeader, window.parent.document),
				node            : $(this.classes.node),
				content         : $(this.classes.content)
			});
		},

		/**
		 * Creates the stylesheets for default, medium
		 * and responsive previews.
		 *
		 * @since 1.9
		 * @method _createSheets
		 */
		_createSheets: function()
		{
			this._destroySheets();

			if ( ! this._styleSheet ) {
				this._styleSheet = new FLStyleSheet( {
					id : 'fl-builder-preview',
					className : 'fl-builder-preview-style'
				} );
			}
			if ( ! this._styleSheetLarge) {
				this._styleSheetLarge = new FLStyleSheet( {
					id : 'fl-builder-preview-large',
					className : 'fl-builder-preview-style'
				} );
				this._styleSheetLarge.disable();
			}
			if ( ! this._styleSheetMedium ) {
				this._styleSheetMedium = new FLStyleSheet( {
					id : 'fl-builder-preview-medium',
					className : 'fl-builder-preview-style'
				} );
				this._styleSheetMedium.disable();
			}
			if ( ! this._styleSheetResponsive ) {
				this._styleSheetResponsive = new FLStyleSheet( {
					id : 'fl-builder-preview-responsive',
					className : 'fl-builder-preview-style'
				} );
				this._styleSheetResponsive.disable();
			}
		},

		/**
		 * Destroys all preview sheets.
		 *
		 * @since 1.9
		 * @method _destroySheets
		 */
		_destroySheets: function()
		{
			if ( this._styleSheet ) {
				this._styleSheet.destroy();
				this._styleSheet = null;
			}
			if ( this._styleSheetLarge ) {
				this._styleSheetLarge.destroy();
				this._styleSheetLarge = null;
			}
			if ( this._styleSheetMedium ) {
				this._styleSheetMedium.destroy();
				this._styleSheetMedium = null;
			}
			if ( this._styleSheetResponsive ) {
				this._styleSheetResponsive.destroy();
				this._styleSheetResponsive = null;
			}

			$( '.fl-builder-preview-style' ).remove();
		},

		/**
		 * Disables preview styles for the current
		 * responsive editing mode.
		 *
		 * @since 2.2
		 * @method _disableStyles
		 */
		_disableStyles: function()
		{
			var mode = FLBuilderResponsiveEditing._mode,
				config = FLBuilderConfig.global,
				node = this.elements.node;

			if ( 'responsive' === mode ) {
				FLBuilderSimulateMediaQuery.disableStyles( config.responsive_breakpoint );
				this._styleSheetResponsive.disable();
			} else if ( 'large' === mode ) {
				FLBuilderSimulateMediaQuery.disableStyles( config.large_breakpoint );
				this._styleSheetLarge.disable();
			} else if ( 'medium' === mode ) {
				FLBuilderSimulateMediaQuery.disableStyles( config.medium_breakpoint );
				this._styleSheetMedium.disable();
			}  else {
				node.removeClass( function( i, className ) {
					return ( className.match( /fl-node-[^\s]*/g ) || [] ).join( ' ' );
				} );
			}
		},

		/**
		 * Enables preview styles for the current
		 * responsive editing mode.
		 *
		 * @since 2.2
		 * @method _enableStyles
		 */
		_enableStyles: function()
		{
			var mode = FLBuilderResponsiveEditing._mode,
				node = this.elements.node;

			if ( 'responsive' === mode ) {
				FLBuilderSimulateMediaQuery.enableStyles();
				this._styleSheetResponsive.enable();
			} else if ( 'medium' === mode ) {
				FLBuilderSimulateMediaQuery.enableStyles();
				this._styleSheetMedium.enable();
			} else if ( 'large' === mode ) {
				FLBuilderSimulateMediaQuery.enableStyles();
				this._styleSheetLarge.enable();
			} else {
				node.addClass( 'fl-node-' + node.data( 'node' ) );
			}
		},

		/**
		 * Attempt to find the default value for a CSS property.
		 *
		 * @since 2.2
		 * @method _getDefaultValue
		 * @param {String} selector
		 * @param {String} property
		 * @return {String}
		 */
		_getDefaultValue: function( selector, property )
		{
			var value = '',
				element = $( selector ),
				node = element.closest( '[data-node]' ),
				ignore = [ 'line-height', 'font-weight' ];

			if ( 'width' === property ) {
				value = 'auto';
			} else if ( -1 === $.inArray( property, ignore ) && node.length ) {
				this._disableStyles();
				value = element.css( property );
				this._enableStyles();
			}

			return value;
		},

		/**
		 * Updates a CSS rule for this preview.
		 *
		 * @since 1.3.3
		 * @method updateCSSRule
		 * @param {String} selector The CSS selector to update.
		 * @param {String} property The CSS property to update.
		 * @param {String} value The CSS value to update.
		 * @param {String|Boolean} responsive If this preview is responsive or not.
		 */
		updateCSSRule: function( selector, property, value, responsive )
		{
			var mode = FLBuilderResponsiveEditing._mode,
				sheetKey = '';

			// Get the default value if needed.
			if ( '' === value || 'null' === value ) {
				value = this._getDefaultValue( selector, property );
			}

			// Update the rule.
			if ( responsive ) {
				if ( 'string' === typeof responsive ) {
					sheetKey = this.toUpperCaseWords( responsive );
				} else {
					sheetKey = 'default' === mode ? '' : this.toUpperCaseWords( mode );
				}
				this[ '_styleSheet' + sheetKey ].updateRule( selector, property, value );
			} else {
				this._styleSheet.updateRule( selector, property, value );
			}
		},

		/**
		 * Runs a delay with a callback.
		 *
		 * @since 1.3.3
		 * @method delay
		 * @param {Number} length How long to wait before running the callback.
		 * @param {Function} callback A function to call when the delay is complete.
		 */
		delay: function(length, callback)
		{
			this._cancelDelay();
			this._timeout = setTimeout(callback, length);
		},

		/**
		 * Cancels a preview refresh delay.
		 *
		 * @since 1.3.3
		 * @access private
		 * @method _cancelDelay
		 */
		_cancelDelay: function()
		{
			if(this._timeout !== null) {
				clearTimeout(this._timeout);
			}
			if(this._loaderTimeout !== null) {
				clearTimeout(this._loaderTimeout);
			}
		},

		/**
		 * Converts a hex value to an array of RGB values.
		 *
		 * @since 1.3.3
		 * @method hexToRgb
		 * @param {String} hex
		 * @return {Array}
		 */
		hexToRgb: function(hex)
		{
			var bigInt  = parseInt(hex, 16),
				r       = (bigInt >> 16) & 255,
				g       = (bigInt >> 8) & 255,
				b       = bigInt & 255;

			return [r, g, b];
		},

		/**
		 * Returns a hex or rgb formatted value.
		 *
		 * @since 2.0.3
		 * @method hexOrRgb
		 * @param {String} value
		 * @return {String}
		 */
		hexOrRgb: function( value )
		{
			if ( value.indexOf( 'rgb' ) < 0 && value.indexOf( '#' ) < 0 ) {
				value = '#' + value;
			}

			return value;
		},

		/**
		 * Parses a float or returns 0 if we don't have a number.
		 *
		 * @since 1.3.3
		 * @method parseFloat
		 * @param {Number} value
		 * @return {Number}
		 */
		parseFloat: function(value)
		{
			return isNaN(parseFloat(value)) ? 0 : parseFloat(value);
		},

		/* Responsive Previews
		----------------------------------------------------------*/

		/**
		 * Initializes logic for responsive previews.
		 *
		 * @since 1.9
		 * @method _initResponsivePreviews
		 */
		_initResponsivePreviews: function()
		{
			var namespace = '.preview-' + this.id;

			FLBuilder.addHook( 'responsive-editing-switched' + namespace, $.proxy( this._responsiveEditingSwitched, this ) );
			FLBuilder.addHook( 'responsive-editing-before-preview-fields' + namespace, $.proxy( this._responsiveEditingPreviewFields, this ) );
		},

		/**
		 * Destroys responsive preview events.
		 *
		 * @since 1.9
		 * @method _destroyResponsivePreviews
		 */
		_destroyResponsivePreviews: function()
		{
			var namespace = '.preview-' + this.id;

			FLBuilder.removeHook( 'responsive-editing-switched' + namespace );
			FLBuilder.removeHook( 'responsive-editing-before-preview-fields' + namespace );
		},

		/**
		 * Initializes logic for responsive previews.
		 *
		 * @since 1.9
		 * @method _responsiveEditingSwitched
		 */
		_responsiveEditingSwitched: function( e, mode )
		{
			if ( 'default' == mode ) {
				this._styleSheetLarge.disable();
				this._styleSheetMedium.disable();
				this._styleSheetResponsive.disable();
			}
			else if ( 'large' == mode ) {
				this._styleSheetLarge.enable();
				this._styleSheetMedium.disable();
				this._styleSheetResponsive.disable();
			}
			else if ( 'medium' == mode ) {
				this._styleSheetLarge.enable();
				this._styleSheetMedium.enable();
				this._styleSheetResponsive.disable();
			}
			else if ( 'responsive' == mode ) {
				this._styleSheetLarge.enable();
				this._styleSheetMedium.enable();
				this._styleSheetResponsive.enable();
			}
		},

		/**
		 * Logic that needs to run before field previews are triggered
		 * after responsive editing mode switches.
		 *
		 * @since 2.2
		 * @method _responsiveEditingPreviewFields
		 */
		_responsiveEditingPreviewFields: function( e, mode )
		{
			if ( 'large' === mode || 'medium' === mode ) {
				if ( 'col' === this.type && this.elements.node[0].style.width ) {
					size = parseFloat( this.elements.node[0].style.width );
					this.elements.size.val( size );
				}
			}
		},

		/**
		 * Deprecated. Use updateCSSRule instead.
		 *
		 * @since 1.9
		 */
		updateResponsiveCSSRule: function( selector, property, value )
		{
			this.updateCSSRule( selector, property, value, true );
		},

		/* States
		----------------------------------------------------------*/

		/**
		 * Saves the current state of a layout.
		 *
		 * @since 1.3.3
		 * @access private
		 * @method _saveState
		 */
		_saveState: function()
		{
			var post    = FLBuilderConfig.postId,
				css     = $('link[href*="/cache/' + post + '"]').attr('href'),
				js      = $('script[src*="/cache/' + post + '"]').attr('src'),
				html    = $(FLBuilder._contentClass).html();

			this.state = {
				css     : css,
				js      : js,
				html    : html
			};
		},

		/**
		 * Runs a preview refresh for the current settings lightbox.
		 *
		 * @since 1.3.3
		 * @method preview
		 */
		preview: function()
		{
			var form     = $('.fl-builder-settings-lightbox .fl-builder-settings', window.parent.document),
				nodeId   = form.attr('data-node'),
				settings = FLBuilder._getSettings(form);

			// Show the node as loading.
			FLBuilder._showNodeLoading( nodeId );

			// Abort an existing preview request.
			this._cancelPreview();

			settings = FLBuilder._inputVarsCheck( settings );

			if ( 'error' === settings  ) {
				return 0;
			}

			// Make a new preview request.
			this._xhr = FLBuilder.ajax({
				action          : 'render_layout',
				node_id         : nodeId,
				node_preview    : settings
			}, $.proxy(this._renderPreview, this));
		},

		/**
		 * Runs a preview refresh with a delay.
		 *
		 * @since 1.3.3
		 * @method delayPreview
		 */
		delayPreview: function(e)
		{
			var heading         = typeof e == 'undefined' ? [] : $(e.target).closest('tr').find('th'),
				widgetHeading   = $('.fl-builder-widget-settings .fl-builder-settings-title', window.parent.document),
				lightboxHeading = $('.fl-builder-settings .fl-lightbox-header', window.parent.document),
				loaderSrc       = FLBuilderLayoutConfig.paths.pluginUrl + 'img/ajax-loader-small.svg',
				loader          = $('<img class="fl-builder-preview-loader" src="' + loaderSrc + '" />');

			this.delay(1000, $.proxy(this.preview, this));

			this._loaderTimeout = setTimeout( function() {

				$('.fl-builder-preview-loader', window.parent.document).remove();

				if(heading.length > 0) {
					heading.append(loader);
				}
				else if(widgetHeading.length > 0) {
					widgetHeading.append(loader);
				}
				else if(lightboxHeading.length > 0) {
					lightboxHeading.append(loader);
				}

			}, 1500 );
		},

		/**
		 * Cancels a preview refresh.
		 *
		 * @since 1.3.3
		 * @access private
		 * @method _cancelPreview
		 */
		_cancelPreview: function()
		{
			if(this._xhr) {
				this._xhr.abort();
				this._xhr = null;
			}
		},

		/**
		 * Renders the response of a preview refresh.
		 *
		 * @since 1.3.3
		 * @access private
		 * @method _renderPreview
		 * @param {String} response The JSON encoded response.
		 */
		_renderPreview: function(response)
		{
			this._xhr = null;

			FLBuilder._renderLayout(response, $.proxy(this._renderPreviewComplete, this));
		},

		/**
		 * Fires when a preview refresh has finished rendering.
		 *
		 * @since 1.3.3
		 * @access private
		 * @method _renderPreviewComplete
		 */
		_renderPreviewComplete: function()
		{
			// Refresh the preview styles.
			this._createSheets();

			// Refresh the elements.
			this._initElementsAndClasses();

			// Refresh preview config for element references.
			this._initDefaultFieldPreviews();

			// Clear the loader timeout.
			if(this._loaderTimeout !== null) {
				clearTimeout(this._loaderTimeout);
			}

			/**
			 * Remove the loading graphic
			 * 2.6.0.2 added 500ms delay to fix #2234
			 */
			setTimeout( function() {
				$('.fl-builder-preview-loader', window.parent.document).remove();
			}, 500 );

			// Fire the preview rendered event.
			$( FLBuilder._contentClass ).trigger( 'fl-builder.preview-rendered' );
		},

		/**
		 * Reverts a preview to the state that was saved
		 * before the preview was initialized.
		 *
		 * @since 1.3.3
		 * @method revert
		 */
		revert: function()
		{
			var nodeId = this.nodeId;

			if ( ! this._settingsHaveChanged() ) {
				this.clear();
				return;
			}

			if ( 'col' === this.type ) {
				nodeId = this.elements.node.closest( '.fl-col-group' ).data( 'node' );
			}

			FLBuilder._updateNode( nodeId, function() {
				this.clear();
			}.bind( this ) );
		},

		/**
		 * Cancels a preview refresh.
		 *
		 * @since 1.3.3
		 * @method clear
		 */
		cancel: function()
		{
			this._cancelDelay();
			this._cancelPreview();
		},

		/**
		 * Cancels a preview refresh and removes
		 * any stylesheet changes.
		 *
		 * @since 1.3.3
		 * @method clear
		 */
		clear: function()
		{
			// Canel any preview delays or requests.
			this.cancel();

			// Destroy the preview stylesheet.
			this._destroySheets();

			// Destroy responsive editing previews.
			this._destroyResponsivePreviews();
		},

		/* Node Text Color Settings
		----------------------------------------------------------*/

		/**
		 * Initializes node text color previews.
		 *
		 * @since 1.3.3
		 * @access private
		 * @method _initNodeTextColor
		 */
		_initNodeTextColor: function()
		{
			// Elements
			$.extend(this.elements, {
				textColor    : $(this.classes.settings + ' input[name=text_color]', window.parent.document),
				linkColor    : $(this.classes.settings + ' input[name=link_color]', window.parent.document),
				hoverColor 	 : $(this.classes.settings + ' input[name=hover_color]', window.parent.document),
				headingColor : $(this.classes.settings + ' input[name=heading_color]', window.parent.document)
			});

			// Events
			this.elements.textColor.on('change', $.proxy(this._textColorChange, this));
			this.elements.linkColor.on('change', $.proxy(this._textColorChange, this));
			this.elements.hoverColor.on('change', $.proxy(this._textColorChange, this));
			this.elements.headingColor.on('change', $.proxy(this._textColorChange, this));
		},

		/**
		 * Fires when the text color field for a node
		 * is changed.
		 *
		 * @since 1.3.3
		 * @access private
		 * @method _textColorChange
		 * @param {Object} e An event object.
		 */
		_textColorChange: function(e)
		{
			var textColor    = this.elements.textColor.val(),
				linkColor    = this.elements.linkColor.val(),
				hoverColor   = this.elements.hoverColor.val(),
				headingColor = this.elements.headingColor.val();

			linkColor 	 = linkColor === '' ? textColor : linkColor;
			hoverColor 	 = hoverColor === '' ? textColor : hoverColor;
			headingColor = headingColor === '' ? textColor : headingColor;

			if ( textColor && textColor.indexOf( 'rgb' ) < 0 ) {
				textColor = '#' + textColor;
			}
			if ( linkColor && linkColor.indexOf( 'rgb' ) < 0 ) {
				linkColor = '#' + linkColor;
			}
			if ( hoverColor && hoverColor.indexOf( 'rgb' ) < 0 ) {
				hoverColor = '#' + hoverColor;
			}
			if ( headingColor && headingColor.indexOf( 'rgb' ) < 0 ) {
				headingColor = '#' + headingColor;
			}

			this.delay(50, $.proxy(function(){

				// Update Text color.
				if(textColor === '') {
					this.updateCSSRule(this.classes.node, 'color', '');
				}
				else {
					this.updateCSSRule(this.classes.node, 'color', textColor);
				}

				// Update Link Color
				if ( linkColor === '' ) {
					this.updateCSSRule(this.classes.node + ' a', 'color', '');
				}
				else {
					this.updateCSSRule(this.classes.node + ' a', 'color', linkColor);
				}

				// Hover Color
				if(hoverColor === '') {
					this.updateCSSRule(this.classes.node + ' a:hover', 'color', '');
				}
				else {
					this.updateCSSRule(this.classes.node + ' a:hover', 'color', hoverColor);
				}

				// Heading Color
				if(headingColor === '') {
					this.updateCSSRule(this.classes.node + ' h1', 'color', '');
					this.updateCSSRule(this.classes.node + ' h2', 'color', '');
					this.updateCSSRule(this.classes.node + ' h3', 'color', '');
					this.updateCSSRule(this.classes.node + ' h4', 'color', '');
					this.updateCSSRule(this.classes.node + ' h5', 'color', '');
					this.updateCSSRule(this.classes.node + ' h6', 'color', '');
					this.updateCSSRule(this.classes.node + ' h1 a', 'color', '');
					this.updateCSSRule(this.classes.node + ' h2 a', 'color', '');
					this.updateCSSRule(this.classes.node + ' h3 a', 'color', '');
					this.updateCSSRule(this.classes.node + ' h4 a', 'color', '');
					this.updateCSSRule(this.classes.node + ' h5 a', 'color', '');
					this.updateCSSRule(this.classes.node + ' h6 a', 'color', '');
				}
				else {
					this.updateCSSRule(this.classes.node + ' h1', 'color', headingColor);
					this.updateCSSRule(this.classes.node + ' h2', 'color', headingColor);
					this.updateCSSRule(this.classes.node + ' h3', 'color', headingColor);
					this.updateCSSRule(this.classes.node + ' h4', 'color', headingColor);
					this.updateCSSRule(this.classes.node + ' h5', 'color', headingColor);
					this.updateCSSRule(this.classes.node + ' h6', 'color', headingColor);
					this.updateCSSRule(this.classes.node + ' h1 a', 'color', headingColor);
					this.updateCSSRule(this.classes.node + ' h2 a', 'color', headingColor);
					this.updateCSSRule(this.classes.node + ' h3 a', 'color', headingColor);
					this.updateCSSRule(this.classes.node + ' h4 a', 'color', headingColor);
					this.updateCSSRule(this.classes.node + ' h5 a', 'color', headingColor);
					this.updateCSSRule(this.classes.node + ' h6 a', 'color', headingColor);
				}

			}, this));
		},

		/* Node Bg Settings
		----------------------------------------------------------*/

		/**
		 * Initializes node background previews.
		 *
		 * @since 1.3.3
		 * @access private
		 * @method _initNodeBg
		 */
		_initNodeBg: function()
		{
			// Elements
			$.extend(this.elements, {
				bgType                      : $(this.classes.settings + ' select[name=bg_type]', window.parent.document),
				bgColor                     : $(this.classes.settings + ' input[name=bg_color]', window.parent.document),
				bgColorPicker               : $(this.classes.settings + ' .fl-picker-bg_color', window.parent.document),
				bgGradientType              : $(this.classes.settings + ' select.fl-gradient-picker-type-select', window.parent.document),
				bgVideoSource               : $(this.classes.settings + ' select[name=bg_video_source]', window.parent.document),
				bgVideo                     : $(this.classes.settings + ' input[name=bg_video]', window.parent.document),
				bgVideoServiceUrl           : $(this.classes.settings + ' input[name=bg_video_service_url]', window.parent.document),
				bgVideoFallbackSrc          : $(this.classes.settings + ' select[name=bg_video_fallback_src]', window.parent.document),
				bgSlideshowSource           : $(this.classes.settings + ' select[name=ss_source]', window.parent.document),
				bgSlideshowPhotos           : $(this.classes.settings + ' input[name=ss_photos]', window.parent.document),
				bgSlideshowFeedUrl          : $(this.classes.settings + ' input[name=ss_feed_url]', window.parent.document),
				bgSlideshowSpeed            : $(this.classes.settings + ' input[name=ss_speed]', window.parent.document),
				bgSlideshowTrans            : $(this.classes.settings + ' select[name=ss_transition]', window.parent.document),
				bgSlideshowTransSpeed       : $(this.classes.settings + ' input[name=ss_transitionDuration]', window.parent.document),
				bgParallaxImageSrc          : $(this.classes.settings + ' select[name=bg_parallax_image_src]', window.parent.document),
				bgOverlayType               : $(this.classes.settings + ' select[name=bg_overlay_type]', window.parent.document),
				bgOverlayColor              : $(this.classes.settings + ' input[name=bg_overlay_color]', window.parent.document),
				bgOverlayGradient    		: $(this.classes.settings + ' #fl-field-bg_overlay_gradient select', window.parent.document),
			});

			// Events
			this.elements.bgType.on(                	'change', $.proxy(this._bgTypeChange, this));
			this.elements.bgColor.on(               	'change', $.proxy(this._bgColorChange, this));
			this.elements.bgVideoServiceUrl.on(   		'change', $.proxy(this._bgVideoChange, this));
			this.elements.bgSlideshowSource.on(     	'change', $.proxy(this._bgSlideshowChange, this));
			this.elements.bgSlideshowPhotos.on(     	'change', $.proxy(this._bgSlideshowChange, this));
			this.elements.bgSlideshowFeedUrl.on(    	'keyup',  $.proxy(this._bgSlideshowChange, this));
			this.elements.bgSlideshowSpeed.on(      	'keyup',  $.proxy(this._bgSlideshowChange, this));
			this.elements.bgSlideshowTrans.on(      	'change', $.proxy(this._bgSlideshowChange, this));
			this.elements.bgSlideshowTransSpeed.on( 	'keyup',  $.proxy(this._bgSlideshowChange, this));
			this.elements.bgParallaxImageSrc.on(    	'change', $.proxy(this._bgParallaxChange, this));
			this.elements.bgOverlayType.on(         	'change', $.proxy(this._bgOverlayChange, this));
			this.elements.bgOverlayColor.on(        	'change', $.proxy(this._bgOverlayChange, this));
		},

		/**
		 * Fires when the background type field of
		 * a node changes.
		 *
		 * @since 1.3.3
		 * @access private
		 * @method _bgTypeChange
		 * @param {Object} e An event object.
		 */
		_bgTypeChange: function(e)
		{
			var val = this.elements.bgType.val(),
				mode = FLBuilderResponsiveEditing._mode;

			// Clear bg styles first.
			this.elements.node.removeClass('fl-row-bg-video');
			this.elements.node.removeClass('fl-row-bg-slideshow');
			this.elements.node.removeClass('fl-row-bg-parallax');
			this.elements.node.find('.fl-bg-video').remove();
			this.elements.node.find('.fl-bg-slideshow').remove();
			this.elements.content.css('background-image', '');

			this.updateCSSRule(this.classes.content, 'background-color', 'transparent');
			this.updateCSSRule(this.classes.content, 'background-image', 'none');
			this.updateCSSRule(this.classes.content, 'background-image', 'none', 'medium');
			this.updateCSSRule(this.classes.content, 'background-image', 'none', 'responsive');

			// None
			if(val == 'none') {
				this._bgOverlayClear();
			}

			// Color
			else if(val == 'color') {
				this.elements.bgColor.trigger('change');
				this._bgOverlayClear();
			}

			// Gradient
			else if(val == 'gradient') {
				this.elements.bgGradientType.trigger('change');
				this._bgOverlayClear();
			}

			// Photo
			else if(val == 'photo') {
				this.elements.bgColor.trigger('change');
				this.elements.settings.find( '[data-device="' + mode + '"] select[name*="bg_"]' ).trigger( 'change' );
			}

			// Video
			else if(val == 'video') {
				this.elements.bgColor.trigger('change');
				this._bgVideoChange();
			}

			// Slideshow
			else if(val == 'slideshow') {
				this.elements.bgColor.trigger('change');
				this._bgSlideshowChange();
			}

			// Parallax
			else if(val == 'parallax') {
				this.elements.bgColor.trigger('change');
				this.elements.bgParallaxImageSrc.trigger('change');
			}
		},

		/**
		 * Fires when the background color field of
		 * a node changes.
		 *
		 * @since 1.3.3
		 * @access private
		 * @method _bgColorChange
		 * @param {Object} e An event object.
		 */
		_bgColorChange: function(e)
		{
			var rgb, alpha, value;

			if(this.elements.bgColor.val() === '') {
				this.updateCSSRule(this.classes.content, 'background-color', 'transparent');
			}
			else {
				value = this.hexOrRgb( this.elements.bgColor.val() );

				this.delay(100, $.proxy(function(){
					this.updateCSSRule(this.classes.content, 'background-color', value);
				}, this));
			}
		},

		/**
		 * Fires when the background video field of
		 * a node changes.
		 *
		 * @since 1.9.2
		 * @access private
		 * @method _bgVideoChange
		 * @param {Object} e An event object.
		 */
		_bgVideoChange: function(e)
		{
			var eles        	= this.elements,
				source 			= eles.bgVideoSource.val(),
				video 			= eles.bgVideo.val(),
				videoUrl		= eles.bgVideoServiceUrl.val(),
				youtubePlayer 	= 'https://www.youtube.com/iframe_api',
				vimeoPlayer		= 'https://player.vimeo.com/api/player.js',
				scriptTag  		= $( '<script>' );

			// Only load the required API script library
			if(source == 'video_service' && videoUrl != '') {
				if (/^(?:(?:(?:https?:)?\/\/)?(?:www.)?(?:youtu(?:be.com|.be))\/(?:watch\?v\=|v\/|embed\/)?([\w\-]+))/i.test(videoUrl)
					&& $( 'script[src*="youtube.com"' ).length < 1) {
					scriptTag.attr('src', youtubePlayer);
				}
				else if(/^(http\:\/\/|https\:\/\/)?(www\.)?(vimeo\.com\/)([0-9]+)$/.test(videoUrl)
					&& $( 'script[src*="vimeo.com"' ).length < 1) {
					scriptTag.attr('src', vimeoPlayer);
				}

				scriptTag
					.attr('type', 'text/javascript')
					.appendTo('head');

				this.delay(500, $.proxy(this.preview, this));
			}
			else if(video != '') {
				this.preview();
			}
		},

		/**
		 * Fires when the background slideshow field of
		 * a node changes.
		 *
		 * @since 1.3.3
		 * @access private
		 * @method _bgSlideshowChange
		 * @param {Object} e An event object.
		 */
		_bgSlideshowChange: function(e)
		{
			var eles        = this.elements,
				source      = eles.bgSlideshowSource.val(),
				photos      = eles.bgSlideshowPhotos.val(),
				feed        = eles.bgSlideshowFeedUrl.val(),
				speed       = eles.bgSlideshowSpeed.val(),
				transSpeed  = eles.bgSlideshowTransSpeed.val();

			if(source == 'wordpress' && photos === '') {
				return;
			}
			else if(source == 'smugmug' && feed === '') {
				return;
			}
			else if(isNaN(parseInt(speed))) {
				return;
			}
			else if(isNaN(parseInt(transSpeed))) {
				return;
			}

			this.delay(500, $.proxy(this.preview, this));
		},

		/**
		 * Fires when the background parallax field of
		 * a node changes.
		 *
		 * @since 1.3.3
		 * @access private
		 * @method _bgParallaxChange
		 * @param {Object} e An event object.
		 */
		_bgParallaxChange: function(e)
		{
			if(this.elements.bgParallaxImageSrc.val()) {

				this.updateCSSRule(this.classes.content, {
					'background-image'      : 'url(' + this.elements.bgParallaxImageSrc.val() + ')',
					'background-repeat'     : 'no-repeat',
					'background-position'   : 'center center',
					'background-attachment' : 'fixed',
					'background-size'       : 'cover'
				});
			}
		},

		/**
		 * Fires when the background overlay field of
		 * a node changes.
		 *
		 * @since 1.3.3
		 * @access private
		 * @method _bgOverlayChange
		 * @param {Object} e An event object.
		 */
		_bgOverlayChange: function(e)
		{
			var type = this.elements.bgOverlayType.val(),
				color = this.elements.bgOverlayColor.val(),
				rgb, alpha, value;

			if ( 'color' === type ) {
				if ( color === '' ) {
					this.elements.node.removeClass('fl-row-bg-overlay');
					this.elements.node.removeClass('fl-col-bg-overlay');
					this.updateCSSRule(this.classes.content + '::after', 'background-color', 'transparent');
				} else {
					value = this.hexOrRgb( this.elements.bgOverlayColor.val() );
					this.delay(100, $.proxy(function(){
						this._bgOverlayAddClasses();
						this.updateCSSRule( this.classes.content + '::after', 'background-color', value );
					}, this));
				}
				this.updateCSSRule(this.classes.content + '::after', 'background-image', 'none');
			} else if ( 'gradient' === type ) {
				this._bgOverlayAddClasses();
				this.updateCSSRule(this.classes.content + '::after', 'background-color', 'transparent');
				this.elements.bgOverlayGradient.trigger( 'change' );
			} else {
				this.elements.node.removeClass('fl-row-bg-overlay');
				this.elements.node.removeClass('fl-col-bg-overlay');
				this.updateCSSRule(this.classes.content + '::after', 'background-color', 'transparent');
				this.updateCSSRule(this.classes.content + '::after', 'background-image', 'none');
			}
		},

		/**
		 * Adds the necessary classes for background overlays.
		 *
		 * @since 2.2
		 * @access private
		 * @method _bgOverlayAddClasses
		 */
		_bgOverlayAddClasses: function() {
			if ( this.elements.node.hasClass( 'fl-col' ) ) {
				this.elements.node.addClass( 'fl-col-bg-overlay' );
			} else {
				this.elements.node.addClass( 'fl-row-bg-overlay' );
			}
		},

		/**
		 * Fires when a background overlay color is cleared.
		 *
		 * @since 1.3.3
		 * @access private
		 * @method _bgOverlayClear
		 * @param {Object} e An event object.
		 */
		_bgOverlayClear: function(e)
		{
			this.elements.bgOverlayColor.prev('.fl-color-picker-clear').trigger('click');
			this.elements.bgOverlayType.val( 'color' ).trigger( 'change' );
		},

		/* Node Class Name Settings
		----------------------------------------------------------*/

		/**
		 * Initializes node classname previews.
		 *
		 * @since 1.3.3
		 * @access private
		 * @method _initNodeClassName
		 */
		_initNodeClassName: function()
		{
			// Elements
			$.extend(this.elements, {
				className : $(this.classes.settings + ' input[name=class]', window.parent.document)
			});

			// Events
			this.elements.className.on('keyup', $.proxy(this._classNameChange, this));
			this._lastClassName = this.elements.className.val();
		},

		/**
		 * Fires when the classname of a node changes.
		 *
		 * @since 1.3.3
		 * @access private
		 * @method _classNameChange
		 * @param {Object} e An event object.
		 */
		_classNameChange: function(e)
		{
			var className = this.elements.className.val();

			if(this._lastClassName !== null) {
				this.elements.node.removeClass(this._lastClassName);
			}

			this.elements.node.addClass(className);
			this._lastClassName = className;
		},

		/* Node Spacing Settings
		----------------------------------------------------------*/

		/**
		 * Initializes node responsive dimension previews for things
		 * like margins, padding and borders.
		 *
		 * @since 1.9
		 * @access private
		 * @method _initNodeDimensions
		 */
		_initNodeDimensions: function( property )
		{
			var elements      = {},
				dimensions    = [ 'Top', 'Bottom', 'Left', 'Right' ],
				devices       = [ '', 'Large', 'Medium', 'Responsive' ],
				settingsClass = this.classes.settings,
				elementKey    = '',
				inputName     = '',
				i             = null,
				k             = null;

			for ( i = 0; i < dimensions.length; i++ ) {

				for ( k = 0; k < devices.length; k++ ) {

					elementKey = property + dimensions[ i ] + devices[ k ];
					inputName  = property + '_' + dimensions[ i ].toLowerCase();

					if ( '' != devices[ k ] ) {
						inputName += '_' + devices[ k ].toLowerCase();
					}

					elements[ elementKey ] = $( settingsClass + ' input[name=' + inputName + ']', window.parent.document );
				}
			}

			$.extend( this.elements, elements );
		},

		/* Row Settings
		----------------------------------------------------------*/

		/**
		 * Initializes a row preview.
		 *
		 * @since 1.3.3
		 * @access private
		 * @method _initRow
		 */
		_initRow: function()
		{
			// Elements
			$.extend(this.elements, {
				width           	: $(this.classes.settings + ' select[name=width]', window.parent.document),
				contentWidth    	: $(this.classes.settings + ' select[name=content_width]', window.parent.document),
				maxContentWidth 	: $(this.classes.settings + ' input[name=max_content_width]', window.parent.document),
				maxContentWidthUnit : $(this.classes.settings + ' select[name=max_content_width_unit]', window.parent.document),
				height          	: $(this.classes.settings + ' select[name=full_height]', window.parent.document),
				minHeight          	: $(this.classes.settings + ' input[name=min_height]', window.parent.document),
				align           	: $(this.classes.settings + ' select[name=content_alignment]', window.parent.document),
				aspectRatio         : $(this.classes.settings + ' input[name=aspect_ratio]', window.parent.document)
			});

			// Events
			this.elements.width.on(         		'change', $.proxy(this._rowWidthChange, this));
			this.elements.contentWidth.on(  		'change', $.proxy(this._rowContentWidthChange, this));
			this.elements.maxContentWidth.on(   	'input',  $.proxy(this._rowMaxContentWidthChange, this));
			this.elements.maxContentWidthUnit.on(   'change', $.proxy(this._rowMaxContentWidthChange, this));
			this.elements.height.on(        		'change', $.proxy(this._rowHeightChange, this));
			this.elements.align.on(         		'change', $.proxy(this._rowHeightChange, this));
			this.elements.aspectRatio.on(           'input',  $.proxy(this._rowInitContentAlignment, this));

			// Common Elements
			this._initNodeTextColor();
			this._initNodeBg();
			this._initNodeClassName();
			this._initNodeDimensions( 'border' );
			this._initNodeDimensions( 'margin' );
			this._initNodeDimensions( 'padding' );
			this._rowInitContentAlignment();
		},

		/**
		 * Fires when the width field of a row changes.
		 *
		 * @since 1.3.3
		 * @access private
		 * @method _rowWidthChange
		 * @param {Object} e An event object.
		 */
		_rowWidthChange: function(e)
		{
			var settings		= FLBuilderConfig.global,
				row 	 		= this.elements.node,
				content  		= this.elements.content.find('.fl-row-content'),
				maxWidth 		= this.elements.maxContentWidth.val(),
				maxWidthUnit 	= this.elements.maxContentWidthUnit.val();

			row.css( 'max-width', 'none' );
			content.css( 'max-width', 'none' );

			if(this.elements.width.val() == 'full') {
				row.removeClass('fl-row-fixed-width');
				row.addClass('fl-row-full-width');
			}
			else {
				row.removeClass('fl-row-full-width');
				row.addClass('fl-row-fixed-width');
			}

			this._rowMaxContentWidthChange();
		},

		/**
		 * Fires when the content width field of a row changes.
		 *
		 * @since 1.3.3
		 * @access private
		 * @method _rowContentWidthChange
		 * @param {Object} e An event object.
		 */
		_rowContentWidthChange: function(e)
		{
			var settings		= FLBuilderConfig.global,
				row 	 		= this.elements.node,
				content  		= this.elements.content.find('.fl-row-content'),
				maxWidth 		= this.elements.maxContentWidth.val(),
				maxWidthUnit 	= this.elements.maxContentWidthUnit.val();

			row.css( 'max-width', 'none' );
			content.css( 'max-width', 'none' );

			if(this.elements.contentWidth.val() == 'full') {
				content.removeClass('fl-row-fixed-width');
				content.addClass('fl-row-full-width');
			}
			else {
				content.removeClass('fl-row-full-width');
				content.addClass('fl-row-fixed-width');
				this._rowMaxContentWidthChange();
			}
		},

		/**
		 * Fires when the content width field of a row changes.
		 *
		 * @since 1.3.3
		 * @access private
		 * @method _rowContentWidthChange
		 * @param {Object} e An event object.
		 */
		_rowMaxContentWidthChange: function(e)
		{
			var settings	= FLBuilderConfig.global,
				row     	= this.elements.node,
				content 	= this.elements.content.find('.fl-row-content'),
				width   	= this.elements.maxContentWidth.val(),
				unit		= this.elements.maxContentWidthUnit.val();

			if ( '' == width ) {
				width = settings.row_width + settings.row_width_unit;
			} else {
				width += unit;
			}

			if ( 'fixed' === this.elements.width.val() ) {
				row.css( 'max-width', width );
			}

			content.css( 'max-width', width );
		},

		/**
		 * Fires when the height field of a row changes.
		 *
		 * @since 1.6.3
		 * @access private
		 * @method _rowHeightChange
		 * @param {Object} e An event object.
		 */
		_rowHeightChange: function(e)
		{
			var row = this.elements.node;

			row.removeClass('fl-row-align-top');
			row.removeClass('fl-row-align-center');
			row.removeClass('fl-row-align-bottom');
			row.removeClass('fl-row-default-height');
			row.removeClass('fl-row-full-height');
			row.removeClass('fl-row-custom-height');

			if(this.elements.height.val() == 'full') {
				row.addClass('fl-row-full-height');
				row.addClass('fl-row-align-' + this.elements.align.val());
				this.elements.minHeight.val( '' ).trigger( 'input' );
			} else if(this.elements.height.val() == 'custom') {
				row.addClass('fl-row-custom-height');
				row.addClass('fl-row-align-' + this.elements.align.val());
				this.elements.minHeight.trigger( 'input' );
			} else {
				row.addClass('fl-row-default-height');
				row.addClass('fl-row-align-' + this.elements.align.val());
				this.elements.minHeight.val( '' ).trigger( 'input' );
			}

			this._rowInitContentAlignment();
		},

		/**
		 * Show/hide Content Alignment field when Row Setting Form renders.
		 *
		 * @since 2.8.2
		 * @access private
		 * @method _rowInitContentAlignment
		 * @param {Object} e An event object.
		 */
		_rowInitContentAlignment: function(e)
		{
			const height           = this.elements.height.val().trim();
			const form             = $( '.fl-builder-settings:visible' );
			const alignFieldRow    = form.find( '#fl-field-content_alignment' );
			const aspectValue       = form.find( '#fl-field-aspect_ratio input' ).val();
			if ( height === 'default' && ! aspectValue ) {
				alignFieldRow.hide();
			} else {
				alignFieldRow.show();
			}
		},

		/* Columns Settings
		----------------------------------------------------------*/

		/**
		 * Initializes a column preview.
		 *
		 * @since 1.3.3
		 * @access private
		 * @method _initRow
		 */
		_initColumn: function()
		{
			// Elements
			$.extend(this.elements, {
				size         	: $(this.classes.settings + ' input[name=size]', window.parent.document),
				sizeLarge       : $(this.classes.settings + ' input[name=size_large]', window.parent.document),
				sizeMedium      : $(this.classes.settings + ' input[name=size_medium]', window.parent.document),
				sizeResponsive  : $(this.classes.settings + ' input[name=size_responsive]', window.parent.document),
				columnHeight 	: $(this.classes.settings + ' select[name=equal_height]', window.parent.document),
				columnAlign     : $(this.classes.settings + ' select[name=content_alignment]', window.parent.document),
				responsiveOrder : $(this.classes.settings + ' select[name=responsive_order]', window.parent.document)
			});

			// Events
			this.elements.size.on(   		   'input', $.proxy( this._colSizeChange, this ) );
			this.elements.sizeLarge.on(   	   'input', $.proxy( this._colSizeChange, this ) );
			this.elements.sizeMedium.on(   	   'input', $.proxy( this._colSizeChange, this ) );
			this.elements.sizeResponsive.on(   'input', $.proxy( this._colSizeChange, this ) );
			this.elements.columnHeight.on(     'change', $.proxy( this._colHeightChange, this ) );
			this.elements.columnAlign.on(      'change', $.proxy( this._colHeightChange, this ) );
			this.elements.responsiveOrder.on(  'change', $.proxy( this._colResponsiveOrder, this ) );

			// Common Elements
			this._initNodeTextColor();
			this._initNodeBg();
			this._initNodeClassName();
			this._initNodeDimensions( 'border' );
			this._initNodeDimensions( 'margin' );
			this._initNodeDimensions( 'padding' );
		},

		/**
		 * Fires when the size field of a column changes.
		 *
		 * @since 1.3.3
		 * @access private
		 * @method _colSizeChange
		 */
		_colSizeChange: function( e )
		{
			var input			= $( e.target ),
				minWidth        = 8,
				maxWidth        = 100 - minWidth,
				size            = parseFloat( input.val() ),
				group			= this.elements.node.closest( '.fl-col-group' ),
				prev            = this.elements.node.prev('.fl-col'),
				next            = this.elements.node.next('.fl-col'),
				sibling         = next.length === 0 ? prev : next,
				siblings        = this.elements.node.siblings('.fl-col'),
				siblingsWidth   = 0,
				mode 			= FLBuilderResponsiveEditing._mode;

			// Don't resize if we only have one column.
			if(siblings.length === 0) {
				return;
			}

			// Find the fallback size if we don't have a number.
			if ( isNaN( size ) ) {
				if ( 'large' === mode ) {
					size = this.elements.size.val();
				} else if ( 'medium' === mode ) {
					if ( this.elements.sizeLarge.val() ) {
						size = this.elements.sizeLarge.val();
					} else {
						size = this.elements.size.val();
					}
				} else if ( 'responsive' === mode ) {
					if ( this.elements.sizeMedium.val() ) {
						size = this.elements.sizeMedium.val();
					} else if ( this.elements.sizeLarge.val() ) {
						size = this.elements.sizeLarge.val();
					} else {
						size = 'auto';
					}
				}

				if ( 'auto' !== size && isNaN( size ) ) {
					size = minWidth;
				}
			}

			// Default mode logic to keep columns from stacking because of resize.
			if ( 'default' === mode ) {

				// Adjust sizes based on other columns.
				siblings.each(function() {

					if($(this).data('node') == sibling.data('node')) {
						return;
					}

					maxWidth        -= parseFloat($(this)[0].style.width);
					siblingsWidth   += parseFloat($(this)[0].style.width);
				});

				// Make sure the new width isn't too small.
				if(size < minWidth) {
					size = minWidth;
				}

				// Make sure the new width isn't too big.
				if(size > maxWidth) {
					size = maxWidth;
				}

				// Update the width.
				this.elements.node.css('width', size + '%');
				sibling.css('width', (100 - siblingsWidth - size) + '%');

			} else {

				// Don't allow resizing past 100%.
				if ( size > 100 ) {
					size = 100;
					input.val( 100 );
				}

				// Update the width for responsive sizes.
				this.updateCSSRule( this.classes.node, {
					'max-width': ( 'auto' === size ? 100 : size ) + '% !important',
					'width': ( 'auto' === size ? size : size + '%' ) + ' !important',
				}, undefined, true );

				// Float the column only if we have a responsive size.
				if ( 'responsive' === mode ) {
					if ( input.val() ) {
						this.updateCSSRule( this.classes.node, 'float', ( FLBuilderConfig.isRtl ? 'right' : 'left' ), true );
						this.updateCSSRule( this.classes.node, 'clear', 'none', true );
					} else {
						this.updateCSSRule( this.classes.node, 'float', 'none', true );
						this.updateCSSRule( this.classes.node, 'clear', 'both', true );
					}

					if ( input.val() || this._colsHaveCustomResponsiveWidth( siblings ) ) {
						group.addClass( 'fl-col-group-custom-width' );
					} else {
						group.removeClass( 'fl-col-group-custom-width' );
					}
				}
			}
		},

		/**
		 * Checks to see if any columns in a group have
		 * custom responsive widths.
		 *
		 * @since 2.2
		 * @access private
		 * @method _colsHaveCustomResponsiveWidth
		 * @return {Boolean}
		 */
		_colsHaveCustomResponsiveWidth: function( cols )
		{
			var settings = FLBuilderSettingsConfig.nodes,
				hasWidth = false;

			cols.each( function() {
				var id = $( this ).data( 'node' );
				if ( settings[ id ] && settings[ id ].size_responsive ) {
					hasWidth = true;
				}
			} );

			return hasWidth;
		},

		/**
		 * Fires when the equal height field of a column changes.
		 *
		 * @since 1.6.3
		 * @access private
		 * @method _colHeightChange
		 */
		_colHeightChange: function()
		{
			var parent = this.elements.node.parent('.fl-col-group');

			parent.removeClass('fl-col-group-align-top');
			parent.removeClass('fl-col-group-align-center');
			parent.removeClass('fl-col-group-align-bottom');

			if(this.elements.columnHeight.val() == 'yes') {
				parent.addClass('fl-col-group-equal-height');
				parent.addClass('fl-col-group-align-' + this.elements.columnAlign.val());
			}
			else {
				parent.removeClass('fl-col-group-equal-height');
			}
		},

		/**
		 * Fires when the responsive order field of a column changes.
		 *
		 * @since 1.8
		 * @access private
		 * @method _colResponsiveOrder
		 */
		_colResponsiveOrder: function()
		{
			var parent    = this.elements.node.parent('.fl-col-group'),
				enabledOn = this.elements.responsiveOrder.val().split(',');

			if ( enabledOn.includes( 'medium' ) ) {
				parent.addClass('fl-col-group-medium-reversed');
			} else {
				parent.removeClass('fl-col-group-medium-reversed');
			}

			if ( enabledOn.includes( 'mobile' ) ) {
				parent.addClass('fl-col-group-responsive-reversed');
			} else {
				parent.removeClass('fl-col-group-responsive-reversed');
			}
		},

		/* Module Settings
		----------------------------------------------------------*/

		/**
		 * Initializes a module preview.
		 *
		 * @since 1.3.3
		 * @access private
		 * @method _initModule
		 */
		_initModule: function()
		{
			this._initNodeClassName();
			this._initNodeDimensions( 'margin' );
		},

		/* Default Field Previews
		----------------------------------------------------------*/

		/**
		 * Initializes the default preview logic for each
		 * field in a settings form.
		 *
		 * @since 1.3.3
		 * @access private
		 * @method _initDefaultFieldPreviews
		 * @param {Object} fields
		 */
		_initDefaultFieldPreviews: function( fields )
		{
			var fields      = ! FLBuilder.isUndefined(fields) ? fields : this.elements.settings.find('.fl-field'),
				field       = null,
				fieldType   = null,
				preview     = null,
				i           = 0;

			if ( FLBuilderConfig.safemode ) {
				return false;
			}

			for( ; i < fields.length; i++) {

				field = fields.eq(i);
				fieldType = field.data( 'type' );
				preview = field.data('preview');

				if(preview.type == 'refresh') {
					this._initFieldRefreshPreview(field);
				}
				if(preview.type == 'text') {
					this._initFieldTextPreview(field);
				}
				if(preview.type == 'css') {
					this._initFieldCSSPreview(field);
				}
				if(preview.type == 'widget') {
					this._initFieldWidgetPreview(field);
				}
				if(preview.type == 'font') {
					this._initFieldFontPreview(field);
				}
				if(preview.type == 'attribute') {
					this._initFieldAttributePreview(field);
				}
				if(preview.type == 'animation') {
					this._initFieldAnimationPreview(preview, field);
				}
				if(preview.type == 'callback') {
					this._initFieldCallbackPreview( preview, field, fieldType, fields );
				}

				this._initFieldUnitSelect(field);
			}
		},

		/**
		 * Setup callback type previews
		 *
		 * @since 2.2
		 * @access private
		 * @method _initFieldCallbackPreview
		 * @param {Object} preview - the preview args from the field configuration
		 * @param {Object} field - reference to the .fl-field DOM element
		 * @return void
		 */
		_initFieldCallbackPreview: function ( preview, field, fieldType, fields ) {
			var callback,
				callback_name = preview['callback'],
				form = $( '.fl-builder-settings:visible', window.parent.document ),
				nodeID = form.data('node'),
				node = $('.fl-builder-content .fl-node-' + nodeID );

			if ( 'undefined' !== typeof FLBuilderPreviewCallbacks[callback_name] ) {
				callback = FLBuilderPreviewCallbacks[callback_name];
			} else if ( 'undefined' !== typeof window[callback_name] ) {
				callback = window[callback_name];
			} else if ( 'undefined' !== typeof window.parent[callback_name] ) {
				callback = window.parent[callback_name];
			}

			if ( 'function' === typeof callback ) {
				var args = {
					field: field,
					fields: fields,
					type: fieldType,
					preview: preview,
					form: form,
					nodeID: nodeID,
					node: node,
				};

				// Grab input references
				switch( fieldType ) {
					case 'align':
					case 'button-group':
					case 'text':
					case 'multiple-photos':
					case 'video':
					case 'icon':
					case 'ordering':
						args.input = field.find('input:not(.fl-preview-ignore)');
						args.getValue = function() {
							return args.input.val();
						}
						break;

					case 'color':
						args.input = field.find('input.fl-color-picker-value');
						args.getValues = function() {
							var value = args.input.val(),
								values = {
									value: value,
									formattedValue: FLBuilderPreview.formatColor( value ),
							};
						}
						break;

					case 'textarea':
					case 'code':
						args.textarea = field.find('textarea');
						args.getValue = function() {
							return args.textarea.val();
						}
						break;

					case 'select':
					case 'photo-sizes':
					case 'post-type':
						args.select = field.find('select');
						args.getValue = function() {
							return args.select.val();
						}
						break;

					case 'photo':
						args.input = field.find('input[type=hidden]:not(.fl-preview-ignore)');
						args.sizeSelect = field.find('select');
						args.getValues = function() {
							return {
								value: args.input.val(),
								size: args.sizeSelect.val(),
							};
						}
						break;

					case 'unit':
						args.input = field.find('input[type=number]');
						args.unitSelect = field.find( '.fl-field-unit-select' );
						args.getValues = function() {
							var inputVal = args.input.val(),
								unitVal = args.unitSelect.val(),
								values = {
									value: inputVal,
									unit: unitVal,
									formattedValue: inputVal + unitVal
							};
							return values;
						}
						break;

					case 'dimension':
						args.inputs = field.find('input[type=number]');
						args.unitSelect = field.find( '.fl-field-unit-select' );
						args.getValues = function() {
							var values = {
								inputs: [],
								props: {},
								unit: args.unitSelect.val(),
							};

							args.inputs.each( function( i, input ) {
								var input = $( input ),
									val = input.val(),
									prop = input.data('unit');

								values.inputs.push( val );
								values.props[prop] = val;
							} );

							return values;
						}
						break;

					case 'animation':
						args.input = field.find('input:not(.fl-preview-ignore)');
						args.select = field.find('select');
						args.getValues = function() {
							return {
								delay: args.input.val(),
								style: args.select.val(),
							};
						}
						break;

					case 'link':
						args.input = field.find('.fl-link-field-input-wrap input:not(.fl-preview-ignore)');
						args.targetInput = field.find('input[name$=_target]');
						args.noFollowInput = field.find('input[name$=_nofollow]');
						args.getValues = function() {
							return {
								url: args.input.val(),
								target: args.targetInput.val(),
								noFollow: args.noFollowInput.val(),
							}
						}
						break;

					case 'shadow':
						args.colorInput = field.find('input.fl-color-picker-value');
						args.inputs = field.find('input[type=number]');
						args.getValues = function() {
							var values = {
								color: args.colorInput.val(),
								x: args.inputs[0].val(),
								y: args.inputs[1].val(),
								blur: args.inputs[2].val(),
								spread: args.inputs[3].val(),
							}
						}
						break;

					case 'gradient':
						// for event setup
						args.inputs = field.find('input:not(.fl-preview-ignore)');
						args.select = field.find('select');
						// callback helpers
						args.gradientInputs = {};
						args.gradientInputs.type = field.find('select[name$="[type]"]');
						args.gradientInputs.angle = field.find('input[name$="[angle]"]');
						args.gradientInputs.position = field.find('select[name$="[position]"]');

						args.gradientInputs.stops = [];
						field.find('.fl-gradient-picker-colors .fl-gradient-picker-color-row').each( function( i, row ) {
							row = $(row);
							args.gradientInputs.stops.push({
								color: row.find('.fl-gradient-picker-color input'),
								stop: row.find('.fl-gradient-picker-stop input'),
							});
						});

						args.getValues = function() {
							var values = {
								type: args.gradientInputs.type.val(),
								angle: args.gradientInputs.angle.val(),
								position: args.gradientInputs.position.val(),
								stops: [],
							};
							for( var i in args.gradientInputs.stops ) {
								var stop = args.gradientInputs.stops[i];
								values.stops[i] = {
									color: stop.color.val(),
									stop: stop.stop.val(),
								}
							}
							return values;
						}
						break;

					case 'shape-transform':
						args.inputs = field.find('input:not(.fl-preview-ignore)');
						args.getValues = function() {
							return {
								scaleXSign: args.inputs.eq(0).val(),
								scaleYSign: args.inputs.eq(1).val(),
								skewX: args.inputs.eq(2).val(),
								skewY: args.inputs.eq(3).val(),
								scaleX: args.inputs.eq(4).val(),
								rotate: args.inputs.eq(5).val(),
								scaleY: args.inputs.eq(6).val(), /* hidden field */
							}
						}

						break;
					default:
						args.input = field.find('input:not(.fl-preview-ignore)');
						args.getValue = function() {
							return args.input.val();
						}
				}

				// Grab reference to responsive toggle
				var toggle = field.find( '.fl-field-responsive-toggle');
				args.responsiveToggle = toggle.length ? toggle : false;

				callback = callback.bind( this, args );

				// Loop over gathered inputs and setup event listeners
				var props = {
					input: 'change keyup input',
					inputs: 'change keyup input',
					targetInput: 'change keyup input',
					noFollowInput: 'change keyup input',
					colorInput: 'change input',
					textarea: 'change keyup input',
					select: 'change',
					sizeSelect: 'change',
					unitSelect: 'change',
				};

				for( var i in props ) {
					if ( 'undefined' !== typeof args[i] ) {
						args[i].on( props[i], callback );
					}
				}
			}
		},

		/* Refresh Preview
		----------------------------------------------------------*/

		/**
		 * Initializes the refresh preview for a field.
		 *
		 * @since 1.3.3
		 * @access private
		 * @method _initFieldRefreshPreview
		 * @param {Object} field The field to preview.
		 */
		_initFieldRefreshPreview: function(field)
		{
			var fieldType = field.data('type'),
				preview   = field.data('preview'),
				callback  = $.proxy(this.delayPreview, this);

			switch(fieldType) {

				case 'align':
					field.find( 'input:not(.fl-preview-ignore)' ).on( 'change', callback );
				break;

				case 'text':
					field.find('input[type=text]:not(.fl-preview-ignore)').on('keyup', callback);
				break;

				case 'textarea':
					field.find('textarea:not(.fl-preview-ignore)').on('keyup', callback);
				break;

				case 'select':
					field.find('select:not(.fl-preview-ignore)').on('change', callback);
				break;

				case 'color':
					field.find('.fl-color-picker-value').on('change', callback);
				break;

				case 'photo':
					field.find('select:not(.fl-preview-ignore)').on('change', callback);
				break;

				case 'multiple-photos':
					field.find('input:not(.fl-preview-ignore)').on('change', callback);
				break;

				case 'photo-sizes':
					field.find('select:not(.fl-preview-ignore)').on('change', callback);
				break;

				case 'video':
					field.find('input:not(.fl-preview-ignore)').on('change', callback);
				break;

				case 'multiple-audios':
					field.find('input:not(.fl-preview-ignore)').on('change', callback);
				break;

				case 'icon':
					field.find('input:not(.fl-preview-ignore)').on('change', callback);
				break;

				case 'form':
					field.on( 'change', 'input:not(.fl-preview-ignore)', callback);
				break;

				case 'editor':
					this._addTextEditorCallback(field, preview);
				break;

				case 'code':
					field.find('textarea:not(.fl-preview-ignore)').on('change', callback);
				break;

				case 'post-type':
					field.find('select:not(.fl-preview-ignore)').on('change', callback);
				break;

				case 'suggest':
					field.find('.as-values').on('change', callback);
					field.find('select:not(.fl-preview-ignore)').on('change', callback);
				break;

				case 'unit':
				case 'dimension':
					field.find('input[type=number]:not(.fl-preview-ignore)').on('input', callback);
				break;

				case 'ordering':
					field.find('input[type=hidden]:not(.fl-preview-ignore)').on('change', callback);
				break;

				default:
					field.on('change', callback);
			}
		},

		/* Text Preview
		----------------------------------------------------------*/

		/**
		 * Initializes a text preview for a field.
		 *
		 * @since 1.3.3
		 * @access private
		 * @method _initFieldTextPreview
		 * @param {Object} field The field to preview.
		 */
		_initFieldTextPreview: function(field)
		{
			var fieldType = field.data('type'),
				preview   = field.data('preview'),
				callback  = $.proxy(this._previewText, this, preview);

			switch(fieldType) {

				case 'text':
					field.find('input[type=text]:not(.fl-preview-ignore)').on('keyup', callback);
				break;

				case 'unit':
					field.find('input[type=number]:not(.fl-preview-ignore)').on('keyup', callback);
				break;

				case 'textarea':
					field.find('textarea:not(.fl-preview-ignore)').on('keyup', callback);
				break;

				case 'code':
					field.find('textarea:not(.fl-preview-ignore)').on('change', callback);
				break;

				case 'editor':
					this._addTextEditorCallback(field, preview);
				break;
			}
		},

		/**
		 * Runs a real time preview for text fields.
		 *
		 * @since 1.3.3
		 * @access private
		 * @method _previewText
		 * @param {Object} preview A preview object.
		 * @param {Object} e An event object.
		 */
		_previewText: function(preview, e)
		{
			var selector = this._getPreviewSelector( this.classes.node, preview.selector ),
				element  = $( selector ),
				text     = $('<div>' + $(e.target).val() + '</div>');

			if(element.length > 0) {
				text.find('script').remove();
				element.html(text.html());
			} else {
				this.delayPreview(e);
			}
		},

		/**
		 * Runs a real time preview for text editor fields.
		 *
		 * @since 1.3.3
		 * @access private
		 * @method _previewText
		 * @param {Object} preview A preview object.
		 * @param {String} id The ID of the text editor.
		 * @param {Object} e An event object.
		 */
		_previewTextEditor: function(preview, id, e)
		{
			var selector = this._getPreviewSelector( this.classes.node, preview.selector ),
				element  = $( selector ),
				editor   = typeof window.parent.tinyMCE != 'undefined' ? window.parent.tinyMCE.get(id) : null,
				textarea = $('#' + id, window.parent.document),
				text     = '';

			if(element.length > 0) {

				if(editor && textarea.css('display') == 'none') {
					text = $('<div>' + editor.getContent() + '</div>');
				}
				else {
					if ( 'undefined' == typeof switchEditors || 'undefined' == typeof switchEditors.wpautop ) {
						text = $('<div>' + textarea.val() + '</div>');
					}
					else {
						text = $('<div>' + switchEditors.wpautop( textarea.val() ) + '</div>');
					}
				}

				text.find('script').remove();
				element.html(text.html());
			}
		},

		/**
		 * Callback for text editor previews.
		 *
		 * @since 1.3.3
		 * @access private
		 * @method _previewText
		 * @param {Object} field A field object.
		 * @param {Object} preview A preview object.
		 */
		_addTextEditorCallback: function(field, preview)
		{
			var id       = field.find('textarea.wp-editor-area').attr('id'),
				callback = null;

			if(preview.type == 'refresh') {
				callback = $.proxy(this.delayPreview, this);
			}
			else if(preview.type == 'text') {
				callback = $.proxy(this._previewTextEditor, this, preview, id);
			}
			else {
				return;
			}

			$('#' + id, window.parent.document).on('keyup', callback);

			if(typeof window.parent.tinyMCE != 'undefined') {
				editor = window.parent.tinyMCE.get(id);
				editor.on('change', callback);
				editor.on('keyup', callback);
			}
		},

		/* Font Field Preview
		----------------------------------------------------------*/

		/**
		 * Initializes a font preview for a field.
		 *
		 * @since 1.3.3
		 * @access private
		 * @method _initFieldFontPreview
		 * @param {Object} field The field to preview.
		 */
		_initFieldFontPreview: function(field)
		{
			var fieldType = field.data('type'),
				preview   = field.data('preview');

			// store field id
			preview.id = field.attr( 'id' );

			var callback  = $.proxy(this._previewFont, this, preview);

			if( fieldType == 'font' ){
				field.find('.fl-font-field').on('change', 'select', callback);
			}

		},

		/**
		 * Gets the selected font and weight, and make the necessary updates for live preview.
		 *
		 * @since 1.6.3
		 * @access private
		 * @see _getPreviewSelector
		 * @see _buildFontStylesheet
		 * @see updateCSSRule
		 *
		 * @method _previewFont
		 * @param  {Object} preview An object with data about the current field and css selector.
		 * @param  {[type]} e       The current field.
		 */
		_previewFont: function( preview, e ){
			var parent     = $( e.delegateTarget ),
				font       = parent.find( '.fl-font-field-font' ),
				selected   = $( font ).find( ':selected' ),
				fontGroup  = selected.parent().attr( 'label' ),
				weight     = parent.find( '.fl-font-field-weight' ),
				uniqueID   = preview.id + '-' + this.nodeId,
				selector = this._getPreviewSelector( this.classes.node, preview.selector ),
				important = preview.important ? ' !important' : '',
				val = ''

			// If the selected font is a Google Font, build the font stylesheet
			if( fontGroup == 'Google' || fontGroup == 'Recently Used' ){
				this._buildFontStylesheet( uniqueID, font.val(), weight.val() );
			}

			val = font.val();

			// Some google fonts that end with numbers need to be wrapped in quotes.
			var checkNum = new RegExp('[0-9]');
			if( checkNum.test( font.val() ) ){
				val = '"' + font.val() + '"';
			}

			this.updateCSSRule( selector, 'font-family', 'Default' === font.val() ? '' : val + important );
			this.updateCSSRule( selector, 'font-weight', 'default' === weight.val() ? '' : weight.val() + important );
		},

		/**
		 * Gets all fonts store insite FLBuilderPreview._fontsList and renders the respective
		 * link tag with Google Fonts.
		 *
		 * @since 1.6.3
		 * @access private
		 *
		 * @method _buildFontStylesheet
		 * @param  {String} id     The field unique ID.
		 * @param  {String} font   The selected font.
		 * @param  {String} weight The selected weight.
		 */
		_buildFontStylesheet: function( id, font, weight ){
			var url     = FLBuilderConfig.googleFontsUrl,
				href    = '',
				fontObj = {},
				fontArray = {};

			// build the font family / weight object
			fontObj[ font ] = [ weight ];

			// adds to the list of fonts for this font setting
		    FLBuilderPreview._fontsList[ id ] = fontObj;

			// iterate over the keys of the FLBuilderPreview._fontsList object
			Object.keys( FLBuilderPreview._fontsList ).forEach( function( fieldFont ) {

				var field = FLBuilderPreview._fontsList[ fieldFont ];

				// iterate over the font / weight object
				Object.keys( field ).forEach( function( key ) {

					// get the weights of this font
					var weights = field[ key ];
					fontArray[ key ] = fontArray[ key ] || [];

					// remove duplicates from the values array
					weights = weights.filter( function( weight ) {
				        return fontArray[ key ].indexOf( weight ) < 0;
				    });

					fontArray[ key ] = fontArray[ key ].concat( weights );

				});

			});

			$.each( fontArray, function( font, weight ){
				if ( 'Molle' === font ) {
					href += font + ':i|';
				} else {
					href += font + ':' + weight.join() + '|';
				}
			} );

			// remove last character and replace spaces with plus signs
			href = url + href.slice( 0, -1 ).replace( ' ', '+' );

			if( $( '#fl-builder-google-fonts-preview' ).length < 1 ){
				$( '<link>' )
					.attr( 'id', 'fl-builder-google-fonts-preview' )
					.attr( 'type', 'text/css' )
					.attr( 'rel', 'stylesheet' )
					.attr( 'href', href )
					.appendTo('head');
			} else{
				$( '#fl-builder-google-fonts-preview' ).attr( 'href', href );
			}

		},

		/* CSS Preview
		----------------------------------------------------------*/

		/**
		 * Initializes CSS previews for a node.
		 *
		 * @since 1.3.3
		 * @since 1.6.1 Reworked to accept a preview.rules array.
		 * @access private
		 * @method _initFieldCSSPreview
		 * @param {Object} field A field object.
		 */
		_initFieldCSSPreview: function( field )
		{
			var preview = field.data( 'preview' ),
				i 		= null;

			if ( 'undefined' != typeof preview.rules ) {
				for ( i in preview.rules ) {
					this._initFieldCSSPreviewCallback( field, preview.rules[ i ] );
				}
			}
			else {
				this._initFieldCSSPreviewCallback( field, preview );
			}
		},

		/**
		 * Initializes CSS preview callbacks for a field.
		 *
		 * @since 1.6.1
		 * @access private
		 * @method _initFieldCSSPreviewCallback
		 * @param {Object} field A field object.
		 * @param {Object} preview The preview data object.
		 */
		_initFieldCSSPreviewCallback: function( field, preview )
		{
			switch ( field.data( 'type' ) ) {

				case 'align':
				case 'justify':
				case 'grid-auto-flow':
					field.find( 'input:not(.fl-preview-ignore)' ).on( 'change', $.proxy( this._previewCSS, this, preview, field ) );
				break;

				case 'object-fit':

					// Position Sub-field
					field.find( 'input:not(.fl-preview-ignore)' ).on( 'input', $.proxy( this._previewCSS, this, preview, field ) );

					// Fit Button Group
					const fit = field.find( 'input[type="hidden"]:not(.fl-preview-ignore)' )
					fit.on( 'change', $.proxy( this._previewCSS, this, preview, field ) );
					fit.on( 'change', $.proxy( this._previewFieldObjectFit, this, preview, field ) );
				break;

				case 'border':
					field.find( 'select:not(.fl-preview-ignore)' ).on( 'change', $.proxy( this._previewBorderCSS, this, preview, field ) );
					field.find( 'input[type=number]:not(.fl-preview-ignore)' ).on( 'input', $.proxy( this._previewBorderCSS, this, preview, field ) );
					field.find( 'input[type=hidden]:not(.fl-preview-ignore)' ).on( 'change', $.proxy( this._previewBorderCSS, this, preview, field ) );
				break;

				case 'color':
					field.find( '.fl-color-picker-value' ).on( 'change', $.proxy( this._previewColorCSS, this, preview, field ) );
				break;

				case 'dimension':
					field.find( 'input[type=number]:not(.fl-preview-ignore)' ).on( 'input', $.proxy( this._previewDimensionCSS, this, preview, field ) );
				break;

				case 'gradient':
					field.find( 'select:not(.fl-preview-ignore)' ).on( 'change', $.proxy( this._previewGradientCSS, this, preview, field ) );
					field.find( '.fl-gradient-picker-angle' ).on( 'input', $.proxy( this._previewGradientCSS, this, preview, field ) );
					field.find( '.fl-color-picker-value' ).on( 'change', $.proxy( this._previewGradientCSS, this, preview, field ) );
					field.find( '.fl-gradient-picker-stop' ).on( 'input', $.proxy( this._previewGradientCSS, this, preview, field ) );
				break;

				case 'photo':
					field.find( 'select:not(.fl-preview-ignore)' ).on( 'change', $.proxy( this._previewCSS, this, preview, field ) );
				break;

				case 'select':
				case 'aspect-ratio':
				case 'placement':
					field.find( 'select:not(.fl-preview-ignore)' ).on( 'change', $.proxy( this._previewCSS, this, preview, field ) );
				break;

				case 'shadow':
					field.find( 'input:not(.fl-preview-ignore)' ).on( 'input', $.proxy( this._previewShadowCSS, this, preview, field ) );
					field.find( '.fl-color-picker-value' ).on( 'change', $.proxy( this._previewShadowCSS, this, preview, field ) );
				break;

				case 'text':
					field.find( 'input[type=text]:not(.fl-preview-ignore)' ).on( 'keyup input change', $.proxy( this._previewCSS, this, preview, field ) );
				break;

				case 'hidden':
					field.find( 'input[type=hidden]:not(.fl-preview-ignore)' ).on( 'change', $.proxy( this._previewCSS, this, preview, field ) );
				break;

				case 'typography':
					field.find( 'select:not(.fl-preview-ignore)' ).on( 'change', $.proxy( this._previewTypographyCSS, this, preview, field ) );
					field.find( 'input[type=number]:not(.fl-preview-ignore)' ).on( 'input', $.proxy( this._previewTypographyCSS, this, preview, field ) );
					field.find( 'input[type=hidden]:not(.fl-preview-ignore)' ).on( 'change', $.proxy( this._previewTypographyCSS, this, preview, field ) );
				break;

				case 'unit':
					field.find( 'input[type=number]:not(.fl-preview-ignore)' ).on( 'input', $.proxy( this._previewCSS, this, preview, field ) );
				break;

				case 'button-group':
				case 'grid-tracklist':
				case 'grid-area':
					field.find( 'input[type=hidden]:not(.fl-preview-ignore)').on( 'change', $.proxy( this._previewCSS, this, preview, field ) );
				break;

				case 'flex':
				case 'size':
					field.find( 'input[type=number]:not(.fl-preview-ignore)' ).on( 'input', $.proxy( this._previewCSS, this, preview, field ) );
					field.find( 'input[type=hidden]:not(.fl-preview-ignore)').on( 'change', $.proxy( this._previewCSS, this, preview, field ) );
				break;
			}
		},

		/**
		 * Updates the CSS rule for a preview.
		 *
		 * @since 1.3.3
		 * @access private
		 * @method _previewCSS
		 * @param {Object} preview A preview object.
		 * @param {Object} field A preview field element.
		 * @param {Object} e An event object.
		 */
		_previewCSS: function( preview, field, e )
		{
			var selector 	= this._getPreviewSelector( this.classes.node, preview.selector ),
				property 	= preview.property,
				unit     	= this._getPreviewCSSUnit( preview, field, e ),
				input    	= $( e.target ),
				subVals     = preview.substitute_values, /* substitute the css value for a staticly-defined alternative */
				rawVal    	= input.val(),
				value       = subVals && Object.keys( subVals ).includes( rawVal ) ? subVals[rawVal] : rawVal,
				responsive 	= input.closest( '.fl-field-responsive-setting' ).length ? true : false,
				important 	= preview.important && '' !== value ? ' !important' : '';

			if ( property.indexOf( 'image' ) > -1 && value ) {
				value = 'url(' + value + ')';
			} else if ( '%' === unit && 'opacity' === property ) {
				value = parseInt( value ) / 100;
			} else if ( '' !== value && ! isNaN(value) ) {
				value += unit;
			}

			if ( preview.format_value ) {
				value = wp.i18n.sprintf( preview.format_value, value )
			}

			/**
			* Support for sub_value key when previewing compound fields.
			*/
			if ( undefined !== preview.sub_value ) {
				const name = input.attr('name')
				if ( 'string' === typeof preview.sub_value && ! name.endsWith( `[${preview.sub_value}]` ) ) {
					return
				} else if ( 'object' === typeof preview.sub_value && ! name.includes(`[${preview.sub_value.setting_name}]`) ) {
					return
				}
			}

			/**
			 * Support for enabled property
			 * Meant to closely match FLBuilderCSS::is_rule_enabled()
			 */
			if ( 'boolean' === typeof preview.enabled ) {
				return preview.enabled

			} else if ( preview.enabled && 'object' === typeof preview.enabled ) {
				const form = $( '.fl-builder-settings:visible', window.parent.document )
				const settings = FLBuilder._getSettings( form )

				// Test each setting in the object
				for( let name in preview.enabled ) {
					const test = preview.enabled[name]

					if ( 'object' === typeof test ) {

						if ( 'nearest_value' in test ) {
							const mode = FLBuilderResponsiveEditing._mode
							const inherited = this.getInheritedSettingValue( name, mode, settings )

							if ( 'string' === typeof test.nearest_value && test.nearest_value !== inherited ) {
								return
							} else if ( Array.isArray( test.nearest_value ) && ! test.nearest_value.includes( inherited ) ) {
								return
							}
						}

					} else if ( Array.isArray( preview.enabled[name] ) ) {
						if ( ! preview.enabled[name].some( v => v === settings[name] ) ) {
							return
						}
					} else if ( preview.enabled[name] !== settings[name] ) {
						return
					}
				}
			}

			if ( Array.isArray( property ) ) {
				for( let i in property ) {
					this.updateCSSRule( selector, property[i], value + important, responsive );
				}
			} else {
				this.updateCSSRule( selector, property, value + important, responsive );
			}
		},

		/**
		 * Find the nearest inherited value for a particular setting from a given breakpoint.
		 */
		getInheritedSettingValue: function( settingBaseName, currentBreakpoint, settings ) {
			const isDefault = '' === currentBreakpoint || 'default' === currentBreakpoint
			let name = isDefault ? settingBaseName : `${settingBaseName}_${currentBreakpoint}`

			if ( undefined !== settings[name] && '' !== settings[name] ) {
				return settings[name]
			}

			// Meant to be in reverse (most-to-least specific)
			const current = 'default' === currentBreakpoint ? '' : currentBreakpoint
			let breakpoints = [ 'responsive', 'medium', 'large', '' ]
			let i = breakpoints.indexOf( current )
			if ( -1 === i ) {
				return null
			}
			breakpoints = breakpoints.slice(i)

			for( let i in breakpoints ) {
				const breakpoint = breakpoints[i]
				name = '' === breakpoint ? settingBaseName : `${settingBaseName}_${breakpoint}`

				if ( undefined !== settings[name] && '' !== settings[name] ) {
					return settings[name]
				}
			}
			return null
		},

		/* Border Field CSS Preview
		----------------------------------------------------------*/

		/**
		 * Updates the CSS rule for a border preview.
		 *
		 * @since 2.2
		 * @access private
		 * @method _previewBorderCSS
		 * @param {Object} preview A preview object.
		 * @param {Object} field A field object.
		 * @param {Object} e An event object.
		 */
		_previewBorderCSS: function( preview, field, e )
		{
			var selector = this._getPreviewSelector( this.classes.node, preview.selector ),
				target = $( e.target ),
				field = target.closest( '.fl-field' ),
				wrap = target.closest( '.fl-compound-field-setting' ),
				property = wrap.data( 'property' ),
				value = target.val(),
				unit = wrap.find( '.fl-field-unit-select' ),
				responsive = target.closest( '.fl-field-responsive-setting' ).length ? true : false,
				important = preview.important && '' !== value ? ' !important' : '';

			preview.property = property;

			if ( 'border-color' === property ) {
				this._previewColorCSS( preview, field, e );
			} else if ( 'border-width' === property || 'border-radius' === property ) {
				this._previewDimensionCSS( preview, field, e );
			} else if ( 'box-shadow' === property ) {
				this._previewShadowCSS( preview, wrap, e );
			} else {

				if ( 'border-style' === property ) {
					field.find( '.fl-border-field-width input:visible' ).trigger( 'input' );
				}

				this.updateCSSRule( selector, property, value + important, responsive );
			}
		},

		/* Color Field CSS Preview
		----------------------------------------------------------*/

		/**
		 * Updates the CSS rule for a color preview.
		 *
		 * @since 1.3.3
		 * @access private
		 * @method _previewColorCSS
		 * @param {Object} preview A preview object.
		 * @param {Object} field A field object.
		 * @param {Object} e An event object.
		 */
		_previewColorCSS: function(preview, field, e)
		{
			var selector 	= this._getPreviewSelector( this.classes.node, preview.selector ),
				input    	= $(e.target),
				value      	= input.val(),
				responsive 	= input.closest( '.fl-field-responsive-setting' ).length ? true : false,
				important 	= preview.important && '' !== value ? ' !important' : '';

			if ( '' !== value && value.indexOf( 'rgb' ) < 0 && value.indexOf( 'var' ) < 0 ) {
				value = '#' + value;
			}

			this.updateCSSRule( selector, preview.property, value + important, responsive );
		},

		/* Dimension Field CSS Preview
		----------------------------------------------------------*/

		/**
		 * Updates the CSS rule for a dimension field preview.
		 *
		 * @since 2.0.7
		 * @access private
		 * @method _previewDimensionCSS
		 * @param {Object} preview A preview object.
		 * @param {Object} field A preview field element.
		 * @param {Object} e An event object.
		 */
		_previewDimensionCSS: function( preview, field, e )
		{
			var selector = this._getPreviewSelector( this.classes.node, preview.selector ),
				property = preview.property,
				key = field.attr( 'id' ).replace( 'fl-field-', '' ),
				dimension = $( e.target ).data( 'unit' ),
				value = this._getDimensionValue( preview, field, dimension, e ),
				responsive = field.find( '.fl-field-responsive-setting' ).length ? true : false,
				important = preview.important && '' !== value ? ' !important' : '';

			if ( 'border-radius' === property ) {
				property = 'border-' + dimension.replace( '_', '-' ) + '-radius';
			} else if ( 'border-width' === property ) {
				property = 'border-' + dimension + '-width';
			} else if ( 'gap' === property ) {
				property = dimension + '-' + property;
			} else {
				property = property + '-' + dimension;
			}

			this.updateCSSRule( selector, property, value + important, responsive );

			if ( 'margin' === key || 'padding' === key || 'border' === key ) {
				if ( this.elements.node.find('.fl-bg-slideshow').length ) {
					FLBuilder._resizeLayout();
				}
			}
		},

		/**
		 * Get a preview dimension value for a property.
		 *
		 * @since 2.2
		 * @access private
		 * @param {Object} preview A preview object.
		 * @param {Object} field A preview field element.
		 * @param {String} dimension The dimension key.
		 * @param {Object} e An event object.
		 * @return {String}
		 */
		_getDimensionValue: function( preview, field, dimension, e )
		{
			var input = $( e.target ),
				value = input.val(),
				unit  = '';

			value = value.toLowerCase().replace( /[^a-z0-9%.\-]/g, '' );

			if ( null !== value && '' !== value && ! isNaN( value ) ) {
				unit = this._getPreviewCSSUnit( preview, field, e );
				value = parseFloat( value ) + ( unit ? unit : 'px' );
			} else if ( input.attr( 'placeholder' ) ) {
				unit = this._getPreviewCSSUnit( preview, field, e );
				value = parseFloat( input.attr( 'placeholder' ) ) + ( unit ? unit : 'px' );
			}

			return value;
		},

		/**
		 * Get the value's unit for a CSS preview.
		 *
		 * @since 2.2
		 * @access private
		 * @param {Object} preview A preview object.
		 * @param {Object} field A preview field element.
		 * @param {Object} e An event object.
		 * @return {String}
		 */
		_getPreviewCSSUnit: function( preview, field, e )
		{
			var input 		= $( e.target ),
				mode        = FLBuilderResponsiveEditing._mode,
				compound 	= input.closest( '.fl-compound-field-setting' ).length ? true : false,
				responsive 	= input.closest( '.fl-field-responsive-setting' ).length ? true : false,
				select		= null;

			if ( compound ) {
				select = input.closest( '.fl-compound-field-setting' ).find( '.fl-field-unit-select' );
			} else if ( responsive ) {
				select = input.closest( '.fl-field-responsive-setting' ).find( '.fl-field-unit-select' );
			} else {
				select = field.find( '.fl-field-unit-select' );
			}

			if ( select && select.length ) {
				if ( 'SELECT' === select.prop( 'tagName' ) ) {
					return select.val();
				} else {
					return select.text();
				}
			} else if ( preview.unit ) {
				return preview.unit;
			}

			return '';
		},

		/**
		 * Initializes the custom unit select for a field.
		 *
		 * @since 2.2
		 * @access private
		 * @method _initFieldUnitSelect
		 * @param {Object} field
		 */
		_initFieldUnitSelect: function(field)
		{
			field.find( '.fl-field-unit-select' ).on( 'change', function() {
				var select = $( this ),
					responsive = select.closest( '.fl-field-responsive-setting' ),
					field = select.closest( '.fl-field' );

				if ( responsive.length ) {
					responsive.find( 'input' ).trigger( 'input' );
				} else {
					field.find( 'input' ).trigger( 'input' );
				}
			} );
		},

		/* Gradient Field CSS Preview
		----------------------------------------------------------*/

		/**
		 * Updates the CSS rule for a gradient preview.
		 *
		 * @since 2.2
		 * @access private
		 * @method _previewGradientCSS
		 * @param {Object} preview A preview object.
		 * @param {Object} field A field object.
		 * @param {Object} e An event object.
		 */
		_previewGradientCSS: function( preview, field, e )
		{
			var selector 	= this._getPreviewSelector( this.classes.node, preview.selector ),
				type		= field.find( '.fl-gradient-picker-type-select' ).val(),
				angle		= field.find( '.fl-gradient-picker-angle' ).val(),
				position	= field.find( '.fl-gradient-picker-position' ).val(),
				colors		= field.find( '.fl-color-picker-value' ),
				stops		= field.find( '.fl-gradient-picker-stop input' ),
				values		= [],
				value		= '',
				important 	= '';

			colors.each( function( i ) {
				var color = $( this ).val(),
					stop  = stops.eq( i ).val();

				if ( '' === color ) {
					color = 'rgba(255,255,255,0)';
				}
				if ( color.indexOf( 'rgb' ) < 0 ) {
					color = '#' + color;
				}
				if ( isNaN( stop ) ) {
					stop = 0;
				}

				values.push( color + ' ' + stop + '%' );
			} );

			values = values.join( ', ' );

			if ( 'linear' === type ) {
				if ( isNaN( angle ) ) {
					angle = 0;
				}
				value = 'linear-gradient(' + angle + 'deg, ' + values + ')';
			} else {
				value = 'radial-gradient(at ' + position + ', ' + values + ')';
			}

			important = preview.important && '' !== value ? ' !important' : '';

			this.updateCSSRule( selector, preview.property, value +  important );
		},

		/* Shadow Field CSS Preview
		----------------------------------------------------------*/

		/**
		 * Updates the CSS rule for a shadow preview.
		 *
		 * @since 2.2
		 * @access private
		 * @method _previewShadowCSS
		 * @param {Object} preview A preview object.
		 * @param {Object} field A field object.
		 * @param {Object} e An event object.
		 */
		_previewShadowCSS: function( preview, field, e )
		{
			var selector 	= this._getPreviewSelector( this.classes.node, preview.selector ),
				color		= field.find( '.fl-shadow-field-color input' ).val(),
				horizontal	= field.find( '.fl-shadow-field-horizontal input' ).val(),
				vertical	= field.find( '.fl-shadow-field-vertical input' ).val(),
				blur		= field.find( '.fl-shadow-field-blur input' ).val(),
				spread		= field.find( '.fl-shadow-field-spread input' ).val(),
				hasSpread   = field.find( '.fl-shadow-field-spread input' ).length ? true : false,
				responsive  = $( e.target ).closest( '.fl-field-responsive-setting' ).length ? true : false,
				value		= '',
				important 	= '';

			if ( '' !== color ) {

				if ( '' === horizontal ) {
					horizontal = 0;
				}
				if ( '' === vertical ) {
					vertical = 0;
				}
				if ( '' === blur ) {
					blur = 0;
				}
				if ( '' === spread ) {
					spread = 0;
				}
				if ( color.indexOf( 'rgb' ) < 0 ) {
					color = '#' + color;
				}

				value = horizontal + 'px ';
				value += vertical + 'px ';
				value += blur + 'px ';

				if ( hasSpread ) {
					value += spread + 'px ';
				}

				value += color;
				value += important;
			}

			important = preview.important && '' !== value ? ' !important' : '';

			this.updateCSSRule( selector, preview.property, value, responsive );
		},

		/* Typography Field CSS Preview
		----------------------------------------------------------*/

		/**
		 * Updates the CSS rule for a typography preview.
		 *
		 * @since 2.2
		 * @access private
		 * @method _previewTypographyCSS
		 * @param {Object} preview A preview object.
		 * @param {Object} field A field object.
		 * @param {Object} e An event object.
		 */
		_previewTypographyCSS: function( preview, field, e )
		{
			var selector = this._getPreviewSelector( this.classes.node, preview.selector ),
				target = $( e.target ),
				field = target.closest( '.fl-field' ),
				wrap = target.closest( '.fl-compound-field-setting' ),
				property = wrap.data( 'property' ),
				value = target.val(),
				unit = wrap.find( '.fl-field-unit-select' ),
				responsive = target.closest( '.fl-field-responsive-setting' ).length ? true : false,
				important = preview.important && '' !== value ? ' !important' : '';

			if ( 'font-family' === property ) {
				preview.id = field.attr( 'id' );
				this._previewFont( preview, { delegateTarget: wrap } );
			} else if ( 'text-shadow' === property ) {
				preview.property = 'text-shadow';
				this._previewShadowCSS( preview, wrap, e );
			} else {

				if ( unit.length && '' !== value ) {
					if ( 'vw' === unit.val() ) {
						// calc(14px + 5vw);
						value = 'calc(' + FLBuilderConfig.global.responsive_base_fontsize + 'px + ' + value + 'vw)'
					} else {
						value += 'SELECT' === unit.prop( 'tagName' ) ? unit.val() : 'px';
					}
				}
				this.updateCSSRule( selector, property, value + important, responsive );
			}
		},

		/* Widget Preview
		----------------------------------------------------------*/

		/**
		 * Initializes the attribute preview for a field.
		 *
		 * @since 2.2
		 * @access private
		 * @method _initFieldAttributePreview
		 * @param {Object} field The field to preview.
		 */
		_initFieldAttributePreview: function(field)
		{
			var preview   = field.data('preview'),
				attrName = preview.attribute,
				input = field.find('input'),
				value = field.val(),
				formatValue = window[preview.format_callback];

			var fullSelector = this._getPreviewSelector( this.classes.node, preview.selector ),
				element = $( fullSelector );

			var callback = this._previewAttribute.bind( this, input, element, attrName, formatValue );

			input.on('change', callback );
			input.on('keyup', callback );
			input.on('input', callback );
		},

		/**
		 * Runs a real time preview for attribute fields.
		 *
		 * @since 2.2
		 * @access private
		 * @method _previewAttribute
		 * @param {Object} input A ref to the input control.
		 * @param {Object} element A ref to the selected element within the node.
		 * @param String attrName The name of the attribute to be changed.
		 */
		_previewAttribute: function( input, element, attrName, formatValue ) {
			var value = input.val();
			if ( 'function' === typeof formatValue ) {
				value = formatValue( value );
			}
			for (i = 0; i < element.length; i++) {
				element[i].setAttribute( attrName, value );
			}
		},

		/**
		 * Initializes the preview for a WordPress widget.
		 *
		 * @since 1.3.3
		 * @access private
		 * @method _initFieldWidgetPreview
		 * @param {Object} field A field object.
		 */
		_initFieldWidgetPreview: function(field)
		{
			var callback = $.proxy(this.delayPreview, this);

			field.find('input').on('keyup', callback);
			field.find('input[type=checkbox]').on('click', callback);
			field.find('textarea').on('keyup', callback);
			field.find('select').on('change', callback);
		},

		/* Animation Field Preview
		----------------------------------------------------------*/

		/**
		 * Initializes animation previews.
		 *
		 * @since 2.2
		 * @access private
		 * @method _initFieldAnimationPreview
		 */
		_initFieldAnimationPreview: function( preview, field )
		{
			field.find( '.fl-animation-field-style select' ).on( 'change', $.proxy( this._previewAnimationField, this, preview, field ) );
			field.find( '.fl-animation-field-duration input' ).on( 'input', $.proxy( this._previewAnimationField, this, preview, field ) );
		},

		/**
		 * Previews an animation field.
		 *
		 * @since 2.2
		 * @access private
		 * @method _previewAnimationField
		 */
		_previewAnimationField: function( preview, field, e )
		{
			var selector = this._getPreviewSelector( this.classes.node, preview.selector ),
				element = $( selector ),
				animation = field.find( '.fl-animation-field-style select' ),
				duration = field.find( '.fl-animation-field-duration input' ),
				options = animation[0].options;

			element.removeClass( 'fl-animated' );
			element.removeClass( 'fl-animation' );
			element.css( 'animation-duration', '' );

			for ( var i = 0; i < options.length; i++ ) {
				element.removeClass( 'fl-' + options[i].value );
			}

			if ( '' !== animation.val() ) {
				element.addClass( 'fl-animation' );
				element.addClass( 'fl-' + animation.val() );
				element.data( 'animation-delay', 0 );
				element.data( 'animation-duration', duration.val() );
			}

			FLBuilderLayout._doModuleAnimation.apply( element );
		},

		_previewFieldObjectFit: function( preview, field, e ) {
			const selector = this._getPreviewSelector( this.classes.node, preview.selector ),
				  element = $( selector ).closest('.fl-module').get(0),
				  className = 'fl-fill-container',
				  fit = field.find( '.fl-button-group-field input' ).val();

			if ( '' === fit && element.classList.contains( className ) ) {
				element.classList.remove( className )
			}
			if ( '' !== fit && ! element.classList.contains( className ) ) {
				element.classList.add( className )
			}
		},

		/**
		 * Returns a formatted selector string for a preview.
		 *
		 * @since 1.6.1
		 * @access private
		 * @method _getPreviewSelector
		 * @param {String} selector A CSS selector string.
		 * @return {String}
		 */
		_getPreviewSelector: function( prefix, selector )
		{
			return FLBuilderPreview.getFormattedSelector.call( this, prefix, selector );
		},

		/**
		 * Converts words in a string to upper case.
		 *
		 * @since 2.2
		 * @method toUpperCaseWords
		 * @param {String} string
		 * @return {String}
		 */
		toUpperCaseWords: function( string ) {
			return string.charAt( 0 ).toUpperCase() + string.slice( 1 );
		},
	};

	/**
	 * Format a color value for use with CSS
	 * @since 2.2
	 * @method formatColor
	 * @param {String} value
	 * @return {String}
	 */
	FLBuilderPreview.formatColor = function( value ) {
		if ( '' !== value && ( value.indexOf( 'rgb' ) < 0 && value.indexOf( 'url' ) < 0 ) ) {
			value = '#' + value;
		}
		return value;
	};

	FLBuilderPreviewCallbacks = {

		/**
		 * Setup the shape when selected
		 */
		previewShape: function( args, e ) {
			var position = args.preview.position,
				prefix = args.preview.prefix,
				form = args.form,
				yOrientationInputName = prefix + 'transform[][scaleYSign]';
				yOrientation = form.find('input[name="' + yOrientationInputName + '"]');

			if ( 'bottom' === position ) {
				yOrientation.val('invert');
			} else {
				yOrientation.val('');
			}
			yOrientation.trigger('change');
			// Cause refresh
			this.delayPreview();
		},

		/**
		 * Preview the layer's width, height and Y offset
		 */
		previewShapeLayerSize: function( args, e ) {
			var values = args.getValues(),
				unitValue = values.unit,
				width = values.props.width,
				height = values.props.height,
				top = values.props.top,

				/* static data from field config */
				prefix = args.preview.prefix,
				position = args.preview.position,
				layerSelector = this._getPreviewSelector( this.classes.node, '.fl-builder-' + position + '-edge-layer' ),
				shapeSelector = layerSelector + ' > *',

				/* the align field */
				align = args.form.find('[name="' + prefix + 'align"]'),
				alignValue = align.val(),
				alignParts = alignValue.split(' '),
				yAlign = alignParts[0],
				xAlign = alignParts[1],

				/* calculated props */
				shapeField = args.form.find('[name="' + prefix + 'shape"]'),
				shapeValue = shapeField.val(),
				shapePreset = FLBuilderConfig.presets.shape[shapeValue]
				shapeProps = {};

			// Defaults
			shapeProps.width = '100%';
			shapeProps.left = 'auto';
			shapeProps.right = 'auto';
			shapeProps.height = 'auto';
			shapeProps.top = 'auto';
			shapeProps.bottom = 'auto';

			// Width
			if ( width ) {
				shapeProps.width = width + unitValue;
			 	var offset = ( width / 2 ) + unitValue;

				switch( xAlign ) {
					case 'left':
						shapeProps.left = '0';
						shapeProps.right = 'auto';
						break;
					case 'right':
						shapeProps.left = 'auto';
						shapeProps.right = '0';
						break;
					case 'center':
						shapeProps.left = 'calc( 50% - ' + offset + ')';
						shapeProps.right = 'auto';
						break;
				}
			}
			this.updateCSSRule( shapeSelector, 'width', shapeProps.width );
			this.updateCSSRule( shapeSelector, 'left', shapeProps.left );
			this.updateCSSRule( shapeSelector, 'right', shapeProps.right );

			// Height

			// We need a height for vertical centering to work, but it doesn't have to be explicit.
			var heightOffset;
			if ( height ) {
				heightOffset = ( height / 2 ) + unitValue;
			} else if ( width ) {
				var viewBoxHeight = shapePreset.data.viewBox.width,
					impliedHeight = ( width / viewBoxHeight ) * 100;

				heightOffset = ( impliedHeight / 2 ) + unitValue ;
			} else {
				heightOffset = ''
			}

			if ( height ) {
				shapeProps.height = height + unitValue;
			}

			switch( yAlign ) {
				case 'top':
					shapeProps.top = '0';
					shapeProps.bottom = 'auto';
					break;
				case 'bottom':
					shapeProps.top = 'auto';
					shapeProps.bottom = '0';
					break;
				case 'center':
					shapeProps.top = 'calc( 50% - ' + heightOffset + ')';
					shapeProps.bottom = 'auto';
					break;
			}

			this.updateCSSRule( shapeSelector, 'height', shapeProps.height + ' !important' );
			this.updateCSSRule( shapeSelector, 'top', shapeProps.top );
			this.updateCSSRule( shapeSelector, 'bottom', shapeProps.bottom );

			// Y offset
			if ( '' === top ) {
				this.updateCSSRule( layerSelector, position, '0' );
			} else {
				this.updateCSSRule( layerSelector, position, top + unitValue );
			}

		},

		previewShapeAlign: function( args, e ) {
			// Let width and height preview do the work.
			var prefix = args.preview.prefix,
				widthField = args.form.find('[name="' + prefix + 'size_width"]');

			widthField.trigger('input');
		},

		/**
		 * Process the fill style when toggled
		 *
		 * @param {Object} args - a collection of helper references setup on field init
		 * @param Event e - the event passed by the event listener
		 * @return void
		 */
		previewShapeFillStyle: function( args, e ) {
			var value = args.input.val(),
				preview = args.preview,
				prefix = args.preview.prefix,
				linearGradientId = 'fl-row-' + args.nodeID + '-' + prefix + '-linear-gradient',
				radialGradientId = 'fl-row-' + args.nodeID + '-' + prefix + '-radial-gradient',
				patternId = 'fl-row-' + args.nodeID + '-' + prefix + '-pattern',
				form = args.form;

			if ( 'undefined' !== typeof value ) {
				var selector = this._getPreviewSelector( this.classes.node, preview.selector );

				switch( value ) {
					case 'color':
						var colorValue = form.find('[name=' + prefix + 'fill_color]').val();
						this.updateCSSRule( selector, 'fill', FLBuilderPreview.formatColor( colorValue ) );
						break;
					case 'gradient':
						var gradientField = form.find('#fl-field-' + prefix + 'fill_gradient'),
							gradientType = gradientField.find('select[name$="[type]"]').val();

						var gradientId = 'radial' === gradientType ? radialGradientId : linearGradientId ;

						this.updateCSSRule( selector, 'fill', 'url(#' + gradientId + ')' );
						break;
					case 'pattern':
						var fill = 'url(#' + patternId + ')';
						this.updateCSSRule( selector, 'fill', fill );
				}
			}
		},

		/**
		 * Process the gradient control values
		 *
		 * @param {Object} args - a collection of helper references setup on field init
		 * @param Event e - the event passed by the event listener
		 * @return void
		 */
		previewShapeGradientFill: function( args, e ) {
			var values = args.getValues(),
				node = args.node,
				preview = args.preview,
				layerSelector = '.fl-builder-' + preview.position + '-edge-layer',
				gradientDef = node.find( layerSelector + ' ' + values.type + 'Gradient' ),
				fill = 'url(#' + gradientDef.attr('id') + ')',
				shapeSelector = this._getPreviewSelector( this.classes.node, layerSelector + ' .fl-shape' );

			this.updateCSSRule( shapeSelector, 'fill', fill );

			// Set stops
			var stopEls = gradientDef.find('stop');
			for( var i in values.stops ) {
				var stopVal = values.stops[i],
					stop = stopEls.eq(i),
					color = stopVal.color,
					offset = stopVal.stop,
					opacity = 1;

				if ( color.indexOf( 'rgba' ) === 0 ) {
					var  rawValues = color.substring( color.indexOf('(') + 1, color.lastIndexOf(')') ).split( /,\s*/ );
					opacity = rawValues.pop();
					color = 'rgb(' + rawValues.join(',') + ')';
				}

				stop.attr('stop-color', FLBuilderPreview.formatColor( color ) );
				stop.attr('stop-opacity', opacity );
				stop.attr('offset', offset + '%' );
			}

			// Set Angle
			if ( 'linear' === values.type && 'undefined' !== typeof gradientDef[0] ) {

				gradientDef[0].setAttribute( 'gradientTransform', 'rotate(' + values.angle + ' .5 .5 )' );
			}

			// Set Position
			if ( 'radial' === values.type ) {

				// Split string by space
				parts = values.position.split(' ');

				var x = parts[0],
					y = parts[1],
					cx,
					cy,
					r;

				switch( x ) {
					case 'top':
					case 'left':
						cx = 0;
						break;
					case 'center':
						cx = .5;
						break;
					case 'bottom':
					case 'right':
						cx = 1;
						break;
				}

				switch( y ) {
					case 'top':
					case 'left':
						cy = 0;
						break;
					case 'center':
						cy = .5;
						break;
					case 'bottom':
					case 'right':
						cy = 1;
						break;
				}

				r = .5;
				if ( cx !== .5 || cy !== .5 ) r = 1;

				gradientDef.attr( 'cx', cx );
				gradientDef.attr( 'cy', cy );
				gradientDef.attr( 'r', r );
			}
		},

		/**
		 * Process the transform control values
		 *
		 * @param {Object} args - a collection of helper references setup on field init
		 * @param Event e - the event passed by the event listener
		 * @return void
		 */
		previewShapeTransform: function ( args, e ) {
			var form = args.form,
				preview = args.preview,
				prefix = preview.prefix,
				layerSelector = this._getPreviewSelector( this.classes.node, preview.selector ),
				shapeSelector = layerSelector + ' > *',
				values = args.getValues(),
				shapeTransforms = [];

			Object.keys( values ).map( function( prop ) {
				var value = values[prop];

				var unit = '',
					sign = '';

				switch( prop ) {
					case 'scaleXSign':
					case 'scaleYSign':
						return;

					case 'scaleX':
					case 'scaleY':
						if ( !value || '' === value || 0 === value ) value = '1';

						sign = 'scaleX' === prop ? values['scaleXSign'] : values['scaleYSign'] ; // Positive or negative?

						if ( 'invert' === sign ) {
							value = -Math.abs( value );
						} else {
							value = Math.abs( value );
						}

						shapeTransforms.push( prop + '(' + value + ')' ); // scale has no unit
						break;

					case 'translateX':
					case 'translateY':
						if ( value ) {
							unit = 'px';
							shapeTransforms.push( prop + '(' + value + unit + ')' );
						}
						break;

					case 'skewX':
					case 'skewY':
						if ( value ) {
							unit = 'deg';
							shapeTransforms.push( prop + '(' + value + unit + ')' );
						}
						break;

					case 'rotate':
						unit = 'deg';
						if ( value !== '' && value !== '0' ) {
							shapeTransforms.push( 'rotate(' + value + unit + ')' );
						}

						break;
				}
			} );
			this.updateCSSRule( shapeSelector, 'transform', shapeTransforms.join(' ') );
		},
	}

})(jQuery);

Youez - 2016 - github.com/yon3zu
LinuXploit