!function(t,e){"object"==typeof module&&module.exports?module.exports=e():t.EvEmitter=e()}("undefined"!=typeof window?window:this,(function(){function t(){}let e=t.prototype;return e.on=function(t,e){if(!t||!e)return this;let i=this._events=this._events||{},s=i[t]=i[t]||[];return s.includes(e)||s.push(e),this},e.once=function(t,e){if(!t||!e)return this;this.on(t,e);let i=this._onceEvents=this._onceEvents||{};return(i[t]=i[t]||{})[e]=!0,this},e.off=function(t,e){let i=this._events&&this._events[t];if(!i||!i.length)return this;let s=i.indexOf(e);return-1!=s&&i.splice(s,1),this},e.emitEvent=function(t,e){let i=this._events&&this._events[t];if(!i||!i.length)return this;i=i.slice(0),e=e||[];let s=this._onceEvents&&this._onceEvents[t];for(let n of i){s&&s[n]&&(this.off(t,n),delete s[n]),n.apply(this,e)}return this},e.allOff=function(){return delete this._events,delete this._onceEvents,this},t})),
function(t,e){"object"==typeof module&&module.exports?module.exports=e(t,require("ev-emitter")):t.imagesLoaded=e(t,t.EvEmitter)}("undefined"!=typeof window?window:this,(function(t,e){let i=t.jQuery,s=t.console;function n(t,e,o){if(!(this instanceof n))return new n(t,e,o);let r=t;var h;("string"==typeof t&&(r=document.querySelectorAll(t)),r)?(this.elements=(h=r,Array.isArray(h)?h:"object"==typeof h&&"number"==typeof h.length?[...h]:[h]),this.options={},"function"==typeof e?o=e:Object.assign(this.options,e),o&&this.on("always",o),this.getImages(),i&&(this.jqDeferred=new i.Deferred),setTimeout(this.check.bind(this))):s.error(`Bad element for imagesLoaded ${r||t}`)}n.prototype=Object.create(e.prototype),n.prototype.getImages=function(){this.images=[],this.elements.forEach(this.addElementImages,this)};const o=[1,9,11];n.prototype.addElementImages=function(t){"IMG"===t.nodeName&&this.addImage(t),!0===this.options.background&&this.addElementBackgroundImages(t);let{nodeType:e}=t;if(!e||!o.includes(e))return;let i=t.querySelectorAll("img");for(let t of i)this.addImage(t);if("string"==typeof this.options.background){let e=t.querySelectorAll(this.options.background);for(let t of e)this.addElementBackgroundImages(t)}};const r=/url\((['"])?(.*?)\1\)/gi;function h(t){this.img=t}function d(t,e){this.url=t,this.element=e,this.img=new Image}return n.prototype.addElementBackgroundImages=function(t){let e=getComputedStyle(t);if(!e)return;let i=r.exec(e.backgroundImage);for(;null!==i;){let s=i&&i[2];s&&this.addBackground(s,t),i=r.exec(e.backgroundImage)}},n.prototype.addImage=function(t){let e=new h(t);this.images.push(e)},n.prototype.addBackground=function(t,e){let i=new d(t,e);this.images.push(i)},n.prototype.check=function(){if(this.progressedCount=0,this.hasAnyBroken=!1,!this.images.length)return void this.complete();let t=(t,e,i)=>{setTimeout((()=>{this.progress(t,e,i)}))};this.images.forEach((function(e){e.once("progress",t),e.check()}))},n.prototype.progress=function(t,e,i){this.progressedCount++,this.hasAnyBroken=this.hasAnyBroken||!t.isLoaded,this.emitEvent("progress",[this,t,e]),this.jqDeferred&&this.jqDeferred.notify&&this.jqDeferred.notify(this,t),this.progressedCount===this.images.length&&this.complete(),this.options.debug&&s&&s.log(`progress: ${i}`,t,e)},n.prototype.complete=function(){let t=this.hasAnyBroken?"fail":"done";if(this.isComplete=!0,this.emitEvent(t,[this]),this.emitEvent("always",[this]),this.jqDeferred){let t=this.hasAnyBroken?"reject":"resolve";this.jqDeferred[t](this)}},h.prototype=Object.create(e.prototype),h.prototype.check=function(){this.getIsImageComplete()?this.confirm(0!==this.img.naturalWidth,"naturalWidth"):(this.proxyImage=new Image,this.img.crossOrigin&&(this.proxyImage.crossOrigin=this.img.crossOrigin),this.proxyImage.addEventListener("load",this),this.proxyImage.addEventListener("error",this),this.img.addEventListener("load",this),this.img.addEventListener("error",this),this.proxyImage.src=this.img.currentSrc||this.img.src)},h.prototype.getIsImageComplete=function(){return this.img.complete&&this.img.naturalWidth},h.prototype.confirm=function(t,e){this.isLoaded=t;let{parentNode:i}=this.img,s="PICTURE"===i.nodeName?i:this.img;this.emitEvent("progress",[this,s,e])},h.prototype.handleEvent=function(t){let e="on"+t.type;this[e]&&this[e](t)},h.prototype.onload=function(){this.confirm(!0,"onload"),this.unbindEvents()},h.prototype.onerror=function(){this.confirm(!1,"onerror"),this.unbindEvents()},h.prototype.unbindEvents=function(){this.proxyImage.removeEventListener("load",this),this.proxyImage.removeEventListener("error",this),this.img.removeEventListener("load",this),this.img.removeEventListener("error",this)},d.prototype=Object.create(h.prototype),d.prototype.check=function(){this.img.addEventListener("load",this),this.img.addEventListener("error",this),this.img.src=this.url,this.getIsImageComplete()&&(this.confirm(0!==this.img.naturalWidth,"naturalWidth"),this.unbindEvents())},d.prototype.unbindEvents=function(){this.img.removeEventListener("load",this),this.img.removeEventListener("error",this)},d.prototype.confirm=function(t,e){this.isLoaded=t,this.emitEvent("progress",[this,this.element,e])},n.makeJQueryPlugin=function(e){(e=e||t.jQuery)&&(i=e,i.fn.imagesLoaded=function(t,e){return new n(this,t,e).jqDeferred.promise(i(this))})},n.makeJQueryPlugin(),n}));
!function(t){var o=function(o,s){var i,e,n,r,a=!1,c=!1,f=!1,p={},l={to:"top",offset:0,effectsOffset:0,parent:!1,classes:{sticky:"sticky",stickyActive:"sticky-active",stickyEffects:"sticky-effects",spacer:"sticky-spacer"},isRTL:!1,handleScrollbarWidth:!1},d=function(t,o,s){var i={},e=t[0].style;s.forEach((function(t){i[t]=void 0!==e[t]?e[t]:""})),t.data("css-backup-"+o,i)},m=function(t,o){return t.data("css-backup-"+o)};const u=()=>{if(r=b(i,"width"),n=i.offset().left,e.isRTL){const t=e.handleScrollbarWidth?window.innerWidth:document.body.offsetWidth;n=Math.max(t-r-n,0)}};var h=function(){p.$spacer=i.clone().addClass(e.classes.spacer).css({visibility:"hidden",transition:"none",animation:"none"}),i.after(p.$spacer)},y=function(){p.$spacer.remove()},k=function(){d(i,"unsticky",["position","width","margin-top","margin-bottom","top","bottom","inset-inline-start"]);const t={position:"fixed",width:r,marginTop:0,marginBottom:0};t[e.to]=e.offset,t["top"===e.to?"bottom":"top"]="",n&&(t["inset-inline-start"]=n+"px"),i.css(t).addClass(e.classes.stickyActive)},v=function(){i.css(m(i,"unsticky")).removeClass(e.classes.stickyActive)},b=function(t,o,s){var i=getComputedStyle(t[0]),e=parseFloat(i[o]),n="height"===o?["top","bottom"]:["left","right"],r=[];return"border-box"!==i.boxSizing&&r.push("border","padding"),s&&r.push("margin"),r.forEach((function(t){n.forEach((function(o){e+=parseFloat(i[t+"-"+o])}))})),e},w=function(t){var o=p.$window.scrollTop(),s=b(t,"height"),i=innerHeight,e=t.offset().top-o,n=e-i;return{top:{fromTop:e,fromBottom:n},bottom:{fromTop:e+s,fromBottom:n+s}}},g=function(){v(),y(),a=!1,i.trigger("sticky:unstick")},$=function(){var t=w(i),o="top"===e.to;if(c){(o?t.top.fromTop>e.offset:t.bottom.fromBottom<-e.offset)&&(p.$parent.css(m(p.$parent,"childNotFollowing")),i.css(m(i,"notFollowing")),c=!1)}else{var s=w(p.$parent),a=getComputedStyle(p.$parent[0]),f=parseFloat(a[o?"borderBottomWidth":"borderTopWidth"]),l=o?s.bottom.fromTop-f:s.top.fromBottom+f;(o?l<=t.bottom.fromTop:l>=t.top.fromBottom)&&function(){d(p.$parent,"childNotFollowing",["position"]),p.$parent.css("position","relative"),d(i,"notFollowing",["position","inset-inline-start","top","bottom"]);const t={position:"absolute"};if(n=p.$spacer.position().left,e.isRTL){const t=i.parent().outerWidth(),o=p.$spacer.position().left;r=p.$spacer.outerWidth(),n=Math.max(t-r-o,0)}t["inset-inline-start"]=n+"px",t[e.to]="",t["top"===e.to?"bottom":"top"]=0,i.css(t),c=!0}()}},T=function(){var t,o=e.offset;if(a){var s=w(p.$spacer);t="top"===e.to?s.top.fromTop-o:-s.bottom.fromBottom-o,e.parent&&$(),t>0&&g()}else{var n=w(i);(t="top"===e.to?n.top.fromTop-o:-n.bottom.fromBottom-o)<=0&&(u(),h(),k(),a=!0,i.trigger("sticky:stick"),e.parent&&$())}!function(t){f&&-t<e.effectsOffset?(i.removeClass(e.classes.stickyEffects),f=!1):!f&&-t>=e.effectsOffset&&(i.addClass(e.classes.stickyEffects),f=!0)}(t)},B=function(){T()},C=function(){a&&(v(),y(),u(),h(),k(),e.parent&&(c=!1,$()))};this.destroy=function(){a&&g(),p.$window.off("scroll",B).off("resize",C),i.removeClass(e.classes.sticky)},e=jQuery.extend(!0,l,s),i=t(o).addClass(e.classes.sticky),p.$window=t(window),e.parent&&(p.$parent=i.parent(),"parent"!==e.parent&&(p.$parent=p.$parent.closest(e.parent))),p.$window.on({scroll:B,resize:C}),T()};t.fn.sticky=function(s){var i="string"==typeof s;return this.each((function(){var e=t(this);if(i){var n=e.data("sticky");if(!n)throw Error("Trying to perform the `"+s+"` method prior to initialization");if(!n[s])throw ReferenceError("Method `"+s+"` not found in sticky instance");n[s].apply(n,Array.prototype.slice.call(arguments,1)),"destroy"===s&&e.removeData("sticky")}else e.data("sticky",new o(this,s))})),this},window.Sticky=o}(jQuery);
document.addEventListener('DOMContentLoaded', function(){
document.addEventListener('click', function(event){
if(event.target.classList.contains('gmwqp_inq')){
event.preventDefault();
var productEnquiryTitle=event.target.getAttribute("title");
var attrId=event.target.getAttribute("attr_id");
document.querySelector(".gmqqp_product_vl").value=productEnquiryTitle;
document.querySelector(".gmqqp_product_id").value=attrId;
openCustomModal(".gmwqp_popup_op");
return false;
}});
document.querySelector(".gmwqp_popup_op_form").addEventListener('submit', function(event){
event.preventDefault();
document.body.classList.add('gmwqp_loader');
document.querySelectorAll(".gmwqpmsgc").forEach(function(msgElement){
msgElement.remove();
});
var formData=new FormData(this);
formData.append('_ajax_nonce', gmwqp_ajax_object.ajax_nonce);
var xhr=new XMLHttpRequest();
xhr.open("POST", gmwqp_ajax_object.ajax_url, true);
xhr.responseType='json';
xhr.onload=function(){
var response=xhr.response;
if(response.msg==='error'){
document.querySelector(".gmwqp_popupcontant").insertAdjacentHTML('beforeend', response.returnhtml);
}else{
event.target.reset();
document.querySelector(".gmwqp_popupcontant").insertAdjacentHTML('beforeend', response.returnhtml);
var evt=new CustomEvent("Gm_enquiry_submitted", { detail: response });
window.dispatchEvent(evt);
}
if(response.redirect==='yes'){
setTimeout(function(){
window.location.replace(response.redirect_to);
}, 1500);
}
document.body.classList.remove('gmwqp_loader');
scrollSmoothToBottom('gmwqp_popupcontant');
};
xhr.send(formData);
return false;
});
function scrollSmoothToBottom(id){
var div=document.getElementById(id);
div.scroll({
top: div.scrollHeight - div.clientHeight,
behavior: 'smooth'
});
}
function openCustomModal(selector){
var modal=document.querySelector(selector);
modal.style.display="block";
document.body.classList.add('gmwqp-modal-open');
document.querySelector('.gmwqp_close').addEventListener('click', function(event){
event.preventDefault();
closeModal(selector);
});
window.onclick=function(event){
if(event.target===modal){
closeModal(selector);
}};}
function closeModal(selector){
var modal=document.querySelector(selector);
modal.style.display="none";
document.body.classList.remove('gmwqp-modal-open');
}});
!function(e){if("object"==typeof exports&&"undefined"!=typeof module)module.exports=e();else if("function"==typeof define&&define.amd)define([],e);else{var t;"undefined"!=typeof window?t=window:"undefined"!=typeof global?t=global:"undefined"!=typeof self&&(t=self),t.sbjs=e()}}(function(){return function e(t,r,n){function a(s,o){if(!r[s]){if(!t[s]){var c="function"==typeof require&&require;if(!o&&c)return c(s,!0);if(i)return i(s,!0);var u=new Error("Cannot find module '"+s+"'");throw u.code="MODULE_NOT_FOUND",u}var p=r[s]={exports:{}};t[s][0].call(p.exports,function(e){var r=t[s][1][e];return a(r||e)},p,p.exports,e,t,r,n)}return r[s].exports}for(var i="function"==typeof require&&require,s=0;s<n.length;s++)a(n[s]);return a}({1:[function(e,t,r){"use strict";var n=e("./init"),a={init:function(e){this.get=n(e),e&&e.callback&&"function"==typeof e.callback&&e.callback(this.get)}};t.exports=a},{"./init":6}],2:[function(e,t,r){"use strict";var n=e("./terms"),a=e("./helpers/utils"),i={containers:{current:"sbjs_current",current_extra:"sbjs_current_add",first:"sbjs_first",first_extra:"sbjs_first_add",session:"sbjs_session",udata:"sbjs_udata",promocode:"sbjs_promo"},service:{migrations:"sbjs_migrations"},delimiter:"|||",aliases:{main:{type:"typ",source:"src",medium:"mdm",campaign:"cmp",content:"cnt",term:"trm",id:"id",platform:"plt",format:"fmt",tactic:"tct"},extra:{fire_date:"fd",entrance_point:"ep",referer:"rf"},session:{pages_seen:"pgs",current_page:"cpg"},udata:{visits:"vst",ip:"uip",agent:"uag"},promo:"code"},pack:{main:function(e){return i.aliases.main.type+"="+e.type+i.delimiter+i.aliases.main.source+"="+e.source+i.delimiter+i.aliases.main.medium+"="+e.medium+i.delimiter+i.aliases.main.campaign+"="+e.campaign+i.delimiter+i.aliases.main.content+"="+e.content+i.delimiter+i.aliases.main.term+"="+e.term+i.delimiter+i.aliases.main.id+"="+e.id+i.delimiter+i.aliases.main.platform+"="+e.platform+i.delimiter+i.aliases.main.format+"="+e.format+i.delimiter+i.aliases.main.tactic+"="+e.tactic},extra:function(e){return i.aliases.extra.fire_date+"="+a.setDate(new Date,e)+i.delimiter+i.aliases.extra.entrance_point+"="+document.location.href+i.delimiter+i.aliases.extra.referer+"="+(document.referrer||n.none)},user:function(e,t){return i.aliases.udata.visits+"="+e+i.delimiter+i.aliases.udata.ip+"="+t+i.delimiter+i.aliases.udata.agent+"="+navigator.userAgent},session:function(e){return i.aliases.session.pages_seen+"="+e+i.delimiter+i.aliases.session.current_page+"="+document.location.href},promo:function(e){return i.aliases.promo+"="+a.setLeadingZeroToInt(a.randomInt(e.min,e.max),e.max.toString().length)}}};t.exports=i},{"./helpers/utils":5,"./terms":9}],3:[function(e,t,r){"use strict";var n=e("../data").delimiter;t.exports={useBase64:!1,setBase64Flag:function(e){this.useBase64=e},encodeData:function(e){return encodeURIComponent(e).replace(/\!/g,"%21").replace(/\~/g,"%7E").replace(/\*/g,"%2A").replace(/\'/g,"%27").replace(/\(/g,"%28").replace(/\)/g,"%29")},decodeData:function(e){try{return decodeURIComponent(e).replace(/\%21/g,"!").replace(/\%7E/g,"~").replace(/\%2A/g,"*").replace(/\%27/g,"'").replace(/\%28/g,"(").replace(/\%29/g,")")}catch(t){try{return unescape(e)}catch(r){return""}}},set:function(e,t,r,n,a){var i,s;if(r){var o=new Date;o.setTime(o.getTime()+60*r*1e3),i="; expires="+o.toGMTString()}else i="";s=n&&!a?";domain=."+n:"";var c=this.encodeData(t);this.useBase64&&(c=btoa(c).replace(/=+$/,"")),document.cookie=this.encodeData(e)+"="+c+i+s+"; path=/"},get:function(e){for(var t=this.encodeData(e)+"=",r=document.cookie.split(";"),n=0;n<r.length;n++){for(var a=r[n];" "===a.charAt(0);)a=a.substring(1,a.length);if(0===a.indexOf(t)){var i=a.substring(t.length,a.length);if(/^[A-Za-z0-9+/]+$/.test(i))try{i=atob(i.padEnd(4*Math.ceil(i.length/4),"="))}catch(s){}return this.decodeData(i)}}return null},destroy:function(e,t,r){this.set(e,"",-1,t,r)},parse:function(e){var t=[],r={};if("string"==typeof e)t.push(e);else for(var a in e)e.hasOwnProperty(a)&&t.push(e[a]);for(var i=0;i<t.length;i++){var s;r[this.unsbjs(t[i])]={},s=this.get(t[i])?this.get(t[i]).split(n):[];for(var o=0;o<s.length;o++){var c=s[o].split("="),u=c.splice(0,1);u.push(c.join("=")),r[this.unsbjs(t[i])][u[0]]=this.decodeData(u[1])}}return r},unsbjs:function(e){return e.replace("sbjs_","")}}},{"../data":2}],4:[function(e,t,r){"use strict";t.exports={parse:function(e){for(var t=this.parseOptions,r=t.parser[t.strictMode?"strict":"loose"].exec(e),n={},a=14;a--;)n[t.key[a]]=r[a]||"";return n[t.q.name]={},n[t.key[12]].replace(t.q.parser,function(e,r,a){r&&(n[t.q.name][r]=a)}),n},parseOptions:{strictMode:!1,key:["source","protocol","authority","userInfo","user","password","host","port","relative","path","directory","file","query","anchor"],q:{name:"queryKey",parser:/(?:^|&)([^&=]*)=?([^&]*)/g},parser:{strict:/^(?:([^:\/?#]+):)?(?:\/\/((?:(([^:@]*)(?::([^:@]*))?)?@)?([^:\/?#]*)(?::(\d*))?))?((((?:[^?#\/]*\/)*)([^?#]*))(?:\?([^#]*))?(?:#(.*))?)/,loose:/^(?:(?![^:@]+:[^:@\/]*@)([^:\/?#.]+):)?(?:\/\/)?((?:(([^:@]*)(?::([^:@]*))?)?@)?([^:\/?#]*)(?::(\d*))?)(((\/(?:[^?#](?![^?#\/]*\.[^?#\/.]+(?:[?#]|$)))*\/?)?([^?#\/]*))(?:\?([^#]*))?(?:#(.*))?)/}},getParam:function(e){for(var t={},r=(e||window.location.search.substring(1)).split("&"),n=0;n<r.length;n++){var a=r[n].split("=");if("undefined"==typeof t[a[0]])t[a[0]]=a[1];else if("string"==typeof t[a[0]]){var i=[t[a[0]],a[1]];t[a[0]]=i}else t[a[0]].push(a[1])}return t},getHost:function(e){return this.parse(e).host.replace("www.","")}}},{}],5:[function(e,t,r){"use strict";t.exports={escapeRegexp:function(e){return e.replace(/[\-\[\]\/\{\}\(\)\*\+\?\.\\\^\$\|]/g,"\\$&")},setDate:function(e,t){var r=e.getTimezoneOffset()/60,n=e.getHours(),a=t||0===t?t:-r;return e.setHours(n+r+a),e.getFullYear()+"-"+this.setLeadingZeroToInt(e.getMonth()+1,2)+"-"+this.setLeadingZeroToInt(e.getDate(),2)+" "+this.setLeadingZeroToInt(e.getHours(),2)+":"+this.setLeadingZeroToInt(e.getMinutes(),2)+":"+this.setLeadingZeroToInt(e.getSeconds(),2)},setLeadingZeroToInt:function(e,t){for(var r=e+"";r.length<t;)r="0"+r;return r},randomInt:function(e,t){return Math.floor(Math.random()*(t-e+1))+e}}},{}],6:[function(e,t,r){"use strict";var n=e("./data"),a=e("./terms"),i=e("./helpers/cookies"),s=e("./helpers/uri"),o=e("./helpers/utils"),c=e("./params"),u=e("./migrations");t.exports=function(e){var t,r,p,f,m,d,l,g,h,y,_,v,b,x=c.fetch(e),k=s.getParam(),w=x.domain.host,q=x.domain.isolate,I=x.lifetime;function j(e){switch(e){case a.traffic.utm:t=a.traffic.utm,r="undefined"!=typeof k.utm_source?k.utm_source:"undefined"!=typeof k.gclid?"google":"undefined"!=typeof k.yclid?"yandex":a.none,p="undefined"!=typeof k.utm_medium?k.utm_medium:"undefined"!=typeof k.gclid?"cpc":"undefined"!=typeof k.yclid?"cpc":a.none,f="undefined"!=typeof k.utm_campaign?k.utm_campaign:"undefined"!=typeof k[x.campaign_param]?k[x.campaign_param]:"undefined"!=typeof k.gclid?"google_cpc":"undefined"!=typeof k.yclid?"yandex_cpc":a.none,m="undefined"!=typeof k.utm_content?k.utm_content:"undefined"!=typeof k[x.content_param]?k[x.content_param]:a.none,l=k.utm_id||a.none,g=k.utm_source_platform||a.none,h=k.utm_creative_format||a.none,y=k.utm_marketing_tactic||a.none,d="undefined"!=typeof k.utm_term?k.utm_term:"undefined"!=typeof k[x.term_param]?k[x.term_param]:function(){var e=document.referrer;if(k.utm_term)return k.utm_term;if(!(e&&s.parse(e).host&&s.parse(e).host.match(/^(?:.*\.)?yandex\..{2,9}$/i)))return!1;try{return s.getParam(s.parse(document.referrer).query).text}catch(t){return!1}}()||a.none;break;case a.traffic.organic:t=a.traffic.organic,r=r||s.getHost(document.referrer),p=a.referer.organic,f=a.none,m=a.none,d=a.none,l=a.none,g=a.none,h=a.none,y=a.none;break;case a.traffic.referral:t=a.traffic.referral,r=r||s.getHost(document.referrer),p=p||a.referer.referral,f=a.none,m=s.parse(document.referrer).path,d=a.none,l=a.none,g=a.none,h=a.none,y=a.none;break;case a.traffic.typein:t=a.traffic.typein,r=x.typein_attributes.source,p=x.typein_attributes.medium,f=a.none,m=a.none,d=a.none,l=a.none,g=a.none,h=a.none,y=a.none;break;default:t=a.oops,r=a.oops,p=a.oops,f=a.oops,m=a.oops,d=a.oops,l=a.oops,g=a.oops,h=a.oops,y=a.oops}var i={type:t,source:r,medium:p,campaign:f,content:m,term:d,id:l,platform:g,format:h,tactic:y};return n.pack.main(i)}function R(e){var t=document.referrer;switch(e){case a.traffic.organic:return!!t&&H(t)&&function(e){var t=new RegExp("^(?:.*\\.)?"+o.escapeRegexp("yandex")+"\\..{2,9}$"),n=new RegExp(".*"+o.escapeRegexp("text")+"=.*"),a=new RegExp("^(?:www\\.)?"+o.escapeRegexp("google")+"\\..{2,9}$");if(s.parse(e).query&&s.parse(e).host.match(t)&&s.parse(e).query.match(n))return r="yandex",!0;if(s.parse(e).host.match(a))return r="google",!0;if(!s.parse(e).query)return!1;for(var i=0;i<x.organics.length;i++){if(s.parse(e).host.match(new RegExp("^(?:.*\\.)?"+o.escapeRegexp(x.organics[i].host)+"$","i"))&&s.parse(e).query.match(new RegExp(".*"+o.escapeRegexp(x.organics[i].param)+"=.*","i")))return r=x.organics[i].display||x.organics[i].host,!0;if(i+1===x.organics.length)return!1}}(t);case a.traffic.referral:return!!t&&H(t)&&function(e){if(!(x.referrals.length>0))return r=s.getHost(e),!0;for(var t=0;t<x.referrals.length;t++){if(s.parse(e).host.match(new RegExp("^(?:.*\\.)?"+o.escapeRegexp(x.referrals[t].host)+"$","i")))return r=x.referrals[t].display||x.referrals[t].host,p=x.referrals[t].medium||a.referer.referral,!0;if(t+1===x.referrals.length)return r=s.getHost(e),!0}}(t);default:return!1}}function H(e){if(x.domain){if(q)return s.getHost(e)!==s.getHost(w);var t=new RegExp("^(?:.*\\.)?"+o.escapeRegexp(w)+"$","i");return!s.getHost(e).match(t)}return s.getHost(e)!==s.getHost(document.location.href)}function D(){i.set(n.containers.current_extra,n.pack.extra(x.timezone_offset),I,w,q),i.get(n.containers.first_extra)||i.set(n.containers.first_extra,n.pack.extra(x.timezone_offset),I,w,q)}return i.setBase64Flag(x.base64),u.go(I,w,q),i.set(n.containers.current,function(){var e;if("undefined"!=typeof k.utm_source||"undefined"!=typeof k.utm_medium||"undefined"!=typeof k.utm_campaign||"undefined"!=typeof k.utm_content||"undefined"!=typeof k.utm_term||"undefined"!=typeof k.utm_id||"undefined"!=typeof k.utm_source_platform||"undefined"!=typeof k.utm_creative_format||"undefined"!=typeof k.utm_marketing_tactic||"undefined"!=typeof k.gclid||"undefined"!=typeof k.yclid||"undefined"!=typeof k[x.campaign_param]||"undefined"!=typeof k[x.term_param]||"undefined"!=typeof k[x.content_param])D(),e=j(a.traffic.utm);else if(R(a.traffic.organic))D(),e=j(a.traffic.organic);else if(!i.get(n.containers.session)&&R(a.traffic.referral))D(),e=j(a.traffic.referral);else{if(i.get(n.containers.first)||i.get(n.containers.current))return i.get(n.containers.current);D(),e=j(a.traffic.typein)}return e}(),I,w,q),i.get(n.containers.first)||i.set(n.containers.first,i.get(n.containers.current),I,w,q),i.get(n.containers.udata)?(_=parseInt(i.parse(n.containers.udata)[i.unsbjs(n.containers.udata)][n.aliases.udata.visits])||1,_=i.get(n.containers.session)?_:_+1,v=n.pack.user(_,x.user_ip)):(_=1,v=n.pack.user(_,x.user_ip)),i.set(n.containers.udata,v,I,w,q),i.get(n.containers.session)?(b=parseInt(i.parse(n.containers.session)[i.unsbjs(n.containers.session)][n.aliases.session.pages_seen])||1,b+=1):b=1,i.set(n.containers.session,n.pack.session(b),x.session_length,w,q),x.promocode&&!i.get(n.containers.promocode)&&i.set(n.containers.promocode,n.pack.promo(x.promocode),I,w,q),i.parse(n.containers)}},{"./data":2,"./helpers/cookies":3,"./helpers/uri":4,"./helpers/utils":5,"./migrations":7,"./params":8,"./terms":9}],7:[function(e,t,r){"use strict";var n=e("./data"),a=e("./helpers/cookies");t.exports={go:function(e,t,r){var i,s=this.migrations,o={l:e,d:t,i:r};if(a.get(n.containers.first)||a.get(n.service.migrations)){if(!a.get(n.service.migrations))for(i=0;i<s.length;i++)s[i].go(s[i].id,o)}else{var c=[];for(i=0;i<s.length;i++)c.push(s[i].id);var u="";for(i=0;i<c.length;i++)u+=c[i]+"=1",i<c.length-1&&(u+=n.delimiter);a.set(n.service.migrations,u,o.l,o.d,o.i)}},migrations:[{id:"1418474375998",version:"1.0.0-beta",go:function(e,t){var r=e+"=1",i=e+"=0",s=function(e,t,r){return t||r?e:n.delimiter};try{var o=[];for(var c in n.containers)n.containers.hasOwnProperty(c)&&o.push(n.containers[c]);for(var u=0;u<o.length;u++)if(a.get(o[u])){var p=a.get(o[u]).replace(/(\|)?\|(\|)?/g,s);a.destroy(o[u],t.d,t.i),a.destroy(o[u],t.d,!t.i),a.set(o[u],p,t.l,t.d,t.i)}a.get(n.containers.session)&&a.set(n.containers.session,n.pack.session(0),t.l,t.d,t.i),a.set(n.service.migrations,r,t.l,t.d,t.i)}catch(f){a.set(n.service.migrations,i,t.l,t.d,t.i)}}}]}},{"./data":2,"./helpers/cookies":3}],8:[function(e,t,r){"use strict";var n=e("./terms"),a=e("./helpers/uri");t.exports={fetch:function(e){var t=e||{},r={};if(r.lifetime=this.validate.checkFloat(t.lifetime)||6,r.lifetime=parseInt(30*r.lifetime*24*60),r.session_length=this.validate.checkInt(t.session_length)||30,r.timezone_offset=this.validate.checkInt(t.timezone_offset),r.base64=t.base64||!1,r.campaign_param=t.campaign_param||!1,r.term_param=t.term_param||!1,r.content_param=t.content_param||!1,r.user_ip=t.user_ip||n.none,t.promocode?(r.promocode={},r.promocode.min=parseInt(t.promocode.min)||1e5,r.promocode.max=parseInt(t.promocode.max)||999999):r.promocode=!1,t.typein_attributes&&t.typein_attributes.source&&t.typein_attributes.medium?(r.typein_attributes={},r.typein_attributes.source=t.typein_attributes.source,r.typein_attributes.medium=t.typein_attributes.medium):r.typein_attributes={source:"(direct)",medium:"(none)"},t.domain&&this.validate.isString(t.domain)?r.domain={host:t.domain,isolate:!1}:t.domain&&t.domain.host?r.domain=t.domain:r.domain={host:a.getHost(document.location.hostname),isolate:!1},r.referrals=[],t.referrals&&t.referrals.length>0)for(var i=0;i<t.referrals.length;i++)t.referrals[i].host&&r.referrals.push(t.referrals[i]);if(r.organics=[],t.organics&&t.organics.length>0)for(var s=0;s<t.organics.length;s++)t.organics[s].host&&t.organics[s].param&&r.organics.push(t.organics[s]);return r.organics.push({host:"bing.com",param:"q",display:"bing"}),r.organics.push({host:"yahoo.com",param:"p",display:"yahoo"}),r.organics.push({host:"about.com",param:"q",display:"about"}),r.organics.push({host:"aol.com",param:"q",display:"aol"}),r.organics.push({host:"ask.com",param:"q",display:"ask"}),r.organics.push({host:"globososo.com",param:"q",display:"globo"}),r.organics.push({host:"go.mail.ru",param:"q",display:"go.mail.ru"}),r.organics.push({host:"rambler.ru",param:"query",display:"rambler"}),r.organics.push({host:"tut.by",param:"query",display:"tut.by"}),r.referrals.push({host:"t.co",display:"twitter.com"}),r.referrals.push({host:"plus.url.google.com",display:"plus.google.com"}),r},validate:{checkFloat:function(e){return!(!e||!this.isNumeric(parseFloat(e)))&&parseFloat(e)},checkInt:function(e){return!(!e||!this.isNumeric(parseInt(e)))&&parseInt(e)},isNumeric:function(e){return!isNaN(e)},isString:function(e){return"[object String]"===Object.prototype.toString.call(e)}}}},{"./helpers/uri":4,"./terms":9}],9:[function(e,t,r){"use strict";t.exports={traffic:{utm:"utm",organic:"organic",referral:"referral",typein:"typein"},referer:{referral:"referral",organic:"organic",social:"social"},none:"(none)",oops:"(Houston, we have a problem)"}},{}]},{},[1])(1)});
!function(t){"use strict";const e=t.params,n=(document.querySelector.bind(document),(t,e)=>e.split(".").reduce((t,e)=>t&&t[e],t)),i=()=>null,s=t=>null===t||t===undefined?"":t,o="wc/store/checkout";function a(t){document.querySelectorAll("wc-order-attribution-inputs").forEach((t,e)=>{e>0&&t.remove()});for(const e of document.querySelectorAll("wc-order-attribution-inputs"))e.values=t}function r(t){window.wp&&window.wp.data&&window.wp.data.dispatch&&window.wc&&window.wc.wcBlocksData&&window.wp.data.dispatch(window.wc.wcBlocksData.CHECKOUT_STORE_KEY).setExtensionData("woocommerce/order-attribution",t,!0)}function c(){return"undefined"!=typeof sbjs}function d(){if(window.wp&&window.wp.data&&"function"==typeof window.wp.data.subscribe){const e=window.wp.data.subscribe(function(){e(),r(t.getAttributionData())},o)}}t.getAttributionData=function(){const s=e.allowTracking&&c()?n:i,o=c()?sbjs.get:{},a=Object.entries(t.fields).map(([t,e])=>[t,s(o,e)]);return Object.fromEntries(a)},t.setOrderTracking=function(n){if(e.allowTracking=n,n){if(!c())return;sbjs.init({lifetime:Number(e.lifetime),session_length:Number(e.session),base64:Boolean(e.base64),timezone_offset:"0"})}else!function(){const t=window.location.hostname;["sbjs_current","sbjs_current_add","sbjs_first","sbjs_first_add","sbjs_session","sbjs_udata","sbjs_migrations","sbjs_promo"].forEach(e=>{document.cookie=`${e}=; path=/; max-age=-999; domain=.${t};`})}();const i=t.getAttributionData();a(i),r(i)},t.setOrderTracking(e.allowTracking),"loading"===document.readyState?document.addEventListener("DOMContentLoaded",d):d(),window.customElements.define("wc-order-attribution-inputs",class extends HTMLElement{constructor(){if(super(),this._fieldNames=Object.keys(t.fields),this.hasOwnProperty("_values")){let t=this.values;delete this.values,this.values=t||{}}}connectedCallback(){this.innerHTML="";const t=new DocumentFragment;for(const n of this._fieldNames){const i=document.createElement("input");i.type="hidden",i.name=`${e.prefix}${n}`,i.value=s(this.values&&this.values[n]||""),t.appendChild(i)}this.appendChild(t)}set values(t){if(this._values=t,this.isConnected)for(const t of this._fieldNames){const n=this.querySelector(`input[name="${e.prefix}${t}"]`);n?n.value=s(this.values[t]):console.warn(`Field "${t}" not found. `+"Most likely, the '<wc-order-attribution-inputs>' element was manipulated.")}}get values(){return this._values}})}(window.wc_order_attribution);
window.WpStatisticsUserTracker||(window.WpStatisticsUserTracker={lastUrl:window.location.href,originalPushState:history.pushState,originalReplaceState:history.replaceState,isDndActive:parseInt(navigator.msDoNotTrack||window.doNotTrack||navigator.doNotTrack,10),hasTrackerInitializedOnce:!1,hasUrlChangeTrackerInitialized:!1,hitRequestSuccessful:!0,init:function(){this.hasTrackerInitializedOnce||(this.hasTrackerInitializedOnce=!0,WP_Statistics_Tracker_Object.option.isPreview)||(void 0===WP_Statistics_Tracker_Object?console.error("WP Statistics: Variable WP_Statistics_Tracker_Object not found. Ensure /wp-content/plugins/wp-statistics/assets/js/tracker.js is either excluded from cache settings or not dequeued by any plugin. Clear your cache if necessary."):this.checkHitRequestConditions(),this.trackUrlChange())},base64Encode:function(t){t=(new TextEncoder).encode(t);return btoa(String.fromCharCode.apply(null,t))},getPathAndQueryString:function(){var t=window.location.pathname,e=window.location.search;return this.base64Encode(t+e)},getReferred:function(){return this.base64Encode(document.referrer)},checkHitRequestConditions:function(){!WP_Statistics_Tracker_Object.option.dntEnabled||1!==this.isDndActive?this.sendHitRequest():console.log("WP Statistics: Do Not Track (DNT) is enabled. Hit request not sent.")},sendHitRequest:async function(){try{var t=this.getRequestUrl(),i=new URLSearchParams({...WP_Statistics_Tracker_Object.hitParams,referred:this.getReferred(),page_uri:this.getPathAndQueryString()}).toString();let e=new XMLHttpRequest;e.open("POST",t,!0),e.setRequestHeader("Content-Type","application/x-www-form-urlencoded"),e.send(i),e.onreadystatechange=function(){var t;4===e.readyState&&(200===e.status?(t=JSON.parse(e.responseText),this.hitRequestSuccessful=!1!==t.status):(this.hitRequestSuccessful=!1,console.warn("WP Statistics: Hit request failed with status "+e.status)))}.bind(this)}catch(t){this.hitRequestSuccessful=!1,console.error("WP Statistics: Error sending hit request:",t)}},getRequestUrl:function(){let t=WP_Statistics_Tracker_Object.requestUrl+"/";return WP_Statistics_Tracker_Object.option.bypassAdBlockers?t=WP_Statistics_Tracker_Object.ajaxUrl:t+=WP_Statistics_Tracker_Object.hitParams.endpoint,t},updateTrackerObject:function(s){function r(){var t=document.getElementById("wp-statistics-tracker-js-extra");if(t)try{var e,i=t.innerHTML.match(/var\s+WP_Statistics_Tracker_Object\s*=\s*(\{[\s\S]*?\});/);i&&i[1]&&(e=JSON.parse(i[1]),!WP_Statistics_Tracker_Object.hitParams||JSON.stringify(WP_Statistics_Tracker_Object.hitParams)!==JSON.stringify(e.hitParams))?(WP_Statistics_Tracker_Object=e,!a&&s&&(a=!0,s())):++n<20?setTimeout(r,100):!a&&s&&(a=!0,s())}catch(t){console.error("WP Statistics: Error parsing WP_Statistics_Tracker_Object",t),!a&&s&&(a=!0,s())}else++n<20?setTimeout(r,100):!a&&s&&(a=!0,s())}let a=!1,n=0;setTimeout(r,50)},trackUrlChange:function(){if(!this.hasUrlChangeTrackerInitialized){this.hasUrlChangeTrackerInitialized=!0;let t=this;window.removeEventListener("popstate",t.handleUrlChange),history.pushState=function(){t.originalPushState.apply(history,arguments),t.handleUrlChange()},history.replaceState=function(){t.originalReplaceState.apply(history,arguments),t.handleUrlChange()},window.addEventListener("popstate",function(){t.handleUrlChange()})}},handleUrlChange:function(){let t=this;window.location.href!==this.lastUrl&&(this.lastUrl=window.location.href,this.updateTrackerObject(function(){t.checkHitRequestConditions()}))}});
window.WpStatisticsEventTracker||(window.WpStatisticsEventTracker={hasEventsInitializedOnce:!1,downloadTracker:!1,linkTracker:!1,init:async function(){this.hasEventsInitializedOnce||WP_Statistics_Tracker_Object.isLegacyEventLoaded||(this.hasEventsInitializedOnce=!0,"undefined"!=typeof WP_Statistics_DataPlus_Event_Object&&(this.downloadTracker=WP_Statistics_DataPlus_Event_Object.options.downloadTracker,this.linkTracker=WP_Statistics_DataPlus_Event_Object.options.linkTracker,this.downloadTracker||this.linkTracker)&&this.captureEvent(),window.wp_statistics_event=this.handleCustomEvent.bind(this),"undefined"!=typeof WP_Statistics_Marketing_Event_Object&&this.captureCustomClickEvents())},handleCustomEvent:function(t,e={}){var n=WP_Statistics_Tracker_Object.customEventAjaxUrl,t=(e.timestamp=Date.now(),e.resource_id||(e.resource_id=WP_Statistics_Tracker_Object.hitParams.source_id),{event_name:t,event_data:JSON.stringify(e)});this.sendEventData(t,n)},captureCustomClickEvents:function(){WP_Statistics_Marketing_Event_Object.events.clicks.forEach(e=>{!e.selector||null!=e.scope&&e.scope!=WP_Statistics_Tracker_Object.hitParams.source_id||document.querySelectorAll(""+e.selector).forEach(t=>{t.addEventListener("click",t=>{t={text:t.target.textContent,id:t.currentTarget.id,class:t.currentTarget.className,target:t.currentTarget.href};this.handleCustomEvent(e.name,t)})})})},captureEvent:function(){document.querySelectorAll("a").forEach(t=>{t.addEventListener("click",async t=>this.handleEvent(t)),t.addEventListener("mouseup",async t=>this.handleEvent(t))})},handleEvent:async function(t){var e;"mouseup"==t.type&&1!=t.button||(t=this.prepareEventData(t))&&(e=WP_Statistics_DataPlus_Event_Object.eventAjaxUrl,await this.sendEventData(t,e))},prepareEventData:function(t){let e={en:t.type,et:Date.now(),eid:t.currentTarget.id,ec:t.currentTarget.className,ev:"",mb:t.button,fn:"",fx:"",m:"",tu:"",pid:""};return"A"===t.currentTarget.tagName&&(e=this.extractLinkData(t,e)),"undefined"!=typeof WP_Statistics_Tracker_Object&&(e.pid=WP_Statistics_Tracker_Object.hitParams.source_id),e},extractLinkData(t,e){var n=t.target.textContent,a=t.currentTarget.href,i=WP_Statistics_DataPlus_Event_Object.fileExtensions,i=new RegExp("\\.("+i.join("|")+")$","i"),n=(n&&(e.ev=n),a&&(e.tu=a),t.currentTarget.classList.contains("woocommerce-MyAccount-downloads-file")||a.includes("download_file="));if(e.wcdl=n,(i.test(a)||n)&&(t=new URL(a).pathname,e.df=n?a.substring(a.lastIndexOf("download_file=")+14).split("&").shift():"",e.dk=n?a.substring(a.lastIndexOf("key=")+4).split("&").shift():"",e.en="file_download",e.fn=n?e.df:t.substring(t.lastIndexOf("/")+1).split(".").shift(),e.fx=n?e.df:t.split(".").pop()),"click"===e.en){if(!this.linkTracker)return!1;try{if(new URL(a).host===window.location.host)return!1}catch(t){}}return!("file_download"===e.en&&!this.downloadTracker)&&e},sendEventData:async function(t,e){var n,a=new URLSearchParams;for(n in t)a.append(n,t[n]);if(!e)throw new Error("AJAX URL is not defined.");try{(await fetch(e,{method:"POST",keepalive:!0,body:a})).ok}catch(t){console.error("Error:",t)}}});
function handleWpConsentApiIntegration(){(wp_has_consent("statistics")||wp_has_consent("statistics-anonymous"))&&(WpStatisticsUserTracker.init(),WpStatisticsEventTracker.init()),document.addEventListener("wp_listen_for_consent_change",function(t){var n,i=t.detail;for(n in i)!i.hasOwnProperty(n)||"statistics"!==n&&"statistics-anonymous"!==n||"allow"!==i[n]||(WpStatisticsUserTracker.init(),WpStatisticsEventTracker.init())})}function handleRealCookieBannerIntegration(){(window.consentApi?.consent("wp-statistics")||Promise.resolve()).then(()=>{WpStatisticsUserTracker.init(),WpStatisticsEventTracker.init()}).catch(()=>{var t=window.consentApi?.consentSync("wp-statistics-with-data-processing");null!=t.cookie&&t.cookieOptIn?(WpStatisticsUserTracker.init(),WpStatisticsEventTracker.init()):console.log("WP Statistics: Real Cookie Banner consent is not given to track visitor information.")})}document.addEventListener("DOMContentLoaded",function t(){var n;document.prerendering?document.addEventListener("prerenderingchange",t,{once:!0}):((n=WP_Statistics_Tracker_Object.option.consentIntegration.name)&&"borlabs_cookie"!==n||(WpStatisticsUserTracker.init(),WpStatisticsEventTracker.init()),"wp_consent_api"===n&&handleWpConsentApiIntegration(),"real_cookie_banner"===n&&handleRealCookieBannerIntegration())});
(()=>{var e={539(e){var t={utf8:{stringToBytes:function(e){return t.bin.stringToBytes(unescape(encodeURIComponent(e)))},bytesToString:function(e){return decodeURIComponent(escape(t.bin.bytesToString(e)))}},bin:{stringToBytes:function(e){for(var t=[],n=0;n<e.length;n++)t.push(255&e.charCodeAt(n));return t},bytesToString:function(e){for(var t=[],n=0;n<e.length;n++)t.push(String.fromCharCode(e[n]));return t.join("")}}};e.exports=t},635(e){var t,n;t="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/",n={rotl:function(e,t){return e<<t|e>>>32-t},rotr:function(e,t){return e<<32-t|e>>>t},endian:function(e){if(e.constructor==Number)return 16711935&n.rotl(e,8)|4278255360&n.rotl(e,24);for(var t=0;t<e.length;t++)e[t]=n.endian(e[t]);return e},randomBytes:function(e){for(var t=[];e>0;e--)t.push(Math.floor(256*Math.random()));return t},bytesToWords:function(e){for(var t=[],n=0,o=0;n<e.length;n++,o+=8)t[o>>>5]|=e[n]<<24-o%32;return t},wordsToBytes:function(e){for(var t=[],n=0;n<32*e.length;n+=8)t.push(e[n>>>5]>>>24-n%32&255);return t},bytesToHex:function(e){for(var t=[],n=0;n<e.length;n++)t.push((e[n]>>>4).toString(16)),t.push((15&e[n]).toString(16));return t.join("")},hexToBytes:function(e){for(var t=[],n=0;n<e.length;n+=2)t.push(parseInt(e.substr(n,2),16));return t},bytesToBase64:function(e){for(var n=[],o=0;o<e.length;o+=3)for(var r=e[o]<<16|e[o+1]<<8|e[o+2],a=0;a<4;a++)8*o+6*a<=8*e.length?n.push(t.charAt(r>>>6*(3-a)&63)):n.push("=");return n.join("")},base64ToBytes:function(e){e=e.replace(/[^A-Z0-9+\/]/gi,"");for(var n=[],o=0,r=0;o<e.length;r=++o%4)0!=r&&n.push((t.indexOf(e.charAt(o-1))&Math.pow(2,-2*r+8)-1)<<2*r|t.indexOf(e.charAt(o))>>>6-2*r);return n}},e.exports=n},445(e){function t(e){return!!e.constructor&&"function"==typeof e.constructor.isBuffer&&e.constructor.isBuffer(e)}e.exports=function(e){return null!=e&&(t(e)||function(e){return"function"==typeof e.readFloatLE&&"function"==typeof e.slice&&t(e.slice(0,0))}(e)||!!e._isBuffer)}},892(e,t,n){var o,r,a,s,l;o=n(635),r=n(539).utf8,a=n(445),s=n(539).bin,(l=function(e,t){e.constructor==String?e=t&&"binary"===t.encoding?s.stringToBytes(e):r.stringToBytes(e):a(e)?e=Array.prototype.slice.call(e,0):Array.isArray(e)||e.constructor===Uint8Array||(e=e.toString());for(var n=o.bytesToWords(e),i=8*e.length,c=1732584193,_=-271733879,u=-1732584194,p=271733878,d=0;d<n.length;d++)n[d]=16711935&(n[d]<<8|n[d]>>>24)|4278255360&(n[d]<<24|n[d]>>>8);n[i>>>5]|=128<<i%32,n[14+(i+64>>>9<<4)]=i;var f=l._ff,m=l._gg,h=l._hh,v=l._ii;for(d=0;d<n.length;d+=16){var g=c,y=_,b=u,w=p;c=f(c,_,u,p,n[d+0],7,-680876936),p=f(p,c,_,u,n[d+1],12,-389564586),u=f(u,p,c,_,n[d+2],17,606105819),_=f(_,u,p,c,n[d+3],22,-1044525330),c=f(c,_,u,p,n[d+4],7,-176418897),p=f(p,c,_,u,n[d+5],12,1200080426),u=f(u,p,c,_,n[d+6],17,-1473231341),_=f(_,u,p,c,n[d+7],22,-45705983),c=f(c,_,u,p,n[d+8],7,1770035416),p=f(p,c,_,u,n[d+9],12,-1958414417),u=f(u,p,c,_,n[d+10],17,-42063),_=f(_,u,p,c,n[d+11],22,-1990404162),c=f(c,_,u,p,n[d+12],7,1804603682),p=f(p,c,_,u,n[d+13],12,-40341101),u=f(u,p,c,_,n[d+14],17,-1502002290),c=m(c,_=f(_,u,p,c,n[d+15],22,1236535329),u,p,n[d+1],5,-165796510),p=m(p,c,_,u,n[d+6],9,-1069501632),u=m(u,p,c,_,n[d+11],14,643717713),_=m(_,u,p,c,n[d+0],20,-373897302),c=m(c,_,u,p,n[d+5],5,-701558691),p=m(p,c,_,u,n[d+10],9,38016083),u=m(u,p,c,_,n[d+15],14,-660478335),_=m(_,u,p,c,n[d+4],20,-405537848),c=m(c,_,u,p,n[d+9],5,568446438),p=m(p,c,_,u,n[d+14],9,-1019803690),u=m(u,p,c,_,n[d+3],14,-187363961),_=m(_,u,p,c,n[d+8],20,1163531501),c=m(c,_,u,p,n[d+13],5,-1444681467),p=m(p,c,_,u,n[d+2],9,-51403784),u=m(u,p,c,_,n[d+7],14,1735328473),c=h(c,_=m(_,u,p,c,n[d+12],20,-1926607734),u,p,n[d+5],4,-378558),p=h(p,c,_,u,n[d+8],11,-2022574463),u=h(u,p,c,_,n[d+11],16,1839030562),_=h(_,u,p,c,n[d+14],23,-35309556),c=h(c,_,u,p,n[d+1],4,-1530992060),p=h(p,c,_,u,n[d+4],11,1272893353),u=h(u,p,c,_,n[d+7],16,-155497632),_=h(_,u,p,c,n[d+10],23,-1094730640),c=h(c,_,u,p,n[d+13],4,681279174),p=h(p,c,_,u,n[d+0],11,-358537222),u=h(u,p,c,_,n[d+3],16,-722521979),_=h(_,u,p,c,n[d+6],23,76029189),c=h(c,_,u,p,n[d+9],4,-640364487),p=h(p,c,_,u,n[d+12],11,-421815835),u=h(u,p,c,_,n[d+15],16,530742520),c=v(c,_=h(_,u,p,c,n[d+2],23,-995338651),u,p,n[d+0],6,-198630844),p=v(p,c,_,u,n[d+7],10,1126891415),u=v(u,p,c,_,n[d+14],15,-1416354905),_=v(_,u,p,c,n[d+5],21,-57434055),c=v(c,_,u,p,n[d+12],6,1700485571),p=v(p,c,_,u,n[d+3],10,-1894986606),u=v(u,p,c,_,n[d+10],15,-1051523),_=v(_,u,p,c,n[d+1],21,-2054922799),c=v(c,_,u,p,n[d+8],6,1873313359),p=v(p,c,_,u,n[d+15],10,-30611744),u=v(u,p,c,_,n[d+6],15,-1560198380),_=v(_,u,p,c,n[d+13],21,1309151649),c=v(c,_,u,p,n[d+4],6,-145523070),p=v(p,c,_,u,n[d+11],10,-1120210379),u=v(u,p,c,_,n[d+2],15,718787259),_=v(_,u,p,c,n[d+9],21,-343485551),c=c+g>>>0,_=_+y>>>0,u=u+b>>>0,p=p+w>>>0}return o.endian([c,_,u,p])})._ff=function(e,t,n,o,r,a,s){var l=e+(t&n|~t&o)+(r>>>0)+s;return(l<<a|l>>>32-a)+t},l._gg=function(e,t,n,o,r,a,s){var l=e+(t&o|n&~o)+(r>>>0)+s;return(l<<a|l>>>32-a)+t},l._hh=function(e,t,n,o,r,a,s){var l=e+(t^n^o)+(r>>>0)+s;return(l<<a|l>>>32-a)+t},l._ii=function(e,t,n,o,r,a,s){var l=e+(n^(t|~o))+(r>>>0)+s;return(l<<a|l>>>32-a)+t},l._blocksize=16,l._digestsize=16,e.exports=function(e,t){if(null==e)throw new Error("Illegal argument "+e);var n=o.wordsToBytes(l(e,t));return t&&t.asBytes?n:t&&t.asString?s.bytesToString(n):o.bytesToHex(n)}},500(e,t){var n;!function(){"use strict";var o={}.hasOwnProperty;function r(){for(var e="",t=0;t<arguments.length;t++){var n=arguments[t];n&&(e=s(e,a(n)))}return e}function a(e){if("string"==typeof e||"number"==typeof e)return e;if("object"!=typeof e)return"";if(Array.isArray(e))return r.apply(null,e);if(e.toString!==Object.prototype.toString&&!e.toString.toString().includes("[native code]"))return e.toString();var t="";for(var n in e)o.call(e,n)&&e[n]&&(t=s(t,n));return t}function s(e,t){return t?e?e+" "+t:e+t:e}e.exports?(r.default=r,e.exports=r):void 0===(n=function(){return r}.apply(t,[]))||(e.exports=n)}()}},t={};function n(o){var r=t[o];if(void 0!==r)return r.exports;var a=t[o]={exports:{}};return e[o](a,a.exports,n),a.exports}n.n=e=>{var t=e&&e.__esModule?()=>e.default:()=>e;return n.d(t,{a:t}),t},n.d=(e,t)=>{for(var o in t)n.o(t,o)&&!n.o(e,o)&&Object.defineProperty(e,o,{enumerable:!0,get:t[o]})},n.o=(e,t)=>Object.prototype.hasOwnProperty.call(e,t),(()=>{"use strict";var e,t,o,r,a,s,l,i,c,_,u,p,d,f,m,h={},v=[],g=/acit|ex(?:s|g|n|p|$)|rph|grid|ows|mnc|ntw|ine[ch]|zoo|^ord|itera/i,y=Array.isArray;function b(e,t){for(var n in t)e[n]=t[n];return e}function w(e){e&&e.parentNode&&e.parentNode.removeChild(e)}function C(t,n,o){var r,a,s,l={};for(s in n)"key"==s?r=n[s]:"ref"==s?a=n[s]:l[s]=n[s];if(arguments.length>2&&(l.children=arguments.length>3?e.call(arguments,2):o),"function"==typeof t&&null!=t.defaultProps)for(s in t.defaultProps)void 0===l[s]&&(l[s]=t.defaultProps[s]);return S(t,l,r,a,null)}function S(e,n,r,a,s){var l={type:e,props:n,key:r,ref:a,__k:null,__:null,__b:0,__e:null,__c:null,constructor:void 0,__v:null==s?++o:s,__i:-1,__u:0};return null==s&&null!=t.vnode&&t.vnode(l),l}function N(e){return e.children}function T(e,t){this.props=e,this.context=t}function x(e,t){if(null==t)return e.__?x(e.__,e.__i+1):null;for(var n;t<e.__k.length;t++)if(null!=(n=e.__k[t])&&null!=n.__e)return n.__e;return"function"==typeof e.type?x(e):null}function E(e){if(e.__P&&e.__d){var n=e.__v,o=n.__e,r=[],a=[],s=b({},n);s.__v=n.__v+1,t.vnode&&t.vnode(s),U(e.__P,s,n,e.__n,e.__P.namespaceURI,32&n.__u?[o]:null,r,null==o?x(n):o,!!(32&n.__u),a),s.__v=n.__v,s.__.__k[s.__i]=s,$(r,s,a),n.__e=n.__=null,s.__e!=o&&A(s)}}function A(e){if(null!=(e=e.__)&&null!=e.__c)return e.__e=e.__c.base=null,e.__k.some(function(t){if(null!=t&&null!=t.__e)return e.__e=e.__c.base=t.__e}),A(e)}function I(e){(!e.__d&&(e.__d=!0)&&r.push(e)&&!k.__r++||a!=t.debounceRendering)&&((a=t.debounceRendering)||s)(k)}function k(){try{for(var e,t=1;r.length;)r.length>t&&r.sort(l),e=r.shift(),t=r.length,E(e)}finally{r.length=k.__r=0}}function q(e,t,n,o,r,a,s,l,i,c,_){var u,p,d,f,m,g,y,b=o&&o.__k||v,w=t.length;for(i=O(n,t,b,i,w),u=0;u<w;u++)null!=(d=n.__k[u])&&(p=-1!=d.__i&&b[d.__i]||h,d.__i=u,g=U(e,d,p,r,a,s,l,i,c,_),f=d.__e,d.ref&&p.ref!=d.ref&&(p.ref&&V(p.ref,null,d),_.push(d.ref,d.__c||f,d)),null==m&&null!=f&&(m=f),(y=!!(4&d.__u))||p.__k===d.__k?(i=R(d,i,e,y),y&&p.__e&&(p.__e=null)):"function"==typeof d.type&&void 0!==g?i=g:f&&(i=f.nextSibling),d.__u&=-7);return n.__e=m,i}function O(e,t,n,o,r){var a,s,l,i,c,_=n.length,u=_,p=0;for(e.__k=new Array(r),a=0;a<r;a++)null!=(s=t[a])&&"boolean"!=typeof s&&"function"!=typeof s?("string"==typeof s||"number"==typeof s||"bigint"==typeof s||s.constructor==String?s=e.__k[a]=S(null,s,null,null,null):y(s)?s=e.__k[a]=S(N,{children:s},null,null,null):void 0===s.constructor&&s.__b>0?s=e.__k[a]=S(s.type,s.props,s.key,s.ref?s.ref:null,s.__v):e.__k[a]=s,i=a+p,s.__=e,s.__b=e.__b+1,l=null,-1!=(c=s.__i=L(s,n,i,u))&&(u--,(l=n[c])&&(l.__u|=2)),null==l||null==l.__v?(-1==c&&(r>_?p--:r<_&&p++),"function"!=typeof s.type&&(s.__u|=4)):c!=i&&(c==i-1?p--:c==i+1?p++:(c>i?p--:p++,s.__u|=4))):e.__k[a]=null;if(u)for(a=0;a<_;a++)null!=(l=n[a])&&!(2&l.__u)&&(l.__e==o&&(o=x(l)),W(l,l));return o}function R(e,t,n,o){var r,a;if("function"==typeof e.type){for(r=e.__k,a=0;r&&a<r.length;a++)r[a]&&(r[a].__=e,t=R(r[a],t,n,o));return t}e.__e!=t&&(o&&(t&&e.type&&!t.parentNode&&(t=x(e)),n.insertBefore(e.__e,t||null)),t=e.__e);do{t=t&&t.nextSibling}while(null!=t&&8==t.nodeType);return t}function M(e,t){return t=t||[],null==e||"boolean"==typeof e||(y(e)?e.some(function(e){M(e,t)}):t.push(e)),t}function L(e,t,n,o){var r,a,s,l=e.key,i=e.type,c=t[n],_=null!=c&&!(2&c.__u);if(null===c&&null==l||_&&l==c.key&&i==c.type)return n;if(o>(_?1:0))for(r=n-1,a=n+1;r>=0||a<t.length;)if(null!=(c=t[s=r>=0?r--:a++])&&!(2&c.__u)&&l==c.key&&i==c.type)return s;return-1}function P(e,t,n){"-"==t[0]?e.setProperty(t,null==n?"":n):e[t]=null==n?"":"number"!=typeof n||g.test(t)?n:n+"px"}function D(e,t,n,o,r){var a,s;e:if("style"==t)if("string"==typeof n)e.style.cssText=n;else{if("string"==typeof o&&(e.style.cssText=o=""),o)for(t in o)n&&t in n||P(e.style,t,"");if(n)for(t in n)o&&n[t]==o[t]||P(e.style,t,n[t])}else if("o"==t[0]&&"n"==t[1])a=t!=(t=t.replace(u,"$1")),s=t.toLowerCase(),t=s in e||"onFocusOut"==t||"onFocusIn"==t?s.slice(2):t.slice(2),e.l||(e.l={}),e.l[t+a]=n,n?o?n[_]=o[_]:(n[_]=p,e.addEventListener(t,a?f:d,a)):e.removeEventListener(t,a?f:d,a);else{if("http://www.w3.org/2000/svg"==r)t=t.replace(/xlink(H|:h)/,"h").replace(/sName$/,"s");else if("width"!=t&&"height"!=t&&"href"!=t&&"list"!=t&&"form"!=t&&"tabIndex"!=t&&"download"!=t&&"rowSpan"!=t&&"colSpan"!=t&&"role"!=t&&"popover"!=t&&t in e)try{e[t]=null==n?"":n;break e}catch(e){}"function"==typeof n||(null==n||!1===n&&"-"!=t[4]?e.removeAttribute(t):e.setAttribute(t,"popover"==t&&1==n?"":n))}}function H(e){return function(n){if(this.l){var o=this.l[n.type+e];if(null==n[c])n[c]=p++;else if(n[c]<o[_])return;return o(t.event?t.event(n):n)}}}function U(e,n,o,r,a,s,l,i,c,_){var u,p,d,f,m,h,g,C,S,x,E,A,I,k,O,R=n.type;if(void 0!==n.constructor)return null;128&o.__u&&(c=!!(32&o.__u),s=[i=n.__e=o.__e]),(u=t.__b)&&u(n);e:if("function"==typeof R)try{if(C=n.props,S=R.prototype&&R.prototype.render,x=(u=R.contextType)&&r[u.__c],E=u?x?x.props.value:u.__:r,o.__c?g=(p=n.__c=o.__c).__=p.__E:(S?n.__c=p=new R(C,E):(n.__c=p=new T(C,E),p.constructor=R,p.render=K),x&&x.sub(p),p.state||(p.state={}),p.__n=r,d=p.__d=!0,p.__h=[],p._sb=[]),S&&null==p.__s&&(p.__s=p.state),S&&null!=R.getDerivedStateFromProps&&(p.__s==p.state&&(p.__s=b({},p.__s)),b(p.__s,R.getDerivedStateFromProps(C,p.__s))),f=p.props,m=p.state,p.__v=n,d)S&&null==R.getDerivedStateFromProps&&null!=p.componentWillMount&&p.componentWillMount(),S&&null!=p.componentDidMount&&p.__h.push(p.componentDidMount);else{if(S&&null==R.getDerivedStateFromProps&&C!==f&&null!=p.componentWillReceiveProps&&p.componentWillReceiveProps(C,E),n.__v==o.__v||!p.__e&&null!=p.shouldComponentUpdate&&!1===p.shouldComponentUpdate(C,p.__s,E)){n.__v!=o.__v&&(p.props=C,p.state=p.__s,p.__d=!1),n.__e=o.__e,n.__k=o.__k,n.__k.some(function(e){e&&(e.__=n)}),v.push.apply(p.__h,p._sb),p._sb=[],p.__h.length&&l.push(p);break e}null!=p.componentWillUpdate&&p.componentWillUpdate(C,p.__s,E),S&&null!=p.componentDidUpdate&&p.__h.push(function(){p.componentDidUpdate(f,m,h)})}if(p.context=E,p.props=C,p.__P=e,p.__e=!1,A=t.__r,I=0,S)p.state=p.__s,p.__d=!1,A&&A(n),u=p.render(p.props,p.state,p.context),v.push.apply(p.__h,p._sb),p._sb=[];else do{p.__d=!1,A&&A(n),u=p.render(p.props,p.state,p.context),p.state=p.__s}while(p.__d&&++I<25);p.state=p.__s,null!=p.getChildContext&&(r=b(b({},r),p.getChildContext())),S&&!d&&null!=p.getSnapshotBeforeUpdate&&(h=p.getSnapshotBeforeUpdate(f,m)),k=null!=u&&u.type===N&&null==u.key?G(u.props.children):u,i=q(e,y(k)?k:[k],n,o,r,a,s,l,i,c,_),p.base=n.__e,n.__u&=-161,p.__h.length&&l.push(p),g&&(p.__E=p.__=null)}catch(e){if(n.__v=null,c||null!=s)if(e.then){for(n.__u|=c?160:128;i&&8==i.nodeType&&i.nextSibling;)i=i.nextSibling;s[s.indexOf(i)]=null,n.__e=i}else{for(O=s.length;O--;)w(s[O]);B(n)}else n.__e=o.__e,n.__k=o.__k,e.then||B(n);t.__e(e,n,o)}else null==s&&n.__v==o.__v?(n.__k=o.__k,n.__e=o.__e):i=n.__e=F(o.__e,n,o,r,a,s,l,c,_);return(u=t.diffed)&&u(n),128&n.__u?void 0:i}function B(e){e&&(e.__c&&(e.__c.__e=!0),e.__k&&e.__k.some(B))}function $(e,n,o){for(var r=0;r<o.length;r++)V(o[r],o[++r],o[++r]);t.__c&&t.__c(n,e),e.some(function(n){try{e=n.__h,n.__h=[],e.some(function(e){e.call(n)})}catch(e){t.__e(e,n.__v)}})}function G(e){return"object"!=typeof e||null==e||e.__b>0?e:y(e)?e.map(G):b({},e)}function F(n,o,r,a,s,l,i,c,_){var u,p,d,f,m,v,g,b=r.props||h,C=o.props,S=o.type;if("svg"==S?s="http://www.w3.org/2000/svg":"math"==S?s="http://www.w3.org/1998/Math/MathML":s||(s="http://www.w3.org/1999/xhtml"),null!=l)for(u=0;u<l.length;u++)if((m=l[u])&&"setAttribute"in m==!!S&&(S?m.localName==S:3==m.nodeType)){n=m,l[u]=null;break}if(null==n){if(null==S)return document.createTextNode(C);n=document.createElementNS(s,S,C.is&&C),c&&(t.__m&&t.__m(o,l),c=!1),l=null}if(null==S)b===C||c&&n.data==C||(n.data=C);else{if(l=l&&e.call(n.childNodes),!c&&null!=l)for(b={},u=0;u<n.attributes.length;u++)b[(m=n.attributes[u]).name]=m.value;for(u in b)m=b[u],"dangerouslySetInnerHTML"==u?d=m:"children"==u||u in C||"value"==u&&"defaultValue"in C||"checked"==u&&"defaultChecked"in C||D(n,u,null,m,s);for(u in C)m=C[u],"children"==u?f=m:"dangerouslySetInnerHTML"==u?p=m:"value"==u?v=m:"checked"==u?g=m:c&&"function"!=typeof m||b[u]===m||D(n,u,m,b[u],s);if(p)c||d&&(p.__html==d.__html||p.__html==n.innerHTML)||(n.innerHTML=p.__html),o.__k=[];else if(d&&(n.innerHTML=""),q("template"==o.type?n.content:n,y(f)?f:[f],o,r,a,"foreignObject"==S?"http://www.w3.org/1999/xhtml":s,l,i,l?l[0]:r.__k&&x(r,0),c,_),null!=l)for(u=l.length;u--;)w(l[u]);c||(u="value","progress"==S&&null==v?n.removeAttribute("value"):null!=v&&(v!==n[u]||"progress"==S&&!v||"option"==S&&v!=b[u])&&D(n,u,v,b[u],s),u="checked",null!=g&&g!=n[u]&&D(n,u,g,b[u],s))}return n}function V(e,n,o){try{if("function"==typeof e){var r="function"==typeof e.__u;r&&e.__u(),r&&null==n||(e.__u=e(n))}else e.current=n}catch(e){t.__e(e,o)}}function W(e,n,o){var r,a;if(t.unmount&&t.unmount(e),(r=e.ref)&&(r.current&&r.current!=e.__e||V(r,null,n)),null!=(r=e.__c)){if(r.componentWillUnmount)try{r.componentWillUnmount()}catch(e){t.__e(e,n)}r.base=r.__P=null}if(r=e.__k)for(a=0;a<r.length;a++)r[a]&&W(r[a],n,o||"function"!=typeof e.type);o||w(e.__e),e.__c=e.__=e.__e=void 0}function K(e,t,n){return this.constructor(e,n)}function Z(n,o,r){var a,s,l,i;o==document&&(o=document.documentElement),t.__&&t.__(n,o),s=(a="function"==typeof r)?null:r&&r.__k||o.__k,l=[],i=[],U(o,n=(!a&&r||o).__k=C(N,null,[n]),s||h,h,o.namespaceURI,!a&&r?[r]:s?null:o.firstChild?e.call(o.childNodes):null,l,!a&&r?r:s?s.__e:o.firstChild,a,i),$(l,n,i)}e=v.slice,t={__e:function(e,t,n,o){for(var r,a,s;t=t.__;)if((r=t.__c)&&!r.__)try{if((a=r.constructor)&&null!=a.getDerivedStateFromError&&(r.setState(a.getDerivedStateFromError(e)),s=r.__d),null!=r.componentDidCatch&&(r.componentDidCatch(e,o||{}),s=r.__d),s)return r.__E=r}catch(t){e=t}throw e}},o=0,T.prototype.setState=function(e,t){var n;n=null!=this.__s&&this.__s!=this.state?this.__s:this.__s=b({},this.state),"function"==typeof e&&(e=e(b({},n),this.props)),e&&b(n,e),null!=e&&this.__v&&(t&&this._sb.push(t),I(this))},T.prototype.forceUpdate=function(e){this.__v&&(this.__e=!0,e&&this.__h.push(e),I(this))},T.prototype.render=N,r=[],s="function"==typeof Promise?Promise.prototype.then.bind(Promise.resolve()):setTimeout,l=function(e,t){return e.__v.__b-t.__v.__b},k.__r=0,i=Math.random().toString(8),c="__d"+i,_="__a"+i,u=/(PointerCapture)$|Capture$/i,p=0,d=H(!1),f=H(!0),m=0;var j,z,J,Y,X=0,Q=[],ee=t,te=ee.__b,ne=ee.__r,oe=ee.diffed,re=ee.__c,ae=ee.unmount,se=ee.__;function le(e,t){ee.__h&&ee.__h(z,e,X||t),X=0;var n=z.__H||(z.__H={__:[],__h:[]});return e>=n.__.length&&n.__.push({}),n.__[e]}function ie(e){return X=1,ce(be,e)}function ce(e,t,n){var o=le(j++,2);if(o.t=e,!o.__c&&(o.__=[n?n(t):be(void 0,t),function(e){var t=o.__N?o.__N[0]:o.__[0],n=o.t(t,e);t!==n&&(o.__N=[n,o.__[1]],o.__c.setState({}))}],o.__c=z,!z.__f)){var r=function(e,t,n){if(!o.__c.__H)return!0;var r=o.__c.__H.__.filter(function(e){return e.__c});if(r.every(function(e){return!e.__N}))return!a||a.call(this,e,t,n);var s=o.__c.props!==e;return r.some(function(e){if(e.__N){var t=e.__[0];e.__=e.__N,e.__N=void 0,t!==e.__[0]&&(s=!0)}}),a&&a.call(this,e,t,n)||s};z.__f=!0;var a=z.shouldComponentUpdate,s=z.componentWillUpdate;z.componentWillUpdate=function(e,t,n){if(this.__e){var o=a;a=void 0,r(e,t,n),a=o}s&&s.call(this,e,t,n)},z.shouldComponentUpdate=r}return o.__N||o.__}function _e(e,t){var n=le(j++,3);!ee.__s&&ye(n.__H,t)&&(n.__=e,n.u=t,z.__H.__h.push(n))}function ue(e){return X=5,pe(function(){return{current:e}},[])}function pe(e,t){var n=le(j++,7);return ye(n.__H,t)&&(n.__=e(),n.__H=t,n.__h=e),n.__}function de(e,t){return X=8,pe(function(){return e},t)}function fe(){for(var e;e=Q.shift();){var t=e.__H;if(e.__P&&t)try{t.__h.some(ve),t.__h.some(ge),t.__h=[]}catch(n){t.__h=[],ee.__e(n,e.__v)}}}ee.__b=function(e){z=null,te&&te(e)},ee.__=function(e,t){e&&t.__k&&t.__k.__m&&(e.__m=t.__k.__m),se&&se(e,t)},ee.__r=function(e){ne&&ne(e),j=0;var t=(z=e.__c).__H;t&&(J===z?(t.__h=[],z.__h=[],t.__.some(function(e){e.__N&&(e.__=e.__N),e.u=e.__N=void 0})):(t.__h.some(ve),t.__h.some(ge),t.__h=[],j=0)),J=z},ee.diffed=function(e){oe&&oe(e);var t=e.__c;t&&t.__H&&(t.__H.__h.length&&(1!==Q.push(t)&&Y===ee.requestAnimationFrame||((Y=ee.requestAnimationFrame)||he)(fe)),t.__H.__.some(function(e){e.u&&(e.__H=e.u),e.u=void 0})),J=z=null},ee.__c=function(e,t){t.some(function(e){try{e.__h.some(ve),e.__h=e.__h.filter(function(e){return!e.__||ge(e)})}catch(n){t.some(function(e){e.__h&&(e.__h=[])}),t=[],ee.__e(n,e.__v)}}),re&&re(e,t)},ee.unmount=function(e){ae&&ae(e);var t,n=e.__c;n&&n.__H&&(n.__H.__.some(function(e){try{ve(e)}catch(e){t=e}}),n.__H=void 0,t&&ee.__e(t,n.__v))};var me="function"==typeof requestAnimationFrame;function he(e){var t,n=function(){clearTimeout(o),me&&cancelAnimationFrame(t),setTimeout(e)},o=setTimeout(n,35);me&&(t=requestAnimationFrame(n))}function ve(e){var t=z,n=e.__c;"function"==typeof n&&(e.__c=void 0,n()),z=t}function ge(e){var t=z;e.__c=e.__(),z=t}function ye(e,t){return!e||e.length!==t.length||t.some(function(t,n){return t!==e[n]})}function be(e,t){return"function"==typeof t?t(e):t}function we(e,t){for(var n in t)e[n]=t[n];return e}function Ce(e,t){for(var n in e)if("__source"!==n&&!(n in t))return!0;for(var o in t)if("__source"!==o&&e[o]!==t[o])return!0;return!1}function Se(e,t){this.props=e,this.context=t}(Se.prototype=new T).isPureReactComponent=!0,Se.prototype.shouldComponentUpdate=function(e,t){return Ce(this.props,e)||Ce(this.state,t)};var Ne=t.__b;t.__b=function(e){e.type&&e.type.__f&&e.ref&&(e.props.ref=e.ref,e.ref=null),Ne&&Ne(e)};var Te="undefined"!=typeof Symbol&&Symbol.for&&Symbol.for("react.forward_ref")||3911;function xe(e){function t(t){var n=we({},t);return delete n.ref,e(n,t.ref||null)}return t.$$typeof=Te,t.render=e,t.prototype.isReactComponent=t.__f=!0,t.displayName="ForwardRef("+(e.displayName||e.name)+")",t}var Ee=t.__e;t.__e=function(e,t,n,o){if(e.then)for(var r,a=t;a=a.__;)if((r=a.__c)&&r.__c)return null==t.__e&&(t.__e=n.__e,t.__k=n.__k),r.__c(e,t);Ee(e,t,n,o)};var Ae=t.unmount;function Ie(e,t,n){return e&&(e.__c&&e.__c.__H&&(e.__c.__H.__.forEach(function(e){"function"==typeof e.__c&&e.__c()}),e.__c.__H=null),null!=(e=we({},e)).__c&&(e.__c.__P===n&&(e.__c.__P=t),e.__c.__e=!0,e.__c=null),e.__k=e.__k&&e.__k.map(function(e){return Ie(e,t,n)})),e}function ke(e,t,n){return e&&n&&(e.__v=null,e.__k=e.__k&&e.__k.map(function(e){return ke(e,t,n)}),e.__c&&e.__c.__P===t&&(e.__e&&n.appendChild(e.__e),e.__c.__e=!0,e.__c.__P=n)),e}function qe(){this.__u=0,this.o=null,this.__b=null}function Oe(e){var t=e.__&&e.__.__c;return t&&t.__a&&t.__a(e)}function Re(){this.i=null,this.l=null}t.unmount=function(e){var t=e.__c;t&&(t.__z=!0),t&&t.__R&&t.__R(),t&&32&e.__u&&(e.type=null),Ae&&Ae(e)},(qe.prototype=new T).__c=function(e,t){var n=t.__c,o=this;null==o.o&&(o.o=[]),o.o.push(n);var r=Oe(o.__v),a=!1,s=function(){a||o.__z||(a=!0,n.__R=null,r?r(i):i())};n.__R=s;var l=n.__P;n.__P=null;var i=function(){if(! --o.__u){if(o.state.__a){var e=o.state.__a;o.__v.__k[0]=ke(e,e.__c.__P,e.__c.__O)}var t;for(o.setState({__a:o.__b=null});t=o.o.pop();)t.__P=l,t.forceUpdate()}};o.__u++||32&t.__u||o.setState({__a:o.__b=o.__v.__k[0]}),e.then(s,s)},qe.prototype.componentWillUnmount=function(){this.o=[]},qe.prototype.render=function(e,t){if(this.__b){if(this.__v.__k){var n=document.createElement("div"),o=this.__v.__k[0].__c;this.__v.__k[0]=Ie(this.__b,n,o.__O=o.__P)}this.__b=null}var r=t.__a&&C(N,null,e.fallback);return r&&(r.__u&=-33),[C(N,null,t.__a?null:e.children),r]};var Me=function(e,t,n){if(++n[1]===n[0]&&e.l.delete(t),e.props.revealOrder&&("t"!==e.props.revealOrder[0]||!e.l.size))for(n=e.i;n;){for(;n.length>3;)n.pop()();if(n[1]<n[0])break;e.i=n=n[2]}};(Re.prototype=new T).__a=function(e){var t=this,n=Oe(t.__v),o=t.l.get(e);return o[0]++,function(r){var a=function(){t.props.revealOrder?(o.push(r),Me(t,e,o)):r()};n?n(a):a()}},Re.prototype.render=function(e){this.i=null,this.l=new Map;var t=M(e.children);e.revealOrder&&"b"===e.revealOrder[0]&&t.reverse();for(var n=t.length;n--;)this.l.set(t[n],this.i=[1,0,this.i]);return e.children},Re.prototype.componentDidUpdate=Re.prototype.componentDidMount=function(){var e=this;this.l.forEach(function(t,n){Me(e,n,t)})};var Le="undefined"!=typeof Symbol&&Symbol.for&&Symbol.for("react.element")||60103,Pe=/^(?:accent|alignment|arabic|baseline|cap|clip(?!PathU)|color|dominant|fill|flood|font|glyph(?!R)|horiz|image(!S)|letter|lighting|marker(?!H|W|U)|overline|paint|pointer|shape|stop|strikethrough|stroke|text(?!L)|transform|underline|unicode|units|v|vector|vert|word|writing|x(?!C))[A-Z]/,De=/^on(Ani|Tra|Tou|BeforeInp|Compo)/,He=/[A-Z0-9]/g,Ue="undefined"!=typeof document,Be=function(e){return("undefined"!=typeof Symbol&&"symbol"==typeof Symbol()?/fil|che|rad/:/fil|che|ra/).test(e)};T.prototype.isReactComponent=!0,["componentWillMount","componentWillReceiveProps","componentWillUpdate"].forEach(function(e){Object.defineProperty(T.prototype,e,{configurable:!0,get:function(){return this["UNSAFE_"+e]},set:function(t){Object.defineProperty(this,e,{configurable:!0,writable:!0,value:t})}})});var $e=t.event;t.event=function(e){return $e&&(e=$e(e)),e.persist=function(){},e.isPropagationStopped=function(){return this.cancelBubble},e.isDefaultPrevented=function(){return this.defaultPrevented},e.nativeEvent=e};var Ge={configurable:!0,get:function(){return this.class}},Fe=t.vnode;t.vnode=function(e){"string"==typeof e.type&&function(e){var t=e.props,n=e.type,o={},r=-1==n.indexOf("-");for(var a in t){var s=t[a];if(!("value"===a&&"defaultValue"in t&&null==s||Ue&&"children"===a&&"noscript"===n||"class"===a||"className"===a)){var l=a.toLowerCase();"defaultValue"===a&&"value"in t&&null==t.value?a="value":"download"===a&&!0===s?s="":"translate"===l&&"no"===s?s=!1:"o"===l[0]&&"n"===l[1]?"ondoubleclick"===l?a="ondblclick":"onchange"!==l||"input"!==n&&"textarea"!==n||Be(t.type)?"onfocus"===l?a="onfocusin":"onblur"===l?a="onfocusout":De.test(a)&&(a=l):l=a="oninput":r&&Pe.test(a)?a=a.replace(He,"-$&").toLowerCase():null===s&&(s=void 0),"oninput"===l&&o[a=l]&&(a="oninputCapture"),o[a]=s}}"select"==n&&(o.multiple&&Array.isArray(o.value)&&(o.value=M(t.children).forEach(function(e){e.props.selected=-1!=o.value.indexOf(e.props.value)})),null!=o.defaultValue&&(o.value=M(t.children).forEach(function(e){e.props.selected=o.multiple?-1!=o.defaultValue.indexOf(e.props.value):o.defaultValue==e.props.value}))),t.class&&!t.className?(o.class=t.class,Object.defineProperty(o,"className",Ge)):t.className&&(o.class=o.className=t.className),e.props=o}(e),e.$$typeof=Le,Fe&&Fe(e)};var Ve=t.__r;t.__r=function(e){Ve&&Ve(e),e.__c};var We=t.diffed;function Ke(e){return{render:function(t){!function(e,t,n){null==t.__k&&(t.textContent=""),Z(e,t),"function"==typeof n&&n(),e&&e.__c}(t,e)},unmount:function(){!function(e){!!e.__k&&Z(null,e)}(e)}}}t.diffed=function(e){We&&We(e);var t=e.props,n=e.__e;null!=n&&"textarea"===e.type&&"value"in t&&t.value!==n.value&&(n.value=null==t.value?"":t.value)};var Ze=n(500),je=n.n(Ze),ze=n(892),Je=n.n(ze);const Ye=(e,t,n)=>e,Xe=(e,...t)=>{let n=0;return e.replace(/%(\d+\$)?s/g,(e,o)=>{var r,a;return o?null!==(r=t[parseInt(o)-1])&&void 0!==r?r:"":null!==(a=t[n++])&&void 0!==a?a:""})},Qe="persist:qlwapp",et=`${Qe}:2`,tt={id:"",source:"user",text:"",status:"",type:"text"},nt={contactId:null,contactsConversation:{},contactResponseIsLoading:!1,generalConsentAccepted:!1},ot=async(e,t)=>fetch("https://viewer.quick.bot/api"+e,{...t,headers:{Accept:"application/json","Content-Type":"application/json",Origin:window.location.origin}}),rt=(e,t)=>{const n={publicId:e,isStreamEnabled:!1,isOnlyRegistering:!1,textBubbleContentFormat:"markdown"};return t&&(n.message={type:"text",text:t}),JSON.stringify(n)},at=e=>{const t={textBubbleContentFormat:"markdown"};return e&&(t.message={type:"text",text:e}),JSON.stringify(t)},st=()=>{let e=(new Date).getTime();const t="xxxxxxxx-xxxx-4xxx-yxxx-xxxxxxxxxxxx".replace(/[xy]/g,t=>{const n=(e+16*Math.random())%16|0;return e=Math.floor(e/16),("x"===t?n:3&n|8).toString(16)});return t};function lt(e){return null!==e&&("object"==typeof e||"function"==typeof e)}function it(e,t){const n={...e};return Object.keys(t).forEach(o=>{const r=e[o],a=t[o];lt(r)&&lt(a)&&!Array.isArray(r)?n[o]=it(r,a):n[o]=a}),n}const ct=e=>{if(!e)return"";const t=e.toLowerCase();return t.startsWith("http://")||t.startsWith("https://")?e:`https://${e}`},_t=function(e){function t(e){var n,o;return this.getChildContext||(n=new Set,(o={})[t.__c]=this,this.getChildContext=function(){return o},this.componentWillUnmount=function(){n=null},this.shouldComponentUpdate=function(e){this.props.value!=e.value&&n.forEach(function(e){e.__e=!0,I(e)})},this.sub=function(e){n.add(e);var t=e.componentWillUnmount;e.componentWillUnmount=function(){n&&n.delete(e),t&&t.call(e)}}),e.children}return t.__c="__cC"+m++,t.__=e,t.Provider=t.__l=(t.Consumer=function(e,t){return e.children(t)}).contextType=t,t}(),ut=(e,t)=>"image"===t?{type:"image",text:ct(e?.url)}:"video"===t?{type:"video",text:(e=>{if(!e)return e;const t=new RegExp("^.*((youtu.be\\/)|(v\\/)|(\\/u\\/\\w\\/)|(embed\\/)|(watch\\?))\\??v?=?([^#&?]*).*"),n=e.match(t);return n&&11===n[7].length?`https://www.youtube.com/embed/${n[7]}`:e})(ct(e?.url))}:"audio"===t?{type:"audio",text:ct(e?.url)}:"embed"===t?{type:"embed",text:ct(e?.url)}:{type:"text",text:e?.markdown||""},pt=(e,t)=>{const{contacts:n,contactId:o,storeName:r}=t.payload||{};switch(t.type){case"PERSIST_STATE":return((e,t,n=30)=>{let o=localStorage.getItem(e);if(o)o=JSON.parse(o),o.value=t;else{const e=new Date;o={value:t,expiration:new Date(e.getTime()+24*n*60*60*1e3).getTime()}}try{localStorage.setItem(e,JSON.stringify(o))}catch(t){if("QuotaExceededError"===t.name){console.warn("localStorage quota exceeded. Attempting to clear old data...");try{localStorage.removeItem(e),localStorage.setItem(e,JSON.stringify(o))}catch(e){console.error("Failed to save to localStorage even after clearing:",e)}}else console.error("Error saving to localStorage:",t)}})(r,{...e,contactsHash:Je()(JSON.stringify(t.payload.contacts))}),e;case"HYDRATE_STATE":const a=(e=>{const t=localStorage.getItem(e);if(t){const n=JSON.parse(t);return(new Date).getTime()>n.expiration?(localStorage.removeItem(e),null):n.value}return null})(r),s=Je()(JSON.stringify(n));return a?a.contactsHash!==s?{...nt,contactsHash:s}:(n.find(e=>"bot"===e.type?e.bot_id===o:e.id===o)||(a.contactId=null),a.contactsConversation&&Object.keys(a.contactsConversation).forEach(e=>{a.contactsConversation[e]?.clientSideAction&&(a.contactsConversation[e].clientSideAction=null)}),{...a}):e;case"SET_CONTACT_ID":if(null===o)return{...e,contactId:null};const l=n.find(e=>"bot"===e.type?e.bot_id===o:e.id===o),i="bot"===l?.type,c=i?"":l?.message||"",_=e.contactsConversation[o];return!_||!i&&(_?.messageListArray?.[0]?.text||"")!==c?it(e,{contactId:o,contactsConversation:{[o]:{clientSideAction:null,messageListArray:""!==c?[{id:"",source:"user",text:c,status:""}]:[],sessionId:null,threadOpenaiId:""}}}):{...e,contactId:o};case"SET_GENERAL_CONSENT_ACCEPTED":const{accepted:u}=t.payload;return{...e,generalConsentAccepted:u};case"SET_CONTACT_CONVERSATION_MESSAGE":const p=[...e.contactsConversation[e.contactId]?.messageListArray||[],{...t.payload}];return it(e,{contactsConversation:{[e.contactId]:{messageListArray:p}}});case"SET_CONTACT_CONVERSATION_RESPONSE_IS_LOADING":return it(e,{contactResponseIsLoading:t.payload});case"UPDATE_CONTACT_CONVERSATION_MESSAGE":{const{id:n,message:o}=t.payload,r=e.contactsConversation[e.contactId].messageListArray.findIndex(e=>e.id===n),a=it(e.contactsConversation[e.contactId].messageListArray[r]||"",o),s=[...e.contactsConversation[e.contactId].messageListArray];return s.splice(r,1,a),it(e,{contactsConversation:{[e.contactId]:{messageListArray:s}}})}case"REMOVE_CONTACT_CONVERSATION_MESSAGE":{const{id:n,status:o}=t.payload,r=e.contactsConversation[e.contactId].messageListArray,a="error"===o?r.filter(e=>"error"!==e.status):r.filter(e=>e.id!==n);return it(e,{contactsConversation:{[e.contactId]:{messageListArray:a}}})}case"SET_SESSION_ID":return it(e,{contactsConversation:{[e.contactId]:{sessionId:t.payload.sessionId}}});case"SET_USER_INPUTS":return it(e,{contactsConversation:{[e.contactId]:{userInputs:t.payload}}});case"SET_CLIENT_SIDE_ACTION":return it(e,{contactsConversation:{[e.contactId]:{clientSideAction:t.payload}}});case"RESET_CONTACT_CONVERSATION":return it(e,{contactResponseIsLoading:!1,contactsConversation:{[e.contactId]:{clientSideAction:null,messageListArray:[],userInputs:[],sessionId:null}}})}return e},dt=()=>function(e){var t=z.context[e.__c],n=le(j++,9);return n.c=e,t?(null==n.__&&(n.__=!0,t.sub(z)),t.props.value):e.__}(_t),ft=e=>{const{contacts:t,children:n}=e,[o,r]=ce(pt,nt),a=ue(0),s=et,l=de(()=>{try{const e=[];for(let t=0;t<localStorage.length;t++){const n=localStorage.key(t);n&&n.startsWith(Qe)&&n!==et&&e.push(n)}e.forEach(e=>localStorage.removeItem(e))}catch(e){console.warn("Failed to cleanup old storage entries:",e)}},[]),i=de(()=>{r({type:"PERSIST_STATE",payload:{contacts:t,storeName:s}})},[t,s]),c=de(()=>{r({type:"HYDRATE_STATE",payload:{contacts:t,storeName:s}})},[t,s]),_=e=>{const{type:t,items:n,options:o}=e,a=o?.labels,s=o?.defaultCountryCode,l=o?.hasTime,i=o?.isRange,c=o?.format,_=[t,n,a,s,l,i,c].every(e=>void 0===e)?void 0:{type:t,items:n,labels:a,defaultCountryCode:s,hasTime:l,isRange:i,format:c};r({type:"SET_USER_INPUTS",payload:_})},u=e=>{const t=st();return r({type:"SET_CONTACT_CONVERSATION_MESSAGE",payload:{...tt,...e,source:"user",id:t}}),t},p=e=>{const t=st(),n={...tt,...e,source:"agent",id:t};return r({type:"SET_CONTACT_CONVERSATION_MESSAGE",payload:n}),t},d=e=>{r({type:"SET_CONTACT_CONVERSATION_RESPONSE_IS_LOADING",payload:e})},f=e=>{r({type:"UPDATE_CONTACT_CONVERSATION_MESSAGE",payload:e})},m=({id:e,status:t})=>{r({type:"REMOVE_CONTACT_CONVERSATION_MESSAGE",payload:{id:e,status:t}})},h=e=>{r({type:"SET_CLIENT_SIDE_ACTION",payload:e})},v=de(async e=>{if(!o.contactId)return;a.current+=1;const t=a.current,n=()=>a.current!==t;d(!0),_([]),h(null),m({status:"error"}),e&&u({text:e});const s=p({status:"waiting"}),l=o.contactsConversation[o.contactId]?.sessionId;try{let t;if(t=l?await(async(e,t)=>{try{const n=await ot(`/v1/conversations/${e}/messages`,{method:"POST",body:at(t)}),o=await n.json();return n.ok?{ok:!0,data:o}:{ok:!1,code:o?.code||"unknown_error",message:o?.message||"Request failed"}}catch(e){return console.error("sendMessage unexpected error:",e),{ok:!1,code:e?.code||"unknown_error",message:e?.message||"Request failed"}}})(l,e):await(async(e,t)=>{try{const n="/v1/conversations",o=await ot(n,{method:"POST",body:rt(e,t)}),r=await o.json();return o.ok?{ok:!0,data:r}:{ok:!1,code:r?.code||"unknown_error",message:r?.message||"Request failed"}}catch(e){return console.error("starChat unexpected error:",e),{ok:!1,code:e?.code||"unknown_error",message:e?.message||"Request failed"}}})(o.contactId,e||""),!t.ok)return f({id:s,message:{text:t.message||"There was an error with the response. Please try again.",status:"error"}}),void d(!1);l||(i=t.data.sessionId,r({type:"SET_SESSION_ID",payload:{sessionId:i}}));const{messages:a,input:c,clientSideActions:u}=t.data;if(0===a?.length)m({id:s}),n()||d(!1);else for(let e=0;e<a.length&&!n();e++){const{content:t,type:o}=a[e],r=ut(t,o);if(0===e)f({id:s,message:{...r,status:"success"}});else{const e=p({status:"waiting"});if(await new Promise(e=>setTimeout(e,1500)),n()){m({id:e});break}f({id:e,message:{...r,status:"success"}})}}n()||(c&&_(c),u?.length&&u.forEach(e=>{if("redirect"===e.type){const{isNewTab:t,url:n}=e.redirect;h({type:"redirect",isNewTab:t,url:n})}}),d(!1))}catch(e){return n()||(f({id:s,message:{text:"There was an error with the response. Please try again.",status:"error"}}),d(!1)),null}var i},[o.contactId,o.contactsConversation]);return _e(()=>{l()},[l]),_e(()=>{c()},[c]),_e(()=>{i()},[o,i]),C(_t.Provider,{value:{...o,...e,setContactId:e=>{r({type:"SET_CONTACT_ID",payload:{contacts:t,contactId:e,storeName:s}})},setContactConversationMessageUser:u,setContactConversationMessageAgent:p,setContactConversationResponseIsLoading:d,updateContactConversationMessage:f,setUserInputs:_,chatWithBot:v,resetContactConversation:()=>{a.current+=1,r({type:"RESET_CONTACT_CONVERSATION"})},setGeneralConsentAccepted:e=>{r({type:"SET_GENERAL_CONSENT_ACCEPTED",payload:{accepted:e}})}}},n)},mt=()=>C("svg",{version:"1.1",xmlns:"http://www.w3.org/2000/svg",width:"32",height:"32",viewBox:"0 0 32 32"},C("path",{d:"M20.563 22.104l-1.875 1.875-8-8 8-8 1.875 1.875-6.125 6.125z"})),ht=()=>C("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",fill:"currentColor"},C("path",{d:"M12.001 2C6.47813 2 2.00098 6.47715 2.00098 12C2.00098 13.8893 2.50433 15.6617 3.38779 17.1902L2.05176 21.9922L6.97471 20.6842C8.45617 21.4958 10.1729 21.9999 12.001 21.9999C17.5238 21.9999 22.001 17.5228 22.001 11.9999C22.001 6.47706 17.5238 2 12.001 2ZM8.49659 7.3125C8.67819 7.3125 8.86375 7.31328 9.02603 7.32031C9.22603 7.32734 9.44788 7.34053 9.65845 7.82813C9.90845 8.39648 10.4397 9.76758 10.5084 9.91016C10.577 10.0527 10.6221 10.2198 10.5303 10.4023C10.4385 10.5848 10.3928 10.6987 10.2513 10.8633C10.1097 11.0273 9.95431 11.2295 9.82618 11.3574C9.68399 11.499 9.53643 11.653 9.70165 11.9355C9.86688 12.2181 10.4347 13.1504 11.2822 13.9082C12.3713 14.8828 13.2886 15.1826 13.5713 15.3252C13.854 15.4678 14.0226 15.4443 14.1878 15.2598C14.353 15.0752 14.8979 14.4336 15.0859 14.1504C15.274 13.8672 15.4619 13.916 15.7212 14.0117C15.9806 14.1074 17.3516 14.7773 17.6343 14.9199C17.917 15.0625 18.1059 15.1348 18.1748 15.2539C18.2441 15.373 18.2441 15.9414 18.0098 16.6074C17.7754 17.2734 16.6284 17.9072 16.1064 17.9531C15.5845 17.999 15.0918 18.1928 12.7432 17.2754C9.91772 16.1738 8.09619 13.3047 7.95361 13.1152C7.81103 12.9258 6.80176 11.5723 6.80176 10.1719C6.80176 8.77148 7.52759 8.08398 7.7876 7.79883C8.04736 7.51367 8.31494 7.3125 8.49659 7.3125Z"})),vt={phone:ht,group:()=>C("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",fill:"currentColor"},C("path",{d:"M16 11c1.66 0 2.99-1.34 2.99-3S17.66 5 16 5c-1.66 0-3 1.34-3 3s1.34 3 3 3zm-8 0c1.66 0 2.99-1.34 2.99-3S9.66 5 8 5C6.34 5 5 6.34 5 8s1.34 3 3 3zm0 2c-2.33 0-7 1.17-7 3.5V19h14v-2.5c0-2.33-4.67-3.5-7-3.5zm8 0c-.29 0-.62.02-.97.05 1.16.84 1.97 1.97 1.97 3.45V19h6v-2.5c0-2.33-4.67-3.5-7-3.5z"})),bot:()=>C("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",fill:"currentColor"},C("path",{fillRule:"evenodd",d:"M13.5 2C13.5 2.44425 13.3069 2.84339 13 3.11805V5H18C19.6569 5 21 6.34315 21 8V18C21 19.6569 19.6569 21 18 21H6C4.34315 21 3 19.6569 3 18V8C3 6.34315 4.34315 5 6 5H11V3.11805C10.6931 2.84339 10.5 2.44425 10.5 2C10.5 1.17157 11.1716 0.5 12 0.5C12.8284 0.5 13.5 1.17157 13.5 2ZM2 10H0V16H2V10ZM22 10H24V16H22V10ZM10.5 13C10.5 13.8284 9.82843 14.5 9 14.5C8.17157 14.5 7.5 13.8284 7.5 13C7.5 12.1716 8.17157 11.5 9 11.5C9.82843 11.5 10.5 12.1716 10.5 13ZM15 14.5C15.8284 14.5 16.5 13.8284 16.5 13C16.5 12.1716 15.8284 11.5 15 11.5C14.1716 11.5 13.5 12.1716 13.5 13C13.5 13.8284 14.1716 14.5 15 14.5Z"}))},gt=({contact:e})=>{const{box:t}=dt(),n=e?.type||"phone";return C("div",{className:"qlwapp__avatar"},C("div",{className:"qlwapp__avatar__type-badge","aria-hidden":"true"},C(vt[n]||ht,null)),C("span",{className:"qlwapp__avatar__sr-only"},n),C("div",{className:"qlwapp__avatar__container"},e?.avatar?function(e){try{return new URL(e),!0}catch(e){return!1}}(e.avatar)?C("img",{src:e.avatar,alt:e.firstname,loading:"yes"===t.lazy_load&&"lazy"}):C("div",{className:"qlwapp__avatar__container qlwapp__avatar__container--icon"},C("span",null,e?.avatar)):C("div",{className:"qlwapp__avatar__container qlwapp__avatar__container--icon"},C("span",null,e?.name?.charAt(0).toUpperCase()))))},yt=()=>C("svg",{xmlns:"http://www.w3.org/2000/svg",width:"24",height:"24",viewBox:"0 0 32 32"},C("path",{fill:"currentColor",d:"M27 8H6.83l3.58-3.59L9 3L3 9l6 6l1.41-1.41L6.83 10H27v16H7v-7H5v7a2 2 0 0 0 2 2h20a2 2 0 0 0 2-2V10a2 2 0 0 0-2-2"})),bt=(e,t)=>{"Enter"!==e.key&&" "!==e.key||(e.preventDefault(),t(e))},wt=()=>{const{contactId:e,contacts:t,resetContactConversation:n}=dt(),o=t.find(t=>"bot"===t.type?t.bot_id===e:t.id===e);if("bot"===o?.type)return C("a",{className:"qlwapp__previous qlwapp__reset",title:"Reset conversation",onClick:()=>n(),onKeyDown:e=>bt(e,()=>n()),role:"button",tabIndex:"0"},C(yt,null))},Ct=({onClose:e,onPrevious:t})=>{const{contactId:n,box:o,contacts:r,contactResponseIsLoading:a}=dt(),s=r.find(e=>"bot"===e.type?e.bot_id===n:e.id===n);return C("div",{className:"qlwapp__header"},C("i",{className:"qlwapp__close",onClick:e,onKeyDown:t=>bt(t,e),role:"button",tabIndex:"0"},"×"),C("div",{className:"qlwapp__carousel"},C("div",{className:"qlwapp__carousel-slide"},o.header&&C("div",{className:"qlwapp__header-description",dangerouslySetInnerHTML:{__html:o.header}})),C("div",{className:"qlwapp__carousel-slide"},C("div",{className:"qlwapp__header-contact"},C("div",{className:"qlwapp__header-contact-buttons"},C("a",{className:je()("qlwapp__previous",a&&"qlwapp__previous--disabled"),onClick:t,onKeyDown:e=>bt(e,t),role:"button",tabIndex:"0"},C(mt,null)),C(wt,null)),C("div",{className:"qlwapp__info"},C("span",{className:"qlwapp__name"},`${s?.firstname} ${s?.lastname}`),C("span",{className:"qlwapp__time"},s?.timefrom!==s?.timeto&&Xe(Ye("Available from %1$s to %2$s"),s?.timefrom,s?.timeto),s?.label&&` - ${s?.label}`)),C(gt,{contact:s})))))},St=()=>C("svg",{version:"1.1",xmlns:"http://www.w3.org/2000/svg",width:"32",height:"32",viewBox:"0 0 32 32"},C("path",{d:"M2.776 31.54c-1.954 1.036-3.144 0.122-2.658-2.038l2.066-9.17c0.246-1.086 1.318-2.068 2.432-2.2l12.39-1.44c3.296-0.38 3.308-0.996 0-1.374l-12.39-1.416c-1.1-0.126-2.18-1.080-2.424-2.17l-2.080-9.264c-0.486-2.146 0.704-3.046 2.662-2.006l25.7 13.658c1.956 1.038 1.96 2.72 0 3.76l-25.7 13.66z"})),Nt=()=>{const e=/Android|webOS|iPhone|iPad|iPod|BlackBerry|IEMobile|Opera Mini/i.test(navigator.userAgent),t=window.matchMedia("(pointer:coarse)");return t&&t.matches||e},Tt=({type:e,group:t,phone:n,message:o,whatsapp_link_type:r="web"})=>{const a=Nt()?"api":r,s="api"===a?"https://api.whatsapp.com/send":"https://web.whatsapp.com/send";if("group"===e){const e=(e=>{try{const t=new URL(e);if("chat.whatsapp.com"===t.hostname)return t.pathname.replace("/","");if("web.whatsapp.com"===t.hostname&&"/accept"===t.pathname)return t.searchParams.get("code")}catch(e){console.error("Invalid URL",e)}return null})(t);return"api"===a?`https://chat.whatsapp.com/${e}`:`https://web.whatsapp.com/accept?code=${e}`}return`${s}?phone=${function(e){return(e=e.replace(new RegExp("[^0-9]","g"),"")).replace(new RegExp("^0+"),"")}(n?.toString())}&text=${encodeURIComponent(function(e){const t=document.createElement("textarea");return t.innerHTML=e,t.value}(o))}`};function xt(e){const t=Tt(e),n=new CustomEvent("qlwapp.click",{bubbles:!0,cancelable:!0});window.dispatchEvent(n),window.open(t,"_blank","noreferrer")}const Et={AC:"+247",AD:"+376",AE:"+971",AF:"+93",AG:"+1268",AI:"+1264",AL:"+355",AM:"+374",AO:"+244",AR:"+54",AS:"+1684",AT:"+43",AU:"+61",AW:"+297",AX:"+358",AZ:"+994",BA:"+387",BB:"+1246",BD:"+880",BE:"+32",BF:"+226",BG:"+359",BH:"+973",BI:"+257",BJ:"+229",BL:"+590",BM:"+1441",BN:"+673",BO:"+591",BQ:"+599",BR:"+55",BS:"+1242",BT:"+975",BW:"+267",BY:"+375",BZ:"+501",CA:"+1",CC:"+61",CD:"+243",CF:"+236",CG:"+242",CH:"+41",CI:"+225",CK:"+682",CL:"+56",CM:"+237",CN:"+86",CO:"+57",CR:"+506",CU:"+53",CV:"+238",CW:"+599",CX:"+61",CY:"+357",CZ:"+420",DE:"+49",DJ:"+253",DK:"+45",DM:"+1767",DO:"+1809",DZ:"+213",EC:"+593",EE:"+372",EG:"+20",ER:"+291",ES:"+34",ET:"+251",FI:"+358",FJ:"+679",FK:"+500",FM:"+691",FO:"+298",FR:"+33",GA:"+241",GB:"+44",GD:"+1473",GE:"+995",GF:"+594",GG:"+44",GH:"+233",GI:"+350",GL:"+299",GM:"+220",GN:"+224",GP:"+590",GQ:"+240",GR:"+30",GT:"+502",GU:"+1671",GW:"+245",GY:"+592",HK:"+852",HN:"+504",HR:"+385",HT:"+509",HU:"+36",ID:"+62",IE:"+353",IL:"+972",IM:"+44",IN:"+91",IO:"+246",IQ:"+964",IR:"+98",IS:"+354",IT:"+39",JE:"+44",JM:"+1876",JO:"+962",JP:"+81",KE:"+254",KG:"+996",KH:"+855",KI:"+686",KM:"+269",KN:"+1869",KP:"+850",KR:"+82",KW:"+965",KY:"+1345",KZ:"+7",LA:"+856",LB:"+961",LC:"+1758",LI:"+423",LK:"+94",LR:"+231",LS:"+266",LT:"+370",LU:"+352",LV:"+371",LY:"+218",MA:"+212",MC:"+377",MD:"+373",ME:"+382",MF:"+590",MG:"+261",MH:"+692",MK:"+389",ML:"+223",MM:"+95",MN:"+976",MO:"+853",MP:"+1670",MQ:"+596",MR:"+222",MS:"+1664",MT:"+356",MU:"+230",MV:"+960",MW:"+265",MX:"+52",MY:"+60",MZ:"+258",NA:"+264",NC:"+687",NE:"+227",NF:"+672",NG:"+234",NI:"+505",NL:"+31",NO:"+47",NP:"+977",NR:"+674",NU:"+683",NZ:"+64",OM:"+968",PA:"+507",PE:"+51",PF:"+689",PG:"+675",PH:"+63",PK:"+92",PL:"+48",PM:"+508",PR:"+1787",PS:"+970",PT:"+351",PW:"+680",PY:"+595",QA:"+974",RE:"+262",RO:"+40",RS:"+381",RU:"+7",RW:"+250",SA:"+966",SB:"+677",SC:"+248",SD:"+249",SE:"+46",SG:"+65",SH:"+290",SI:"+386",SJ:"+47",SK:"+421",SL:"+232",SM:"+378",SN:"+221",SO:"+252",SR:"+597",SS:"+211",ST:"+239",SV:"+503",SX:"+1721",SY:"+963",SZ:"+268",TC:"+1649",TD:"+235",TG:"+228",TH:"+66",TJ:"+992",TK:"+690",TL:"+670",TM:"+993",TN:"+216",TO:"+676",TR:"+90",TT:"+1868",TV:"+688",TW:"+886",TZ:"+255",UA:"+380",UG:"+256",US:"+1",UY:"+598",UZ:"+998",VA:"+39",VC:"+1784",VE:"+58",VG:"+1284",VI:"+1340",VN:"+84",VU:"+678",WF:"+681",WS:"+685",XK:"+383",YE:"+967",YT:"+262",ZA:"+27",ZM:"+260",ZW:"+263"},At=Object.entries(Et).map(([e,t])=>({iso:e,dialCode:t})).sort((e,t)=>e.iso.localeCompare(t.iso)),It=()=>{const{button:e,box:t,contacts:n,contactId:o,contactsConversation:r,contactResponseIsLoading:a,chatWithBot:s,generalConsentAccepted:l}=dt(),i=n.find(e=>"bot"===e.type?e.bot_id===o:e.id===o),[c,_]=ie(""),[u,p]=ie(""),[d,f]=ie(""),[m,h]=ie(""),v=ue(),g=ue(null),{userInputs:y,threadOpenaiId:b}=r[o]||{},w="phone number input"===y?.type,S=["text input","email input","number input","url input","phone number input"],T=e=>S.includes(e),x=e=>"date input"===e,E=x(y?.type)&&!!y?.isRange,A="bot"!==i?.type||"bot"===i?.type&&(T(y?.type)||x(y?.type));_e(()=>{if(w){const e=y?.defaultCountryCode?.toUpperCase()||"US";p(Et[e]?e:"US"),_("")}},[w,y?.defaultCountryCode]),_e(()=>{E&&(f(""),h(""))},[E]),_e(()=>{A&&v.current&&v.current.focus()},[A]);const I="yes"===t?.consent_enabled&&!l,k=(E?!d||!m:!c.trim())||a||I,q=(e=!1)=>{const t=v.current;t&&(t.style.height="",e||""===c||(t.style.height=`${t.scrollHeight}px`))},O=e=>{e.preventDefault();let t=e.target.value;w&&(t=t.replace(new RegExp("[^\\d\\s-]","g"),"")),_(t),q()},R=t=>{t.preventDefault(),(()=>{if(k)return;let t;E?(t=`${d} to ${m}`,f(""),h("")):(t=c.trim(),w&&(t=Et[u]+t),_(""),q(!0)),"bot"===i?.type?s(t):xt({...i,message:t,whatsapp_link_type:e.whatsapp_link_type})})()},M=de(e=>{if(g.current&&(g.current.disconnect(),g.current=null),!e)return;const t=()=>{const t=e.getBoundingClientRect().width;document.documentElement.style.setProperty("--qlwapp-button-width",`${t}px`)};t();const n=requestAnimationFrame(t),o=new ResizeObserver(t);return o.observe(e),g.current=o,()=>{cancelAnimationFrame(n),o.disconnect()}},[]),L="bot"===i?.type&&!a&&""===b&&!y;return C(N,null,t?.footer&&C("div",{className:"qlwapp__footer",dangerouslySetInnerHTML:{__html:t.footer}}),A&&C("div",{className:"qlwapp__response"},w&&C("select",{className:"qlwapp__country-selector",value:u,onChange:e=>p(e.target.value),disabled:I,"aria-label":"Country code"},At.map(({iso:e,dialCode:t})=>C("option",{key:e,value:e},e.toUpperCase().split("").map(e=>String.fromCodePoint(e.charCodeAt(0)+127397)).join("")," ",t))),(T(y?.type)||"bot"!==i?.type)&&C(N,null,C("pre",{className:je()("qlwapp__response__input",w&&"qlwapp__response__input--phone")},c),C("textarea",{className:je()("qlwapp__response__input",w&&"qlwapp__response__input--phone"),name:"message",ref:v,maxLength:"300",onChange:O,onKeyDown:e=>{e.shiftKey&&"Enter"===e.key||"Enter"!==e.key||k||R(e)},value:c,placeholder:(()=>{if("bot"!==i?.type)return t?.response;if(!y?.labels?.placeholder){const e=y?.type.split(" ")[0]||"text";return Xe("Type your %s",e)}return y?.labels?.placeholder})(),"aria-label":t?.response,tabIndex:"0",disabled:a||I})),x(y?.type)&&!E&&C("input",{type:y?.hasTime?"datetime-local":"date",className:"qlwapp__response__input",onChange:O,disabled:I,required:!0}),E&&C("div",{className:"qlwapp__response__date-range"},C("label",{className:"qlwapp__response__date-range__label"},y?.labels?.from||"From:"),C("input",{type:y?.hasTime?"datetime-local":"date",className:"qlwapp__response__input",value:d,max:m||void 0,onChange:e=>f(e.target.value),disabled:I,required:!0}),C("label",{className:"qlwapp__response__date-range__label"},y?.labels?.to||"To:"),C("input",{type:y?.hasTime?"datetime-local":"date",className:"qlwapp__response__input",value:m,min:d||void 0,onChange:e=>h(e.target.value),disabled:I,required:!0})),C("div",{className:"qlwapp__response__buttons",ref:M},C("a",{className:je()("qlwapp__reply",k&&"qlwapp__reply--disabled"),role:"button",tabIndex:"0",onClick:R,title:"Send",target:"bot"!==i?.type?"blank":void 0},C(St,null)))),L&&C("div",{className:"qlwapp__response qlwapp__response--end-conversation"},C("pre",{className:"qlwapp__response__input"},"This conversation has ended.")))};function kt(e,t){return parseInt(e+t)}function qt(e){let t=""+e.getMinutes();return 1===t.length&&(t="0"+t),e.getHours()+":"+t}const Ot=({timezone:e,timefrom:t,timeto:n,timedays:o})=>{const r=(({timedays:e})=>{const t=(new Date).getDay().toString();return e?.includes(t)||0===e?.length})({timedays:o}),a=function(e){let t=0;if(e?.includes("UTC")){const n=e.replace(new RegExp("UTC\\+?"),"");isNaN(n)||(t=60*parseInt(n))}else try{const n=(new Date).toLocaleString("en-US",{timeZone:e});t=(new Date(n+" UTC")-new Date)/6e4}catch(e){return 0}return t}(e),s=new Date,l=new Date,i=new Date;let c=l.getTime(),_=s.getTime();if(t!==n){const e=-i.getTimezoneOffset()-(a||0);let o,u;o=kt(t[0],t[1]),u=kt(t[3],t[4]),l.setHours(o),l.setMinutes(u+e),c=l.getTime(),o=kt(n[0],n[1]),u=kt(n[3],n[4]),s.setHours(o),s.setMinutes(u+e),_=s.getTime(),c>_&&(c-=864e5);const p=c<=i.getTime()&&i.getTime()<=_;return{isAvailableNow:r&&p,isInAvailableDay:r,isInAvailableHour:p,timefrom:qt(l),timeto:qt(s)}}return{isAvailableNow:r,isInAvailableDay:r,isInAvailableHour:!0}};function Rt(e,t){return!!e.includes(parseInt(t))||!!e.includes(t.toString())}function Mt({timedays:e,timezone:t}){const n=function(e){try{let t=new Date;const n={weekday:"long"},o=function(e){const t=e.match(new RegExp("^UTC([+-]\\d{1,2})$"));return t?60*parseInt(t[1],10)*60*1e3:null}(e);if(null!==o){const e=new Date(t.getTime()+6e4*t.getTimezoneOffset()+o);n.timeZone="UTC",t=e}else n.timeZone=e;return{Sunday:0,Monday:1,Tuesday:2,Wednesday:3,Thursday:4,Friday:5,Saturday:6}[new Intl.DateTimeFormat("en-US",n).formatToParts(t).find(e=>"weekday"===e.type).value]}catch(e){return null}}(t);if(null===n)return!1;const o=["Sunday","Monday","Tuesday","Wednesday","Thursday","Friday","Saturday"];for(let t=n;t<=6;t++)if(Rt(e,t))return o[t];for(let t=0;t<n;t++)if(Rt(e,t))return o[t];return!1}const Lt=({contact:e,onClick:t})=>{const{box:n,generalConsentAccepted:o}=dt(),{isAvailableNow:r,isInAvailableDay:a,isInAvailableHour:s,timefrom:l,timeto:i}=Ot(e);if(!r&&"hidden"===e.visibility)return;const c=Mt(e),_="yes"===n?.consent_enabled&&!o;return C("a",{className:je()("qlwapp__contact",!r&&"readonly"===e.visibility||_?"qlwapp__contact--disabled":""),onClick:t,onKeyDown:bt,role:"button",tabIndex:"0",target:"_blank"},C(gt,{contact:e}),C("div",{className:"qlwapp__info"},C("span",{className:"qlwapp__label"},e?.label),C("span",{className:"qlwapp__name"},"bot"===e?.type?e?.firstname:`${e?.firstname} ${e?.lastname}`),"with_status"===e?.visibility&&C("div",{className:"qlwapp__status qlwapp__info"},C("div",{className:"qlwapp__status__indicator "+(r?"qlwapp__status__indicator--online":"qlwapp__status__indicator--offline")}),C("span",{className:"qlwapp__status__text"},r?"Online":"Offline")),a?!s&&C("span",{className:"qlwapp__time"},Xe(Ye("Available from %1$s to %2$s"),l,i)):c&&C("span",{className:"qlwapp__time"},Xe(Ye("Available on %s"),c))))},Pt=({onClick:e})=>{const[,t]=(()=>{const[e,t]=ie(!1);return[e,e=>{t(!0),setTimeout(()=>{e(),t(!1)},0)}]})(),n=ue(null),{box:o,button:r,contacts:a,setContactId:s,generalConsentAccepted:l}=dt(),i=n=>a=>{a.preventDefault(),"yes"===o?.consent_enabled&&!l||(n.chat||"bot"===n?.type?(e("qlwapp__modal--opening"),t(()=>{s("bot"===n.type?n.bot_id:n.id)})):xt({...n,whatsapp_link_type:r.whatsapp_link_type}))},c=()=>{const e=document.querySelector(".qlwapp__header")?.offsetHeight,t=o.footer?document.querySelector(".qlwapp__footer")?.offsetHeight:document.querySelector(".qlwapp__response")?.offsetHeight;let n=window.innerHeight-e-t;Nt()&&(n=.7*window.innerHeight-e-t),document.documentElement.style.setProperty("--qlwapp-scheme-box-height",`${n}px`)};return _e(()=>(window.addEventListener("resize",c()),window.addEventListener("load",c()),()=>{window.removeEventListener("resize",c()),window.removeEventListener("load",c())}),[]),_e(()=>{const e=n.current;if(!e)return;const t=t=>{const n=e.scrollTop<=0,o=Math.ceil(e.scrollTop)+e.clientHeight>=e.scrollHeight;(n&&t.deltaY<0||o&&t.deltaY>0)&&t.preventDefault()};return e.addEventListener("wheel",t,{passive:!1}),()=>e.removeEventListener("wheel",t)},[]),C("div",{ref:n,className:"qlwapp__contact-list"},a.length?a.map(e=>C(Lt,{key:e.id,contact:e,onClick:i(e)})):C("div",{className:"qlwapp__contact-list__empty"},"No contacts found."))},Dt=()=>C("svg",{xmlns:"http://www.w3.org/2000/svg",width:"24",height:"24",viewBox:"0 0 24 24"},C("circle",{cx:"18",cy:"12",r:"0",fill:"currentColor"},C("animate",{attributeName:"r",begin:".67",calcMode:"spline",dur:"1.5s",keySplines:"0.2 0.2 0.4 0.8;0.2 0.2 0.4 0.8;0.2 0.2 0.4 0.8",repeatCount:"indefinite",values:"0;2;0;0"})),C("circle",{cx:"12",cy:"12",r:"0",fill:"currentColor"},C("animate",{attributeName:"r",begin:".33",calcMode:"spline",dur:"1.5s",keySplines:"0.2 0.2 0.4 0.8;0.2 0.2 0.4 0.8;0.2 0.2 0.4 0.8",repeatCount:"indefinite",values:"0;2;0;0"})),C("circle",{cx:"6",cy:"12",r:"0",fill:"currentColor"},C("animate",{attributeName:"r",begin:"0",calcMode:"spline",dur:"1.5s",keySplines:"0.2 0.2 0.4 0.8;0.2 0.2 0.4 0.8;0.2 0.2 0.4 0.8",repeatCount:"indefinite",values:"0;2;0;0"})));var Ht={"":["<em>","</em>"],_:["<strong>","</strong>"],"*":["<strong>","</strong>"],"~":["<s>","</s>"],"\n":["<br />"]," ":["<br />"],"-":["<hr />"]};function Ut(e){return e.replace(RegExp("^"+(e.match(/^(\t|)+/)||"")[0],"gm"),"")}function Bt(e){return(e+"").replace(/"/g,"&quot;").replace(/</g,"&lt;").replace(/>/g,"&gt;")}function $t(e,t){var n,o,r,a,s,l=/((?:^|\n+)(?:\n---+|\* \*(?: \*)+)\n)|(?:^``` *(\w*)\n([\s\S]*?)\n```$)|((?:(?:^|\n+)(?:\t|  {2,}).+)+\n*)|((?:(?:^|\n)([>*+-]|\d+\.)\s+.*)+)|(?:!\[([^\]]*?)\]\(([^)]+?)\))|(\[)|(\](?:\(([^)]+?)\))?)|(?:(?:^|\n+)([^\s].*)\n(-{3,}|={3,})(?:\n+|$))|(?:(?:^|\n+)(#{1,6})\s*(.+)(?:\n+|$))|(?:`([^`].*?)`)|(\n\n*|\n{2,}|__|\*\*|[_*]|~~)/gm,i=[],c="",_=t||{},u=0;function p(e){var t=Ht[e[1]||""],n=i[i.length-1]==e;return t?t[1]?(n?i.pop():i.push(e),t[0|n]):t[0]:e}function d(){for(var e="";i.length;)e+=p(i[i.length-1]);return e}for(e=e.replace(/^\[(.+?)\]:\s*(.+)$/gm,function(e,t,n){return _[t.toLowerCase()]=n,""}).replace(/^\n+|\n+$/g,"");r=l.exec(e);)o=e.substring(u,r.index),u=l.lastIndex,n=r[0],o.match(/[^\\](\\\\)*\\$/)||((s=r[3]||r[4])?n='<pre class="code '+(r[4]?"poetry":r[2].toLowerCase())+'"><code'+(r[2]?' class="language-'+r[2].toLowerCase()+'"':"")+">"+Ut(Bt(s).replace(/^\n+|\n+$/g,""))+"</code></pre>":(s=r[6])?(s.match(/\./)&&(r[5]=r[5].replace(/^\d+/gm,"")),a=$t(Ut(r[5].replace(/^\s*[>*+.-]/gm,""))),">"==s?s="blockquote":(s=s.match(/\./)?"ol":"ul",a=a.replace(/^(.*)(\n|$)/gm,"<li>$1</li>")),n="<"+s+">"+a+"</"+s+">"):r[8]?n='<img src="'+Bt(r[8])+'" alt="'+Bt(r[7])+'">':r[10]?(c=c.replace("<a>",'<a href="'+Bt(r[11]||_[o.toLowerCase()])+'">'),n=d()+"</a>"):r[9]?n="<a>":r[12]||r[14]?n="<"+(s="h"+(r[14]?r[14].length:r[13]>"="?1:2))+">"+$t(r[12]||r[15],_)+"</"+s+">":r[16]?n="<code>"+Bt(r[16])+"</code>":(r[17]||r[1])&&(n=p(r[17]||"--"))),c+=o,c+=n;return(c+e.substring(u)+d()).replace(/^\n+|\n+$/g,"")}function Gt(e){if(null==e)return"";const t=new RegExp("(https?:\\/\\/[^\\s<]+)","g"),n=[];let o=$t(e.replace(t,e=>{const t=`URLPLACEHOLDER${n.length}URLPLACEHOLDER`;return n.push(e),t}));return n.forEach((e,t)=>{const n=`URLPLACEHOLDER${t}URLPLACEHOLDER`;o=o.replace(n,e)}),o}const Ft=({text:e,status:t,source:n,type:o})=>{const r=["image","video","audio","embed"].includes(o)?e:Gt((e=>{if(!e||"string"!=typeof e)return e;const t=document.createElement("textarea");return t.innerHTML=e,t.value.replace(new RegExp("&","g"),"&amp;").replace(new RegExp("<","g"),"&lt;").replace(new RegExp(">","g"),"&gt;").replace(new RegExp('"',"g"),"&quot;").replace(new RegExp("'","g"),"&#039;").replace(new RegExp("\\n","g"),"<br>")})(e)),a={__html:r};return C("div",{className:je()("qlwapp__message",n&&`qlwapp__message--${n}`,t&&`qlwapp__message--${t}`,o&&`qlwapp__message--${o}`)},(()=>{if("waiting"===t)return C("span",{className:"qlwapp__message--spinner"},C(Dt,null));switch(o){case"image":return C("img",{className:"qlwapp__message--image",src:e,alt:e});case"video":return e.includes("youtube.com/embed/")?C("iframe",{className:"qlwapp__message--video-embed",src:e,title:"Video content",frameBorder:"0",allow:"accelerometer; autoplay; clipboard-write; encrypted-media; gyroscope; picture-in-picture",allowFullScreen:!0}):C("video",{className:"qlwapp__message--video",controls:!0,src:e},"Your browser does not support the video tag.");case"audio":return C("audio",{className:"qlwapp__message--audio",controls:!0,src:e},"Your browser does not support the audio tag.");case"embed":return C("iframe",{className:"qlwapp__message--embed",src:e,title:"Embedded content",frameBorder:"0",allowFullScreen:!0});default:return C("div",{dangerouslySetInnerHTML:a})}})())},Vt={buttonType:"Numbers",length:10,labels:{button:"Send"},startsAt:1,customIcon:{isEnabled:!1},isOneClickSubmitEnabled:!1},Wt=({rating:e,idx:t,onClick:n,buttonType:o,customIcon:r,isOneClickSubmitEnabled:a})=>{const s=e=>{e.preventDefault(),n(t)},l=void 0!==e&&t<=e;if("Numbers"===o)return a?C("button",{type:"button",className:"qlwapp__message qlwapp__message--choice-input",onClick:s},t):C("div",{role:"checkbox","aria-checked":l,tabIndex:0,onClick:s,onKeyDown:e=>bt(e,s),className:"qlwapp__rating-number "+(l?"qlwapp__rating-number--selected":"")},t);const i=r?.isEnabled&&r?.svg?r.svg:'<svg xmlns="http://www.w3.org/2000/svg" width="24" height="24" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" class="feather feather-star"><polygon points="12 2 15.09 8.26 22 9.27 17 14.14 18.18 21.02 12 17.77 5.82 21.02 7 14.14 2 9.27 8.91 8.26 12 2"></polygon></svg>';return C("div",{className:"qlwapp__rating-icon "+(l?"qlwapp__rating-icon--selected":""),onClick:s,onKeyDown:e=>bt(e,s),role:"checkbox","aria-checked":l,tabIndex:0,dangerouslySetInnerHTML:{__html:i}})},Kt=({options:e={},onSubmit:t})=>{const[n,o]=ie(void 0),r={...Vt,...e,labels:{...Vt.labels,...e.labels},customIcon:{...Vt.customIcon,...e.customIcon}},a=e=>{r.isOneClickSubmitEnabled?t(e.toString()):o(e)},s=r.buttonType||"Numbers",l=r.length||10,i="Numbers"===s&&r.startsAt||1,c="Numbers"===s?l-(i-1):l,_=[];for(let e=0;e<c;e++){const t="Numbers"===s?e+i:e+1;_.push(t)}return C("form",{className:"qlwapp__rating-form",onSubmit:e=>{e.preventDefault(),void 0!==n&&t(n.toString())}},r.labels?.left&&C("span",{className:"qlwapp__rating-label qlwapp__rating-label--left"},r.labels.left),C("div",{className:"qlwapp__rating-buttons"},_.map(e=>C(Wt,{key:e,idx:e,rating:n,buttonType:s,customIcon:r.customIcon,isOneClickSubmitEnabled:r.isOneClickSubmitEnabled,onClick:a}))),r.labels?.right&&C("span",{className:"qlwapp__rating-label qlwapp__rating-label--right"},r.labels.right),C("div",{className:"qlwapp__rating-submit"},void 0!==n&&C("button",{type:"submit",className:"qlwapp__message qlwapp__message--choice-input"},r.labels?.button||Vt.labels.button)))},Zt=()=>{const e=ue(null),t=ue(null),[n,o]=ie(!1),{contactId:r,contactsConversation:a,chatWithBot:s,contactResponseIsLoading:l,contacts:i}=dt(),c=i?.some(e=>"bot"===e.type&&e.bot_id===r),{messageListArray:_=[],userInputs:u,sessionId:p,clientSideAction:d}=a[r]||{messageListArray:[]};return _e(()=>{e.current&&_.length>0&&setTimeout(()=>{e.current?.scrollIntoView({behavior:"smooth",block:"nearest"})},[700])},[_]),_e(()=>{null===p&&c&&s()},[p,c]),_e(()=>{const e=t.current;if(!e)return;const n=t=>{const n=e.scrollTop<=0,o=Math.ceil(e.scrollTop)+e.clientHeight>=e.scrollHeight;(n&&t.deltaY<0||o&&t.deltaY>0)&&t.preventDefault()};return e.addEventListener("wheel",n,{passive:!1}),()=>e.removeEventListener("wheel",n)},[]),_e(()=>{d&&"redirect"===d?.type?d?.isNewTab?window.open(d.url,"_blank")||o(!0):window.location.href=d.url:o(!1)},[d]),C("div",{ref:t,className:"qlwapp__message-list"},_.map(e=>C(Ft,{key:e.id,...e})),"buttons input"==u?.type&&!l&&u?.items.map(({id:e,content:t,pictureSrc:n})=>C("div",{className:"qlwapp__message qlwapp__message--choice-input",key:e,type:"text",role:"button",tabIndex:0,onClick:e=>{e.stopPropagation(),s(t)},onKeyDown:e=>{e.stopPropagation(),bt(e,()=>s(t))},disabled:l},n?C("img",{src:n,alt:"option icon"}):t)),"rating input"==u?.type&&!l&&C(Kt,{options:u?.options,onSubmit:e=>s(e)}),n&&d?.url&&C("div",{className:"qlwapp__message qlwapp__message--user"},C("div",null,"The bot wants to open a new tab but it was blocked by your browser. It needs a manual approval."),C("a",{href:d.url,target:"_blank",rel:"noopener noreferrer",onClick:()=>o(!1)},"Continue in a new tab")),C("span",{ref:e}))},jt=()=>{const{box:e,generalConsentAccepted:t,setGeneralConsentAccepted:n}=dt(),[o,r]=ie(!0),[a,s]=ie(!1),l="yes"===e?.consent_enabled,i=e?.consent_message||"I accept cookies and privacy policy.";return l&&o?C("div",{className:`qlwapp__general-consent ${a?"qlwapp__general-consent--accepted":""} ${t?"":"qlwapp__general-consent--required"}`},C("label",{className:"qlwapp__general-consent-label"},C("input",{id:"qlwapp_general_consent",type:"checkbox",checked:t,onChange:e=>{const t=e.target.checked;n(t),t&&(s(!0),setTimeout(()=>{r(!1)},1e3))},className:"qlwapp__general-consent-checkbox",required:!0,"aria-required":"true"}),C("span",{className:"qlwapp__general-consent-text",dangerouslySetInnerHTML:{__html:i}}))):null},zt=xe(({handleBoxClose:e},t)=>{const{contactId:n,setContactId:o}=dt(),[r,a]=ie(""),s=null!==n;return C("div",{ref:t,className:je()("qlwapp__modal",s&&"qlwapp__modal--response",r)},C(Ct,{onClose:e,onPrevious:e=>{e.preventDefault(),a("qlwapp__modal--closing"),setTimeout(()=>{o(null),a("")},[300])}}),C("div",{className:"qlwapp__body"},C("div",{className:"qlwapp__carousel"},C("div",{className:"qlwapp__carousel-slide"},C(Pt,{onClick:a})),C("div",{className:"qlwapp__carousel-slide"},null!==n&&C(Zt,null)))),C(jt,null),C(It,null))}),Jt=xe((e,t)=>C(zt,{...e,ref:t})),Yt=e=>(e=>!(!e||"string"!=typeof e)&&(e.startsWith("http")||e.startsWith("https")||/\.(jpg|jpeg|png|gif|svg|webp)$/i.test(e)||e.includes(".")))(e)?C("img",{src:e,alt:"Custom Icon",className:"qlwapp__icon"}):C("i",{className:je()("qlwapp__icon",e)}),Xt=function({onClick:e}){const{button:t,isModalOpen:n}=dt(),{isAvailableNow:o,isInAvailableDay:r,isInAvailableHour:a,timefrom:s,timeto:l}=Ot(t);if(!o&&"hidden"===t.visibility)return;const i=Mt(t);return C("a",{className:je()("qlwapp__button",`qlwapp__button--${t.layout}`,!o&&"qlwapp__button--disabled"),role:"button",tabIndex:"0",onClick:n=>(n=>{n.preventDefault(),"yes"===t.box?e(n):(e=>{e.preventDefault(),xt(t)})(n)})(n)},"image"===t.layout?Yt(t.icon):C(N,null,Yt(t.icon),"bubble"===t.layout&&C("i",{className:"qlwapp__close"},"×"),t.text&&C("span",{className:"qlwapp__text"},t.text)),"bubble"===t.notification_bubble&&o&&!n&&C("span",{className:je()("qlwapp__notification-bubble",t.notification_bubble_animation&&`qlwapp__notification-bubble--${t.notification_bubble_animation}`),"aria-label":"New message notification"},"1"),r?!a&&C("span",{className:"qlwapp__time"},Xe(Ye("Available from %1$s to %2$s"),s,l)):i&&C("span",{className:"qlwapp__time"},Xe(Ye("Available on %s"),i)))},Qt=()=>window.innerWidth<=430&&Nt(),en=({children:e,containerRef:t,boxTransitionClass:n,isMobilePreview:o})=>{const[r,a]=ie(Qt()),{button:s}=dt(),l="yes"===s.rounded;_e(()=>{const e=()=>{a(Qt())};return window.addEventListener("resize",e),()=>window.removeEventListener("resize",e)},[]);const i=r||o;return C("div",{ref:t,className:je()("qlwapp__container",`qlwapp__container--${s.position}`,l&&"qlwapp__container--rounded",i&&"qlwapp-is-mobile",n)},e)},tn=e=>!("hide"===e||"desktop"===e&&Nt()||"mobile"===e&&!Nt()),nn=e=>e?(Array.isArray(e)||(e=Object.values(e)),e.filter(e=>{const t=tn(e?.display?.devices),n="hidden"===e?.visibility&&!Ot(e).isAvailableNow;return t&&!n}).sort((e,t)=>{const n=void 0!==e.order&&null!==e.order?e.order:Number.MAX_SAFE_INTEGER,o=void 0!==t.order&&null!==t.order?t.order:Number.MAX_SAFE_INTEGER;return n===o?0:n<o?-1:1})):[],on=function(e,t){function n(e){var n=this.props.ref;return n!=e.ref&&n&&("function"==typeof n?n(null):n.current=null),t?!t(this.props,e)||n!=e.ref:Ce(this.props,e)}function o(t){return this.shouldComponentUpdate=n,C(e,t)}return o.displayName="Memo("+(e.displayName||e.name)+")",o.__f=o.prototype.isReactComponent=!0,o.type=e,o}(e=>{const{box:t,button:n,contacts:o,isMobilePreview:r,previewContainerRef:a}=e,s=nn(o),l=ue(null),i=ue(null),[c,_]=ie(!1),[u,p]=ie(""),d="qlwapp_box_closed",f="yes"===t.auto_open&&"yes"===n.box,m="true"===function(e){const t=document.cookie.match("(^|;) ?"+e+"=([^;]*)(;|$)");return t?t[2]:null}(d),h=Number(t.auto_delay_open);_e(()=>{f&&!m&&setTimeout(()=>{_(!0)},h)},[]),_e(()=>{const e=t.allow_outside_close||"no",n=t=>{c&&"yes"===e&&i.current&&!i.current.contains(t.target)&&(a?.current?a.current.contains(t.target)&&v(t):v(t))};if(c&&"yes"===e)return document.addEventListener("mousedown",n),()=>{document.removeEventListener("mousedown",n)}},[c,t.allow_outside_close,a]);const v=e=>{e?.preventDefault(),p("qlwapp__container--closing"),function(e){let t="";{const e=new Date;e.setTime(e.getTime()+6048e5),t="; expires="+e.toUTCString()}document.cookie=e+"=true"+t+"; path=/"}(d),setTimeout(()=>{_(!1),p("")},300)};return C(ft,{...e,contacts:s,isModalOpen:c},C(en,{isMobilePreview:r,boxTransitionClass:u,containerRef:l},c&&C(Jt,{ref:i,handleBoxClose:v}),C(Xt,{onClick:()=>{c?v():(_(!0),p("qlwapp__container--opening"),setTimeout(()=>{p("qlwapp__container--open")},300))}})))});document.addEventListener("DOMContentLoaded",()=>{document.querySelectorAll(".qlwapp").forEach(e=>{var t,n,o,r,a;const s=null!==(t=JSON.parse(e.getAttribute("data-display")))&&void 0!==t?t:{},l=null!==(n=JSON.parse(e.getAttribute("data-button")))&&void 0!==n?n:{},i=null!==(o=JSON.parse(e.getAttribute("data-box")))&&void 0!==o?o:{},c=null!==(r=l?.devices)&&void 0!==r?r:s?.devices;if(!tn(c))return;const _=nn(null!==(a=JSON.parse(e.getAttribute("data-contacts")))&&void 0!==a?a:[]);Ke(e).render(C(on,{display:s,button:l,box:i,contacts:_}))}),document.addEventListener("click",e=>{const t=e.target.closest('[data-action="open"]');if(!t)return;e.preventDefault();const n=t.dataset.phone,o=t.dataset.message,r=t.dataset.whatsappLinkType||"api";if(!n)return;const a=Tt({type:"phone",phone:n,message:o,whatsappLinkType:r}),s=new CustomEvent("qlwapp.click",{bubbles:!0,cancelable:!0});window.dispatchEvent(s),window.open(a,"_blank","noreferrer")})})})()})();
!function(e){var t={};function n(r){if(t[r])return t[r].exports;var o=t[r]={i:r,l:!1,exports:{}};return e[r].call(o.exports,o,o.exports,n),o.l=!0,o.exports}n.m=e,n.c=t,n.d=function(e,t,r){n.o(e,t)||Object.defineProperty(e,t,{enumerable:!0,get:r})},n.r=function(e){"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(e,"__esModule",{value:!0})},n.t=function(e,t){if(1&t&&(e=n(e)),8&t)return e;if(4&t&&"object"==typeof e&&e&&e.__esModule)return e;var r=Object.create(null);if(n.r(r),Object.defineProperty(r,"default",{enumerable:!0,value:e}),2&t&&"string"!=typeof e)for(var o in e)n.d(r,o,function(t){return e[t]}.bind(null,o));return r},n.n=function(e){var t=e&&e.__esModule?function(){return e.default}:function(){return e};return n.d(t,"a",t),t},n.o=function(e,t){return Object.prototype.hasOwnProperty.call(e,t)},n.p="",n(n.s=115)}({115:function(e,t,n){"use strict";n.r(t);var r=function(e){return"string"!=typeof e||""===e?(console.error("The namespace must be a non-empty string."),!1):!!/^[a-zA-Z][a-zA-Z0-9_.\-\/]*$/.test(e)||(console.error("The namespace can only contain numbers, letters, dashes, periods, underscores and slashes."),!1)};var o=function(e){return"string"!=typeof e||""===e?(console.error("The hook name must be a non-empty string."),!1):/^__/.test(e)?(console.error("The hook name cannot begin with `__`."),!1):!!/^[a-zA-Z][a-zA-Z0-9_.-]*$/.test(e)||(console.error("The hook name can only contain numbers, letters, dashes, periods and underscores."),!1)};var i=function(e,t){return function(n,i,a){var s=arguments.length>3&&void 0!==arguments[3]?arguments[3]:10,l=e[t];if(o(n)&&r(i))if("function"==typeof a)if("number"==typeof s){var c={callback:a,priority:s,namespace:i};if(l[n]){var u,d=l[n].handlers;for(u=d.length;u>0&&!(s>=d[u-1].priority);u--);u===d.length?d[u]=c:d.splice(u,0,c),l.__current.forEach((function(e){e.name===n&&e.currentIndex>=u&&e.currentIndex++}))}else l[n]={handlers:[c],runs:0};"hookAdded"!==n&&e.doAction("hookAdded",n,i,a,s)}else console.error("If specified, the hook priority must be a number.");else console.error("The hook callback must be a function.")}};var a=function(e,t){var n=arguments.length>2&&void 0!==arguments[2]&&arguments[2];return function(i,a){var s=e[t];if(o(i)&&(n||r(a))){if(!s[i])return 0;var l=0;if(n)l=s[i].handlers.length,s[i]={runs:s[i].runs,handlers:[]};else for(var c=s[i].handlers,u=function(e){c[e].namespace===a&&(c.splice(e,1),l++,s.__current.forEach((function(t){t.name===i&&t.currentIndex>=e&&t.currentIndex--})))},d=c.length-1;d>=0;d--)u(d);return"hookRemoved"!==i&&e.doAction("hookRemoved",i,a),l}}};var s=function(e,t){return function(n,r){var o=e[t];return void 0!==r?n in o&&o[n].handlers.some((function(e){return e.namespace===r})):n in o}};var l=function(e,t){var n=arguments.length>2&&void 0!==arguments[2]&&arguments[2];return function(r){var o=e[t];o[r]||(o[r]={handlers:[],runs:0}),o[r].runs++;var i=o[r].handlers;for(var a=arguments.length,s=new Array(a>1?a-1:0),l=1;l<a;l++)s[l-1]=arguments[l];if(!i||!i.length)return n?s[0]:void 0;var c={name:r,currentIndex:0};for(o.__current.push(c);c.currentIndex<i.length;){var u=i[c.currentIndex],d=u.callback.apply(null,s);n&&(s[0]=d),c.currentIndex++}return o.__current.pop(),n?s[0]:void 0}};var c=function(e,t){return function(){var n,r,o=e[t];return null!==(n=null===(r=o.__current[o.__current.length-1])||void 0===r?void 0:r.name)&&void 0!==n?n:null}};var u=function(e,t){return function(n){var r=e[t];return void 0===n?void 0!==r.__current[0]:!!r.__current[0]&&n===r.__current[0].name}};var d=function(e,t){return function(n){var r=e[t];if(o(n))return r[n]&&r[n].runs?r[n].runs:0}},f=function e(){!function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,e),this.actions=Object.create(null),this.actions.__current=[],this.filters=Object.create(null),this.filters.__current=[],this.addAction=i(this,"actions"),this.addFilter=i(this,"filters"),this.removeAction=a(this,"actions"),this.removeFilter=a(this,"filters"),this.hasAction=s(this,"actions"),this.hasFilter=s(this,"filters"),this.removeAllActions=a(this,"actions",!0),this.removeAllFilters=a(this,"filters",!0),this.doAction=l(this,"actions"),this.applyFilters=l(this,"filters",!0),this.currentAction=c(this,"actions"),this.currentFilter=c(this,"filters"),this.doingAction=u(this,"actions"),this.doingFilter=u(this,"filters"),this.didAction=d(this,"actions"),this.didFilter=d(this,"filters")};var h=function(){return new f},p=h();p.addAction,p.addFilter,p.removeAction,p.removeFilter,p.hasAction,p.hasFilter,p.removeAllActions,p.removeAllFilters,p.doAction,p.applyFilters,p.currentAction,p.currentFilter,p.doingAction,p.doingFilter,p.didAction,p.didFilter,p.actions,p.filters;function v(e){return(v="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e})(e)}function m(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,r)}return n}function y(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?m(Object(n),!0).forEach((function(t){g(e,t,n[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):m(Object(n)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))}))}return e}function g(e,t,n){return(t=function(e){var t=function(e,t){if("object"!=v(e)||!e)return e;var n=e[Symbol.toPrimitive];if(void 0!==n){var r=n.call(e,t||"default");if("object"!=v(r))return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return("string"===t?String:Number)(e)}(e,"string");return"symbol"==v(t)?t:t+""}(t))in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}window.isEditMode=!1,window.eael=window.ea={hooks:h(),isEditMode:!1,elementStatusCheck:function(e){return!(!window.eaElementList||!(e in window.eaElementList))||(window.eaElementList=y(y({},window.eaElementList),{},g({},e,!0)),!1)},debounce:function(e,t){var n;return function(){var r=this,o=arguments;clearTimeout(n),n=setTimeout((function(){e.apply(r,o)}),t)}}},eael.hooks.addAction("widgets.reinit","ea",(function(e){var t=jQuery(".eael-filter-gallery-container",e),n=jQuery(".eael-post-grid:not(.eael-post-carousel)",e),r=jQuery(".eael-twitter-feed-masonry",e),o=jQuery(".eael-instafeed",e),i=jQuery(".premium-gallery-container",e),a=jQuery(".eael-event-calendar-cls",e),s=jQuery(".eael-testimonial-slider",e),l=jQuery(".eael-tm-carousel",e),c=jQuery(".eael-post-carousel:not(.eael-post-grid)",e),u=jQuery(".eael-logo-carousel",e),d=jQuery(".eael-twitter-feed-carousel",e);t.length&&t.isotope("layout"),n.length&&n.isotope("layout"),r.length&&r.isotope("layout"),o.length&&o.isotope("layout"),i.length&&i.isotope("layout"),a.length&&eael.hooks.doAction("eventCalendar.reinit"),s.length&&eael.hooks.doAction("testimonialSlider.reinit"),l.length&&eael.hooks.doAction("teamMemberCarousel.reinit"),c.length&&eael.hooks.doAction("postCarousel.reinit"),u.length&&eael.hooks.doAction("logoCarousel.reinit"),d.length&&eael.hooks.doAction("twitterCarousel.reinit")}));var w,b=function(e){void 0===window.eaelPreventResizeOnClick&&window.dispatchEvent(new Event("resize")),(e="object"===v(e)?e:jQuery(e)).find(".swiper-wrapper").each((function(){var e=jQuery(this).css("transform");jQuery(this).css("transform",e)}))};eael.hooks.addAction("ea-advanced-tabs-triggered","ea",b),eael.hooks.addAction("ea-advanced-accordion-triggered","ea",b),jQuery(window).on("elementor/frontend/init",(function(){window.isEditMode=elementorFrontend.isEditMode(),window.eael.isEditMode=elementorFrontend.isEditMode(),eael.hooks.doAction("init"),eael.isEditMode&&eael.hooks.doAction("editMode.init")})),function(e){eael.getToken=function(){localize.nonce&&!eael.noncegenerated&&e.ajax({url:localize.ajaxurl,type:"post",data:{action:"eael_get_token"},success:function(e){e.success&&(localize.nonce=e.data.nonce,eael.noncegenerated=!0)}})},eael.sanitizeURL=function(e){if(e.startsWith("/")||e.startsWith("#"))return e;try{var t=new URL(e);if(!["http:","https:","ftp:","ftps:","mailto:","news:","irc:","irc6:","ircs:","gopher:","nntp:","feed:","telnet:","mms:","rtsp:","sms:","svn:","tel:","fax:","xmpp:","webcal:","urn:"].includes(t.protocol))throw new Error("Invalid protocol");return t.toString()}catch(e){return console.error("Error sanitizing URL:",e.message),"#"}};var t=!0;window.addEventListener("hashchange",(function(){if(t){var n=window.location.hash.substr(1);"undefined"!==(n="safari"===n?"eael-safari":n)&&n&&/^[A-Za-z][-A-Za-z0-9_:.]*$/.test(n)&&e("#"+n).trigger("click")}})),e("a").on("click",(function(n){var r,o=e(this).attr("href");(r=(o=void 0===o?"":o).startsWith("#"))||(r=(o=o.replace(localize.page_permalink,"")).startsWith("#")),r&&(t=!1,setTimeout((function(){t=!0}),100));try{if(o.startsWith("#!")){var i=o.replace("#!","#");e(i).trigger("click")}else if(r&&(e(o).hasClass("eael-tab-item-trigger")||e(o).hasClass("eael-accordion-header"))&&(e(o).trigger("click"),void 0!==o&&o)){var a=e(o).closest(".eael-advance-tabs");if(a.length>0){var s=a.data("custom-id-offset");s=s?parseFloat(s):0,e("html, body").animate({scrollTop:e(o).offset().top-s},300)}}}catch(e){}})),e(document).on("click",".e-n-tab-title",(function(){setTimeout((function(){window.dispatchEvent(new Event("resize"))}),100)}))}(jQuery),(w=jQuery)(document).on("click",".theme-savoy .eael-product-popup .nm-qty-minus, .theme-savoy .eael-product-popup .nm-qty-plus",(function(e){var t=w(this),n=t.closest(".quantity").find(".qty"),r=parseFloat(n.val()),o=parseFloat(n.attr("max")),i=parseFloat(n.attr("min")),a=n.attr("step");r&&""!==r&&"NaN"!==r||(r=0),""!==o&&"NaN"!==o||(o=""),""!==i&&"NaN"!==i||(i=0),"any"!==a&&""!==a&&void 0!==a&&"NaN"!==parseFloat(a)||(a=1),t.hasClass("nm-qty-plus")?o&&(o==r||r>o)?n.val(o):n.val(r+parseFloat(a)):i&&(i==r||r<i)?n.val(i):r>0&&n.val(r-parseFloat(a))})),function(e){e.fn.isInViewport=function(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:2;if(e(this).length<1)return!1;var n=e(this).offset().top,r=n+e(this).outerHeight()/t,o=e(window).scrollTop(),i=o+e(window).height()/t;return r>o&&n<i},e(document).ready((function(){var e=new URLSearchParams(location.search);if(e.has("popup-selector")&&(e.has("eael-lostpassword")||e.has("eael-resetpassword"))){var t=e.get("popup-selector");t.length&&/^[A-Za-z.#][A-Za-z0-9_:.#\s-]*$/.test(t)&&(t=t.replace(/_/g," "),setTimeout((function(){jQuery(t).trigger("click")}),300))}})),e(document).on("click",".eael-onpage-edit-template",(function(){var t=e(this),n=t.data("eael-template-id"),r=t.data("page-id"),o=t.data("mode");"edit"===o?(parent.window.$e.internal("panel/state-loading"),parent.window.$e.run("editor/documents/switch",{id:parseInt(n)}).then((function(){t.data("mode","save"),t.find("span").text("Save & Back"),t.find("i").addClass("eicon-arrow-left").removeClass("eicon-edit"),t.closest(".eael-onpage-edit-template-wrapper").addClass("eael-onpage-edit-activate").parent().addClass("eael-widget-otea-active"),parent.window.$e.internal("panel/state-ready")}))):"save"===o&&(parent.window.$e.internal("panel/state-loading"),parent.window.$e.run("editor/documents/switch",{id:parseInt(r),mode:"save",shouldScroll:!1}).then((function(){parent.window.$e.internal("panel/state-ready"),t.data("mode","edit")})))}))}(jQuery)}});