/*! jQuery Migrate v3.3.2 | (c) OpenJS Foundation and other contributors | jquery.org/license */ "undefined"==typeof jQuery.migrateMute&&(jQuery.migrateMute=!0),function(t){"use strict";"function"==typeof define&&define.amd?define(["jquery"],function(e){return t(e,window)}):"object"==typeof module&&module.exports?module.exports=t(require("jquery"),window):t(jQuery,window)}(function(s,n){"use strict";function e(e){return 0<=function(e,t){for(var r=/^(\d+)\.(\d+)\.(\d+)/,n=r.exec(e)||[],o=r.exec(t)||[],i=1;i<=3;i++){if(+o[i]<+n[i])return 1;if(+n[i]<+o[i])return-1}return 0}(s.fn.jquery,e)}s.migrateVersion="3.3.2",n.console&&n.console.log&&(s&&e("3.0.0")||n.console.log("JQMIGRATE: jQuery 3.0.0+ REQUIRED"),s.migrateWarnings&&n.console.log("JQMIGRATE: Migrate plugin loaded multiple times"),n.console.log("JQMIGRATE: Migrate is installed"+(s.migrateMute?"":" with logging active")+", version "+s.migrateVersion));var r={};function u(e){var t=n.console;s.migrateDeduplicateWarnings&&r[e]||(r[e]=!0,s.migrateWarnings.push(e),t&&t.warn&&!s.migrateMute&&(t.warn("JQMIGRATE: "+e),s.migrateTrace&&t.trace&&t.trace()))}function t(e,t,r,n){Object.defineProperty(e,t,{configurable:!0,enumerable:!0,get:function(){return u(n),r},set:function(e){u(n),r=e}})}function o(e,t,r,n){e[t]=function(){return u(n),r.apply(this,arguments)}}s.migrateDeduplicateWarnings=!0,s.migrateWarnings=[],void 0===s.migrateTrace&&(s.migrateTrace=!0),s.migrateReset=function(){r={},s.migrateWarnings.length=0},"BackCompat"===n.document.compatMode&&u("jQuery is not compatible with Quirks Mode");var i,a,c,d={},l=s.fn.init,p=s.find,f=/\[(\s*[-\w]+\s*)([~|^$*]?=)\s*([-\w#]*?#[-\w#]*)\s*\]/,y=/\[(\s*[-\w]+\s*)([~|^$*]?=)\s*([-\w#]*?#[-\w#]*)\s*\]/g,m=/^[\s\uFEFF\xA0]+|[\s\uFEFF\xA0]+$/g;for(i in s.fn.init=function(e){var t=Array.prototype.slice.call(arguments);return"string"==typeof e&&"#"===e&&(u("jQuery( '#' ) is not a valid selector"),t[0]=[]),l.apply(this,t)},s.fn.init.prototype=s.fn,s.find=function(t){var r=Array.prototype.slice.call(arguments);if("string"==typeof t&&f.test(t))try{n.document.querySelector(t)}catch(e){t=t.replace(y,function(e,t,r,n){return"["+t+r+'"'+n+'"]'});try{n.document.querySelector(t),u("Attribute selector with '#' must be quoted: "+r[0]),r[0]=t}catch(e){u("Attribute selector with '#' was not fixed: "+r[0])}}return p.apply(this,r)},p)Object.prototype.hasOwnProperty.call(p,i)&&(s.find[i]=p[i]);o(s.fn,"size",function(){return this.length},"jQuery.fn.size() is deprecated and removed; use the .length property"),o(s,"parseJSON",function(){return JSON.parse.apply(null,arguments)},"jQuery.parseJSON is deprecated; use JSON.parse"),o(s,"holdReady",s.holdReady,"jQuery.holdReady is deprecated"),o(s,"unique",s.uniqueSort,"jQuery.unique is deprecated; use jQuery.uniqueSort"),t(s.expr,"filters",s.expr.pseudos,"jQuery.expr.filters is deprecated; use jQuery.expr.pseudos"),t(s.expr,":",s.expr.pseudos,"jQuery.expr[':'] is deprecated; use jQuery.expr.pseudos"),e("3.1.1")&&o(s,"trim",function(e){return null==e?"":(e+"").replace(m,"")},"jQuery.trim is deprecated; use String.prototype.trim"),e("3.2.0")&&(o(s,"nodeName",function(e,t){return e.nodeName&&e.nodeName.toLowerCase()===t.toLowerCase()},"jQuery.nodeName is deprecated"),o(s,"isArray",Array.isArray,"jQuery.isArray is deprecated; use Array.isArray")),e("3.3.0")&&(o(s,"isNumeric",function(e){var t=typeof e;return("number"==t||"string"==t)&&!isNaN(e-parseFloat(e))},"jQuery.isNumeric() is deprecated"),s.each("Boolean Number String Function Array Date RegExp Object Error Symbol".split(" "),function(e,t){d["[object "+t+"]"]=t.toLowerCase()}),o(s,"type",function(e){return null==e?e+"":"object"==typeof e||"function"==typeof e?d[Object.prototype.toString.call(e)]||"object":typeof e},"jQuery.type is deprecated"),o(s,"isFunction",function(e){return"function"==typeof e},"jQuery.isFunction() is deprecated"),o(s,"isWindow",function(e){return null!=e&&e===e.window},"jQuery.isWindow() is deprecated")),s.ajax&&(a=s.ajax,c=/(=)\?(?=&|$)|\?\?/,s.ajax=function(){var e=a.apply(this,arguments);return e.promise&&(o(e,"success",e.done,"jQXHR.success is deprecated and removed"),o(e,"error",e.fail,"jQXHR.error is deprecated and removed"),o(e,"complete",e.always,"jQXHR.complete is deprecated and removed")),e},e("4.0.0")||s.ajaxPrefilter("+json",function(e){!1!==e.jsonp&&(c.test(e.url)||"string"==typeof e.data&&0===(e.contentType||"").indexOf("application/x-www-form-urlencoded")&&c.test(e.data))&&u("JSON-to-JSONP auto-promotion is deprecated")}));var g=s.fn.removeAttr,h=s.fn.toggleClass,v=/\S+/g;function j(e){return e.replace(/-([a-z])/g,function(e,t){return t.toUpperCase()})}s.fn.removeAttr=function(e){var r=this;return s.each(e.match(v),function(e,t){s.expr.match.bool.test(t)&&(u("jQuery.fn.removeAttr no longer sets boolean properties: "+t),r.prop(t,!1))}),g.apply(this,arguments)};var Q,b=!(s.fn.toggleClass=function(t){return void 0!==t&&"boolean"!=typeof t?h.apply(this,arguments):(u("jQuery.fn.toggleClass( boolean ) is deprecated"),this.each(function(){var e=this.getAttribute&&this.getAttribute("class")||"";e&&s.data(this,"__className__",e),this.setAttribute&&this.setAttribute("class",!e&&!1!==t&&s.data(this,"__className__")||"")}))}),w=/^[a-z]/,x=/^(?:Border(?:Top|Right|Bottom|Left)?(?:Width|)|(?:Margin|Padding)?(?:Top|Right|Bottom|Left)?|(?:Min|Max)?(?:Width|Height))$/;s.swap&&s.each(["height","width","reliableMarginRight"],function(e,t){var r=s.cssHooks[t]&&s.cssHooks[t].get;r&&(s.cssHooks[t].get=function(){var e;return b=!0,e=r.apply(this,arguments),b=!1,e})}),s.swap=function(e,t,r,n){var o,i,a={};for(i in b||u("jQuery.swap() is undocumented and deprecated"),t)a[i]=e.style[i],e.style[i]=t[i];for(i in o=r.apply(e,n||[]),t)e.style[i]=a[i];return o},e("3.4.0")&&"undefined"!=typeof Proxy&&(s.cssProps=new Proxy(s.cssProps||{},{set:function(){return u("JQMIGRATE: jQuery.cssProps is deprecated"),Reflect.set.apply(this,arguments)}})),s.cssNumber||(s.cssNumber={}),Q=s.fn.css,s.fn.css=function(e,t){var r,n,o=this;return e&&"object"==typeof e&&!Array.isArray(e)?(s.each(e,function(e,t){s.fn.css.call(o,e,t)}),this):("number"==typeof t&&(r=j(e),n=r,w.test(n)&&x.test(n[0].toUpperCase()+n.slice(1))||s.cssNumber[r]||u('Number-typed values are deprecated for jQuery.fn.css( "'+e+'", value )')),Q.apply(this,arguments))};var A,k,S,M,N=s.data;s.data=function(e,t,r){var n,o,i;if(t&&"object"==typeof t&&2===arguments.length){for(i in n=s.hasData(e)&&N.call(this,e),o={},t)i!==j(i)?(u("jQuery.data() always sets/gets camelCased names: "+i),n[i]=t[i]):o[i]=t[i];return N.call(this,e,o),t}return t&&"string"==typeof t&&t!==j(t)&&(n=s.hasData(e)&&N.call(this,e))&&t in n?(u("jQuery.data() always sets/gets camelCased names: "+t),2");t!==e&&T(e)!==T(t)&&u("HTML tags must be properly nested and closed: "+e)}var O=/<(?!area|br|col|embed|hr|img|input|link|meta|param)(([a-z][^\/\0>\x20\t\r\n\f]*)[^>]*)\/>/gi,q=s.htmlPrefilter;s.UNSAFE_restoreLegacyHtmlPrefilter=function(){s.htmlPrefilter=function(e){return P(e),e.replace(O,"<$1>")}},s.htmlPrefilter=function(e){return P(e),q(e)};var D,_=s.fn.offset;s.fn.offset=function(){var e=this[0];return!e||e.nodeType&&e.getBoundingClientRect?_.apply(this,arguments):(u("jQuery.fn.offset() requires a valid DOM element"),arguments.length?this:void 0)},s.ajax&&(D=s.param,s.param=function(e,t){var r=s.ajaxSettings&&s.ajaxSettings.traditional;return void 0===t&&r&&(u("jQuery.param() no longer uses jQuery.ajaxSettings.traditional"),t=r),D.call(this,e,t)});var E,F,J=s.fn.andSelf||s.fn.addBack;return s.fn.andSelf=function(){return u("jQuery.fn.andSelf() is deprecated and removed, use jQuery.fn.addBack()"),J.apply(this,arguments)},s.Deferred&&(E=s.Deferred,F=[["resolve","done",s.Callbacks("once memory"),s.Callbacks("once memory"),"resolved"],["reject","fail",s.Callbacks("once memory"),s.Callbacks("once memory"),"rejected"],["notify","progress",s.Callbacks("memory"),s.Callbacks("memory")]],s.Deferred=function(e){var i=E(),a=i.promise();return i.pipe=a.pipe=function(){var o=arguments;return u("deferred.pipe() is deprecated"),s.Deferred(function(n){s.each(F,function(e,t){var r="function"==typeof o[e]&&o[e];i[t[1]](function(){var e=r&&r.apply(this,arguments);e&&"function"==typeof e.promise?e.promise().done(n.resolve).fail(n.reject).progress(n.notify):n[t[0]+"With"](this===a?n.promise():this,r?[e]:arguments)})}),o=null}).promise()},e&&e.call(i,i),i},s.Deferred.exceptionHook=E.exceptionHook),s}); function klikenGetCartItems(){jQuery.post(fetchCartItems.ajax_url,{action:fetchCartItems.action,_ajax_nonce:fetchCartItems.nonce},function(data){if(typeof sw!=='object'||!data)return;let itemsForFBQ=[];let itemsForGTAG=[];let swCart=[];sw.config.currency=fetchCartItems.currency;for(let item in data){itemsForFBQ.push({"id":`${data[item].product_id}`,"quantity":`${data[item].quantity}`});itemsForGTAG.push({"id":`${data[item].product_id}`,"name":`${data[item].product_name}`,"price":`${data[item].price}`,"quantity":`${data[item].quantity}`,"google_business_vertical":"retail"});swCart.push({"id":`${data[item].product_id}`,"name":`${data[item].product_name}`,"price":`${data[item].price}`,"quantity":`${data[item].quantity}`,"currency":sw.config.currency});} sw.track("AddToCart",{"content_type":"product","contents":itemsForFBQ});sw.gEvent("add_to_cart",{"items":itemsForGTAG});sw.register_shopcart({"items":swCart});});} jQuery(document).ready(function(){jQuery('body').on('added_to_cart updated_cart_totals',function(){klikenGetCartItems();});}); var rpi=rpi||{};rpi.Time={getTime:function(a,e,f){return"chat"==f?this.getChatTime(a,e||"en"):f?this.getFormatTime(a,f,e||"en"):this.getDefaultTime(a,e||"en")},getChatTime:function(a,e){var f=((new Date).getTime()-a)/1E3/60/60,l=f/24;return 24>f?this.getFormatTime(a,"HH:mm",e):365>l?this.getFormatTime(a,"dd.MM HH:mm",e):this.getFormatTime(a,"yyyy.MM.dd HH:mm",e)},getDefaultTime:function(a,e){return this.getTimeAgo(a,e)},getTimeAgo:function(a,e){a=((new Date).getTime()-a)/1E3;var f=a/60,l=f/60,d=l/24,m=d/365;e=rpi.Time.Messages[e]?e:"en";return 45>a?rpi.Time.Messages[e].second:90>a?rpi.Time.Messages[e].minute:45>f?rpi.Time.Messages[e].minutes(f):90>f?rpi.Time.Messages[e].hour:24>l?rpi.Time.Messages[e].hours(l):48>l?rpi.Time.Messages[e].day:30>d?rpi.Time.Messages[e].days(d):60>d?rpi.Time.Messages[e].month:365>d?rpi.Time.Messages[e].months(d):2>m?rpi.Time.Messages[e].year:rpi.Time.Messages[e].years(m)},getTime12:function(a,e){a=new Date(a);return(a.getHours()%12?a.getHours()%12:12)+":"+a.getMinutes()+(12<=a.getHours()?" PM":" AM")},getFormatTime:function(a,e,f){var l=new Date(a),d={SS:l.getMilliseconds(),ss:l.getSeconds(),mm:l.getMinutes(),HH:l.getHours(),hh:(l.getHours()%12?l.getHours()%12:12)+(12<=l.getHours()?"PM":"AM"),dd:l.getDate(),MM:l.getMonth()+1,yyyy:l.getFullYear(),yy:String(l.getFullYear()).toString().substr(2,2),ago:this.getTimeAgo(a,f),12:this.getTime12(a,f)};return e.replace(/(SS|ss|mm|HH|hh|DD|dd|MM|yyyy|yy|ago|12)/g,function(m,h){m=d[h];return 10>m?"0"+m:m})},declineNum:function(a,e,f,l){return a+" "+ this.declineMsg(a,e,f,l)},declineMsg:function(a,e,f,l,d){var m=a%10;return 1==m&&(1==a||20m&&(20a)?f:a?l:d}};rpi.Time.Messages={ru:{second:"\u0442\u043e\u043b\u044c\u043a\u043e \u0447\u0442\u043e",minute:"\u043c\u0438\u043d\u0443\u0442\u0443 \u043d\u0430\u0437\u0430\u0434",minutes:function(a){return rpi.Time.declineNum(Math.round(a),"\u043c\u0438\u043d\u0443\u0442\u0430 \u043d\u0430\u0437\u0430\u0434","\u043c\u0438\u043d\u0443\u0442\u044b \u043d\u0430\u0437\u0430\u0434","\u043c\u0438\u043d\u0443\u0442 \u043d\u0430\u0437\u0430\u0434")},hour:"\u0447\u0430\u0441 \u043d\u0430\u0437\u0430\u0434",hours:function(a){return rpi.Time.declineNum(Math.round(a),"\u0447\u0430\u0441 \u043d\u0430\u0437\u0430\u0434","\u0447\u0430\u0441\u0430 \u043d\u0430\u0437\u0430\u0434","\u0447\u0430\u0441\u043e\u0432 \u043d\u0430\u0437\u0430\u0434")},day:"\u0434\u0435\u043d\u044c \u043d\u0430\u0437\u0430\u0434",days:function(a){return rpi.Time.declineNum(Math.round(a),"\u0434\u0435\u043d\u044c \u043d\u0430\u0437\u0430\u0434","\u0434\u043d\u044f \u043d\u0430\u0437\u0430\u0434","\u0434\u043d\u0435\u0439 \u043d\u0430\u0437\u0430\u0434")},month:"\u043c\u0435\u0441\u044f\u0446 \u043d\u0430\u0437\u0430\u0434",months:function(a){return rpi.Time.declineNum(Math.floor(a/30),"\u043c\u0435\u0441\u044f\u0446 \u043d\u0430\u0437\u0430\u0434","\u043c\u0435\u0441\u044f\u0446\u0430 \u043d\u0430\u0437\u0430\u0434","\u043c\u0435\u0441\u044f\u0446\u0435\u0432 \u043d\u0430\u0437\u0430\u0434")},year:"\u0433\u043e\u0434 \u043d\u0430\u0437\u0430\u0434",years:function(a){return rpi.Time.declineNum(Math.round(a),"\u0433\u043e\u0434 \u043d\u0430\u0437\u0430\u0434","\u0433\u043e\u0434\u0430 \u043d\u0430\u0437\u0430\u0434","\u043b\u0435\u0442 \u043d\u0430\u0437\u0430\u0434")}},en:{second:"just now",minute:"1m ago",minutes:function(a){return Math.round(a)+"m ago"},hour:"1h ago",hours:function(a){return Math.round(a)+"h ago"},day:"a day ago",days:function(a){return Math.round(a)+" days ago"},month:"a month ago",months:function(a){return Math.floor(a/30)+" months ago"},year:"a year ago",years:function(a){return Math.round(a)+" years ago"}},uk:{second:"\u0442\u0456\u043b\u044c\u043a\u0438 \u0449\u043e",minute:"\u0445\u0432\u0438\u043b\u0438\u043d\u0443 \u0442\u043e\u043c\u0443",minutes:function(a){return rpi.Time.declineNum(Math.round(a),"\u0445\u0432\u0438\u043b\u0438\u043d\u0443 \u0442\u043e\u043c\u0443","\u0445\u0432\u0438\u043b\u0438\u043d\u0438 \u0442\u043e\u043c\u0443","\u0445\u0432\u0438\u043b\u0438\u043d \u0442\u043e\u043c\u0443")},hour:"\u0433\u043e\u0434\u0438\u043d\u0443 \u0442\u043e\u043c\u0443",hours:function(a){return rpi.Time.declineNum(Math.round(a),"\u0433\u043e\u0434\u0438\u043d\u0443 \u0442\u043e\u043c\u0443","\u0433\u043e\u0434\u0438\u043d\u0438 \u0442\u043e\u043c\u0443","\u0433\u043e\u0434\u0438\u043d \u0442\u043e\u043c\u0443")},day:"\u0434\u0435\u043d\u044c \u0442\u043e\u043c\u0443",days:function(a){return rpi.Time.declineNum(Math.round(a),"\u0434\u0435\u043d\u044c \u0442\u043e\u043c\u0443","\u0434\u043d\u0456 \u0442\u043e\u043c\u0443","\u0434\u043d\u0456\u0432 \u0442\u043e\u043c\u0443")},month:"\u043c\u0456\u0441\u044f\u0446\u044c \u0442\u043e\u043c\u0443",months:function(a){return rpi.Time.declineNum(Math.floor(a/30),"\u043c\u0456\u0441\u044f\u0446\u044c \u0442\u043e\u043c\u0443","\u043c\u0456\u0441\u044f\u0446\u0456 \u0442\u043e\u043c\u0443","\u043c\u0456\u0441\u044f\u0446\u0456\u0432 \u0442\u043e\u043c\u0443")},year:"\u0440\u0456\u043a \u0442\u043e\u043c\u0443",years:function(a){return rpi.Time.declineNum(Math.round(a),"\u0440\u0456\u043a \u0442\u043e\u043c\u0443","\u0440\u043e\u043a\u0438 \u0442\u043e\u043c\u0443","\u0440\u043e\u043a\u0456\u0432 \u0442\u043e\u043c\u0443")}},ro:{second:"chiar acum",minute:"\u00een urm\u0103 minut",minutes:function(a){return rpi.Time.declineNum(Math.round(a),"o minuta in urma","minute in urma","de minute in urma")},hour:"acum o ora",hours:function(a){return rpi.Time.declineNum(Math.round(a),"acum o ora","ore in urma","de ore in urma")},day:"o zi in urma",days:function(a){return rpi.Time.declineNum(Math.round(a),"o zi in urma","zile in urma","de zile in urma")},month:"o luna in urma",months:function(a){return rpi.Time.declineNum(Math.floor(a/30),"o luna in urma","luni in urma","de luni in urma")},year:"un an in urma",years:function(a){return rpi.Time.declineNum(Math.round(a),"un an in urma","ani in urma","de ani in urma")}},lv:{second:"Maz\u0101k par min\u016bti",minute:"Pirms min\u016btes",minutes:function(a){return rpi.Time.declineNum(Math.round(a),"pirms min\u016btes","pirms min\u016bt\u0113m","pirms min\u016bt\u0113m")},hour:"pirms stundas",hours:function(a){return rpi.Time.declineNum(Math.round(a),"pirms stundas","pirms stund\u0101m","pirms stund\u0101m")},day:"pirms dienas",days:function(a){return rpi.Time.declineNum(Math.round(a),"pirms dienas","pirms dien\u0101m","pirms dien\u0101m")},month:"pirms m\u0113ne\u0161a",months:function(a){return rpi.Time.declineNum(Math.floor(a/30),"pirms m\u0113ne\u0161a","pirms m\u0113ne\u0161iem","pirms m\u0113ne\u0161iem")},year:"pirms gada",years:function(a){return rpi.Time.declineNum(Math.round(a),"pirms gada","pirms gadiem","pirms gadiem")}},lt:{second:"k\u0105 tik",minute:"prie\u0161 minut\u0119",minutes:function(a){return rpi.Time.declineNum(Math.round(a),"minut\u0117 prie\u0161","minut\u0117s prie\u0161","minu\u010di\u0173 prie\u0161")},hour:"prie\u0161 valand\u0105",hours:function(a){return rpi.Time.declineNum(Math.round(a),"valanda prie\u0161","valandos prie\u0161","valand\u0173 prie\u0161")},day:"prie\u0161 dien\u0105",days:function(a){return rpi.Time.declineNum(Math.round(a),"diena prie\u0161","dienos prie\u0161","dien\u0173 prie\u0161")},month:"prie\u0161 m\u0117nes\u012f",months:function(a){return rpi.Time.declineNum(Math.floor(a/30),"m\u0117nes\u012f prie\u0161","m\u0117nesiai prie\u0161","m\u0117nesi\u0173 prie\u0161")},year:"prie\u0161 metus",years:function(a){return rpi.Time.declineNum(Math.round(a),"metai prie\u0161","metai prie\u0161","met\u0173 prie\u0161")}},kk:{second:"\u0431\u0456\u0440 \u043c\u0438\u043d\u0443\u0442\u0442\u0430\u043d \u0430\u0437 \u0443\u0430\u049b\u044b\u0442 \u0431\u04b1\u0440\u044b\u043d",minute:"\u0431\u0456\u0440 \u043c\u0438\u043d\u0443\u0442 \u0431\u04b1\u0440\u044b\u043d",minutes:function(a){return rpi.Time.declineNum(Math.round(a),"\u043c\u0438\u043d\u0443\u0442 \u0431\u04b1\u0440\u044b\u043d","\u043c\u0438\u043d\u0443\u0442 \u0431\u04b1\u0440\u044b\u043d","\u043c\u0438\u043d\u0443\u0442 \u0431\u04b1\u0440\u044b\u043d")},hour:"\u0431\u0456\u0440 \u0441\u0430\u0493\u0430\u0442 \u0431\u04b1\u0440\u044b\u043d",hours:function(a){return rpi.Time.declineNum(Math.round(a),"\u0441\u0430\u0493\u0430\u0442 \u0431\u04b1\u0440\u044b\u043d","\u0441\u0430\u0493\u0430\u0442 \u0431\u04b1\u0440\u044b\u043d","\u0441\u0430\u0493\u0430\u0442 \u0431\u04b1\u0440\u044b\u043d")},day:"\u0431\u0456\u0440 \u043a\u04af\u043d \u0431\u04b1\u0440\u044b\u043d",days:function(a){return rpi.Time.declineNum(Math.round(a),"\u043a\u04af\u043d \u0431\u04b1\u0440\u044b\u043d","\u043a\u04af\u043d \u0431\u04b1\u0440\u044b\u043d","\u043a\u04af\u043d \u0431\u04b1\u0440\u044b\u043d")},month:"\u0431\u0456\u0440 \u0430\u0439 \u0431\u04b1\u0440\u044b\u043d",months:function(a){return rpi.Time.declineNum(Math.floor(a/30),"\u0430\u0439 \u0431\u04b1\u0440\u044b\u043d","\u0430\u0439 \u0431\u04b1\u0440\u044b\u043d","\u0430\u0439 \u0431\u04b1\u0440\u044b\u043d")},year:"\u0431\u0456\u0440 \u0436\u044b\u043b \u0431\u04b1\u0440\u044b\u043d",years:function(a){return rpi.Time.declineNum(Math.round(a),"\u0436\u044b\u043b \u0431\u04b1\u0440\u044b\u043d","\u0436\u044b\u043b \u0431\u04b1\u0440\u044b\u043d","\u0436\u044b\u043b \u0431\u04b1\u0440\u044b\u043d")}},ka:{second:"\u10ec\u10d0\u10db\u10d8\u10e1 \u10ec\u10d8\u10dc",minute:"\u10ec\u10e3\u10d7\u10d8\u10e1 \u10ec\u10d8\u10dc",minutes:function(a){return rpi.Time.declineNum(Math.round(a),"\u10ec\u10e3\u10d7\u10d8\u10e1 \u10ec\u10d8\u10dc","\u10ec\u10e3\u10d7\u10d8\u10e1 \u10ec\u10d8\u10dc","\u10ec\u10e3\u10d7\u10d8\u10e1 \u10ec\u10d8\u10dc")},hour:"\u10e1\u10d0\u10d0\u10d7\u10d8\u10e1 \u10ec\u10d8\u10dc",hours:function(a){return rpi.Time.declineNum(Math.round(a),"\u10e1\u10d0\u10d0\u10d7\u10d8\u10e1 \u10ec\u10d8\u10dc","\u10e1\u10d0\u10d0\u10d7\u10d8\u10e1 \u10ec\u10d8\u10dc","\u10e1\u10d0\u10d0\u10d7\u10d8\u10e1 \u10ec\u10d8\u10dc")},day:"\u10d3\u10e6\u10d8\u10e1 \u10ec\u10d8\u10dc",days:function(a){return rpi.Time.declineNum(Math.round(a),"\u10d3\u10e6\u10d8\u10e1 \u10ec\u10d8\u10dc","\u10d3\u10e6\u10d8\u10e1 \u10ec\u10d8\u10dc","\u10d3\u10e6\u10d8\u10e1 \u10ec\u10d8\u10dc")},month:"\u10d7\u10d5\u10d8\u10e1 \u10ec\u10d8\u10dc",months:function(a){return rpi.Time.declineNum(Math.floor(a/30),"\u10d7\u10d5\u10d8\u10e1 \u10ec\u10d8\u10dc","\u10d7\u10d5\u10d8\u10e1 \u10ec\u10d8\u10dc","\u10d7\u10d5\u10d8\u10e1 \u10ec\u10d8\u10dc")},year:"\u10ec\u10da\u10d8\u10e1 \u10ec\u10d8\u10dc",years:function(a){return rpi.Time.declineNum(Math.round(a),"\u10ec\u10da\u10d8\u10e1 \u10ec\u10d8\u10dc","\u10ec\u10da\u10d8\u10e1 \u10ec\u10d8\u10dc","\u10ec\u10da\u10d8\u10e1 \u10ec\u10d8\u10dc")}},hy:{second:"\u0574\u056b \u0584\u0576\u056b \u057e\u0561\u0575\u0580\u056f\u0575\u0561\u0576 \u0561\u057c\u0561\u057b",minute:"\u0574\u0565\u056f \u0580\u0578\u057a\u0565 \u0561\u057c\u0561\u057b",minutes:function(a){return rpi.Time.declineNum(Math.round(a),"\u0580\u0578\u057a\u0565 \u0561\u057c\u0561\u057b","\u0580\u0578\u057a\u0565 \u0561\u057c\u0561\u057b","\u0580\u0578\u057a\u0565 \u0561\u057c\u0561\u057b")},hour:"\u0574\u0565\u056f \u056a\u0561\u0574 \u0561\u057c\u0561\u057b",hours:function(a){return rpi.Time.declineNum(Math.round(a),"\u056a\u0561\u0574 \u0561\u057c\u0561\u057b","\u056a\u0561\u0574 \u0561\u057c\u0561\u057b","\u056a\u0561\u0574 \u0561\u057c\u0561\u057b")},day:"\u0574\u0565\u056f \u0585\u0580 \u0561\u057c\u0561\u057b",days:function(a){return rpi.Time.declineNum(Math.round(a),"\u0585\u0580 \u0561\u057c\u0561\u057b","\u0585\u0580 \u0561\u057c\u0561\u057b","\u0585\u0580 \u0561\u057c\u0561\u057b")},month:"\u0574\u0565\u056f \u0561\u0574\u056b\u057d \u0561\u057c\u0561\u057b",months:function(a){return rpi.Time.declineNum(Math.floor(a/30),"\u0561\u0574\u056b\u057d \u0561\u057c\u0561\u057b","\u0561\u0574\u056b\u057d \u0561\u057c\u0561\u057b","\u0561\u0574\u056b\u057d \u0561\u057c\u0561\u057b")},year:"\u0574\u0565\u056f \u057f\u0561\u0580\u056b \u0561\u057c\u0561\u057b",years:function(a){return rpi.Time.declineNum(Math.round(a),"\u057f\u0561\u0580\u056b \u0561\u057c\u0561\u057b","\u057f\u0561\u0580\u056b \u0561\u057c\u0561\u057b","\u057f\u0561\u0580\u056b \u0561\u057c\u0561\u057b")}},fr:{second:"tout \u00e0 l'heure",minute:"environ une minute",minutes:function(a){return Math.round(a)+" minutes"},hour:"environ une heure",hours:function(a){return"environ "+Math.round(a)+" heures"},day:"un jour",days:function(a){return Math.round(a)+" jours"},month:"environ un mois",months:function(a){return Math.floor(a/30)+" mois"},year:"environ un an",years:function(a){return Math.round(a)+" ans"}},es:{second:"ahora",minute:"hace un minuto",minutes:function(a){return"hace "+Math.round(a)+" minuts"},hour:"hace una hora",hours:function(a){return"hace "+Math.round(a)+" horas"},day:"hace un dia",days:function(a){return"hace "+Math.round(a)+" d\u00edas"},month:"hace un mes",months:function(a){return"hace "+Math.floor(a/30)+" meses"},year:"hace a\u00f1os",years:function(a){return"hace "+Math.round(a)+" a\u00f1os"}},el:{second:"\u03bb\u03b9\u03b3\u03cc\u03c4\u03b5\u03c1\u03bf \u03b1\u03c0\u03cc \u03ad\u03bd\u03b1 \u03bb\u03b5\u03c0\u03c4\u03cc",minute:"\u03b3\u03cd\u03c1\u03c9 \u03c3\u03c4\u03bf \u03ad\u03bd\u03b1 \u03bb\u03b5\u03c0\u03c4\u03cc",minutes:function(a){return Math.round(a)+" minutes"},hour:"\u03b3\u03cd\u03c1\u03c9 \u03c3\u03c4\u03b7\u03bd \u03bc\u03b9\u03b1 \u03ce\u03c1\u03b1",hours:function(a){return"about "+Math.round(a)+" hours"},day:"\u03bc\u03b9\u03b1 \u03bc\u03ad\u03c1\u03b1",days:function(a){return Math.round(a)+" days"},month:"\u03b3\u03cd\u03c1\u03c9 \u03c3\u03c4\u03bf\u03bd \u03ad\u03bd\u03b1 \u03bc\u03ae\u03bd\u03b1",months:function(a){return Math.floor(a/30)+" months"},year:"\u03b3\u03cd\u03c1\u03c9 \u03c3\u03c4\u03bf\u03bd \u03ad\u03bd\u03b1 \u03c7\u03c1\u03cc\u03bd\u03bf",years:function(a){return Math.round(a)+" years"}},de:{second:"soeben",minute:"vor einer Minute",minutes:function(a){return"vor "+Math.round(a)+" Minuten"},hour:"vor einer Stunde",hours:function(a){return"vor "+Math.round(a)+" Stunden"},day:"vor einem Tag",days:function(a){return"vor "+Math.round(a)+" Tagen"},month:"vor einem Monat",months:function(a){return"vor "+ Math.floor(a/30)+" Monaten"},year:"vor einem Jahr",years:function(a){return"vor "+Math.round(a)+" Jahren"}},be:{second:"\u043c\u0435\u043d\u0448 \u0437\u0430 \u0445\u0432\u0456\u043b\u0456\u043d\u0443 \u0442\u0430\u043c\u0443",minute:"\u0445\u0432\u0456\u043b\u0456\u043d\u0443 \u0442\u0430\u043c\u0443",minutes:function(a){return rpi.Time.declineNum(Math.round(a),"\u0445\u0432\u0456\u043b\u0456\u043d\u0430 \u0442\u0430\u043c\u0443","\u0445\u0432\u0456\u043b\u0456\u043d\u044b \u0442\u0430\u043c\u0443","\u0445\u0432\u0456\u043b\u0456\u043d \u0442\u0430\u043c\u0443")},hour:"\u0433\u0430\u0434\u0437\u0456\u043d\u0443 \u0442\u0430\u043c\u0443",hours:function(a){return rpi.Time.declineNum(Math.round(a),"\u0433\u0430\u0434\u0437\u0456\u043d\u0443 \u0442\u0430\u043c\u0443","\u0433\u0430\u0434\u0437\u0456\u043d\u044b \u0442\u0430\u043c\u0443","\u0433\u0430\u0434\u0437\u0456\u043d \u0442\u0430\u043c\u0443")},day:"\u0434\u0437\u0435\u043d\u044c \u0442\u0430\u043c\u0443",days:function(a){return rpi.Time.declineNum(Math.round(a),"\u0434\u0437\u0435\u043d\u044c \u0442\u0430\u043c\u0443","\u0434\u043d\u0456 \u0442\u0430\u043c\u0443","\u0434\u0437\u0451\u043d \u0442\u0430\u043c\u0443")},month:"\u043c\u0435\u0441\u044f\u0446 \u0442\u0430\u043c\u0443",months:function(a){return rpi.Time.declineNum(Math.floor(a/30),"\u043c\u0435\u0441\u044f\u0446 \u0442\u0430\u043c\u0443","\u043c\u0435\u0441\u044f\u0446\u0430 \u0442\u0430\u043c\u0443","\u043c\u0435\u0441\u044f\u0446\u0430\u045e \u0442\u0430\u043c\u0443")},year:"\u0433\u043e\u0434 \u0442\u0430\u043c\u0443",years:function(a){return rpi.Time.declineNum(Math.round(a),"\u0433\u043e\u0434 \u0442\u0430\u043c\u0443","\u0433\u0430\u0434\u044b \u0442\u0430\u043c\u0443","\u0433\u043e\u0434 \u0442\u0430\u043c\u0443")}},it:{second:"proprio ora",minute:"un minuto fa",minutes:function(a){return rpi.Time.declineNum(Math.round(a),"un minuto fa","minuti fa","minuti fa")},hour:"un'ora fa",hours:function(a){return rpi.Time.declineNum(Math.round(a),"un'ora fa","ore fa","ore fa")},day:"un giorno fa",days:function(a){return rpi.Time.declineNum(Math.round(a),"un giorno fa","giorni fa","giorni fa")},month:"un mese fa",months:function(a){return rpi.Time.declineNum(Math.floor(a/30),"un mese fa","mesi fa","mesi fa")},year:"un anno fa",years:function(a){return rpi.Time.declineNum(Math.round(a),"un anno fa","anni fa","anni fa")}},tr:{second:"az \u00f6nce",minute:"dakika \u00f6nce",minutes:function(a){return Math.round(a)+" dakika \u00f6nce"},hour:"saat \u00f6nce",hours:function(a){return Math.round(a)+" saat \u00f6nce"},day:"g\u00fcn \u00f6nce",days:function(a){return Math.round(a)+" g\u00fcn \u00f6nce"},month:"ay \u00f6nce",months:function(a){return Math.floor(a/30)+" ay \u00f6nce"},year:"y\u0131l \u00f6nce",years:function(a){return Math.round(a)+" y\u0131l \u00f6nce"}},nb:{second:"n\u00e5 nettopp",minute:"ett minutt siden",minutes:function(a){return Math.round(a)+" minutter siden"},hour:"en time siden",hours:function(a){return Math.round(a)+" timer siden"},day:"en dag siden",days:function(a){return Math.round(a)+" dager siden"},month:"en m\u00e5ned siden",months:function(a){return Math.floor(a/30)+" m\u00e5neder siden"},year:"ett \u00e5r siden",years:function(a){return Math.round(a)+" \u00e5r siden"}},da:{second:"lige nu",minute:"et minut siden",minutes:function(a){return Math.round(a)+" minutter siden"},hour:"en time siden",hours:function(a){return Math.round(a)+" timer siden"},day:"en dag siden",days:function(a){return Math.round(a)+" dage siden"},month:"en m\u00e5ned siden",months:function(a){return Math.floor(a/30)+" m\u00e5neder siden"},year:"et \u00e5r siden",years:function(a){return Math.round(a)+" \u00e5r siden"}},nl:{second:"zojuist",minute:"minuten geleden",minutes:function(a){return Math.round(a)+" minuten geleden"},hour:"uur geleden",hours:function(a){return Math.round(a)+" uur geleden"},day:"1 dag geleden",days:function(a){return Math.round(a)+" dagen geleden"},month:"maand geleden",months:function(a){return Math.floor(a/30)+" maanden geleden"},year:"jaar geleden",years:function(a){return Math.round(a)+" jaar geleden"}},ca:{second:"ara mateix",minute:"fa un minut",minutes:function(a){return"fa "+ Math.round(a)+" minuts"},hour:"fa una hora",hours:function(a){return"fa "+Math.round(a)+" hores"},day:"fa un dia",days:function(a){return"fa "+Math.round(a)+" dies"},month:"fa un mes",months:function(a){return"fa "+Math.floor(a/30)+" mesos"},year:"fa un any",years:function(a){return"fa "+Math.round(a)+" anys"}},sv:{second:"just nu",minute:"en minut sedan",minutes:function(a){return Math.round(a)+" minuter sedan"},hour:"en timme sedan",hours:function(a){return Math.round(a)+" timmar sedan"},day:"en dag sedan",days:function(a){return Math.round(a)+" dagar sedan"},month:"en m\u00e5nad sedan",months:function(a){return Math.floor(a/30)+" m\u00e5nader sedan"},year:"ett \u00e5r sedan",years:function(a){return Math.round(a)+" \u00e5r sedan"}},pl:{second:"w\u0142a\u015bnie teraz",minute:"minut\u0119 temu",minutes:function(a){return Math.round(a)+" minut temu"},hour:"godzin\u0119 temu",hours:function(a){return Math.round(a)+" godzin temu"},day:"wczoraj",days:function(a){return Math.round(a)+" dni temu"},month:"miesi\u0105c temu",months:function(a){return Math.floor(a/30)+" miesi\u0119cy temu"},year:"rok temu",years:function(a){return Math.round(a)+" lat temu"}},pt:{second:"agora",minute:"1 minuto atr\u00e1s",minutes:function(a){return Math.round(a)+" minutos atr\u00e1s"},hour:"1 hora atr\u00e1s",hours:function(a){return Math.round(a)+" horas atr\u00e1s"},day:"1 dia atr\u00e1s",days:function(a){return Math.round(a)+" dias atr\u00e1s"},month:"1 m\u00eas atr\u00e1s",months:function(a){return Math.floor(a/30)+" meses atr\u00e1s"},year:"1 ano atr\u00e1s",years:function(a){return Math.round(a)+" anos atr\u00e1s"}},hu:{second:"\u00e9pp az im\u00e9nt",minute:"1 perccel ezel\u0151tt",minutes:function(a){return Math.round(a)+" perccel ezel\u0151tt"},hour:"\u00f3r\u00e1val ezel\u0151tt",hours:function(a){return Math.round(a)+" \u00f3r\u00e1val ezel\u0151tt"},day:"nappal ezel\u0151tt",days:function(a){return Math.round(a)+" nappal ezel\u0151tt"},month:"h\u00f3nappal ezel\u0151tt",months:function(a){return Math.floor(a/30)+" h\u00f3nappal ezel\u0151tt"},year:"\u00e9vvel ezel\u0151tt",years:function(a){return Math.round(a)+" \u00e9vvel ezel\u0151tt"}},fi:{second:"juuri nyt",minute:"minuutti sitten",minutes:function(a){return Math.round(a)+" minuuttia sitten"},hour:"tunti sitten",hours:function(a){return Math.round(a)+" tuntia sitten"},day:"p\u00e4iv\u00e4 sitten",days:function(a){return Math.round(a)+" p\u00e4iv\u00e4\u00e4 sitten"},month:"kuukausi sitten",months:function(a){return Math.floor(a/30)+" kuukautta sitten"},year:"vuosi sitten",years:function(a){return Math.round(a)+" vuotta sitten"}},he:{second:"\u05d4\u05e8\u05d2\u05e2",minute:"\u05dc\u05e4\u05e0\u05d9 \u05d3\u05e7\u05d4",minutes:function(a){return"\u05dc\u05e4\u05e0\u05d9 "+Math.round(a)+" \u05d3\u05e7\u05d5\u05ea"},hour:"\u05dc\u05e4\u05e0\u05d9 \u05e9\u05e2\u05d4",hours:function(a){return"\u05dc\u05e4\u05e0\u05d9 "+Math.round(a)+" \u05e9\u05e2\u05d5\u05ea"},day:"\u05dc\u05e4\u05e0\u05d9 \u05d9\u05d5\u05dd",days:function(a){return"\u05dc\u05e4\u05e0\u05d9 "+Math.round(a)+" \u05d9\u05de\u05d9\u05dd"},month:"\u05dc\u05e4\u05e0\u05d9 \u05d7\u05d5\u05d3\u05e9",months:function(a){return 2==Math.floor(a/30)?"\u05dc\u05e4\u05e0\u05d9 \u05d7\u05d5\u05d3\u05e9\u05d9\u05d9\u05dd":"\u05dc\u05e4\u05e0\u05d9 "+Math.floor(a/30)+" \u05d7\u05d5\u05d3\u05e9\u05d9\u05dd"},year:"\u05dc\u05e4\u05e0\u05d9 \u05e9\u05e0\u05d4",years:function(a){return"\u05dc\u05e4\u05e0\u05d9 "+Math.round(a)+" \u05e9\u05e0\u05d9\u05dd"}},bg:{second:"\u0432 \u043c\u043e\u043c\u0435\u043d\u0442\u0430",minute:"\u043f\u0440\u0435\u0434\u0438 1 \u043c\u0438\u043d\u0443\u0442\u0430",minutes:function(a){return"\u043f\u0440\u0435\u0434\u0438 "+ Math.round(a)+" \u043c\u0438\u043d\u0443\u0442\u0438"},hour:"\u043f\u0440\u0435\u0434\u0438 1 \u0447\u0430\u0441",hours:function(a){return"\u043f\u0440\u0435\u0434\u0438 "+Math.round(a)+" \u0447\u0430\u0441\u0430"},day:"\u043f\u0440\u0435\u0434\u0438 1 \u0434\u0435\u043d",days:function(a){return"\u043f\u0440\u0435\u0434\u0438 "+Math.round(a)+" \u0434\u043d\u0438"},month:"\u043f\u0440\u0435\u0434\u0438 1 \u043c\u0435\u0441\u0435\u0446",months:function(a){return"\u043f\u0440\u0435\u0434\u0438 "+Math.floor(a/30)+" \u043c\u0435\u0441\u0435\u0446\u0430"},year:"\u043f\u0440\u0435\u0434\u0438 1 \u0433\u043e\u0434\u0438\u043d\u0430",years:function(a){return"\u043f\u0440\u0435\u0434\u0438 "+Math.round(a)+" \u0433\u043e\u0434\u0438\u043d\u0438"}},sk:{second:"pr\u00e1ve teraz",minute:"pred min\u00fatov",minutes:function(a){return"pred "+Math.round(a)+" min\u00fatami"},hour:"pred hodinou",hours:function(a){return"pred "+Math.round(a)+" hodinami"},day:"v\u010dera",days:function(a){return"pred "+Math.round(a)+" d\u0148ami"},month:"pred mesiacom",months:function(a){return"pred "+Math.floor(a/30)+" mesiacmi"},year:"pred rokom",years:function(a){return"pred "+Math.round(a)+" rokmi"}},lo:{second:"\u0ea7\u0eb1\u0ec8\u0e87\u0e81\u0eb5\u0ec9\u0e99\u0eb5\u0ec9",minute:"\u0edc\u0eb6\u0ec8\u0e87\u0e99\u0eb2\u0e97\u0eb5\u0e81\u0ec8\u0ead\u0e99",minutes:function(a){return Math.round(a)+" \u0e99\u0eb2\u0e97\u0eb5\u0e81\u0ec8\u0ead\u0e99"},hour:"\u0edc\u0eb6\u0ec8\u0e87\u0e8a\u0ebb\u0ec8\u0ea7\u0ec2\u0ea1\u0e87\u0e81\u0ec8\u0ead\u0e99",hours:function(a){return Math.round(a)+" \u0ebb\u0ec8\u0ea7\u0ec2\u0ea1\u0e87\u0e81\u0ec8\u0ead\u0e99"},day:"\u0edc\u0eb6\u0ec8\u0e87\u0ea1\u0eb7\u0ec9\u0e81\u0ec8\u0ead\u0e99",days:function(a){return Math.round(a)+" \u0ea1\u0eb7\u0ec9\u0e81\u0ec8\u0ead\u0e99"},month:"\u0edc\u0eb6\u0ec8\u0e87\u0ec0\u0e94\u0eb7\u0ead\u0e99\u0e81\u0ec8\u0ead\u0e99",months:function(a){return Math.floor(a/30)+" \u0ec0\u0e94\u0eb7\u0ead\u0e99\u0e81\u0ec8\u0ead\u0e99"},year:"\u0edc\u0eb6\u0ec8\u0e87\u0e9b\u0eb5\u0e81\u0ec8\u0ead\u0e99",years:function(a){return Math.round(a)+" \u0e9b\u0eb5\u0e81\u0ec8\u0ead\u0e99"}},sl:{second:"pravkar",minute:"pred eno minuto",minutes:function(a){return"pred "+Math.round(a)+" minutami"},hour:"pred eno uro",hours:function(a){return"pred "+Math.round(a)+" urami"},day:"pred enim dnem",days:function(a){return"pred "+Math.round(a)+" dnevi"},month:"pred enim mesecem",months:function(a){return"pred "+Math.floor(a/30)+" meseci"},year:"pred enim letom",years:function(a){return"pred "+Math.round(a)+" leti"}},et:{second:"just n\u00fc\u00fcd",minute:"minut tagasi",minutes:function(a){return Math.round(a)+" minutit tagasi"},hour:"tund tagasi",hours:function(a){return Math.round(a)+" tundi tagasi"},day:"p\u00e4ev tagasi",days:function(a){return Math.round(a)+" p\u00e4eva tagasi"},month:"kuu aega tagasi",months:function(a){return Math.floor(a/30)+" kuud tagasi"},year:"aasta tagasi",years:function(a){return Math.round(a)+" aastat tagasi"}},ja:{second:"\u305f\u3063\u305f\u4eca",minute:"1\u5206\u524d",minutes:function(a){return Math.round(a)+"\u5206\u524d"},hour:"1\u6642\u9593\u524d",hours:function(a){return Math.round(a)+"\u6642\u9593\u524d"},day:"1\u65e5\u524d",days:function(a){return Math.round(a)+"\u65e5\u524d"},month:"1\u30f6\u6708\u524d",months:function(a){return Math.floor(a/30)+"\u30f6\u6708\u524d"},year:"1\u5e74\u524d",years:function(a){return Math.round(a)+"\u5e74\u524d"}}};rpi=rpi||{};rpi.Utils={__:function(a,e){return e&&e[a]||a},isVisible:function(a){return!!(a.offsetWidth||a.offsetHeight||a.getClientRects().length)&&"hidden"!==window.getComputedStyle(a).visibility},isRTL:function(){return"rtl"==(window.getComputedStyle?window.getComputedStyle(document.body,null).getPropertyValue("direction"):document.body.currentStyle.direction)},getParent:function(a,e){e=e||"rplg";if(0>a.className.split(" ").indexOf(e))for(;(a=a.parentElement)&&0>a.className.split(" ").indexOf(e););return a},lang:function(){var a=navigator;return(a.language||a.systemLanguage||a.userLanguage||"en").substr(0,2).toLowerCase()},popup:function(a,e,f){var l=document.documentElement;a=window.open(a,"","scrollbars=yes, width="+e+", height="+f+", top="+((window.innerHeight?window.innerHeight:l.clientHeight?l.clientHeight:screen.height)/2-f/2+(void 0!=window.screenTop?window.screenTop:window.screenY))+", left="+((window.innerWidth?window.innerWidth:l.clientWidth?l.clientWidth:screen.width)/2-e/2+(void 0!=window.screenLeft?window.screenLeft:window.screenX)));window.focus&&a.focus();return a},ajax:function(a,e,f,l){const d=new XMLHttpRequest;d.open(e,a,!0);d.setRequestHeader("Content-Type","application/json");d.onreadystatechange=function(){if((d.readyState===XMLHttpRequest.DONE||d.readyState===d.DONE)&&200===d.status){const m=JSON.parse(d.responseText);"function"===typeof l?l(m):"function"===typeof f&&f(m)}};d.send(f&&"function"!==typeof f?JSON.stringify(f):null)},anchor:function(a,e,f,l,d){const m=[];f.open_link&&m.push("noopener");f.nofollow_link&&m.push("nofollow");return'"+e+""},rm:function(a){a&&a.parentNode&&a.parentNode.removeChild(a)},capit:function(a){return a.charAt(0).toUpperCase()+a.slice(1)},clear:function(){this.rm(document.getElementById("rpi-style"));if(rpi.Instances)for(;rpi.Instances.length;)rpi.Instances.pop().clear()}};rpi=rpi||{};rpi.Column=function(a,e,f){const l=a.getAttribute("data-id"),d=new RegExp(f.col+"-[xsml]+"),m=new RegExp('$|(\\[data-id="'+l+'"\\]\\s+.'+f.card+"\\s*{\\s*--col:\\s*\\d+\\s*!important\\s*;?(\\s*--gap:\\s*\\d+\\s*!important;?)?})"),h=a.getElementsByClassName(f.cnt)[0];var n=null;return n={init:function(g,p){rpi.Utils.isVisible(h)?(g&&g(),n.resize(),window.addEventListener("resize",n.resize),p&&p(),rpi.Instances=rpi.Instances||[],rpi.Instances.push(n)):setTimeout(n.init,300)},resize:function(){let g=n.getSize();h.className=h.className.replace(d,f.col+"-"+g);if(e.breakpoints){let p=h.offsetWidth,c=e.breakpoints.split(",");c.sort(n.brsort);for(let r=0;rg?"xs":750>g?"x":1100>g?"s":1450>g?"m":1800>g?"l":"xl"},setCol:function(g){const p=this.getStyle();p.innerHTML=p.innerHTML.replace(m,(l?'[data-id="'+l+'"] ':"")+"."+f.card+"{--col:"+g+"!important;--gap:"+(g- 1)+"!important}")},getCol:function(){let g=this.getStyle().innerHTML.match(/--col:\s*(\d+)/);return g&&1parseInt(p.split(":")[0])?1:-1},clear:function(){window.removeEventListener("resize",n.resize)}}};rpi=rpi||{};rpi.Common=function(a,e,f){var l=null;return l={init:function(){var d=a.getElementsByClassName(f.time);let m=a.getElementsByClassName(f.text);for(var h=0;hh){var n=d.substring(0,h).indexOf(" ")+1;if(1>n||h-n>h/2)n=h;var g=h="";0... '+rpi.Utils.__("read more",e.trans)+"":"")}return d},opentext:function(){let d=this.parentNode,m=this.previousSibling,h=this.previousSibling.previousSibling,n=decodeURIComponent(m.value);rpi.Utils.rm(m);rpi.Utils.rm(h);rpi.Utils.rm(this);d.innerHTML+=n}}};rpi=rpi||{};rpi.Media=function(a,e,{root:f="rpi",card:l="rpi-card"}={}){var d=null,m=null;return m={init:function(){d=a.getElementsByClassName("rpi-thumb");for(let h=0;hn||n>=d.length)){var g=document.querySelector(".rpi-lightbox"),p=h.src.replace(/=s[0-9]{1,3}/g,"=s500");h=rpi.Utils.getParent(h,l).outerHTML;if(g){let c=g.querySelector(".rpi-lightbox-media img"),r=g.querySelector(".rpi-lightbox-review"),t=g.querySelector(".rpi-lightbox-prev");next=g.querySelector(".rpi-lightbox-next");c.src=p;r.innerHTML!==h&&(r.innerHTML=h,m.clicks(r));t.onclick=function(w){m.show(d[n-1],n-1)};next.onclick=function(w){m.show(d[n+1],n+1)}}else g=document.createElement("div"),g.className="rpi-lightbox",g.innerHTML='
'+h+"
",p=g.querySelector(".rpi-x"),h=g.querySelector(".rpi-lightbox-prev"),next=g.querySelector(".rpi-lightbox-next"),p.onclick=function(){g.style.display="none"},g.onclick=function(c){g==c.target&&(g.style.display="none")},h.onclick=function(c){m.show(d[n-1],n-1)},next.onclick=function(c){m.show(d[n+1],n+1)},m.clicks(g),document.body.appendChild(g);g.style.display="flex"}}}};rpi=rpi||{};rpi.Slider=function(a,e,f,l){a.getAttribute("data-id");const d=a.getElementsByClassName(f.cnt)[0],m=a.getElementsByClassName(f.content)[0],h=m?m.getElementsByClassName(f.cards)[0]:null,n=m?m.getElementsByClassName(f.dotsWrap)[0]:null,g=m?m.getElementsByClassName(f.dots)[0]:null,p=h?parseInt(h.getAttribute("data-count")):0;var c=null,r=m?m.getElementsByClassName(f.card):null,t="",w="",z=null,x=null,v=null,A=null,B=!1,y=!1,C=0,D=0;return c={init:function(b,k){rpi.Utils.isVisible(d)?(b&&b(),c.resize(),c.actions(),r.length&&c.swipeAutoStart(),k&&k(),rpi.Instances=rpi.Instances||[],rpi.Instances.push(c)):setTimeout(c.init,300)},resize:function(b){let k=l.column.resize(),q=l.column.getCol();b&&h.scrollLeft!=b*c.reviewWidth()&&h.scrollTo(r[b].offsetLeft,0);!r.length||t==k&&w==q||(c.hasDots()&&(c.dotsInit(),c.dotSwipe(b,!0)),t=k,w=q)},actions:function(){e.mousestop&&c.addMouseEvents();window.addEventListener("resize",c.resizeListener);h&&(h.addEventListener("scroll",c.scrollListener,!1),e.wheelscroll&&m.addEventListener("wheel",c.wheelListener,!1));var b=d.getElementsByClassName(f.btnPrev)[0];b&&(b.onclick=function(k){c.btnClick(-1)});if(b=d.getElementsByClassName(f.btnNext)[0])b.onclick=function(k){c.btnClick(1)}},resizeListener:function(){var b=D;clearTimeout(z);z=setTimeout(c.resize,150,b)},scrollListener:function(){clearTimeout(x);clearTimeout(v);v=setTimeout(c.scrollEnd,150)},wheelListener:function(b){var k=b.target;if((k=-1k.clientHeight)return!0;b.preventDefault();C++;clearTimeout(A);A=setTimeout(c.wheelEnd,150,b)},addMouseEvents:function(){d.addEventListener("mouseover",c.mouseOver,!1);d.addEventListener("mouseleave",c.mouseLeave,!1)},delMouseEvents:function(){d.removeEventListener("mouseover",c.mouseOver);d.removeEventListener("mouseleave",c.mouseLeave)},mouseOver:function(){B=1;c.swipeAutoStop()},mouseLeave:function(){B=0;c.swipeAutoStart()},btnClick:function(b){c.swipeManual(b*c.swipePerBtn())},wheelEnd:function(b){c.swipeManual(Math.sign(b.wheelDelta)*C*c.swipeStep());C=0},scrollEnd:function(){D=c.reviewsIdx();y?y=!1:c.loadNextReviews();(!e.mousestop||B)&&e.mousestop||(!e.clickstop||y)&&e.clickstop||c.swipeAutoStart();c.hasDots()&&c.dotSwipe(void 0,!0)},loadNextReviews:function(b){b=b?c.reviewsIdx()+parseInt(b):c.hasDots()?(b=g.getElementsByClassName("active")[0])?parseInt(b.getAttribute("data-index"))*c.swipePerDot():c.reviewsIdx():c.reviewsIdx();b=c.getAjaxSize(b);0q){let E=b-q;Math.abs(E)<3*c.swipePerDot()?k=u:E&&(k=Math.ceil(b/u)*u-q)}b=q+k-p;return 0b?0:b>=g.childNodes.length?g.childNodes.length-1:b;b=g.querySelector("."+f.dot+'[data-index="'+b+'"]');let q=g.getElementsByClassName("active")[0];c.dotActivate(q,b);c.dotScroll(b,k)},dotScroll:function(b,k){let q=Math.round(g.scrollWidth/g.childNodes.length),u=Math.floor(Math.round(g.offsetWidth/q)/2);k?g.scrollTo(b.offsetLeft-u*q,0):g.scrollTo({left:b.offsetLeft-u*q,behavior:"smooth"})},dotActivate:function(b,k){b&&(b.classList.remove("active"),b.classList.remove("s1"),b.previousSibling&&(b.previousSibling.classList.remove("s2"),b.previousSibling.previousSibling&&b.previousSibling.previousSibling.classList.remove("s3")),b.nextSibling&&(b.nextSibling.classList.remove("s2"),b.nextSibling.nextSibling&&b.nextSibling.nextSibling.classList.remove("s3")));k&&(k.classList.add("active"),k.classList.add("s1"),k.previousSibling&&(k.previousSibling.classList.add("s2"),k.previousSibling.previousSibling&&k.previousSibling.previousSibling.classList.add("s3")),k.nextSibling&&(k.nextSibling.classList.add("s2"),k.nextSibling.nextSibling&&k.nextSibling.nextSibling.classList.add("s3")))},swipeManual:function(b){y=!0;c.loadNextReviews(b);c.scroll(b);e.clickstop&&(c.swipeAutoStop(),c.delMouseEvents())},swipeAuto:function(){if(c.isScrollEnd())c.scroll(-(p-c.reviewsPerView()));else{let b=c.swipeStep()k?0:k>=r.length?r.length-1:k;-1Math.abs(b.left-k.left)||b.left<=k.left)&&k.leftMath.abs(b.right-k.right)||b.right>=k.right)&&k.right>b.left},swipeStep:function(){return e.swipe_step||c.reviewsPerView()},swipePerBtn:function(){return e.swipe_per_btn||c.reviewsPerView()},swipePerDot:function(){return e.swipe_per_dot||c.reviewsPerView()},reviewWidth:function(){return Math.round(h.scrollWidth/r.length)},reviewHeight:function(){return r[0].offsetHeight},reviewsPerView:function(){return Math.round(h.offsetWidth/c.reviewWidth())},reviewsIdx:function(){let b=rpi.Utils.isRTL()?-h.scrollLeft:h.scrollLeft;return Math.round(b/c.reviewWidth())},reviewsAhead:function(){return r.length-(c.reviewsIdx()+c.reviewsPerView())},hasDots:function(){return g&&!e.hide_dots&&0reviews.length&&f.removeChild(this);return!1}function rplg_leave_review_window(){rpi.Utils.popup(this.getAttribute("href"),620,500);return!1} function grw_init(a,e){a=rpi.Utils.getParent(a,"wp-gr");if("true"!=a.getAttribute("data-exec")){a.setAttribute("data-exec","true");var f=JSON.parse(a.getAttribute("data-options"));rpi.Common(a,f,{time:"wp-google-time",text:"wp-google-text",readmore:"wp-more-toggle"}).init();rpi.Media(a,{},{root:"wp-gr",card:"grw-review"}).init();!a.getElementsByClassName("grw-review")[0]||"slider"!=e&&"grid"!=e||(e=a.getElementsByClassName("grw-row")[0],e=JSON.parse(e.getAttribute("data-options")),f=rpi.Column(a,e,{cnt:"grw-row",col:"grw-row",card:"grw-review"}),rpi.Slider(a,e,{cnt:"grw-row",col:"grw-row",content:"grw-content",cards:"grw-reviews",card:"grw-review",text:"wp-google-text",btnPrev:"grw-prev",btnNext:"grw-next",dotsWrap:"rpi-dots-wrap",dots:"rpi-dots",dot:"rpi-dot"},{column:f}).init())}}document.addEventListener("DOMContentLoaded",function(){const a=document.querySelectorAll('.wp-gr[data-exec="false"]');for(let f=0;f{function e(e,t){t=t||{bubbles:!1,cancelable:!1,detail:void 0};var a=document.createEvent("CustomEvent");return a.initCustomEvent(e,t.bubbles,t.cancelable,t.detail),a}"function"!=typeof window.CustomEvent&&(e.prototype=window.Event.prototype,window.CustomEvent=e)})(),function(e,t){t=new CustomEvent(t,2e.offsetHeight+100?t.style.display="block":t.style.display="none":300{for(var e,t,a,n,s,r=document.querySelectorAll(".main-header-menu-toggle"),o={},l=function(){var e=document.querySelector("body").style.overflow,t=(document.querySelector("body").style.overflow="hidden",window.innerWidth),a=(document.querySelector("body").style.overflow=e,astra.break_point),n=document.querySelectorAll(".main-header-bar-wrap");if(0 .menu-link, .ast-header-break-point ul.main-header-menu .ast-menu-toggle"):e[a].querySelectorAll("ul.main-header-menu .ast-menu-toggle")).length)for(var n=0;n{if(e){var t=e.getElementsByTagName("button")[0];if(void 0!==t||void 0!==(t=e.getElementsByTagName("a")[0])){var a=e.getElementsByTagName("ul")[0];if(void 0===a)t.style.display="none";else{a.setAttribute("aria-expanded","false"),-1===a.className.indexOf("nav-menu")&&(a.className+=" nav-menu"),t.onclick=function(){-1!==e.className.indexOf("toggled")?(e.className=e.className.replace(" toggled",""),t.setAttribute("aria-expanded","false"),a.setAttribute("aria-expanded","false")):(e.className+=" toggled",t.setAttribute("aria-expanded","true"),a.setAttribute("aria-expanded","true"))};for(var n=a.getElementsByTagName("a"),s=a.getElementsByTagName("ul"),o=0,r=s.length;o{e.addEventListener("focus",function(e){var t=this.parentNode.parentNode.parentNode.querySelector(".ast-search-menu-icon");astraToggleClass(t,"ast-dropdown-active")}),e.addEventListener("blur",function(e){var t=this.parentNode.parentNode.parentNode.querySelector(".ast-search-menu-icon");t.classList.remove("ast-dropdown-active"),astraToggleClass(t,"ast-dropdown-active")})}),document.body.onclick=function(e){if(void 0!==e.target.classList&&!e.target.classList.contains("ast-search-menu-icon")&&0===astraGetParents(e.target,".ast-search-menu-icon").length&&0===astraGetParents(e.target,".ast-search-icon").length)for(var t=document.getElementsByClassName("ast-search-menu-icon"),a=0;a{let t=0;for(;e;)t+=e.offsetTop,e=e.offsetParent;return t},e=e=>{let t=0;var a=document.querySelector(".site-header");a&&(0<(a=a.querySelectorAll("div[data-stick-support]")).length?a.forEach(e=>t+=e.clientHeight):"undefined"==typeof astraAddon||Number(astraAddon.sticky_hide_on_scroll)||(a=document.querySelector("#ast-fixed-header"))&&(t=a?.clientHeight,Number(astraAddon?.header_main_shrink))&&(a?.querySelectorAll(".ast-above-header-wrap, .ast-below-header-wrap"))?.forEach(()=>t-=10),a=e.target.closest("a").hash)&&(a=(a=document.querySelector(a))&&s(a)-t)&&astraSmoothScroll(e,a)},t=[];var h=document.querySelectorAll('a[href*="#"]:not([href="#"]):not([href="#0"]):not([href*="uagb-tab"]):not(.uagb-toc-link__trigger):not(.skip-link):not(.nav-links a):not([href*="tab-"])');if(h)for(var v of h)v.href.split("#")[0]!==location.href.split("#")[0]?t.push({hash:v.hash,url:v.href.split("#")[0]}):""!==v.hash&&v.addEventListener("click",e);window.addEventListener("DOMContentLoaded",e=>{for(var a of t)if(window.location.href.split("#")[0]===a.url){var n=document.querySelector(".site-header");let t=0;(n=n.querySelectorAll("div[data-stick-support]"))&&n.forEach(e=>{t+=e.clientHeight}),(n=document.querySelector(a.hash))&&(a=s(n)-t)&&astraSmoothScroll(e,a)}})}astra.is_scroll_to_top&&(n=document.querySelector("#page header"),s=document.getElementById("ast-scroll-top"),astScrollToTopHandler(n,s),window.addEventListener("scroll",function(){astScrollToTopHandler(n,s)}),s.onclick=function(e){astraSmoothScroll(e,0)})})(); /*! * jQuery blockUI plugin * Version 2.70.0-2014.11.23 * Requires jQuery v1.7 or later * * Examples at: http://malsup.com/jquery/block/ * Copyright (c) 2007-2013 M. Alsup * Dual licensed under the MIT and GPL licenses: * http://www.opensource.org/licenses/mit-license.php * http://www.gnu.org/licenses/gpl.html * * Thanks to Amir-Hossein Sobhi for some excellent contributions! */ !function(){"use strict";function e(p){p.fn._fadeIn=p.fn.fadeIn;var b=p.noop||function(){},h=/MSIE/.test(navigator.userAgent),k=/MSIE 6.0/.test(navigator.userAgent)&&!/MSIE 8.0/.test(navigator.userAgent),y=(document.documentMode,"function"==typeof document.createElement("div").style.setExpression&&document.createElement("div").style.setExpression),m=(p.blockUI=function(e){o(window,e)},p.unblockUI=function(e){v(window,e)},p.growlUI=function(e,t,o,n){var i=p('
'),s=(e&&i.append("

"+e+"

"),t&&i.append("

"+t+"

"),o===undefined&&(o=3e3),function(e){p.blockUI({message:i,fadeIn:"undefined"!=typeof(e=e||{}).fadeIn?e.fadeIn:700,fadeOut:"undefined"!=typeof e.fadeOut?e.fadeOut:1e3,timeout:"undefined"!=typeof e.timeout?e.timeout:o,centerY:!1,showOverlay:!1,onUnblock:n,css:p.blockUI.defaults.growlCSS})});s(),i.css("opacity");i.on("mouseover",function(){s({fadeIn:0,timeout:3e4});var e=p(".blockMsg");e.stop(),e.fadeTo(300,1)}).on("mouseout",function(){p(".blockMsg").fadeOut(1e3)})},p.fn.block=function(e){var t;return this[0]===window?(p.blockUI(e),this):(t=p.extend({},p.blockUI.defaults,e||{}),this.each(function(){var e=p(this);t.ignoreIfBlocked&&e.data("blockUI.isBlocked")||e.unblock({fadeOut:0})}),this.each(function(){"static"==p.css(this,"position")&&(this.style.position="relative",p(this).data("blockUI.static",!0)),this.style.zoom=1,o(this,e)}))},p.fn.unblock=function(e){return this[0]===window?(p.unblockUI(e),this):this.each(function(){v(this,e)})},p.blockUI.version=2.7,p.blockUI.defaults={message:"

Please wait...

",title:null,draggable:!0,theme:!1,css:{padding:0,margin:0,width:"30%",top:"40%",left:"35%",textAlign:"center",color:"#000",border:"3px solid #aaa",backgroundColor:"#fff",cursor:"wait"},themedCSS:{width:"30%",top:"40%",left:"35%"},overlayCSS:{backgroundColor:"#000",opacity:.6,cursor:"wait"},cursorReset:"default",growlCSS:{width:"350px",top:"10px",left:"",right:"10px",border:"none",padding:"5px",opacity:.6,cursor:"default",color:"#fff",backgroundColor:"#000","-webkit-border-radius":"10px","-moz-border-radius":"10px","border-radius":"10px"},iframeSrc:/^https/i.test(window.location.href||"")?"javascript:false":"about:blank",forceIframe:!1,baseZ:1e3,centerX:!0,centerY:!0,allowBodyStretch:!0,bindEvents:!0,constrainTabKey:!0,fadeIn:200,fadeOut:400,timeout:0,showOverlay:!0,focusInput:!0,focusableElements:":input:enabled:visible",onBlock:null,onUnblock:null,onOverlayClick:null,quirksmodeOffsetHack:4,blockMsgClass:"blockMsg",ignoreIfBlocked:!1},null),g=[];function o(e,o){var n=e==window,t=o&&o.message!==undefined?o.message:undefined;if(!(o=p.extend({},p.blockUI.defaults,o||{})).ignoreIfBlocked||!p(e).data("blockUI.isBlocked")){o.overlayCSS=p.extend({},p.blockUI.defaults.overlayCSS,o.overlayCSS||{}),f=p.extend({},p.blockUI.defaults.css,o.css||{}),o.onOverlayClick&&(o.overlayCSS.cursor="pointer"),u=p.extend({},p.blockUI.defaults.themedCSS,o.themedCSS||{}),t=t===undefined?o.message:t,n&&m&&v(window,{fadeOut:0}),t&&"string"!=typeof t&&(t.parentNode||t.jquery)&&(l=t.jquery?t[0]:t,d={},p(e).data("blockUI.history",d),d.el=l,d.parent=l.parentNode,d.display=l.style.display,d.position=l.style.position,d.parent&&d.parent.removeChild(l)),p(e).data("blockUI.onUnblock",o.onUnblock);var i,s,l=o.baseZ,d=h||o.forceIframe?p(''):p(''),a=o.theme?p(''):p(''),c=(o.theme&&n?(c=''):o.theme?(c=''):c=n?'':'',l=p(c),t&&(o.theme?(l.css(u),l.addClass("ui-widget-content")):l.css(f)),o.theme||a.css(o.overlayCSS),a.css("position",n?"fixed":"absolute"),(h||o.forceIframe)&&d.css("opacity",0),[d,a,l]),r=p(n?"body":e),u=(p.each(c,function(){this.appendTo(r)}),o.theme&&o.draggable&&p.fn.draggable&&l.draggable({handle:".ui-dialog-titlebar",cancel:"li"}),y&&(!p.support.boxModel||0 .blockUI"):s.find(">.blockUI"),t.cursorReset&&(1'+wc_add_to_cart_params.i18n_view_cart+""),d(document.body).trigger("wc_cart_button_updated",[r]))},t.prototype.updateFragments=function(t,a){a&&(d.each(a,function(t){d(t).addClass("updating").fadeTo("400","0.6").block({message:null,overlayCSS:{opacity:.6}})}),d.each(a,function(t,a){d(t).replaceWith(a),d(t).stop(!0).css("opacity","1").unblock()}),d(document.body).trigger("wc_fragments_loaded"))},new t}); /*! * JavaScript Cookie v2.1.4 * https://github.com/js-cookie/js-cookie * * Copyright 2006, 2015 Klaus Hartl & Fagner Brack * Released under the MIT license */ !function(e){var n,o,t=!1;"function"==typeof define&&define.amd&&(define(e),t=!0),"object"==typeof exports&&(module.exports=e(),t=!0),t||(n=window.Cookies,(o=window.Cookies=e()).noConflict=function(){return window.Cookies=n,o})}(function(){function m(){for(var e=0,n={};e'),s(".woocommerce form input").filter(":password").parent("span").addClass("password-input"),s(".password-input").append(''),s(".show-password-input").on("click",function(){s(this).hasClass("display-password")?s(this).removeClass("display-password"):s(this).addClass("display-password"),s(this).hasClass("display-password")?s(this).siblings(['input[type="password"]']).prop("type","text"):s(this).siblings('input[type="text"]').prop("type","password")})}); jQuery(function(r){if("undefined"==typeof wc_cart_fragments_params)return!1;var t=!0,o=wc_cart_fragments_params.cart_hash_key;try{t="sessionStorage"in window&&null!==window.sessionStorage,window.sessionStorage.setItem("wc","test"),window.sessionStorage.removeItem("wc"),window.localStorage.setItem("wc","test"),window.localStorage.removeItem("wc")}catch(f){t=!1}function a(){t&&sessionStorage.setItem("wc_cart_created",(new Date).getTime())}function s(e){t&&(localStorage.setItem(o,e),sessionStorage.setItem(o,e))}var e={url:wc_cart_fragments_params.wc_ajax_url.toString().replace("%%endpoint%%","get_refreshed_fragments"),type:"POST",data:{time:(new Date).getTime()},timeout:wc_cart_fragments_params.request_timeout,success:function(e){e&&e.fragments&&(r.each(e.fragments,function(e,t){r(e).replaceWith(t)}),t&&(sessionStorage.setItem(wc_cart_fragments_params.fragment_name,JSON.stringify(e.fragments)),s(e.cart_hash),e.cart_hash&&a()),r(document.body).trigger("wc_fragments_refreshed"))},error:function(){r(document.body).trigger("wc_fragments_ajax_error")}};function n(){r.ajax(e)}if(t){var i=null;r(document.body).on("wc_fragment_refresh updated_wc_div",function(){n()}),r(document.body).on("added_to_cart removed_from_cart",function(e,t,r){var n=sessionStorage.getItem(o);null!==n&&n!==undefined&&""!==n||a(),sessionStorage.setItem(wc_cart_fragments_params.fragment_name,JSON.stringify(t)),s(r)}),r(document.body).on("wc_fragments_refreshed",function(){clearTimeout(i),i=setTimeout(n,864e5)}),r(window).on("storage onstorage",function(e){o===e.originalEvent.key&&localStorage.getItem(o)!==sessionStorage.getItem(o)&&n()}),r(window).on("pageshow",function(e){e.originalEvent.persisted&&(r(".widget_shopping_cart_content").empty(),r(document.body).trigger("wc_fragment_refresh"))});try{var c=JSON.parse(sessionStorage.getItem(wc_cart_fragments_params.fragment_name)),_=sessionStorage.getItem(o),g=Cookies.get("woocommerce_cart_hash"),m=sessionStorage.getItem("wc_cart_created");if(null!==_&&_!==undefined&&""!==_||(_=""),null!==g&&g!==undefined&&""!==g||(g=""),_&&(null===m||m===undefined||""===m))throw"No cart_created";if(m){var d=+m+864e5,w=(new Date).getTime();if(d{d={$div:null,settings:null,store:null,chatbox:!1,showed_at:0,is_ready:!1,is_mobile:/Mobile|Android|iPhone|iPad/i.test(navigator.userAgent),can_qr:c.QrCreator&&"function"==typeof QrCreator.render,...d},(c.joinchat_obj=d).$=function(t){return this.$div.querySelector(t)},d.$$=function(t){return this.$div.querySelectorAll(t)},d.send_event=function(n){if((n={event_category:"JoinChat",event_label:"",event_action:"",chat_channel:"whatsapp",chat_id:"--",is_mobile:this.is_mobile?"yes":"no",page_location:location.href,page_title:r.title||"no title",...n}).event_label=n.event_label||n.link||"",n.event_action=n.event_action||n.chat_channel+": "+n.chat_id,delete n.link,r.dispatchEvent(new CustomEvent("joinchat:event",{detail:n,cancelable:!0}))){let t=c[this.settings.data_layer]||c[c.gtm4wp_datalayer_name]||c.dataLayer;if("object"==typeof t){"undefined"==typeof gtag&&(c.gtag=function(){t.push(arguments)});let e=this.settings.ga_event||"generate_lead",s={transport_type:"beacon",...n},a=(Object.keys(s).forEach(t=>{"page_location"===t?s[t]=s[t].substring(0,1e3):"page_referrer"===t?s[t]=s[t].substring(0,420):"page_title"===t?s[t]=s[t].substring(0,300):"string"==typeof s[t]&&(s[t]=s[t].substring(0,100))}),[]),i=t=>{a.includes(t)||(t.startsWith("G-")||t.startsWith("GT-"))&&(a.push(t),gtag("event",e,{send_to:t,...s}))};if(c.google_tag_data&&google_tag_data.tidr&&google_tag_data.tidr.destination)for(var o in google_tag_data.tidr.destination)i(o);t.forEach(t=>{"config"===t[0]&&t[1]&&i(t[1])}),this.settings.gads&>ag("event","conversion",{send_to:this.settings.gads})}var e=n.event_category;delete n.event_category,"object"==typeof t&&t.push({event:e,...n}),"function"==typeof fbq&&fbq("trackCustom",e,n)}},d.get_wa_link=function(t,e,s){e=void 0!==e?e:this.settings.message_send||"",s=void 0!==s?s:this.settings.whatsapp_web&&!this.is_mobile;s=new URL((s?"https://web.whatsapp.com/send?phone=":"https://wa.me/")+(t||this.settings.telephone));return e&&s.searchParams.set("text",e),s.toString()},d.show=function(t){this.$div.removeAttribute("hidden"),this.$div.classList.add("joinchat--show"),t&&this.$div.classList.add("joinchat--tooltip")},d.hide=function(){this.$div.classList.remove("joinchat--show")},d.chatbox_show=function(){this.chatbox||(this.chatbox=!0,this.showed_at=Date.now(),this.$div.classList.add("joinchat--chatbox"),this.settings.message_badge&&this.$(".joinchat__badge").classList.replace("joinchat__badge--in","joinchat__badge--out"),r.dispatchEvent(new Event("joinchat:show")))},d.chatbox_hide=function(){this.chatbox&&(this.chatbox=!1,this.$div.classList.remove("joinchat--chatbox","joinchat--tooltip"),this.settings.message_badge&&this.$(".joinchat__badge").classList.remove("joinchat__badge--out"),r.dispatchEvent(new Event("joinchat:hide")))},d.save_hash=function(){var t;!this.settings.message_hash||this.settings.message_delay<0||(t=(this.store.getItem("joinchat_hashes")||"").split(",").filter(Boolean)).includes(this.settings.message_hash)||(t.push(this.settings.message_hash),this.store.setItem("joinchat_hashes",t.join(",")))},d.open_whatsapp=function(t,e){t=t||this.settings.telephone,e=void 0!==e?e:this.settings.message_send||"";t={link:this.get_wa_link(t,e),chat_channel:"whatsapp",chat_id:t,chat_message:e};r.dispatchEvent(new CustomEvent("joinchat:open",{detail:t,cancelable:!0}))&&(this.send_event(t),c.open(t.link,"joinchat","noopener"))},d.need_optin=function(){return this.$div.classList.contains("joinchat--optout")},d.use_qr=function(){return!!this.settings.qr&&this.can_qr&&!this.is_mobile},d.open=function(t,e,s){t&&!this.need_optin()||!d.$(".joinchat__chatbox")?Date.now(){var e=t.children;t.replaceWith(e[Math.floor(Math.random()*e.length)].innerHTML)})},d.qr=function(t,e){var s=r.createElement("CANVAS");return QrCreator.render(Object.assign({text:t,radius:.4,background:"#FFF",size:200*(c.devicePixelRatio||1)},this.settings.qr||{},e||{}),s),s};var t=()=>{if(d.$div=r.querySelector(".joinchat"),d.$div){d.settings=JSON.parse(d.$div.dataset.settings);try{localStorage.test=2,d.store=localStorage}catch(t){d.store={_data:{},setItem:function(t,e){this._data[t]=String(e)},getItem:function(t){return this._data.hasOwnProperty(t)?this._data[t]:null}}}if(d.settings&&d.settings.telephone){if(d.is_mobile||!d.settings.mobile_only){r.dispatchEvent(new Event("joinchat:starting"));var i=1e3*d.settings.button_delay,n=Math.max(0,1e3*d.settings.message_delay);let t=!!d.settings.message_hash;var o=parseInt(d.store.getItem("joinchat_views")||1)>=d.settings.message_views,h=(d.store.getItem("joinchat_hashes")||"").split(",").filter(Boolean);let s=void 0!==d.settings.cta_viewed?d.settings.cta_viewed:-1!==h.indexOf(d.settings.message_hash||"none"),e=!s&&(d.settings.message_badge||!t||!n||!o),a=(setTimeout(()=>d.show(e),i),()=>d.open());if(t&&!s&&n){let t;d.settings.message_badge?t=setTimeout(()=>d.$(".joinchat__badge").classList.add("joinchat__badge--in"),i+n):o&&(t=setTimeout(a,i+n)),r.addEventListener("joinchat:show",()=>clearTimeout(t),{once:!0})}if(h=d.$(".joinchat__button"),!d.is_mobile){let t;h.addEventListener("mouseenter",()=>{d.$(".joinchat__chatbox")&&(t=setTimeout(a,1500))}),h.addEventListener("mouseleave",()=>{clearTimeout(t)})}if(h.addEventListener("click",a),d.$(".joinchat__open")?.addEventListener("click",()=>d.open(!0)),d.$(".joinchat__close")?.addEventListener("click",()=>d.close()),d.$("#joinchat_optin")?.addEventListener("change",t=>d.$div.classList.toggle("joinchat--optout",!t.target.checked)),d.$(".joinchat__scroll")?.addEventListener("wheel",function(t){t.preventDefault(),this.scrollTop+=t.deltaY},{passive:!1}),d.is_mobile){let e,t,s=()=>{var t=(r.activeElement.type||"").toLowerCase();["date","datetime","email","month","number","password","search","tel","text","textarea","time","url","week"].includes(t)?d.chatbox?(d.chatbox_hide(),setTimeout(()=>d.hide(),400)):d.hide():d.show()};["focusin","focusout"].forEach(t=>r.addEventListener(t,t=>{t.target.matches("input, textarea")&&!d.$div.contains(t.target)&&(clearTimeout(e),e=setTimeout(s,200))})),c.addEventListener("resize",()=>{clearTimeout(t),t=setTimeout(()=>{d.$div.style.setProperty("--vh",c.innerHeight+"px")},200)}),c.dispatchEvent(new Event("resize"))}if(d.use_qr()?d.$(".joinchat__qr").appendChild(d.qr(d.get_wa_link(void 0,void 0,!1))):d.$(".joinchat__qr")?.remove(),n&&!o&&d.store.setItem("joinchat_views",parseInt(d.store.getItem("joinchat_views")||0)+1),r.addEventListener("joinchat:show",()=>{let s=d.$(".joinchat__scroll"),e=d.$(".joinchat__chat"),a=d.$$(".joinchat__bubble");if(!e)return;if(t&&d.rand_text(e),a.length<=1||c.matchMedia("(prefers-reduced-motion)").matches)return void setTimeout(()=>e.dispatchEvent(new Event("joinchat:bubbles")),1);a.forEach(t=>t.classList.add("joinchat--hidden")),d.$(".joinchat__optin")?.classList.add("joinchat--hidden");let i=0,n=(t,e)=>Math.round(Math.random()*(e-t)+t),o=(t,e)=>{d.$(".joinchat__bubble--loading")?.remove(),t.classList.remove("joinchat--hidden"),s.scrollTop=s.scrollHeight,setTimeout(h,e)},h=()=>{if(i>=a.length)d.$(".joinchat__optin")?.classList.remove("joinchat--hidden"),e.dispatchEvent(new Event("joinchat:bubbles"));else{let t=a[i++];t.classList.contains("joinchat__bubble--note")?o(t,100):(e.insertAdjacentHTML("beforeend",'
'),s.scrollTop=s.scrollHeight,setTimeout(()=>o(t,n(400,600)),60*t.textContent.split(/\s+/).length+n(100,200)))}};h()},{once:!0}),"#joinchat"!==(i=new URL(c.location)).hash&&!i.searchParams.has("joinchat")||(h=1e3*(parseInt(i.searchParams.get("joinchat"))||0),setTimeout(()=>d.show(),h),setTimeout(()=>d.chatbox_show(),700+h)),r.addEventListener("click",t=>{var e;t.target.closest('.joinchat_open, .joinchat_app, a[href="#joinchat"], a[href="#whatsapp"]')&&(t.preventDefault(),e=!!t.target.closest('.joinchat_app, a[href="#whatsapp"]'),d.open(e,t.target.dataset.phone,t.target.dataset.message))}),r.addEventListener("click",t=>{t.target.closest(".joinchat_close")&&(t.preventDefault(),d.close())}),n=r.querySelectorAll(".joinchat_show, .joinchat_force_show"),t&&n&&"IntersectionObserver"in c){let e=new IntersectionObserver(t=>{t.forEach(t=>{t.intersectionRatio<=0||s&&!t.target.classList.contains("joinchat_force_show")||(e.disconnect(),a())})});n.forEach(t=>e.observe(t))}d.is_ready=!0,r.dispatchEvent(new Event("joinchat:start"))}else d.hide(),r.addEventListener("click",t=>{t.target.closest('.joinchat_open, .joinchat_app, a[href="#joinchat"], a[href="#whatsapp"]')&&(t.preventDefault(),d.open_whatsapp(t.target.dataset.phone,t.target.dataset.message))});if(d.can_qr&&!d.is_mobile?r.querySelectorAll(".joinchat-button__qr").forEach(t=>t.appendChild(d.qr(d.get_wa_link(t.dataset.phone,t.dataset.message,!1)))):r.querySelectorAll(".wp-block-joinchat-button figure").forEach(t=>t.remove()),void 0!==d.settings.sku&&"function"==typeof jQuery){let a=d.settings.message_send;jQuery("form.variations_form").on("found_variation reset_data",function(t,e){let s=e&&e.sku||d.settings.sku;d.$$(".joinchat__chat jc-sku").forEach(t=>t.textContent=s),d.settings.message_send=a.replace(/.*<\/jc-sku>/g,s)})}}}};"loading"!==r.readyState?t():r.addEventListener("DOMContentLoaded",t)})(window,document,window.joinchat_obj||{}); (()=>{class t extends HTMLElement{static get observedAttributes(){return["title","description","retryButtonText"]}connectedCallback(){this.build()}attributeChangedCallback(){this.firstElementChild&&(this.removeChild(this.firstElementChild),this.build())}build(){const t=this.createAlertDetails(),e=this.createCardContent();t.appendChild(e),this.appendChild(t)}createAlertDetails(){const t=document.createElement("div");return t.classList.add("mp-alert-details-card"),t}createCardContent(){const t=document.createElement("div");t.classList.add("mp-alert-details-card-content");const e=document.createElement("div");e.classList.add("mp-alert-details-card-content-left");const i=document.createElement("div");i.classList.add("mp-alert-details-card-content-right"),t.appendChild(e),t.appendChild(i);const n=this.createBadge(),s=this.createTitle(),a=this.createDescription(),r=this.createRetryButton();return e.appendChild(n),i.appendChild(s),i.appendChild(a),i.appendChild(r),t}createBadge(){const t=document.createElement("div");return t.innerHTML="!",t.classList.add("mp-alert-details-badge"),t}createTitle(){const t=document.createElement("p");return t.innerHTML=this.getAttribute("title"),t.classList.add("mp-alert-details-title"),t}createDescription(){const t=document.createElement("p");return t.innerHTML=this.getAttribute("description"),t.classList.add("mp-alert-details-description"),t}createRetryButton(){const t=this.getAttribute("retryButtonText"),e=document.createElement("button");return e.classList.add("mp-alert-details-retry-button"),e.innerHTML=t,e.onclick=()=>document.location.reload(),e}}customElements.define("alert-details",t)})(),(()=>{class t extends HTMLElement{connectedCallback(){this.build()}build(){this.appendChild(this.createContainer())}createContainer(){const t=document.createElement("div");return t.classList.add("mp-checkout-benefits-container"),t.appendChild(this.createTitle()),t.appendChild(this.createList()),t}createTitle(){const t=document.createElement("p");t.classList.add("mp-checkout-benefits-title"),t.innerHTML=this.getAttribute("title");const e=this.getAttribute("title-align");return"center"===e&&t.style.setProperty("text-align","center","important"),"left"===e&&t.style.setProperty("text-align","left","important"),t}createList(){const t=JSON.parse(this.getAttribute("items")),e=document.createElement("div");return e.classList.add("mp-checkout-benefits-list"),t.forEach(((t,i)=>{e.appendChild(this.createItem(t,i))})),e}createItem(t,e){const i=document.createElement("div");i.classList.add("mp-checkout-benefits-item");const n=this.getAttribute("list-mode");return"count"===n?(i.appendChild(this.createCountList(e)),i.appendChild(this.createSimpleText(t)),i):"bullet"===n?(i.appendChild(this.createBulletList()),i.appendChild(this.createSimpleText(t)),i):"image"===n&&"object"==typeof t?(i.appendChild(this.createImageList(t)),i.appendChild(this.createCompositeText(t)),i):i}createSimpleText(t){const e=document.createElement("span");return e.innerHTML=t,e}createCompositeText({title:t,subtitle:e}){const i=document.createElement("p");i.classList.add("mp-checkout-benefits-item-title"),i.innerHTML=t;const n=document.createElement("p");n.classList.add("mp-checkout-benefits-item-subtitle"),n.innerHTML=e;const s=document.createElement("span");return s.appendChild(i),s.appendChild(n),s}createCountList(t){const e=document.createElement("p");e.innerText=1+t,e.classList.add("mp-checkout-benefits-count-list-item");const i=document.createElement("div");return i.classList.add("mp-checkout-benefits-count-list-div"),i.appendChild(e),i}createBulletList(){const t=document.createElement("div");t.classList.add("mp-checkout-benefits-tick-mark-container");const e=document.createElement("div");return e.classList.add("mp-checkout-benefits-tick-mark"),t.appendChild(e),t}createImageList({image:t}){const e=document.createElement("div");return e.classList.add("mp-checkout-benefits-image-list"),e.appendChild(this.createImage(t)),e}createImage({src:t,alt:e}){const i=document.createElement("img");return i.classList.add("mp-checkout-benefits-image"),i.setAttribute("src",t),i.setAttribute("alt",e),i}}customElements.define("checkout-benefits",t)})(),(()=>{class t extends HTMLElement{connectedCallback(){this.build()}build(){this.appendChild(this.createContainer())}createContainer(){const t=document.createElement("div");return t.classList.add("mp-checkout-redirect-v2-container"),t.setAttribute("data-cy","checkout-redirect-v2-container"),t.appendChild(this.createImage()),t.appendChild(this.createText()),t}createImage(){const t=document.createElement("img");return t.classList.add("mp-checkout-redirect-v2-image"),t.src=this.getAttribute("src"),t.alt=this.getAttribute("alt"),t}createText(){const t=document.createElement("p");return t.classList.add("mp-checkout-redirect-v2-text"),t.innerHTML=this.getAttribute("text"),t}}customElements.define("checkout-redirect-v2",t)})(),(()=>{class t extends HTMLElement{connectedCallback(){this.build()}build(){this.appendChild(this.createContainer())}createContainer(){const t=document.createElement("div");return t.classList.add("mp-checkout-redirect-container"),t.setAttribute("data-cy","checkout-redirect-container"),t.appendChild(this.createImage()),t.appendChild(this.createText()),t}createImage(){const t=document.createElement("img");return t.classList.add("mp-checkout-redirect-image"),t.src=this.getAttribute("src"),t.alt=this.getAttribute("alt"),t}createText(){const t=document.createElement("p");return t.classList.add("mp-checkout-redirect-text"),t.innerHTML=this.getAttribute("text"),t}}customElements.define("checkout-redirect",t)})(),(()=>{class t extends HTMLElement{connectedCallback(){this.build()}build(){const t=this.createInputDocument();this.appendChild(t)}createInputDocument(){const t=document.createElement("div");t.classList.add("mp-input-document"),t.setAttribute("data-cy","input-document-container");const e=this.createLabel(this.getAttribute("label-message")),i=this.createHelper(this.getAttribute("helper-message")),n=this.createHiddenField(this.getAttribute("hidden-id")),s=this.createInput(i,n);return t.appendChild(e),t.appendChild(s),t.appendChild(n),t.appendChild(i),t}createLabel(t){const e=document.createElement("input-label");return e.setAttribute("message",t),e.setAttribute("isOptional","false"),e}createInput(t,e){const i=document.createElement("div");i.classList.add("mp-input"),i.setAttribute("id","form-checkout__identificationNumber-container");const n=JSON.parse(this.getAttribute("documents")),s=this.getAttribute("validate"),a=this.createVerticalLine(),r=this.createSelect(i,t,n,s),c=this.createDocument(i,r,t);return r.addEventListener("change",(()=>{i.classList.remove("mp-focus"),i.classList.remove("mp-error"),this.setInpuProperties(r,c),this.setMaskInputDocument(r,c,e)})),i.appendChild(r),i.appendChild(a),i.appendChild(c),this.setMaskInputDocument(r,c,e),i}setInpuProperties(t,e){"CPF"===t.value?(e.value="",e.setAttribute("maxlength","14"),e.setAttribute("placeholder","999.999.999-99")):"CNPJ"===t.value?(e.value="",e.setAttribute("maxlength","18"),e.setAttribute("placeholder","99.999.999/0001-99")):"CI"===t.value?(e.value="",e.setAttribute("maxlength","8"),e.setAttribute("placeholder","99999999")):(e.value="",e.setAttribute("maxlength","20"),e.setAttribute("placeholder",""))}createSelect(t,e,i,n){const s=document.createElement("select");return s.classList.add("mp-document-select"),s.setAttribute("name",this.getAttribute("select-name")),s.setAttribute("id",this.getAttribute("select-id")),s.setAttribute("data-checkout",this.getAttribute("select-data-checkout")),s.setAttribute("data-cy","select-document"),i&&i.forEach((t=>{this.createOption(s,t)})),n&&(s.addEventListener("focus",(()=>{t.classList.add("mp-focus"),e.firstElementChild.style.display="none"})),s.addEventListener("focusout",(()=>{t.classList.remove("mp-focus"),e.firstElementChild.style.display="none"}))),s}createOption(t,e){const i=document.createElement("option");i.innerHTML=e,i.value=e,t.appendChild(i)}createHiddenField(t){const e=document.createElement("input");return e.setAttribute("type","hidden"),e.setAttribute("id",t),e}createVerticalLine(){const t=document.createElement("div");return t.classList.add("mp-vertical-line"),t}isValidCPF(t){if("string"!=typeof t)return!1;if(!(t=t.replace(/[\s.-]*/gim,""))||11!==t.length||"00000000000"===t||"11111111111"===t||"22222222222"===t||"33333333333"===t||"44444444444"===t||"55555555555"===t||"66666666666"===t||"77777777777"===t||"88888888888"===t||"99999999999"===t)return!1;let e,i=0;for(let e=1;e<=9;e+=1)i+=parseInt(t.substring(e-1,e))*(11-e);if(e=10*i%11,10!==e&&11!==e||(e=0),e!==parseInt(t.substring(9,10)))return!1;i=0;for(let e=1;e<=10;e+=1)i+=parseInt(t.substring(e-1,e))*(12-e);return e=10*i%11,10!==e&&11!==e||(e=0),e===parseInt(t.substring(10,11))}isValidCNPJ(t){if(""===(t=t.replace(/[^\d]+/g,"")))return!1;if(14!==t.length)return!1;if("00000000000000"===t||"11111111111111"===t||"22222222222222"===t||"33333333333333"===t||"44444444444444"===t||"55555555555555"===t||"66666666666666"===t||"77777777777777"===t||"88888888888888"===t||"99999999999999"===t)return!1;let e=t.length-2,i=t.substring(0,e);const n=t.substring(e);let s=0,a=e-7;for(let t=e;t>=1;t-=1)s+=i.charAt(e-t)*a--,a<2&&(a=9);let r=s%11<2?0:11-s%11;if(r!==Number(n.charAt(0)))return!1;e+=1,i=t.substring(0,e),s=0,a=e-7;for(let t=e;t>=1;t-=1)s+=i.charAt(e-t)*a--,a<2&&(a=9);return r=s%11<2?0:11-s%11,r===Number(n.charAt(1))}isValidCI(t){let e=0,i=0,n=0;const s=t[t.length-1];if(t.length<=6)for(i=t.length;i<7;i+=1)t=`0${t}`;for(i=0;i<7;i+=1)e+=parseInt("2987634"[i],10)*parseInt(t[i],10)%10;return n=e%10==0?0:10-e%10,s===n.toString()}isValidCC(t){return"string"==typeof t&&t.length>0}isValidCE(t){return"string"==typeof t&&t.length>0}isValidNIT(t){return"string"==typeof t&&t.length>0}setMaskInputDocument(t,e,i){const n={CPF:t=>t.replace(/\D+/g,"").replace(/(\d{3})(\d)/,"$1.$2").replace(/(\d{3})(\d)/,"$1.$2").replace(/(\d{3})(\d{1,2})/,"$1-$2").replace(/(-\d{2})\d+?$/,"$1"),CNPJ:t=>t.replace(/\D+/g,"").replace(/(\d{2})(\d)/,"$1.$2").replace(/(\d{3})(\d)/,"$1.$2").replace(/(\d{3})(\d)/,"$1/$2").replace(/(\d{4})(\d)/,"$1-$2").replace(/(-\d{2})\d+?$/,"$1"),CI:t=>t.replace(/\D+/g,"")};e.addEventListener("input",(e=>{if(void 0!==n[t.value]&&(e.target.value=n[t.value](e.target.value)),i){const t=e.target.value.replace(/[^\w\s]/gi,"");i.value=t}}))}createDocument(t,e,i){const n=document.createElement("input");return n.setAttribute("name",this.getAttribute("input-name")),n.setAttribute("data-checkout",this.getAttribute("input-data-checkout")),n.setAttribute("data-cy","input-document"),n.classList.add("mp-document"),n.type="text",n.inputMode="text",this.setInpuProperties(e,n),n.addEventListener("focus",(()=>{t.classList.add("mp-focus"),t.classList.remove("mp-error"),i.firstElementChild.style.display="none"})),n.addEventListener("focusout",(()=>{t.classList.remove("mp-focus");const s={CPF:t=>this.isValidCPF(t),CNPJ:t=>this.isValidCNPJ(t),CI:t=>this.isValidCI(t),CC:t=>this.isValidCC(t),CE:t=>this.isValidCE(t),NIT:t=>this.isValidNIT(t)};void 0!==s[e.value]&&(s[e.value](n.value)?(t.classList.remove("mp-error"),i.firstElementChild.style.display="none",n.setAttribute("name",this.getAttribute("input-name"))):(t.classList.add("mp-error"),i.firstElementChild.style.display="flex",n.setAttribute("name",this.getAttribute("flag-error"))))})),n}createHelper(t){const e=document.createElement("input-helper");return e.setAttribute("isVisible",!1),e.setAttribute("message",t),e.setAttribute("input-id","mp-doc-number-helper"),e}}customElements.define("input-document",t)})(),(()=>{class t extends HTMLElement{connectedCallback(){this.build()}build(){this.appendChild(this.createHelper())}createHelper(){const t=document.createElement("div");t.classList.add("mp-helper"),t.setAttribute("id",this.getAttribute("input-id")),t.setAttribute("data-cy","helper-container"),this.validateVisibility(t);const e=this.createIcon(),i=this.getAttribute("message"),n=this.createHelperMessage(i);return t.appendChild(e),t.appendChild(n),t}createIcon(){const t=document.createElement("div");return t.innerHTML="!",t.classList.add("mp-helper-icon"),t}createHelperMessage(t){const e=document.createElement("div");return e.innerHTML=t,e.classList.add("mp-helper-message"),e.setAttribute("data-cy","helper-message"),e}validateVisibility(t){let e=this.getAttribute("isVisible");"string"==typeof e&&(e="false"!==e),t.style.display=e?"flex":"none"}}customElements.define("input-helper",t)})(),(()=>{class t extends HTMLElement{connectedCallback(){this.build()}build(){this.appendChild(this.createLabel())}createLabel(){const t=document.createElement("div");t.classList.add("mp-input-label"),t.setAttribute("data-cy","input-label");const e=this.getAttribute("message");t.innerHTML=e;let i=this.getAttribute("isOptional");if("string"==typeof i&&(i="false"!==i),!i){const e=document.createElement("b");e.innerHTML="*",e.style="color: red",t.appendChild(e)}return t}}customElements.define("input-label",t)})(),(()=>{class t extends HTMLElement{connectedCallback(){this.build()}build(){this.appendChild(this.createContainer())}createContainer(){const t=document.createElement("div");return t.classList.add("mp-input-radio-container"),t.appendChild(this.createRadio()),t.appendChild(this.createLabel()),t}createRadio(){const t=document.createElement("input"),e=this.getAttribute("dataRate");return t.classList.add("mp-input-radio-radio"),t.type="radio",t.id=this.getAttribute("identification"),t.name=this.getAttribute("name"),t.value=this.getAttribute("value"),t.setAttribute("data-cy","input-radio"),e&&t.setAttribute("dataRate",e),t}createLabel(){const t=document.createElement("label");return t.classList.add("mp-input-radio-label"),t.htmlFor=this.getAttribute("identification"),t}}customElements.define("input-radio",t)})(),(()=>{class t extends HTMLElement{connectedCallback(){this.build()}build(){this.appendChild(this.createContainer())}createContainer(){const t=document.createElement("div");return t.classList.add("mp-input-select-container"),t.appendChild(this.createLabel()),t.appendChild(this.createInput()),t.appendChild(this.createHelper()),t}createInput(){const t=document.createElement("div");return t.classList.add("mp-input-select-input"),t.appendChild(this.createSelect()),t}createSelect(){const t=document.createElement("select"),e=this.getAttribute("name");t.classList.add("mp-input-select-select"),t.setAttribute("id",e),t.setAttribute("name",e);const i=this.getAttribute("options")&&JSON.parse(this.getAttribute("options"));if(this.getAttribute("default-option")){const e=document.createElement("option");e.setAttribute("selected","selected"),e.setAttribute("hidden","hidden"),e.innerHTML=this.getAttribute("default-option"),t.appendChild(e)}return i&&0!==i.length&&i.forEach((e=>{t.appendChild(this.createOption(e))})),t}createOption(t){const e=document.createElement("option");return e.innerHTML=t.description,e.value=t.id,e}createLabel(){const t=document.createElement("input-label"),e=this.getAttribute("optional");return t.setAttribute("message",this.getAttribute("label")),"false"===e?t.setAttribute("isOptional",e):t.setAttribute("isOptional","true"),t}createHelper(){const t=document.createElement("input-helper");return t.setAttribute("isVisible",!1),t.setAttribute("message",this.getAttribute("helper-message")),t.setAttribute("input-id","mp-doc-number-helper"),t}createHiddenField(t){const e=document.createElement("input");return e.setAttribute("type","hidden"),e.setAttribute("id",t),e}}customElements.define("input-select",t)})(),(()=>{class t extends HTMLElement{static get observedAttributes(){return["columns","name","button-name","bank-interest-text"]}constructor(){super(),this.index=0,this.limit=5,this.offset=this.limit,this.columns=null,this.total=0}connectedCallback(){this.build()}attributeChangedCallback(){this.firstElementChild&&(this.removeChild(this.firstElementChild),this.build())}build(){this.appendChild(this.createContainer())}setColumns(){return this.columns=JSON.parse(this.getAttribute("columns")),this}setTotal(){return this.total=this.columns.length,this}createContainer(){const t=document.createElement("div");return this.setColumns(),this.columns&&(this.setTotal(),t.classList.add("mp-input-table-container"),t.setAttribute("data-cy","input-table-container"),t.appendChild(this.createList()),t.appendChild(this.createBankInterestDisclaimer())),t}createList(){const t=document.createElement("div");t.classList.add("mp-input-table-list"),t.setAttribute("data-cy","input-table-list");const e=this.createLink();return e.onclick=()=>this.appendItems(this.columns,t,e,!0),this.appendItems(this.columns,t,e,!1),t.appendChild(e),t}createItem(t){const e=document.createElement("div");return e.classList.add("mp-input-table-item"),e.appendChild(this.createLabel(t)),e}createLabel(t){const{id:e,value:i,rowText:n,rowObs:s,highlight:a,img:r,alt:c,dataRate:d}=t,l=this.getAttribute("name"),o=document.createElement("div");return o.classList.add("mp-input-table-label"),o.appendChild(this.createOption(e,l,i,n,r,c,d)),s&&o.appendChild(this.createRowObs(s,a)),o.onclick=()=>{document.getElementById(e).checked=!0},o}createOption(t,e,i,n,s,a,r){const c=document.createElement("div");return c.classList.add("mp-input-table-option"),c.appendChild(this.createRadio(t,e,i,r)),s?c.appendChild(this.createRowTextWithImg(n,s,a)):c.appendChild(this.createRowText(n)),c}createRadio(t,e,i,n){const s=document.createElement("input-radio");return s.setAttribute("name",e),s.setAttribute("value",i),s.setAttribute("identification",t),s.setAttribute("dataRate",n),s}createRowText(t){const e=document.createElement("span");return e.classList.add("mp-input-table-row-text"),e.innerHTML=t,e}createRowTextWithImg(t,e,i){const n=document.createElement("span"),s=document.createElement("payment-method-logo");return s.setAttribute("src",e),s.setAttribute("alt",i),s.style.marginRight="10px",n.classList.add("mp-input-table-row-text-image"),n.innerHTML=t,n.appendChild(s),n}createRowObs(t,e){const i=document.createElement("span");return e?i.classList.add("mp-input-table-row-obs-highlight"):i.classList.add("mp-input-table-row-obs"),i.innerHTML=t,i}createLink(){const t=document.createElement("div");t.classList.add("mp-input-table-container-link");const e=document.createElement("a");return e.setAttribute("id","more-options"),e.classList.add("mp-input-table-link"),e.innerHTML=this.getAttribute("button-name"),t.appendChild(e),t}createBankInterestDisclaimer(){const t=document.createElement("div");t.classList.add("mp-input-table-bank-interest-container");const e=document.createElement("p");return e.classList.add("mp-input-table-bank-interest-text"),e.innerText=this.getAttribute("bank-interest-text"),t.appendChild(e),t}appendItems(t,e,i,n){this.validateLimit();for(let s=this.index;s=this.total&&i.style.setProperty("display","none","important"),this.index+=this.offset,this.limit+=this.offset,this.validateLimit()}validateLimit(){this.limit>this.total&&(this.limit=this.total)}}customElements.define("input-table",t)})(),(()=>{class t extends HTMLElement{connectedCallback(){this.build()}build(){this.appendChild(this.createContainer())}createContainer(){const t=document.createElement("div");return t.classList.add("mp-payment-method-logo-slider-container"),t.appendChild(this.createContent()),t}createContent(){const t=JSON.parse(this.getAttribute("methods")),e=document.createElement("div");e.classList.add("mp-payment-method-logo-slider-content"),e.appendChild(this.createImage(t[0]));const i=e.firstChild;return this.createSlider(i,t),e}createImage({src:t,alt:e}){const i=document.createElement("payment-method-logo");return i.setAttribute("src",t),i.setAttribute("alt",e),i}createSlider(t,e,i=0){t.setAttribute("src",e[i].src),t.setAttribute("alt",e[i].alt),i=i{this.createSlider(t,e,i)}),2e3)}}customElements.define("payment-method-logo-slider",t)})(),(()=>{class t extends HTMLElement{static get observedAttributes(){return["src","alt"]}connectedCallback(){this.build()}attributeChangedCallback(){this.firstElementChild&&(this.removeChild(this.firstElementChild),this.build())}build(){this.appendChild(this.createContainer())}createContainer(){const t=document.createElement("div");return t.classList.add("mp-payment-method-logo-container"),t.appendChild(this.createImage()),t}createImage(){const t=document.createElement("img");return t.classList.add("mp-payment-method-logo-image"),t.alt=this.getAttribute("alt"),t.src=this.getAttribute("src"),t.onerror=t=>t.target?.parentNode?.parentNode?.parentNode?.removeChild(t.target.parentNode.parentNode),t}}customElements.define("payment-method-logo",t)})(),(()=>{class t extends HTMLElement{connectedCallback(){this.build()}build(){this.appendChild(this.createContainer())}createContainer(){const t=document.createElement("div");return t.classList.add("mp-payment-methods-v2-container"),t.appendChild(this.createContent()),t}createContent(){const t=document.createElement("div");return t.classList.add("mp-payment-methods-v2-content"),t.appendChild(this.createTitle()),t.appendChild(this.createList()),t}createTitle(){const t=document.createElement("p");return t.classList.add("mp-payment-methods-v2-title"),t.innerHTML=this.getAttribute("title"),t}createList(){const t=document.createElement("div");return t.classList.add("mp-payment-methods-v2-list"),this.handleMethodsList(t)}handleMethodsList(t){const e=JSON.parse(this.getAttribute("methods"));let i=!1;if(e.forEach(((n,s)=>{s<=9||11===e.length?t.appendChild(this.createLogo(n)):i=!0})),i){const i=Object.entries(e).slice(10).map((t=>t[1]));t.appendChild(this.createSlider(JSON.stringify(i)))}return t}createLogo({src:t,alt:e}){const i=document.createElement("payment-method-logo");return i.setAttribute("src",t),i.setAttribute("alt",e),i}createSlider(t){const e=document.createElement("payment-method-logo-slider");return e.setAttribute("methods",t),e}}customElements.define("payment-methods-v2",t)})(),(()=>{class t extends HTMLElement{connectedCallback(){this.build()}build(){this.appendChild(this.createContainer())}createContainer(){const t=JSON.parse(this.getAttribute("methods")),e=document.createElement("div");return e.classList.add("mp-payment-methods-container"),t.forEach((t=>{e.appendChild(this.createPaymentMethodType(t))})),e}createPaymentMethodType(t){const{title:e,label:i,payment_methods:n}=t,s=document.createElement("div");return s.classList.add("mp-payment-method-type-container"),n&&0!==n.length&&(s.appendChild(this.createHeader(e,i)),s.appendChild(this.createContent(n))),s}createHeader(t,e){const i=document.createElement("div");return i.classList.add("mp-payment-methods-header"),t&&i.appendChild(this.createTitle(t)),e&&i.appendChild(this.createBadge(e)),i}createTitle(t){const e=document.createElement("p");return e.classList.add("mp-payment-methods-title"),e.innerHTML=t,e}createBadge(t){const e=document.createElement("div"),i=document.createElement("span");return i.classList.add("mp-payment-methods-badge-text"),i.innerHTML=t,e.classList.add("mp-payment-methods-badge"),e.appendChild(i),e}createContent(t){const e=document.createElement("div");return e.classList.add("mp-payment-methods-content"),t.forEach((t=>{e.appendChild(this.createImage(t))})),e}createImage(t){const{src:e,alt:i}=t,n=document.createElement("payment-method-logo");return n.setAttribute("src",e),n.setAttribute("alt",i),n}}customElements.define("payment-methods",t)})(),(()=>{class t extends HTMLElement{connectedCallback(){this.build()}build(){this.appendChild(this.createContainer())}createContainer(){const t=document.createElement("div");return t.classList.add("mp-pix-template-container"),t.setAttribute("data-cy","pix-template-container"),t.appendChild(this.createImage()),t.appendChild(this.createTitle()),t.appendChild(this.createSubtitle()),t}createTitle(){const t=document.createElement("p");return t.classList.add("mp-pix-template-title"),t.innerText=this.getAttribute("title"),t}createSubtitle(){const t=document.createElement("p");return t.classList.add("mp-pix-template-subtitle"),t.innerText=this.getAttribute("subtitle"),t}createImage(){const t=document.createElement("img");return t.classList.add("mp-pix-template-image"),t.src=this.getAttribute("src"),t.alt=this.getAttribute("alt"),t}}customElements.define("pix-template",t)})(),(()=>{class t extends HTMLElement{connectedCallback(){this.build()}build(){this.appendChild(this.createContainer())}createContainer(){const t=document.createElement("div");return t.classList.add("mp-terms-and-conditions-container"),t.setAttribute("data-cy","terms-and-conditions-container"),t.appendChild(this.createText()),t.appendChild(this.createLink()),t}createText(){const t=document.createElement("span");return t.classList.add("mp-terms-and-conditions-text"),t.innerHTML=this.getAttribute("description"),t}createLink(){const t=document.createElement("a");return t.classList.add("mp-terms-and-conditions-link"),t.innerHTML=this.getAttribute("link-text"),t.href=this.getAttribute("link-src"),t.target="blank",t}}customElements.define("terms-and-conditions",t)})(),(()=>{class t extends HTMLElement{connectedCallback(){this.build()}build(){const t=this.createTestMode(),e=this.createCardHeader(),i=this.createCardContent();t.appendChild(e),t.appendChild(i),this.appendChild(t)}createTestMode(){const t=document.createElement("div");return t.classList.add("mp-test-mode-card"),t.setAttribute("data-cy","test-mode-card"),t}createCardContent(){const t=document.createElement("div");t.classList.add("mp-test-mode-card-content");const e=document.createElement("p");e.innerHTML=this.getAttribute("description"),e.classList.add("mp-test-mode-description"),e.setAttribute("data-cy","test-mode-description"),t.appendChild(e);const i=this.getAttribute("link-text"),n=this.getAttribute("link-src"),s=document.createElement("a");return s.classList.add("mp-test-mode-link"),s.innerHTML=i,s.href=n,s.target="blank",e.appendChild(s),t}createCardHeader(){const t=document.createElement("div");t.classList.add("mp-test-mode-card-content");const e=this.createBadge(),i=this.createTitle();return t.appendChild(e),t.appendChild(i),t}createBadge(){const t=document.createElement("div");return t.innerHTML="!",t.classList.add("mp-test-mode-badge"),t}createTitle(){const t=document.createElement("p");return t.innerHTML=this.getAttribute("title"),t.classList.add("mp-test-mode-title"),t.setAttribute("data-cy","test-mode-title"),t}}customElements.define("test-mode",t)})(); !function(n){"use strict";n((function(){n(document.body).on("change",'input[name="payment_method"]',(function(){n("body").trigger("update_checkout")}))}))}(jQuery); window.addEventListener("load",(function(){try{const e=document.createElement("script");e.setAttribute("id","mp_woocommerce_security_session"),e.src="https://www.mercadopago.com/v2/security.js",e.async=!0,e.defer=!0,e.onerror=function(){console.warn("Error on loading mp security js script")},document.body.appendChild(e)}catch(e){console.warn(e)}})); const CheckoutPage={setElementDisplay(e,t){document.querySelector(CheckoutElements[e]).style.display=t},setText(e,t){document.querySelector(CheckoutElements[e]).innerHTML=t},setValue(e,t){document.querySelector(CheckoutElements[e]).value=t},setBackground(e,t){document.querySelector(CheckoutElements[e]).style.setProperty("background",t,"important")},setImageCard(e){this.setBackground("fcCardNumberContainer","url("+e+") 98% 50% no-repeat #fff"),document.querySelector(CheckoutElements.fcCardNumberContainer).style.setProperty("background-size","auto 32px","important")},findContainerField(e){let t="cardholderName"===e?`#form-checkout__${e}`:`#form-checkout__${e}-container`;return Object.keys(CheckoutElements).find((e=>CheckoutElements[e]===t))},setDisplayOfError(e,t,n,r="customContent"){let s=document.querySelector(CheckoutElements[r]).querySelector(CheckoutElements[e]);s&&("add"===t?s.classList.add(`${n}`):s.classList.remove(`${n}`))},setDisplayOfInputHelper(e,t,n="customContent"){let r=document.querySelector(CheckoutElements[n]).querySelector(`input-helper[input-id=${e}-helper]`);if(r){r.querySelector("div").style.display=t}},setCvvHint(e){var t=wc_mercadopago_custom_checkout_params.cvvText;t=`${e.length} ${t} `,t+=this.cvvLocationTranslate(e.card_location),this.setText("mpSecurityCodeInfo",t)},cvvLocationTranslate(e){let t=wc_mercadopago_custom_checkout_params.cvvHint.front,n=wc_mercadopago_custom_checkout_params.cvvHint.back;return"back"===e?n:t},additionalInfoHandler(e){e.cardholder_name?this.setElementDisplay("fcCardholderName","block"):this.setElementDisplay("fcCardholderName","none"),e.issuer?this.setElementDisplay("mpIssuerContainer","block"):this.setElementDisplay("mpIssuerContainer","none"),e.cardholder_identification_type&&e.cardholder_identification_number?this.setElementDisplay("mpDocumentContainer","block"):this.setElementDisplay("mpDocumentContainer","none")},getCountry:()=>wc_mercadopago_custom_checkout_params.site_id,changeCvvPlaceHolder(e){let t="";for(let n=0;nnew Intl.NumberFormat(wc_mercadopago_custom_checkout_params.intl,{currency:wc_mercadopago_custom_checkout_params.currency,style:"currency",currencyDisplay:"narrowSymbol"}).format(e),inputHelperName:e=>({cardNumber:CheckoutElements.mpCardNumber,cardholderName:CheckoutElements.mpCardholderName,expirationDate:CheckoutElements.mpExpirationDate,securityCode:CheckoutElements.mpSecurityCode,identificationNumber:CheckoutElements.mpIdentificationNumber}[e]),removeAdditionFields(){this.setElementDisplay("mpDocumentContainer","none"),this.setElementDisplay("mpInstallments","none"),this.setElementDisplay("mpIssuerContainer","none"),this.setDisplayOfInputHelper("installments","none"),this.setValue("cardInstallments","")},clearInstallmentsComponent(){const e=document.querySelector(CheckoutElements.mpInstallmentsContainer);e.classList.remove(CheckoutElements.mpInstallmentsContainer),e.firstElementChild&&e.removeChild(e.firstElementChild)},showInstallmentsComponent(e){const t=document.querySelector(CheckoutElements.mpInstallmentsContainer);t.classList.add(CheckoutElements.mpInstallmentsContainer),t.appendChild(e)},getHelperMessage(e){let t="input-helper[input-id="+this.inputHelperName(e)+"-helper]";return document.querySelector(t).querySelector("div[class=mp-helper-message]")},argentinaResolution(e){let t="";if("MLA"===this.getCountry())for(let n=0;n{e.querySelector("div").style.display="none"}))},clearInputs(){this.hideErrors(),this.setBackground("fcCardNumberContainer","no-repeat #fff"),this.setValue("fcCardholderName",""),this.setDisplayOfError("fcCardholderName","removed","mp-error"),this.setValue("fcCardExpirationDateContainer",""),this.setDisplayOfError("fcCardExpirationDateContainer","removed","mp-error"),this.setValue("fcSecurityNumberContainer",""),this.setDisplayOfError("fcSecurityNumberContainer","removed","mp-error"),this.setValue("fcIdentificationNumber",""),this.setElementDisplay("mpDocumentContainer","none"),this.setDisplayOfError("fcIdentificationNumberContainer","removed","mp-error"),this.clearInstallmentsComponent(),this.setElementDisplay("mpInstallments","none"),document.querySelector("input[data-cy=input-document]").value=""},verifyDocument(){let e=document.querySelector(CheckoutElements.fcIdentificationNumber),t=document.querySelector(CheckoutElements.mpDocumentContainer);return"none"===t.style.display||""===t.style.display||"-1"!==e.value&&""!==e.value&&"flex"!==document.querySelector("input-helper[input-id=mp-doc-number-helper]").querySelector("div").style.display},loadAdditionalInfo(e){const t={issuer:!1,cardholder_name:!1,cardholder_identification_type:!1,cardholder_identification_number:!1};for(let n=0;n{e.checked&&(t=e.getAttribute("datarate"))}));let r="",s="";if(null!=t){const e=t.split("|");r=e[0].replace("_"," "),s=e[1].replace("_"," "),"CFT 0,00%"===r&&"TEA 0,00%"===s&&(n="none",r="",s="")}document.querySelector(CheckoutElements.mpInputTaxCft).style.display=n,document.querySelector(CheckoutElements.mpTaxCftText).innerHTML=r,document.querySelector(CheckoutElements.mpTaxTeaText).innerHTML=s},setupTaxEvents(){const e=document.querySelector(CheckoutElements.customContent).getElementsByClassName("mp-input-table-label");for(var t=0;t{CheckoutPage.setDisplayOfError("fcInputTableContainer","remove","mp-error"),this.setDisplayOfInputHelper("mp-installments","none"),this.setValue("fcInstallments",n),this.setValue("cardInstallments",n)}))}},getBankInterestDisclaimerCountries:e=>"mlc"===e||"mco"===e||"mpe"===e,getInstallments(e,t){let n=[];const r=[];this.clearInstallmentsComponent(),n=e.payer_costs,n&&this.setElementDisplay("mpInstallments","block");for(let e=0;e{setTimeout((()=>{this.setupTaxEvents()}),300)})),"mla"===e&&this.clearTax()}}; const CheckoutElements={cardTokenId:"#cardTokenId",cardInstallments:"#cardInstallments",fcCardholderName:"#form-checkout__cardholderName",fcCardNumberContainer:"#form-checkout__cardNumber-container",fcCardExpirationDateContainer:"#form-checkout__expirationDate-container",fcIdentificationNumber:"#form-checkout__identificationNumber",fcIdentificationNumberContainer:"#form-checkout__identificationNumber-container",fcInputTableContainer:"[data-cy=input-table-list]",fcInstallments:"#form-checkout__installments",fcSecurityNumberContainer:"#form-checkout__securityCode-container",mpCardNumber:"mp-card-number",mpCardholderName:"mp-card-holder-name",mpDocumentContainer:"#mp-doc-div",mpExpirationDate:"mp-expiration-date",mpInputRadio:".mp-input-radio-radio",mpInputTaxCft:"#mp-checkout-custom-box-input-tax-cft",mpInstallmentsContainer:"#mp-checkout-custom-installments-container",mpInstallments:"#mp-checkout-custom-installments",mpIssuerContainer:"#mp-checkout-custom-issuers-container",mpSecurityCode:"mp-security-code",mpTaxCftText:"#mp-checkout-custom-tax-cft-text",mpTaxTeaText:"#mp-checkout-custom-tax-tea-text",mpIdentificationNumber:"mp-doc-number",mpSecurityCodeInfo:"#mp-security-code-info",paymentMethodId:"#paymentMethodId",customContent:".mp-checkout-custom-container"}; var cardForm,hasToken=!1,mercado_pago_submit=!1,triggeredPaymentMethodSelectedEvent=!1,cardFormMounted=!1,threedsTarget="mp_custom_checkout_security_fields_client",mpCheckoutForm=document.querySelector("form[name=checkout]"),mpFormId="checkout";function mercadoPagoFormHandler(){if(document.querySelector("form[id=order_review]")){document.querySelector(".mp-checkout-custom-container").querySelectorAll("input-helper").forEach((e=>{"none"!==e.querySelector("div").style.display&&removeBlockOverlay()}))}return setMercadoPagoSessionId(),!!mercado_pago_submit||("wallet_button"===jQuery("#mp_checkout_type").val()||(jQuery("#mp_checkout_type").val("custom"),!(!CheckoutPage.validateInputsCreateToken()||hasToken)&&createToken()))}function createToken(){return cardForm.createCardToken().then((e=>{if(!e.token)throw new Error("cardToken is empty");if(!hasToken)return document.querySelector("#cardTokenId").value=e.token,mercado_pago_submit=!0,hasToken=!0,"order_review"===mpFormId?(handle3dsPayOrderFormSubmission(),!1):void jQuery("form.checkout").submit()})).catch((e=>{console.warn("Token creation error: ",e)})),!1}function initCardForm(e=getAmount()){var o=new MercadoPago(wc_mercadopago_custom_checkout_params.public_key);return new Promise(((t,r)=>{cardForm=o.cardForm({amount:e,iframe:!0,form:{id:mpFormId,cardNumber:{id:"form-checkout__cardNumber-container",placeholder:"0000 0000 0000 0000",style:{"font-size":"16px",height:"40px",padding:"14px"}},cardholderName:{id:"form-checkout__cardholderName",placeholder:"Ex.: María López"},cardExpirationDate:{id:"form-checkout__expirationDate-container",placeholder:wc_mercadopago_custom_checkout_params.placeholders.cardExpirationDate,mode:"short",style:{"font-size":"16px",height:"40px",padding:"14px"}},securityCode:{id:"form-checkout__securityCode-container",placeholder:"123",style:{"font-size":"16px",height:"40px",padding:"14px"}},identificationType:{id:"form-checkout__identificationType"},identificationNumber:{id:"form-checkout__identificationNumber"},issuer:{id:"form-checkout__issuer",placeholder:wc_mercadopago_custom_checkout_params.placeholders.issuer},installments:{id:"form-checkout__installments",placeholder:wc_mercadopago_custom_checkout_params.placeholders.installments}},callbacks:{onReady:()=>{removeLoadSpinner(),t()},onFormMounted:function(e){cardFormMounted=!0,e&&console.log("Callback to handle the error: creating the CardForm",e)},onFormUnmounted:function(e){cardFormMounted=!1,CheckoutPage.clearInputs(),e&&console.log("Callback to handle the error: unmounting the CardForm",e)},onInstallmentsReceived:(e,o)=>{e?console.warn("Installments handling error: ",e):CheckoutPage.setChangeEventOnInstallments(CheckoutPage.getCountry(),o)},onCardTokenReceived:e=>{e&&console.warn("Token handling error: ",e)},onPaymentMethodsReceived:(e,o)=>{try{if(o){CheckoutPage.setValue("paymentMethodId",o[0].id),CheckoutPage.setCvvHint(o[0].settings[0].security_code),CheckoutPage.changeCvvPlaceHolder(o[0].settings[0].security_code.length),CheckoutPage.clearInputs(),CheckoutPage.setDisplayOfError("fcCardNumberContainer","remove","mp-error"),CheckoutPage.setDisplayOfInputHelper("mp-card-number","none"),CheckoutPage.setImageCard(o[0].secure_thumbnail||o[0].thumbnail),CheckoutPage.installment_amount(o[0].payment_type_id);const e=CheckoutPage.loadAdditionalInfo(o[0].additional_info_needed);CheckoutPage.additionalInfoHandler(e)}else CheckoutPage.setDisplayOfError("fcCardNumberContainer","add","mp-error"),CheckoutPage.setDisplayOfInputHelper("mp-card-number","flex")}catch(e){CheckoutPage.setDisplayOfError("fcCardNumberContainer","add","mp-error"),CheckoutPage.setDisplayOfInputHelper("mp-card-number","flex")}},onSubmit:function(e){e.preventDefault()},onValidityChange:function(e,o){if(e){let t=CheckoutPage.getHelperMessage(o),r=wc_mercadopago_custom_checkout_params.input_helper_message[o][e[0].code];t.innerHTML=r||wc_mercadopago_custom_checkout_params.input_helper_message[o].invalid_length,"cardNumber"===o&&"invalid_length"!==e[0].code&&(CheckoutPage.setBackground("fcCardNumberContainer","no-repeat #fff"),CheckoutPage.removeAdditionFields(),CheckoutPage.clearInputs());let a=CheckoutPage.findContainerField(o);return CheckoutPage.setDisplayOfError(a,"add","mp-error"),CheckoutPage.setDisplayOfInputHelper(CheckoutPage.inputHelperName(o),"flex")}let t=CheckoutPage.findContainerField(o);return CheckoutPage.setDisplayOfError(t,"removed","mp-error"),CheckoutPage.setDisplayOfInputHelper(CheckoutPage.inputHelperName(o),"none")},onError:function(e){e.forEach((e=>(removeBlockOverlay(),e.message.includes("timed out")?r(e):e.message.includes("cardNumber")?(CheckoutPage.setDisplayOfError("fcCardNumberContainer","add","mp-error"),CheckoutPage.setDisplayOfInputHelper("mp-card-number","flex")):e.message.includes("cardholderName")?(CheckoutPage.setDisplayOfError("fcCardholderName","add","mp-error"),CheckoutPage.setDisplayOfInputHelper("mp-card-holder-name","flex")):e.message.includes("expirationMonth")||e.message.includes("expirationYear")?(CheckoutPage.setDisplayOfError("fcCardExpirationDateContainer","add","mp-error"),CheckoutPage.setDisplayOfInputHelper("mp-expiration-date","flex")):e.message.includes("securityCode")?(CheckoutPage.setDisplayOfError("fcSecurityNumberContainer","add","mp-error"),CheckoutPage.setDisplayOfInputHelper("mp-security-code","flex")):e.message.includes("identificationNumber")?(CheckoutPage.setDisplayOfError("fcIdentificationNumberContainer","add","mp-error"),CheckoutPage.setDisplayOfInputHelper("mp-doc-number","flex")):r(e))))}}})}))}function getAmount(){const e=parseFloat(document.getElementById("mp-amount").value.replace(",","."));return String(e)}function setMercadoPagoSessionId(){try{document.querySelector("#mpCardSessionId").value=MP_DEVICE_SESSION_ID}catch(e){console.warn(e)}}function removeBlockOverlay(){jQuery("form#order_review").length>0&&jQuery(".blockOverlay").css("display","none")}function cardFormLoad(){const e=document.getElementById("payment_method_woo-mercado-pago-custom");e&&e.checked?setTimeout((()=>{cardFormMounted||(createLoadSpinner(),handleCardFormLoad())}),2500):cardFormMounted&&cardForm.unmount()}function setCardFormLoadInterval(){var e=setInterval((()=>{const o=document.getElementById("payment_method_woo-mercado-pago-custom"),t=document.getElementById("form-checkout__cardNumber-container");o&&o.checked?t&&t.childElementCount>0?clearInterval(e):cardFormMounted&&(cardForm.unmount(),cardFormLoad()):clearInterval(e)}),1e3)}function handleCardFormLoad(){initCardForm().then((()=>{sendMetric("MP_CARDFORM_SUCCESS","Security fields loaded",threedsTarget)})).catch((e=>{const o=handleCardFormErrors(e);sendMetric("MP_CARDFORM_ERROR",o,threedsTarget),console.error("Mercado Pago cardForm error: ",o)}))}function handleCardFormErrors(e){if(e.length){const o=[];return e.forEach((e=>{o.push(e.description||e.message)})),o.join(",")}return e.description||e.message}function createLoadSpinner(){document.querySelector(".mp-checkout-custom-container").style.display="none",document.querySelector(".mp-checkout-custom-load").style.display="flex"}function removeLoadSpinner(){document.querySelector(".mp-checkout-custom-container").style.display="block",document.querySelector(".mp-checkout-custom-load").style.display="none"}function removeLoadSpinner3ds(){document.getElementById("mp-loading-container-3ds").remove()}function addLoadSpinner3dsSubmit(){document.getElementById("mp-3ds-modal-content").innerHTML='

'+wc_mercadopago_custom_checkout_params.threeDsText.title_loading_response+"

"}function removeModal3ds(){CheckoutPage.clearInputs(),document.getElementById("mp-3ds-modal-container").remove()}function threeDSHandler(e,o){try{if(null==e||null==o)return removeModal3ds(),sendMetric("MP_THREE_DS_ERROR","3DS URL or CRED not set",threedsTarget),void console.log("Invalid parameters for 3ds");var t=document.createElement("div");t.className="mp-card-info",t.innerHTML='
'+wc_mercadopago_custom_checkout_params.threeDsText.title_frame+"
";var r=document.getElementById("mp-3ds-modal-content"),a=document.createElement("iframe");a.name="mp-3ds-frame",a.id="mp-3ds-frame",a.onload=()=>removeLoadSpinner3ds(),document.getElementById("mp-3ds-title").innerText=wc_mercadopago_custom_checkout_params.threeDsText.tooltip_frame,r.appendChild(t),r.appendChild(a);var n=a.contentWindow.document,d=n.createElement("form");d.name="mp-3ds-frame",d.className="mp-modal",d.setAttribute("target","mp-3ds-frame"),d.setAttribute("method","post"),d.setAttribute("action",e);var c=n.createElement("input");c.setAttribute("type","hidden"),c.setAttribute("name","creq"),c.setAttribute("value",o),d.appendChild(c),a.appendChild(d),d.submit()}catch(e){console.log(e),sendMetric("MP_THREE_DS_ERROR","3DS Loading error: "+e,threedsTarget),alert("Error doing Challenge, try again later.")}}function load3DSFlow(e){var o=document.createElement("div");o.setAttribute("id","mp-3ds-modal-container"),o.className="mp-3ds-modal";var t=document.createElement("div");t.id="mp-3ds-modal-content",t.innerHTML='
×

'+wc_mercadopago_custom_checkout_params.threeDsText.title_loading+"
("+document.getElementById("paymentMethodId").value+"****"+e+") "+wc_mercadopago_custom_checkout_params.threeDsText.title_loading2+'

'+wc_mercadopago_custom_checkout_params.threeDsText.text_loading+"

",o.appendChild(t),document.body.appendChild(o),document.querySelector("#mp-3ds-modal-close").addEventListener("click",(function(){setDisplayOfErrorCheckout(wc_mercadopago_custom_checkout_params.threeDsText.message_close),removeModal3ds()})),jQuery.post("/?wc-ajax=mp_get_3ds_from_session").done((function(e){e.success?threeDSHandler(e.data.data["3ds_url"],e.data.data["3ds_creq"]):(console.error("Error POST:",e),window.dispatchEvent(new CustomEvent("completed_3ds",{detail:{error:!0}})),removeModal3ds())})).fail((function(e,o,t){console.error("Failed to make POST:",o,t),window.dispatchEvent(new CustomEvent("completed_3ds",{detail:{error:!0}})),removeModal3ds()}))}function redirectAfter3dsChallenge(){jQuery.post("/?wc-ajax=mp_redirect_after_3ds_challenge").done((function(e){e.data.redirect?(window.dispatchEvent(new CustomEvent("completed_3ds",{detail:{error:!1}})),sendMetric("MP_THREE_DS_SUCCESS","3DS challenge complete",threedsTarget),removeModal3ds(),window.location.href=e.data.redirect):(window.dispatchEvent(new CustomEvent("completed_3ds",{detail:{error:e.data.data.error}})),setDisplayOfErrorCheckout(e.data.data.error),removeModal3ds())}))}function handle3dsPayOrderFormSubmission(){var e=jQuery("#order_review").serialize();jQuery.post("#",e).done((function(e){e.three_ds_flow?load3DSFlow(e.last_four_digits):(e.redirect&&(window.location.href=e.redirect),window.location.reload())})).error((function(){window.location.reload()}))}function setDisplayOfErrorCheckout(e){if(sendMetric("MP_THREE_DS_ERROR",e,threedsTarget),"blocks_checkout_form"!==window.mpFormId){removeElementsByClass("woocommerce-NoticeGroup-checkout");var o=document.createElement("div");o.className="woocommerce-NoticeGroup woocommerce-NoticeGroup-checkout",o.innerHTML='",mpCheckoutForm.prepend(o),window.scrollTo(0,0)}}function removeElementsByClass(e){const o=document.getElementsByClassName(e);for(;o.length>0;)o[0].parentNode.removeChild(o[0])}function sendMetric(e,o,t){const r={name:e,message:o,target:t,plugin:{version:wc_mercadopago_custom_checkout_params.plugin_version},platform:{name:"woocommerce",uri:window.location.href,version:wc_mercadopago_custom_checkout_params.platform_version,location:`${wc_mercadopago_custom_checkout_params.location}_${wc_mercadopago_custom_checkout_params.theme}`}};navigator.sendBeacon("https://api.mercadopago.com/v1/plugins/melidata/errors",JSON.stringify(r))}mpCheckoutForm?mpCheckoutForm.id=mpFormId:mpFormId="order_review",jQuery("form.checkout").on("checkout_place_order_woo-mercado-pago-custom",mercadoPagoFormHandler),jQuery("body").on("payment_method_selected",(function(){triggeredPaymentMethodSelectedEvent||cardFormLoad()})),jQuery("form#order_review").submit((function(e){if(document.getElementById("payment_method_woo-mercado-pago-custom").checked)return e.preventDefault(),mercadoPagoFormHandler();cardFormLoad()})),jQuery(document.body).on("checkout_error",(()=>{hasToken=!1,mercado_pago_submit=!1})),jQuery(document).on("updated_checkout",(function(){const e=document.getElementById("payment_method_woo-mercado-pago-custom");if(e||e.checked)return cardFormMounted&&cardForm.unmount(),void handleCardFormLoad()})),jQuery(document).ready((()=>{setCardFormLoadInterval()})),triggeredPaymentMethodSelectedEvent||jQuery("body").trigger("payment_method_selected"),window.addEventListener("message",(e=>{"COMPLETE"===e.data.status&&(sendMetric("MP_THREE_DS_SUCCESS","3DS iframe Closed",threedsTarget),document.getElementById("mp-3ds-modal-content").innerHTML="",addLoadSpinner3dsSubmit(),redirectAfter3dsChallenge())})); const CheckoutTicketPage={setDisplayOfError(e,t,c,l="ticketContent"){let r=document.querySelector(CheckoutTicketElements[l]).querySelector(CheckoutTicketElements[e]);r&&("add"===t?r.classList.add(`${c}`):r.classList.remove(`${c}`))},setDisplayOfInputHelper(e,t,c="ticketContent"){let l=document.querySelector(CheckoutTicketElements[c]).querySelector(`input-helper[input-id=${e}-helper]`);if(l){l.querySelector("div").style.display=t}}}; const CheckoutTicketElements={ticketContent:".mp-checkout-ticket-container",fcInputTableContainer:"[data-cy=input-table-list]"}; !function(e){"use strict";e((function(){var t=!1;function o(){if(!document.getElementById("payment_method_woo-mercado-pago-ticket").checked)return!0;let o=document.querySelector(CheckoutTicketElements.ticketContent),c=o.querySelectorAll("input-helper");return"MLB"!==wc_mercadopago_ticket_checkout_params.site_id&&"MLU"!==wc_mercadopago_ticket_checkout_params.site_id||function(e,t){let o=e.querySelector(".mp-document");if(""===o.value){e.querySelector(".mp-input").classList.add("mp-error"),t[0].querySelector("div").style.display="flex"}}(o,c),function(e){e.querySelector("#more-options").addEventListener("click",(()=>{setTimeout((()=>{r(e)}),300)}));let t=!1;e.querySelectorAll(".mp-input-radio-radio").forEach((e=>{e.checked&&(t=!0)})),!1===t&&(CheckoutTicketPage.setDisplayOfError("fcInputTableContainer","add","mp-error","ticketContent"),CheckoutTicketPage.setDisplayOfInputHelper("mp-payment-method","flex","ticketContent"));r(e)}(o),!function(e){let t=!1;return e.forEach((e=>{"none"!==e.querySelector("div").style.display&&(t=!0)})),t}(c)?t=!0:e("form#order_review").length>0&&e(".blockOverlay").css("display","none"),t}function r(e){e.querySelectorAll(".mp-input-table-label").forEach((e=>{e.addEventListener("click",(()=>{CheckoutTicketPage.setDisplayOfError("fcInputTableContainer","remove","mp-error","ticketContent"),CheckoutTicketPage.setDisplayOfInputHelper("mp-payment-method","none","ticketContent")}))}))}e("form.checkout").on("checkout_place_order_woo-mercado-pago-ticket",(function(){return o()})),e("form#order_review").submit((function(){return o()}))}))}(jQuery); !function(){var e={6879:function(e){!function(t,n){var a=function(e,t,n){"use strict";var a,i;if(function(){var t,n={lazyClass:"lazyload",loadedClass:"lazyloaded",loadingClass:"lazyloading",preloadClass:"lazypreload",errorClass:"lazyerror",autosizesClass:"lazyautosizes",fastLoadedClass:"ls-is-cached",iframeLoadMode:0,srcAttr:"data-src",srcsetAttr:"data-srcset",sizesAttr:"data-sizes",minSize:40,customMedia:{},init:!0,expFactor:1.5,hFac:.8,loadMode:2,loadHidden:!0,ricTimeout:0,throttleDelay:125};for(t in i=e.lazySizesConfig||e.lazysizesConfig||{},n)t in i||(i[t]=n[t])}(),!t||!t.getElementsByClassName)return{init:function(){},cfg:i,noSupport:!0};var r=t.documentElement,o=e.HTMLPictureElement,s="addEventListener",l="getAttribute",c=e[s].bind(e),d=e.setTimeout,u=e.requestAnimationFrame||d,f=e.requestIdleCallback,m=/^picture$/i,v=["load","error","lazyincluded","_lazyloaded"],y={},g=Array.prototype.forEach,p=function(e,t){return y[t]||(y[t]=new RegExp("(\\s|^)"+t+"(\\s|$)")),y[t].test(e[l]("class")||"")&&y[t]},z=function(e,t){p(e,t)||e.setAttribute("class",(e[l]("class")||"").trim()+" "+t)},h=function(e,t){var n;(n=p(e,t))&&e.setAttribute("class",(e[l]("class")||"").replace(n," "))},b=function(e,t,n){var a=n?s:"removeEventListener";n&&b(e,t),v.forEach((function(n){e[a](n,t)}))},C=function(e,n,i,r,o){var s=t.createEvent("Event");return i||(i={}),i.instance=a,s.initEvent(n,!r,!o),s.detail=i,e.dispatchEvent(s),s},A=function(t,n){var a;!o&&(a=e.picturefill||i.pf)?(n&&n.src&&!t[l]("srcset")&&t.setAttribute("srcset",n.src),a({reevaluate:!0,elements:[t]})):n&&n.src&&(t.src=n.src)},E=function(e,t){return(getComputedStyle(e,null)||{})[t]},_=function(e,t,n){for(n=n||e.offsetWidth;n49?function(){f(s,{timeout:o}),o!==i.ricTimeout&&(o=i.ricTimeout)}:M((function(){d(s)}),!0);return function(e){var i;(e=!0===e)&&(o=33),t||(t=!0,(i=r-(n.now()-a))<0&&(i=0),e||i<9?l():d(l,i))}},x=function(e){var t,a,i=99,r=function(){t=null,e()},o=function(){var e=n.now()-a;e0)&&"visible"!=E(i,"overflow")&&(a=i.getBoundingClientRect(),o=U>a.left&&ja.top-1&&I500&&r.clientWidth>500?500:370:i.expand,a._defEx=v,y=v*i.expFactor,g=i.hFac,J=null,Y2&&D>2&&!t.hidden?(Y=y,ee=0):Y=D>1&&ee>1&&Z<6?v:X),m!==d&&($=innerWidth+d*g,q=innerHeight+d,u=-1*d,m=d),o=p[n].getBoundingClientRect(),(G=o.bottom)>=u&&(I=o.top)<=q&&(U=o.right)>=u*g&&(j=o.left)<=$&&(G||U||j||I)&&(i.loadHidden||ne(p[n]))&&(R&&Z<3&&!f&&(D<3||ee<4)||ae(p[n],d))){if(fe(p[n]),c=!0,Z>9)break}else!c&&R&&!s&&Z<4&&ee<4&&D>2&&(P[0]||i.preloadAfterLoad)&&(P[0]||!f&&(G||U||j||I||"auto"!=p[n][l](i.sizesAttr)))&&(s=P[0]||p[n]);s&&!c&&fe(s)}},re=N(ie),oe=function(e){var t=e.target;t._lazyCache?delete t._lazyCache:(te(e),z(t,i.loadedClass),h(t,i.loadingClass),b(t,le),C(t,"lazyloaded"))},se=M(oe),le=function(e){se({target:e.target})},ce=function(e,t){var n=e.getAttribute("data-load-mode")||i.iframeLoadMode;0==n?e.contentWindow.location.replace(t):1==n&&(e.src=t)},de=function(e){var t,n=e[l](i.srcsetAttr);(t=i.customMedia[e[l]("data-media")||e[l]("media")])&&e.setAttribute("media",t),n&&e.setAttribute("srcset",n)},ue=M((function(e,t,n,a,r){var o,s,c,u,f,v;(f=C(e,"lazybeforeunveil",t)).defaultPrevented||(a&&(n?z(e,i.autosizesClass):e.setAttribute("sizes",a)),s=e[l](i.srcsetAttr),o=e[l](i.srcAttr),r&&(u=(c=e.parentNode)&&m.test(c.nodeName||"")),v=t.firesLoad||"src"in e&&(s||o||u),f={target:e},z(e,i.loadingClass),v&&(clearTimeout(k),k=d(te,2500),b(e,le,!0)),u&&g.call(c.getElementsByTagName("source"),de),s?e.setAttribute("srcset",s):o&&!u&&(Q.test(e.nodeName)?ce(e,o):e.src=o),r&&(s||u)&&A(e,{src:o})),e._lazyRace&&delete e._lazyRace,h(e,i.lazyClass),w((function(){var t=e.complete&&e.naturalWidth>1;v&&!t||(t&&z(e,i.fastLoadedClass),oe(f),e._lazyCache=!0,d((function(){"_lazyCache"in e&&delete e._lazyCache}),9)),"lazy"==e.loading&&Z--}),!0)})),fe=function(e){if(!e._lazyRace){var t,n=K.test(e.nodeName),a=n&&(e[l](i.sizesAttr)||e[l]("sizes")),r="auto"==a;(!r&&R||!n||!e[l]("src")&&!e.srcset||e.complete||p(e,i.errorClass)||!p(e,i.lazyClass))&&(t=C(e,"lazyunveilread").detail,r&&W.updateElem(e,!0,e.offsetWidth),e._lazyRace=!0,Z++,ue(e,t,r,a,n))}},me=x((function(){i.loadMode=3,re()})),ve=function(){3==i.loadMode&&(i.loadMode=2),me()},ye=function(){R||(n.now()-H<999?d(ye,999):(R=!0,i.loadMode=3,re(),c("scroll",ve,!0)))},{_:function(){H=n.now(),a.elements=t.getElementsByClassName(i.lazyClass),P=t.getElementsByClassName(i.lazyClass+" "+i.preloadClass),c("scroll",re,!0),c("resize",re,!0),c("pageshow",(function(e){if(e.persisted){var n=t.querySelectorAll("."+i.loadingClass);n.length&&n.forEach&&u((function(){n.forEach((function(e){e.complete&&fe(e)}))}))}})),e.MutationObserver?new MutationObserver(re).observe(r,{childList:!0,subtree:!0,attributes:!0}):(r[s]("DOMNodeInserted",re,!0),r[s]("DOMAttrModified",re,!0),setInterval(re,999)),c("hashchange",re,!0),["focus","mouseover","click","load","transitionend","animationend"].forEach((function(e){t[s](e,re,!0)})),/d$|^c/.test(t.readyState)?ye():(c("load",ye),t[s]("DOMContentLoaded",re),d(ye,2e4)),a.elements.length?(ie(),w._lsFlush()):re()},checkElems:re,unveil:fe,_aLSL:ve}),W=(T=M((function(e,t,n,a){var i,r,o;if(e._lazysizesWidth=a,a+="px",e.setAttribute("sizes",a),m.test(t.nodeName||""))for(r=0,o=(i=t.getElementsByTagName("source")).length;r0||a>0)&&2>=o&&2>=a&&300>=e.timeStamp-s.timeStamp&&(mouse=!0,i)){var n=$(t.target).closest("a");n.is("a")&&$.each(menuTrees,function(){return $.contains(this.$root[0],n[0])?(this.itemEnter({currentTarget:n[0]}),!1):void 0}),i=!1}}s=e}],[touchEvents?"touchstart":"pointerover pointermove pointerout MSPointerOver MSPointerMove MSPointerOut",function(t){isTouchEvent(t.originalEvent)&&(mouse=!1)}]],e)),mouseDetectionEnabled=!0}}function isTouchEvent(t){return!/^(4|mouse)$/.test(t.pointerType)}function getEventsNS(t,e){e||(e="");var i={};return $.each(t,function(t,s){i[s[0].split(" ").join(e+" ")+e]=s[1]}),i}var menuTrees=[],IE=!!window.createPopup,mouse=!1,touchEvents="ontouchstart"in window,mouseDetectionEnabled=!1,requestAnimationFrame=window.requestAnimationFrame||function(t){return setTimeout(t,1e3/60)},cancelAnimationFrame=window.cancelAnimationFrame||function(t){clearTimeout(t)};return $.SmartMenus=function(t,e){this.$root=$(t),this.opts=e,this.rootId="",this.accessIdPrefix="",this.$subArrow=null,this.activatedItems=[],this.visibleSubMenus=[],this.showTimeout=0,this.hideTimeout=0,this.scrollTimeout=0,this.clickActivated=!1,this.focusActivated=!1,this.zIndexInc=0,this.idInc=0,this.$firstLink=null,this.$firstSub=null,this.disabled=!1,this.$disableOverlay=null,this.$touchScrollingSub=null,this.cssTransforms3d="perspective"in t.style||"webkitPerspective"in t.style,this.wasCollapsible=!1,this.init()},$.extend($.SmartMenus,{hideAll:function(){$.each(menuTrees,function(){this.menuHideAll()})},destroy:function(){for(;menuTrees.length;)menuTrees[0].destroy();initMouseDetection(!0)},prototype:{init:function(t){var e=this;if(!t){menuTrees.push(this),this.rootId=((new Date).getTime()+Math.random()+"").replace(/\D/g,""),this.accessIdPrefix="sm-"+this.rootId+"-",this.$root.hasClass("sm-rtl")&&(this.opts.rightToLeftSubMenus=!0);var i=".smartmenus";this.$root.data("smartmenus",this).attr("data-smartmenus-id",this.rootId).dataSM("level",1).bind(getEventsNS([["mouseover focusin",$.proxy(this.rootOver,this)],["mouseout focusout",$.proxy(this.rootOut,this)],["keydown",$.proxy(this.rootKeyDown,this)]],i)).delegate("a",getEventsNS([["mouseenter",$.proxy(this.itemEnter,this)],["mouseleave",$.proxy(this.itemLeave,this)],["mousedown",$.proxy(this.itemDown,this)],["focus",$.proxy(this.itemFocus,this)],["blur",$.proxy(this.itemBlur,this)],["click",$.proxy(this.itemClick,this)]],i)),i+=this.rootId,this.opts.hideOnClick&&$(document).bind(getEventsNS([["touchstart",$.proxy(this.docTouchStart,this)],["touchmove",$.proxy(this.docTouchMove,this)],["touchend",$.proxy(this.docTouchEnd,this)],["click",$.proxy(this.docClick,this)]],i)),$(window).bind(getEventsNS([["resize orientationchange",$.proxy(this.winResize,this)]],i)),this.opts.subIndicators&&(this.$subArrow=$("").addClass("sub-arrow"),this.opts.subIndicatorsText&&this.$subArrow.html(this.opts.subIndicatorsText)),initMouseDetection()}if(this.$firstSub=this.$root.find("ul").each(function(){e.menuInit($(this))}).eq(0),this.$firstLink=this.$root.find("a").eq(0),this.opts.markCurrentItem){var s=/(index|default)\.[^#\?\/]*/i,o=/#.*/,a=window.location.href.replace(s,""),n=a.replace(o,"");this.$root.find("a").each(function(){var t=this.href.replace(s,""),i=$(this);(t==a||t==n)&&(i.addClass("current"),e.opts.markCurrentTree&&i.parentsUntil("[data-smartmenus-id]","ul").each(function(){$(this).dataSM("parent-a").addClass("current")}))})}this.wasCollapsible=this.isCollapsible()},destroy:function(t){if(!t){var e=".smartmenus";this.$root.removeData("smartmenus").removeAttr("data-smartmenus-id").removeDataSM("level").unbind(e).undelegate(e),e+=this.rootId,$(document).unbind(e),$(window).unbind(e),this.opts.subIndicators&&(this.$subArrow=null)}this.menuHideAll();var i=this;this.$root.find("ul").each(function(){var t=$(this);t.dataSM("scroll-arrows")&&t.dataSM("scroll-arrows").remove(),t.dataSM("shown-before")&&((i.opts.subMenusMinWidth||i.opts.subMenusMaxWidth)&&t.css({width:"",minWidth:"",maxWidth:""}).removeClass("sm-nowrap"),t.dataSM("scroll-arrows")&&t.dataSM("scroll-arrows").remove(),t.css({zIndex:"",top:"",left:"",marginLeft:"",marginTop:"",display:""})),0==(t.attr("id")||"").indexOf(i.accessIdPrefix)&&t.removeAttr("id")}).removeDataSM("in-mega").removeDataSM("shown-before").removeDataSM("ie-shim").removeDataSM("scroll-arrows").removeDataSM("parent-a").removeDataSM("level").removeDataSM("beforefirstshowfired").removeAttr("role").removeAttr("aria-hidden").removeAttr("aria-labelledby").removeAttr("aria-expanded"),this.$root.find("a.has-submenu").each(function(){var t=$(this);0==t.attr("id").indexOf(i.accessIdPrefix)&&t.removeAttr("id")}).removeClass("has-submenu").removeDataSM("sub").removeAttr("aria-haspopup").removeAttr("aria-controls").removeAttr("aria-expanded").closest("li").removeDataSM("sub"),this.opts.subIndicators&&this.$root.find("span.sub-arrow").remove(),this.opts.markCurrentItem&&this.$root.find("a.current").removeClass("current"),t||(this.$root=null,this.$firstLink=null,this.$firstSub=null,this.$disableOverlay&&(this.$disableOverlay.remove(),this.$disableOverlay=null),menuTrees.splice($.inArray(this,menuTrees),1))},disable:function(t){if(!this.disabled){if(this.menuHideAll(),!t&&!this.opts.isPopup&&this.$root.is(":visible")){var e=this.$root.offset();this.$disableOverlay=$('
').css({position:"absolute",top:e.top,left:e.left,width:this.$root.outerWidth(),height:this.$root.outerHeight(),zIndex:this.getStartZIndex(!0),opacity:0}).appendTo(document.body)}this.disabled=!0}},docClick:function(t){return this.$touchScrollingSub?(this.$touchScrollingSub=null,void 0):((this.visibleSubMenus.length&&!$.contains(this.$root[0],t.target)||$(t.target).is("a"))&&this.menuHideAll(),void 0)},docTouchEnd:function(){if(this.lastTouch){if(!(!this.visibleSubMenus.length||void 0!==this.lastTouch.x2&&this.lastTouch.x1!=this.lastTouch.x2||void 0!==this.lastTouch.y2&&this.lastTouch.y1!=this.lastTouch.y2||this.lastTouch.target&&$.contains(this.$root[0],this.lastTouch.target))){this.hideTimeout&&(clearTimeout(this.hideTimeout),this.hideTimeout=0);var t=this;this.hideTimeout=setTimeout(function(){t.menuHideAll()},350)}this.lastTouch=null}},docTouchMove:function(t){if(this.lastTouch){var e=t.originalEvent.touches[0];this.lastTouch.x2=e.pageX,this.lastTouch.y2=e.pageY}},docTouchStart:function(t){var e=t.originalEvent.touches[0];this.lastTouch={x1:e.pageX,y1:e.pageY,target:e.target}},enable:function(){this.disabled&&(this.$disableOverlay&&(this.$disableOverlay.remove(),this.$disableOverlay=null),this.disabled=!1)},getClosestMenu:function(t){for(var e=$(t).closest("ul");e.dataSM("in-mega");)e=e.parent().closest("ul");return e[0]||null},getHeight:function(t){return this.getOffset(t,!0)},getOffset:function(t,e){var i;"none"==t.css("display")&&(i={position:t[0].style.position,visibility:t[0].style.visibility},t.css({position:"absolute",visibility:"hidden"}).show());var s=t[0].getBoundingClientRect&&t[0].getBoundingClientRect(),o=s&&(e?s.height||s.bottom-s.top:s.width||s.right-s.left);return o||0===o||(o=e?t[0].offsetHeight:t[0].offsetWidth),i&&t.hide().css(i),o},getStartZIndex:function(t){var e=parseInt(this[t?"$root":"$firstSub"].css("z-index"));return!t&&isNaN(e)&&(e=parseInt(this.$root.css("z-index"))),isNaN(e)?1:e},getTouchPoint:function(t){return t.touches&&t.touches[0]||t.changedTouches&&t.changedTouches[0]||t},getViewport:function(t){var e=t?"Height":"Width",i=document.documentElement["client"+e],s=window["inner"+e];return s&&(i=Math.min(i,s)),i},getViewportHeight:function(){return this.getViewport(!0)},getViewportWidth:function(){return this.getViewport()},getWidth:function(t){return this.getOffset(t)},handleEvents:function(){return!this.disabled&&this.isCSSOn()},handleItemEvents:function(t){return this.handleEvents()&&!this.isLinkInMegaMenu(t)},isCollapsible:function(){return"static"==this.$firstSub.css("position")},isCSSOn:function(){return"block"==this.$firstLink.css("display")},isFixed:function(){var t="fixed"==this.$root.css("position");return t||this.$root.parentsUntil("body").each(function(){return"fixed"==$(this).css("position")?(t=!0,!1):void 0}),t},isLinkInMegaMenu:function(t){return $(this.getClosestMenu(t[0])).hasClass("mega-menu")},isTouchMode:function(){return!mouse||this.opts.noMouseOver||this.isCollapsible()},itemActivate:function(t,e){var i=t.closest("ul"),s=i.dataSM("level");if(s>1&&(!this.activatedItems[s-2]||this.activatedItems[s-2][0]!=i.dataSM("parent-a")[0])){var o=this;$(i.parentsUntil("[data-smartmenus-id]","ul").get().reverse()).add(i).each(function(){o.itemActivate($(this).dataSM("parent-a"))})}if((!this.isCollapsible()||e)&&this.menuHideSubMenus(this.activatedItems[s-1]&&this.activatedItems[s-1][0]==t[0]?s:s-1),this.activatedItems[s-1]=t,this.$root.triggerHandler("activate.smapi",t[0])!==!1){var a=t.dataSM("sub");a&&(this.isTouchMode()||!this.opts.showOnClick||this.clickActivated)&&this.menuShow(a)}},itemBlur:function(t){var e=$(t.currentTarget);this.handleItemEvents(e)&&this.$root.triggerHandler("blur.smapi",e[0])},itemClick:function(t){var e=$(t.currentTarget);if(this.handleItemEvents(e)){if(this.$touchScrollingSub&&this.$touchScrollingSub[0]==e.closest("ul")[0])return this.$touchScrollingSub=null,t.stopPropagation(),!1;if(this.$root.triggerHandler("click.smapi",e[0])===!1)return!1;var i=$(t.target).is("span.sub-arrow"),s=e.dataSM("sub"),o=s?2==s.dataSM("level"):!1;if(s&&!s.is(":visible")){if(this.opts.showOnClick&&o&&(this.clickActivated=!0),this.itemActivate(e),s.is(":visible"))return this.focusActivated=!0,!1}else if(this.isCollapsible()&&i)return this.itemActivate(e),this.menuHide(s),!1;return this.opts.showOnClick&&o||e.hasClass("disabled")||this.$root.triggerHandler("select.smapi",e[0])===!1?!1:void 0}},itemDown:function(t){var e=$(t.currentTarget);this.handleItemEvents(e)&&e.dataSM("mousedown",!0)},itemEnter:function(t){var e=$(t.currentTarget);if(this.handleItemEvents(e)){if(!this.isTouchMode()){this.showTimeout&&(clearTimeout(this.showTimeout),this.showTimeout=0);var i=this;this.showTimeout=setTimeout(function(){i.itemActivate(e)},this.opts.showOnClick&&1==e.closest("ul").dataSM("level")?1:this.opts.showTimeout)}this.$root.triggerHandler("mouseenter.smapi",e[0])}},itemFocus:function(t){var e=$(t.currentTarget);this.handleItemEvents(e)&&(!this.focusActivated||this.isTouchMode()&&e.dataSM("mousedown")||this.activatedItems.length&&this.activatedItems[this.activatedItems.length-1][0]==e[0]||this.itemActivate(e,!0),this.$root.triggerHandler("focus.smapi",e[0]))},itemLeave:function(t){var e=$(t.currentTarget);this.handleItemEvents(e)&&(this.isTouchMode()||(e[0].blur(),this.showTimeout&&(clearTimeout(this.showTimeout),this.showTimeout=0)),e.removeDataSM("mousedown"),this.$root.triggerHandler("mouseleave.smapi",e[0]))},menuHide:function(t){if(this.$root.triggerHandler("beforehide.smapi",t[0])!==!1&&(t.stop(!0,!0),"none"!=t.css("display"))){var e=function(){t.css("z-index","")};this.isCollapsible()?this.opts.collapsibleHideFunction?this.opts.collapsibleHideFunction.call(this,t,e):t.hide(this.opts.collapsibleHideDuration,e):this.opts.hideFunction?this.opts.hideFunction.call(this,t,e):t.hide(this.opts.hideDuration,e),t.dataSM("ie-shim")&&t.dataSM("ie-shim").remove().css({"-webkit-transform":"",transform:""}),t.dataSM("scroll")&&(this.menuScrollStop(t),t.css({"touch-action":"","-ms-touch-action":"","-webkit-transform":"",transform:""}).unbind(".smartmenus_scroll").removeDataSM("scroll").dataSM("scroll-arrows").hide()),t.dataSM("parent-a").removeClass("highlighted").attr("aria-expanded","false"),t.attr({"aria-expanded":"false","aria-hidden":"true"});var i=t.dataSM("level");this.activatedItems.splice(i-1,1),this.visibleSubMenus.splice($.inArray(t,this.visibleSubMenus),1),this.$root.triggerHandler("hide.smapi",t[0])}},menuHideAll:function(){this.showTimeout&&(clearTimeout(this.showTimeout),this.showTimeout=0);for(var t=this.opts.isPopup?1:0,e=this.visibleSubMenus.length-1;e>=t;e--)this.menuHide(this.visibleSubMenus[e]);this.opts.isPopup&&(this.$root.stop(!0,!0),this.$root.is(":visible")&&(this.opts.hideFunction?this.opts.hideFunction.call(this,this.$root):this.$root.hide(this.opts.hideDuration),this.$root.dataSM("ie-shim")&&this.$root.dataSM("ie-shim").remove())),this.activatedItems=[],this.visibleSubMenus=[],this.clickActivated=!1,this.focusActivated=!1,this.zIndexInc=0,this.$root.triggerHandler("hideAll.smapi")},menuHideSubMenus:function(t){for(var e=this.activatedItems.length-1;e>=t;e--){var i=this.activatedItems[e].dataSM("sub");i&&this.menuHide(i)}},menuIframeShim:function(t){IE&&this.opts.overlapControlsInIE&&!t.dataSM("ie-shim")&&t.dataSM("ie-shim",$("