var AwesomeAjax=function(e){"use strict";var a=jQuery,r=this,e=e+"_";r.result={},r.load_model=function(a,n,s,o){return r.ajax({action:e+"get_"+a,data:{id:n},success_handler:s,error_handler:o})},r.publish_model=function(a,n,s){return r.ajax({action:e+"publish_model",data:{id:a},success_handler:n,error_handler:s})},r.delete_model=function(a,n){return r.ajax({action:e+"delete_model",data:{id:a,model_name:n},success_handler:function(e){return e}})},r.ajax=function(r){return a.ajax({url:window[e+"localize"].ajaxurl,type:"post",data:{action:r.action,security:window[e+"localize"].ajax_nonce,data:r.data||{}},success:function(e){var a=wpAjax.parseAjaxResponse(e);if(a.errors){var n=a.responses[0].errors;r.success_error_handler(n)}else{var s=JSON.parse(a.responses[0].data);r.success_handler(s)}},error:function(e){r.error_handler(e)}})}};
var AwesomeUtil={detect_os:function(){var e="Unknown OS";return-1!=navigator.appVersion.indexOf("Win")&&(e="Windows"),-1!=navigator.appVersion.indexOf("Mac")&&(e="MacOS"),-1!=navigator.appVersion.indexOf("X11")&&(e="UNIX"),-1!=navigator.appVersion.indexOf("Linux")&&(e="Linux"),e},toObject:function(e){for(var n={},t=0;t<e.length;++t)"object"==typeof e[t]?n[t]=AwesomeUtil.toObject(e[t]):n[t]=e[t];return n},find_in_array_of_objects:function(e,n,t){var i=!1;return jQuery.each(e,function(e,r){r.hasOwnProperty(n)&&r[n]==t&&(i=!0)}),i},hex_to_rgb:function(e){return[(e=parseInt(e,16))>>16,e>>8&255,255&e]},calc_size:function(e){return(e=""+e).endsWith("%")||e.endsWith("px")?e:e.replace("/[^0-9]/","")+"px"},clean_number:function(e){return parseInt(e.replace(/\D+/g,""))},get_keys:function(e){var n={},t=0;return _.each(e,function(e,i,r){n[t]="object"==typeof e?AwesomeUtil.get_keys(e):i,t++}),n},find_key_by_value:function(e,n){var t;return _.find(n,function(n,i){if("object"!=typeof n)return n===e&&(t=i,!0);t=AwesomeUtil.find_key_by_value(e,n)}),t},find_index_by_value:function(e,n){var t=AwesomeUtil.get_keys(n),i=AwesomeUtil.find_key_by_value(e,n);return AwesomeUtil.find_key_by_value(i,t)},removeClass:function(e,n){jQuery(e).removeClass(function(e,t){var i=new RegExp("(^|\\s)"+n+"\\S+","g");return(t.match(i)||[]).join(" ")})}};String.prototype.replace_all=function(e,n){return this.replace(new RegExp(e,"g"),n)},String.prototype.capitalize=function(){return this.charAt(0).toUpperCase()+this.slice(1)},String.prototype.endsWith=function(e){return-1!==this.indexOf(e,this.length-e.length)};var $=jQuery;$.fn.isVisible=function(e){var n=$("undefined"!==e?e:window).scrollTop();return $(this).height()>=n};
function md5cycle(f,h){var i=f[0],n=f[1],r=f[2],g=f[3];n=ii(n=ii(n=ii(n=ii(n=hh(n=hh(n=hh(n=hh(n=gg(n=gg(n=gg(n=gg(n=ff(n=ff(n=ff(n=ff(n,r=ff(r,g=ff(g,i=ff(i,n,r,g,h[0],7,-680876936),n,r,h[1],12,-389564586),i,n,h[2],17,606105819),g,i,h[3],22,-1044525330),r=ff(r,g=ff(g,i=ff(i,n,r,g,h[4],7,-176418897),n,r,h[5],12,1200080426),i,n,h[6],17,-1473231341),g,i,h[7],22,-45705983),r=ff(r,g=ff(g,i=ff(i,n,r,g,h[8],7,1770035416),n,r,h[9],12,-1958414417),i,n,h[10],17,-42063),g,i,h[11],22,-1990404162),r=ff(r,g=ff(g,i=ff(i,n,r,g,h[12],7,1804603682),n,r,h[13],12,-40341101),i,n,h[14],17,-1502002290),g,i,h[15],22,1236535329),r=gg(r,g=gg(g,i=gg(i,n,r,g,h[1],5,-165796510),n,r,h[6],9,-1069501632),i,n,h[11],14,643717713),g,i,h[0],20,-373897302),r=gg(r,g=gg(g,i=gg(i,n,r,g,h[5],5,-701558691),n,r,h[10],9,38016083),i,n,h[15],14,-660478335),g,i,h[4],20,-405537848),r=gg(r,g=gg(g,i=gg(i,n,r,g,h[9],5,568446438),n,r,h[14],9,-1019803690),i,n,h[3],14,-187363961),g,i,h[8],20,1163531501),r=gg(r,g=gg(g,i=gg(i,n,r,g,h[13],5,-1444681467),n,r,h[2],9,-51403784),i,n,h[7],14,1735328473),g,i,h[12],20,-1926607734),r=hh(r,g=hh(g,i=hh(i,n,r,g,h[5],4,-378558),n,r,h[8],11,-2022574463),i,n,h[11],16,1839030562),g,i,h[14],23,-35309556),r=hh(r,g=hh(g,i=hh(i,n,r,g,h[1],4,-1530992060),n,r,h[4],11,1272893353),i,n,h[7],16,-155497632),g,i,h[10],23,-1094730640),r=hh(r,g=hh(g,i=hh(i,n,r,g,h[13],4,681279174),n,r,h[0],11,-358537222),i,n,h[3],16,-722521979),g,i,h[6],23,76029189),r=hh(r,g=hh(g,i=hh(i,n,r,g,h[9],4,-640364487),n,r,h[12],11,-421815835),i,n,h[15],16,530742520),g,i,h[2],23,-995338651),r=ii(r,g=ii(g,i=ii(i,n,r,g,h[0],6,-198630844),n,r,h[7],10,1126891415),i,n,h[14],15,-1416354905),g,i,h[5],21,-57434055),r=ii(r,g=ii(g,i=ii(i,n,r,g,h[12],6,1700485571),n,r,h[3],10,-1894986606),i,n,h[10],15,-1051523),g,i,h[1],21,-2054922799),r=ii(r,g=ii(g,i=ii(i,n,r,g,h[8],6,1873313359),n,r,h[15],10,-30611744),i,n,h[6],15,-1560198380),g,i,h[13],21,1309151649),r=ii(r,g=ii(g,i=ii(i,n,r,g,h[4],6,-145523070),n,r,h[11],10,-1120210379),i,n,h[2],15,718787259),g,i,h[9],21,-343485551),f[0]=add32(i,f[0]),f[1]=add32(n,f[1]),f[2]=add32(r,f[2]),f[3]=add32(g,f[3])}function cmn(f,h,i,n,r,g){return h=add32(add32(h,f),add32(n,g)),add32(h<<r|h>>>32-r,i)}function ff(f,h,i,n,r,g,t){return cmn(h&i|~h&n,f,h,r,g,t)}function gg(f,h,i,n,r,g,t){return cmn(h&n|i&~n,f,h,r,g,t)}function hh(f,h,i,n,r,g,t){return cmn(h^i^n,f,h,r,g,t)}function ii(f,h,i,n,r,g,t){return cmn(i^(h|~n),f,h,r,g,t)}function md51(f){txt="";var h,i=f.length,n=[1732584193,-271733879,-1732584194,271733878];for(h=64;h<=f.length;h+=64)md5cycle(n,md5blk(f.substring(h-64,h)));f=f.substring(h-64);var r=[0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0];for(h=0;h<f.length;h++)r[h>>2]|=f.charCodeAt(h)<<(h%4<<3);if(r[h>>2]|=128<<(h%4<<3),h>55)for(md5cycle(n,r),h=0;h<16;h++)r[h]=0;return r[14]=8*i,md5cycle(n,r),n}function md5blk(f){var h,i=[];for(h=0;h<64;h+=4)i[h>>2]=f.charCodeAt(h)+(f.charCodeAt(h+1)<<8)+(f.charCodeAt(h+2)<<16)+(f.charCodeAt(h+3)<<24);return i}function rhex(f){for(var h="",i=0;i<4;i++)h+=hex_chr[f>>8*i+4&15]+hex_chr[f>>8*i&15];return h}function hex(f){for(var h=0;h<f.length;h++)f[h]=rhex(f[h]);return f.join("")}function md5(f){return hex(md51(f))}function add32(f,h){return f+h&4294967295}function add32(f,h){var i=(65535&f)+(65535&h);return(f>>16)+(h>>16)+(i>>16)<<16|65535&i}var hex_chr="0123456789abcdef".split("");md5("hello");
LAIconManagerUtil={getSet:function(t,n){n=void 0===n?"_####_":n;var i=t.split(n);return i.length>1&&i[0]},getIcon:function(t,n){n=void 0===n?"_####_":n;var i=t.split(n);return i.length>1&&i[1]},getIconClass:function(t,n,i){n=void 0===n?"_####_":n,i=void 0===i?"la":i;var r=(t=t.split("+").join(" ")).split(n);if(r){var e=r[0];return i+md5(e)+"-"+r[1]}return!1}};
!function(e){e.fn.fontselect=function(a){var n=function(e,a){return function(){return e.apply(a,arguments)}},i={fonts:["ABeeZee","Abel","Abril Fatface","Aclonica","Acme","Actor","Adamina","Advent Pro","Aguafina Script","Akronim","Aladin","Aldrich","Alef","Alegreya","Alegreya SC","Alegreya Sans","Alegreya Sans SC","Alex Brush","Alfa Slab One","Alice","Alike","Alike Angular","Allan","Allerta","Allerta Stencil","Allura","Almendra","Almendra Display","Almendra SC","Amarante","Amaranth","Amatic SC","Amethysta","Amiri","Amita","Anaheim","Andada","Andika","Angkor","Annie Use Your Telescope","Anonymous Pro","Antic","Antic Didone","Antic Slab","Anton","Arapey","Arbutus","Arbutus Slab","Architects Daughter","Archivo Black","Archivo Narrow","Arimo","Arizonia","Armata","Artifika","Arvo","Arya","Asap","Asar","Asset","Astloch","Asul","Atomic Age","Aubrey","Audiowide","Autour One","Average","Average Sans","Averia Gruesa Libre","Averia Libre","Averia Sans Libre","Averia Serif Libre","Bad Script","Balthazar","Bangers","Basic","Battambang","Baumans","Bayon","Belgrano","Belleza","BenchNine","Bentham","Berkshire Swash","Bevan","Bigelow Rules","Bigshot One","Bilbo","Bilbo Swash Caps","Biryani","Bitter","Black Ops One","Bokor","Bonbon","Boogaloo","Bowlby One","Bowlby One SC","Brawler","Bree Serif","Bubblegum Sans","Bubbler One","Buda","Buenard","Butcherman","Butterfly Kids","Cabin","Cabin Condensed","Cabin Sketch","Caesar Dressing","Cagliostro","Calligraffitti","Cambay","Cambo","Candal","Cantarell","Cantata One","Cantora One","Capriola","Cardo","Carme","Carrois Gothic","Carrois Gothic SC","Carter One","Catamaran","Caudex","Caveat","Caveat Brush","Cedarville Cursive","Ceviche One","Changa One","Chango","Chau Philomene One","Chela One","Chelsea Market","Chenla","Cherry Cream Soda","Cherry Swash","Chewy","Chicle","Chivo","Chonburi","Cinzel","Cinzel Decorative","Clicker Script","Coda","Coda Caption","Codystar","Combo","Comfortaa","Coming Soon","Concert One","Condiment","Content","Contrail One","Convergence","Cookie","Copse","Corben","Courgette","Cousine","Coustard","Covered By Your Grace","Crafty Girls","Creepster","Crete Round","Crimson Text","Croissant One","Crushed","Cuprum","Cutive","Cutive Mono","Damion","Dancing Script","Dangrek","Dawning of a New Day","Days One","Dekko","Delius","Delius Swash Caps","Delius Unicase","Della Respira","Denk One","Devonshire","Dhurjati","Didact Gothic","Diplomata","Diplomata SC","Domine","Donegal One","Doppio One","Dorsa","Dosis","Dr Sugiyama","Droid Sans","Droid Sans Mono","Droid Serif","Duru Sans","Dynalight","EB Garamond","Eagle Lake","Eater","Economica","Eczar","Ek Mukta","Electrolize","Elsie","Elsie Swash Caps","Emblema One","Emilys Candy","Engagement","Englebert","Enriqueta","Erica One","Esteban","Euphoria Script","Ewert","Exo","Exo 2","Expletus Sans","Fanwood Text","Fascinate","Fascinate Inline","Faster One","Fasthand","Fauna One","Federant","Federo","Felipa","Fenix","Finger Paint","Fira Mono","Fira Sans","Fjalla One","Fjord One","Flamenco","Flavors","Fondamento","Fontdiner Swanky","Forum","Francois One","Freckle Face","Fredericka the Great","Fredoka One","Freehand","Fresca","Frijole","Fruktur","Fugaz One","GFS Didot","GFS Neohellenic","Gabriela","Gafata","Galdeano","Galindo","Gentium Basic","Gentium Book Basic","Geo","Geostar","Geostar Fill","Germania One","Gidugu","Gilda Display","Give You Glory","Glass Antiqua","Glegoo","Gloria Hallelujah","Goblin One","Gochi Hand","Gorditas","Goudy Bookletter 1911","Graduate","Grand Hotel","Gravitas One","Great Vibes","Griffy","Gruppo","Gudea","Gurajada","Habibi","Halant","Hammersmith One","Hanalei","Hanalei Fill","Handlee","Hanuman","Happy Monkey","Headland One","Henny Penny","Herr Von Muellerhoff","Hind","Hind Siliguri","Hind Vadodara","Holtwood One SC","Homemade Apple","Homenaje","IM Fell DW Pica","IM Fell DW Pica SC","IM Fell Double Pica","IM Fell Double Pica SC","IM Fell English","IM Fell English SC","IM Fell French Canon","IM Fell French Canon SC","IM Fell Great Primer","IM Fell Great Primer SC","Iceberg","Iceland","Imprima","Inconsolata","Inder","Indie Flower","Inika","Inknut Antiqua","Irish Grover","Istok Web","Italiana","Italianno","Itim","Jacques Francois","Jacques Francois Shadow","Jaldi","Jim Nightshade","Jockey One","Jolly Lodger","Josefin Sans","Josefin Slab","Joti One","Judson","Julee","Julius Sans One","Junge","Jura","Just Another Hand","Just Me Again Down Here","Kadwa","Kalam","Kameron","Kanit","Kantumruy","Karla","Karma","Kaushan Script","Kavoon","Kdam Thmor","Keania One","Kelly Slab","Kenia","Khand","Khmer","Khula","Kite One","Knewave","Kotta One","Koulen","Kranky","Kreon","Kristi","Krona One","Kurale","La Belle Aurore","Laila","Lakki Reddy","Lancelot","Lateef","Lato","League Script","Leckerli One","Ledger","Lekton","Lemon","Libre Baskerville","Life Savers","Lilita One","Lily Script One","Limelight","Linden Hill","Lobster","Lobster Two","Londrina Outline","Londrina Shadow","Londrina Sketch","Londrina Solid","Lora","Love Ya Like A Sister","Loved by the King","Lovers Quarrel","Luckiest Guy","Lusitana","Lustria","Macondo","Macondo Swash Caps","Magra","Maiden Orange","Mako","Mallanna","Mandali","Marcellus","Marcellus SC","Marck Script","Margarine","Marko One","Marmelad","Martel","Martel Sans","Marvel","Mate","Mate SC","Maven Pro","McLaren","Meddon","MedievalSharp","Medula One","Megrim","Meie Script","Merienda","Merienda One","Merriweather","Merriweather Sans","Metal","Metal Mania","Metamorphous","Metrophobic","Michroma","Milonga","Miltonian","Miltonian Tattoo","Miniver","Miss Fajardose","Modak","Modern Antiqua","Molengo","Molle","Monda","Monofett","Monoton","Monsieur La Doulaise","Montaga","Montez","Montserrat","Montserrat Alternates","Montserrat Subrayada","Moul","Moulpali","Mountains of Christmas","Mouse Memoirs","Mr Bedfort","Mr Dafoe","Mr De Haviland","Mrs Saint Delafield","Mrs Sheppards","Muli","Mystery Quest","NTR","Neucha","Neuton","New Rocker","News Cycle","Niconne","Nixie One","Nobile","Nokora","Norican","Nosifer","Nothing You Could Do","Noticia Text","Noto Sans","Noto Serif","Nova Cut","Nova Flat","Nova Mono","Nova Oval","Nova Round","Nova Script","Nova Slim","Nova Square","Numans","Nunito","Odor Mean Chey","Offside","Old Standard TT","Oldenburg","Oleo Script","Oleo Script Swash Caps","Open Sans","Open Sans Condensed","Oranienbaum","Orbitron","Oregano","Orienta","Original Surfer","Oswald","Over the Rainbow","Overlock","Overlock SC","Ovo","Oxygen","Oxygen Mono","PT Mono","PT Sans","PT Sans Caption","PT Sans Narrow","PT Serif","PT Serif Caption","Pacifico","Palanquin","Palanquin Dark","Paprika","Parisienne","Passero One","Passion One","Pathway Gothic One","Patrick Hand","Patrick Hand SC","Patua One","Paytone One","Peddana","Peralta","Permanent Marker","Petit Formal Script","Petrona","Philosopher","Piedra","Pinyon Script","Pirata One","Plaster","Play","Playball","Playfair Display","Playfair Display SC","Podkova","Poiret One","Poller One","Poly","Pompiere","Pontano Sans","Poppins","Port Lligat Sans","Port Lligat Slab","Pragati Narrow","Prata","Preahvihear","Press Start 2P","Princess Sofia","Prociono","Prosto One","Puritan","Purple Purse","Quando","Quantico","Quattrocento","Quattrocento Sans","Questrial","Quicksand","Quintessential","Qwigley","Racing Sans One","Radley","Rajdhani","Raleway","Raleway Dots","Ramabhadra","Ramaraja","Rambla","Rammetto One","Ranchers","Rancho","Ranga","Rationale","Ravi Prakash","Redressed","Reenie Beanie","Revalia","Rhodium Libre","Ribeye","Ribeye Marrow","Righteous","Risque","Roboto","Roboto Condensed","Roboto Mono","Roboto Slab","Rochester","Rock Salt","Rokkitt","Romanesco","Ropa Sans","Rosario","Rosarivo","Rouge Script","Rozha One","Rubik","Rubik Mono One","Rubik One","Ruda","Rufina","Ruge Boogie","Ruluko","Rum Raisin","Ruslan Display","Russo One","Ruthie","Rye","Sacramento","Sahitya","Sail","Salsa","Sanchez","Sancreek","Sansita One","Sarala","Sarina","Sarpanch","Satisfy","Scada","Scheherazade","Schoolbell","Seaweed Script","Sevillana","Seymour One","Shadows Into Light","Shadows Into Light Two","Shanti","Share","Share Tech","Share Tech Mono","Shojumaru","Short Stack","Siemreap","Sigmar One","Signika","Signika Negative","Simonetta","Sintony","Sirin Stencil","Six Caps","Skranji","Slabo 13px","Slabo 27px","Slackey","Smokum","Smythe","Sniglet","Snippet","Snowburst One","Sofadi One","Sofia","Sonsie One","Sorts Mill Goudy","Source Code Pro","Source Sans Pro","Source Serif Pro","Special Elite","Spicy Rice","Spinnaker","Spirax","Squada One","Sree Krushnadevaraya","Stalemate","Stalinist One","Stardos Stencil","Stint Ultra Condensed","Stint Ultra Expanded","Stoke","Strait","Sue Ellen Francisco","Sumana","Sunshiney","Supermercado One","Sura","Suranna","Suravaram","Suwannaphum","Swanky and Moo Moo","Syncopate","Tangerine","Taprom","Tauri","Teko","Telex","Tenali Ramakrishna","Tenor Sans","Text Me One","The Girl Next Door","Tienne","Tillana","Timmana","Tinos","Titan One","Titillium Web","Trade Winds","Trocchi","Trochut","Trykker","Tulpen One","Ubuntu","Ubuntu Condensed","Ubuntu Mono","Ultra","Uncial Antiqua","Underdog","Unica One","UnifrakturCook","UnifrakturMaguntia","Unkempt","Unlock","Unna","VT323","Vampiro One","Varela","Varela Round","Vast Shadow","Vesper Libre","Vibur","Vidaloka","Viga","Voces","Volkhov","Vollkorn","Voltaire","Waiting for the Sunrise","Wallpoet","Walter Turncoat","Warnes","Wellfleet","Wendy One","Wire One","Work Sans","Yanone Kaffeesatz","Yantramanav","Yellowtail","Yeseva One","Yesteryear","Zeyada"],empty:"empty",style:"font-select",placeholder:"Select a font",lookahead:2,api:"//fonts.googleapis.com/css?family="},t=function(){function a(a,n){this.$original=e(a),this.options=n,this.active=!1,this.setupHtml(),this.getVisibleFonts(),this.bindEvents();var i=this.$original.val();i&&i!==this.options.empty&&(this.updateSelected(),this.addFontLink(i))}return a.prototype.bindEvents=function(){e("li",this.$results).on("click",n(this.selectFont,this)).on("click",n(this.selectFont,this)).on("click",n(this.activateFont,this)),e("span",this.$select).on("click",n(this.toggleDrop,this)),this.$arrow.on("click",n(this.toggleDrop,this))},a.prototype.toggleDrop=function(e){this.active?(this.$element.removeClass("font-select-active"),this.$drop.hide(),clearInterval(this.visibleInterval)):(this.$element.addClass("font-select-active"),this.$drop.show(),this.moveToSelected(),this.visibleInterval=setInterval(n(this.getVisibleFonts,this),500)),this.active=!this.active},a.prototype.selectFont=function(){var a=e("li.active",this.$results).data("value");this.$original.val(a).change(),this.updateSelected(),this.toggleDrop()},a.prototype.moveToSelected=function(){var a,n=this.$original.val();a=n?e("li[data-value='"+n+"']",this.$results):e("li",this.$results).first(),this.$results.scrollTop(0).scrollTop(a.addClass("active").position().top)},a.prototype.activateFont=function(a){e("li.active",this.$results).removeClass("active"),e(a.currentTarget).addClass("active")},a.prototype.deactivateFont=function(a){e(a.currentTarget).removeClass("active")},a.prototype.updateSelected=function(){var a=this.$original.val(),n=this.toReadable(a)==this.options.empty?this.options.placeholder:this.toReadable(a);e("span",this.$element).text(n).css({"font-family":"Lato"}),a!==this.options.empty&&(this.addFontLink(a),e("span",this.$element).css(this.toStyle(a)))},a.prototype.setupHtml=function(){this.$original.empty().hide(),this.$element=e("<div>",{class:this.options.style}),this.$arrow=e("<div><b></b></div>"),this.$select=e("<a><span>"+this.options.placeholder+"</span></a>"),this.$drop=e("<div>",{class:"fs-drop"}),this.$results=e("<ul>",{class:"fs-results"}),this.$original.before(this.$element.append(this.$select.append(this.$arrow)).append(this.$drop)),this.$drop.append(this.$results.append(this.fontsAsHtml())).hide()},a.prototype.fontsAsHtml=function(){var e,a=this.options.fonts.length,n="";n+='<li data-value="'+this.options.empty+'">'+this.options.placeholder+"</li>";for(var i=0;i<a;i++)e=this.toReadable(this.options.fonts[i]),n+='<li data-value="'+this.options.fonts[i]+'">'+e+"</li>";return n},a.prototype.toReadable=function(e){return e.replace(/[\+|:]/g," ")},a.prototype.toStyle=function(e){var a=e.split(":");return{"font-family":this.toReadable(a[0]),"font-weight":a[1]||400}},a.prototype.getVisibleFonts=function(){if(!this.$results.is(":hidden")){this.$results.scrollTop(),this.$results.height();this.options.lookahead&&e("li",this.$results).first().height()*this.options.lookahead}},a.prototype.addFontLink=function(a){var n=this.options.api+a;0===e("link[href*='"+a+"']").length&&e("link:last").after('<link href="'+n+'" rel="stylesheet" type="text/css">'),e(document).trigger("google-font-added",[a,n])},a}();return this.each(function(){return a&&e.extend(i,a),new t(this,i)})}}(jQuery);
function acp_get_alpha_value_from_color(e){var t;return(e=e.replace(/ /g,"")).match(/rgba\(\d+\,\d+\,\d+\,([^\)]+)\)/)?(t=100*parseFloat(e.match(/rgba\(\d+\,\d+\,\d+\,([^\)]+)\)/)[1]).toFixed(2),t=parseInt(t)):t=100,t}function acp_update_alpha_value_on_color_control(e,t,n,o){var i,a,s;i=t.data("a8cIris"),a=t.data("wpWpColorPicker"),i._color._alpha=e,s=i._color.toString(),t.val(s),a.toggler.css({"background-color":s}),o&&acp_update_alpha_value_on_alpha_slider(e,n),t.wpColorPicker("color",s)}function acp_update_alpha_value_on_alpha_slider(e,t){t.slider("value",e),t.find(".ui-slider-handle").text(e.toString())}Color.prototype.toString=function(e){if("no-alpha"==e)return this.toCSS("rgba","1").replace(/\s+/g,"");if(1>this._alpha)return this.toCSS("rgba",this._alpha).replace(/\s+/g,"");var t=parseInt(this._color,10).toString(16);if(this.error)return"";if(t.length<6)for(var n=6-t.length-1;n>=0;n--)t="0"+t;return"#"+t},jQuery(function(e){"use strict";e(".alpha-color-control").each(function(){var t,n,o,i,a,s,c,l,r;t=e(this),n=t.val().replace(/\s+/g,""),o=t.attr("data-palette"),i=t.attr("data-show-opacity"),a=t.attr("data-default-color"),s={change:function(e,n){var o,i,s;o=t.attr("data-customize-setting-link"),i=t.wpColorPicker("color"),a==i&&(s=acp_get_alpha_value_from_color(i),l.find(".ui-slider-handle").text(s)),wp.customize(o,function(e){e.set(i)}),c.find(".transparency").css("background-color",n.color.toString("no-alpha"))},palettes:-1!==o.indexOf("|")?o.split("|"):"false"!=o},t.wpColorPicker(s),c=t.parents(".wp-picker-container:first"),e('<div class="alpha-color-picker-container"><div class="min-click-zone click-zone"></div><div class="max-click-zone click-zone"></div><div class="alpha-slider"></div><div class="transparency"></div></div>').appendTo(c.find(".wp-picker-holder")),l=c.find(".alpha-slider"),r={create:function(t,o){var i=e(this).slider("value");e(this).find(".ui-slider-handle").text(i),e(this).siblings(".transparency ").css("background-color",n)},value:acp_get_alpha_value_from_color(n),range:"max",step:1,min:0,max:100,animate:300},l.slider(r),"true"==i&&l.find(".ui-slider-handle").addClass("show-opacity"),c.find(".min-click-zone").on("click",function(){acp_update_alpha_value_on_color_control(0,t,l,!0)}),c.find(".max-click-zone").on("click",function(){acp_update_alpha_value_on_color_control(100,t,l,!0)}),c.find(".iris-palette").on("click",function(){var n,o;acp_update_alpha_value_on_alpha_slider(o=acp_get_alpha_value_from_color(n=e(this).css("background-color")),l),100!=o&&(n=n.replace(/[^,]+(?=\))/,(o/100).toFixed(2))),t.wpColorPicker("color",n)}),c.find(".button.wp-picker-clear").on("click",function(){var e=t.attr("data-customize-setting-link");t.wpColorPicker("color","#ffffff"),wp.customize(e,function(e){e.set("")}),acp_update_alpha_value_on_alpha_slider(100,l)}),c.find(".button.wp-picker-default").on("click",function(){acp_update_alpha_value_on_alpha_slider(acp_get_alpha_value_from_color(a),l)}),t.on("input",function(){acp_update_alpha_value_on_alpha_slider(acp_get_alpha_value_from_color(e(this).val()),l)}),l.slider().on("slide",function(n,o){acp_update_alpha_value_on_color_control(parseFloat(o.value)/100,t,l,!1),e(this).find(".ui-slider-handle").text(o.value)}),c.parents(".customize-control-sf-alpha-color:first").prepend(c.find(".customize-control-description")).prepend(c.find(".customize-control-title"))})}),jQuery(function($){function onChangeStyle(){$panelSettingsCont.find("[data-settings-group]").hide(),$panelSettingsCont.find("[data-settings-group*="+this.value+"]").show(),this.value}function onChangeSeparators(){this.checked?$settingsGroup.separators.show():$settingsGroup.separators.hide()}function onChangeIndicators(){this.checked?$settingsGroup.indicators.show():$settingsGroup.indicators.hide()}function monitor_events(object_path){var p=eval(object_path),k=_.keys(p.topics);console.log(object_path+" has events ",k),_.each(k,function(e){p.on(e,function(){console.log(object_path+" event "+e,arguments)})})}function deparam(e){var t,n,o,i,a,s={};if(e&&"string"==typeof e){if("?"===e.slice(0,1)&&(e=e.slice(1)),""!==e)for(t=e.split("&"),n=0;n<t.length;n+=1)o=t[n].split("="),i=decodeURIComponent(o[0]),a=o.length>1?decodeURIComponent(o[1]):void 0,s[i]=a,"icon"!==i&&(s[i]=a.replace(/\+/g," "));return s}}var menuData=window.SFM_MENU_DATA||{},api=window.wp.customize,metaChangeset={},activePreviewMenu,$iconManagerModal,$doc=$(document);$(".sf-px-value").after(" px"),$(".sf-per-value").after(" %"),$(".sfm-google-font-input").fontselect({fonts:window.GOOGLE_FONTS,placeholder:"Site default font",empty:"inherit",lookahead:2}).trigger("change"),$doc.on("google-font-added",function(e,t,n){var o=$(this).find('iframe[name*="customize-preview"]').contents();0===o.find("link[href*='"+t+"']").length&&o.find("link:last").after('<link href="'+n+'" rel="stylesheet" type="text/css">')}),$(".sfm-customize-control-tinymce-editor").each(function(){var e=_wpCustomizeSettings.controls[$(this).attr("id").replace("_s_","[").replace("_e_","]")].skyrockettinymcetoolbar1,t=_wpCustomizeSettings.controls[$(this).attr("id").replace("_s_","[").replace("_e_","]")].skyrockettinymcetoolbar2;wp.editor.initialize($(this).attr("id"),{tinymce:{wpautop:!0,toolbar1:e,toolbar2:t},quicktags:!0})}),$doc.on("tinymce-editor-init",function(e,t){t.on("change",function(e){tinyMCE.triggerSave(),$("#"+t.id).trigger("change")})}),$doc.on("customize-preview-menu-refreshed",function(e,t){console.log(t)});var template='<p class="customize-control-title">Superfly Rich Content settings</p><p class="description description-thin">Attached image</br><div class="sf-media"><input class="sf-media-input" type="hidden" name="menu-item-sfm-%ID%-img"/><span class="sf-media-cont sf-image-cont"></span><button type="button" style="" class="button remove sfm-img-remove-button" aria-label="Remove image">Remove image</button><button type="button" class="button new sfm-img-button" id="sfm-img-button_%ID%" aria-label="Add image">Add image</button></div><br><p class="description description-thin">Or custom icon</p><div class="sf-media sf-media-icon"><input class="sf-icon-input" type="hidden" name="menu-item-sfm-%ID%-icon"/><span class="sf-media-cont sf-icon-cont"></span><button type="button" style="" class="button remove sfm-icon-remove-button" aria-label="Remove image">Remove icon</button><button type="button" class="button new sfm-icon-button" id="sfm-icon-button_%ID%" aria-label="Add image">Add icon</button></div></p><p class="description description-thin"><label>Icon color for panel</label><input class="sf-short" type="text" name="menu-item-sfm-%ID%-icon_color"/></p><p class="description description-thin"><label>Menu item second line<br><input type="text" name="menu-item-sfm-%ID%-sline"/></label></p><p class="description description-thin"><label>Section heading above menu item<br><input class="" type="text" name="menu-item-sfm-%ID%-chapter"/></label></p><p class="description description-thin"><label>Custom HTML / shortcode for panel<br><textarea class="" type="text" name="menu-item-sfm-%ID%-content"></textarea></label></p><p class="description description-thin"><label>Custom panel background color</label><input class="sf-short" type="text" name="menu-item-sfm-%ID%-bg"/></label></p><p class="description description-thin"><label>Custom panel width<br><input class="sf-num sf-px-value" type="number" name="menu-item-sfm-%ID%-width"/> px</label></p><p class="description description-thin"><label>Item tabindex (default -1)</label><br><input class="sf-num" type="number" name="menu-item-sfm-%ID%-tabindex"/></label></p><p class="description description-thin"><label>Visibility<br><input id="menu-item-sfm-%ID%-hidemob" name="menu-item-sfm-%ID%-hidemob" class="switcher" type="checkbox" value="yes" /> Hide item on mobiles</label></p>';$('[id*="sub-accordion-section-nav_menu"]').each(function(){var e,t,n=this.id.match(/\[(\d+)\]$/),o=$(this);n&&(t=n[1],e=menuData[t],o.attr("data-sfm-menu-id",t).data("sfm-extra",e))}),api.control.on("change",function(e){var t,n,o,i,a,s,c,l;if(e.params&&e.params.menu_item_id&&e.container&&!e.container.data("sfm-extra-added")){if(s=e.container,c=s.closest("[data-sfm-menu-id]"),t=c.data(),o=t.sfmExtra,n=e.params.menu_item_id,t.sfmMenuId==activePreviewMenu&&s.find(".edit-menu-item-title").off("input change"),s.find(".menu-item-actions").before($(template.replace(/%ID%/g,n))),o[n]){i=deparam(o[n]);for(a in i)if((l=s.find("[name=menu-item-sfm-"+n+"-"+a+"]")).is(":checkbox")?"yes"===i[a]&&l.attr("checked",!0):"icon"===a?(r=(r=i[a]).indexOf("fa-")+1?"Font-Awesome_####_"+r.substr(3):r,l.val(r)):l.val(i[a]),"img"===a&&""!==i[a]&&s.find(".sf-image-cont").html('<img src="'+i[a]+'"/>'),"icon"===a&&""!==i[a]){var r=i[a];"####"===(LAIconManagerUtil.getSet(r)?LAIconManagerUtil.getSet(r):"Font Awesome")?(r=LAIconManagerUtil.getIcon(r),s.find(".sf-icon-cont").append('<i style="background-image:url('+r+')" class="la_icon la_icon_manager_custom">')):(r=-1!==r.indexOf("fa-")?"la"+md5("Font Awesome")+"-"+r.substr(3):LAIconManagerUtil.getIconClass(r),s.find(".sf-icon-cont").append('<i class="la_icon '+r+'">'))}}s.find('[name="menu-item-sfm-'+n+'-bg"]').wpColorPicker({change:function(e,t){var n=$(e.target);setTimeout(function(){n.trigger("sfm-change")},17)}}),s.find('[name="menu-item-sfm-'+n+'-icon_color"]').wpColorPicker({change:function(e,t){var n=$(e.target);setTimeout(function(){n.trigger("sfm-change")},17)}});var d,p,m=s.find(".sfm-img-button"),f=s.find(".sfm-icon-button"),u=s.find(".sf-media-input"),_=s.find(".sf-icon-input");u.val()?(s.addClass("sfm-img-added"),m.html("Change image")):s.removeClass("sfm-img-added"),_.val()?(s.addClass("sfm-icon-added"),f.html("Change icon")):s.removeClass("sfm-icon-added"),m.on("click",function(){p?p.open():((p=wp.media.frames.file_frame=wp.media({multiple:!1})).on("select",function(){d=p.state().get("selection").first().toJSON(),s.find(".sf-image-cont").html('<img src="'+d.url+'"/>'),u.val(d.sizes.full.url),s.addClass("sfm-img-added"),m.html("Change image"),u.trigger("sfm-change")}),p.open())}),s.find(".sfm-img-remove-button").on("click",function(e){u.val(""),s.removeClass("sfm-img-added").find(".sf-image-cont").html(""),m.html("Add image"),u.trigger("sfm-change")}),f.on("click",function(){$iconManagerModal.addClass("sfm-modal-opened").data("active-menu-item",n)}),s.find(".sfm-icon-remove-button").on("click",function(e){s.removeClass("sfm-icon-added").find(".sf-icon-cont").html(""),f.html("Add icon"),_.val(""),_.trigger("sfm-change")}),s.on("sfm-icon-applied",function(e,t,n,o){_.val(n),s.addClass("sfm-icon-added"),f.html("Change icon"),s.find(".sf-icon-cont").html(o),_.trigger("sfm-change")}),s.attr("sfm-item-id",n),e.container.data("sfm-extra-added",!0)}}),$("#customize-theme-controls").on("input sfm-change",'.menu-item-settings [name*="menu-item-sfm"], .menu-item-settings .edit-menu-item-title',function(){console.log(this.value);var e,t,n=$(this),o=n.closest("[sfm-item-id]");e=o.attr("sfm-item-id"),t=new RegExp("menu-item-sfm-"+e+"-","g"),metaChangeset[e]=o.find('[name*="menu-item-sfm"]').serialize().replace(t,""),api.state("saved").set(!1),api.previewer.send("sfm-menu-extra-changed",{serialized:metaChangeset[e],params:deparam(metaChangeset[e]),menuItemId:e,name:n.attr("name").replace(t,""),val:n.val()})}),api.on("save-request-params",function(e){console.log(e);var t={changeset:metaChangeset,action:"sf_save_item"};$.post(wp.ajax.settings.url,t).done(function(e){console.log("Got this from the server: ",e),-1==e||(metaChangeset={})},"json").fail(function(e){console.log(e.responseText),console.log(e)})}),api.previewer.on("sfm-active-menu",function(e){activePreviewMenu=e}),$doc.on("iconManagerCollectionLoaded",function(){console.log("iconManagerCollectionLoaded"),$("body").append('<div id="sfm-icon-container-wrapper"><div id="sfm-icon-container"><button type="button" class="media-modal-close"><span class="media-modal-icon"><span class="screen-reader-text">Close</span></span></button><div class="sfm-modal-desc">You can add more icons on <a href="/wp-admin/admin.php?page=superfly-menu-options" target="_blank">Superfly settings page</a></div><div id="sfm-icon-select"></div><input type="hidden" id="sfm-icons-input"/></div><div id="sfm-icons-modal-backdrop"></div></div>'),window.la_icon_manager_select=new LAIconManager("sfm-icons-container","#sfm-icon-select",window.la_icon_manager_collection,"#sfm-icons-input"),window.la_icon_manager_select.showIconSelect(),($iconManagerModal=$("#sfm-icon-container-wrapper")).on("click",".icons-list li",function(){var e=$iconManagerModal.data("active-menu-item");setTimeout(function(){$('[sfm-item-id="'+e+'"]').trigger("sfm-icon-applied",[e,$iconManagerModal.find("#sfm-icons-input").val(),$iconManagerModal.find(".preview").html()]),$iconManagerModal.removeClass("sfm-modal-opened").data("active-menu-item","")},100)}),$iconManagerModal.find(".media-modal-close").on("click",function(){$iconManagerModal.removeClass("sfm-modal-opened").data("active-menu-item","")})});var pluginOpts=JSON.parse(laim_localize.plugin_opts);$(".sfm_toggle_switch_control").each(function(){var e=$(this).find("input"),t=e.attr("id").replace("sf_options[","").replace("]","");pluginOpts[t]&&e.prop("checked","yes"===pluginOpts[t])});var $settingsGroup={fullscreen:$("#customize-control-sf_options-sf_fs_layout, #customize-control-sf_options-sf_fade_full, #customize-control-sf_options-sf_full_sec, #customize-control-sf_options-sf_full_head, #customize-control-sf_options-sf_full_x"),skewed:$("#customize-control-sf_options-sf_sidebar_behaviour, #customize-control-sf_options-sf_skew_type, #customize-control-sf_options-sf_fade_content, #customize-control-sf_options-sf_blur_content"),side:$("#customize-control-sf_options-sf_sidebar_behaviour, #customize-control-sf_options-sf_fade_content, #customize-control-sf_options-sf_blur_content, #customize-control-sf_options-sf_sub_type, #customize-control-sf_options-sf_sub_opening_type"),toolbar:$("#customize-control-sf_options-sf_sidebar_behaviour, #customize-control-sf_options-sf_fade_content, #customize-control-sf_options-sf_blur_content, #customize-control-sf_options-sf_sub_type, #customize-control-sf_options-sf_sub_opening_type"),separators:$("#customize-control-sf_options-sf_separators_color, #customize-control-sf_options-sf_separators_width"),indicators:$("#customize-control-sf_options-sf_ind_s, #customize-control-sf_options-sf_ind_st")},$panelSettingsCont=$("#sub-accordion-section-sf_settings_panel, #sub-accordion-section-sf_settings_items");for(var group in $settingsGroup)$settingsGroup[group].each(function(){var e,t=$(this),n=t.attr("data-settings-group");n?((e=n.split(",")).push(group),t.attr("data-settings-group",e.join(","))):t.attr("data-settings-group",group)});$('#customize-control-sf_options-sf_sidebar_style [name="sf_options[sf_sidebar_style]"]').change(onChangeStyle),$('#customize-control-sf_options-sf_ind [name="sf_options[sf_ind]"]').change(onChangeIndicators),$('#customize-control-sf_options-sf_separators [name="sf_options[sf_separators]"]').change(onChangeSeparators),$('#customize-control-sf_options-sf_sidebar_style [name="sf_options[sf_sidebar_style]"]:checked').each(onChangeStyle),$('#customize-control-sf_options-sf_ind [name="sf_options[sf_ind]"]:checked').each(onChangeIndicators),$('#customize-control-sf_options-sf_separators [name="sf_options[sf_separators]"]:checked').each(onChangeSeparators)});
//# sourceMappingURL=customizer.min.js.map