text: /*
   *  CSS Gradient Generator
   *  v2.1.0
   *  CSS gradient generator with the best browser support. Three different layouts to meet Your requirement (from simple linear to complex radial gradients).
   *  http://www.virtuosoft.eu/tools/css-gradient-generator/
   *
   *  Made by Virtuosoft:
   *      István Ujj-Mészáros - https://github.com/istvan-ujjmeszaros
   *      Ferenc Fapál - http://twitter.com/fwoodpaul
   *
   *  Thanks for the following persons:
   *      Tibor Szász - https://github.com/kowdermeister
   *      László Sotus - https://github.com/Lacisan
   *
   *  Under Creative Commons Attribution-NonCommercial-ShareAlike 4.0 License
   *  To view a copy of this license, visit
   *  http://creativecommons.org/licenses/by-nc-sa/4.0/deed.en_US.
   */
  var CSSGradientEditor=function(a,b){"use strict";function c(){bd.css=$.fn.ColorPickerSliders.detectWhichGradientIsSupported(),$.fn.ColorPickerSliders.svgSupported()&&(bd.svg=!0)}function d(){return bd.css?"filter"===bd.css&&bd.svg?"svg":bd.css:bd.svg?"svg":"averagebgcolor"}function e(a){var b=a.attr("name");ib(b+"_value",a.val()),ib(b+"_unit",a.next(".bootstrap-touchspin-postfix").text())}function f(a,b){return b>=0?180*Math.atan2(b,a)/Math.PI:360+180*Math.atan2(b,a)/Math.PI}function g(){$("[title]").tooltip({animation:!1,html:!0}),c(),r(window.location.search.length?window.location.search.substring(1):cc("lastGradient")?cc("lastGradient"):"t=linear,d=bottom,r=on|c5e3ef/0/%,4badd2/50/%,278fba/51/%,8ed4f1/100/%"),E(),F(),D(),$('input[name="angle"]').val(hb("linear_gradient_angle")).TouchSpin({postfix:"<sup>o</sup>",min:0,max:359}).on("change touchspin.on.stopspin",function(a){ib("linear_gradient_angle",$(this).val()%360),$(this).closest(".css-gradient-editor-controller").trigger("mousedown"),N(!1),Qb(),"touchspin"===a.type&&kc()}),$('input[name="gradient_size"]').val(hb("gradient_size_value")).TouchSpin({postfix:hb("gradient_size_unit"),min:0,max:Dc}).on("change touchspin.on.stopspin",function(a){e($(this)),"touchspin"===a.type&&kc()}),$('input[name="gradient_size_major"]').val(hb("gradient_size_major_value")).TouchSpin({postfix:hb("gradient_size_major_unit"),min:0,max:Dc}).on("change touchspin.on.stopspin",function(a){e($(this)),"touchspin"===a.type&&kc()}),$('input[name="gradient_position_horizontal"]').val(hb("gradient_position_horizontal_value")).TouchSpin({postfix:hb("gradient_position_horizontal_unit"),min:Cc,max:Dc}).on("change touchspin.on.stopspin",function(a){e($(this)),"touchspin"===a.type&&kc()}),$('input[name="gradient_position_vertical"]').val(hb("gradient_position_vertical_value")).TouchSpin({postfix:hb("gradient_position_vertical_unit"),min:Cc,max:Dc}).on("change touchspin.on.stopspin",function(a){e($(this)),"touchspin"===a.type&&kc()}),L(),$b(),W(!0),ed.preview.removeClass("ajax-loader"),qc()}function h(){var b=sc(q(vc));switch(yc=cc("config_layout"),ed.layoutselectoreasy.removeClass("active"),ed.layoutselectoradvanced.removeClass("active"),ed.layoutselectorexpert.removeClass("active"),yc){case zc:ed.layoutselectoreasy.addClass("active");break;case Ac:ed.layoutselectoradvanced.addClass("active");break;case Bc:ed.layoutselectorexpert.addClass("active")}ad=!1,b>yc?(ad=!0,b===Ac?ed.warningadvanced.is(":visible")||(ed.warningexpert.hide(),ed.warningadvanced.show()):ed.warningexpert.is(":visible")||(ed.warningadvanced.hide(),ed.warningexpert.show()),yc=b):(ed.warningadvanced.is(":visible")&&ed.warningadvanced.hide(),ed.warningexpert.is(":visible")&&ed.warningexpert.hide());var c=!1;switch(yc){case zc:a.hasClass("layout-simple")||(c=!0,a.removeClass("layout-advanced layout-expert"),a.addClass("layout-simple"));break;case Ac:a.hasClass("layout-advanced")||(c=!0,a.removeClass("layout-simple layout-expert"),a.addClass("layout-advanced"));break;case Bc:a.hasClass("layout-expert")||(c=!0,a.removeClass("layout-simple layout-advanced"),a.addClass("layout-expert"))}c&&W()}function i(){$('input[name="gradient_size"]').val(hb("gradient_size_value")),$('input[name="gradient_size_major"]').val(hb("gradient_size_major_value")),$('input[name="gradient_position_horizontal"]').val(hb("gradient_position_horizontal_value")),$('input[name="gradient_position_vertical"]').val(hb("gradient_position_vertical_value")),K($('input[name="gradient_size"]').next(".input-group-addon.bootstrap-touchspin-postfix"),hb("gradient_size_unit")),K($('input[name="gradient_size_major"]').next(".input-group-addon.bootstrap-touchspin-postfix"),hb("gradient_size_major_unit")),K($('input[name="gradient_position_horizontal"]').next(".input-group-addon.bootstrap-touchspin-postfix"),hb("gradient_position_horizontal_unit")),K($('input[name="gradient_position_vertical"]').next(".input-group-addon.bootstrap-touchspin-postfix"),hb("gradient_position_vertical_unit"))}function j(){Qc=!1,Rc=!1,Sc=!1,ed.coloroffsethue.css("left",50+50*(dd.hue/180)+"%"),ed.coloroffsetchroma.css("left",50+50*(dd.saturation/100)+"%"),ed.coloroffsetlightness.css("left",50+50*(dd.lightness/100)+"%"),ed.coloroffsethue.tooltip({title:"hue: "+(dd.hue>0?"+":"")+dd.hue,animation:!1,trigger:"manual"}),ed.coloroffsetchroma.tooltip({title:"chroma: "+(dd.saturation>0?"+":"")+dd.saturation,animation:!1,trigger:"manual"}),ed.coloroffsetlightness.tooltip({title:"lightness: "+(dd.lightness>0?"+":"")+dd.lightness,animation:!1,trigger:"manual"}),ed.coloroffsethue.on("touchstart mousedown",function(a){a.which>1||(Qc=!0,a.stopPropagation(),a.preventDefault())}),ed.coloroffsetchroma.on("touchstart mousedown",function(a){a.which>1||(Rc=!0,a.stopPropagation(),a.preventDefault())}),ed.coloroffsetlightness.on("touchstart mousedown",function(a){a.which>1||(Sc=!0,a.stopPropagation(),a.preventDefault())}),ed.coloroffsethue.on("mouseover",function(){Qc||Rc||Sc||ed.coloroffsethue.tooltip("show")}),ed.coloroffsethue.on("mouseout",function(){Qc||Rc||Sc||ed.coloroffsethue.tooltip("hide")}),ed.coloroffsetchroma.on("mouseover",function(){Qc||Rc||Sc||ed.coloroffsetchroma.tooltip("show")}),ed.coloroffsetchroma.on("mouseout",function(){Qc||Rc||Sc||ed.coloroffsetchroma.tooltip("hide")}),ed.coloroffsetlightness.on("mouseover",function(){Qc||Rc||Sc||ed.coloroffsetlightness.tooltip("show")}),ed.coloroffsetlightness.on("mouseout",function(){Qc||Rc||Sc||ed.coloroffsetlightness.tooltip("hide")}),$(document).on("click",".coloroffset-close",function(){u()})}function k(){if(dd={hue:0,saturation:0,lightness:0},0!==Hc.length&&"undefined"!=typeof Hc[0].originalcolor){ed.hueoffset&&(ed.hueoffset.val(0),ed.saturationoffset.val(0),ed.lightnessoffset.val(0));for(var a=0;a<Hc.length;a++){var b=Hc[a];delete b.originalcolor}ed.coloroffsethue.css("left","50%"),ed.coloroffsetchroma.css("left","50%"),ed.coloroffsetlightness.css("left","50%")}}function l(){for(var a=0;a<Hc.length;a++){var b,c,d,e=Hc[a];void 0!==typeof e.originalcolor&&e.originalcolor?b=tinycolor(e.originalcolor):(e.originalcolor=e.color,b=tinycolor(e.color)),c=b.toHsl(),d=$.fn.ColorPickerSliders.rgb2lch(b.toRgb()),d.h+=dd.hue,d.h=Math.abs(d.h+360)%360,d.c+=1.44*dd.saturation,d.l+=1.01*dd.lightness,d.c<0&&(d.c=0),d.l<0&&(d.l=0),c.h+=dd.hue,c.h=Math.abs(c.h+360)%360,c.s+=dd.saturation/100,c.l+=dd.lightness/100,c.s>1&&(c.s=1),c.s<0&&(c.s=0),c.l>1&&(c.l=1),c.l<0&&(c.l=0),e.color=tinycolor($.fn.ColorPickerSliders.lch2rgb(d)).toRgbString()}}function m(a){var b;switch(b=a.hasOwnProperty("color")?a.color:a,cc("config_colorformat")){case"hsl":return tinycolor(b).toHslString();case"hex":var c=tinycolor(b);return c.getAlpha()<1?tinycolor(b).toRgbString():tinycolor(b).toHexString();default:return b}}function n(a){var b=tinycolor(a.color);return'stop-color="'+b.toHexString()+'" stop-opacity="'+b.toRgb().a+'"'}function o(a,b,c){return c.replace(new RegExp(a,"g"),b)}function p(a){var b;try{b=decodeURIComponent(a)}catch(c){b=a}return b.replace("+"," ")}function q(a){if(a=Yb(a),a=a.split("&sp="),!a instanceof Array)return!1;if(2!==a.length)return!1;var b,c={},d=[],e=a[0].split("&"),f=a[1].split("__");for(b=0;b<e.length;b++)a=e[b].split("="),c[kb(a[0])]=p(a[1]);for(b=0;b<f.length;b++)a=f[b].split("_"),a[0].length&&d.push({color:tinycolor(p(a[0])).toRgbString(),position:p(a[1]),unit:p(a[2]),index:b,markforDeath:!1});return{data:c,colorStops:d}}function r(b){var c,d={},e="";try{"undefined"==typeof b?(c=q(window.location.search.substring(1)),d=c.data,e=c.colorStops):(c=q(b),d=c.data,e=c.colorStops)}catch(f){}if("undefined"==typeof d&&(d={}),a.data({gradient_type:d.gradient_type||fd.gradient_type,gradient_direction:d.gradient_direction||fd.gradient_direction,gradient_size:d.gradient_size||fd.gradient_size,gradient_size_value:d.gradient_size_value||fd.gradient_size_value,gradient_size_unit:d.gradient_size_unit||fd.gradient_size_unit,gradient_size_major_value:d.gradient_size_major_value||fd.gradient_size_major_value,gradient_size_major_unit:d.gradient_size_major_unit||fd.gradient_size_major_unit,gradient_repeat:d.gradient_repeat||fd.gradient_repeat,gradient_shape:d.gradient_shape||fd.gradient_shape,linear_gradient_angle:d.linear_gradient_angle||fd.linear_gradient_angle,gradient_position_horizontal:d.gradient_position_horizontal||fd.gradient_position_horizontal,gradient_position_horizontal_value:d.gradient_position_horizontal_value||fd.gradient_position_horizontal_value,gradient_position_horizontal_unit:d.gradient_position_horizontal_unit||fd.gradient_position_horizontal_unit,gradient_position_vertical:d.gradient_position_vertical||fd.gradient_position_vertical,gradient_position_vertical_value:d.gradient_position_vertical_value||fd.gradient_position_vertical_value,gradient_position_vertical_unit:d.gradient_position_vertical_unit||fd.gradient_position_vertical_unit}),s(),"undefined"!=typeof e&&""!==e)for(var g=0;g<e.length;g++)V(e[g])}function s(){$(".css-gradient-editor-controller").each(function(){var b=$(this);0!==b.data("name").indexOf("config_")&&(a.data(b.data("name"))===b.data("value")?(b.addClass("active"),b.trigger("mousedown")):b.removeClass("active"))})}function t(){var a,b;uc=$('<div class="coloroffset-popover-container"></div>').appendTo("body"),b=$('<div class="coloroffset-container"></div>').appendTo(uc),b.html($("#coloroffsethtml").html()),ed.coloroffsethue=$(".offset-hue.slider-container .slider-controller",b),ed.coloroffsetchroma=$(".offset-chroma.slider-container .slider-controller",b),ed.coloroffsetlightness=$(".offset-lightness.slider-container .slider-controller",b),j(a),ed.adjust_color.popover({html:!0,animation:!1,trigger:"manual",title:'Adjust gradient color <button type="button" class="close coloroffset-close pull-right" aria-hidden="true">×</button>',placement:"top",container:uc,content:function(){return b}}),ed.adjust_color.popover("show"),Tc=!0;var c=$(".popover"),d=$(window).width();d<c.offset().left+c.width()&&c.css("left",d-c.width()-5)}function u(){try{ed.adjust_color.popover("destroy"),uc.remove()}catch(a){}Tc=!1}function v(a){var b=U(a,ed.previewarea),c=b.horizontal.pixel+Pc.xoffset,e=b.vertical.pixel+Pc.yoffset;w()?(50>c&&(c=50),40>e&&(e=40),c>$(window).width()&&(c=$(window).width()),e>$(window).height()&&(e=$(window).height()),bc("popoutpreviewwidth",c),bc("popoutpreviewheight",e)):(30>c&&(c=30),30>e&&(e=30),c>ed.previewcontainer.width()&&(c=ed.previewcontainer.width()),e>400&&(e=400),bc("previewwidth",c),bc("previewheight",e)),ed.previewarea.css("width",c),ed.previewarea.css("height",e),("oldwebkit"===d()||"svg"===d()&&"explicit"===hb("gradient_size")&&"%"!==hb("gradient_size_unit"))&&W()}function w(){return ed.previewpopoutbutton.hasClass("active")}function x(){w()?z():y()}function y(){Wc=!0,ed.previewpopoutbutton.addClass("active"),ed.previewarea.addClass("preview-popout"),ed.previewpopoutoverlaybutton.show(),C(),("oldwebkit"===d()||"svg"===d()&&"explicit"===hb("gradient_size")&&"%"!==hb("gradient_size_unit"))&&W()}function z(){Wc=!1,ed.previewpopoutbutton.removeClass("active"),ed.previewarea.removeClass("preview-popout"),ed.previewpopoutbutton.blur(),ed.previewpopoutoverlaybutton.hide(),C(),A(),("oldwebkit"===d()||"svg"===d()&&"explicit"===hb("gradient_size")&&"%"!==hb("gradient_size_unit"))&&W()}function A(){if(!Wc){var a=!0,b=ed.previewcontainer.offset(),c=ed.gradientpropertiespanel.offset(),e=$(window).height(),f=ed.gradientpropertiespanel.height()+c.top;f-b.top<e&&(a=!1);var g=$(document).scrollTop(),h=g-b.top,i=Math.round(e/3);g+i>f&&(a=!1),0>h&&(a=!1),!a||ed.previewarea.hasClass("preview-sticky")&&!Vc?!a&&ed.previewarea.hasClass("preview-sticky")&&Uc!==!1&&(ed.previewarea.removeClass("preview-sticky"),ed.previewarea.css("top",0),ed.resizehandler.show(),ed.previewcontainer.height("auto"),ed.previewarea.height(Uc),Uc=!1,("oldwebkit"===d()||"svg"===d()&&"explicit"===hb("gradient_size")&&"%"!==hb("gradient_size_unit"))&&W()):(Uc===!1&&(Uc=ed.previewarea.height(),ed.previewcontainer.height(ed.previewarea.height()),ed.previewarea.addClass("preview-sticky"),ed.resizehandler.hide(),Uc>i&&ed.previewarea.height(i),(Vc||ed.previewarea.offset().top<g)&&(Vc=!0,ed.previewarea.addClass("buggyfixed")),("oldwebkit"===d()||"svg"===d()&&"explicit"===hb("gradient_size")&&"%"!==hb("gradient_size_unit"))&&W()),Vc&&ed.previewarea.css("top",h))}}function B(){if(Uc!==!1){var a=$(window).height(),b=Math.round(a/3);b>Uc&&(b=Uc),ed.previewarea.height(b)}}function C(){if(ed.previewpopoutbutton.hasClass("active")){var a=$(window).width(),b=$(window).height(),c=cc("popoutpreviewwidth"),d=cc("popoutpreviewheight");"undefined"==typeof c&&(c=100),"undefined"==typeof d&&(d=100),c>a&&(c=a),d>b&&(d=b),ed.previewarea.width(c+"px"),ed.previewarea.height(d+"px")}else ed.previewarea.width(cc("previewwidth")||"100%"),ed.previewarea.height(cc("previewheight")||"197px"),ed.previewpopoutoverlaybutton.hide()}function D(){$(".modal-body").on("mousedown mouseup click contextmenu",function(a){a.stopPropagation()}),$("input[name=color_from], input[name=color_to]").on("contextmenu",function(a){a.stopPropagation()}),$(document).on("cssgradienteditor.changeswatches",function(){$b()}),$(document).scroll(function(){(new Date).getTime()-Gc>Ec?(Gc=(new Date).getTime(),A()):(clearTimeout(Fc),Fc=setTimeout(function(){Gc=(new Date).getTime(),A()},Ec))}),$(document).on("click",".force-layout-change",function(a){a.preventDefault(),a.stopPropagation(),tc()}),ed.loaddefaults.on("click",function(){ed.importtextarea.val(JSON.stringify(fd.defaultswatches))}),ed.layoutselectoreasy.on("click",function(a){bc("config_layout",zc),a.preventDefault(),a.stopPropagation(),h()}),ed.layoutselectoradvanced.on("click",function(a){bc("config_layout",Ac),a.preventDefault(),a.stopPropagation(),h()}),ed.layoutselectorexpert.on("click",function(a){bc("config_layout",Bc),a.preventDefault(),a.stopPropagation(),h()}),ed.undobutton.on("click",function(){lc()}),ed.redobutton.on("click",function(){mc()}),ed.previewpopoutbutton.on("click",function(){x()}),ed.adjust_color.on("click",function(){Tc?u():t()}),ed.resizehandler.on("mousedown touchstart",function(a){Pc=!0;var b=U(a,ed.previewarea);Pc={xoffset:ed.previewarea.width()-b.horizontal.pixel,yoffset:ed.previewarea.height()-b.vertical.pixel},a.stopPropagation(),a.preventDefault()}),ed.markersarea.on("click",function(a){V("%"===Mc?{position:U(a,$(this)).horizontal.percent,unit:Mc,color:Lc}:{position:U(a,$(this)).horizontal.pixel,unit:Mc,color:Lc}),a.stopPropagation(),a.preventDefault(),W(),kc()}),$(document).on("touchmove mousemove",function(a){Oc&&(S(a),Z(U(a,ed.markersarea)),a.stopPropagation(),a.preventDefault())}),$(document).on("touchmove mousemove",function(a){Pc&&(v(a),a.stopPropagation(),a.preventDefault())}),$(document).on("touchend mouseup",function(a){Oc&&(Oc.data("mark-for-death")&&Y(Oc.data("index")),Oc=!1,kc(),ob(),a.stopPropagation(),a.preventDefault()),Xc&&(Xc=!1,kc(),a.stopPropagation(),a.preventDefault()),Pc&&(Pc=!1)}),ed.cssoutput.on("contextmenu",function(a){a.stopPropagation()}),ed.permalink.on("contextmenu",function(a){a.stopPropagation()}),ed.imagegradient.on("contextmenu",function(a){a.stopPropagation()}),a.on("contextmenu",function(a){return a.preventDefault(),!1}),$(".css-gradient-editor-controller",a).on("keydown mousedown touchstart",function(a){a.preventDefault(),a.stopPropagation(),G($(this))}),$(".css-gradient-editor-controller",a).on("click",function(a){a.preventDefault(),a.stopPropagation()}),ed.anglecontroller.on("touchstart mousedown",function(a){Xc=!0,M(a),N(),Qb(),a.stopPropagation(),a.preventDefault()}),$(document).on("touchmove mousemove",function(a){Xc&&(M(a),N(),Qb())}),ed.angleinput.on("keyup",function(){var a=/^\d+$/,b=$(this).val();return""===b&&(b=0),a.test(b)?(ib("linear_gradient_angle",b%360),N(!1),Qb(),kc(),void 0):($(this).val(hb("linear_gradient_angle")),!1)}),ed.angleinput.on("blur",function(){var a=$(this);a.val(""===a.val()?"0":hb("linear_gradient_angle"))}),$(".css-gradient-editor-controller[data-name=gradient_type], .css-gradient-editor-controller[data-name=gradient_shape]",a).on("touchstart mousedown click",function(){L(),kc()}),a.on("click",".input-group-addon.bootstrap-touchspin-postfix",function(){K($(this)),Qb(),kc()}),$(".css-gradient-editor-radial-preferences input").on("change keyup",function(){Qb()}),ed.addstoppointbutton.on("click",function(){V({position:0,unit:Mc,color:Lc}),W(),kc()}),ed.reorderstoppointsbutton.on("click",function(){db()}),$(".css-gradient-editor-stoppointlist",a).on("click",".bootstrap-touchspin-postfix",function(){var a,b=$(this),c=b.closest(".css-gradient-editor-stoppointdata");a="%"===b.html()?"px":"%",Mc=a,"enabled"===cc("config_mixedstoppointunits")?(b.html(a),c.data("unit",a),J(b.closest(".css-gradient-editor-stoppointdata").data("index"),"unit",a)):($(".bootstrap-touchspin-postfix",ed.colorstopslist).each(function(){var b=$(this);b.html(a),b.parents(".css-gradient-editor-stoppointdata").data("unit",a)}),J(!1,"unit",a)),eb(),Qb(),kc()}),ed.swatches.on("click","li .css-gradient-editor-preset",function(a){I($(this).data("gradient")),a.preventDefault()}),ed.swatches_add.on("click",function(a){ec(),a.preventDefault()}),ed.swatches_remove.on("click",function(a){hc(),a.preventDefault()}),$(document).on("touchmove mousemove",function(a){if(Qc){var b=U(a,ed.coloroffsethue.parent());ed.coloroffsethue.css("left",b.horizontal.percent+"%"),dd.hue=Math.round(3.6*b.horizontal.percent-180),ed.coloroffsethue.tooltip("hide"),ed.coloroffsethue.data("bs.tooltip").options.title="hue: "+(dd.hue>0?"+":"")+dd.hue,ed.coloroffsethue.tooltip("show"),l(),gb(!0),bb(),eb(),Qb(),a.stopPropagation(),a.preventDefault()}}),$(document).on("touchmove mousemove",function(a){if(Rc){var b=U(a,ed.coloroffsetchroma.parent());ed.coloroffsetchroma.css("left",b.horizontal.percent+"%"),dd.saturation=Math.round(2*b.horizontal.percent-100),ed.coloroffsetchroma.tooltip("hide"),ed.coloroffsetchroma.data("bs.tooltip").options.title="chroma: "+(dd.saturation>0?"+":"")+dd.saturation,ed.coloroffsetchroma.tooltip("show"),l(),gb(!0),bb(),eb(),Qb(),a.stopPropagation(),a.preventDefault()}}),$(document).on("touchmove mousemove",function(a){if(Sc){var b=U(a,ed.coloroffsetlightness.parent());ed.coloroffsetlightness.css("left",b.horizontal.percent+"%"),dd.lightness=Math.round(2*b.horizontal.percent-100),ed.coloroffsetlightness.tooltip("hide"),ed.coloroffsetlightness.data("bs.tooltip").options.title="lightness: "+(dd.lightness>0?"+":"")+dd.lightness,ed.coloroffsetlightness.tooltip("show"),l(),gb(!0),bb(),eb(),Qb(),a.stopPropagation(),a.preventDefault()}}),$(document).on("touchend mouseup",function(){if(Qc||Rc||Sc){Qc=!1,Rc=!1,Sc=!1;try{ed.coloroffsethue.tooltip("hide"),ed.coloroffsetchroma.tooltip("hide"),ed.coloroffsetlightness.tooltip("hide")}catch(a){}}kc()}),$(window).resize(function(){B()}),ed.cssoutput.on("click",function(a){H($(this)),a.preventDefault(),a.stopPropagation()}),ed.exportallmodal.on("show.bs.modal",function(){ed.exportalltextarea.val(JSON.stringify(Zc).split('",').join('",\n'))}),ed.importmodal.on("shown.bs.modal",function(){ed.importtextarea.focus()}),ed.importmodal.on("hide.bs.modal",function(){gc(ed.importtextarea.val())}),ed.configmodal.on("hide.bs.modal",function(){W()}),ed.exportalltextarea.on("focus",function(){function a(){return b.off("mouseup",a),!1}var b=$(this);b.select(),window.setTimeout(function(){b.select()},1),b.mouseup(a)}),$(document).on("change",".bootstrap-touchspin input",function(){$(this).closest(".css-gradient-editor-controller").trigger("mousedown")})}function E(){$("[data-name^=config_]",a).each(function(){var a=$(this),b=a.data("name"),c=a.data("value"),d=cc(b);"undefined"==typeof a.data("value")&&a.data("config-toggle",!0),a.data("controlGroup")?d===c?a.is("input[type=text]")?a.val(d):(a.addClass("active"),"undefined"==typeof a.data("value")&&a.data("value",!0)):"undefined"==typeof a.data("value")&&a.data("value",!1):cc(b)?a.is("input[type=text]")?a.val(d):(a.addClass("active"),"undefined"==typeof a.data("value")&&a.data("value",!0)):"undefined"==typeof a.data("value")&&a.data("value",!1)})}function F(){$("input[name=config-fallbackwidth]").on("change",function(){var a=$(this);bc(a.data("name"),a.val())}),$("input[name=config-fallbackheight]").on("change",function(){var a=$(this);bc(a.data("name"),a.val())}),$("input[name=config-cssselector]").on("change",function(){var a=$(this);bc(a.data("name"),a.val())})}function G(b){var c=b.data("name"),d=b.data("value");if(0!==c.indexOf("config_")){if(hb(c)===d)return;b.addClass("active"),ib(c,d)}else if(b.data("control-group")){if(cc(c)===d)return;b.addClass("active"),bc(c,d)}else b.hasClass("active")?(bc(c,!1),b.removeClass("active")):(bc(c,!0),b.addClass("active"));$('.css-gradient-editor-controller.active[data-control-group="'+b.data("control-group")+'"]',a).removeClass("active").blur(),$('.css-gradient-editor-controller[data-control-group="'+b.data("control-group")+'"][data-name="'+c+'"][data-value="'+d+'"]',a).addClass("active"),Qb()}function H(a){if(a=a.get(0),"undefined"!=typeof window.getSelection&&"undefined"!=typeof document.createRange){var b=document.createRange();b.selectNodeContents(a);var c=window.getSelection();c.removeAllRanges(),c.addRange(b)}else if("undefined"!=typeof document.selection&&"undefined"!=typeof document.body.createTextRange){var d=document.body.createTextRange();d.moveToElementText(a),d.select()}}function I(a,b){"undefined"==typeof b&&(b=!0),ed.preview.addClass("ajax-loader"),setTimeout(function(){_c=!1,k(),X(),r(a),i(),s(),setTimeout(function(){W(b),ed.preview.removeClass("ajax-loader")},100),_b(),mb(),Mb(),h()},100)}function J(a,b,c){var d;if(a===!1)for(d=0;d<Hc.length;d++)Hc[d][b]=c;else for(d=0;d<Hc.length;d++)if(Hc[d].index===a){Hc[d][b]=c;break}}function K(a,b){var c=a.html(),d=a.prev("input"),f=d.data("units");if("undefined"==typeof b){if(b="","undefined"==typeof f)return;var g=f.indexOf(c);b=f.length>g+1?f[g+1]:f[0]}a.html(b),e(d)}function L(b){"undefined"==typeof b&&(b=!1);var c=hb("gradient_type");if("linear"===c)$(".css-gradient-editor-linear-preferences",a).show(),$(".css-gradient-editor-radial-preferences",a).hide(),b&&$("[data-name=gradient_type][data-value=linear]").trigger("mousedown");else if("radial"===c){$(".css-gradient-editor-linear-preferences",a).hide(),$(".css-gradient-editor-radial-preferences",a).show(),b&&$("[data-name=gradient_type][data-value=radial]").trigger("mousedown");var d=hb("gradient_shape");"circle"===d?$("input[name=gradient_size_major]").parent().hide():$("input[name=gradient_size_major]").parent().show()}N()}function M(a){var b=T(a),c=ed.anglecontroller.offset(),d=ed.anglecontroller.width(),e=ed.anglecontroller.height();if(b===!1)return Xc=!1,!1;var g=Math.round(b.pageX-c.left-d/2),h=Math.round(b.pageY-c.top-e/2),i=Math.round(f(g,h)+90)%360;ib("linear_gradient_angle",i)}function N(a){var b=hb("linear_gradient_angle");"undefined"==typeof a&&(a=!0),ed.angleline.css("-webkit-transform","rotate("+b+"deg)"),ed.angleline.css("-ms-transform","rotate("+b+"deg)"),ed.angleline.css("transform","rotate("+b+"deg)"),a&&ed.angleinput.val(b)}function O(a){a.on("touchstart mousedown",function(a){a.which>1||(Oc=$(this),Q(Oc.data("index")),P(),a.stopPropagation(),a.preventDefault())}),a.on("click",function(a){a.stopPropagation(),a.preventDefault()})}function P(a){"undefined"==typeof a&&(a=!0),$(".color-stop, .css-gradient-editor-stoppointdata").each(function(){var a=$(this);R(a.data("index"))?(a.addClass("selected"),Lc=a.data("color")):a.removeClass("selected")}),a&&Wb()}function Q(a){Yc=a}function R(a){return a===Yc}function S(a){var b,c=ed.markersarea.offset(),d=T(a),e=!1;if(b=Math.abs(d.pageY>c.top?d.pageY-18-c.top:d.pageY+7-c.top),b>fd.remove_distance){if(Oc.data("mark-for-death"))return;Oc.data("mark-for-death",1),Oc.hide(),e=!0}else{if(!Oc.data("mark-for-death"))return;Oc.data("mark-for-death",0),Oc.show(),e=!1}J(Oc.data("index"),"markForDeath",e)}function T(a){return"undefined"!=typeof a.pageX?{pageX:a.pageX,pageY:a.pageY}:"undefined"!=typeof a.originalEvent&&"undefined"!=typeof a.originalEvent.touches?{pageX:a.originalEvent.touches[0].pageX,pageY:a.originalEvent.touches[0].pageY}:!1}function U(a,b){var c=T(a),d=b.width(),e=c.pageX-b.offset().left,f=b.height(),g=c.pageY-b.offset().top,h=e/d*100,i=g/f*100;return 0>h&&(h=0),h>100&&(h=100),0>i&&(i=0),i>100&&(i=100),{horizontal:{percent:h,pixel:e},vertical:{percent:i,pixel:g}}}function V(a){var b={index:Nc++,position:a.position,unit:a.unit||Mc,color:a.color,markForDeath:!1};Mc=b.unit,Hc.push(b),Q(b.index)}function W(a){"undefined"==typeof a&&(a=!1),Qb(),eb(),_(),cb(),setTimeout(function(){db(),ed.colorstopslist.removeClass("ajax-loader"),a&&kc(),_c=!0},20)}function X(){Hc=[],Nc=0,Q(-1)}function Y(a){for(var b=0;b<Hc.length;b++)if(Hc[b].index===a){Hc.splice(b,1),$("input.css-gradient-editor-stop-point-color",ed.colorstopslist).trigger("colorpickersliders.hide");break}Qb(),eb(),db()}function Z(a){var b,c=Oc.data("unit");b="%"===c?a.horizontal.percent:a.horizontal.pixel,Cc>b?b=Cc:b>Dc&&(b=Dc),Oc.css("left",b+c).data({position:b,unit:c}),J(Oc.data("index"),"position",b),Qb(),gb(),fb()}function _(){$("input.css-gradient-editor-stop-point-color",ed.colorstopslist).each(function(){$(this).trigger("colorpickersliders.hide")}),ed.addstoppointbutton.hide(),ed.colorstopslist.addClass("ajax-loader")}function ab(){var a={},b=0,c=cc("config_colorpicker_swatches"),d=cc("config_colorformat")||"rgb";return cc("config_colorpicker_hsl")&&(a.hsl=b++),cc("config_colorpicker_rgb")&&(a.rgb=b++),cc("config_colorpicker_cie")&&(a.cie=b++),cc("config_colorpicker_opacity")&&(a.opacity=b+1),0!==b||c||(a.hsl=0),{swatches:c,sliders:a,previewformat:d}}function bb(){var a=vb();ed.inputfrom.trigger("colorpickersliders.updateColor",a[0].color),ed.inputto.trigger("colorpickersliders.updateColor",a[1].color)}function cb(){if(!(yc>zc)){var a=ab();$(".cp-container",ed.gradientpreferenceseasy).remove();var b=vb();b.length>0&&ed.inputfrom.val(b[0].color),b.length>1&&ed.inputto.val(b[1].color),ed.inputfrom.ColorPickerSliders({flat:!0,order:a.sliders,swatches:a.swatches,previewformat:a.previewformat,onchange:function(a,b){Qc||Rc||Sc||k(),J(0,"color",b.tiny.toRgbString()),Lc=b.tiny.toRgbString(),Qb()}}),ed.inputto.ColorPickerSliders({flat:!0,order:a.sliders,swatches:a.swatches,previewformat:a.previewformat,onchange:function(a,b){Qc||Rc||Sc||k(),J(1,"color",b.tiny.toRgbString()),Lc=b.tiny.toRgbString(),Qb()}})}}function db(){if(yc!==zc){nb(),ed.colorstopslist.empty(),ed.addstoppointbutton.show(),ed.reorderstoppointsbutton.prop("disabled",!0);for(var a=0;a<Hc.length;a++){var b=Hc[a],c=$('<div class="css-gradient-editor-stoppointdata clearfix"></div>');c.appendTo(ed.colorstopslist),$('<button type="button" class="btn btn-sm pull-right css-gradient-editor-stop-point-delete"><span class="pngicon-remove2"></span></button><input class="css-gradient-editor-stop-point-color input-sm" type="text" value="'+m(b)+'"> <input class="css-gradient-editor-stop-point-position input-sm" type="text" value="'+b.position+'">').appendTo(c),c.data(b),$("input.css-gradient-editor-stop-point-position",c).TouchSpin({min:Cc,max:Dc,postfix:b.unit,decimals:fd.positiondecimals,step:Math.pow(.1,fd.positiondecimals)})}$(".css-gradient-editor-stop-point-delete",ed.colorstopslist).on("click",function(){Y($(this).closest(".css-gradient-editor-stoppointdata").data("index"))}),$("input.css-gradient-editor-stop-point-position",ed.colorstopslist).on("change",function(){var a=$(this),b=a.closest(".css-gradient-editor-stoppointdata").data("index");J(b,"position",a.val()),Q(b),eb(),P(),Qb()}).on("touchspin.on.stopspin",function(){kc(),ob(!1)});var d=ab();$("input.css-gradient-editor-stop-point-color",ed.colorstopslist).ColorPickerSliders({flat:!1,placement:"bottom",order:d.sliders,swatches:d.swatches,previewformat:d.previewformat,onchange:function(a,b){k(),u();var c=$(this)[0].connectedinput.closest(".css-gradient-editor-stoppointdata").data("index");J(c,"color",b.tiny.toRgbString()),Lc=b.tiny.toRgbString(),eb(),Qb()}}),$("input",ed.colorstopslist).focus(function(){var a=$(this).closest(".css-gradient-editor-stoppointdata").data("index");Q(a),P(!1)})}}function eb(){if(yc!==zc){nb(),ed.markersarea.empty();for(var a=0;a<Hc.length;a++){var b=Hc[a],c=$("<div></div>").appendTo(ed.markersarea);c.addClass("color-stop").css("left",b.position+b.unit).data(b),O(c);var d=$("<div></div>"),e=$("<span></span>");d.html(e),c.html(d),e.css("background-color",m(b))}fb()}}function fb(){$(".color-stop",ed.markersarea).each(function(){var a,b=$(this);a="%"===b.data("unit")?100:b.parents(".css-gradient-editor-stoppointmarkers").width(),b.data("position")>a?(b.addClass("overflow"),b.removeClass("underflow")):b.data("position")<0?(b.addClass("underflow"),b.removeClass("overflow")):(b.removeClass("underflow"),b.removeClass("overflow"))})}function gb(a){yc!==zc&&("undefined"==typeof a&&(a=!1),$(".css-gradient-editor-stoppointdata",ed.colorstopslist).each(function(){for(var b=$(this),c=0;c<Hc.length;c++){var d=Hc[c];d.index===b.data("index")&&($("input.css-gradient-editor-stop-point-position",b).val(Number(d.position).toFixed(fd.positiondecimals)),a&&$("input.css-gradient-editor-stop-point-color",b).trigger("colorpickersliders.updateColor",d.color))}}))}function hb(b,c){var d;return d="undefined"==typeof c?a.data(b):c.data[b],"undefined"==typeof d&&console.log("missing preference: "+b),d}function ib(b,c){"undefined"==typeof a.data(b)&&console.log("Uninitialized preference: "+b),a.data(b,c)}function jb(a){return gd[a]}function kb(a){for(var b in gd)if(gd[b]===a)return b}function lb(){var b=$.extend({},a.data()),c=[],d=[],e="",f="";"linear"===b.gradient_type?(delete b.gradient_size,delete b.gradient_size_unit,delete b.gradient_size_value,delete b.gradient_size_major_unit,delete b.gradient_size_major_value,delete b.gradient_shape,delete b.gradient_position_vertical,delete b.gradient_position_vertical_unit,delete b.gradient_position_vertical_value,delete b.gradient_position_horizontal,delete b.gradient_position_horizontal_unit,delete b.gradient_position_horizontal_value,"angle"!==b.gradient_direction&&delete b.linear_gradient_angle):"radial"===b.gradient_type&&(delete b.gradient_direction,delete b.linear_gradient_angle,("ellipse"!==b.gradient_shape||"explicit"!==b.gradient_size)&&(delete b.gradient_size_major_unit,delete b.gradient_size_major_value),"explicit"!==b.gradient_size&&(delete b.gradient_size_unit,delete b.gradient_size_value),"explicit"!==b.gradient_position_horizontal&&(delete b.gradient_position_horizontal_unit,delete b.gradient_position_horizontal_value),"explicit"!==b.gradient_position_vertical&&(delete b.gradient_position_vertical_unit,delete b.gradient_position_vertical_value));for(var g in b)b.hasOwnProperty(g)&&c.push(jb(g)+"="+encodeURIComponent(b[g]));for(var h=vb(),i=0;i<h.length;i++){var j=tinycolor(m(h[i])),k=j.getAlpha()<1?j.toHex8():j.toHex();d.push(encodeURIComponent(k)+"_"+encodeURIComponent(Math.round(10*h[i].position)/10)+"_"+encodeURIComponent(h[i].unit))}return e=c.join("&"),f=d.join("__"),e+"&sp="+f}function mb(){vc=lb(),ed.permalink.attr("href",window.location.pathname+"?"+vc).data("querystring",vc),ed.imagegradient.attr("href","gradient.php?"+vc),"function"==typeof window.history.pushState&&window.history.replaceState({},"",window.location.pathname+"?"+vc),_b(),rc()}function nb(a){"undefined"==typeof a&&(a=Hc),Hc.sort(function(a,b){return a.position-b.position})}function ob(a){"undefined"==typeof a&&(a=!0);var b=0,c=!1;$(".css-gradient-editor-stoppointdata input.css-gradient-editor-stop-point-position",ed.colorstopslist).each(function(){var a=parseFloat($(this).val());b>a&&(c=!0),b=a}),c?(ed.reorderstoppointsbutton.prop("disabled",!1),a&&(db(),P())):ed.reorderstoppointsbutton.prop("disabled",!0)}function pb(a){var b=vb(a);if(b.length<2)return!1;nb(b);for(var c="",d=0;d<b.length;d++){var e=b[d];c+=","+m(e)+" "+Math.round(10*e.position)/10+e.unit}return c+=")"}function qb(a,b,c){var d=c-b,e=(a-b)/d;return Math.round(1e3*e)/1e3
  }function rb(a){for(var b=tb(a),c="",d=0;d<b.length;d++)c+=",color-stop("+Math.round(10*b[d].position)/1e3+", "+m(b[d])+")";return c}function sb(a){if(a.length<2)return a;var b,c,d,e,f,g,h,i,j,k;a[0].position<0&&(b=a[0],c=a[1],d=c.position-b.position,e=1-c.position/d,f=tinycolor(b.color).toRgb(),g=tinycolor(c.color).toRgb(),h=g.r-f.r,i=g.g-f.g,j=g.b-f.b,k={r:Math.round(f.r+e*h),g:Math.round(f.g+e*i),b:Math.round(f.b+e*j)},a[0].color=tinycolor(k).toRgbString(),a[0].position=0),a[a.length-1].position>100&&(b=a[a.length-1],c=a[a.length-2],d=Math.abs(c.position-b.position),e=1-(b.position-100)/d,f=tinycolor(b.color).toRgb(),g=tinycolor(c.color).toRgb(),h=g.r-f.r,i=g.g-f.g,j=g.b-f.b,k={r:Math.round(f.r+e*h),g:Math.round(f.g+e*i),b:Math.round(f.b+e*j)},a[a.length-1].color=tinycolor(k).toRgbString(),a[a.length-1].position=100)}function tb(a){var b,c=vb(a),d=!1,e=!1;if(nb(c),!(c.length<2)){d=c[0].position,e=c[c.length-1].position;var f=Math.max(e-d,1),g=0,h=0,i=hb("gradient_repeat",a);"on"===i&&(g=-Math.ceil(d/f));var j=[],k=0;do{for(b=0;b<c.length;b++){var l,m;l=c[b].position,m=c[b].unit,"%"!==c[b].unit?(m="%",l=qb(l,d,e)):l=Math.round(10*l)/10,l+=g*f,h=l,j[k++]={color:c[b].color,position:l}}++g}while("on"===i&&100>h);var n=0,o=j.length;for(b=0;b<j.length;b++)if(j[b].position<0)n=b;else if(j[b].position>100){o=b;break}return j=j.splice(n,o-n+1),sb(j),j}}function ub(a){for(var b=tb(a),c="",d=0;d<b.length;d++)c+="<stop "+n(b[d])+' offset="'+b[d].position/100+'"/>';return c}function vb(a){var b=Ob(a),c=0,d=[];nb(b);for(var e=0;e<b.length;e++)b[e].markForDeath||(d[c++]=$.extend({},b[e]));return d}function wb(a){var b=hb("gradient_direction",a),c="right";switch(hb("gradient_type",a)){case"linear":if("angle"===b){var d=hb("linear_gradient_angle",a);c=d>325||45>d?"top":135>d?"right":160>d?"bottom":"left"}else switch(b){case"top":c="top";break;case"top left":c="top";break;case"top right":c="top";break;case"left":c="left";break;case"bottom":c="bottom";break;case"bottom left":c="bottom";break;case"bottom right":c="bottom";break;case"right":c="right"}break;case"radial":c="bottom"}return c}function xb(a){var b=vb(a);if(b.length<2)return!1;var c,d,e=tinycolor(b[0].color).toHex8String(),f=tinycolor(b[b.length-1].color).toHex8String(),g=wb();switch(g){case"top":c=f,d=e,g="0";break;case"right":c=e,d=f,g="1";break;case"bottom":c=e,d=f,g="0";break;case"left":c=f,d=e,g="1"}return'progid:DXImageTransform.Microsoft.gradient(startColorstr="'+c+'",endColorstr="'+d+'",GradientType='+g+")"}function yb(a,b){var c,d;return"undefined"==typeof b?(c=$('input[name="'+a+'"]').val(),d=$('input[name="'+a+'"]').next("span.input-group-addon.bootstrap-touchspin-postfix").html()):(c=b.data[a+"_value"],d=b.data[a+"_unit"]),c+d}function zb(a){switch(a){case"top":return"bottom";case"left":return"right";case"bottom":return"top";case"right":return"left";case"top left":return"bottom right";case"top right":return"bottom left";case"bottom left":return"top right";case"bottom right":return"top left"}}function Ab(a,b){var c="-webkit-gradient(linear, ",d=rb(a);if("angle"===b){var e=hb("linear_gradient_angle",a),f=Bb(e);c+=f.x1+" "+f.y1+", "+f.x2+" "+f.y2}else switch(b){case"top":c+="0% 100%, 0% 0%";break;case"top left":c+="100% 100%, 0% 0%";break;case"top right":c+="0% 100%, 100% 0%";break;case"left":c+="100% 0%, 0% 0%";break;case"bottom":c+="0% 0%, 0% 100%";break;case"bottom left":c+="100% 0%, 0% 100%";break;case"bottom right":c+="0% 0%, 100% 100%";break;case"right":c+="0% 0%, 100% 0%"}return c+=d+")"}function Bb(a){var b,c,d=Math.round(50*Math.tan(a%45*Math.PI/180)),e=Math.sin(4*(a-45)*Math.PI/180),f=6*Math.sqrt(2),g=Math.abs(e*f);return a>=0&&45>a&&(b=d+g,c=-50-g),a>=45&&90>a&&(b=50+g,c=-50+d-g),a>=90&&135>a&&(b=50+g,c=d+g),a>=135&&180>a&&(b=50-d+g,c=50+g),a>=180&&225>a&&(b=-d-g,c=50+g),a>=225&&270>a&&(b=-50-g,c=50-d+g),a>=270&&315>a&&(b=-50-g,c=-d-g),a>=315&&360>a&&(b=-50+d-g,c=-50-g),{xs:b,ys:c,x1:Math.round(10*(50-b))/10+"%",y1:Math.round(10*(50-c))/10+"%",x2:Math.round(10*(50+b))/10+"%",y2:Math.round(10*(50+c))/10+"%"}}function Cb(a,b){var c,d,e,f,g="",h=ub(a),i="0%",j="100%";if("angle"===b){var k=hb("linear_gradient_angle",a),l=Bb(k);c=l.x1,d=l.y1,e=l.x2,f=l.y2}else switch(b){case"top":c="0%",d=j,e="0%",f=i;break;case"top left":c="100%",d="100%",e="0%",f="0%";break;case"top right":c="0%",d="100%",e="100%",f="0%";break;case"left":c=j,d="0%",e=i,f="0%";break;case"bottom":c="0%",d=i,e="0%",f=j;break;case"bottom left":c="100%",d="0%",e="0%",f="100%";break;case"bottom right":c="0%",d="0%",e="100%",f="100%";break;case"right":c=i,d="0%",e=j,f="0%"}return g='<svg xmlns="http://www.w3.org/2000/svg" width="100%" height="100%" viewBox="0 0 1 1" preserveAspectRatio="none"><linearGradient id="vsgg" gradientUnits="userSpaceOnUse" x1="'+c+'" y1="'+d+'" x2="'+e+'" y2="'+f+'">',g+=h,g+='</linearGradient><rect x="0" y="0" width="1" height="1" fill="url(#vsgg)" /></svg>',g="url(data:image/svg+xml;base64,"+$.base64.encode(g)+")"}function Db(a,b){"undefined"==typeof b&&(b="all");var c,d,e,f,g,h,i,j=hb("gradient_direction",a),k="";if("on"===hb("gradient_repeat",a)&&(k="repeating-"),"angle"===j){var l=hb("linear_gradient_angle",a);("all"===b||"noprefix"===b)&&(c=k+"linear-gradient("+l+"deg"+pb(a)),("all"===b||"webkit"===b)&&(d="-webkit-"+k+"linear-gradient("+Math.abs(l-450)%360+"deg"+pb(a)),("all"===b||"ms"===b)&&(e="-ms-"+k+"linear-gradient("+Math.abs(l-450)%360+"deg"+pb(a))}else("all"===b||"noprefix"===b)&&(c=k+"linear-gradient(to "+j+pb(a)),("all"===b||"webkit"===b)&&(d="-webkit-"+k+"linear-gradient("+zb(j)+pb(a)),("all"===b||"ms"===b)&&(e="-ms-"+k+"linear-gradient("+zb(j)+pb(a));("all"===b||"oldwebkit"===b)&&(f=Ab(a,j)),("all"===b||"svg"===b)&&(g=Cb(a,j)),("all"===b||"filter"===b)&&(h=xb(a)),("all"===b||"averagebgcolor"===b)&&(i=Ub(a));var m={valid:!0,noprefix:c,webkit:d,ms:e,oldwebkit:f,svg:g,filter:h,averagebgcolor:i};return m}function Eb(){var a=cc("config_fallbackwidth");return a?parseInt(a):ed.preview.width()}function Fb(){var a=cc("config_fallbackheight");return a?parseInt(a):ed.preview.height()}function Gb(a){var b="-webkit-gradient(radial, ",c=rb(a),d=hb("gradient_size",a),e=hb("gradient_position_horizontal",a),f=hb("gradient_position_vertical",a);if("explicit"===e&&(e=hb("gradient_position_horizontal_value",a),"%"===hb("gradient_position_horizontal_unit",a)&&(e+="%")),"explicit"===f&&(f=hb("gradient_position_vertical_value",a),"%"===hb("gradient_position_vertical_unit",a)&&(f+="%")),"explicit"!==d){d=Hb(e,f,a);var g=Eb(),h=Fb();d=Math.round(d/100*Math.sqrt(g*g+h*h))}else d=hb("gradient_size_value",a),"ellipse"===hb("gradient_shape",a)&&(d=Math.round((parseInt(d)+parseInt(hb("gradient_size_major_value",a)))/2));return b+=e+" "+f+", 0, "+e+" "+f+", "+d,b+=c+")"}function Hb(a,b,c){var d,e;switch("left"===a?a=0:"center"===a?a=50:"right"===a&&(a=100),"top"===b?b=0:"center"===b?b=50:"bottom"===b&&(b=100),a=parseInt(a),b=parseInt(b),hb("gradient_size",c)){case"closest-side":return d=50>a?a:100-a,e=50>b?b:100-b,Math.min(d,e);case"closest-corner":return d=50>a?a:100-a,e=50>b?b:100-b,Math.sqrt(d*d+e*e);case"farthest-side":return d=50>a?100:a,e=50>b?100-b:b,Math.max(d,e);case"farthest-corner":return d=50>a?100:a,e=50>b?100-b:b,Math.sqrt(d*d+e*e);default:d=a>50?a:100-a,e=b>50?b:100-b;var f;if("%"===hb("gradient_size_unit",c))f="circle"===hb("gradient_shape",c)?hb("gradient_size_value",c):(parseInt(hb("gradient_size_value",c))+parseInt(hb("gradient_size_major_value")))/2;else if("circle"===hb("gradient_shape",c))f=Math.round(parseInt(hb("gradient_size_value",c))/((Eb()+Fb())/2)*1e3)/10;else{var g=(parseInt(hb("gradient_size_value",c))+parseInt(hb("gradient_size_major_value")))/2;f=Math.round(g/((Eb()+Fb())/2)*1e3)/10}return f}}function Ib(a){var b,c,d,e,f,g="",h=ub(a);switch(b=hb("gradient_position_horizontal",a)){case"explicit":b=hb("gradient_position_horizontal_value",a);break;case"left":b=0;break;case"center":b=50;break;case"right":b=100}switch(c=hb("gradient_position_vertical",a)){case"explicit":c=hb("gradient_position_vertical_value",a);break;case"top":c=0;break;case"center":c=50;break;case"bottom":c=100}return e=b>50?b:100-b,f=c>50?c:100-c,d=Hb(e,f,a),g='<svg xmlns="http://www.w3.org/2000/svg" width="100%" height="100%" viewBox="0 0 1 1" preserveAspectRatio="none"><radialGradient id="vsgg" gradientUnits="userSpaceOnUse" cx="'+b+'%" cy="'+c+'%" r="'+d+'%">',g+=h,g+='</radialGradient><rect x="-50" y="-50" width="101" height="101" fill="url(#vsgg)" /></svg>',g="url(data:image/svg+xml;base64,"+$.base64.encode(g)+")"}function Jb(a,b){"undefined"==typeof b&&(b="all");var c,d,e,f,g,h,i,j=hb("gradient_shape",a),k=hb("gradient_size",a),l=j+" "+k,m=hb("gradient_position_horizontal",a),n=hb("gradient_position_vertical",a),o="";"explicit"===m&&(m=yb("gradient_position_horizontal",a)),"explicit"===n&&(n=yb("gradient_position_vertical",a)),"explicit"===k&&(k=yb("gradient_size",a),"ellipse"===j?(k=k+" "+yb("gradient_size_major",a),l=k):l=k+" "+k),"on"===hb("gradient_repeat",a)&&(o="repeating-"),("all"===b||"noprefix"===b)&&(c=o+"radial-gradient("+j+" "+k+" at "+m+" "+n+pb(a)),("all"===b||"webkit"===b)&&(d="-webkit-"+o+"radial-gradient("+m+" "+n+", "+l+pb(a)),("all"===b||"ms"===b)&&(e="-ms-"+o+"radial-gradient("+m+" "+n+", "+l+pb(a)),("all"===b||"svg"===b)&&(g=Ib(a)),("all"===b||"filter"===b)&&(h=xb(a)),("all"===b||"averagebgcolor"===b)&&(i=Ub(a)),("all"===b||"oldwebkit"===b)&&(f=Gb(a));var p={valid:Vb(j,k,m,n),noprefix:c,oldwebkit:f,svg:g,webkit:d,ms:e,filter:h,averagebgcolor:i};return p}function Kb(){return"linear"===hb("gradient_type")?Db():Jb()}function Lb(){var a=Pb(),b=vb(),c=cc("config_cssselector");if(a>1){var d=Kb();if(d.valid){var e={bgcolor:"    background-color: "+m(d.averagebgcolor)+";\n",svg:"    /* IE9, iOS 3.2+ */\n    background-image: "+d.svg+";\n",oldwebkit:"    background-image: "+d.oldwebkit+";\n",androidhack:"    /* Android 2.3- hack (needed for the actual radial gradient) */\n    background-image: "+d.svg+",\n        "+d.oldwebkit+";\n",webkit:"    /* Android 2.3 */\n    background-image: "+d.webkit+";\n",ms:"    background-image: "+d.ms+";\n",noprefix:"    /* IE10+ */\n    background-image: "+d.noprefix+";\n",filter:"\n/* IE8- CSS hack */\n@media \\0screen\\,screen\\9 {\n    "+c+" {\n        filter: "+d.filter+";\n    }\n}"},f="";cc("config_generation_bgcolor")&&(f+=e.bgcolor),cc("config_generation_svg")&&cc("config_generation_oldwebkit")?pc()?(f+=e.svg,f+=e.oldwebkit):(f+=e.svg,f+=e.androidhack):(cc("config_generation_svg")&&(f+=e.svg),cc("config_generation_oldwebkit")&&(f+=e.oldwebkit)),cc("config_generation_webkit")&&(f+=e.webkit),f+=e.noprefix,cc("config_generation_ms")&&(f+=e.ms),$c=c+" {\n"+f+"}\n",cc("config_generation_iefilter")&&($c+=e.filter)}else $c=a>0?c+" {\n    background-color: "+m(b[b.length-1])+";\n}":c+" {\n    background-color: transparent;\n}"}else if(1===a){if($c=c+" {\n",$c+="    background-color: "+m(b[0])+";\n",$c+="}",tinycolor(b[0].color).getAlpha()<1){var g='progid:DXImageTransform.Microsoft.gradient(startColorstr="'+tinycolor(b[0].color).toHex8String()+'",endColorstr="'+tinycolor(b[0].color).toHex8String()+'")';$c+="\n\n/* IE8- CSS hack */\n@media \\0screen\\,screen\\9 {\n    "+c+" {\n        background-color:transparent;\n        filter: "+g+";\n    }\n}"}}else $c=c+" {\n    background-color: transparent;\n}"}function Mb(){Lb(),ed.cssoutput.text($c);var a=new SyntaxHighlighter.brushes.CSS;a.init({toolbar:!1,gutter:!1}),ed.cssoutput.html(a.getHtml($c)),ed.cssoutput.data("output",$c)}function Nb(a,b){"undefined"==typeof a&&(a=ed.preview);var c="transparent",d=Ob(b);nb(d);for(var e=0;e<d.length;e++){var f=d[e];f.markForDeath||(c=m(f))}a?(a.css("background",c),a.is(ed.preview)&&ed.currentpreset.css("background",c)):(ed.preview.css("background",c),ed.currentpreset.css("background",c))}function Ob(a){return"undefined"==typeof a?Hc:a.colorStops}function Pb(a){for(var b=Ob(a),c=0,d=0;d<b.length;d++)b[d].markForDeath||++c;return c}function Qb(a,b){if("undefined"==typeof a&&(a=ed.preview),Pb(b)<2)return void Nb(a,b);var c=hb("gradient_type",b);switch(c){case"linear":Sb(a,b);break;case"radial":Tb(a,b);break;default:console.log("Unknown gradient type: "+c)}}function Rb(a,b,c){"undefined"==typeof a&&(a=ed.preview);var e=d();switch(e){case"noprefix":a.css("background-image",b.noprefix);break;case"webkit":a.css("background-image",b.webkit);break;case"ms":a.css("background-image",b.ms);break;case"svg":a.css("background-image",b.svg);break;case"oldwebkit":a.css("background-image",b.oldwebkit);break;case"filter":a.css("filter",b.filter);break;case"averagebgcolor":default:a.css("background-color",Ub(c))}}function Sb(a,b){"undefined"==typeof a&&(a=ed.preview);var c=Db(b,d());return c.stoppoints===!1?(Nb(a,b),void Nb(ed.currentpreset,b)):(Rb(a,c,b),void(a.is(ed.preview)&&Rb(ed.currentpreset,c,b)))}function Tb(a,b){"undefined"==typeof a&&(a=ed.preview);var c=Jb(b,d());return c.valid&&c.stoppointsstring!==!1?(Rb(a,c,b),void(a.is(ed.preview)&&Rb(ed.currentpreset,c,b))):(Nb(a,b),void Nb(ed.currentpreset,b))}function Ub(a){var b=vb(a);if(1===b.length)return b[0].color;var c,d=b[0].position,e=b[b.length-1].position,f=e-d,g=0,h=0,i=0,j=0;for(c=0;c<b.length;c++)b[c].percentpos=e>100||"on"===hb("gradient_repeat",a)?(b[c].position-d)/f:parseFloat(b[c].position)/100,b[c].rgb=tinycolor(b[c].color).toRgb();for(c=0;c<b.length;c++){var k=c>0?b[c-1].percentpos:0,l=c<b.length-1?b[c+1].percentpos:1;b[c].weight=(b[c].percentpos-k)/2+(l-b[c].percentpos)/2}for(b[0].weight+=b[0].percentpos/2,b[b.length-1].weight+=(1-b[b.length-1].percentpos)/2,c=0;c<b.length;c++)g+=b[c].rgb.r*b[c].weight,h+=b[c].rgb.g*b[c].weight,i+=b[c].rgb.b*b[c].weight,j+=b[c].rgb.a*b[c].weight;var m={r:g,g:h,b:i,a:j},n=1===m.a?tinycolor(m).toHexString():tinycolor(m).toRgbString();return n}function Vb(a,b,c,d){if("0"===b.charAt(0)||b.indexOf(" 0")>-1)return!1;var e=0;return"0"===c.charAt(0)&&e++,"0"===d.charAt(0)&&e++,b.match(/(closest-corner)/i)&&c.match(/(left|right)/i)&&d.match(/(top|bottom)/i)?!1:b.match(/(closest-side)/i)&&(c.match(/(left|right)/i)||d.match(/(top|bottom)/i))?!1:"closest-side"===b&&e>0?!1:"closest-corner"===b&&e>1?!1:a.match(/(ellipse)/i)&&b.match(/(closest-corner)/i)&&(e>0||c.match(/(left|right)/i)||d.match(/(top|bottom)/i))?!1:!0}function Wb(){$("input.css-gradient-editor-stop-point-color",ed.colorstopslist).blur()}function Xb(){for(var a=0;a<fd.defaultswatches.length;a++)Zc.push(Yb(fd.defaultswatches[a]))}function Yb(a){var b=a.split("|");return 2===b.length&&(b[1]=o("%","%25",o("%25","%",b[1])),a=o(",","&",b[0])+"&sp=",a+=o("/","_",o(",","__",b[1]))),a=a.replace(/\+/g,"%20")}function Zb(){if(Zc=[],fd.customswatchesnameprefix){var a=[];try{if(a=JSON.parse(localStorage.getItem("gradientswatches-"+fd.customswatchesnameprefix)))for(var b=0;b<a.length;b++)Zc.push(Yb(a[b]));else Xb()}catch(c){console.log(c),Xb()}}else Xb()}function $b(){if(Zb(),ed.swatches.html(""),Zc instanceof Array)for(var a=0;a<Zc.length;a++){var b=Zc[a],c=$("<span></span>"),d=$('<div class="btn btn-default css-gradient-editor-preset"></div>').data("gradient",b);d.append(c),ed.swatches.append($("<li></li>").append(d)),Qb(c,q(b))}_b()}function _b(){var a=!1;vc=lb(),$(".css-gradient-editor-preset",ed.swatches).filter(function(){var b=$(this).data("gradient");if(b===vc){a=!0;var c=$(this).parent();c.is(ed.actualswatch)||(ed.actualswatch&&ed.actualswatch.removeClass("actual"),ed.actualswatch=c,c.addClass("actual"))}}),a||ed.actualswatch&&(ed.actualswatch.removeClass("actual"),ed.actualswatch=!1),ed.actualswatch?(ed.swatches_add.prop("disabled",!0),ed.swatches_remove.prop("disabled",!1)):(ed.swatches_add.prop("disabled",!1),ed.swatches_remove.prop("disabled",!0))}function ac(){try{localStorage.setItem("gradientswatches-"+fd.customswatchesnameprefix,JSON.stringify(Zc))}catch(a){}}function bc(a,b){try{localStorage.setItem("userdata-"+a,JSON.stringify(b))}catch(c){}}function cc(a){try{var b=JSON.parse(localStorage.getItem("userdata-"+a));return(null===b||""===b)&&(b=hd[a]),b}catch(c){return hd[a]}}function dc(a){return-1===Zc.indexOf(a)&&-1===Zc.indexOf(Yb(a))}function ec(){fc(vc)}function fc(a){var b=q(a);return(b||b.hasOwnProperty("colorStops"))&&dc(a)?(Zc.unshift(Yb(a)),ac(),void $(document).trigger("cssgradienteditor.changeswatches")):!1}function gc(a){try{var b=jQuery.parseJSON(a);if(!b instanceof Array)return!1;for(var c=b.length,d=0;c>d;d++)fc(b[d])}catch(e){return console.log(e),!1}}function hc(){var a=Zc.indexOf(vc);-1!==a&&(Zc.splice(a,1),ac(),$(document).trigger("cssgradienteditor.changeswatches"))}function ic(){nc()?ed.undobutton.prop("disabled",!1):ed.undobutton.prop("disabled",!0),oc()?ed.redobutton.prop("disabled",!1):ed.redobutton.prop("disabled",!0)}function jc(){Ic=[],Jc=-1,kc()}function kc(){clearTimeout(Kc),_c&&(mb(),Mb(),ad&&h(),Jc>-1&&vc===Ic[Jc]||(Ic[++Jc]=vc,Ic.length>Jc+1&&(Ic=Ic.slice(0,Jc+1)),ic(),cd&&bc("lastGradient",vc)))}function lc(){0>=Jc||(I(Ic[--Jc],!1),ic())}function mc(){Jc+1>=Ic.length||(I(Ic[++Jc],!1),ic())}function nc(){return Jc>0}function oc(){return Jc<Ic.length-1}function pc(a){return"linear"===hb("gradient_type",a)?!0:"ellipse"===hb("gradient_shape",a)?!1:"explicit"!==hb("gradient_size",a)?!1:!0}function qc(){wc=new QRCode("permalinkqr",{text:"http://www.virtuosoft.eu/css-gradient-generator/",width:280,height:280,colorDark:"#000000",colorLight:"#ffffff",correctLevel:QRCode.CorrectLevel.H})}function rc(){clearTimeout(xc),xc=setTimeout(function(){var a="http://www.virtuosoft.eu/tools/css-gradient-generator/?"+ed.permalink.data("querystring");try{wc.makeCode(a)}catch(b){}},500)}function sc(a){var b={advanced:!1,expert:!1},c=vb(a);switch(2!==c.length?b.advanced=!0:("0"!==c[0].position||"100"!==c[1].position||"%"!==c[0].unit||"%"!==c[1].unit)&&(b.advanced=!0),"on"===hb("gradient_repeat",a)&&(b.advanced=!0),hb("gradient_type",a)){case"linear":var d=hb("gradient_direction",a);"angle"===d&&(b.expert=!0),("top left"===d||"top right"===d||"bottom left"===d||"bottom right"===d)&&(b.advanced=!0);break;case"radial":b.advanced=!0,"circle"===hb("gradient_shape",a)&&(b.expert=!0),"explicit"===hb("gradient_size",a)&&(b.expert=!0),"explicit"===hb("gradient_position_horizontal",a)&&(b.expert=!0),"explicit"===hb("gradient_position_vertical",a)&&(b.expert=!0)}return b.expert?Bc:b.advanced?Ac:zc}function tc(){var a=cc("config_layout");if(!(a>=yc)){if("linear"===hb("gradient_type")?"angle"===hb("gradient_direction")&&ib("gradient_direction",wb()):(ib("gradient_shape","ellipse"),"explicit"===hb("gradient_size")&&ib("gradient_size","farthest-corner"),"explicit"===hb("gradient_position_horizontal")&&ib("gradient_position_horizontal","center"),"explicit"===hb("gradient_position_vertical")&&ib("gradient_position_vertical","center")),0===a){ib("gradient_repeat","off"),ib("gradient_type","linear"),ib("gradient_direction",wb());var b,c,d=vb();d.length>=2?(b=$.extend({},d[0]),c=$.extend({},d[d.length-1]),b.position=0,b.unit="%",c.position=100,c.unit="%"):1===d.length?(b=$.extend({},d[0]),c={position:100,unit:"%",color:Lc},b.position=0,b.unit="%"):(b={position:0,unit:"%",color:Lc},c={position:100,unit:"%",color:Lc}),X(),V(b),V(c)}i(),s(),W(),h()}}("undefined"==typeof console||"undefined"==typeof console.log)&&(console={},console.log=function(){});var uc,vc,wc,xc,yc,zc=0,Ac=1,Bc=2,Cc=-3e3,Dc=3e3,Ec=100,Fc=null,Gc=0,Hc=[],Ic=[],Jc=-1,Kc=!1,Lc="#c30000",Mc="%",Nc=0,Oc=!1,Pc=!1,Qc=!1,Rc=!1,Sc=!1,Tc=!1,Uc=!1,Vc=!1,Wc=!1,Xc=!1,Yc=-1,Zc=[],$c="",_c=!1,ad=!1,bd={noprefix:!1,svg:!1,oldwebkit:!1,filter:!1},cd=!1,dd={hue:0,saturation:0,lightness:0},ed={markersarea:$(".css-gradient-editor-stoppointmarkers",a),gradientstopeditor:$(".css-gradient-editor-stopeditor span",a),anglecontroller:$(".css-gradient-editor-controller.css-gradient-editor-direction-angle",a),angleline:$(".css-gradient-editor-controller.css-gradient-editor-direction-angle span",a),angleinput:$("span.css-gradient-editor-direction-angle-input input",a),previewcontainer:$(".css-gradient-editor-preview-container",a),previewarea:$(".css-gradient-editor-preview",a),preview:$(".css-gradient-editor-preview div",a),previewpopoutbutton:$(".css-gradient-editor-previewpopout",a),previewpopoutoverlaybutton:$(".css-gradient-controls .css-gradient-editor-previewpopout",a),colorstopslist:$(".css-gradient-editor-stoppointlist",a),cssoutput:$(".css-gradient-editor-cssoutput",a),exportallmodal:$("#exportallmodal"),exportalltextarea:$(".css-gradient-editor-textarea-exportall"),importmodal:$("#importmodal"),configmodal:$("#configmodal"),importtextarea:$(".css-gradient-editor-textarea-import"),permalink:$(".css-gradient-editor-permalink",a),imagegradient:$(".css-gradient-editor-imagegradient",a),currentpreset:$(".css-gradient-editor-preset.current span",a),actualswatch:!1,swatchescontainer:$(".css-gradient-editor-swatches",a),swatches:$(".css-gradient-editor-swatches ul",a),swatches_add:$(".css-gradient-editor-save",a),swatches_remove:$(".css-gradient-editor-delete",a),resizehandler:$(".css-gradient-editor-preview-resize-handler",a),adjust_color:$(".css-gradient-editor-adjustcolor",a),get_css:$(".css-gradient-editor-getcss",a),coloroffsethue:!1,coloroffsetchroma:!1,colorofsetlightness:!1,undobutton:$(".css-gradient-editor-undo",a),redobutton:$(".css-gradient-editor-redo",a),addstoppointbutton:$(".css-gradient-editor-add-stoppoint",a),reorderstoppointsbutton:$(".css-gradient-editor-reorder-stoppoints",a),gradientpreferenceseasy:$(".gradient-preferences-easy",a),gradientpreferencesadvanced:$(".gradient-preferences-advanced",a),inputfrom:$("input[name=color_from]",a),inputto:$("input[name=color_to]",a),layoutselectoreasy:$(".css-gradient-editor-layout-easy"),layoutselectoradvanced:$(".css-gradient-editor-layout-advanced"),layoutselectorexpert:$(".css-gradient-editor-layout-expert"),warningadvanced:$(".layout-warning-advanced"),warningexpert:$(".layout-warning-expert"),loaddefaults:$(".loaddefaults","#importmodal"),gradientpropertiespanel:$(".panel.gradient-properties",a)},fd=$.extend({customswatchesnameprefix:"cssgradienteditor",defaultswatches:["t=linear,d=bottom+right,r=on|00c4f4/0/%,036078/100/%","t=linear,d=bottom+right,r=on|fe9e96/0/%,ac4f73/100/%","t=radial,s=farthest-corner,r=off,sh=ellipse,h=left,v=top|676767/1.1/%,878787/65.8/%,676767/100/%","t=linear,d=bottom+right,r=off|f949b6/0/%,ff8b8b/100/%","t=radial,s=farthest-corner,r=on,sh=ellipse,h=left,v=bottom|f3ef15/0/%,009885/100/%","t=linear,d=bottom,r=on|e2e2e2/0/%,dbdbdb/50/%,d1d1d1/51/%,fefefe/100/%","t=linear,d=bottom,r=on|accdd4/0/%,189ab1/50/%,087b95/51/%,70c0d1/100/%","t=linear,d=bottom,r=on|48556c/0/%,1b212b/50/%,141922/51/%,353b45/100/%","t=linear,d=bottom,r=on|808080/0/%,5b5b5b/65.6/%,a9a9a9/100/%","t=linear,d=bottom+right,r=on|000000/0/%,ffffff/100/%","t=linear,d=bottom+right,r=on|000000/0/%,00000000/100/%","t=radial,s=farthest-side,r=off,sh=circle,h=explicit,hv=395,hu=px,v=explicit,vv=483,vu=px|2200cf/0/%,ac00d7/74.2/%,8206ff/83.3/%","t=radial,s=explicit,sv=531,su=px,r=off,sh=circle,h=explicit,hv=59,hu=px,v=explicit,vv=147,vu=px|ffffff/0/%,e544c6/70/%,047694/100/%","t=radial,s=farthest-side,r=off,sh=ellipse,h=center,v=center|535b5e/0/%,fefefe/25/%,4a5154/50/%,fdfdfd/75/%,535b5e/100/%","t=linear,d=bottom+right,r=on|00a5df/0/%,3e147b/20/%,e20079/40/%,df132c/60/%,f3ef15/80/%,009847/100/%","t=linear,d=bottom+right,r=on|00a5df/0/%,3e147b/6.6/%,e20079/13.2/%,df132c/18.8/%,f3ef15/24.1/%,009847/26.6/%","t=linear,d=bottom+right,r=on|535b5e/0/%,fefefe/25/%,4a5154/50/%,fdfdfd/75/%,535b5e/100/%","t=linear,d=bottom+right,r=on|000000/0/%,000000/9/%,00000000/10/%,00000000/19/%,000000/20/%,000000/29/%,00000000/30/%,00000000/39/%,000000/40/%,000000/49/%,00000000/50/%,00000000/59/%,000000/60/%,000000/69/%,00000000/70/%,00000000/79/%,000000/80/%,000000/89/%,00000000/90/%,00000000/100/%","t=linear,d=bottom+right,r=on|000000/0/%,000000/9/%,252525/9.1/%,252525/18/%,464646/18.1/%,464646/27/%,636363/27.1/%,636363/36/%,7d7d7d/36.1/%,7d7d7d/45/%,959595/45.1/%,959595/54/%,acacac/54.1/%,acacac/63/%,c2c2c2/63.1/%,c2c2c2/72/%,d7d7d7/72.1/%,d7d7d7/81/%,ebebeb/81.1/%,ebebeb/90/%,ffffff/90.1/%,ffffff/100/%","t=radial,s=explicit,sv=10,su=em,r=on,sh=circle,h=left,v=top|accdd4/0/%,189ab1/50/%,087b95/51/%,70c0d1/100/%","t=linear,d=angle,r=off,a=248|0001cdca/13.4/%,01cdca/14.5/%,015f9e/19.3/%,0001cdca/20.5/%"],remove_distance:50,positiondecimals:1,gradient_type:"linear",gradient_direction:"bottom right",gradient_size:"farthest-corner",gradient_size_value:"10",gradient_size_unit:"px",gradient_size_major_value:"10",gradient_size_major_unit:"px",gradient_repeat:"off",gradient_shape:"ellipse",linear_gradient_angle:"0",gradient_position_horizontal:"left",gradient_position_horizontal_value:"0",gradient_position_horizontal_unit:"%",gradient_position_vertical:"top",gradient_position_vertical_value:"0",gradient_position_vertical_unit:"%"},b),gd={gradient_type:"t",gradient_direction:"d",gradient_size:"s",gradient_size_value:"sv",gradient_size_unit:"su",gradient_size_major_value:"smv",gradient_size_major_unit:"smu",gradient_repeat:"r",gradient_shape:"sh",linear_gradient_angle:"a",gradient_position_horizontal:"h",gradient_position_horizontal_value:"hv",gradient_position_horizontal_unit:"hu",gradient_position_vertical:"v",gradient_position_vertical_value:"vv",gradient_position_vertical_unit:"vu"},hd={config_layout:Ac,config_colorformat:"rgb",config_colorpicker_hsl:!0,config_colorpicker_rgb:!0,config_colorpicker_cie:!1,config_colorpicker_opacity:!0,config_colorpicker_swatches:!1,config_fallbackwidth:"",config_fallbackheight:"",config_mixedstoppointunits:"enabled",config_generation_bgcolor:!0,config_generation_iefilter:!0,config_generation_svg:!0,config_generation_oldwebkit:!0,config_generation_webkit:!0,config_generation_ms:!0,config_cssselector:".gradient"};C(),g(),h(),jc(),cd=!0,ic()};